aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add support for reading MAM attributes to camcontrol(8) and libcam(3).Kenneth D. Merry2015-06-0916-8/+2036
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MAM is Medium Auxiliary Memory and is most commonly found as flash chips on tapes. This includes support for reading attributes and decoding most known attributes, but does not yet include support for writing attributes or reporting attributes in XML format. libsbuf/Makefile: Add subr_prf.c for the new sbuf_hexdump() function. This function is essentially the same function. libsbuf/Symbol.map: Add a new shared library minor version, and include the sbuf_hexdump() function. libsbuf/Version.def: Add version 1.4 of the libsbuf library. libutil/hexdump.3: Document sbuf_hexdump() alongside hexdump(3), since it is essentially the same function. camcontrol/Makefile: Add attrib.c. camcontrol/attrib.c: Implementation of READ ATTRIBUTE support for camcontrol(8). camcontrol/camcontrol.8: Document the new 'camcontrol attrib' subcommand. camcontrol/camcontrol.c: Add the new 'camcontrol attrib' subcommand. camcontrol/camcontrol.h: Add a function prototype for scsiattrib(). share/man/man9/sbuf.9: Document the existence of sbuf_hexdump() and point users to the hexdump(3) man page for more details. sys/cam/scsi/scsi_all.c: Add a table of known attributes, text descriptions and handler functions. Add a new scsi_attrib_sbuf() function along with a number of other related functions that help decode attributes. scsi_attrib_ascii_sbuf() decodes ASCII format attributes. scsi_attrib_int_sbuf() decodes binary format attributes, and will pass them off to scsi_attrib_hexdump_sbuf() if they're bigger than 8 bytes. scsi_attrib_vendser_sbuf() decodes the vendor and drive serial number attribute. scsi_attrib_volcoh_sbuf() decodes the Volume Coherency Information attribute that LTFS writes out. sys/cam/scsi/scsi_all.h: Add a number of attribute-related structure definitions and other defines. Add function prototypes for all of the functions added in scsi_all.c. sys/kern/subr_prf.c: Add a new function, sbuf_hexdump(). This is the same as the existing hexdump(9) function, except that it puts the result in an sbuf. This also changes subr_prf.c so that it can be compiled in userland for includsion in libsbuf. We should work to change this so that the kernel hexdump implementation is a wrapper around sbuf_hexdump() with a statically allocated sbuf with a drain. That will require a drain function that goes to the kernel printf() buffer that can take a non-NUL terminated string as input. That is because an sbuf isn't NUL-terminated until it is finished, and we don't want to finish it while we're still using it. We should also work to consolidate the userland hexdump and kernel hexdump implemenatations, which are currently separate. This would also mean making applications that currently link in libutil link in libsbuf. sys/sys/sbuf.h: Add the prototype for sbuf_hexdump(), and add another copy of the hexdump flag values if they aren't already defined. Ideally the flags should be defined in one place but the implemenation makes it difficult to do properly. (See above.) Sponsored by: Spectra Logic Corporation MFC after: 1 week Notes: svn path=/head/; revision=284192
* "status_reg.acpwr ? 1 : 0" is now the same as just "status_reg.acpwr".Maxim Sobolev2015-06-091-1/+1
| | | | Notes: svn path=/head/; revision=284190
* Fix a typo in a comment that has been carried over from am335x_pmic.c.Maxim Sobolev2015-06-091-1/+1
| | | | Notes: svn path=/head/; revision=284189
* Use tab to do identation consistently.Maxim Sobolev2015-06-091-1/+1
| | | | Notes: svn path=/head/; revision=284183
* Extend TPS65217 support to be able to pull and decode batteryMaxim Sobolev2015-06-092-41/+227
| | | | | | | | | | | | | | | | | | | | | | | charger configuration and provide some basic control knobs to set charger voltage and dump config on boot. Two loader tunables have been added: o hw.am335x_pmic.bootverbose set to 1 to get more info on the boot; o hw.am335x_pmic.vo: set to charger voltage to be applied on kernel initialization time, supported values are "4.10V", "4.15V", "4.20V" and "4.25V". Cleanup code a bit in general, move TPS65217 register definitions into a separate header, convert bit-banging defines into bitmap structures. Also threat the case when power source is neither "AC" nor "USB" as "Battery", not "Unknown". Notes: svn path=/head/; revision=284182
* Account for superpage mappings that are created by pmap_copy().Alan Cox2015-06-093-0/+3
| | | | Notes: svn path=/head/; revision=284181
* Switch from make_dev_alias to make_dev_alias_p since make_dev_alias_p canDoug Ambrisko2015-06-091-1/+3
| | | | | | | | | | | | | | | gracefully fail if the /dev/megaraid_sas_ioctl_node symlink already exists. This can happen if mfi(4) and mrsas(4) are both attached to cards and providing Linux emulation support. Let the first one win. An equivalent change needs to be done to mrsas(4). Extra credit would be to pass the Linux emulation call to the other driver when appropriate. This will probably be a rare case and the user can manually change where the symlink points to. MFC after: 3 days Notes: svn path=/head/; revision=284180
* Include opt_em.h now that there are actual kernel compile options for em(4).Sean Bruno2015-06-091-1/+2
| | | | | | | | | Submitted by: jfv MFC after: 2 week Sponsored by: Limelight Networks Notes: svn path=/head/; revision=284179
* When updating/accessing the timehands, barriers are needed to ensureKonstantin Belousov2015-06-091-41/+69
| | | | | | | | | | | | | | | | | | that: - th_generation update is visible after the parameters update is visible; - the read of parameters is not reordered before initial read of th_generation. On UP kernels, compiler barriers are enough. For SMP machines, CPU barriers must be used too, as was confirmed by submitter by testing on the Freescale T4240 platform with 24 PowerPC processors. Submitted by: Sebastian Huber <sebastian.huber@embedded-brains.de> MFC after: 1 week Notes: svn path=/head/; revision=284178
* Handle X2APIC entries in the MADT for APICs with an ID < 255. At least oneJohn Baldwin2015-06-091-32/+65
| | | | | | | | | | | | | | | | | BIOS has been seen to include such entries even though the relevant specs require that X2APIC entries only be used for CPUs with an APIC ID >= 255. This was tested on a system with "plain" local APIC entries in the MADT to ensure no regressions, but it has not yet been tested on a system with X2APIC entries in the MADT. Currently such systems do not boot at all, and with this change they might now boot correctly. Differential Revision: https://reviews.freebsd.org/D2521 Reviewed by: kib MFC after: 2 weeks Notes: svn path=/head/; revision=284175
* Support guest writes to the TSC by enabling the "use TSC offsetting"Tycho Nightingale2015-06-093-4/+26
| | | | | | | | | | | execution control and writing the difference between the host TSC and the guest TSC into the TSC offset in the VMCS upon encountering a write. Reviewed by: neel Notes: svn path=/head/; revision=284174
* Map the allocated DMA memory into the address space.Marcel Moolenaar2015-06-081-1/+9
| | | | Notes: svn path=/head/; revision=284169
* Implement mmap(2) for the busdma resource.Marcel Moolenaar2015-06-083-12/+39
| | | | Notes: svn path=/head/; revision=284168
* Merge r283870 from amd64:Dimitry Andric2015-06-081-6/+2
| | | | | | | | | | | | | | | | | Remove unneeded NULL checks in trap_fatal(). Since td_name is an array member of struct thread, it can never be NULL, so the check can be removed. In addition, curproc can never be NULL, so remove the if statement, and splice the two printfs() together. While here, remove the u_long cast, and use the correct printf format specifier for curproc->p_pid. Requested by: jhb MFC after: 3 days Notes: svn path=/head/; revision=284167
* Properly initialize flags for accept4(2) not to return spurious EINVAL.Jung-uk Kim2015-06-081-0/+1
| | | | | | | | | Note this fixes a Linuxulator regression introduced in r283490. PR: 200662 Notes: svn path=/head/; revision=284166
* Move contrib/top/top.X to contrib/top/top.xs and moveMarcel Moolenaar2015-06-083-2/+2
| | | | | | | | | | | | contrib/top/top.local.H to contrib/top/top.local.hs. This fixes a build breakage when src is on a case- insensitive file system -- we never properly create top.x nor top.local.h. Change the makefile accordingly. MFC after: 3 days Notes: svn path=/head/; revision=284165
* Cleanup some style(9) issues.Bryan Drewery2015-06-082-42/+52
| | | | | | | | | | | | | - Whitespace. - Comments. - Wrap long lines. MFC after: 2 weeks X-MFC-with: r284105,r284106 Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=284163
* It has been long time that when doing 'ls -G /path/to/a/symlink', instead ofXin LI2015-06-081-2/+7
| | | | | | | | | | | | | | | | using the color of symbolic link, the color is determined by the link target. This behavior was quite confusing. Looking at the file history, it looks like that r203665 intends to fix this but the issue was never actually fixed. Fix this by not setting FTS_COMFOLLOW when color is requested like what was done in r203665. MFC after: 2 weeks Notes: svn path=/head/; revision=284162
* Revert r284153, as I believe it breaks the dtrace sdt module. I willJohn Baldwin2015-06-081-31/+13
| | | | | | | fix the original issue a different way. Notes: svn path=/head/; revision=284160
* Futex is an aligned 32-bit integer. Use the proper instruction andDmitry Chagin2015-06-081-24/+24
| | | | | | | operand when dereferencing futex pointer. Notes: svn path=/head/; revision=284159
* Add user facing errors for exceeding process memory limitsEd Maste2015-06-081-10/+24
| | | | | | | | | | | | | Previously the process terminating with SIGABRT at startup was the only notification. PR: 200617 Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D2731 Notes: svn path=/head/; revision=284157
* Add an internal "locked" variant of linker_file_lookup_set() and changeJohn Baldwin2015-06-081-13/+31
| | | | | | | | the public function to acquire the global linker lock directly. This permits linker_file_lookup_set() to be safely used from other modules. Notes: svn path=/head/; revision=284153
* Add makefile to build geom_map kld. Document some GEOM_* optionsAndrey V. Elsukov2015-06-085-3/+17
| | | | | | | in NOTES and geom(4). Notes: svn path=/head/; revision=284152
* Teach G_PART_GPT class to handle g_resize_provider event.Andrey V. Elsukov2015-06-081-1/+1
| | | | | | | MFC after: 10 days Notes: svn path=/head/; revision=284151
* backout remove of -q option for pw [user|group] nextBaptiste Daroussin2015-06-084-9/+20
| | | | | | | | | While the return code is broken, some corner case usage depends on the functionnality, so backout until we get better regression tests covering those corner case usage. Notes: svn path=/head/; revision=284149
* Fix typoBaptiste Daroussin2015-06-081-1/+1
| | | | Notes: svn path=/head/; revision=284148
* Retire VM_FREEPOOL_CACHE as the next step in eliminating PG_CACHE pages.Alan Cox2015-06-089-25/+14
| | | | | | | | | Differential Revision: https://reviews.freebsd.org/D2712 Reviewed by: kib Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=284147
* Add busdma_mem_alloc & busdma_mem_free.Marcel Moolenaar2015-06-085-73/+205
| | | | Notes: svn path=/head/; revision=284146
* Cope with .. less memory.Adrian Chadd2015-06-082-0/+6
| | | | Notes: svn path=/head/; revision=284145
* Add DMA memory allocation and freeing.Marcel Moolenaar2015-06-084-41/+181
| | | | | | | Slightly rework the tag handling. Notes: svn path=/head/; revision=284144
* Break out the current 802.11 software scan methods into an indirect table.Adrian Chadd2015-06-085-98/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order for drivers to provide an alternate set of scan methods, these have to finally use an indirection table and all of the calls in ieee80211_scan.c need to use said table. For all existing drivers - this is basically a glorified, KBI-breaking functional no-op. This is also not the final form - too much functionality is currently hiding in ieee80211_scan_sw.c that should be in ieee80211_scan.c. That'll be the target of some follow-up commits. Note: * You have to recompile your kernel/drivers after this - the net80211 KBI has changed. * I'm not yet planning on bumping any versioning - I have a few more things to shuffle around. Tested: * urtwn(4) - STA mode * Intel 7260 in local repo - overriding the methods and table at attach time has the desired effect (ie, all the methods are called, but nothing is ever performed.) Notes: svn path=/head/; revision=284143
* Revert my previoius commit as it explicit pollute the ficl on otherMarcelo Araujo2015-06-081-1/+0
| | | | | | | | | architectures. It will be reworked by GSoC students. Requested by: ngie, bms and pfg. Notes: svn path=/head/; revision=284142
* Remove the start-scan call and re-inline it for now.Adrian Chadd2015-06-081-12/+1
| | | | Notes: svn path=/head/; revision=284141
* Fix mistakes than came along with r284139Baptiste Daroussin2015-06-071-2/+2
| | | | Notes: svn path=/head/; revision=284140
* Remove '-q' support for pw [user|group] nextBaptiste Daroussin2015-06-074-20/+9
| | | | | | | | | the intent of -q in this command is to return as exit status the value of the next group/user id, which does not make sense given exit status are limited to values between 0 and 255. Notes: svn path=/head/; revision=284139
* Fix setting uid/gid min/max via pwBaptiste Daroussin2015-06-074-5/+87
| | | | Notes: svn path=/head/; revision=284137
* Fix generating configuration fileBaptiste Daroussin2015-06-076-6/+86
| | | | Notes: svn path=/head/; revision=284135
* Fix duplicate checkingBaptiste Daroussin2015-06-074-18/+21
| | | | Notes: svn path=/head/; revision=284133
* Remove uneeded code (already done by pw_make_v7)Baptiste Daroussin2015-06-071-3/+0
| | | | Notes: svn path=/head/; revision=284130
* In case of rename validate the length of the new nameBaptiste Daroussin2015-06-076-12/+49
| | | | | | | Check early that the new name fits MAXLOGNAME and store it in pwconf Notes: svn path=/head/; revision=284129
* Refactor input validationBaptiste Daroussin2015-06-075-103/+117
| | | | | | | | Mutualize code to validate inputs of both 'user' and 'group' command Test that the input name fits into MAXLOGNAME Notes: svn path=/head/; revision=284128
* witness: don't warn about matrix inconsistencies without holding the mutexMark Johnston2015-06-071-4/+13
| | | | | | | | | | | | | | | Lock order checking is done without the witness mutex held, so multiple threads that are racing to establish a new lock order may read matrix entries that are in an inconsistent state. Don't print a warning in this case, but instead just redo the check after taking the witness lock. Differential Revision: https://reviews.freebsd.org/D2713 Reviewed by: jhb MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=284127
* Finish converting -7 to pwconfBaptiste Daroussin2015-06-071-4/+3
| | | | Notes: svn path=/head/; revision=284126
* Add new USB quirk.Hans Petter Selasky2015-06-072-0/+2
| | | | | | | | PR: 200693 MFC after: 1 week Notes: svn path=/head/; revision=284125
* Handle -7 via gloval pwconfBaptiste Daroussin2015-06-073-6/+9
| | | | Notes: svn path=/head/; revision=284124
* Initialize conf using menset(3)Baptiste Daroussin2015-06-071-3/+1
| | | | Notes: svn path=/head/; revision=284123
* Handle pretty print (-P) via global pwconfBaptiste Daroussin2015-06-074-21/+18
| | | | Notes: svn path=/head/; revision=284122
* Handle dryrun (-N) via global pwconfBaptiste Daroussin2015-06-074-7/+11
| | | | Notes: svn path=/head/; revision=284121
* Sort headersBaptiste Daroussin2015-06-071-2/+2
| | | | Notes: svn path=/head/; revision=284120
* Handle -C and -Y locally and stop adding them to arglistBaptiste Daroussin2015-06-071-5/+15
| | | | Notes: svn path=/head/; revision=284119