Re: svn commit: r281059 - head/sys/boot/efi/boot1
On Sat, 4 Apr 2015, Rui Paulo wrote: Log: boot1 EFI: reset the screen and select the best mode. It's necessary to reset the screen to make sure any vendor pixels are gone when we start boot1. In the Lenovo X1 (3rd gen), this is the only way to clear the screen. Previously, the Lenovo logo would only disappear after the kernel started scrolling the display. After resetting the screen, EFI could put us in the worst LCD mode (oversized characters), so we now find the largest mode we can use and hope it's the most appropriate one (it's not trivial to tell what's the correct LCD resolution at this point). It's worth noting that the final stage loader has a 'mode' command that can be used to switch text modes. :-(. I just complained about the bug that vt (on non-EFI) clears the screen where sc carefully preserves the screen in its history buffer. For graphics mode, determining the resolution is the trivial part :-). You also need OCR or something to translate the pixels into the format of your history buffer. Don't forget to fetch Lenevo's history buffer and translate it into your format :-). I don't have problems with boot logos except when the battery dies, since I turn them off until the CMOS forgets, but lose boot messages in another way from newer monitors blanking the screen after mode switches for much longer than older monitors. I expected newer systems to fix this by using the same graphics mode for the whole boot. Resetting the screen is even worse than clearing. Whole boots should take a second or 2. I don't get close to that. More like 20. But with the monitor blanking the screen for 5+ seconds afer every mode switch, even a 20-second boot gives almost no time for reading its messages. Saving the messages in history buffers or booting with -p becomes more important. Bruce ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281068 - stable/9/sys/amd64/amd64
Author: kib Date: Sat Apr 4 08:11:10 2015 New Revision: 281068 URL: https://svnweb.freebsd.org/changeset/base/281068 Log: MFC r280781: Make it possible for the signal handler to act on #ss. 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 Sat Apr 4 08:06:13 2015 (r281067) +++ stable/9/sys/amd64/amd64/machdep.c Sat Apr 4 08:11:10 2015 (r281068) @@ -430,6 +430,7 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, regs-tf_rflags = ~(PSL_T | PSL_D); regs-tf_cs = _ucodesel; regs-tf_ds = _udatasel; + regs-tf_ss = _udatasel; regs-tf_es = _udatasel; regs-tf_fs = _ufssel; regs-tf_gs = _ugssel; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281070 - head/sys/dev/usb/wlan
Author: rpaulo Date: Sat Apr 4 08:41:02 2015 New Revision: 281070 URL: https://svnweb.freebsd.org/changeset/base/281070 Log: urtwn: blink the LED when scanning. Previously, the driver was trying to blink the LED in the newstate function, but that only gets called once (unlike OpenBSD's net80211 stack). Move the LED blinking to set_channel(). While there, don't try to set the channel when we switch to the SCAN state. This is already accomplished by the set_channel() function. MFC after:1 week Modified: head/sys/dev/usb/wlan/if_urtwn.c Modified: head/sys/dev/usb/wlan/if_urtwn.c == --- head/sys/dev/usb/wlan/if_urtwn.cSat Apr 4 08:36:02 2015 (r281069) +++ head/sys/dev/usb/wlan/if_urtwn.cSat Apr 4 08:41:02 2015 (r281070) @@ -1568,14 +1568,9 @@ urtwn_newstate(struct ieee80211vap *vap, urtwn_bb_write(sc, R92C_OFDM0_AGCCORE1(1), reg); } } - /* Make link LED blink during scan. */ - urtwn_set_led(sc, URTWN_LED_LINK, !sc-ledlink); - /* Pause AC Tx queues. */ urtwn_write_1(sc, R92C_TXPAUSE, urtwn_read_1(sc, R92C_TXPAUSE) | 0x0f); - - urtwn_set_chan(sc, ic-ic_curchan, NULL); break; case IEEE80211_S_AUTH: /* Set initial gain under link. */ @@ -3131,8 +3126,13 @@ static void urtwn_set_channel(struct ieee80211com *ic) { struct urtwn_softc *sc = ic-ic_ifp-if_softc; + struct ieee80211vap *vap = TAILQ_FIRST(ic-ic_vaps); URTWN_LOCK(sc); + if (vap-iv_state == IEEE80211_S_SCAN) { + /* Make link LED blink during scan. */ + urtwn_set_led(sc, URTWN_LED_LINK, !sc-ledlink); + } urtwn_set_chan(sc, ic-ic_curchan, NULL); URTWN_UNLOCK(sc); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r281055 - head/share/mk
On Fri, Apr 03, 2015 at 05:36:21PM -0700, Garrett Cooper wrote: On Apr 3, 2015, at 17:31, Baptiste Daroussin b...@freebsd.org wrote: Author: bapt Date: Sat Apr 4 00:31:40 2015 New Revision: 281055 URL: https://svnweb.freebsd.org/changeset/base/281055 Log: Do not install scripts multiple time when using bsd.progs.mk Modified: head/share/mk/bsd.progs.mk I’m sorry I’ve been lax with this, but unfortunately this doesn’t solve the underlying issue 100%. 1. You forgot FILES/FILESGROUPS 2. This doesn’t help cases were targets are manually overridden. 3. Etc. The project I was working on has reached steady state. We should be done with the big hurdle soon-ish (another month or two). I’ll try to resolve it sometime between now and then by putting all of the PROGS logic down into bsd.prog.mk (where it should have been in the first place…), because bsd.progs.mk being included recursively is a layering violation bug that parallel installs expose. Thanks! Well I have hit this one while packaging base because pkg(8) yell when things are being packaged twice, so I'm fixing when I see them I plan to fix others when I'll catch them, if you prefer I can keep that on my own branch to not make collision with your work? Best regards, Bapt pgp5JYKIc7di1.pgp Description: PGP signature
svn commit: r281075 - in stable/10: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/c...
Author: dim Date: Sat Apr 4 10:17:51 2015 New Revision: 281075 URL: https://svnweb.freebsd.org/changeset/base/281075 Log: MFC r272444 (by jkim): Merge ACPICA 20140926. MFC r278970 (by jkim): Merge ACPICA 20141107 and 20150204. Approved by: jkim Relnotes: yes Added: stable/10/sys/contrib/dev/acpica/common/acgetline.c - copied, changed from r272444, head/sys/contrib/dev/acpica/common/acgetline.c stable/10/sys/contrib/dev/acpica/common/ahids.c - copied, changed from r272444, head/sys/contrib/dev/acpica/common/ahids.c stable/10/sys/contrib/dev/acpica/common/ahuuids.c - copied, changed from r272444, head/sys/contrib/dev/acpica/common/ahuuids.c stable/10/sys/contrib/dev/acpica/common/cmfsize.c - copied, changed from r272444, head/sys/contrib/dev/acpica/common/cmfsize.c stable/10/sys/contrib/dev/acpica/compiler/aslascii.c - copied, changed from r272444, head/sys/contrib/dev/acpica/compiler/aslascii.c stable/10/sys/contrib/dev/acpica/compiler/aslmapenter.c - copied, changed from r272444, head/sys/contrib/dev/acpica/compiler/aslmapenter.c stable/10/sys/contrib/dev/acpica/compiler/aslmapoutput.c - copied, changed from r272444, head/sys/contrib/dev/acpica/compiler/aslmapoutput.c stable/10/sys/contrib/dev/acpica/compiler/aslmaputils.c - copied, changed from r272444, head/sys/contrib/dev/acpica/compiler/aslmaputils.c stable/10/sys/contrib/dev/acpica/compiler/aslmessages.c - copied, changed from r272444, head/sys/contrib/dev/acpica/compiler/aslmessages.c stable/10/sys/contrib/dev/acpica/compiler/aslparser.y - copied, changed from r272444, head/sys/contrib/dev/acpica/compiler/aslparser.y stable/10/sys/contrib/dev/acpica/compiler/aslprintf.c - copied unchanged from r278970, head/sys/contrib/dev/acpica/compiler/aslprintf.c stable/10/sys/contrib/dev/acpica/compiler/aslprune.c - copied unchanged from r278970, head/sys/contrib/dev/acpica/compiler/aslprune.c stable/10/sys/contrib/dev/acpica/compiler/aslrules.y - copied, changed from r272444, head/sys/contrib/dev/acpica/compiler/aslrules.y stable/10/sys/contrib/dev/acpica/compiler/aslsupport.y - copied, changed from r272444, head/sys/contrib/dev/acpica/compiler/aslsupport.y stable/10/sys/contrib/dev/acpica/compiler/asltokens.y - copied, changed from r272444, head/sys/contrib/dev/acpica/compiler/asltokens.y stable/10/sys/contrib/dev/acpica/compiler/asltypes.y - copied, changed from r272444, head/sys/contrib/dev/acpica/compiler/asltypes.y stable/10/sys/contrib/dev/acpica/components/debugger/dbtest.c - copied, changed from r272444, head/sys/contrib/dev/acpica/components/debugger/dbtest.c stable/10/sys/contrib/dev/acpica/components/disassembler/dmcstyle.c - copied unchanged from r278970, head/sys/contrib/dev/acpica/components/disassembler/dmcstyle.c stable/10/sys/contrib/dev/acpica/components/tables/tbdata.c - copied, changed from r272444, head/sys/contrib/dev/acpica/components/tables/tbdata.c stable/10/sys/contrib/dev/acpica/components/utilities/utfileio.c - copied, changed from r272444, head/sys/contrib/dev/acpica/components/utilities/utfileio.c stable/10/sys/contrib/dev/acpica/components/utilities/uthex.c - copied, changed from r272444, head/sys/contrib/dev/acpica/components/utilities/uthex.c stable/10/sys/contrib/dev/acpica/components/utilities/utprint.c - copied, changed from r272444, head/sys/contrib/dev/acpica/components/utilities/utprint.c stable/10/sys/contrib/dev/acpica/components/utilities/utuuid.c - copied, changed from r272444, head/sys/contrib/dev/acpica/components/utilities/utuuid.c stable/10/sys/contrib/dev/acpica/include/platform/acenvex.h - copied, changed from r272444, head/sys/contrib/dev/acpica/include/platform/acenvex.h stable/10/sys/contrib/dev/acpica/os_specific/service_layers/oslibcfs.c - copied, changed from r272444, head/sys/contrib/dev/acpica/os_specific/service_layers/oslibcfs.c Deleted: stable/10/sys/contrib/dev/acpica/compiler/aslcompiler.y Modified: stable/10/sys/conf/files stable/10/sys/contrib/dev/acpica/acpica_prep.sh stable/10/sys/contrib/dev/acpica/changes.txt stable/10/sys/contrib/dev/acpica/common/adfile.c stable/10/sys/contrib/dev/acpica/common/adisasm.c stable/10/sys/contrib/dev/acpica/common/adwalk.c stable/10/sys/contrib/dev/acpica/common/ahpredef.c stable/10/sys/contrib/dev/acpica/common/dmextern.c stable/10/sys/contrib/dev/acpica/common/dmrestag.c stable/10/sys/contrib/dev/acpica/common/dmtable.c stable/10/sys/contrib/dev/acpica/common/dmtbdump.c stable/10/sys/contrib/dev/acpica/common/dmtbinfo.c stable/10/sys/contrib/dev/acpica/common/getopt.c stable/10/sys/contrib/dev/acpica/compiler/aslanalyze.c stable/10/sys/contrib/dev/acpica/compiler/aslbtypes.c stable/10/sys/contrib/dev/acpica/compiler/aslcodegen.c stable/10/sys/contrib/dev/acpica/compiler/aslcompile.c
svn commit: r281062 - head/sys/conf
Author: jhibbits Date: Sat Apr 4 06:22:14 2015 New Revision: 281062 URL: https://svnweb.freebsd.org/changeset/base/281062 Log: Add mpc85xx_gpio to the build conf. Missed this in the previous commit. Modified: head/sys/conf/files.powerpc Modified: head/sys/conf/files.powerpc == --- head/sys/conf/files.powerpc Sat Apr 4 04:30:37 2015(r281061) +++ head/sys/conf/files.powerpc Sat Apr 4 06:22:14 2015(r281062) @@ -136,6 +136,7 @@ powerpc/mpc85xx/i2c.c optionaliicbus f powerpc/mpc85xx/isa.c optionalmpc85xx isa powerpc/mpc85xx/lbc.c optionalmpc85xx powerpc/mpc85xx/mpc85xx.c optionalmpc85xx +powerpc/mpc85xx/mpc85xx_gpio.c optionalmpc85xx gpio powerpc/mpc85xx/platform_mpc85xx.c optionalmpc85xx powerpc/mpc85xx/pci_mpc85xx.c optionalpci mpc85xx powerpc/ofw/ofw_machdep.c standard ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281063 - head/sys/conf
Author: jhibbits Date: Sat Apr 4 06:24:03 2015 New Revision: 281063 URL: https://svnweb.freebsd.org/changeset/base/281063 Log: Fix whitespace. Modified: head/sys/conf/files.powerpc Modified: head/sys/conf/files.powerpc == --- head/sys/conf/files.powerpc Sat Apr 4 06:22:14 2015(r281062) +++ head/sys/conf/files.powerpc Sat Apr 4 06:24:03 2015(r281063) @@ -35,7 +35,7 @@ dev/hwpmc/hwpmc_powerpc.c optionalhwpmc dev/hwpmc/hwpmc_mpc7xxx.c optionalhwpmc dev/hwpmc/hwpmc_ppc970.c optionalhwpmc dev/iicbus/ad7417.coptionalad7417 powermac -dev/iicbus/adm1030.c optionalpowermac windtunnel | adm1030 powermac +dev/iicbus/adm1030.c optionalpowermac windtunnel | adm1030 powermac dev/iicbus/adt746x.c optionaladt746x powermac dev/iicbus/ds1631.coptionalds1631 powermac dev/iicbus/ds1775.coptionalds1775 powermac ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281064 - stable/10/sys/kern
Author: kib Date: Sat Apr 4 07:52:12 2015 New Revision: 281064 URL: https://svnweb.freebsd.org/changeset/base/281064 Log: MFC r258056 (by alc): Eliminate the gratuitous use of mmap(2) flags from the implementation of kern_shmat(). Use a simpler approach to determine whether to pass VMFS_NO_SPACE or VMFS_OPTIMAL_SPACE to vm_map_find(). Modified: stable/10/sys/kern/sysv_shm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/sysv_shm.c == --- stable/10/sys/kern/sysv_shm.c Sat Apr 4 06:24:03 2015 (r281063) +++ stable/10/sys/kern/sysv_shm.c Sat Apr 4 07:52:12 2015 (r281064) @@ -342,7 +342,7 @@ kern_shmat(td, shmid, shmaddr, shmflg) int shmflg; { struct proc *p = td-td_proc; - int i, flags; + int i; struct shmid_kernel *shmseg; struct shmmap_state *shmmap_s = NULL; vm_offset_t attach_va; @@ -402,9 +402,7 @@ kern_shmat(td, shmid, shmaddr, shmflg) prot = VM_PROT_READ; if ((shmflg SHM_RDONLY) == 0) prot |= VM_PROT_WRITE; - flags = MAP_ANON | MAP_SHARED; if (shmaddr) { - flags |= MAP_FIXED; if (shmflg SHM_RND) { attach_va = (vm_offset_t)shmaddr ~(SHMLBA-1); } else if (((vm_offset_t)shmaddr (SHMLBA-1)) == 0) { @@ -426,7 +424,7 @@ kern_shmat(td, shmid, shmaddr, shmflg) vm_object_reference(shmseg-object); rv = vm_map_find(p-p_vmspace-vm_map, shmseg-object, - 0, attach_va, size, 0, (flags MAP_FIXED) ? VMFS_NO_SPACE : + 0, attach_va, size, 0, shmaddr != NULL ? VMFS_NO_SPACE : VMFS_OPTIMAL_SPACE, prot, prot, MAP_INHERIT_SHARE); if (rv != KERN_SUCCESS) { vm_object_deallocate(shmseg-object); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281067 - stable/10/sys/kern
Author: kib Date: Sat Apr 4 08:06:13 2015 New Revision: 281067 URL: https://svnweb.freebsd.org/changeset/base/281067 Log: MFC r280797: Make debug.vmem_check a tunable. It is useful to set it early. Modified: stable/10/sys/kern/subr_vmem.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/subr_vmem.c == --- stable/10/sys/kern/subr_vmem.c Sat Apr 4 07:59:07 2015 (r281066) +++ stable/10/sys/kern/subr_vmem.c Sat Apr 4 08:06:13 2015 (r281067) @@ -172,7 +172,7 @@ struct vmem_btag { #if defined(DIAGNOSTIC) static int enable_vmem_check = 1; -SYSCTL_INT(_debug, OID_AUTO, vmem_check, CTLFLAG_RW, +SYSCTL_INT(_debug, OID_AUTO, vmem_check, CTLFLAG_RWTUN, enable_vmem_check, 0, Enable vmem check); static void vmem_check(vmem_t *); #endif ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281071 - head/sys/kern
Author: kib Date: Sat Apr 4 08:44:20 2015 New Revision: 281071 URL: https://svnweb.freebsd.org/changeset/base/281071 Log: Remove useless initialization. Sponsored by: The FreeBSD Foundation MFC after:3 days Modified: head/sys/kern/sysv_shm.c Modified: head/sys/kern/sysv_shm.c == --- head/sys/kern/sysv_shm.cSat Apr 4 08:41:02 2015(r281070) +++ head/sys/kern/sysv_shm.cSat Apr 4 08:44:20 2015(r281071) @@ -327,7 +327,7 @@ kern_shmat_locked(struct thread *td, int { struct proc *p = td-td_proc; struct shmid_kernel *shmseg; - struct shmmap_state *shmmap_s = NULL; + struct shmmap_state *shmmap_s; vm_offset_t attach_va; vm_prot_t prot; vm_size_t size; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r279877 - stable/10/sys/boot/fdt
Hi Alexander, Quick question: 2015-03-11 10:49 GMT+01:00 Alexander Motin m...@freebsd.org: buf = (char *)malloc(sizeof(char) * sz); - bzero(buf, sizeof(char) * sz); - if (buf == NULL) { sprintf(command_errbuf, could not allocate space for string); return (1); } + bzero(buf, sizeof(char) * sz); idx = 0; for (i = start, idx = 0; i argc; i++) { Couldn't this use calloc() instead? Thanks, -- Ed Schouten e...@80386.nl ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r279877 - stable/10/sys/boot/fdt
2015-04-04 11:16 GMT+02:00 Ed Schouten e...@80386.nl: Couldn't this use calloc() instead? Oh, wait. This is the boot loader. The boot loader wouldn't necessarily have a calloc() function. -- Ed Schouten e...@80386.nl ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281074 - head/sys/dev/uart
Author: andrew Date: Sat Apr 4 09:57:52 2015 New Revision: 281074 URL: https://svnweb.freebsd.org/changeset/base/281074 Log: Remove the extra copy of uart_fdt_get_clock and uart_fdt_get_shift. While here also use OF_getencprop in uart_fdt_get_clock. Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/uart/uart_bus_fdt.c head/sys/dev/uart/uart_cpu_fdt.c head/sys/dev/uart/uart_cpu_fdt.h Modified: head/sys/dev/uart/uart_bus_fdt.c == --- head/sys/dev/uart/uart_bus_fdt.cSat Apr 4 09:21:56 2015 (r281073) +++ head/sys/dev/uart/uart_bus_fdt.cSat Apr 4 09:57:52 2015 (r281074) @@ -63,38 +63,6 @@ static driver_t uart_fdt_driver = { sizeof(struct uart_softc), }; -static int -uart_fdt_get_clock(phandle_t node, pcell_t *cell) -{ - pcell_t clock; - - /* -* clock-frequency is a FreeBSD-specific hack. Make its presence optional. -*/ - if ((OF_getprop(node, clock-frequency, clock, - sizeof(clock))) = 0) - clock = 0; - - if (clock == 0) - /* Try to retrieve parent 'bus-frequency' */ - /* XXX this should go to simple-bus fixup or so */ - if ((OF_getprop(OF_parent(node), bus-frequency, clock, - sizeof(clock))) = 0) - clock = 0; - - *cell = fdt32_to_cpu(clock); - return (0); -} - -static int -uart_fdt_get_shift(phandle_t node, pcell_t *cell) -{ - - if ((OF_getencprop(node, reg-shift, cell, sizeof(*cell))) = 0) - *cell = 0; - return (0); -} - static uintptr_t uart_fdt_find_device(device_t dev) { Modified: head/sys/dev/uart/uart_cpu_fdt.c == --- head/sys/dev/uart/uart_cpu_fdt.cSat Apr 4 09:21:56 2015 (r281073) +++ head/sys/dev/uart/uart_cpu_fdt.cSat Apr 4 09:57:52 2015 (r281074) @@ -58,28 +58,27 @@ __FBSDID($FreeBSD$); bus_space_tag_t uart_bus_space_io; bus_space_tag_t uart_bus_space_mem; -static int +int uart_fdt_get_clock(phandle_t node, pcell_t *cell) { pcell_t clock; /* clock-frequency is a FreeBSD-only extention. */ - if ((OF_getprop(node, clock-frequency, clock, + if ((OF_getencprop(node, clock-frequency, clock, sizeof(clock))) = 0) clock = 0; if (clock == 0) /* Try to retrieve parent 'bus-frequency' */ /* XXX this should go to simple-bus fixup or so */ - if ((OF_getprop(OF_parent(node), bus-frequency, clock, + if ((OF_getencprop(OF_parent(node), bus-frequency, clock, sizeof(clock))) = 0) clock = 0; - *cell = fdt32_to_cpu(clock); return (0); } -static int +int uart_fdt_get_shift(phandle_t node, pcell_t *cell) { Modified: head/sys/dev/uart/uart_cpu_fdt.h == --- head/sys/dev/uart/uart_cpu_fdt.hSat Apr 4 09:21:56 2015 (r281073) +++ head/sys/dev/uart/uart_cpu_fdt.hSat Apr 4 09:57:52 2015 (r281074) @@ -50,5 +50,7 @@ SET_DECLARE(uart_fdt_class_set, struct o #define UART_FDT_CLASS(data) \ DATA_SET(uart_fdt_class_set, data) +int uart_fdt_get_clock(phandle_t node, pcell_t *cell); +int uart_fdt_get_shift(phandle_t node, pcell_t *cell); #endif /* _DEV_UART_CPU_FDT_H_ */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281065 - stable/10/sys/kern
Author: kib Date: Sat Apr 4 07:56:04 2015 New Revision: 281065 URL: https://svnweb.freebsd.org/changeset/base/281065 Log: MFC r278697 (by alc): Preset the object's color, or alignment, to maximize superpage usage. Modified: stable/10/sys/kern/sysv_shm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/sysv_shm.c == --- stable/10/sys/kern/sysv_shm.c Sat Apr 4 07:52:12 2015 (r281064) +++ stable/10/sys/kern/sysv_shm.c Sat Apr 4 07:56:04 2015 (r281065) @@ -719,9 +719,10 @@ shmget_allocate_segment(td, uap, mode) #endif return (ENOMEM); } + shm_object-pg_color = 0; VM_OBJECT_WLOCK(shm_object); vm_object_clear_flag(shm_object, OBJ_ONEMAPPING); - vm_object_set_flag(shm_object, OBJ_NOSPLIT); + vm_object_set_flag(shm_object, OBJ_COLORED | OBJ_NOSPLIT); VM_OBJECT_WUNLOCK(shm_object); shmseg-object = shm_object; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281066 - stable/10/sys/kern
Author: kib Date: Sat Apr 4 07:59:07 2015 New Revision: 281066 URL: https://svnweb.freebsd.org/changeset/base/281066 Log: MFC r280323: Somewhat modernize the SysV shm code. MFC r280325 (by cognet): Fix warning for !MAC case. Modified: stable/10/sys/kern/sysv_shm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/sysv_shm.c == --- stable/10/sys/kern/sysv_shm.c Sat Apr 4 07:56:04 2015 (r281065) +++ stable/10/sys/kern/sysv_shm.c Sat Apr 4 07:59:07 2015 (r281066) @@ -109,7 +109,6 @@ static int shmget_existing(struct thread #defineSHMSEG_FREE 0x0200 #defineSHMSEG_REMOVED 0x0400 #defineSHMSEG_ALLOCATED0x0800 -#defineSHMSEG_WANTED 0x1000 static int shm_last_free, shm_nused, shmalloced; vm_size_t shm_committed; @@ -122,8 +121,7 @@ struct shmmap_state { static void shm_deallocate_segment(struct shmid_kernel *); static int shm_find_segment_by_key(key_t); -static struct shmid_kernel *shm_find_segment_by_shmid(int); -static struct shmid_kernel *shm_find_segment_by_shmidx(int); +static struct shmid_kernel *shm_find_segment(int, bool); static int shm_delete_mapping(struct vmspace *vm, struct shmmap_state *); static void shmrealloc(void); static int shminit(void); @@ -181,13 +179,17 @@ SYSCTL_INT(_kern_ipc, OID_AUTO, shm_use_ SYSCTL_INT(_kern_ipc, OID_AUTO, shm_allow_removed, CTLFLAG_RW, shm_allow_removed, 0, Enable/Disable attachment to attached segments marked for removal); -SYSCTL_PROC(_kern_ipc, OID_AUTO, shmsegs, CTLTYPE_OPAQUE | CTLFLAG_RD, -NULL, 0, sysctl_shmsegs, , +SYSCTL_PROC(_kern_ipc, OID_AUTO, shmsegs, CTLTYPE_OPAQUE | CTLFLAG_RD | +CTLFLAG_MPSAFE, NULL, 0, sysctl_shmsegs, , Current number of shared memory segments allocated); +static struct sx sysvshmsx; +#defineSYSVSHM_LOCK() sx_xlock(sysvshmsx) +#defineSYSVSHM_UNLOCK()sx_xunlock(sysvshmsx) +#defineSYSVSHM_ASSERT_LOCKED() sx_assert(sysvshmsx, SA_XLOCKED) + static int -shm_find_segment_by_key(key) - key_t key; +shm_find_segment_by_key(key_t key) { int i; @@ -198,46 +200,34 @@ shm_find_segment_by_key(key) return (-1); } +/* + * Finds segment either by shmid if is_shmid is true, or by segnum if + * is_shmid is false. + */ static struct shmid_kernel * -shm_find_segment_by_shmid(int shmid) +shm_find_segment(int arg, bool is_shmid) { - int segnum; struct shmid_kernel *shmseg; + int segnum; - segnum = IPCID_TO_IX(shmid); + segnum = is_shmid ? IPCID_TO_IX(arg) : arg; if (segnum 0 || segnum = shmalloced) return (NULL); shmseg = shmsegs[segnum]; if ((shmseg-u.shm_perm.mode SHMSEG_ALLOCATED) == 0 || (!shm_allow_removed (shmseg-u.shm_perm.mode SHMSEG_REMOVED) != 0) || - shmseg-u.shm_perm.seq != IPCID_TO_SEQ(shmid)) - return (NULL); - return (shmseg); -} - -static struct shmid_kernel * -shm_find_segment_by_shmidx(int segnum) -{ - struct shmid_kernel *shmseg; - - if (segnum 0 || segnum = shmalloced) - return (NULL); - shmseg = shmsegs[segnum]; - if ((shmseg-u.shm_perm.mode SHMSEG_ALLOCATED) == 0 || - (!shm_allow_removed -(shmseg-u.shm_perm.mode SHMSEG_REMOVED) != 0)) + (is_shmid shmseg-u.shm_perm.seq != IPCID_TO_SEQ(arg))) return (NULL); return (shmseg); } static void -shm_deallocate_segment(shmseg) - struct shmid_kernel *shmseg; +shm_deallocate_segment(struct shmid_kernel *shmseg) { vm_size_t size; - GIANT_REQUIRED; + SYSVSHM_ASSERT_LOCKED(); vm_object_deallocate(shmseg-object); shmseg-object = NULL; @@ -261,9 +251,11 @@ shm_delete_mapping(struct vmspace *vm, s int segnum, result; vm_size_t size; - GIANT_REQUIRED; - + SYSVSHM_ASSERT_LOCKED(); segnum = IPCID_TO_IX(shmmap_s-shmid); + KASSERT(segnum = 0 segnum shmalloced, + (segnum %d shmalloced %d, segnum, shmalloced)); + shmseg = shmsegs[segnum]; size = round_page(shmseg-u.shm_segsz); result = vm_map_remove(vm-vm_map, shmmap_s-va, shmmap_s-va + size); @@ -279,138 +271,110 @@ shm_delete_mapping(struct vmspace *vm, s return (0); } -#ifndef _SYS_SYSPROTO_H_ -struct shmdt_args { - const void *shmaddr; -}; -#endif -int -sys_shmdt(td, uap) - struct thread *td; - struct shmdt_args *uap; +static int +kern_shmdt_locked(struct thread *td, const void *shmaddr) { struct proc *p = td-td_proc; struct shmmap_state *shmmap_s; #ifdef MAC struct shmid_kernel *shmsegptr; #endif - int i; - int error = 0; + int error, i; + SYSVSHM_ASSERT_LOCKED(); if
svn commit: r281069 - head/sys/dev/usb/wlan
Author: rpaulo Date: Sat Apr 4 08:36:02 2015 New Revision: 281069 URL: https://svnweb.freebsd.org/changeset/base/281069 Log: Remove whitespace. Modified: head/sys/dev/usb/wlan/if_urtwn.c Modified: head/sys/dev/usb/wlan/if_urtwn.c == --- head/sys/dev/usb/wlan/if_urtwn.cSat Apr 4 08:11:10 2015 (r281068) +++ head/sys/dev/usb/wlan/if_urtwn.cSat Apr 4 08:36:02 2015 (r281069) @@ -176,12 +176,12 @@ static struct ieee80211vap *urtwn_vap_cr const uint8_t [IEEE80211_ADDR_LEN], const uint8_t [IEEE80211_ADDR_LEN]); static voidurtwn_vap_delete(struct ieee80211vap *); -static struct mbuf * urtwn_rx_frame(struct urtwn_softc *, uint8_t *, int, +static struct mbuf * urtwn_rx_frame(struct urtwn_softc *, uint8_t *, int, int *); -static struct mbuf * urtwn_rxeof(struct usb_xfer *, struct urtwn_data *, +static struct mbuf * urtwn_rxeof(struct usb_xfer *, struct urtwn_data *, int *, int8_t *); static voidurtwn_txeof(struct usb_xfer *, struct urtwn_data *); -static int urtwn_alloc_list(struct urtwn_softc *, +static int urtwn_alloc_list(struct urtwn_softc *, struct urtwn_data[], int, int); static int urtwn_alloc_rx_list(struct urtwn_softc *); static int urtwn_alloc_tx_list(struct urtwn_softc *); @@ -191,24 +191,24 @@ static void urtwn_free_list(struct urtw struct urtwn_data data[], int); static struct urtwn_data * _urtwn_getbuf(struct urtwn_softc *); static struct urtwn_data * urtwn_getbuf(struct urtwn_softc *); -static int urtwn_write_region_1(struct urtwn_softc *, uint16_t, +static int urtwn_write_region_1(struct urtwn_softc *, uint16_t, uint8_t *, int); static voidurtwn_write_1(struct urtwn_softc *, uint16_t, uint8_t); static voidurtwn_write_2(struct urtwn_softc *, uint16_t, uint16_t); static voidurtwn_write_4(struct urtwn_softc *, uint16_t, uint32_t); -static int urtwn_read_region_1(struct urtwn_softc *, uint16_t, +static int urtwn_read_region_1(struct urtwn_softc *, uint16_t, uint8_t *, int); static uint8_t urtwn_read_1(struct urtwn_softc *, uint16_t); static uint16_turtwn_read_2(struct urtwn_softc *, uint16_t); static uint32_turtwn_read_4(struct urtwn_softc *, uint16_t); -static int urtwn_fw_cmd(struct urtwn_softc *, uint8_t, +static int urtwn_fw_cmd(struct urtwn_softc *, uint8_t, const void *, int); static voidurtwn_r92c_rf_write(struct urtwn_softc *, int, uint8_t, uint32_t); -static voidurtwn_r88e_rf_write(struct urtwn_softc *, int, +static voidurtwn_r88e_rf_write(struct urtwn_softc *, int, uint8_t, uint32_t); static uint32_turtwn_rf_read(struct urtwn_softc *, int, uint8_t); -static int urtwn_llt_write(struct urtwn_softc *, uint32_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 voidurtwn_efuse_read(struct urtwn_softc *); @@ -219,7 +219,7 @@ static void urtwn_r88e_read_rom(struct static int urtwn_ra_init(struct urtwn_softc *); static voidurtwn_tsf_sync_enable(struct urtwn_softc *); static voidurtwn_set_led(struct urtwn_softc *, int, int); -static int urtwn_newstate(struct ieee80211vap *, +static int urtwn_newstate(struct ieee80211vap *, enum ieee80211_state, int); static voidurtwn_watchdog(void *); static voidurtwn_update_avgrssi(struct urtwn_softc *, int, int8_t); @@ -237,7 +237,7 @@ static int urtwn_r88e_power_on(struct u static int urtwn_llt_init(struct urtwn_softc *); static voidurtwn_fw_reset(struct urtwn_softc *); static voidurtwn_r88e_fw_reset(struct urtwn_softc *); -static int urtwn_fw_loadpage(struct urtwn_softc *, int, +static int urtwn_fw_loadpage(struct urtwn_softc *, int, const uint8_t *, int); static int urtwn_load_firmware(struct urtwn_softc *); static int urtwn_r92c_dma_init(struct urtwn_softc *); @@ -249,22 +249,22 @@ static void urtwn_cam_init(struct urtwn static voidurtwn_pa_bias_init(struct urtwn_softc *); static voidurtwn_rxfilter_init(struct urtwn_softc *); static voidurtwn_edca_init(struct urtwn_softc *); -static
Re: svn commit: r281059 - head/sys/boot/efi/boot1
On Apr 4, 2015, at 00:27, Bruce Evans b...@optusnet.com.au wrote: On Sat, 4 Apr 2015, Rui Paulo wrote: Log: boot1 EFI: reset the screen and select the best mode. It's necessary to reset the screen to make sure any vendor pixels are gone when we start boot1. In the Lenovo X1 (3rd gen), this is the only way to clear the screen. Previously, the Lenovo logo would only disappear after the kernel started scrolling the display. After resetting the screen, EFI could put us in the worst LCD mode (oversized characters), so we now find the largest mode we can use and hope it's the most appropriate one (it's not trivial to tell what's the correct LCD resolution at this point). It's worth noting that the final stage loader has a 'mode' command that can be used to switch text modes. :-(. I just complained about the bug that vt (on non-EFI) clears the screen where sc carefully preserves the screen in its history buffer. In my case, the buffer was a Lenovo logo. In other cases it might include POST messages, but like you said vt already clears it. For graphics mode, determining the resolution is the trivial part :-). You also need OCR or something to translate the pixels into the format of your history buffer. Don't forget to fetch Lenevo's history buffer and translate it into your format :-). I don't have problems with boot logos except when the battery dies, since I turn them off until the CMOS forgets, but lose boot messages in another way from newer monitors blanking the screen after mode switches for much longer than older monitors. I expected newer systems to fix this by using the same graphics mode for the whole boot. This is very specific to EFI. FreeBSD has always strived to give you text messages during boot and, while it would be easy to have the FreeBSD logo all the way to Xorg like Ubuntu does, I don't see that happening any time soon. Speaking of mode switching, they are pretty fast on this system. Resetting the screen is even worse than clearing. Whole boots should take a second or 2. I don't get close to that. More like 20. But with the monitor blanking the screen for 5+ seconds afer every mode switch, even a 20-second boot gives almost no time for reading its messages. Saving the messages in history buffers or booting with -p becomes more important. In my system, these EFI calls (reset + clear) don't take long. I can't tell any difference between the old boot time and the new boot time. -- Rui Paulo ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281072 - head/sys/arm/arm
Author: andrew Date: Sat Apr 4 09:07:31 2015 New Revision: 281072 URL: https://svnweb.freebsd.org/changeset/base/281072 Log: Add support for arm64 to the existing arm generic timer driver: - Add macros to handle the differences in accessing these registers on arm and arm64. - Use the fdt data to detect if we are on an ARMv7 or ARMv8. - Use the virtual timer by default on arm64, we may not have access to the physical timer. Differential Revision:https://reviews.freebsd.org/D2208 Reviewed by: emaste Sponsored by: The FreeBSD Foundation Modified: head/sys/arm/arm/generic_timer.c Modified: head/sys/arm/arm/generic_timer.c == --- head/sys/arm/arm/generic_timer.cSat Apr 4 08:44:20 2015 (r281071) +++ head/sys/arm/arm/generic_timer.cSat Apr 4 09:07:31 2015 (r281072) @@ -101,10 +101,22 @@ static struct timecounter arm_tmr_timeco .tc_quality= 1000, }; +#ifdef __arm__ +#defineget_el0(x) cp15_## x ##_get() +#defineget_el1(x) cp15_## x ##_get() +#defineset_el0(x, val) cp15_## x ##_set(val) +#defineset_el1(x, val) cp15_## x ##_set(val) +#else /* __aarch64__ */ +#defineget_el0(x) READ_SPECIALREG(x ##_el0) +#defineget_el1(x) READ_SPECIALREG(x ##_el1) +#defineset_el0(x, val) WRITE_SPECIALREG(x ##_el0, val) +#defineset_el1(x, val) WRITE_SPECIALREG(x ##_el1, val) +#endif + static int get_freq(void) { - return (cp15_cntfrq_get()); + return (get_el0(cntfrq)); } static long @@ -114,9 +126,9 @@ get_cntxct(bool physical) isb(); if (physical) - val = cp15_cntpct_get(); + val = get_el0(cntpct); else - val = cp15_cntvct_get(); + val = get_el0(cntvct); return (val); } @@ -126,9 +138,9 @@ set_ctrl(uint32_t val, bool physical) { if (physical) - cp15_cntp_ctl_set(val); + set_el0(cntp_ctl, val); else - cp15_cntv_ctl_set(val); + set_el0(cntv_ctl, val); isb(); return (0); @@ -139,9 +151,9 @@ set_tval(uint32_t val, bool physical) { if (physical) - cp15_cntp_tval_set(val); + set_el0(cntp_tval, val); else - cp15_cntv_tval_set(val); + set_el0(cntv_tval, val); isb(); return (0); @@ -153,9 +165,9 @@ get_ctrl(bool physical) uint32_t val; if (physical) - val = cp15_cntp_ctl_get(); + val = get_el0(cntp_ctl); else - val = cp15_cntv_ctl_get(); + val = get_el0(cntv_ctl); return (val); } @@ -165,10 +177,10 @@ disable_user_access(void) { uint32_t cntkctl; - cntkctl = cp15_cntkctl_get(); + cntkctl = get_el1(cntkctl); cntkctl = ~(GT_CNTKCTL_PL0PTEN | GT_CNTKCTL_PL0VTEN | GT_CNTKCTL_EVNTEN | GT_CNTKCTL_PL0VCTEN | GT_CNTKCTL_PL0PCTEN); - cp15_cntkctl_set(cntkctl); + set_el1(cntkctl, cntkctl); isb(); } @@ -242,11 +254,15 @@ 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); + if (ofw_bus_is_compatible(dev, arm,armv7-timer)) { + device_set_desc(dev, ARMv7 Generic Timer); + return (BUS_PROBE_DEFAULT); + } else if (ofw_bus_is_compatible(dev, arm,armv8-timer)) { + device_set_desc(dev, ARMv8 Generic Timer); + return (BUS_PROBE_DEFAULT); + } - device_set_desc(dev, ARMv7 Generic Timer); - return (BUS_PROBE_DEFAULT); + return (ENXIO); } @@ -285,7 +301,11 @@ arm_tmr_attach(device_t dev) return (ENXIO); } +#ifdef __arm__ sc-physical = true; +#else /* __aarch64__ */ + sc-physical = false; +#endif arm_tmr_sc = sc; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281073 - head/sys/dev/uart
Author: andrew Date: Sat Apr 4 09:21:56 2015 New Revision: 281073 URL: https://svnweb.freebsd.org/changeset/base/281073 Log: Use OF_getencprop over OF_getprop and fdt32_to_cpu. The latter may give us the wrong data in the failure case if shift was not zero. Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/uart/uart_bus_fdt.c head/sys/dev/uart/uart_cpu_fdt.c Modified: head/sys/dev/uart/uart_bus_fdt.c == --- head/sys/dev/uart/uart_bus_fdt.cSat Apr 4 09:07:31 2015 (r281072) +++ head/sys/dev/uart/uart_bus_fdt.cSat Apr 4 09:21:56 2015 (r281073) @@ -89,11 +89,9 @@ uart_fdt_get_clock(phandle_t node, pcell static int uart_fdt_get_shift(phandle_t node, pcell_t *cell) { - pcell_t shift; - if ((OF_getprop(node, reg-shift, shift, sizeof(shift))) = 0) - shift = 0; - *cell = fdt32_to_cpu(shift); + if ((OF_getencprop(node, reg-shift, cell, sizeof(*cell))) = 0) + *cell = 0; return (0); } Modified: head/sys/dev/uart/uart_cpu_fdt.c == --- head/sys/dev/uart/uart_cpu_fdt.cSat Apr 4 09:07:31 2015 (r281072) +++ head/sys/dev/uart/uart_cpu_fdt.cSat Apr 4 09:21:56 2015 (r281073) @@ -82,11 +82,9 @@ uart_fdt_get_clock(phandle_t node, pcell static int uart_fdt_get_shift(phandle_t node, pcell_t *cell) { - pcell_t shift; - if ((OF_getprop(node, reg-shift, shift, sizeof(shift))) = 0) - shift = 0; - *cell = fdt32_to_cpu(shift); + if ((OF_getencprop(node, reg-shift, cell, sizeof(*cell))) = 0) + *cell = 0; return (0); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281096 - in head/sys/powerpc: aim booke powerpc
Author: jhibbits Date: Sun Apr 5 02:42:52 2015 New Revision: 281096 URL: https://svnweb.freebsd.org/changeset/base/281096 Log: Unify Book-E and AIM trap.c Summary: Book-E and AIM trap.c are almost identical, except for a few bits. This is step 1 in unifying them. This also renumbers EXC_DEBUG, to not conflict with AIM vector numbers. Since this is the only one thus far that is used in the switch statement in trap(), it's the only one renumbered. If others get added to the switch, which conflict with AIM numbers, they should also be renumbered. Reviewers: #powerpc, marcel, nwhitehorn Reviewed By: marcel Subscribers: imp Differential Revision: https://reviews.freebsd.org/D2215 Added: head/sys/powerpc/powerpc/trap.c - copied, changed from r280833, head/sys/powerpc/aim/trap.c Deleted: head/sys/powerpc/aim/trap.c head/sys/powerpc/booke/trap.c Modified: head/sys/powerpc/aim/machdep.c Modified: head/sys/powerpc/aim/machdep.c == --- head/sys/powerpc/aim/machdep.c Sun Apr 5 01:03:11 2015 (r281095) +++ head/sys/powerpc/aim/machdep.c Sun Apr 5 02:42:52 2015 (r281096) @@ -760,31 +760,6 @@ spinlock_exit(void) } } -int db_trap_glue(struct trapframe *); /* Called from trap_subr.S */ - -int -db_trap_glue(struct trapframe *frame) -{ - if (!(frame-srr1 PSL_PR) -(frame-exc == EXC_TRC || frame-exc == EXC_RUNMODETRC - || (frame-exc == EXC_PGM -(frame-srr1 0x2)) - || frame-exc == EXC_BPT - || frame-exc == EXC_DSI)) { - int type = frame-exc; - - /* Ignore DTrace traps. */ - if (*(uint32_t *)frame-srr0 == EXC_DTRACE) - return (0); - if (type == EXC_PGM (frame-srr1 0x2)) { - type = T_BREAKPOINT; - } - return (kdb_trap(type, 0, frame)); - } - - return (0); -} - #ifndef __powerpc64__ uint64_t Copied and modified: head/sys/powerpc/powerpc/trap.c (from r280833, head/sys/powerpc/aim/trap.c) == --- head/sys/powerpc/aim/trap.c Sun Mar 29 22:46:07 2015(r280833, copy source) +++ head/sys/powerpc/powerpc/trap.c Sun Apr 5 02:42:52 2015 (r281096) @@ -74,6 +74,12 @@ __FBSDID($FreeBSD$); #include machine/spr.h #include machine/sr.h +#defineFAULTBUF_LR 0 +#defineFAULTBUF_R1 1 +#defineFAULTBUF_R2 2 +#defineFAULTBUF_CR 3 +#defineFAULTBUF_R136 + static voidtrap_fatal(struct trapframe *frame); static voidprinttrap(u_int vector, struct trapframe *frame, int isfatal, int user); @@ -100,32 +106,37 @@ int (*dtrace_invop_jump_addr)(struct tra #endif static struct powerpc_exception powerpc_exceptions[] = { - { 0x0100, system reset }, - { 0x0200, machine check }, - { 0x0300, data storage interrupt }, - { 0x0380, data segment exception }, - { 0x0400, instruction storage interrupt }, - { 0x0480, instruction segment exception }, - { 0x0500, external interrupt }, - { 0x0600, alignment }, - { 0x0700, program }, - { 0x0800, floating-point unavailable }, - { 0x0900, decrementer }, - { 0x0c00, system call }, - { 0x0d00, trace }, - { 0x0e00, floating-point assist }, - { 0x0f00, performance monitoring }, - { 0x0f20, altivec unavailable }, - { 0x0f40, vsx unavailable }, - { 0x1000, instruction tlb miss }, - { 0x1100, data load tlb miss }, - { 0x1200, data store tlb miss }, - { 0x1300, instruction breakpoint }, - { 0x1400, system management }, - { 0x1600, altivec assist }, - { 0x1700, thermal management }, - { 0x2000, run mode/trace }, - { 0x3000, NULL } + { EXC_CRIT, critical input }, + { EXC_RST, system reset }, + { EXC_MCHK, machine check }, + { EXC_DSI, data storage interrupt }, + { EXC_DSE, data segment exception }, + { EXC_ISI, instruction storage interrupt }, + { EXC_ISE, instruction segment exception }, + { EXC_EXI, external interrupt }, + { EXC_ALI, alignment }, + { EXC_PGM, program }, + { EXC_FPU, floating-point unavailable }, + { EXC_APU, auxiliary proc unavailable }, + { EXC_DECR, decrementer }, + { EXC_FIT, fixed-interval timer }, + { EXC_WDOG, watchdog timer }, + { EXC_SC, system call }, + { EXC_TRC, trace }, + { EXC_FPA, floating-point assist }, + { EXC_DEBUG,debug }, + { EXC_PERF, performance monitoring }, + { EXC_VEC, altivec unavailable }, + { EXC_VSX,
svn commit: r281097 - head/sys/conf
Author: jhibbits Date: Sun Apr 5 02:43:36 2015 New Revision: 281097 URL: https://svnweb.freebsd.org/changeset/base/281097 Log: Add file missed in r281096. Modified: head/sys/conf/files.powerpc Modified: head/sys/conf/files.powerpc == --- head/sys/conf/files.powerpc Sun Apr 5 02:42:52 2015(r281096) +++ head/sys/conf/files.powerpc Sun Apr 5 02:43:36 2015(r281097) @@ -103,7 +103,6 @@ powerpc/aim/moea64_if.m optionalaim powerpc/aim/moea64_native.coptionalaim powerpc/aim/mp_cpudep.coptionalaim powerpc/aim/slb.c optionalaim powerpc64 -powerpc/aim/trap.c optionalaim powerpc/aim/uma_machdep.c optionalaim powerpc/booke/interrupt.c optionalbooke powerpc/booke/locore.S optionalbooke no-obj @@ -112,7 +111,6 @@ powerpc/booke/machdep_e500.coptionalbo powerpc/booke/mp_cpudep.c optionalbooke smp powerpc/booke/platform_bare.c optionalbooke powerpc/booke/pmap.c optionalbooke -powerpc/booke/trap.c optionalbooke powerpc/cpufreq/dfs.c optionalcpufreq powerpc/cpufreq/pcr.c optionalcpufreq aim powerpc/cpufreq/pmufreq.c optionalcpufreq aim pmu @@ -216,6 +214,7 @@ powerpc/powerpc/stack_machdep.c optional powerpc/powerpc/suswintr.c standard powerpc/powerpc/syncicache.c standard powerpc/powerpc/sys_machdep.c standard +powerpc/powerpc/trap.c standard powerpc/powerpc/uio_machdep.c standard powerpc/powerpc/vm_machdep.c standard powerpc/ps3/ehci_ps3.c optionalps3 ehci ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281098 - in head: lib/libpmc sys/conf sys/dev/hwpmc
Author: adrian Date: Sun Apr 5 02:57:02 2015 New Revision: 281098 URL: https://svnweb.freebsd.org/changeset/base/281098 Log: Add support for the MIPS74K SoC family performance counters events. These are similar to the mips24k performance counters - some are available on perfcnt0/3, some are available on perfcnt1/4. However, the events aren't all the same. * Add the events, named the same as from Linux oprofile. * Verify they're the same as MIPS32(R) 74KTM Processor Core Family Software User's Manual; Document Number: MD00519; Revision 01.05. * Rename INSTRUCTIONS to something else, so it doesn't clash with the alias INSTRUCTIONS. I'll try to tidy this up later; there are a few other aliases to add and shuffle around. Tested: * QCA9558 SoC (AP135 board) - MIPS74Kc core (no FPU.) * make universe; where it didn't fail for other reasons. TODO: * It'd be nice to support the four performance counters in at least this hardware, rather than just two. Reviewed by: bsdimp (looks good; don't break world.) Added: head/sys/dev/hwpmc/hwpmc_mips74k.c (contents, props changed) Modified: head/lib/libpmc/libpmc.c head/sys/conf/files.mips head/sys/dev/hwpmc/pmc_events.h Modified: head/lib/libpmc/libpmc.c == --- head/lib/libpmc/libpmc.cSun Apr 5 02:43:36 2015(r281097) +++ head/lib/libpmc/libpmc.cSun Apr 5 02:57:02 2015(r281098) @@ -159,6 +159,7 @@ PMC_CLASSDEP_TABLE(p6, P6); PMC_CLASSDEP_TABLE(xscale, XSCALE); PMC_CLASSDEP_TABLE(armv7, ARMV7); PMC_CLASSDEP_TABLE(mips24k, MIPS24K); +PMC_CLASSDEP_TABLE(mips74k, MIPS74K); PMC_CLASSDEP_TABLE(octeon, OCTEON); PMC_CLASSDEP_TABLE(ucf, UCF); PMC_CLASSDEP_TABLE(ppc7450, PPC7450); @@ -293,6 +294,7 @@ PMC_MDEP_TABLE(p6, P6, PMC_CLASS_SOFT, P PMC_MDEP_TABLE(xscale, XSCALE, PMC_CLASS_SOFT, PMC_CLASS_XSCALE); PMC_MDEP_TABLE(armv7, ARMV7, PMC_CLASS_SOFT, PMC_CLASS_ARMV7); PMC_MDEP_TABLE(mips24k, MIPS24K, PMC_CLASS_SOFT, PMC_CLASS_MIPS24K); +PMC_MDEP_TABLE(mips74k, MIPS74K, PMC_CLASS_SOFT, PMC_CLASS_MIPS74K); PMC_MDEP_TABLE(octeon, OCTEON, PMC_CLASS_SOFT, PMC_CLASS_OCTEON); PMC_MDEP_TABLE(ppc7450, PPC7450, PMC_CLASS_SOFT, PMC_CLASS_PPC7450); PMC_MDEP_TABLE(ppc970, PPC970, PMC_CLASS_SOFT, PMC_CLASS_PPC970); @@ -360,6 +362,7 @@ PMC_CLASS_TABLE_DESC(armv7, ARMV7, armv7 #endif #if defined(__mips__) PMC_CLASS_TABLE_DESC(mips24k, MIPS24K, mips24k, mips); +PMC_CLASS_TABLE_DESC(mips74k, MIPS74K, mips74k, mips); PMC_CLASS_TABLE_DESC(octeon, OCTEON, octeon, mips); #endif /* __mips__ */ #if defined(__powerpc__) @@ -2432,6 +2435,13 @@ static struct pmc_event_alias mips24k_al EV_ALIAS(NULL, NULL) }; +static struct pmc_event_alias mips74k_aliases[] = { + EV_ALIAS(instructions,INSTR_EXECUTED), + EV_ALIAS(branches,BRANCH_INSNS), + EV_ALIAS(branch-mispredicts, MISPREDICTED_BRANCH_INSNS), + EV_ALIAS(NULL, NULL) +}; + static struct pmc_event_alias octeon_aliases[] = { EV_ALIAS(instructions,RET), EV_ALIAS(branches,BR), @@ -2923,6 +2933,10 @@ pmc_event_names_of_class(enum pmc_class ev = mips24k_event_table; count = PMC_EVENT_TABLE_SIZE(mips24k); break; + case PMC_CLASS_MIPS74K: + ev = mips74k_event_table; + count = PMC_EVENT_TABLE_SIZE(mips74k); + break; case PMC_CLASS_OCTEON: ev = octeon_event_table; count = PMC_EVENT_TABLE_SIZE(octeon); @@ -3213,6 +3227,10 @@ pmc_init(void) PMC_MDEP_INIT(mips24k); pmc_class_table[n] = mips24k_class_table_descr; break; + case PMC_CPU_MIPS_74K: + PMC_MDEP_INIT(mips74k); + pmc_class_table[n] = mips74k_class_table_descr; + break; case PMC_CPU_MIPS_OCTEON: PMC_MDEP_INIT(octeon); pmc_class_table[n] = octeon_class_table_descr; @@ -3414,6 +3432,9 @@ _pmc_name_of_event(enum pmc_event pe, en } else if (pe = PMC_EV_MIPS24K_FIRST pe = PMC_EV_MIPS24K_LAST) { ev = mips24k_event_table; evfence = mips24k_event_table + PMC_EVENT_TABLE_SIZE(mips24k); + } else if (pe = PMC_EV_MIPS74K_FIRST pe = PMC_EV_MIPS74K_LAST) { + ev = mips74k_event_table; + evfence = mips74k_event_table + PMC_EVENT_TABLE_SIZE(mips74k); } else if (pe = PMC_EV_OCTEON_FIRST pe = PMC_EV_OCTEON_LAST) { ev = octeon_event_table; evfence = octeon_event_table + PMC_EVENT_TABLE_SIZE(octeon); Modified: head/sys/conf/files.mips == --- head/sys/conf/files.mipsSun Apr 5 02:43:36 2015(r281097) +++ head/sys/conf/files.mipsSun Apr 5 02:57:02 2015(r281098) @@ -89,3
svn commit: r281099 - head/sys/sys
Author: adrian Date: Sun Apr 5 05:00:25 2015 New Revision: 281099 URL: https://svnweb.freebsd.org/changeset/base/281099 Log: Oops, add missing file from previous commit. (Sorry bsdimp, I did break the build.) Modified: head/sys/sys/pmc.h Modified: head/sys/sys/pmc.h == --- head/sys/sys/pmc.h Sun Apr 5 02:57:02 2015(r281098) +++ head/sys/sys/pmc.h Sun Apr 5 05:00:25 2015(r281099) @@ -99,6 +99,7 @@ __PMC_CPU(INTEL_XSCALE, 0x100, Intel XScale) \ __PMC_CPU(MIPS_24K, 0x200, MIPS 24K) \ __PMC_CPU(MIPS_OCTEON, 0x201, Cavium Octeon)\ + __PMC_CPU(MIPS_74K, 0x202, MIPS 74K) \ __PMC_CPU(PPC_7450, 0x300, PowerPC MPC7450) \ __PMC_CPU(PPC_970, 0x380, IBM PowerPC 970) \ __PMC_CPU(GENERIC, 0x400, Generic) @@ -131,6 +132,7 @@ enum pmc_cputype { __PMC_CLASS(ARMV7) /* ARMv7 */ \ __PMC_CLASS(MIPS24K)/* MIPS 24K */ \ __PMC_CLASS(OCTEON) /* Cavium Octeon */ \ + __PMC_CLASS(MIPS74K)/* MIPS 74K */ \ __PMC_CLASS(PPC7450)/* Motorola MPC7450 class */\ __PMC_CLASS(PPC970) /* IBM PowerPC 970 class */ \ __PMC_CLASS(SOFT) /* Software events */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281095 - stable/10/sys/fs/msdosfs
Author: kib Date: Sun Apr 5 01:03:11 2015 New Revision: 281095 URL: https://svnweb.freebsd.org/changeset/base/281095 Log: MFC r280342: msdosfs: mark unused compat-mount fields. Modified: stable/10/sys/fs/msdosfs/msdosfsmount.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/msdosfs/msdosfsmount.h == --- stable/10/sys/fs/msdosfs/msdosfsmount.h Sat Apr 4 23:56:38 2015 (r281094) +++ stable/10/sys/fs/msdosfs/msdosfsmount.h Sun Apr 5 01:03:11 2015 (r281095) @@ -239,8 +239,8 @@ struct msdosfs_args { gid_t gid;/* gid that owns msdosfs files */ mode_t mask; /* file mask to be applied for msdosfs perms */ int flags; /* see below */ - int magic; /* version number */ - u_int16_t u2w[128]; /* Local-Unicode table */ + int unused1;/* unused, was version number */ + u_int16_t unused2[128]; /* no longer used, was Local-Unicode table */ char*cs_win;/* Windows(Unicode) Charset */ char*cs_dos;/* DOS Charset */ char*cs_local; /* Local Charset */ @@ -264,6 +264,4 @@ struct msdosfs_args { #defineMSDOSFS_LARGEFS 0x1000 /* perform fileno mapping */ #defineMSDOSFS_FSIMOD 0x0100 -#define MSDOSFS_ARGSMAGIC 0xe4eff300 - #endif /* !_MSDOSFS_MSDOSFSMOUNT_H_ */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281101 - head/sys/dev/hwpmc
Author: rpaulo Date: Sun Apr 5 05:09:38 2015 New Revision: 281101 URL: https://svnweb.freebsd.org/changeset/base/281101 Log: Remove whitespace. Modified: head/sys/dev/hwpmc/hwpmc_core.c Modified: head/sys/dev/hwpmc/hwpmc_core.c == --- head/sys/dev/hwpmc/hwpmc_core.c Sun Apr 5 05:07:24 2015 (r281100) +++ head/sys/dev/hwpmc/hwpmc_core.c Sun Apr 5 05:09:38 2015 (r281101) @@ -410,7 +410,7 @@ iaf_start_pmc(int cpu, int ri) iafc-pc_resync = 0; iafc-pc_globalctrl |= (1ULL (ri + IAF_OFFSET)); msr = rdmsr(IA_GLOBAL_CTRL) ~IAF_GLOBAL_CTRL_MASK; - wrmsr(IA_GLOBAL_CTRL, msr | (iafc-pc_globalctrl + wrmsr(IA_GLOBAL_CTRL, msr | (iafc-pc_globalctrl IAF_GLOBAL_CTRL_MASK)); } while (iafc-pc_resync != 0); @@ -487,7 +487,7 @@ iaf_write_pmc(int cpu, int ri, pmc_value /* Turn off fixed counters */ msr = rdmsr(IAF_CTRL) ~IAF_CTRL_MASK; - wrmsr(IAF_CTRL, msr); + wrmsr(IAF_CTRL, msr); wrmsr(IAF_CTR0 + ri, v ((1ULL core_iaf_width) - 1)); @@ -704,7 +704,7 @@ static struct iap_event_descr iap_events IAPDESCR(0CH_02H, 0x0C, 0x02, IAP_F_FM | IAP_F_CC2), IAPDESCR(0CH_03H, 0x0C, 0x03, IAP_F_FM | IAP_F_CA), -IAPDESCR(0DH_03H, 0x0D, 0x03, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | +IAPDESCR(0DH_03H, 0x0D, 0x03, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_IB | IAP_F_IBX | IAP_F_HWX), IAPDESCR(0DH_40H, 0x0D, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_SBX), @@ -1316,7 +1316,7 @@ static struct iap_event_descr iap_events IAPDESCR(A6H_01H, 0xA6, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(A7H_01H, 0xA7, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), -IAPDESCR(A8H_01H, 0xA8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IBX | +IAPDESCR(A8H_01H, 0xA8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IBX | IAP_F_IB |IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(AAH_01H, 0xAA, 0x01, IAP_F_FM | IAP_F_CC2), @@ -1466,7 +1466,7 @@ static struct iap_event_descr iap_events IAPDESCR(C3H_01H, 0xC3, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | 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 | IAP_F_HWX), 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 | @@ -1623,10 +1623,10 @@ static struct iap_event_descr iap_events IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(D1H_04H, 0xD1, 0x04, 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_HWX), -IAPDESCR(D1H_08H, 0xD1, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | +IAPDESCR(D1H_08H, 0xD1, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(D1H_10H, 0xD1, 0x10, IAP_F_HW | IAP_F_IB | IAP_F_IBX | IAP_F_HWX), -IAPDESCR(D1H_20H, 0xD1, 0x20, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | +IAPDESCR(D1H_20H, 0xD1, 0x20, IAP_F_FM | IAP_F_SBX | IAP_F_IBX | IAP_F_IB | IAP_F_HW | IAP_F_HWX), IAPDESCR(D1H_40H, 0xD1, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), @@ -1716,7 +1716,7 @@ static struct iap_event_descr iap_events 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_IB | +IAPDESCR(E6H_1FH, 0xE6, 0x1F, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), IAPDESCR(E7H_01H, 0xE7, 0x01, IAP_F_CAS), @@ -1876,7 +1876,7 @@ iap_is_event_architectural(enum pmc_even return (EV_IS_NOTARCH); } - return (((core_architectural_events (1 ae)) == 0) ? + return (((core_architectural_events (1 ae)) == 0) ? EV_IS_ARCH_NOTSUPP : EV_IS_ARCH_SUPP); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281100 - head/sys/amd64/amd64
Author: eadler Date: Sun Apr 5 05:07:24 2015 New Revision: 281100 URL: https://svnweb.freebsd.org/changeset/base/281100 Log: head/sys/amd64/amd64/support.S: unroll loop unroll the loop in ENTRY(pagezero) acc' to the submitter this results in a reproducible 1% perf improvement under buildworld like workload I validated correctness and run-testing, but not performance impact Submitted by: l...@pix.net Reviewed by: adrian PR: 199151 MFC After:1 month Modified: head/sys/amd64/amd64/support.S Modified: head/sys/amd64/amd64/support.S == --- head/sys/amd64/amd64/support.S Sun Apr 5 05:00:25 2015 (r281099) +++ head/sys/amd64/amd64/support.S Sun Apr 5 05:07:24 2015 (r281100) @@ -73,7 +73,11 @@ ENTRY(pagezero) movnti %rax,8(%rdi,%rdx) movnti %rax,16(%rdi,%rdx) movnti %rax,24(%rdi,%rdx) - addq$32,%rdx + movnti %rax,32(%rdi,%rdx) + movnti %rax,40(%rdi,%rdx) + movnti %rax,48(%rdi,%rdx) + movnti %rax,56(%rdi,%rdx) + addq$64,%rdx jne 1b sfence POP_FRAME_POINTER ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281102 - in head/sys: dev/hwpmc sys
Author: rpaulo Date: Sun Apr 5 05:14:20 2015 New Revision: 281102 URL: https://svnweb.freebsd.org/changeset/base/281102 Log: hwpmc: add initial Intel Broadwell support. The full list of aliases and events will follow in a subsequent commit. MFC after:1 month Modified: head/sys/dev/hwpmc/hwpmc_core.c head/sys/dev/hwpmc/hwpmc_intel.c head/sys/dev/hwpmc/pmc_events.h head/sys/sys/pmc.h Modified: head/sys/dev/hwpmc/hwpmc_core.c == --- head/sys/dev/hwpmc/hwpmc_core.c Sun Apr 5 05:09:38 2015 (r281101) +++ head/sys/dev/hwpmc/hwpmc_core.c Sun Apr 5 05:14:20 2015 (r281102) @@ -574,7 +574,8 @@ struct iap_event_descr { #defineIAP_F_HW(1 10) /* CPU: Haswell */ #defineIAP_F_CAS (1 11) /* CPU: Atom Silvermont */ #defineIAP_F_HWX (1 12) /* CPU: Haswell Xeon */ -#defineIAP_F_FM(1 13) /* Fixed mask */ +#defineIAP_F_BW(1 13) /* CPU: Broadwell */ +#defineIAP_F_FM(1 14) /* Fixed mask */ #defineIAP_F_ALLCPUSCORE2 \ (IAP_F_CC | IAP_F_CC2 | IAP_F_CC2E | IAP_F_CA) @@ -2074,6 +2075,7 @@ iap_allocate_pmc(int cpu, int ri, struct if (iap_event_corei7_ok_on_counter(ev, ri) == 0) return (EINVAL); break; + case PMC_CPU_INTEL_BROADWELL: case PMC_CPU_INTEL_SANDYBRIDGE: case PMC_CPU_INTEL_SANDYBRIDGE_XEON: case PMC_CPU_INTEL_IVYBRIDGE: @@ -2106,6 +2108,9 @@ iap_allocate_pmc(int cpu, int ri, struct case PMC_CPU_INTEL_ATOM_SILVERMONT: cpuflag = IAP_F_CAS; break; + case PMC_CPU_INTEL_BROADWELL: + cpuflag = IAP_F_BW; + break; case PMC_CPU_INTEL_CORE: cpuflag = IAP_F_CC; break; Modified: head/sys/dev/hwpmc/hwpmc_intel.c == --- head/sys/dev/hwpmc/hwpmc_intel.cSun Apr 5 05:09:38 2015 (r281101) +++ head/sys/dev/hwpmc/hwpmc_intel.cSun Apr 5 05:14:20 2015 (r281102) @@ -179,6 +179,10 @@ pmc_intel_initialize(void) cputype = PMC_CPU_INTEL_IVYBRIDGE_XEON; nclasses = 3; break; + case 0x3D: + cputype = PMC_CPU_INTEL_BROADWELL; + nclasses = 3; + break; case 0x3F: /* Per Intel document 325462-045US 09/2014. */ case 0x46: /* Per Intel document 325462-045US 09/2014. */ /* Should 46 be XEON. probably its own? */ @@ -227,6 +231,7 @@ pmc_intel_initialize(void) */ case PMC_CPU_INTEL_ATOM: case PMC_CPU_INTEL_ATOM_SILVERMONT: + case PMC_CPU_INTEL_BROADWELL: case PMC_CPU_INTEL_CORE: case PMC_CPU_INTEL_CORE2: case PMC_CPU_INTEL_CORE2EXTREME: @@ -295,6 +300,7 @@ pmc_intel_initialize(void) case PMC_CPU_INTEL_HASWELL: case PMC_CPU_INTEL_SANDYBRIDGE: case PMC_CPU_INTEL_WESTMERE: + case PMC_CPU_INTEL_BROADWELL: error = pmc_uncore_initialize(pmc_mdep, ncpus); break; default: @@ -319,6 +325,7 @@ pmc_intel_finalize(struct pmc_mdep *md) #ifdefined(__i386__) || defined(__amd64__) case PMC_CPU_INTEL_ATOM: case PMC_CPU_INTEL_ATOM_SILVERMONT: + case PMC_CPU_INTEL_BROADWELL: case PMC_CPU_INTEL_CORE: case PMC_CPU_INTEL_CORE2: case PMC_CPU_INTEL_CORE2EXTREME: @@ -360,6 +367,7 @@ pmc_intel_finalize(struct pmc_mdep *md) */ #ifdefined(__i386__) || defined(__amd64__) switch (md-pmd_cputype) { + case PMC_CPU_INTEL_BROADWELL: case PMC_CPU_INTEL_COREI7: case PMC_CPU_INTEL_HASWELL: case PMC_CPU_INTEL_SANDYBRIDGE: Modified: head/sys/dev/hwpmc/pmc_events.h == --- head/sys/dev/hwpmc/pmc_events.h Sun Apr 5 05:09:38 2015 (r281101) +++ head/sys/dev/hwpmc/pmc_events.h Sun Apr 5 05:14:20 2015 (r281102) @@ -1554,6 +1554,11 @@ __PMC_EV_ALIAS(BACLEARS.RETURN,I __PMC_EV_ALIAS(BACLEARS.COND,IAP_EVENT_E6H_10H) \ __PMC_EV_ALIAS(MS_DECODED.MS_ENTRY, IAP_EVENT_E7H_01H) +/* + * Aliases for Broadwell PMC events. + */ +#define __PMC_EV_ALIAS_BROADWELL() \ +__PMC_EV_ALIAS_INTEL_ARCHITECTURAL() /* * Aliases for Core PMC events. @@ -4228,6 +4233,11 @@ __PMC_EV(UCP, EVENT_86H_01H) #definePMC_EV_UCP_FIRSTPMC_EV_UCP_EVENT_00H_01H #definePMC_EV_UCP_LAST PMC_EV_UCP_EVENT_86H_01H +/* + * Aliases for Broadwell
svn commit: r281103 - head/sys/amd64/amd64
Author: eadler Date: Sun Apr 5 05:18:14 2015 New Revision: 281103 URL: https://svnweb.freebsd.org/changeset/base/281103 Log: adrian asked me to revert and get more testing Modified: head/sys/amd64/amd64/support.S Modified: head/sys/amd64/amd64/support.S == --- head/sys/amd64/amd64/support.S Sun Apr 5 05:14:20 2015 (r281102) +++ head/sys/amd64/amd64/support.S Sun Apr 5 05:18:14 2015 (r281103) @@ -73,11 +73,7 @@ ENTRY(pagezero) movnti %rax,8(%rdi,%rdx) movnti %rax,16(%rdi,%rdx) movnti %rax,24(%rdi,%rdx) - movnti %rax,32(%rdi,%rdx) - movnti %rax,40(%rdi,%rdx) - movnti %rax,48(%rdi,%rdx) - movnti %rax,56(%rdi,%rdx) - addq$64,%rdx + addq$32,%rdx jne 1b sfence POP_FRAME_POINTER ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r281055 - head/share/mk
On Apr 4, 2015, at 03:43, Baptiste Daroussin b...@freebsd.org wrote: On Fri, Apr 03, 2015 at 05:36:21PM -0700, Garrett Cooper wrote: On Apr 3, 2015, at 17:31, Baptiste Daroussin b...@freebsd.org wrote: Author: bapt Date: Sat Apr 4 00:31:40 2015 New Revision: 281055 URL: https://svnweb.freebsd.org/changeset/base/281055 Log: Do not install scripts multiple time when using bsd.progs.mk Modified: head/share/mk/bsd.progs.mk I’m sorry I’ve been lax with this, but unfortunately this doesn’t solve the underlying issue 100%. 1. You forgot FILES/FILESGROUPS 2. This doesn’t help cases were targets are manually overridden. 3. Etc. The project I was working on has reached steady state. We should be done with the big hurdle soon-ish (another month or two). I’ll try to resolve it sometime between now and then by putting all of the PROGS logic down into bsd.prog.mk (where it should have been in the first place…), because bsd.progs.mk being included recursively is a layering violation bug that parallel installs expose. Thanks! Well I have hit this one while packaging base because pkg(8) yell when things are being packaged twice, so I'm fixing when I see them I plan to fix others when I'll catch them, if you prefer I can keep that on my own branch to not make collision with your work? That'd be good. I'll check in the short term minimal hack to fix this today and work on moving bsd.test.mk away from bsd.progs.mk on another branch. Thanks for all the packaging stuff in base BTW -- really looking forward to it :)!!! ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281077 - head/sys/dev/uart
Author: andrew Date: Sat Apr 4 18:45:25 2015 New Revision: 281077 URL: https://svnweb.freebsd.org/changeset/base/281077 Log: Move uart_fdt_get_clock and uart_fdt_get_shift to uart_bus_fdt.c, we may not build uart_cpu_fdt.c in all configs. Modified: head/sys/dev/uart/uart_bus_fdt.c head/sys/dev/uart/uart_cpu_fdt.c Modified: head/sys/dev/uart/uart_bus_fdt.c == --- head/sys/dev/uart/uart_bus_fdt.cSat Apr 4 18:41:18 2015 (r281076) +++ head/sys/dev/uart/uart_bus_fdt.cSat Apr 4 18:45:25 2015 (r281077) @@ -63,6 +63,35 @@ static driver_t uart_fdt_driver = { sizeof(struct uart_softc), }; +int +uart_fdt_get_clock(phandle_t node, pcell_t *cell) +{ + pcell_t clock; + + /* clock-frequency is a FreeBSD-only extention. */ + if ((OF_getencprop(node, clock-frequency, clock, + sizeof(clock))) = 0) + clock = 0; + + if (clock == 0) + /* Try to retrieve parent 'bus-frequency' */ + /* XXX this should go to simple-bus fixup or so */ + if ((OF_getencprop(OF_parent(node), bus-frequency, clock, + sizeof(clock))) = 0) + clock = 0; + + return (0); +} + +int +uart_fdt_get_shift(phandle_t node, pcell_t *cell) +{ + + if ((OF_getencprop(node, reg-shift, cell, sizeof(*cell))) = 0) + *cell = 0; + return (0); +} + static uintptr_t uart_fdt_find_device(device_t dev) { Modified: head/sys/dev/uart/uart_cpu_fdt.c == --- head/sys/dev/uart/uart_cpu_fdt.cSat Apr 4 18:41:18 2015 (r281076) +++ head/sys/dev/uart/uart_cpu_fdt.cSat Apr 4 18:45:25 2015 (r281077) @@ -59,35 +59,6 @@ bus_space_tag_t uart_bus_space_io; bus_space_tag_t uart_bus_space_mem; int -uart_fdt_get_clock(phandle_t node, pcell_t *cell) -{ - pcell_t clock; - - /* clock-frequency is a FreeBSD-only extention. */ - if ((OF_getencprop(node, clock-frequency, clock, - sizeof(clock))) = 0) - clock = 0; - - if (clock == 0) - /* Try to retrieve parent 'bus-frequency' */ - /* XXX this should go to simple-bus fixup or so */ - if ((OF_getencprop(OF_parent(node), bus-frequency, clock, - sizeof(clock))) = 0) - clock = 0; - - return (0); -} - -int -uart_fdt_get_shift(phandle_t node, pcell_t *cell) -{ - - if ((OF_getencprop(node, reg-shift, cell, sizeof(*cell))) = 0) - *cell = 0; - return (0); -} - -int uart_cpu_eqres(struct uart_bas *b1, struct uart_bas *b2) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281079 - head/sys/vm
Author: alc Date: Sat Apr 4 19:10:22 2015 New Revision: 281079 URL: https://svnweb.freebsd.org/changeset/base/281079 Log: Replace vm_fault()'s heuristic for automatic cache behind with a heuristic that performs the equivalent of an automatic madvise(..., MADV_DONTNEED). The current heuristic, even with the improvements that I made a few years ago, is a good example of making the wrong trade-off, or optimizing for the infrequent case. The infrequent case being reading a single file that is much larger than memory using mmap(2). And, in this case, the page daemon isn't the bottleneck; it's the I/O. In all other cases, the current heuristic has too many false positives, i.e., it caches too many pages that are later reused. To give one example, thousands of pages are cached by the current heuristic during a buildworld and all of them are reactivated before the buildworld completes. In particular, clang reads source files using mmap(2) and there are some relatively large source files in our source tree, e.g., sqlite, that are read multiple times. With the new heuristic, I see fewer false positives and they have a much lower cost. I actually tried something like this more than two years ago and it didn't perform as well as the cache behind heuristic. However, that was before the changes to the page daemon in late summer of 2013 and the existence of pmap_advise(). In particular, with the page daemon doing its work more frequently and in smaller batches, it now completes its work while the application accessing the file is blocked on I/O. Whereas previously, the page daemon appeared to hog the CPU for so long that it caused hiccups in the application's execution. Finally, I'll add that the elimination of cache pages is a prerequisite for NUMA support. Reviewed by: jeff, kib Sponsored by: EMC / Isilon Storage Division Modified: head/sys/vm/vm_fault.c Modified: head/sys/vm/vm_fault.c == --- head/sys/vm/vm_fault.c Sat Apr 4 18:49:48 2015(r281078) +++ head/sys/vm/vm_fault.c Sat Apr 4 19:10:22 2015(r281079) @@ -81,6 +81,7 @@ __FBSDID($FreeBSD$); #include sys/systm.h #include sys/kernel.h #include sys/lock.h +#include sys/mman.h #include sys/proc.h #include sys/resourcevar.h #include sys/rwlock.h @@ -113,7 +114,8 @@ static int vm_fault_additional_pages(vm_ #defineVM_FAULT_READ_MAX (1 + VM_FAULT_READ_AHEAD_MAX) #defineVM_FAULT_NINCR (VM_FAULT_READ_MAX / VM_FAULT_READ_BEHIND) #defineVM_FAULT_SUM(VM_FAULT_NINCR * (VM_FAULT_NINCR + 1) / 2) -#defineVM_FAULT_CACHE_BEHIND (VM_FAULT_READ_BEHIND * VM_FAULT_SUM) + +#defineVM_FAULT_DONTNEED_MIN 1048576 struct faultstate { vm_page_t m; @@ -128,7 +130,8 @@ struct faultstate { struct vnode *vp; }; -static void vm_fault_cache_behind(const struct faultstate *fs, int distance); +static void vm_fault_dontneed(const struct faultstate *fs, vm_offset_t vaddr, + int ahead); static void vm_fault_prefault(const struct faultstate *fs, vm_offset_t addra, int faultcount, int reqpage); @@ -566,8 +569,7 @@ readrest: nera = VM_FAULT_READ_AHEAD_MAX; ahead = nera; if (fs.pindex == fs.entry-next_read) - vm_fault_cache_behind(fs, - VM_FAULT_READ_MAX); + vm_fault_dontneed(fs, vaddr, ahead); } else if (fs.pindex == fs.entry-next_read) { /* * This is a sequential fault. Arithmetically @@ -585,8 +587,7 @@ readrest: } ahead = nera; if (era == VM_FAULT_READ_AHEAD_MAX) - vm_fault_cache_behind(fs, - VM_FAULT_CACHE_BEHIND); + vm_fault_dontneed(fs, vaddr, ahead); } else { /* * This is a non-sequential fault. Request a @@ -1034,56 +1035,69 @@ vnode_locked: } /* - * Speed up the reclamation of up to distance pages that precede the - * faulting pindex within the first object of the shadow chain. + * Speed up the reclamation of pages that precede the faulting pindex within + * the first object of the shadow chain. Essentially, perform the equivalent + * to madvise(..., MADV_DONTNEED) on a large cluster of pages that precedes + * the faulting pindex by the cluster size when the pages read by vm_fault() + * cross a cluster-size boundary. The cluster size is the greater of the + * smallest superpage size and
svn commit: r281087 - in head/sys/arm: include mv
Author: andrew Date: Sat Apr 4 22:05:43 2015 New Revision: 281087 URL: https://svnweb.freebsd.org/changeset/base/281087 Log: Move the definition of fdt_localbus_devmap to a Marvell specific file as it's only used there. Modified: head/sys/arm/include/fdt.h head/sys/arm/mv/mv_localbus.c head/sys/arm/mv/mvvar.h Modified: head/sys/arm/include/fdt.h == --- head/sys/arm/include/fdt.h Sat Apr 4 21:47:54 2015(r281086) +++ head/sys/arm/include/fdt.h Sat Apr 4 22:05:43 2015(r281087) @@ -51,8 +51,4 @@ */ extern bus_space_tag_t fdtbus_bs_tag; -struct arm_devmap_entry; - -int fdt_localbus_devmap(phandle_t, struct arm_devmap_entry *, int, int *); - #endif /* _MACHINE_FDT_H_ */ Modified: head/sys/arm/mv/mv_localbus.c == --- head/sys/arm/mv/mv_localbus.c Sat Apr 4 21:47:54 2015 (r281086) +++ head/sys/arm/mv/mv_localbus.c Sat Apr 4 22:05:43 2015 (r281087) @@ -49,6 +49,7 @@ __FBSDID($FreeBSD$); #include dev/fdt/fdt_common.h #include ofw_bus_if.h +#include arm/mv/mvvar.h #include arm/mv/mvwin.h #ifdef DEBUG Modified: head/sys/arm/mv/mvvar.h == --- head/sys/arm/mv/mvvar.h Sat Apr 4 21:47:54 2015(r281086) +++ head/sys/arm/mv/mvvar.h Sat Apr 4 22:05:43 2015(r281087) @@ -140,5 +140,6 @@ struct arm_devmap_entry; int mv_pci_devmap(phandle_t, struct arm_devmap_entry *, vm_offset_t, vm_offset_t); +int fdt_localbus_devmap(phandle_t, struct arm_devmap_entry *, int, int *); #endif /* _MVVAR_H_ */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281088 - head/sys/dev/iscsi
Author: trasz Date: Sat Apr 4 22:11:38 2015 New Revision: 281088 URL: https://svnweb.freebsd.org/changeset/base/281088 Log: Remove icl_conn_connected(); was unused. MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/iscsi/icl_conn_if.m head/sys/dev/iscsi/icl_soft.c head/sys/dev/iscsi/icl_wrappers.h Modified: head/sys/dev/iscsi/icl_conn_if.m == --- head/sys/dev/iscsi/icl_conn_if.mSat Apr 4 22:05:43 2015 (r281087) +++ head/sys/dev/iscsi/icl_conn_if.mSat Apr 4 22:11:38 2015 (r281088) @@ -82,10 +82,6 @@ METHOD void close { struct icl_conn *_ic; }; -METHOD bool connected { - struct icl_conn *_ic; -}; - METHOD int task_setup { struct icl_conn *_ic; struct ccb_scsiio *_csio; Modified: head/sys/dev/iscsi/icl_soft.c == --- head/sys/dev/iscsi/icl_soft.c Sat Apr 4 22:05:43 2015 (r281087) +++ head/sys/dev/iscsi/icl_soft.c Sat Apr 4 22:11:38 2015 (r281088) @@ -97,7 +97,6 @@ static icl_conn_pdu_queue_t icl_soft_con static icl_conn_handoff_t icl_soft_conn_handoff; static icl_conn_free_t icl_soft_conn_free; static icl_conn_close_ticl_soft_conn_close; -static icl_conn_connected_ticl_soft_conn_connected; static icl_conn_task_setup_t icl_soft_conn_task_setup; static icl_conn_task_done_ticl_soft_conn_task_done; static icl_conn_transfer_setup_t icl_soft_conn_transfer_setup; @@ -114,7 +113,6 @@ static kobj_method_t icl_soft_methods[] KOBJMETHOD(icl_conn_handoff, icl_soft_conn_handoff), KOBJMETHOD(icl_conn_free, icl_soft_conn_free), KOBJMETHOD(icl_conn_close, icl_soft_conn_close), - KOBJMETHOD(icl_conn_connected, icl_soft_conn_connected), KOBJMETHOD(icl_conn_task_setup, icl_soft_conn_task_setup), KOBJMETHOD(icl_conn_task_done, icl_soft_conn_task_done), KOBJMETHOD(icl_conn_transfer_setup, icl_soft_conn_transfer_setup), @@ -1425,24 +1423,6 @@ icl_soft_conn_close(struct icl_conn *ic) ICL_CONN_UNLOCK(ic); } -bool -icl_soft_conn_connected(struct icl_conn *ic) -{ - ICL_CONN_LOCK_ASSERT_NOT(ic); - - ICL_CONN_LOCK(ic); - if (ic-ic_socket == NULL) { - ICL_CONN_UNLOCK(ic); - return (false); - } - if (ic-ic_socket-so_error != 0) { - ICL_CONN_UNLOCK(ic); - return (false); - } - ICL_CONN_UNLOCK(ic); - return (true); -} - int icl_soft_conn_task_setup(struct icl_conn *ic, struct ccb_scsiio *csio, uint32_t *task_tagp, void **prvp) Modified: head/sys/dev/iscsi/icl_wrappers.h == --- head/sys/dev/iscsi/icl_wrappers.h Sat Apr 4 22:05:43 2015 (r281087) +++ head/sys/dev/iscsi/icl_wrappers.h Sat Apr 4 22:11:38 2015 (r281088) @@ -105,13 +105,6 @@ icl_conn_close(struct icl_conn *ic) ICL_CONN_CLOSE(ic); } -static inline bool -icl_conn_connected(struct icl_conn *ic) -{ - - return (ICL_CONN_CONNECTED(ic)); -} - static inline int icl_conn_task_setup(struct icl_conn *ic, struct ccb_scsiio *csio, uint32_t *task_tagp, void **prvp) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281089 - in head/sys/arm: arm include
Author: andrew Date: Sat Apr 4 22:22:04 2015 New Revision: 281089 URL: https://svnweb.freebsd.org/changeset/base/281089 Log: Don't include unneeded files in the arm machine/fdt.h. While here, remove it from more files. Modified: head/sys/arm/arm/intr.c head/sys/arm/arm/mpcore_timer.c head/sys/arm/arm/pmu.c head/sys/arm/include/fdt.h Modified: head/sys/arm/arm/intr.c == --- head/sys/arm/arm/intr.c Sat Apr 4 22:11:38 2015(r281088) +++ head/sys/arm/arm/intr.c Sat Apr 4 22:22:04 2015(r281089) @@ -55,6 +55,7 @@ __FBSDID($FreeBSD$); #include sys/pmckern.h #include machine/atomic.h +#include machine/bus.h #include machine/intr.h #include machine/cpu.h Modified: head/sys/arm/arm/mpcore_timer.c == --- head/sys/arm/arm/mpcore_timer.c Sat Apr 4 22:11:38 2015 (r281088) +++ head/sys/arm/arm/mpcore_timer.c Sat Apr 4 22:22:04 2015 (r281089) @@ -65,7 +65,6 @@ __FBSDID($FreeBSD$); #include dev/ofw/ofw_bus_subr.h #include machine/bus.h -#include machine/fdt.h #include arm/arm/mpcore_timervar.h Modified: head/sys/arm/arm/pmu.c == --- head/sys/arm/arm/pmu.c Sat Apr 4 22:11:38 2015(r281088) +++ head/sys/arm/arm/pmu.c Sat Apr 4 22:22:04 2015(r281089) @@ -55,7 +55,6 @@ __FBSDID($FreeBSD$); #include dev/ofw/ofw_bus_subr.h #include machine/bus.h -#include machine/fdt.h #include machine/cpu.h #include machine/intr.h Modified: head/sys/arm/include/fdt.h == --- head/sys/arm/include/fdt.h Sat Apr 4 22:11:38 2015(r281088) +++ head/sys/arm/include/fdt.h Sat Apr 4 22:22:04 2015(r281089) @@ -34,12 +34,6 @@ #include dev/ofw/openfirm.h -#include vm/vm.h -#include vm/pmap.h - -#include machine/bus.h -#include machine/intr.h - /* Max interrupt number */ #define FDT_INTR_MAX NIRQ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281090 - svnadmin/conf
Author: eadler Date: Sat Apr 4 22:37:12 2015 New Revision: 281090 URL: https://svnweb.freebsd.org/changeset/base/281090 Log: Fix typo typo Approved by: core (implicit) Modified: svnadmin/conf/access Modified: svnadmin/conf/access == --- svnadmin/conf/accessSat Apr 4 22:22:04 2015(r281089) +++ svnadmin/conf/accessSat Apr 4 22:37:12 2015(r281090) @@ -1,7 +1,7 @@ # $FreeBSD$ # # Please try to keep the handbook (contrib/chapter.sgml authors.ent -# staff/chapter.sgml) in in sync with this. +# staff/chapter.sgml) in sync with this. # # KEEP ALPHABETICALLY SORTED!!! # KEEP ALPHABETICALLY SORTED!!! ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281080 - svnadmin/tools/svnssh
Author: peter Date: Sat Apr 4 19:31:29 2015 New Revision: 281080 URL: https://svnweb.freebsd.org/changeset/base/281080 Log: Raise cpu failsafe limits that Baptiste ran into. Modified: svnadmin/tools/svnssh/svnssh.c Modified: svnadmin/tools/svnssh/svnssh.c == --- svnadmin/tools/svnssh/svnssh.c Sat Apr 4 19:10:22 2015 (r281079) +++ svnadmin/tools/svnssh/svnssh.c Sat Apr 4 19:31:29 2015 (r281080) @@ -202,8 +202,8 @@ main(int argc, char *argv[]) msg(root not allowed to commit); exit(1); } - rl.rlim_cur = 540; /* 9 minutes (soft) */ - rl.rlim_max = 600; /* 10 minutes (hard) */ + rl.rlim_cur = 60 * 60; /* 60 minutes (soft) */ + rl.rlim_max = 70 * 60; /* 70 minutes (hard) */ setrlimit(RLIMIT_CPU, rl); if (karma == 0) syslog(LOG_INFO, svn server: %s, karma %d, username, karma); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281085 - in head/sys/arm: allwinner allwinner/a20 altera/socfpga broadcom/bcm2835 freescale/imx freescale/vybrid mv rockchip ti ti/am335x versatile
Author: andrew Date: Sat Apr 4 21:34:26 2015 New Revision: 281085 URL: https://svnweb.freebsd.org/changeset/base/281085 Log: Stop using machine/fdt.h in the arm kernel code when we don't need it. Modified: head/sys/arm/allwinner/a10_clk.c head/sys/arm/allwinner/a10_common.c head/sys/arm/allwinner/a10_gpio.c head/sys/arm/allwinner/a10_sramc.c head/sys/arm/allwinner/a10_wdog.c head/sys/arm/allwinner/a20/a20_cpu_cfg.c head/sys/arm/allwinner/timer.c head/sys/arm/altera/socfpga/socfpga_gpio.c head/sys/arm/altera/socfpga/socfpga_manager.c head/sys/arm/broadcom/bcm2835/bcm2835_common.c head/sys/arm/broadcom/bcm2835/bcm2835_spi.c head/sys/arm/broadcom/bcm2835/bcm2835_systimer.c head/sys/arm/broadcom/bcm2835/bcm2835_wdog.c head/sys/arm/freescale/imx/imx51_ccm.c head/sys/arm/freescale/imx/imx51_ipuv3_fbd.c head/sys/arm/freescale/imx/imx6_anatop.c head/sys/arm/freescale/imx/imx6_audmux.c head/sys/arm/freescale/imx/imx6_sdma.c head/sys/arm/freescale/imx/imx6_ssi.c head/sys/arm/freescale/imx/imx_common.c head/sys/arm/freescale/imx/imx_gpt.c head/sys/arm/freescale/imx/imx_iomux.c head/sys/arm/freescale/imx/imx_wdog.c head/sys/arm/freescale/vybrid/vf_adc.c head/sys/arm/freescale/vybrid/vf_anadig.c head/sys/arm/freescale/vybrid/vf_ccm.c head/sys/arm/freescale/vybrid/vf_dmamux.c head/sys/arm/freescale/vybrid/vf_edma.c head/sys/arm/freescale/vybrid/vf_gpio.c head/sys/arm/freescale/vybrid/vf_i2c.c head/sys/arm/freescale/vybrid/vf_iomuxc.c head/sys/arm/freescale/vybrid/vf_mscm.c head/sys/arm/freescale/vybrid/vf_nfc.c head/sys/arm/freescale/vybrid/vf_port.c head/sys/arm/freescale/vybrid/vf_sai.c head/sys/arm/freescale/vybrid/vf_spi.c head/sys/arm/freescale/vybrid/vf_src.c head/sys/arm/freescale/vybrid/vf_tcon.c head/sys/arm/freescale/vybrid/vf_uart.c head/sys/arm/mv/gpio.c head/sys/arm/mv/mv_ts.c head/sys/arm/rockchip/rk30xx_common.c head/sys/arm/rockchip/rk30xx_gpio.c head/sys/arm/rockchip/rk30xx_grf.c head/sys/arm/rockchip/rk30xx_pmu.c head/sys/arm/ti/am335x/am335x_dmtimer.c head/sys/arm/ti/am335x/am335x_prcm.c head/sys/arm/ti/ti_common.c head/sys/arm/ti/ti_mbox.c head/sys/arm/ti/ti_pruss.c head/sys/arm/ti/ti_wdt.c head/sys/arm/versatile/pl050.c head/sys/arm/versatile/sp804.c head/sys/arm/versatile/versatile_clcd.c head/sys/arm/versatile/versatile_common.c head/sys/arm/versatile/versatile_timer.c Modified: head/sys/arm/allwinner/a10_clk.c == --- head/sys/arm/allwinner/a10_clk.cSat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/allwinner/a10_clk.cSat Apr 4 21:34:26 2015 (r281085) @@ -49,7 +49,6 @@ __FBSDID($FreeBSD$); #include dev/ofw/ofw_bus_subr.h #include machine/bus.h -#include machine/fdt.h #include a10_clk.h Modified: head/sys/arm/allwinner/a10_common.c == --- head/sys/arm/allwinner/a10_common.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/allwinner/a10_common.c Sat Apr 4 21:34:26 2015 (r281085) @@ -36,7 +36,6 @@ __FBSDID($FreeBSD$); #include dev/ofw/openfirm.h #include machine/bus.h -#include machine/fdt.h #include machine/vmparam.h struct fdt_fixup_entry fdt_fixup_table[] = { Modified: head/sys/arm/allwinner/a10_gpio.c == --- head/sys/arm/allwinner/a10_gpio.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/allwinner/a10_gpio.c Sat Apr 4 21:34:26 2015 (r281085) @@ -44,7 +44,6 @@ __FBSDID($FreeBSD$); #include machine/cpu.h #include machine/cpufunc.h #include machine/resource.h -#include machine/fdt.h #include machine/intr.h #include dev/fdt/fdt_common.h Modified: head/sys/arm/allwinner/a10_sramc.c == --- head/sys/arm/allwinner/a10_sramc.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/allwinner/a10_sramc.c Sat Apr 4 21:34:26 2015 (r281085) @@ -43,7 +43,6 @@ __FBSDID($FreeBSD$); #include machine/cpu.h #include machine/frame.h #include machine/intr.h -#include machine/fdt.h #include dev/fdt/fdt_common.h #include dev/ofw/openfirm.h Modified: head/sys/arm/allwinner/a10_wdog.c == --- head/sys/arm/allwinner/a10_wdog.c Sat Apr 4 20:55:47 2015 (r281084) +++ head/sys/arm/allwinner/a10_wdog.c Sat Apr 4 21:34:26 2015 (r281085) @@ -44,7 +44,6 @@ __FBSDID($FreeBSD$); #include machine/bus.h #include machine/cpufunc.h #include machine/machdep.h -#include machine/fdt.h #include arm/allwinner/a10_wdog.h Modified: head/sys/arm/allwinner/a20/a20_cpu_cfg.c == --- head/sys/arm/allwinner/a20/a20_cpu_cfg.cSat Apr
svn commit: r281086 - head/sys/kern
Author: jilles Date: Sat Apr 4 21:47:54 2015 New Revision: 281086 URL: https://svnweb.freebsd.org/changeset/base/281086 Log: utimensat: Correct Capsicum required capability rights. Modified: head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_syscalls.c == --- head/sys/kern/vfs_syscalls.cSat Apr 4 21:34:26 2015 (r281085) +++ head/sys/kern/vfs_syscalls.cSat Apr 4 21:47:54 2015 (r281086) @@ -3294,6 +3294,7 @@ kern_utimensat(struct thread *td, int fd { struct nameidata nd; struct timespec ts[2]; + cap_rights_t rights; int error, flags; if (flag ~AT_SYMLINK_NOFOLLOW) @@ -3301,8 +3302,9 @@ kern_utimensat(struct thread *td, int fd if ((error = getutimens(tptr, tptrseg, ts, flags)) != 0) return (error); - NDINIT_AT(nd, LOOKUP, ((flag AT_SYMLINK_NOFOLLOW) ? NOFOLLOW : - FOLLOW) | AUDITVNODE1, pathseg, path, fd, td); + NDINIT_ATRIGHTS(nd, LOOKUP, ((flag AT_SYMLINK_NOFOLLOW) ? NOFOLLOW : + FOLLOW) | AUDITVNODE1, pathseg, path, fd, + cap_rights_init(rights, CAP_FUTIMES), td); if ((error = namei(nd)) != 0) return (error); /* ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281091 - head/sys/arm/at91
Author: andrew Date: Sat Apr 4 23:00:37 2015 New Revision: 281091 URL: https://svnweb.freebsd.org/changeset/base/281091 Log: Include machine/intr.h for arm_post_filter. Modified: head/sys/arm/at91/at91_common.c Modified: head/sys/arm/at91/at91_common.c == --- head/sys/arm/at91/at91_common.c Sat Apr 4 22:37:12 2015 (r281090) +++ head/sys/arm/at91/at91_common.c Sat Apr 4 23:00:37 2015 (r281091) @@ -29,15 +29,22 @@ __FBSDID($FreeBSD$); #define _ARM32_BUS_DMA_PRIVATE #include sys/param.h #include sys/systm.h +#include sys/bus.h + #include vm/vm.h + #include machine/devmap.h +#include machine/intr.h #include machine/machdep.h #include machine/platform.h + #include arm/at91/at91var.h #include arm/at91/at91soc.h #include arm/at91/at91_aicreg.h + #include dev/fdt/fdt_common.h #include dev/ofw/openfirm.h + #include machine/fdt.h extern const struct arm_devmap_entry at91_devmap[]; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r279877 - stable/10/sys/boot/fdt
On 4 April 2015 at 02:17, Ed Schouten e...@80386.nl wrote: 2015-04-04 11:16 GMT+02:00 Ed Schouten e...@80386.nl: Couldn't this use calloc() instead? Oh, wait. This is the boot loader. The boot loader wouldn't necessarily have a calloc() function. .. why not? Wouldn't it be worth the code savings to have calloc versus malloc + bzero everywhere? -adrian ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281084 - head/usr.sbin/ctld
Author: jpaetzel Date: Sat Apr 4 20:55:47 2015 New Revision: 281084 URL: https://svnweb.freebsd.org/changeset/base/281084 Log: Fix thinko/copypaste error. When checking the length of the mutual secret password the variable for the secret password was used by mistake. This resulted in ctld never warning about the length of the mutual secret being wrong even if it was. MFC after:3 days Sponsored by: iXsystems Modified: head/usr.sbin/ctld/ctld.c Modified: head/usr.sbin/ctld/ctld.c == --- head/usr.sbin/ctld/ctld.c Sat Apr 4 20:30:20 2015(r281083) +++ head/usr.sbin/ctld/ctld.c Sat Apr 4 20:55:47 2015(r281084) @@ -203,7 +203,7 @@ auth_check_secret_length(struct auth *au } if (auth-a_mutual_secret != NULL) { - len = strlen(auth-a_secret); + len = strlen(auth-a_mutual_secret); if (len 16) { if (auth-a_auth_group-ag_name != NULL) log_warnx(mutual secret for user \%s\, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281081 - in head/sys/boot: . common forth
Author: bapt Date: Sat Apr 4 19:56:54 2015 New Revision: 281081 URL: https://svnweb.freebsd.org/changeset/base/281081 Log: Make sure forth manpages are only installed once. Differential Revision:https://reviews.freebsd.org/D2224 Reviewed by: imp Added: head/sys/boot/forth/Makefile (contents, props changed) Modified: head/sys/boot/Makefile head/sys/boot/common/Makefile.inc Modified: head/sys/boot/Makefile == --- head/sys/boot/Makefile Sat Apr 4 19:31:29 2015(r281080) +++ head/sys/boot/Makefile Sat Apr 4 19:56:54 2015(r281081) @@ -5,6 +5,7 @@ .if ${MK_FORTH} != no # Build the add-in FORTH interpreter. SUBDIR+= ficl +SUBDIR+= forth .endif .include bsd.arch.inc.mk Modified: head/sys/boot/common/Makefile.inc == --- head/sys/boot/common/Makefile.inc Sat Apr 4 19:31:29 2015 (r281080) +++ head/sys/boot/common/Makefile.inc Sat Apr 4 19:56:54 2015 (r281081) @@ -56,16 +56,6 @@ SRCS+= pnp.c # Forth interpreter .if defined(BOOT_FORTH) SRCS+= interp_forth.c -MAN+= ../forth/beastie.4th.8 -MAN+= ../forth/brand.4th.8 -MAN+= ../forth/check-password.4th.8 -MAN+= ../forth/color.4th.8 -MAN+= ../forth/delay.4th.8 -MAN+= ../forth/loader.conf.5 -MAN+= ../forth/loader.4th.8 -MAN+= ../forth/menu.4th.8 -MAN+= ../forth/menusets.4th.8 -MAN+= ../forth/version.4th.8 .endif .if defined(BOOT_PROMPT_123) Added: head/sys/boot/forth/Makefile == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/forth/MakefileSat Apr 4 19:56:54 2015 (r281081) @@ -0,0 +1,13 @@ +# $FreeBSD$ + +MAN+= beastie.4th.8 \ + brand.4th.8 \ + check-password.4th.8 \ + color.4th.8 \ + delay.4th.8 \ + loader.conf.5 \ + loader.4th.8 \ + menu.4th.8 \ + menusets.4th.8 + +.include bsd.prog.mk ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281082 - head/lib/libc/gen
Author: jilles Date: Sat Apr 4 20:22:12 2015 New Revision: 281082 URL: https://svnweb.freebsd.org/changeset/base/281082 Log: fts: Don't return FTS_SLNONE if it's not a symlink (if race). When following symlinks, fts returned FTS_SLNONE when fstatat(flag=0) failed, but a subsequent fstatat(flag=AT_SYMLINK_NOFOLLOW) succeeded. This incorrectly triggered if a filename existed to be read from the directory, was deleted before the fstatat(flag=0) and created again after the fstatat(flag=0). Fix this by only returning FTS_SLNONE if the result from fstatat(flag=AT_SYMLINK_NOFOLLOW) is actually a symlink. If it is not a symlink, treat it as if fstatat(flag=0) succeeded. PR: 196724 Reported and tested by: pho MFC after:1 week Modified: head/lib/libc/gen/fts.c Modified: head/lib/libc/gen/fts.c == --- head/lib/libc/gen/fts.c Sat Apr 4 19:56:54 2015(r281081) +++ head/lib/libc/gen/fts.c Sat Apr 4 20:22:12 2015(r281082) @@ -905,12 +905,13 @@ fts_stat(FTS *sp, FTSENT *p, int follow, if (ISSET(FTS_LOGICAL) || follow) { if (fstatat(dfd, path, sbp, 0)) { saved_errno = errno; - if (!fstatat(dfd, path, sbp, AT_SYMLINK_NOFOLLOW)) { - errno = 0; - return (FTS_SLNONE); + if (fstatat(dfd, path, sbp, AT_SYMLINK_NOFOLLOW)) { + p-fts_errno = saved_errno; + goto err; } - p-fts_errno = saved_errno; - goto err; + errno = 0; + if (S_ISLNK(sbp-st_mode)) + return (FTS_SLNONE); } } else if (fstatat(dfd, path, sbp, AT_SYMLINK_NOFOLLOW)) { p-fts_errno = errno; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281083 - head/sys/modules/i2c/iicbb
Author: andreast Date: Sat Apr 4 20:30:20 2015 New Revision: 281083 URL: https://svnweb.freebsd.org/changeset/base/281083 Log: Fix build race on armv6* and powerpc*. Tested with cross builds amd64 - armv6(hf) and powerpc(64). Suggested by: andrew@ Modified: head/sys/modules/i2c/iicbb/Makefile Modified: head/sys/modules/i2c/iicbb/Makefile == --- head/sys/modules/i2c/iicbb/Makefile Sat Apr 4 20:22:12 2015 (r281082) +++ head/sys/modules/i2c/iicbb/Makefile Sat Apr 4 20:30:20 2015 (r281083) @@ -1,8 +1,11 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../../../dev/iicbus +.if ${MACHINE_CPUARCH} == arm || ${MACHINE_CPUARCH} == powerpc +ofw_bus_if=ofw_bus_if.h +.endif KMOD = iicbb SRCS = device_if.h bus_if.h iicbus_if.h \ - iicbb_if.h iicbb_if.c iicbb.c opt_platform.h + iicbb_if.h iicbb_if.c iicbb.c ${ofw_bus_if} opt_platform.h .include bsd.kmod.mk ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281092 - in head/sys/arm: allwinner/a20 altera/socfpga amlogic/aml8726 broadcom/bcm2835 freescale/imx freescale/vybrid mv/armadaxp rockchip samsung/exynos ti/omap4 versatile xilinx
Author: andrew Date: Sat Apr 4 23:03:11 2015 New Revision: 281092 URL: https://svnweb.freebsd.org/changeset/base/281092 Log: Include vm/pmap.h for pmap_kextract. Modified: head/sys/arm/allwinner/a20/a20_mp.c head/sys/arm/altera/socfpga/socfpga_mp.c head/sys/arm/amlogic/aml8726/aml8726_fb.c head/sys/arm/amlogic/aml8726/aml8726_mp.c head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c head/sys/arm/freescale/imx/imx51_ipuv3.c head/sys/arm/freescale/imx/imx6_mp.c head/sys/arm/freescale/vybrid/vf_dcu4.c head/sys/arm/mv/armadaxp/armadaxp_mp.c head/sys/arm/rockchip/rk30xx_mp.c head/sys/arm/samsung/exynos/exynos5_mp.c head/sys/arm/ti/omap4/omap4_mp.c head/sys/arm/versatile/versatile_pci.c head/sys/arm/xilinx/zy7_mp.c Modified: head/sys/arm/allwinner/a20/a20_mp.c == --- head/sys/arm/allwinner/a20/a20_mp.c Sat Apr 4 23:00:37 2015 (r281091) +++ head/sys/arm/allwinner/a20/a20_mp.c Sat Apr 4 23:03:11 2015 (r281092) @@ -33,6 +33,9 @@ __FBSDID($FreeBSD$); #include sys/mutex.h #include sys/smp.h +#include vm/vm.h +#include vm/pmap.h + #include machine/smp.h #include machine/fdt.h #include machine/intr.h Modified: head/sys/arm/altera/socfpga/socfpga_mp.c == --- head/sys/arm/altera/socfpga/socfpga_mp.cSat Apr 4 23:00:37 2015 (r281091) +++ head/sys/arm/altera/socfpga/socfpga_mp.cSat Apr 4 23:03:11 2015 (r281092) @@ -38,6 +38,9 @@ __FBSDID($FreeBSD$); #include sys/mutex.h #include sys/smp.h +#include vm/vm.h +#include vm/pmap.h + #include machine/smp.h #include machine/fdt.h #include machine/intr.h Modified: head/sys/arm/amlogic/aml8726/aml8726_fb.c == --- head/sys/arm/amlogic/aml8726/aml8726_fb.c Sat Apr 4 23:00:37 2015 (r281091) +++ head/sys/arm/amlogic/aml8726/aml8726_fb.c Sat Apr 4 23:03:11 2015 (r281092) @@ -49,6 +49,9 @@ __FBSDID($FreeBSD$); #include sys/fbio.h +#include vm/vm.h +#include vm/pmap.h + #include machine/bus.h #include machine/cpu.h #include machine/fdt.h Modified: head/sys/arm/amlogic/aml8726/aml8726_mp.c == --- head/sys/arm/amlogic/aml8726/aml8726_mp.c Sat Apr 4 23:00:37 2015 (r281091) +++ head/sys/arm/amlogic/aml8726/aml8726_mp.c Sat Apr 4 23:03:11 2015 (r281092) @@ -50,6 +50,9 @@ __FBSDID($FreeBSD$); #include sys/rman.h #include sys/smp.h +#include vm/vm.h +#include vm/pmap.h + #include machine/bus.h #include machine/smp.h #include machine/fdt.h Modified: head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c == --- head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Sat Apr 4 23:00:37 2015 (r281091) +++ head/sys/arm/broadcom/bcm2835/bcm2835_fbd.c Sat Apr 4 23:03:11 2015 (r281092) @@ -53,6 +53,9 @@ __FBSDID($FreeBSD$); #include sys/kdb.h +#include vm/vm.h +#include vm/pmap.h + #include machine/bus.h #include machine/cpu.h #include machine/cpufunc.h Modified: head/sys/arm/freescale/imx/imx51_ipuv3.c == --- head/sys/arm/freescale/imx/imx51_ipuv3.cSat Apr 4 23:00:37 2015 (r281091) +++ head/sys/arm/freescale/imx/imx51_ipuv3.cSat Apr 4 23:03:11 2015 (r281092) @@ -53,6 +53,9 @@ __FBSDID($FreeBSD$); #include sys/kdb.h +#include vm/vm.h +#include vm/pmap.h + #include machine/bus.h #include machine/cpu.h #include machine/cpufunc.h Modified: head/sys/arm/freescale/imx/imx6_mp.c == --- head/sys/arm/freescale/imx/imx6_mp.cSat Apr 4 23:00:37 2015 (r281091) +++ head/sys/arm/freescale/imx/imx6_mp.cSat Apr 4 23:03:11 2015 (r281092) @@ -34,6 +34,9 @@ __FBSDID($FreeBSD$); #include sys/mutex.h #include sys/smp.h +#include vm/vm.h +#include vm/pmap.h + #include machine/smp.h #include machine/fdt.h #include machine/intr.h Modified: head/sys/arm/freescale/vybrid/vf_dcu4.c == --- head/sys/arm/freescale/vybrid/vf_dcu4.c Sat Apr 4 23:00:37 2015 (r281091) +++ head/sys/arm/freescale/vybrid/vf_dcu4.c Sat Apr 4 23:03:11 2015 (r281092) @@ -47,6 +47,9 @@ __FBSDID($FreeBSD$); #include sys/eventhandler.h #include sys/gpio.h +#include vm/vm.h +#include vm/pmap.h + #include dev/fdt/fdt_common.h #include dev/ofw/openfirm.h #include dev/ofw/ofw_bus.h Modified: head/sys/arm/mv/armadaxp/armadaxp_mp.c == --- head/sys/arm/mv/armadaxp/armadaxp_mp.c Sat Apr 4 23:00:37 2015 (r281091) +++
svn commit: r281093 - head/sys/arm/include
Author: andrew Date: Sat Apr 4 23:10:13 2015 New Revision: 281093 URL: https://svnweb.freebsd.org/changeset/base/281093 Log: Re-add machine/bus.h to machine/fdt.h on arm, it's still needed. Modified: head/sys/arm/include/fdt.h Modified: head/sys/arm/include/fdt.h == --- head/sys/arm/include/fdt.h Sat Apr 4 23:03:11 2015(r281092) +++ head/sys/arm/include/fdt.h Sat Apr 4 23:10:13 2015(r281093) @@ -34,6 +34,8 @@ #include dev/ofw/openfirm.h +#include machine/bus.h + /* Max interrupt number */ #define FDT_INTR_MAX NIRQ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r281086 - head/sys/kern
On 5 April 2015 at 00:47, Jilles Tjoelker jil...@freebsd.org wrote: Author: jilles Date: Sat Apr 4 21:47:54 2015 New Revision: 281086 URL: https://svnweb.freebsd.org/changeset/base/281086 Log: utimensat: Correct Capsicum required capability rights. Modified: head/sys/kern/vfs_syscalls.c Modified: head/sys/kern/vfs_syscalls.c == --- head/sys/kern/vfs_syscalls.cSat Apr 4 21:34:26 2015 (r281085) +++ head/sys/kern/vfs_syscalls.cSat Apr 4 21:47:54 2015 (r281086) @@ -3294,6 +3294,7 @@ kern_utimensat(struct thread *td, int fd { struct nameidata nd; struct timespec ts[2]; + cap_rights_t rights; int error, flags; if (flag ~AT_SYMLINK_NOFOLLOW) @@ -3301,8 +3302,9 @@ kern_utimensat(struct thread *td, int fd if ((error = getutimens(tptr, tptrseg, ts, flags)) != 0) return (error); - NDINIT_AT(nd, LOOKUP, ((flag AT_SYMLINK_NOFOLLOW) ? NOFOLLOW : - FOLLOW) | AUDITVNODE1, pathseg, path, fd, td); + NDINIT_ATRIGHTS(nd, LOOKUP, ((flag AT_SYMLINK_NOFOLLOW) ? NOFOLLOW : + FOLLOW) | AUDITVNODE1, pathseg, path, fd, + cap_rights_init(rights, CAP_FUTIMES), td); if ((error = namei(nd)) != 0) return (error); /* What about kern_lutimes()? It seems it needs CAP_FUTIMES as well due its path argument. -- wbr, pluknets ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281094 - head/sys/kern
Author: kib Date: Sat Apr 4 23:56:38 2015 New Revision: 281094 URL: https://svnweb.freebsd.org/changeset/base/281094 Log: Restore proper error from oshmctl(2), used by COMPAT_43, when the segment cannot be found. Broken by r280323. Sponsored by: The FreeBSD Foundation MFC after:3 days Modified: head/sys/kern/sysv_shm.c Modified: head/sys/kern/sysv_shm.c == --- head/sys/kern/sysv_shm.cSat Apr 4 23:10:13 2015(r281093) +++ head/sys/kern/sysv_shm.cSat Apr 4 23:56:38 2015(r281094) @@ -965,7 +965,7 @@ oshmctl(struct thread *td, struct oshmct shmseg = shm_find_segment(uap-shmid, true); if (shmseg == NULL) { SYSVSHM_UNLOCK(); - return (error); + return (EINVAL); } switch (uap-cmd) { case IPC_STAT: ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org