aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* o make sure the boundary is a power of 2, when not zero.Marcel Moolenaar2015-07-261-5/+9
| | | | | | | | | o don't convert 0 to ~0 just so that we can use MIN. ~0 is not a valid boundary. Introduce BNDRY_MIN that deals with 0 values that mean no boundary. Notes: svn path=/head/; revision=285892
* Pass unsigned long argument to ioctl().Craig Rodrigues2015-07-261-1/+2
| | | | | | | | | Eliminates "ioctl sign-extension" warnings. PR: 200896 Notes: svn path=/head/; revision=285891
* Replace GNU RCS ident with a BSD license identBaptiste Daroussin2015-07-2616-482/+308
| | | | | | | | | | | | | | | | | | | | | | | Rationale: ident(1) is useful out of RCS, lot of scripts are using ident(1) and failing when base is built WITHOUT_RCS. This version is: - fully compatible with RCS 5.7 ident. - fully compatible with RCS 5.9 ident. - passes all ident test from GNU RCS 5.9 test suite This version has support for: svn extension for the Keyword id (double colon and # before last $) Différences with GNU RCS ident: - no long options as found in GNU RCS 5.9 (but not commented there). - '-V' reports nothing but has been added for compatibility. Differential Revision: https://reviews.freebsd.org/D3200 Reviewed by: pfg Notes: svn path=/head/; revision=285890
* Report the scheme and provider names in warning message about unalignedAndrey V. Elsukov2015-07-261-2/+4
| | | | | | | | | | partition. PR: 201873 MFC after: 1 week Notes: svn path=/head/; revision=285889
* Build debug version of rmlock's methods only when LOCK_DEBUG > 0.Andrey V. Elsukov2015-07-261-1/+1
| | | | | | | | | | | | Currently LOCK_DEBUG is always defined in sys/lock.h (0 or 1). This means that debugging code always built. In addition the kernel modules have always defined LOCK_DEBUG as 1. So, debugging rmlock code is always used by kernel modules. MFC after: 1 week Notes: svn path=/head/; revision=285888
* Improve locking on Mac OS X. This does not change the functionalityMichael Tuexen2015-07-261-2/+25
| | | | | | | | | | on FreeBSD. Reviewed by: rrs MFC after: 1 week Notes: svn path=/head/; revision=285887
* Fix and improve a debug message. The SID was reported as an SSN.Michael Tuexen2015-07-261-4/+4
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=285886
* In tmpfs_chtimes(), remove checks on the nanosecond level whenChristian Brueffer2015-07-261-6/+4
| | | | | | | | | | | | | | | | | | | | determining whether a node changed. Other filesystems, e.g., UFS, only check on seconds, when determining whether something changed. This also corrects the birthtime case, where we checked tv_nsec twice, instead of tv_sec and tv_nsec (PR). PR: 201284 Submitted by: David Binderman Patch suggested by: kib Reviewed by: kib MFC after: 2 weeks Committed from: Essen FreeBSD Hackathon Notes: svn path=/head/; revision=285885
* Bump GCC max-inline-insns-single in libiconv_modules and grepPedro F. Giffuni2015-07-267-6/+8
| | | | | | | | | | This is required by our FORTIFY_SOURCE implementation as it does more inlining. As a rule of thumb, FORTIFY_SOURCE doubles the number of inlines except that in grep inlining blows up for some reason. Notes: svn path=/head/; revision=285884
* isl(4), driver for Intersil I2C ISL29018 Digital Ambient Light SensorMichael Gmelin2015-07-256-1/+536
| | | | | | | | | | Differential Revision: https://reviews.freebsd.org/D2811 Reviewed by: adrian, wblock Approved by: adrian, wblock Relnotes: yes Notes: svn path=/head/; revision=285883
* Use consistent spacing.Edward Tomasz Napierala2015-07-251-4/+4
| | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=285882
* Add md_root example to defaults/loader.conf.Edward Tomasz Napierala2015-07-251-0/+10
| | | | | | | | | | | Note that this doesn't quite work yet - the preloaded image gets loaded twice for some reason. MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=285881
* Remove unused txd_saved.Sean Bruno2015-07-251-2/+1
| | | | | | | | | | | | Intialize txd_upper, txd_lower and txd_used at declaration. Differential Revision: D3174 Reviewed by: erj hiren MFC after: 2 weeks Sponsored by: Limelight Networks Notes: svn path=/head/; revision=285879
* Revert r173708's modifications to vm_object_page_remove().Konstantin Belousov2015-07-252-24/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Assume that a vnode is mapped shared and mlocked(), and then the vnode is truncated, or truncated and then again extended past the mapping point EOF. Truncation removes the pages past the truncation point, and if pages are later created at this range, they are not properly mapped into the mlocked region, and their wiring count is wrong. The revert leaves the invalidated but wired pages on the object queue, which means that the pages are found by vm_object_unwire() when the mapped range is munlock()ed, and reused by the buffer cache when the vnode is extended again. The changes in r173708 were required since then vm_map_unwire() looked at the page tables to find the page to unwire. This is no longer needed with the vm_object_unwire() introduction, which follows the objects shadow chain. Also eliminate OBJPR_NOTWIRED flag for vm_object_page_remove(), which is now redundand, we do not remove wired pages. Reported by: trasz, Dmitry Sivachenko <trtrmitya@gmail.com> Suggested and reviewed by: alc Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Notes: svn path=/head/; revision=285878
* Move including netinet/icmp6.h around to avoid a problem when includingMichael Tuexen2015-07-252-5/+1
| | | | | | | | | | netinet/icmp6.h and net/netmap.h. Both use ni_flags... This allows to build multistack with SCTP support. MFC after: 1 week Notes: svn path=/head/; revision=285877
* cyapa(4), driver for the Cypress APA I2C trackpadMichael Gmelin2015-07-256-1/+2040
| | | | | | | | | | Differential Revision: https://reviews.freebsd.org/D3068 Reviewed by: kib, wblock Approved by: kib Relnotes: yes Notes: svn path=/head/; revision=285876
* Use double newlines consistently.Edward Tomasz Napierala2015-07-251-0/+9
| | | | | | | | MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=285875
* Remove stale comment.Kristof Provost2015-07-251-1/+0
| | | | | | | | | The IPv6 pseudo header checksum was added by bz in r235961. Sponsored by: Essen FreeBSD Hackathon Notes: svn path=/head/; revision=285874
* Update Capsicum and Mandatory Access Control manual pagesEdward Tomasz Napierala2015-07-2513-122/+13
| | | | | | | | | | | | to no longer claim they are experimental. Reviewed by: rwatson@, wblock@ MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2985 Notes: svn path=/head/; revision=285873
* With the removal of b_saveaddr in the r285819, b_data must be reset toKonstantin Belousov2015-07-251-0/+7
| | | | | | | | | | | | | | | | | | | | | | b_kvabase when the buffer is reclaimed. Otherwise, if b_data for the mapped buffer was adjusted with the page-offset portion of b_offset, nothing would re-adjust the b_data, which breaks buffer management code which expects page-aligned b_data (see e.g. bpman_qenter(), which skips partial pages). Fix a minor issue with the GB_KVAALLOC requests, which could result in returning the mapped buffer if the reused buffer is mapped and have the right amount of KVA reserved. Improve assertion in the vfs_buf_check_mapped() to catch unmapped buffers which have their b_data incorrectly adjusted with offset. Reported and tested by: pho (previous version) Reviewed by: jeff (previous version) Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=285872
* Pf can reassemble IPv6 fragments now.Kristof Provost2015-07-251-3/+5
| | | | | | | | Obtained from: bluhm (OpenBSD) Sponsored by: Essen FreeBSD Hackathon Notes: svn path=/head/; revision=285871
* Document md_root in loader(8). The md(4) manual page mentions it,Edward Tomasz Napierala2015-07-251-3/+9
| | | | | | | | | | | | but it's hard to find and easy to miss. Reviewed by: wblock@ MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3183 Notes: svn path=/head/; revision=285870
* Fix transposed words in man page.Dru Lavigne2015-07-251-1/+1
| | | | | | | | | | PR: 201752 Reviewed by: bcr MFC after: 3 days Sponsored by: Essen FreeBSD Hackathon Notes: svn path=/head/; revision=285869
* Fix color mapping for TDA19988. Values for VIP_CNTRL_1 and VIP_CNTRL_2Oleksandr Tymoshenko2015-07-251-2/+2
| | | | | | | registers were mixed up Notes: svn path=/head/; revision=285868
* Synchronize PIN input/output modes with ↵Oleksandr Tymoshenko2015-07-251-1/+2
| | | | | | | | | gnu/dts/include/dt-bindings/pinctrl/am33xx.h gpio driver requires exact value to match SoC pin mode with GPIO pin direction Notes: svn path=/head/; revision=285867
* If there is panel info in DTB do not wait for HDMI event and setupOleksandr Tymoshenko2015-07-251-2/+5
| | | | | | | framebuffer immediately Notes: svn path=/head/; revision=285866
* OF_getencprop_alloc shouldn't be used to get string value. If stringOleksandr Tymoshenko2015-07-251-2/+2
| | | | | | | | length + 1 is not divisible by 4 this function returns NULL property value. Otherwise - string with each 4 letters inverted Notes: svn path=/head/; revision=285865
* Document the fact that system(3) can easily be misused due to shell metaXin LI2015-07-251-2/+14
| | | | | | | | | | characters are honored. While I'm there also mention posix_spawn in the SEE ALSO section. MFC after: 2 weeks Notes: svn path=/head/; revision=285864
* Fix a typo in comment.Xin LI2015-07-241-1/+1
| | | | | | | | Submitted by: Yanhui Shen via twitter MFC after: 3 days Notes: svn path=/head/; revision=285862
* Auto-generate hardware notes for pms(4).Christian Brueffer2015-07-241-0/+2
| | | | | | | | MFC after: 1 week Committed from: Essen FreeBSD Hackathon Notes: svn path=/head/; revision=285859
* Add a basic manpage for the pms driver.Christian Brueffer2015-07-242-0/+129
| | | | | | | | MFC after: 1 week Committed from: Essen FreeBSD Hackathon Notes: svn path=/head/; revision=285858
* Cast uid and gid to the correct type for display to solve segfault in ls(1) ↵Allan Jude2015-07-241-2/+2
| | | | | | | | | | | | | | | | on 32bit arches Correctly escape literal % for display This fixes segfaults in 32bit arches caused by r285734 Reviewed by: ngie Approved by: dim Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D3191 Notes: svn path=/head/; revision=285857
* Add a comment discussing the appropriate use of the atomic_*() functionsAlan Cox2015-07-241-0/+19
| | | | | | | | | | | with acquire and release semantics versus the *mb() functions on amd64 processors. Reviewed by: bde (an earlier version), kib Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=285854
* Add missing SIGUSR1 description.Edward Tomasz Napierala2015-07-241-1/+2
| | | | | | | | MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=285847
* Add missing capitalization.Edward Tomasz Napierala2015-07-241-1/+1
| | | | Notes: svn path=/head/; revision=285846
* readelf: avoid division by zero on section entry sizeEd Maste2015-07-241-15/+47
| | | | | | | | | | | | | | ELF Tool Chain tickets #439, #444, #445, #467 Reported by: Alexander Cherepanov <cherepan@mccme.ru> (#467) Reported by: antiAgainst (others) Reviewed by: brooks MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2338 Notes: svn path=/head/; revision=285845
* ar: add -U (unique) option to disable -D (deterministic) modeEd Maste2015-07-242-7/+34
| | | | | | | | | | | | | | | | This is required in order for us to support deterministic mode by default. If multiple -D or -U options are specified on the command line, the final one takes precedence. GNU ar also uses -U for this. An equivalent change will be applied to ELF Tool Chain's version of ar. PR: 196929 MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D3175 Notes: svn path=/head/; revision=285844
* - Since r253161, uart_intr() abuses FILTER_SCHEDULE_THREAD for signalingMarius Strobl2015-07-242-9/+16
| | | | | | | | | | | | | | | | | | | | | | uart_bus_attach() during its test that 20 iterations weren't sufficient for clearing all pending interrupts, assuming this means that hardware is broken and doesn't deassert interrupts. However, under pressure, 20 iterations also can be insufficient for clearing all pending interrupts, leading to a panic as intr_event_handle() tries to schedule an interrupt handler not registered. Solve this by introducing a flag that is set in test mode and otherwise restores pre-r253161 behavior of uart_intr(). The approach of additionally registering uart_intr() as handler as suggested in PR 194979 is not taken as that in turn would abuse special pccard and pccbb handling code of intr_event_handle(). [1] - Const'ify uart_driver_name. - Fix some minor style bugs. PR: 194979 [1] Reviewed by: marcel (earlier version) MFC after: 3 days Notes: svn path=/head/; revision=285843
* truss: follow pdfork()ed descendents with -fEd Maste2015-07-248-0/+8
| | | | | | | | | | | | PR: 201276 Reported by: David Drysdale Reviewed by: oshogbo MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2976 Notes: svn path=/head/; revision=285842
* Add RISC-V ELF machine type definitionEd Maste2015-07-244-1/+5
| | | | | | | | | | EM_RISCV is now officially registered as e_machine 243. MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=285841
* - In mpt_send_handshake_cmd(), use bus_space_write_stream_4(9) for writingMarius Strobl2015-07-242-9/+14
| | | | | | | | | | | | | raw data to the doorbell offset in order to clarify the intent and for avoiding unnecessarily converting the endianess back and forth. Unfortunately, the same can't be done in mpt_recv_handshake_reply() as 16-bit data needs to be read using 32-bit bus accessors. - In mpt_recv_handshake_reply(), get rid of a redundant variable. MFC after: 1 fortnight Notes: svn path=/head/; revision=285840
* o Revert the other functional half of r239864, i. e. the merge of r134227Marius Strobl2015-07-245-80/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from x86 to use smp_ipi_mtx spin lock not only for smp_rendezvous_cpus() but also for the MD cache invalidation, TLB demapping and remote register reading IPIs due to the following reasons: - The cross-IPI SMP deadlock x86 otherwise is subject to can't happen on sparc64. That's because on sparc64, spin locks don't disable interrupts completely but only raise the processor interrupt level to PIL_TICK. This means that IPIs still get delivered and direct dispatch IPIs such as the cache invalidation etc. IPIs in question are still executed. - In smp_rendezvous_cpus(), smp_ipi_mtx is held not only while sending an IPI_RENDEZVOUS, but until all CPUs have processed smp_rendezvous_action(). Consequently, smp_ipi_mtx may be locked for an extended amount of time as queued IPIs (as opposed to the direct ones) such as IPI_RENDEZVOUS are scheduled via a soft interrupt. Moreover, given that this soft interrupt is only delivered at PIL_RENDEZVOUS, processing of smp_rendezvous_action() on a target may be interrupted by f. e. a tick interrupt at PIL_TICK, in turn leading to the target in question trying to send an IPI by itself while IPI_RENDEZVOUS isn't fully handled, yet, and, thus, resulting in a deadlock. o As mentioned in the commit message of r245850, on least some sun4u platforms concurrent sending of IPIs by different CPUs is fatal. Therefore, hold the reintroduced MD ipi_mtx also while delivering cross-traps via MI helpers, i. e. ipi_{all_but_self,cpu,selected}(). o Akin to x86, let the last CPU to process cpu_mp_bootstrap() set smp_started instead of the BSP in cpu_mp_unleash(). This ensures that all APs actually are started, when smp_started is no longer 0. o In all MD and MI IPI helpers, check for smp_started == 1 rather than for smp_cpus > 1 or nothing at all. This avoids races during boot causing IPIs trying to be delivered to APs that in fact aren't up and running, yet. While at it, move setting of the cpu_ipi_{selected,single}() pointers to the appropriate delivery functions from mp_init() to cpu_mp_start() where it's better suited and allows to get rid of the global isjbus variable. o Given that now concurrent IPI delivery no longer is possible, also nuke the delays before completely disabling interrupts again in the CPU-specific cross-trap delivery functions, previously giving other CPUs a window for sending IPIs on their part. Actually, we now should be able to entirely get rid of completely disabling interrupts in these functions. Such a change needs more testing, though. o In {s,}tick_get_timecount_mp(), make the {s,}tick variable static. While not necessary for correctness, this avoids page faults when accessing the stack of a foreign CPU as {s,}tick now is locked into the TLBs as part of static kernel data. Hence, {s,}tick_get_timecount_mp() always execute as fast as possible, avoiding jitter. PR: 201245 MFC after: 3 days Notes: svn path=/head/; revision=285839
* Fix silly syntax error emacs chugged in for me.. gesh.Randall Stewart2015-07-241-1/+0
| | | | | | | MFC after: 3 weeks Notes: svn path=/head/; revision=285838
* Fix an issue with MAC OS locking and also optimize the caseRandall Stewart2015-07-244-9/+16
| | | | | | | | | | where we are sending back a stream-reset and a sack timer is running, in that case we should just send the SACK. MFC after: 3 weeks Notes: svn path=/head/; revision=285837
* inode should be different to actually mean mandocdb is in usedBaptiste Daroussin2015-07-241-2/+2
| | | | | | | Sponsored by: gandi.net Notes: svn path=/head/; revision=285836
* Fix man -k with mandocdbBaptiste Daroussin2015-07-241-0/+4
| | | | | | | | | | | | If apropos(1) and whatis(1) are not hardlinks to man(1) that means the system is using mandocdb, then man -k should spawn apropos(1) and/or whatis(1) directly Reported by: kevlo Tested by: kevlo Sponsored by: gandi.net Notes: svn path=/head/; revision=285835
* Implement the basic system calls that operate on pathnames.Ed Schouten2015-07-243-15/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Unlike FreeBSD, CloudABI does not use null terminated strings for its pathnames. Introduce a function called copyin_path() that can be used by all of the filesystem system calls that use pathnames. This change already implements the system calls that don't depend on any additional functionality (e.g., conversion of struct stat). Also implement the socket system calls that operate on pathnames, namely the ones used by the C library functions bindat() and connectat(). These don't receive a 'struct sockaddr_un', but just the pathname, meaning they could be implemented in such a way that they don't depend on the size of sun_path. For now, just use the existing interfaces. Add a missing #include to cloudabi_syscalldefs.h to get this code to build, as one of its macros depends on UINT64_C(). Test Plan: These implementations have already been tested in the CloudABI branch on GitHub. They pass all of the tests. Reviewers: kib, pjd Subscribers: imp Differential Revision: https://reviews.freebsd.org/D3097 Notes: svn path=/head/; revision=285834
* Panic when a device is trying to recursively acquire rather than hangWarner Losh2015-07-241-2/+11
| | | | | | | indefinitely. Improve error messages from other panics. Notes: svn path=/head/; revision=285833
* Call ksem_get() with initialized 'rights'.Sergey Kandaurov2015-07-231-2/+4
| | | | | | | | | | ksem_get() consumes fget(), and it's mandatory there. Reported by: truckman Reviewed by: mjg Notes: svn path=/head/; revision=285829
* Refactor unmapped buffer address handling.Jeff Roberson2015-07-2311-313/+255
| | | | | | | | | | | | | | | | | | | | - Use pointer assignment rather than a combination of pointers and flags to switch buffers between unmapped and mapped. This eliminates multiple flags and generally simplifies the logic. - Eliminate b_saveaddr since it is only used with pager bufs which have their b_data re-initialized on each allocation. - Gather up some convenience routines in the buffer cache for manipulating buf space and buf malloc space. - Add an inline, buf_mapped(), to standardize checks around unmapped buffers. In collaboration with: mlaier Reviewed by: kib Tested by: pho (many small revisions ago) Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=285819