svn commit: r296307 - head/sys/arm64/cavium
Author: wma Date: Wed Mar 2 08:39:59 2016 New Revision: 296307 URL: https://svnweb.freebsd.org/changeset/base/296307 Log: Improve ThunderX PEM driver to work on pass2 revision Things changed: * do not allocate 4GB of SLI space, because it's the waste of system resources. Allocate only small portions when needed. * provide own implementation of activate_resource which performs address translation between PCI bus and host PA address space. This is temporary solution, should be replaced by bus_map_resource once implemented. Obtained from: Semihalf Sponsored by: Cavium Approved by: cognet (mentor) Reviewed by: jhb Differential revision: https://reviews.freebsd.org/D5294 Modified: head/sys/arm64/cavium/thunder_pcie_common.c head/sys/arm64/cavium/thunder_pcie_common.h head/sys/arm64/cavium/thunder_pcie_pem.c Modified: head/sys/arm64/cavium/thunder_pcie_common.c == --- head/sys/arm64/cavium/thunder_pcie_common.c Wed Mar 2 05:43:16 2016 (r296306) +++ head/sys/arm64/cavium/thunder_pcie_common.c Wed Mar 2 08:39:59 2016 (r296307) @@ -106,6 +106,28 @@ range_addr_is_phys(struct pcie_range *ra } uint64_t +range_addr_phys_to_pci(struct pcie_range *ranges, uint64_t phys_addr) +{ + struct pcie_range *r; + uint64_t offset; + int tuple; + + /* Find physical address corresponding to given bus address */ + for (tuple = 0; tuple < MAX_RANGES_TUPLES; tuple++) { + r = &ranges[tuple]; + if (phys_addr >= r->phys_base && + phys_addr < (r->phys_base + r->size)) { + /* Given phys addr is in this range. +* Translate phys addr to bus addr. +*/ + offset = phys_addr - r->phys_base; + return (r->pci_base + offset); + } + } + return (0); +} + +uint64_t range_addr_pci_to_phys(struct pcie_range *ranges, uint64_t pci_addr) { struct pcie_range *r; Modified: head/sys/arm64/cavium/thunder_pcie_common.h == --- head/sys/arm64/cavium/thunder_pcie_common.h Wed Mar 2 05:43:16 2016 (r296306) +++ head/sys/arm64/cavium/thunder_pcie_common.h Wed Mar 2 08:39:59 2016 (r296307) @@ -36,6 +36,7 @@ MALLOC_DECLARE(M_THUNDER_PCIE); uint32_t range_addr_is_pci(struct pcie_range *, uint64_t, uint64_t); uint32_t range_addr_is_phys(struct pcie_range *, uint64_t, uint64_t); +uint64_t range_addr_phys_to_pci(struct pcie_range *, uint64_t); uint64_t range_addr_pci_to_phys(struct pcie_range *, uint64_t); int thunder_pcie_identify_ecam(device_t, int *); Modified: head/sys/arm64/cavium/thunder_pcie_pem.c == --- head/sys/arm64/cavium/thunder_pcie_pem.cWed Mar 2 05:43:16 2016 (r296306) +++ head/sys/arm64/cavium/thunder_pcie_pem.cWed Mar 2 08:39:59 2016 (r296307) @@ -93,7 +93,6 @@ __FBSDID("$FreeBSD$"); #defineSLIX_S2M_REGX_ACC_SPACING 0x0010UL #defineSLI_BASE0x8800UL #defineSLI_WINDOW_SPACING 0x0040UL -#defineSLI_WINDOW_SIZE 0xFF00UL #defineSLI_PCI_OFFSET 0x0010UL #defineSLI_NODE_SHIFT (44) #defineSLI_NODE_MASK (3) @@ -121,9 +120,15 @@ __FBSDID("$FreeBSD$"); #defineRID_PEM_SPACE 1 +static int thunder_pem_activate_resource(device_t, device_t, int, int, +struct resource *); +static int thunder_pem_adjust_resource(device_t, device_t, int, +struct resource *, rman_res_t, rman_res_t); static struct resource * thunder_pem_alloc_resource(device_t, device_t, int, int *, rman_res_t, rman_res_t, rman_res_t, u_int); static int thunder_pem_attach(device_t); +static int thunder_pem_deactivate_resource(device_t, device_t, int, int, +struct resource *); static int thunder_pem_detach(device_t); static uint64_t thunder_pem_config_reg_read(struct thunder_pem_softc *, int); static int thunder_pem_link_init(struct thunder_pem_softc *); @@ -135,6 +140,7 @@ static int thunder_pem_read_ivar(device_ static void thunder_pem_release_all(device_t); static int thunder_pem_release_resource(device_t, device_t, int, int, struct resource *); +static struct rman * thunder_pem_rman(struct thunder_pem_softc *, int); static void thunder_pem_slix_s2m_regx_acc_modify(struct thunder_pem_softc *, int, int); static void thunder_pem_write_config(device_t, u_int, u_int, u_int, u_int, @@ -157,8 +163,9 @@ static device_method_t thunder_pem_metho DEVMETHOD(bus_write_ivar, thunder_pem_write_ivar),
Re: svn commit: r296277 - in head: share/man/man4 sys/conf sys/kern sys/modules sys/modules/aio sys/sys tests/sys/aio
Hi John, On 3/1/16 9:12 PM, John Baldwin wrote: > Author: jhb > Date: Tue Mar 1 18:12:14 2016 > New Revision: 296277 > URL: https://svnweb.freebsd.org/changeset/base/296277 > > Log: > Refactor the AIO subsystem to permit file-type-specific handling and > improve cancellation robustness. [...] Nice work! It deserves its own entry in UPDATING. What do you think? -- Maxim Konovalov ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r296308 - head/sys/dev/pci
Author: wma Date: Wed Mar 2 09:54:58 2016 New Revision: 296308 URL: https://svnweb.freebsd.org/changeset/base/296308 Log: Support for Enhanced Allocation in PCI On some platforms, BAR entries are hardcoded and must not be accessed using standard method. Add functionality to identify this situation and configure the bus based on Enhanced Allocation structure. Obtained from: Semihalf Sponsored by: Cavium Approved by: cognet (mentor) Reviewed by: jhb Differential revision: https://reviews.freebsd.org/D5242 Modified: head/sys/dev/pci/pci.c head/sys/dev/pci/pci_iov.c head/sys/dev/pci/pci_private.h head/sys/dev/pci/pcivar.h Modified: head/sys/dev/pci/pci.c == --- head/sys/dev/pci/pci.c Wed Mar 2 08:39:59 2016(r296307) +++ head/sys/dev/pci/pci.c Wed Mar 2 09:54:58 2016(r296308) @@ -63,6 +63,11 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef PCI_IOV +#include +#include +#endif + #include #include #include @@ -694,6 +699,81 @@ pci_fill_devinfo(device_t pcib, int d, i #undef REG static void +pci_ea_fill_info(device_t pcib, pcicfgregs *cfg) +{ +#defineREG(n, w) PCIB_READ_CONFIG(pcib, cfg->bus, cfg->slot, cfg->func, \ +cfg->ea.ea_location + (n), w) + int num_ent; + int ptr; + int a, b; + uint32_t val; + int ent_size; + uint32_t dw[4]; + uint64_t base, max_offset; + struct pci_ea_entry *eae; + + if (cfg->ea.ea_location == 0) + return; + + STAILQ_INIT(&cfg->ea.ea_entries); + + /* Determine the number of entries */ + num_ent = REG(PCIR_EA_NUM_ENT, 2); + num_ent &= PCIM_EA_NUM_ENT_MASK; + + /* Find the first entry to care of */ + ptr = PCIR_EA_FIRST_ENT; + + /* Skip DWORD 2 for type 1 functions */ + if ((cfg->hdrtype & PCIM_HDRTYPE) == PCIM_HDRTYPE_BRIDGE) + ptr += 4; + + for (a = 0; a < num_ent; a++) { + + eae = malloc(sizeof(*eae), M_DEVBUF, M_WAITOK | M_ZERO); + eae->eae_cfg_offset = cfg->ea.ea_location + ptr; + + /* Read a number of dwords in the entry */ + val = REG(ptr, 4); + ptr += 4; + ent_size = (val & PCIM_EA_ES); + + for (b = 0; b < ent_size; b++) { + dw[b] = REG(ptr, 4); + ptr += 4; + } + + eae->eae_flags = val; + eae->eae_bei = (PCIM_EA_BEI & val) >> PCIM_EA_BEI_OFFSET; + + base = dw[0] & PCIM_EA_FIELD_MASK; + max_offset = dw[1] | ~PCIM_EA_FIELD_MASK; + b = 2; + if (((dw[0] & PCIM_EA_IS_64) != 0) && (b < ent_size)) { + base |= (uint64_t)dw[b] << 32UL; + b++; + } + if (((dw[1] & PCIM_EA_IS_64) != 0) + && (b < ent_size)) { + max_offset |= (uint64_t)dw[b] << 32UL; + b++; + } + + eae->eae_base = base; + eae->eae_max_offset = max_offset; + + STAILQ_INSERT_TAIL(&cfg->ea.ea_entries, eae, eae_link); + + if (bootverbose) { + printf("PCI(EA) dev %04x:%04x, bei %d, flags #%x, base #%jx, max_offset #%jx\n", + cfg->vendor, cfg->device, eae->eae_bei, eae->eae_flags, + (uintmax_t)eae->eae_base, (uintmax_t)eae->eae_max_offset); + } + } +} +#undef REG + +static void pci_read_cap(device_t pcib, pcicfgregs *cfg) { #defineREG(n, w) PCIB_READ_CONFIG(pcib, cfg->bus, cfg->slot, cfg->func, n, w) @@ -830,6 +910,10 @@ pci_read_cap(device_t pcib, pcicfgregs * val = REG(ptr + PCIER_FLAGS, 2); cfg->pcie.pcie_type = val & PCIEM_FLAGS_TYPE; break; + case PCIY_EA: /* Enhanced Allocation */ + cfg->ea.ea_location = ptr; + pci_ea_fill_info(pcib, cfg); + break; default: break; } @@ -3504,6 +3588,176 @@ pci_alloc_secbus(device_t dev, device_t } #endif +static int +pci_ea_bei_to_rid(device_t dev, int bei) +{ +#ifdef PCI_IOV + struct pci_devinfo *dinfo; + int iov_pos; + struct pcicfg_iov *iov; + + dinfo = device_get_ivars(dev); + iov = dinfo->cfg.iov; + if (iov != NULL) + iov_pos = iov->iov_pos; + else + iov_pos = 0; +#endif + + /* Check if matches BAR */ + if ((bei >= PCIM_EA_BEI_BAR_0) && + (bei <= PCIM_EA_BEI_BAR_5)) + return (PCIR_BAR(bei)); + + /* Check ROM */ + if (bei == PCIM_EA_BEI_ROM) +
svn commit: r296313 - head/sys/arm/arm
Author: andrew Date: Wed Mar 2 14:33:46 2016 New Revision: 296313 URL: https://svnweb.freebsd.org/changeset/base/296313 Log: The cpu_reset_needs_v4_MMU_disable variable is only used in locore-v4.S, only define it when building for ARMv5 or prior. Sponsored by: ABT Systems Ltd Modified: head/sys/arm/arm/cpufunc.c Modified: head/sys/arm/arm/cpufunc.c == --- head/sys/arm/arm/cpufunc.c Wed Mar 2 13:54:43 2016(r296312) +++ head/sys/arm/arm/cpufunc.c Wed Mar 2 14:33:46 2016(r296313) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -559,7 +560,9 @@ struct cpu_functions cortexa_cpufuncs = struct cpu_functions cpufuncs; u_int cputype; -u_int cpu_reset_needs_v4_MMU_disable; /* flag used in locore.s */ +#if __ARM_ARCH <= 5 +u_int cpu_reset_needs_v4_MMU_disable; /* flag used in locore-v4.s */ +#endif #if defined(CPU_ARM9) || \ defined (CPU_ARM9E) || \ @@ -754,7 +757,6 @@ set_cpufuncs() #if defined(CPU_ARM1176) if (cputype == CPU_ID_ARM1176JZS) { cpufuncs = arm1176_cpufuncs; - cpu_reset_needs_v4_MMU_disable = 1; /* V4 or higher */ get_cachetype_cp15(); goto out; } @@ -777,7 +779,6 @@ set_cpufuncs() cputype == CPU_ID_KRAIT300R0 || cputype == CPU_ID_KRAIT300R1 ) { cpufuncs = cortexa_cpufuncs; - cpu_reset_needs_v4_MMU_disable = 1; /* V4 or higher */ get_cachetype_cp15(); goto out; } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r296315 - head/sys/arm64/include
Author: bz Date: Wed Mar 2 15:20:42 2016 New Revision: 296315 URL: https://svnweb.freebsd.org/changeset/base/296315 Log: Force re-routing PCI interrupts (this is for legacy INTx not MSI). Need this for gem5, but was not needed on real hadrware (yet) as it was always MSI. Reviewed by: andrew, jhb Discovered by:andrew Sponsored by: DARPA/AFRL Differential Revision:https://reviews.freebsd.org/D5494 Modified: head/sys/arm64/include/param.h Modified: head/sys/arm64/include/param.h == --- head/sys/arm64/include/param.h Wed Mar 2 14:51:22 2016 (r296314) +++ head/sys/arm64/include/param.h Wed Mar 2 15:20:42 2016 (r296315) @@ -42,6 +42,8 @@ #defineSTACKALIGNBYTES (16 - 1) #defineSTACKALIGN(p) ((uint64_t)(p) & ~STACKALIGNBYTES) +#define__PCI_REROUTE_INTERRUPT + #ifndef MACHINE #defineMACHINE "arm64" #endif ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r296261 - in head/sys: kern sys
All, On 01/03/16 10:57, Svatopluk Kraus wrote: Author: skra Date: Tue Mar 1 10:57:29 2016 New Revision: 296261 URL: https://svnweb.freebsd.org/changeset/base/296261 Log: Mark other parts of interrupt framework as INTR_SOLO option specific. IMHO... The general rationalisation of the FreeBSD kernel-mode driver API surface probably warrants updating this document: https://www.freebsd.org/doc/en/books/arch-handbook/ Describing the general case in terms of ISA device drivers is probably confusing these days, although it reflects how the code has evolved. cheers Bruce ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r296316 - head/sys/dev/pci
Author: bz Date: Wed Mar 2 15:26:55 2016 New Revision: 296316 URL: https://svnweb.freebsd.org/changeset/base/296316 Log: Add gem5 support, so we attach there as well. Fix the boundary limit to end at the end of the region and not one beyond (1). Diagnosed by: andrew (1) Reviewed by: andrew, br Sponsored by: DARPA/AFRL Differential Revision:https://reviews.freebsd.org/D5493 Modified: head/sys/dev/pci/pci_host_generic.c Modified: head/sys/dev/pci/pci_host_generic.c == --- head/sys/dev/pci/pci_host_generic.c Wed Mar 2 15:20:42 2016 (r296315) +++ head/sys/dev/pci/pci_host_generic.c Wed Mar 2 15:26:55 2016 (r296316) @@ -143,6 +143,10 @@ generic_pcie_probe(device_t dev) device_set_desc(dev, "Generic PCI host controller"); return (BUS_PROBE_GENERIC); } + if (ofw_bus_is_compatible(dev, "arm,gem5_pcie")) { + device_set_desc(dev, "GEM5 PCIe host controller"); + return (BUS_PROBE_DEFAULT); + } return (ENXIO); } @@ -208,12 +212,11 @@ pci_host_generic_attach(device_t dev) continue; /* empty range element */ if (sc->ranges[tuple].flags & FLAG_MEM) { error = rman_manage_region(&sc->mem_rman, - phys_base, - phys_base + size); + phys_base, phys_base + size - 1); } else if (sc->ranges[tuple].flags & FLAG_IO) { error = rman_manage_region(&sc->io_rman, - pci_base + PCI_IO_WINDOW_OFFSET, - pci_base + PCI_IO_WINDOW_OFFSET + size); + pci_base + PCI_IO_WINDOW_OFFSET, + pci_base + PCI_IO_WINDOW_OFFSET + size - 1); } else continue; if (error) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r296319 - head/libexec/rtld-elf
Author: kib Date: Wed Mar 2 16:36:24 2016 New Revision: 296319 URL: https://svnweb.freebsd.org/changeset/base/296319 Log: Fix handling of DT_TEXTREL for an object with more than one read-only segment. According to gABI spec, presence of the tag indicates that dynamic linker must be prepared to handle relocations against any read-only segment, not only the segment which we, somewhat arbitrary, declared the text. For each read-only segment, add write permission before relocs are processed, and return to the mapping mode requested by the phdr, after relocs are done. Reported, tested, and reviewed by:emaste PR: 207631 Sponsored by: The FreeBSD Foundation MFC after:2 weeks Modified: head/libexec/rtld-elf/map_object.c head/libexec/rtld-elf/rtld.c head/libexec/rtld-elf/rtld.h Modified: head/libexec/rtld-elf/map_object.c == --- head/libexec/rtld-elf/map_object.c Wed Mar 2 16:14:46 2016 (r296318) +++ head/libexec/rtld-elf/map_object.c Wed Mar 2 16:36:24 2016 (r296319) @@ -39,7 +39,6 @@ #include "rtld.h" static Elf_Ehdr *get_elf_header(int, const char *, const struct stat *); -static int convert_prot(int); /* Elf flags -> mmap protection */ static int convert_flags(int); /* Elf flags -> mmap flags */ /* @@ -445,7 +444,7 @@ obj_new(void) * Given a set of ELF protection flags, return the corresponding protection * flags for MMAP. */ -static int +int convert_prot(int elfflags) { int prot = 0; Modified: head/libexec/rtld-elf/rtld.c == --- head/libexec/rtld-elf/rtld.cWed Mar 2 16:14:46 2016 (r296318) +++ head/libexec/rtld-elf/rtld.cWed Mar 2 16:36:24 2016 (r296319) @@ -2627,6 +2627,40 @@ relocate_object_dag(Obj_Entry *root, boo } /* + * Prepare for, or clean after, relocating an object marked with + * DT_TEXTREL or DF_TEXTREL. Before relocating, all read-only + * segments are remapped read-write. After relocations are done, the + * segment's permissions are returned back to the modes specified in + * the phdrs. If any relocation happened, or always for wired + * program, COW is triggered. + */ +static int +reloc_textrel_prot(Obj_Entry *obj, bool before) +{ + const Elf_Phdr *ph; + void *base; + size_t l, sz; + int prot; + + for (l = obj->phsize / sizeof(*ph), ph = obj->phdr; l > 0; + l--, ph++) { + if (ph->p_type != PT_LOAD || (ph->p_flags & PF_W) != 0) + continue; + base = obj->relocbase + trunc_page(ph->p_vaddr); + sz = round_page(ph->p_vaddr + ph->p_filesz) - + trunc_page(ph->p_vaddr); + prot = convert_prot(ph->p_flags) | (before ? PROT_WRITE : 0); + if (mprotect(base, sz, prot) == -1) { + _rtld_error("%s: Cannot write-%sable text segment: %s", + obj->path, before ? "en" : "dis", + rtld_strerror(errno)); + return (-1); + } + } + return (0); +} + +/* * Relocate single object. * Returns 0 on success, or -1 on failure. */ @@ -2648,28 +2682,17 @@ relocate_object(Obj_Entry *obj, bool bin return (-1); } - if (obj->textrel) { - /* There are relocations to the write-protected text segment. */ - if (mprotect(obj->mapbase, obj->textsize, - PROT_READ|PROT_WRITE|PROT_EXEC) == -1) { - _rtld_error("%s: Cannot write-enable text segment: %s", - obj->path, rtld_strerror(errno)); - return (-1); - } - } + /* There are relocations to the write-protected text segment. */ + if (obj->textrel && reloc_textrel_prot(obj, true) != 0) + return (-1); /* Process the non-PLT non-IFUNC relocations. */ if (reloc_non_plt(obj, rtldobj, flags, lockstate)) return (-1); - if (obj->textrel) { /* Re-protected the text segment. */ - if (mprotect(obj->mapbase, obj->textsize, - PROT_READ|PROT_EXEC) == -1) { - _rtld_error("%s: Cannot write-protect text segment: %s", - obj->path, rtld_strerror(errno)); - return (-1); - } - } + /* Re-protected the text segment. */ + if (obj->textrel && reloc_textrel_prot(obj, false) != 0) + return (-1); /* Set the special PLT or GOT entries. */ init_pltgot(obj); Modified: head/libexec/rtld-elf/rtld.h == --- head/libexec/rtld-elf/rtld.hWed Mar 2 16:14:46 2016 (r296318) +++ head/libexec/r
svn commit: r296320 - in head/sys: kern sys
Author: kib Date: Wed Mar 2 18:46:17 2016 New Revision: 296320 URL: https://svnweb.freebsd.org/changeset/base/296320 Log: If callout_stop_safe() noted that the callout is currently executing, but next invocation is cancelled while migrating, sleepq_check_timeout() needs to be informed that the callout is stopped. Otherwise the thread switches off CPU and never become runnable, since running callout could have already raced with us, while the migrating and cancelled callout could be one which is expected to set TDP_TIMOFAIL flag for us. This contradicts with the expected behaviour of callout_stop() for other callers, which e.g. decrement references from the callout callbacks. Add a new flag CS_MIGRBLOCK requesting report of the situation as 'successfully stopped'. Reviewed by: jhb (previous version) Tested by:cognet, pho PR: 200992 Sponsored by: The FreeBSD Foundation MFC after:2 weeks Differential revision:https://reviews.freebsd.org/D5221 Modified: head/sys/kern/kern_timeout.c head/sys/kern/subr_sleepqueue.c head/sys/sys/callout.h Modified: head/sys/kern/kern_timeout.c == --- head/sys/kern/kern_timeout.cWed Mar 2 16:36:24 2016 (r296319) +++ head/sys/kern/kern_timeout.cWed Mar 2 18:46:17 2016 (r296320) @@ -1155,14 +1155,14 @@ callout_schedule(struct callout *c, int } int -_callout_stop_safe(struct callout *c, int safe, void (*drain)(void *)) +_callout_stop_safe(struct callout *c, int flags, void (*drain)(void *)) { struct callout_cpu *cc, *old_cc; struct lock_class *class; int direct, sq_locked, use_lock; int not_on_a_list; - if (safe) + if ((flags & CS_DRAIN) != 0) WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, c->c_lock, "calling %s", __func__); @@ -1170,7 +1170,7 @@ _callout_stop_safe(struct callout *c, in * Some old subsystems don't hold Giant while running a callout_stop(), * so just discard this check for the moment. */ - if (!safe && c->c_lock != NULL) { + if ((flags & CS_DRAIN) == 0 && c->c_lock != NULL) { if (c->c_lock == &Giant.lock_object) use_lock = mtx_owned(&Giant); else { @@ -1253,7 +1253,7 @@ again: return (-1); } - if (safe) { + if ((flags & CS_DRAIN) != 0) { /* * The current callout is running (or just * about to run) and blocking is allowed, so @@ -1370,7 +1370,7 @@ again: cc_exec_drain(cc, direct) = drain; } CC_UNLOCK(cc); - return (0); + return ((flags & CS_MIGRBLOCK) != 0); } CTR3(KTR_CALLOUT, "failed to stop %p func %p arg %p", c, c->c_func, c->c_arg); Modified: head/sys/kern/subr_sleepqueue.c == --- head/sys/kern/subr_sleepqueue.c Wed Mar 2 16:36:24 2016 (r296319) +++ head/sys/kern/subr_sleepqueue.c Wed Mar 2 18:46:17 2016 (r296320) @@ -586,7 +586,8 @@ sleepq_check_timeout(void) * another CPU, so synchronize with it to avoid having it * accidentally wake up a subsequent sleep. */ - else if (callout_stop(&td->td_slpcallout) == 0) { + else if (_callout_stop_safe(&td->td_slpcallout, CS_MIGRBLOCK, NULL) + == 0) { td->td_flags |= TDF_TIMEOUT; TD_SET_SLEEPING(td); mi_switch(SW_INVOL | SWT_SLEEPQTIMO, NULL); Modified: head/sys/sys/callout.h == --- head/sys/sys/callout.h Wed Mar 2 16:36:24 2016(r296319) +++ head/sys/sys/callout.h Wed Mar 2 18:46:17 2016(r296320) @@ -62,6 +62,12 @@ struct callout_handle { struct callout *callout; }; +/* Flags for callout_stop_safe() */ +#defineCS_DRAIN0x0001 /* callout_drain(), wait allowed */ +#defineCS_MIGRBLOCK0x0002 /* Block migration, return value + indicates that the callout was + executing */ + #ifdef _KERNEL /* * Note the flags field is actually *two* fields. The c_flags @@ -81,7 +87,7 @@ struct callout_handle { */ #definecallout_active(c) ((c)->c_flags & CALLOUT_ACTIVE) #definecallout_deactivate(c) ((c)->c_flags &= ~CALLOUT_ACTIVE) -#definecallout_drain(c)_callout_stop_safe(c, 1, NULL) +#definecallout_drain(c)_callout_stop_safe(c, CS_DRAIN, NULL) void callout_init(struct callout *,
svn commit: r296321 - head/usr.sbin/daemon
Author: cem Date: Wed Mar 2 19:10:39 2016 New Revision: 296321 URL: https://svnweb.freebsd.org/changeset/base/296321 Log: daemon(8): Add -t option to set process title The default process title is taken from the argv[0] value (any particular hardlink name). Add a -t option to override the default. PR: 205016 Submitted by: Yuri No objection from:freebsd-current@ Sponsored by: EMC / Isilon Storage Division Modified: head/usr.sbin/daemon/daemon.8 head/usr.sbin/daemon/daemon.c Modified: head/usr.sbin/daemon/daemon.8 == --- head/usr.sbin/daemon/daemon.8 Wed Mar 2 18:46:17 2016 (r296320) +++ head/usr.sbin/daemon/daemon.8 Wed Mar 2 19:10:39 2016 (r296321) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 13, 2013 +.Dd March 2, 2016 .Dt DAEMON 8 .Os .Sh NAME @@ -37,6 +37,7 @@ .Op Fl cfr .Op Fl p Ar child_pidfile .Op Fl P Ar supervisor_pidfile +.Op Fl t Ar title .Op Fl u Ar user .Ar command arguments ... .Sh DESCRIPTION @@ -94,6 +95,8 @@ regardless of whether the option is used or not. .It Fl r Supervise and restart the program if it has been terminated. +.It Fl t Ar title +Process title for the daemon to make it easily identifiable. .It Fl u Ar user Login name of the user to execute the program under. Requires adequate superuser privileges. @@ -123,7 +126,8 @@ option is useful combined with the option as .Ar supervisor_pidfile contains the ID of the supervisor -not the child. This is especially important if you use +not the child. +This is especially important if you use .Fl r in an rc script as the .Fl p Modified: head/usr.sbin/daemon/daemon.c == --- head/usr.sbin/daemon/daemon.c Wed Mar 2 18:46:17 2016 (r296320) +++ head/usr.sbin/daemon/daemon.c Wed Mar 2 19:10:39 2016 (r296321) @@ -56,13 +56,13 @@ main(int argc, char *argv[]) struct pidfh *ppfh, *pfh; sigset_t mask, oldmask; int ch, nochdir, noclose, restart, serrno; - const char *pidfile, *ppidfile, *user; + const char *pidfile, *ppidfile, *title, *user; pid_t otherpid, pid; nochdir = noclose = 1; restart = 0; - ppidfile = pidfile = user = NULL; - while ((ch = getopt(argc, argv, "cfp:P:ru:")) != -1) { + ppidfile = pidfile = title = user = NULL; + while ((ch = getopt(argc, argv, "cfp:P:rt:u:")) != -1) { switch (ch) { case 'c': nochdir = 0; @@ -79,6 +79,9 @@ main(int argc, char *argv[]) case 'r': restart = 1; break; + case 't': + title = optarg; + break; case 'u': user = optarg; break; @@ -204,7 +207,10 @@ restart: err(1, "%s", argv[0]); } - setproctitle("%s[%d]", argv[0], pid); + if (title != NULL) + setproctitle("%s[%d]", title, pid); + else + setproctitle("%s[%d]", argv[0], pid); if (wait_child(pid, &mask) == 0 && restart) { sleep(1); goto restart; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r296322 - head/share/man/man9
Author: bdrewery Date: Wed Mar 2 19:22:24 2016 New Revision: 296322 URL: https://svnweb.freebsd.org/changeset/base/296322 Log: Remove self-reference to destroy_dev_drain(9). MFC after:1 week Modified: head/share/man/man9/make_dev.9 Modified: head/share/man/man9/make_dev.9 == --- head/share/man/man9/make_dev.9 Wed Mar 2 19:10:39 2016 (r296321) +++ head/share/man/man9/make_dev.9 Wed Mar 2 19:22:24 2016 (r296322) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd Jan 3, 2016 +.Dd March 2, 2016 .Dt MAKE_DEV 9 .Os .Sh NAME @@ -460,7 +460,6 @@ flag was specified and the provided devi .Sh SEE ALSO .Xr devctl 4 , .Xr devfs 5 , -.Xr destroy_dev_drain 9 , .Xr dev_clone 9 .Sh HISTORY The ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r296221 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src include lib/libc/stdlib/jemal
Hi, jemalloc doesn't compile on mips + gcc-4.2 now. 14:56 < adrian> cc1: warnings being treated as errors 14:56 < adrian> jemalloc_arena.c: In function 'arena_decay_time_valid': 14:56 < adrian> jemalloc_arena.c:1355: warning: comparison is always true due to limited range of data type 14:56 < adrian> --- jemalloc_arena.o --- 14:56 < adrian> *** [jemalloc_arena.o] Error code 1 Did you test your import with 'make universe' ? Thanks, -adrian ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r296323 - head/share/mk
Author: bdrewery Date: Wed Mar 2 20:06:24 2016 New Revision: 296323 URL: https://svnweb.freebsd.org/changeset/base/296323 Log: Fix meta2deps.sh tracking of dependencies inside .CURDIR. An example of this is in share/i18n/csmapper. Reviewed by: sjg Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/meta2deps.sh Modified: head/share/mk/meta2deps.sh == --- head/share/mk/meta2deps.sh Wed Mar 2 19:22:24 2016(r296322) +++ head/share/mk/meta2deps.sh Wed Mar 2 20:06:24 2016(r296323) @@ -310,7 +310,7 @@ meta2deps() { *) seen=$dir;; esac case "$dir" in - ${CURDIR:-.}|${CURDIR:-.}/*|"") continue;; + ${CURDIR:-.}|"") continue;; $src_re) # avoid repeating ourselves... case "$DPDEPS,$seensrc," in ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r296221 - in head: contrib/jemalloc contrib/jemalloc/doc contrib/jemalloc/include/jemalloc contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src include lib/libc/stdlib/jemal
Hi, So apparently it's comparing a very large value (#define NSTIME_SEC_MAX 18446744072) against a 32 bit ssize_t on mips32. i386 also has a 32 bit ssize_t. I'd like this resolved and tested on 32 bit platforms or I'm going to revert the commit in 24 hours. Sorry, but that's kinda broken on all 32 bit platforms. Sorry, but this is above even my "wtf" threshold. :( -a ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r296324 - in head: share/mk sys/conf
Author: bdrewery Date: Wed Mar 2 21:03:42 2016 New Revision: 296324 URL: https://svnweb.freebsd.org/changeset/base/296324 Log: Add guessed dependencies to OBJS after bsd.dep.mk in case of it adding to SRCS. This was a regression in r295985. bsd.dep.mk adds to SRCS for dtrace probes, yacc grammars and some others. The code that is moving is planned to be removed once FAST_DEPEND is default (and the only option) though since FAST_DEPEND doesn't use this. Pointyhat to: bdrewery Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.lib.mk head/share/mk/bsd.prog.mk head/sys/conf/kmod.mk Modified: head/share/mk/bsd.lib.mk == --- head/share/mk/bsd.lib.mkWed Mar 2 20:06:24 2016(r296323) +++ head/share/mk/bsd.lib.mkWed Mar 2 21:03:42 2016(r296324) @@ -417,30 +417,35 @@ lint: ${SRCS:M*.c} .if defined(LIB) && !empty(LIB) OBJS_DEPEND_GUESS+= ${SRCS:M*.h} -.if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE}) -${OBJS} ${STATICOBJS} ${POBJS}: ${OBJS_DEPEND_GUESS} -.endif .for _S in ${SRCS:N*.[hly]} OBJS_DEPEND_GUESS.${_S:R}.po= ${_S} -.if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE}) -${_S:R}.po: ${OBJS_DEPEND_GUESS.${_S:R}.po} -.endif .endfor .endif .if defined(SHLIB_NAME) || \ defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) -.if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE}) -${SOBJS}: ${OBJS_DEPEND_GUESS} -.endif .for _S in ${SRCS:N*.[hly]} OBJS_DEPEND_GUESS.${_S:R}.So= ${_S} +.endfor +.endif + +.include + +.if defined(LIB) && !empty(LIB) .if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE}) +${OBJS} ${STATICOBJS} ${POBJS}: ${OBJS_DEPEND_GUESS} +.for _S in ${SRCS:N*.[hly]} +${_S:R}.po: ${OBJS_DEPEND_GUESS.${_S:R}.po} +.endfor +.if defined(SHLIB_NAME) || \ +defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) +${SOBJS}: ${OBJS_DEPEND_GUESS} +.for _S in ${SRCS:N*.[hly]} ${_S:R}.So: ${OBJS_DEPEND_GUESS.${_S:R}.So} -.endif .endfor .endif +.endif +.endif -.include .include .include .include Modified: head/share/mk/bsd.prog.mk == --- head/share/mk/bsd.prog.mk Wed Mar 2 20:06:24 2016(r296323) +++ head/share/mk/bsd.prog.mk Wed Mar 2 21:03:42 2016(r296324) @@ -277,12 +277,16 @@ lint: ${SRCS:M*.c} .if defined(PROG) OBJS_DEPEND_GUESS+= ${SRCS:M*.h} +.endif + +.include + +.if defined(PROG) .if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE}) ${OBJS}: ${OBJS_DEPEND_GUESS} .endif .endif -.include .include .include .include Modified: head/sys/conf/kmod.mk == --- head/sys/conf/kmod.mk Wed Mar 2 20:06:24 2016(r296323) +++ head/sys/conf/kmod.mk Wed Mar 2 21:03:42 2016(r296324) @@ -456,11 +456,13 @@ cleanilinks: rm -f ${_ILINKS} OBJS_DEPEND_GUESS+= ${SRCS:M*.h} + +.include + .if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE}) ${OBJS}: ${OBJS_DEPEND_GUESS} .endif -.include .include .include .include "kern.mk" ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r296326 - head/bin/sh
Author: jilles Date: Wed Mar 2 21:24:46 2016 New Revision: 296326 URL: https://svnweb.freebsd.org/changeset/base/296326 Log: sh: Don't trust that signal descriptions fit within 49 bytes. Modified: head/bin/sh/jobs.c Modified: head/bin/sh/jobs.c == --- head/bin/sh/jobs.c Wed Mar 2 21:04:17 2016(r296325) +++ head/bin/sh/jobs.c Wed Mar 2 21:24:46 2016(r296326) @@ -322,8 +322,8 @@ static void showjob(struct job *jp, int mode) { char s[64]; - char statestr[64]; - const char *sigstr; + char statebuf[16]; + const char *statestr, *coredump; struct procstat *ps; struct job *j; int col, curr, i, jobno, prev, procno; @@ -339,9 +339,10 @@ showjob(struct job *jp, int mode) prev = j - jobtab + 1; } #endif + coredump = ""; ps = jp->ps + jp->nprocs - 1; if (jp->state == 0) { - strcpy(statestr, "Running"); + statestr = "Running"; #if JOBS } else if (jp->state == JOBSTOPPED) { while (!WIFSTOPPED(ps->status) && ps > jp->ps) @@ -350,27 +351,25 @@ showjob(struct job *jp, int mode) i = WSTOPSIG(ps->status); else i = -1; - sigstr = strsignal(i); - if (sigstr != NULL) - strcpy(statestr, sigstr); - else - strcpy(statestr, "Suspended"); + statestr = strsignal(i); + if (statestr == NULL) + statestr = "Suspended"; #endif } else if (WIFEXITED(ps->status)) { if (WEXITSTATUS(ps->status) == 0) - strcpy(statestr, "Done"); - else - fmtstr(statestr, 64, "Done(%d)", + statestr = "Done"; + else { + fmtstr(statebuf, sizeof(statebuf), "Done(%d)", WEXITSTATUS(ps->status)); + statestr = statebuf; + } } else { i = WTERMSIG(ps->status); - sigstr = strsignal(i); - if (sigstr != NULL) - strcpy(statestr, sigstr); - else - strcpy(statestr, "Unknown signal"); + statestr = strsignal(i); + if (statestr == NULL) + statestr = "Unknown signal"; if (WCOREDUMP(ps->status)) - strcat(statestr, " (core dumped)"); + coredump = " (core dumped)"; } for (ps = jp->ps ; procno > 0 ; ps++, procno--) { /* for each process */ @@ -399,7 +398,8 @@ showjob(struct job *jp, int mode) } if (ps == jp->ps) { out1str(statestr); - col += strlen(statestr); + out1str(coredump); + col += strlen(statestr) + strlen(coredump); } do { out1c(' '); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r296327 - head/bin/sh
Author: jilles Date: Wed Mar 2 22:52:54 2016 New Revision: 296327 URL: https://svnweb.freebsd.org/changeset/base/296327 Log: sh: Remove a redundant STPUTC check. Modified: head/bin/sh/parser.c Modified: head/bin/sh/parser.c == --- head/bin/sh/parser.cWed Mar 2 21:24:46 2016(r296326) +++ head/bin/sh/parser.cWed Mar 2 22:52:54 2016(r296327) @@ -1671,7 +1671,7 @@ varname: c = pgetc_linecont(); } while (is_digit(c)); } else { - STPUTC(c, out); + USTPUTC(c, out); c = pgetc_linecont(); } } else if (is_special(c)) { ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r296329 - head/sys/dev/sbni
Author: jhibbits Date: Thu Mar 3 01:07:17 2016 New Revision: 296329 URL: https://svnweb.freebsd.org/changeset/base/296329 Log: Allocate the PCI BAR resource with bus_alloc_resource_any() We don't support allocating any other range with PCI BARs. Modified: head/sys/dev/sbni/if_sbni_pci.c Modified: head/sys/dev/sbni/if_sbni_pci.c == --- head/sys/dev/sbni/if_sbni_pci.c Wed Mar 2 23:53:08 2016 (r296328) +++ head/sys/dev/sbni/if_sbni_pci.c Thu Mar 3 01:07:17 2016 (r296329) @@ -95,8 +95,8 @@ sbni_pci_probe(device_t dev) device_set_desc(dev, "Granch SBNI12/PCI adapter"); sc->io_rid = PCIR_BAR(0); - sc->io_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->io_rid, - 0ul, ~0ul, ports, RF_ACTIVE); + sc->io_res = bus_alloc_resource_any(dev, SYS_RES_IOPORT, + &sc->io_rid, RF_ACTIVE); if (!sc->io_res) { device_printf(dev, "cannot allocate io ports!\n"); if (sc->slave_sc) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r296330 - head/sys/pc98/cbus
Author: jhibbits Date: Thu Mar 3 01:09:00 2016 New Revision: 296330 URL: https://svnweb.freebsd.org/changeset/base/296330 Log: Another convert to bus_alloc_resource_anywhere(). Depending on how cbus hands out resources, this could actually be bus_alloc_resource_any() instead. Modified: head/sys/pc98/cbus/pmc.c Modified: head/sys/pc98/cbus/pmc.c == --- head/sys/pc98/cbus/pmc.cThu Mar 3 01:07:17 2016(r296329) +++ head/sys/pc98/cbus/pmc.cThu Mar 3 01:09:00 2016(r296330) @@ -100,9 +100,8 @@ pmc_isa_alloc_resources(device_t dev) bzero(sc, sizeof(*sc)); rid = 0; - sc->port_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, - 0ul, ~0ul, PMC_ISA_PORTSIZE, - RF_ACTIVE); + sc->port_res = bus_alloc_resource_anywhere(dev, SYS_RES_IOPORT, &rid, + PMC_ISA_PORTSIZE, RF_ACTIVE); if (sc->port_res == NULL) { return (ENOMEM); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r296331 - in head/sys: mips/nlm mips/rmi powerpc/mpc85xx
Author: jhibbits Date: Thu Mar 3 01:12:13 2016 New Revision: 296331 URL: https://svnweb.freebsd.org/changeset/base/296331 Log: Let rman_init() initialize the default rman range. If rm_start and rm_end are both 0 on input to rman_init(), rman_init() pre-initializes them to the default range. No need to set it before. Modified: head/sys/mips/nlm/xlp_simplebus.c head/sys/mips/rmi/xlr_pci.c head/sys/powerpc/mpc85xx/lbc.c Modified: head/sys/mips/nlm/xlp_simplebus.c == --- head/sys/mips/nlm/xlp_simplebus.c Thu Mar 3 01:09:00 2016 (r296330) +++ head/sys/mips/nlm/xlp_simplebus.c Thu Mar 3 01:12:13 2016 (r296331) @@ -114,32 +114,24 @@ xlp_simplebus_init_resources(void) || rman_manage_region(&irq_rman, 0, 255)) panic("xlp_simplebus_init_resources irq_rman"); - port_rman.rm_start = 0; - port_rman.rm_end = ~0ul; port_rman.rm_type = RMAN_ARRAY; port_rman.rm_descr = "I/O ports"; if (rman_init(&port_rman) || rman_manage_region(&port_rman, PCIE_IO_BASE, PCIE_IO_LIMIT)) panic("xlp_simplebus_init_resources port_rman"); - mem_rman.rm_start = 0; - mem_rman.rm_end = ~0ul; mem_rman.rm_type = RMAN_ARRAY; mem_rman.rm_descr = "I/O memory"; if (rman_init(&mem_rman) || rman_manage_region(&mem_rman, PCIE_MEM_BASE, PCIE_MEM_LIMIT)) panic("xlp_simplebus_init_resources mem_rman"); - pci_ecfg_rman.rm_start = 0; - pci_ecfg_rman.rm_end = ~0ul; pci_ecfg_rman.rm_type = RMAN_ARRAY; pci_ecfg_rman.rm_descr = "PCI ECFG IO"; if (rman_init(&pci_ecfg_rman) || rman_manage_region(&pci_ecfg_rman, PCI_ECFG_BASE, PCI_ECFG_LIMIT)) panic("xlp_simplebus_init_resources pci_ecfg_rman"); - gbu_rman.rm_start = 0; - gbu_rman.rm_end = ~0ul; gbu_rman.rm_type = RMAN_ARRAY; gbu_rman.rm_descr = "Flash region"; if (rman_init(&gbu_rman) Modified: head/sys/mips/rmi/xlr_pci.c == --- head/sys/mips/rmi/xlr_pci.c Thu Mar 3 01:09:00 2016(r296330) +++ head/sys/mips/rmi/xlr_pci.c Thu Mar 3 01:12:13 2016(r296331) @@ -125,16 +125,12 @@ xlr_pci_init_resources(void) || rman_manage_region(&irq_rman, 0, 255)) panic("pci_init_resources irq_rman"); - port_rman.rm_start = 0; - port_rman.rm_end = ~0ul; port_rman.rm_type = RMAN_ARRAY; port_rman.rm_descr = "I/O ports"; if (rman_init(&port_rman) || rman_manage_region(&port_rman, 0x1000, 0x1fff)) panic("pci_init_resources port_rman"); - mem_rman.rm_start = 0; - mem_rman.rm_end = ~0ul; mem_rman.rm_type = RMAN_ARRAY; mem_rman.rm_descr = "I/O memory"; if (rman_init(&mem_rman) Modified: head/sys/powerpc/mpc85xx/lbc.c == --- head/sys/powerpc/mpc85xx/lbc.c Thu Mar 3 01:09:00 2016 (r296330) +++ head/sys/powerpc/mpc85xx/lbc.c Thu Mar 3 01:12:13 2016 (r296331) @@ -511,8 +511,6 @@ lbc_attach(device_t dev) rm = &sc->sc_rman; rm->rm_type = RMAN_ARRAY; rm->rm_descr = "Local Bus Space"; - rm->rm_start = 0UL; - rm->rm_end = ~0UL; error = rman_init(rm); if (error) goto fail; ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r296332 - in head/contrib/jemalloc: include/jemalloc/internal src
Author: jasone Date: Thu Mar 3 01:30:28 2016 New Revision: 296332 URL: https://svnweb.freebsd.org/changeset/base/296332 Log: Add a cast to prevent a compiler warning. Modified: head/contrib/jemalloc/include/jemalloc/internal/nstime.h head/contrib/jemalloc/src/arena.c Modified: head/contrib/jemalloc/include/jemalloc/internal/nstime.h == --- head/contrib/jemalloc/include/jemalloc/internal/nstime.hThu Mar 3 01:12:13 2016(r296331) +++ head/contrib/jemalloc/include/jemalloc/internal/nstime.hThu Mar 3 01:30:28 2016(r296332) @@ -7,7 +7,7 @@ typedef struct nstime_s nstime_t; /* Maximum supported number of seconds (~584 years). */ -#defineNSTIME_SEC_MAX 18446744072 +#defineNSTIME_SEC_MAX KQU(18446744072) #endif /* JEMALLOC_H_TYPES */ /**/ Modified: head/contrib/jemalloc/src/arena.c == --- head/contrib/jemalloc/src/arena.c Thu Mar 3 01:12:13 2016 (r296331) +++ head/contrib/jemalloc/src/arena.c Thu Mar 3 01:30:28 2016 (r296332) @@ -1352,7 +1352,7 @@ static bool arena_decay_time_valid(ssize_t decay_time) { - return (decay_time >= -1 && decay_time <= NSTIME_SEC_MAX); + return (decay_time >= -1 && (uint64_t)decay_time <= NSTIME_SEC_MAX); } ssize_t ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r296333 - in head/sys/dev/cxgbe: . common
Author: np Date: Thu Mar 3 01:41:53 2016 New Revision: 296333 URL: https://svnweb.freebsd.org/changeset/base/296333 Log: cxgbe(4): First of many changes to reduce diffs with internal shared code: - Rename some CamelCase variables. - s/t4_link_start/t4_link_l1cfg/g - Pull in t4_get_port_type_description. - Move t4_wait_op_done to t4_hw.c. - Flip the order of the RDMA stats. - Remove unsused function t4_iq_start_stop. - Move t4_wait_op_done and t4_wait_op_done_val to t4_hw.c Obtained from:Chelsio Communications Modified: head/sys/dev/cxgbe/common/common.h head/sys/dev/cxgbe/common/t4_hw.c head/sys/dev/cxgbe/t4_main.c Modified: head/sys/dev/cxgbe/common/common.h == --- head/sys/dev/cxgbe/common/common.h Thu Mar 3 01:30:28 2016 (r296332) +++ head/sys/dev/cxgbe/common/common.h Thu Mar 3 01:41:53 2016 (r296333) @@ -169,10 +169,10 @@ struct lb_port_stats { }; struct tp_tcp_stats { - u32 tcpOutRsts; - u64 tcpInSegs; - u64 tcpOutSegs; - u64 tcpRetransSegs; + u32 tcp_out_rsts; + u64 tcp_in_segs; + u64 tcp_out_segs; + u64 tcp_retrans_segs; }; struct tp_usm_stats { @@ -182,22 +182,22 @@ struct tp_usm_stats { }; struct tp_fcoe_stats { - u32 framesDDP; - u32 framesDrop; - u64 octetsDDP; + u32 frames_ddp; + u32 frames_drop; + u64 octets_ddp; }; struct tp_err_stats { - u32 macInErrs[4]; - u32 hdrInErrs[4]; - u32 tcpInErrs[4]; - u32 tnlCongDrops[4]; - u32 ofldChanDrops[4]; - u32 tnlTxDrops[4]; - u32 ofldVlanDrops[4]; - u32 tcp6InErrs[4]; - u32 ofldNoNeigh; - u32 ofldCongDefer; + u32 mac_in_errs[4]; + u32 hdr_in_errs[4]; + u32 tcp_in_errs[4]; + u32 tnl_cong_drops[4]; + u32 ofld_chan_drops[4]; + u32 tnl_tx_drops[4]; + u32 ofld_vlan_drops[4]; + u32 tcp6_in_errs[4]; + u32 ofld_no_neigh; + u32 ofld_cong_defer; }; struct tp_proxy_stats { @@ -210,8 +210,8 @@ struct tp_cpl_stats { }; struct tp_rdma_stats { - u32 rqe_dfr_mod; u32 rqe_dfr_pkt; + u32 rqe_dfr_mod; }; struct tp_params { @@ -389,15 +389,6 @@ static inline unsigned int dack_ticks_to } void t4_set_reg_field(struct adapter *adap, unsigned int addr, u32 mask, u32 val); -int t4_wait_op_done_val(struct adapter *adapter, int reg, u32 mask, int polarity, - int attempts, int delay, u32 *valp); - -static inline int t4_wait_op_done(struct adapter *adapter, int reg, u32 mask, - int polarity, int attempts, int delay) -{ - return t4_wait_op_done_val(adapter, reg, mask, polarity, attempts, - delay, NULL); -} int t4_wr_mbox_meat(struct adapter *adap, int mbox, const void *cmd, int size, void *rpl, bool sleep_ok); @@ -431,7 +422,7 @@ void t4_intr_clear(struct adapter *adapt int t4_slow_intr_handler(struct adapter *adapter); int t4_hash_mac_addr(const u8 *addr); -int t4_link_start(struct adapter *adap, unsigned int mbox, unsigned int port, +int t4_link_l1cfg(struct adapter *adap, unsigned int mbox, unsigned int port, struct link_config *lc); int t4_restart_aneg(struct adapter *adap, unsigned int mbox, unsigned int port); int t4_seeprom_read(struct adapter *adapter, u32 addr, u32 *data); @@ -500,6 +491,7 @@ int t4_edc_read(struct adapter *adap, in int t4_mem_read(struct adapter *adap, int mtype, u32 addr, u32 size, __be32 *data); +const char *t4_get_port_type_description(enum fw_port_type port_type); void t4_get_port_stats(struct adapter *adap, int idx, struct port_stats *p); void t4_get_port_stats_offset(struct adapter *adap, int idx, struct port_stats *stats, @@ -597,9 +589,6 @@ int t4_i2c_wr(struct adapter *adap, unsi int port, unsigned int devid, unsigned int offset, unsigned int len, u8 *buf); -int t4_iq_start_stop(struct adapter *adap, unsigned int mbox, bool start, -unsigned int pf, unsigned int vf, unsigned int iqid, -unsigned int fl0id, unsigned int fl1id); int t4_iq_free(struct adapter *adap, unsigned int mbox, unsigned int pf, unsigned int vf, unsigned int iqtype, unsigned int iqid, unsigned int fl0id, unsigned int fl1id); Modified: head/sys/dev/cxgbe/common/t4_hw.c == --- head/sys/dev/cxgbe/common/t4_hw.c Thu Mar 3 01:30:28 2016 (r296332) +++ head/sys/dev/cxgbe/common/t4_hw.c Thu Mar 3 01:41:53 2016 (r296333) @@ -60,8 +60,8 @@ __FBSDID("$FreeBSD$"); * at the time it indicated completion is stored there. Returns 0 if the * operation completes and -EAGAIN otherwise. */ -int t4_wait_op_done_v
svn commit: r296334 - head/contrib/jemalloc/src
Author: jasone Date: Thu Mar 3 01:43:36 2016 New Revision: 296334 URL: https://svnweb.freebsd.org/changeset/base/296334 Log: Restore support for decay time of -1 (no decay). Modified: head/contrib/jemalloc/src/arena.c Modified: head/contrib/jemalloc/src/arena.c == --- head/contrib/jemalloc/src/arena.c Thu Mar 3 01:41:53 2016 (r296333) +++ head/contrib/jemalloc/src/arena.c Thu Mar 3 01:43:36 2016 (r296334) @@ -1352,7 +1352,11 @@ static bool arena_decay_time_valid(ssize_t decay_time) { - return (decay_time >= -1 && (uint64_t)decay_time <= NSTIME_SEC_MAX); + if (decay_time < -1) + return (false); + if (decay_time == -1 || (uint64_t)decay_time <= NSTIME_SEC_MAX) + return (true); + return (false); } ssize_t ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r296335 - in head: cddl/lib/libdtrace share/dtrace
Author: gnn Date: Thu Mar 3 02:46:12 2016 New Revision: 296335 URL: https://svnweb.freebsd.org/changeset/base/296335 Log: fix tcpdebug: - assign to "flags" in each probe, not only debug-input compute "len" in the same way in each probe Submitted by: Hannes Mehnert MFC after:2 weeks Differential Revision:https://reviews.freebsd.org/D5524 Modified: head/cddl/lib/libdtrace/tcp.d head/share/dtrace/Makefile head/share/dtrace/tcpdebug Modified: head/cddl/lib/libdtrace/tcp.d == --- head/cddl/lib/libdtrace/tcp.d Thu Mar 3 01:43:36 2016 (r296334) +++ head/cddl/lib/libdtrace/tcp.d Thu Mar 3 02:46:12 2016 (r296335) @@ -102,6 +102,7 @@ typedef struct tcpsinfo { string tcps_raddr; /* remote address, as a string */ int32_t tcps_state; /* TCP state */ uint32_t tcps_iss; /* Initial sequence # sent */ + uint32_t tcps_irs; /* Initial sequence # received */ uint32_t tcps_suna; /* sequence # sent but unacked */ uint32_t tcps_smax; /* highest sequence number sent */ uint32_t tcps_snxt; /* next sequence # to send */ @@ -112,10 +113,12 @@ typedef struct tcpsinfo { uint32_t tcps_swl1; /* window update seg seq number */ uint32_t tcps_swl2; /* window update seg ack number */ uint32_t tcps_rup; /* receive urgent pointer */ + uint32_t tcps_radv; /* advertised window */ uint32_t tcps_rwnd; /* receive window size */ int32_t tcps_rcv_ws;/* receive window scaling */ uint32_t tcps_cwnd; /* congestion window */ uint32_t tcps_cwnd_ssthresh;/* threshold for congestion avoidance */ + uint32_t tcps_srecover; /* for use in NewReno Fast Recovery */ uint32_t tcps_sack_fack;/* SACK sequence # we have acked */ uint32_t tcps_sack_snxt;/* next SACK seq # for retransmission */ uint32_t tcps_rto; /* round-trip timeout, msec */ @@ -123,6 +126,10 @@ typedef struct tcpsinfo { int tcps_retransmit;/* retransmit send event, boolean */ int tcps_srtt; /* smoothed RTT in units of (TCP_RTT_SCALE*hz) */ int tcps_debug; /* socket has SO_DEBUG set */ + int32_t tcps_dupacks; /* consecutive dup acks received */ + uint32_t tcps_rtttime; /* RTT measurement start time */ + uint32_t tcps_rtseq;/* sequence # being timed */ + uint32_t tcps_ts_recent;/* timestamp echo data */ } tcpsinfo_t; /* @@ -192,6 +199,7 @@ translator tcpsinfo_t < struct tcpcb *p inet_ntoa6(&p->t_inpcb->inp_inc.inc_ie.ie_dependfaddr.ie6_foreign); tcps_state =p == NULL ? -1 : p->t_state; tcps_iss = p == NULL ? 0 : p->iss; + tcps_irs = p == NULL ? 0 : p->irs; tcps_suna = p == NULL ? 0 : p->snd_una; tcps_smax = p == NULL ? 0 : p->snd_max; tcps_snxt = p == NULL ? 0 : p->snd_nxt; @@ -201,11 +209,13 @@ translator tcpsinfo_t < struct tcpcb *p tcps_snd_ws = p == NULL ? -1 : p->snd_scale; tcps_swl1 = p == NULL ? -1 : p->snd_wl1; tcps_swl2 = p == NULL ? -1 : p->snd_wl2; + tcps_radv = p == NULL ? -1 : p->rcv_adv; tcps_rwnd = p == NULL ? -1 : p->rcv_wnd; tcps_rup = p == NULL ? -1 : p->rcv_up; tcps_rcv_ws = p == NULL ? -1 : p->rcv_scale; tcps_cwnd = p == NULL ? -1 : p->snd_cwnd; tcps_cwnd_ssthresh =p == NULL ? -1 : p->snd_ssthresh; + tcps_srecover = p == NULL ? -1 : p->snd_recover; tcps_sack_fack =p == NULL ? 0 : p->snd_fack; tcps_sack_snxt =p == NULL ? 0 : p->sack_newdata; tcps_rto = p == NULL ? -1 : (p->t_rxtcur * 1000) / `hz; @@ -214,6 +224,10 @@ translator tcpsinfo_t < struct tcpcb *p tcps_srtt = p == NULL ? -1 : p->t_srtt; /* smoothed RTT in units of (TCP_RTT_SCALE*hz) */ tcps_debug =p == NULL ? 0 : p->t_inpcb->inp_socket->so_options & 1; + tcps_dupacks = p == NULL ? -1 : p->t_dupacks; + tcps_rtttime = p == NULL ? -1 : p->t_rtttime; + tcps_rtseq =p == NULL ? -1 : p->t_rtseq; + tcps_ts_recent =p == NULL ? -1 : p->ts_recent; }; #pragma D binding "1.6.3" translator Modified: head/share/dtrace/Makefile == --- head/share/dtrace/Makefile Thu Mar 3 01:43:36 2016(r296334) +++ head/share/dtrace/Makefile Thu Mar 3 02:46:12 2016(r296335)
Re: svn commit: r295757 - in head: lib/libc/tests/gen/posix_spawn lib/libc/tests/sys sys/boot/efi/boot1 sys/boot/i386/boot2 sys/boot/i386/pxeldr sys/boot/i386/zfsboot
On 2/18/2016 6:17 AM, Ed Maste wrote: > Author: emaste > Date: Thu Feb 18 14:17:28 2016 > New Revision: 295757 > URL: https://svnweb.freebsd.org/changeset/base/295757 > > Log: > Remove dd xfer stats emitted during buildworld > > They result in gratuitous differences when comparing build log output. > > Modified: > head/lib/libc/tests/gen/posix_spawn/Makefile > head/lib/libc/tests/sys/Makefile > head/sys/boot/efi/boot1/Makefile > head/sys/boot/i386/boot2/Makefile > head/sys/boot/i386/pxeldr/Makefile > head/sys/boot/i386/zfsboot/Makefile > > Modified: head/lib/libc/tests/gen/posix_spawn/Makefile > == > --- head/lib/libc/tests/gen/posix_spawn/Makefile Thu Feb 18 13:07:21 > 2016(r295756) > +++ head/lib/libc/tests/gen/posix_spawn/Makefile Thu Feb 18 14:17:28 > 2016(r295757) > @@ -20,7 +20,7 @@ CLEANFILES+=h_nonexec > .include "../../Makefile.netbsd-tests" > > h_zero: > - dd if=/dev/zero of=h_zero bs=1k count=2 > + dd if=/dev/zero of=h_zero bs=1k count=2 status=none > chmod a+x h_zero > > CLEANFILES+= h_zero > > Modified: head/lib/libc/tests/sys/Makefile > == > --- head/lib/libc/tests/sys/Makefile Thu Feb 18 13:07:21 2016 > (r295756) > +++ head/lib/libc/tests/sys/Makefile Thu Feb 18 14:17:28 2016 > (r295757) > @@ -78,6 +78,6 @@ truncate_test_FILESGRP= wheel > > CLEANFILES= truncate_test.root_owned > truncate_test.root_owned: > - dd if=/dev/null bs=1 count=1 of=${.TARGET} > + dd if=/dev/null bs=1 count=1 of=${.TARGET} status=none > > .include > > Modified: head/sys/boot/efi/boot1/Makefile > == > --- head/sys/boot/efi/boot1/Makefile Thu Feb 18 13:07:21 2016 > (r295756) > +++ head/sys/boot/efi/boot1/Makefile Thu Feb 18 14:17:28 2016 > (r295757) > @@ -113,7 +113,8 @@ boot1.efifat: boot1.efi > uudecode ${.CURDIR}/fat-${MACHINE}.tmpl.bz2.uu > mv fat-${MACHINE}.tmpl.bz2 ${.TARGET}.bz2 > bzip2 -f -d ${.TARGET}.bz2 > - dd if=boot1.efi of=${.TARGET} seek=${BOOT1_OFFSET} conv=notrunc > + dd if=boot1.efi of=${.TARGET} seek=${BOOT1_OFFSET} conv=notrunc \ > + status=none > > CLEANFILES= boot1.efi boot1.efifat > > > Modified: head/sys/boot/i386/boot2/Makefile > == > --- head/sys/boot/i386/boot2/Makefile Thu Feb 18 13:07:21 2016 > (r295756) > +++ head/sys/boot/i386/boot2/Makefile Thu Feb 18 14:17:28 2016 > (r295757) > @@ -72,14 +72,14 @@ CLEANFILES+= boot2 boot2.ld boot2.ldr bo > boot2: boot2.ld > @set -- `ls -l boot2.ld`; x=$$((7680-$$5)); \ > echo "$$x bytes available"; test $$x -ge 0 > - dd if=boot2.ld of=${.TARGET} obs=7680 conv=osync > + dd if=boot2.ld of=${.TARGET} obs=7680 conv=osync status=none > > boot2.ld: boot2.ldr boot2.bin ${BTXKERN} > btxld -v -E ${ORG2} -f bin -b ${BTXKERN} -l boot2.ldr \ > -o ${.TARGET} -P 1 boot2.bin > > boot2.ldr: > - dd if=/dev/zero of=${.TARGET} bs=512 count=1 > + dd if=/dev/zero of=${.TARGET} bs=512 count=1 status=none > > boot2.bin: boot2.out > ${OBJCOPY} -S -O binary boot2.out ${.TARGET} > > Modified: head/sys/boot/i386/pxeldr/Makefile > == > --- head/sys/boot/i386/pxeldr/MakefileThu Feb 18 13:07:21 2016 > (r295756) > +++ head/sys/boot/i386/pxeldr/MakefileThu Feb 18 14:17:28 2016 > (r295757) > @@ -31,7 +31,7 @@ CLEANFILES+= ${BOOT}.tmp > > ${BOOT}: ${LDR} ${LOADER} > cat ${LDR} ${LOADER} > ${.TARGET}.tmp > - dd if=${.TARGET}.tmp of=${.TARGET} obs=2k conv=osync > + dd if=${.TARGET}.tmp of=${.TARGET} obs=2k conv=osync status=none > rm ${.TARGET}.tmp > > LDFLAGS+=-e start -Ttext ${ORG} -Wl,-N,-S,--oformat,binary > > Modified: head/sys/boot/i386/zfsboot/Makefile > == > --- head/sys/boot/i386/zfsboot/Makefile Thu Feb 18 13:07:21 2016 > (r295756) > +++ head/sys/boot/i386/zfsboot/Makefile Thu Feb 18 14:17:28 2016 > (r295757) > @@ -65,7 +65,7 @@ BOOT2SIZE= 65536 > zfsboot2: zfsboot.ld > @set -- `ls -l zfsboot.ld`; x=$$((${BOOT2SIZE}-$$5)); \ > echo "$$x bytes available"; test $$x -ge 0 > - dd if=zfsboot.ld of=${.TARGET} obs=${BOOT2SIZE} conv=osync > + dd if=zfsboot.ld of=${.TARGET} obs=${BOOT2SIZE} conv=osync status=none > > zfsboot.ld: zfsboot.ldr zfsboot.bin ${BTXKERN} > btxld -v -E ${ORG2} -f bin -b ${BTXKERN} -l zfsboot.ldr \ > (From Peter) You'll need to add bin/dd to bootstrap-tools now. It only learned status= support in 2014 in r264059. -- Regards, Bryan Drewery
svn commit: r296336 - in head/sys: dev/bhnd dev/pccard dev/pci isa kern sys x86/xen
Author: jhibbits Date: Thu Mar 3 05:07:35 2016 New Revision: 296336 URL: https://svnweb.freebsd.org/changeset/base/296336 Log: Replace all resource occurrences of '0UL/~0UL' with '0/~0'. Summary: The idea behind this is '~0ul' is well-defined, and casting to uintmax_t, on a 32-bit platform, will leave the upper 32 bits as 0. The maximum range of a resource is 0xFFF (all bits of the full type set). By dropping the 'ul' suffix, C type promotion rules apply, and the sign extension of ~0 on 32 bit platforms gets it to a type-independent 'unsigned max'. Reviewed By: cem Sponsored by: Alex Perez/Inertial Computing Differential Revision: https://reviews.freebsd.org/D5255 Modified: head/sys/dev/bhnd/bhnd.h head/sys/dev/pccard/pccard.c head/sys/dev/pci/pci.c head/sys/dev/pci/pci_iov.c head/sys/dev/pci/pci_pci.c head/sys/dev/pci/vga_pci.c head/sys/isa/isa_common.c head/sys/kern/bus_if.m head/sys/kern/subr_bus.c head/sys/kern/subr_rman.c head/sys/sys/bus.h head/sys/x86/xen/xenpv.c Modified: head/sys/dev/bhnd/bhnd.h == --- head/sys/dev/bhnd/bhnd.hThu Mar 3 02:46:12 2016(r296335) +++ head/sys/dev/bhnd/bhnd.hThu Mar 3 05:07:35 2016(r296336) @@ -334,7 +334,7 @@ bhnd_is_hw_disabled(device_t dev) { * values supported by the standard bus APIs. * * To request the resource's default addresses, pass @p start and - * @p end values of @c 0UL and @c ~0UL, respectively, and + * @p end values of @c 0 and @c ~0, respectively, and * a @p count of @c 1. * * @retval NULL The resource could not be allocated. @@ -366,7 +366,7 @@ bhnd_alloc_resource(device_t dev, int ty static inline struct bhnd_resource * bhnd_alloc_resource_any(device_t dev, int type, int *rid, u_int flags) { - return bhnd_alloc_resource(dev, type, rid, 0UL, ~0UL, 1, flags); + return bhnd_alloc_resource(dev, type, rid, 0, ~0, 1, flags); } /** Modified: head/sys/dev/pccard/pccard.c == --- head/sys/dev/pccard/pccard.cThu Mar 3 02:46:12 2016 (r296335) +++ head/sys/dev/pccard/pccard.cThu Mar 3 05:07:35 2016 (r296336) @@ -506,7 +506,7 @@ pccard_function_init(struct pccard_funct if (start) end = start + ios->length - 1; else - end = ~0UL; + end = ~0; DEVPRINTF((bus, "I/O rid %d start %#lx end %#lx\n", i, start, end)); rid = i; @@ -530,7 +530,7 @@ pccard_function_init(struct pccard_funct if (start) end = start + mems->length - 1; else - end = ~0UL; + end = ~0; DEVPRINTF((bus, "Memory rid %d start %#lx end %#lx\ncardaddr %#lx hostaddr %#lx length %#lx\n", i, start, end, mems->cardaddr, mems->hostaddr, mems->length)); Modified: head/sys/dev/pci/pci.c == --- head/sys/dev/pci/pci.c Thu Mar 3 02:46:12 2016(r296335) +++ head/sys/dev/pci/pci.c Thu Mar 3 05:07:35 2016(r296336) @@ -3092,7 +3092,7 @@ pci_add_map(device_t bus, device_t dev, flags |= RF_PREFETCHABLE; if (basezero || base == pci_mapbase(testval) || pci_clear_bars) { start = 0; /* Let the parent decide. */ - end = ~0ul; + end = ~0; } else { start = base; end = base + count - 1; @@ -3107,7 +3107,7 @@ pci_add_map(device_t bus, device_t dev, */ res = resource_list_reserve(rl, bus, dev, type, ®, start, end, count, flags); - if (pci_do_realloc_bars && res == NULL && (start != 0 || end != ~0ul)) { + if (pci_do_realloc_bars && res == NULL && (start != 0 || end != ~0)) { /* * If the allocation fails, try to allocate a resource for * this BAR using any available range. The firmware felt @@ -3115,8 +3115,8 @@ pci_add_map(device_t bus, device_t dev, * disable decoding if we can help it. */ resource_list_delete(rl, type, reg); - resource_list_add(rl, type, reg, 0, ~0ul, count); - res = resource_list_reserve(rl, bus, dev, type, ®, 0, ~0ul, + resource_list_add(rl, type, reg, 0, ~0, count); + res = resource_list_reserve(rl, bus, dev, type, ®, 0, ~0, count, flags); } if (res == NULL) { @@ -3507,7 +3507,7 @@ pci_reserve_secbus(device_t bus, device_ e
Re: svn commit: r296336 - in head/sys: dev/bhnd dev/pccard dev/pci isa kern sys x86/xen
On Thu, 3 Mar 2016, Justin Hibbits wrote: Log: Replace all resource occurrences of '0UL/~0UL' with '0/~0'. Summary: The idea behind this is '~0ul' is well-defined, and casting to uintmax_t, on a 32-bit platform, will leave the upper 32 bits as 0. The maximum range of a resource is 0xFFF (all bits of the full type set). By dropping the 'ul' suffix, C type promotion rules apply, and the sign extension of ~0 on 32 bit platforms gets it to a type-independent 'unsigned max'. Why not use the correct signed value? This value is -1, not the value, if any, with all bits 1. All bits 1 might be a trap representation, but it is unclear if ~0 can give a trap representation or a trap since it is unclear if the '~' operation acts on padding bits. It is clear that all bits 1 gives has value -0 in 1's complement if there are no no padding bits. But -0 has the same value as +0. When converted to an unsigned type, it loses all traces of its sign, and becomes plain (ufoo_t)0. I don't like the plan to change the resource range type to uintmax_t. 64 bits is just bloat for most 32-bit systems. After fixing all the hard-coded u_longs, you can just use a typdefed type which should be uint32_t if possible. Bruce ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r296337 - head/share/mk
Author: bdrewery Date: Thu Mar 3 06:22:51 2016 New Revision: 296337 URL: https://svnweb.freebsd.org/changeset/base/296337 Log: Move casper library entries to proper places. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.libnames.mk head/share/mk/src.libnames.mk Modified: head/share/mk/bsd.libnames.mk == --- head/share/mk/bsd.libnames.mk Thu Mar 3 05:07:35 2016 (r296336) +++ head/share/mk/bsd.libnames.mk Thu Mar 3 06:22:51 2016 (r296337) @@ -30,6 +30,11 @@ LIBBZ2?= ${DESTDIR}${LIBDIR}/libbz2.a LIBC?= ${DESTDIR}${LIBDIR}/libc.a LIBCALENDAR?= ${DESTDIR}${LIBDIR}/libcalendar.a LIBCAM?= ${DESTDIR}${LIBDIR}/libcam.a +LIBCAP_DNS?= ${DESTDIR}${LIBDIR}/libcap_dns.a +LIBCAP_GRP?= ${DESTDIR}${LIBDIR}/libcap_grp.a +LIBCAP_PWD?= ${DESTDIR}${LIBDIR}/libcap_pwd.a +LIBCAP_RANDOM?=${DESTDIR}${LIBDIR}/libcap_random.a +LIBCAP_SYSCTL?=${DESTDIR}${LIBDIR}/libcap_sysctl.a LIBCASPER?=${DESTDIR}${LIBDIR}/libcasper.a LIBCOMPAT?=${DESTDIR}${LIBDIR}/libcompat.a LIBCOMPILER_RT?=${DESTDIR}${LIBDIR}/libcompiler_rt.a Modified: head/share/mk/src.libnames.mk == --- head/share/mk/src.libnames.mk Thu Mar 3 05:07:35 2016 (r296336) +++ head/share/mk/src.libnames.mk Thu Mar 3 06:22:51 2016 (r296337) @@ -488,6 +488,12 @@ LIBWINDDIR=${OBJTOP}/kerberos5/lib/libw LIBALIASDIR= ${OBJTOP}/lib/libalias/libalias LIBBLOCKSRUNTIMEDIR= ${OBJTOP}/lib/libblocksruntime LIBBSNMPDIR= ${OBJTOP}/lib/libbsnmp/libbsnmp +LIBCAP_CASPERDIR= ${OBJTOP}/lib/libcasper/libcasper +LIBCAP_DNSDIR= ${OBJTOP}/lib/libcasper/services/cap_dns +LIBCAP_GRPDIR= ${OBJTOP}/lib/libcasper/services/cap_grp +LIBCAP_PWDDIR= ${OBJTOP}/lib/libcasper/services/cap_pwd +LIBCAP_RANDOMDIR= ${OBJTOP}/lib/libcasper/services/cap_random +LIBCAP_SYSCTLDIR= ${OBJTOP}/lib/libcasper/services/cap_sysctl LIBBSDXMLDIR= ${OBJTOP}/lib/libexpat LIBKVMDIR= ${OBJTOP}/lib/libkvm LIBPTHREADDIR= ${OBJTOP}/lib/libthr @@ -515,25 +521,6 @@ LIBTERMCAPWDIR=${LIBNCURSESWDIR} LIB${lib:tu}DIR?= ${OBJTOP}/lib/lib${lib} .endfor -# Casper exception. -LIBCAP_CASPERDIR= ${OBJTOP}/lib/libcasper/libcasper -LIBCAP_CASPER= ${DESTDIR}${LIBDIR}/libcasper.a - -LIBCAP_DNSDIR= ${OBJTOP}/lib/libcasper/services/cap_dns -LIBCAP_DNS?= ${DESTDIR}${LIBDIR}/libcap_dns.a - -LIBCAP_GRPDIR= ${OBJTOP}/lib/libcasper/services/cap_grp -LIBCAP_GRP?= ${DESTDIR}${LIBDIR}/libcap_grp.a - -LIBCAP_PWDDIR= ${OBJTOP}/lib/libcasper/services/cap_pwd -LIBCAP_PWD?= ${DESTDIR}${LIBDIR}/libcap_pwd.a - -LIBCAP_RANDOMDIR= ${OBJTOP}/lib/libcasper/services/cap_random -LIBCAP_RANDOM?=${DESTDIR}${LIBDIR}/libcap_random.a - -LIBCAP_SYSCTLDIR= ${OBJTOP}/lib/libcasper/services/cap_sysctl -LIBCAP_SYSCTL?=${DESTDIR}${LIBDIR}/libcap_sysctl.a - # Validate that listed LIBADD are valid. .for _l in ${LIBADD} .if empty(_LIBRARIES:M${_l}) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r296338 - head/share/mk
Author: bdrewery Date: Thu Mar 3 06:37:17 2016 New Revision: 296338 URL: https://svnweb.freebsd.org/changeset/base/296338 Log: Add missing atf dirs. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/src.libnames.mk Modified: head/share/mk/src.libnames.mk == --- head/share/mk/src.libnames.mk Thu Mar 3 06:22:51 2016 (r296337) +++ head/share/mk/src.libnames.mk Thu Mar 3 06:37:17 2016 (r296338) @@ -485,6 +485,8 @@ LIBKDCDIR= ${OBJTOP}/kerberos5/lib/libkd LIBKRB5DIR=${OBJTOP}/kerberos5/lib/libkrb5 LIBROKENDIR= ${OBJTOP}/kerberos5/lib/libroken LIBWINDDIR=${OBJTOP}/kerberos5/lib/libwind +LIBATF_CDIR= ${OBJTOP}/lib/atf/libatf-c +LIBATF_CXXDIR= ${OBJTOP}/lib/atf/libatf-c++ LIBALIASDIR= ${OBJTOP}/lib/libalias/libalias LIBBLOCKSRUNTIMEDIR= ${OBJTOP}/lib/libblocksruntime LIBBSNMPDIR= ${OBJTOP}/lib/libbsnmp/libbsnmp ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r296339 - head/usr.sbin/daemon
Author: maxim Date: Thu Mar 3 07:07:44 2016 New Revision: 296339 URL: https://svnweb.freebsd.org/changeset/base/296339 Log: o -t comman line option added to the usage(). Modified: head/usr.sbin/daemon/daemon.c Modified: head/usr.sbin/daemon/daemon.c == --- head/usr.sbin/daemon/daemon.c Thu Mar 3 06:37:17 2016 (r296338) +++ head/usr.sbin/daemon/daemon.c Thu Mar 3 07:07:44 2016 (r296339) @@ -275,8 +275,8 @@ wait_child(pid_t pid, sigset_t *mask) static void usage(void) { - (void)fprintf(stderr, - "usage: daemon [-cfr] [-p child_pidfile] [-P supervisor_pidfile] " - "[-u user]\n command arguments ...\n"); + (void)fprintf(stderr, "%s\n\t%s\n", + "usage: daemon [-cfr] [-p child_pidfile] [-P supervisor_pidfile]", + "[-t title] [-u user] command arguments ..."); exit(1); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"