195921 Commits

Author SHA1 Message Date
marcel
0fa78ab121 MFC r257477: Purge the translation cache of APs before we unleash them. 2014-07-02 22:06:31 +00:00
marcel
ccea0f0fb7 MFC 257475: Respect the kern.smp.disabled tunable. 2014-07-02 21:53:34 +00:00
dteske
4f317bd085 MFC r267680:
Fix a code typo that prevented mkdir from firing (unnoticed
usually because another part of the code succeeded in making
the same directory).
2014-07-02 19:25:25 +00:00
truckman
eca942517b MFC r266814
Initialize r_flags the same way in all cases using a sanitized copy of
flags that has several bits cleared. The RF_WANTED and RF_FIRSTSHARE
bits are invalid in this context, and we want to defer setting RF_ACTIVE
in r_flags until later.  This should make rman_get_flags() return
the correct answer in all cases.

Add a KASSERT() to catch callers which incorrectly pass the RF_WANTED
or RF_FIRSTSHARE flags.

Do a strict equality check on the share type bits of flags.  In
particular, do an equality check on RF_PREFETCHABLE.  The previous
code would allow one type of mismatch of RF_PREFETCHABLE but disallow
the other type of mismatch.  Also, ignore the the RF_ALIGNMENT_MASK
bits since alignment validity should be handled by the amask check.
This field contains an integer value, but previous code did a strange
bitwise comparison on it.

Leave the original value of flags unmolested as a minor debug aid.

Change the start+amask overflow check to a KASSERT() since it is just
meant to catch a highly unlikely programming error in the caller.

Reviewed by:	jhb
2014-07-02 17:32:43 +00:00
marcel
a33844e926 MFC mkimg(1) -- revisions 268159, 268134, 266556, 266514, 266513,
266512, 266511, 266510, 266509, 266176, 265468, 265467,
	265462, 265170, 263926, 263924, 263923, 263919 and 263918.

Revision 267182 changed mkimg.1 alongside other unrelated manpages.
The change to mkimg.1 has been applied without registering a merge
of the revision. This allows a future merge of r267182 to happen.

Relnotes: yes
2014-07-02 14:54:41 +00:00
kib
62024097ea MFC r267651 (by attilio):
Add the possibility to specify ecx when performing cpuid calls.

MFC r267673:
Restore the ABI of the cpuctl(4) ioctl request CPUCTL_CPUID.

MFC r267814:
Make cpuctl_do_cpuid() and cpuctl_do_cpuid_count() return void.
2014-07-02 13:09:26 +00:00
ume
7c0a428b0d MFC r267871: Introduce $RA_SERVER to set default whois server.
Requested by:	nork
Reviewed by:	nork
2014-07-02 11:49:15 +00:00
mav
712f53c0c4 MFC r267516i (by joel):
mdoc: add missing width to Bl -tag.
2014-07-02 10:49:06 +00:00
mav
cdc0d0159f MFC r267506:
Document additional LUN/backend options.
2014-07-02 10:48:06 +00:00
mav
2019810069 MFC r267537:
Add support for VERIFY(10/12/16) and COMPARE AND WRITE SCSI commands.

Make data_submit backends method support not only read and write requests,
but also two new ones: verify and compare.  Verify just checks readability
of the data in specified location without transferring them outside.
Compare reads the specified data and compares them to received data,
returning error if they are different.

VERIFY(10/12/16) commands request either verify or compare from backend,
depending on BYTCHK CDB field.  COMPARE AND WRITE command executed in two
stages: first it requests compare, and then, if succeesed, requests write.
Atomicity of operation is guarantied by CTL request ordering code.

Sponsored by:	iXsystems, Inc.
2014-07-02 10:45:31 +00:00
mav
ada40bacc7 MFC r267519:
Make backends track completion by processed number of sectors instead of
total transfer size.

Commands such as VERIFY or COMPARE AND WRITE may have transfer size not
matching directly to number of sectors.
2014-07-02 10:43:53 +00:00
mav
15c36a3817 MFC r267515:
Remove memcpy() from ctl_private[] accesses.

That union is aligned enough to access data directly.
2014-07-02 10:42:43 +00:00
mav
27197291fa MFC r267514:
Move kern_total_len setting from backend to core code.
2014-07-02 10:41:11 +00:00
mav
cf9ef68328 MFC r267500:
Format Portal Group Tag same as istgt does -- %4.4x instead of %x.

SPC-4 spec tells it should be "two or more hexadecimal digits".
RFC3720 tells it is 16-bit value.
2014-07-02 10:39:45 +00:00
mav
9389599de5 MFC r267499:
Remove custom processing for "file" option.
2014-07-02 10:38:22 +00:00
mav
eeaafb7fba MFC r267496, r267498:
Add "vendor", "product" and "revision" options to control inquiry data.
2014-07-02 10:37:22 +00:00
mav
a615b5284a MFC r267485:
Remove non-functional remnants of control LUN -- 18MB of RAM for nothing.
2014-07-02 10:36:04 +00:00
mav
a7e3ab1dac MFC r267481, r267952:
Implement small KPI to access LUN options instead doing it by hands.
2014-07-02 10:35:06 +00:00
mav
f77bfe41e2 MFC r265323 (by trasz):
Provide better descriptions for 'struct ctl_scsiio' fields; based mostly
on emails from ken@.
2014-07-02 10:32:44 +00:00
mav
9922777340 MFC r267872:
Allow to use iSCSI immediate data by several ctl_datamove() calls.

While for FreeBSD client that is only a minor optimization, VMWare client
doesn't support additional data requests after all data being sent once as
immediate.
2014-07-02 10:20:08 +00:00
mav
2b0cbbb52b MFC r267606:
On discovery stage add set of TargetAddress keys to reply, reporting to
the client all the portal groups addresses and ports.
2014-07-02 10:18:42 +00:00
mav
927a52fbbf MFC r266981:
Overhaul CAM SG driver IOCTL interfaces.

Make it really work for native FreeBSD programs.  Before this it was broken
for years due to different number of pointer dereferences in Linux and
FreeBSD IOCTL paths, permanently returning errors to FreeBSD programs.
This change breaks the driver FreeBSD IOCTL ABI, making it more strict,
but since it was not working any way -- who bother.

Add shims for 32-bit programs on 64-bit host, translating the argument
of the SG_IO IOCTL for both FreeBSD and Linux ABIs.

With this change I was able to run 32-bit Linux sg3_utils tools and simple
32 and 64-bit FreeBSD test tools on both 32 and 64-bit FreeBSD systems.
2014-07-02 10:16:12 +00:00
pfg
d0f1ea0d9e MVC r268014:
Reduce some warnings in the Solaris unicode support.

Clean some warnings from parenthesis and minor style issues.
2014-07-02 01:28:38 +00:00
jhb
c5faaaf9d0 MFC 266322,266323:
- Use 'RESOURCE' instead of the more generic 'TYPE' for the resource name
  column header when displaying resource usage.  This more closely matches
  other procstat displays.
- Add descriptions of the display formats for -e, -l, -r, and -x.  Fix a few
  typos in indent settings while here.
2014-07-01 18:23:00 +00:00
delphij
d060b29544 MFC r267372-267374: fix various misimplementation of instructions.
Submitted by:	Wolf Ramovsky <wolf.ramovsky gmail.com>
2014-07-01 15:55:41 +00:00
delphij
efafd0ece4 MFC r267493:
Fix two issues:

 - Check for rc.d directory's existence before traversing
   it;
 - Don't output * when rc.d directory is empty.

PR:		bin/190665
Submitted by:	Oleg Ginzburg <olevole olevole ru> (with changes)
2014-07-01 15:50:34 +00:00
ae
b6530ab0a7 MFC r267355:
Add UUIDs for DragonFlyBSD's partition types.

MFC r267356:
  Add DragonFlyBSD's Hammer FS types and type names.

MFC r267357:
  Add aliases for DragonFlyBSD's partition types.

MFC r267358:
  Allow dumping to DragonFlyBSD's swap partition.

MFC r267359:
  Add disklabel64 support to GEOM_PART class.

  This partitioning scheme is used in DragonFlyBSD. It is similar to
  BSD disklabel, but has the following improvements:
  * metadata has own dedicated place and isn't accessible through partitions;
  * all offsets are 64-bit;
  * supports 16 partitions by default (has reserved place for more);
  * has reserved place for backup label (but not yet implemented);
  * has UUIDs for partitions and partition types;

MFC r267360:
  Add disklabel64 support

Relnotes:	yes
2014-07-01 13:29:17 +00:00
scottl
a79b0da86b Merge r265463:
Due to reasons unknown at this time, the system can be forced to write
 a journal block even when there are no journal entries to be written.
 Until the root cause is found, handle this case by ensuring that a
 valid journal segment is always written.

 Second, the data buffer used for writing journal entries was never
 being scrubbed of old data.  Fix this.

Submitted by:	Takehara Mikihito
Obtained from:	Netflix, Inc.
2014-07-01 06:59:23 +00:00
scottl
d13d12a6a2 Merge r266746, 266775:
Now that there are separate back-end implementations of busdma, the bounce
 implementation shouldn't steal flags from the common front-end.
 Move those flags to the back-end.

 Eliminate the fake contig_dmamap and replace it with a new flag,
 BUS_DMA_KMEM_ALLOC.  They serve the same purpose, but using the flag
 means that the map can be NULL again, which in turn enables significant
 optimizations for the common case of no bouncing.

Obtained from:	Netflix, Inc.
2014-07-01 06:50:35 +00:00
scottl
c80125f577 Merge r268024, 268025:
Fix a case in ndling ATA_PASSTHROUGH commands that have an unaligned buffer.
 This impacts some home-rolled SMART tools.

 In rare cases, a SATA drive can stop responding to commands and trigger a
 reset device task request from the driver.  If the drive fails to respond
 with a signature FIS, the driver would previously get into an endless retry
 loop, stalling all I/O to the drive and keeping user processes stranded.
 Instead, fail the i/o and invalidate the device if the task management
 command times out.  This is controllable with the sysctl and tunable
 hw.isci.fail_on_task_timeout
 dev.isci.0.fail_on_task_timeout

 The default for these is 1.

Obtained from:	Netflix, Inc.
2014-07-01 06:23:48 +00:00
dim
c4c1c28548 MFC r267981:
Pull in r211627 from upstream llvm trunk (by Bill Schmidt):

  [PPC64] Fix PR20071 (fctiduz generated for targets lacking that
  instruction)

  PR20071 identifies a problem in PowerPC's fast-isel implementation
  for floating-point conversion to integer.  The fctiduz instruction
  was added in Power ISA 2.06 (i.e., Power7 and later).  However, this
  instruction is being generated regardless of which 64-bit PowerPC
  target is selected.

  The intent is for fast-isel to punt to DAG selection when this
  instruction is not available.  This patch implements that change.
  For testing purposes, the existing fast-isel-conversion.ll test adds
  a RUN line for -mcpu=970 and tests for the expected code generation.
  Additionally, the existing test fast-isel-conversion-p5.ll was found
  to be incorrectly expecting the unavailable instruction to be
  generated.  I've removed these test variants since we have adequate
  coverage in fast-isel-conversion.ll.

This is needed to compile clang with debug+asserts on older powerpc64
and ppc970 targets.

Requested by:	jhibbits

MFC r267982:

Add the llvm patch for r267981.

MFC r268003:

Fix breakage after r267981.

Pointy hat to:	dim
2014-06-30 20:26:30 +00:00
trociny
7731895692 MFC r267336:
PF_BLUETOOTH protocols: skip initialization of non-virtualized globals
for non-default VNET instances.

This fixes panic on a vnet initialization when ng_btsocket is loaded.
2014-06-30 19:46:17 +00:00
ume
25106b27c6 MFC r267801: Make nd6_gctimer tunable. 2014-06-30 16:56:12 +00:00
ume
1af4339c2a MFC r267800:
Exclude IPv4 address from doing longest match.
It prevented DNS based load balancing.
2014-06-30 16:53:12 +00:00
delphij
ab99acf70d MFC r267378:
Fix path for zlib examples, this have no runtime effect and was
overlooked when I was doing zlib update.
2014-06-30 16:31:28 +00:00
delphij
6d7456de07 MFC r267839:
Apply vendor fixes for big endian support and 20GBps/25GBps link speeds.

Many thanks to Emulex for their continued support of FreeBSD!

Submitted by: Venkata Duvvuru <VenkatKumar.Duvvuru Emulex.Com>
2014-06-30 16:23:31 +00:00
pfg
99efb6c39e MFC r267627:
strptime: add support for %t and %n

Posix strptime() requires support for %t and %n, which were added
to the illumos port.  Curiously we were skipping white spaces by
default in most other cases making %t meaningless.

We now skip spaces in the case of the %e specifier as strftime(3)
explicitly adds a space for the single digit case.

Reference:
http://pubs.opengroup.org/onlinepubs/009695399/functions/strptime.html

PR:		173421
Obtained from:	Illumos (Rev. a11c1571b6942161b0186d0588609448066892c2)
2014-06-30 14:52:40 +00:00
marius
618ac05759 MFC: r267978
In order to get vt(4) a bit closer to the feature set provided by sc(4),
implement options TERMINAL_{KERN,NORM}_ATTR. These are aliased to
SC_{KERNEL_CONS,NORM}_ATTR and like these latter, allow to change the
default colors of normal and kernel text respectively.
Note on the naming: Although affecting the output of vt(4), technically
kern/subr_terminal.c is primarily concerned with changing default colors
so it would be inconsistent to term these options VT_{KERN,NORM}_ATTR.
Actually, if the architecture and abstraction of terminal+teken+vt would
be perfect, dev/vt/* wouldn't be touched by this commit at all.

Reviewed by:	emaste
Sponsored by:	Bally Wulff Games & Entertainment GmbH
2014-06-30 09:59:23 +00:00
kib
fa72c237e4 MFC r267854:
Add fpu_kern.9 man page to the install.
2014-06-30 09:55:29 +00:00
kib
82a0e5601a MFC r267768:
Add documentation for the fpu_kern(9) interfaces.

MFC r267785 (by brueffer):
Several small fixes.
2014-06-30 09:54:08 +00:00
kib
fe2a5b067d MFC r267815:
Put the aesni_cipher_setup() and aesni_cipher_process() functions into
the file which is compiled with SSE disabled.
2014-06-30 09:51:27 +00:00
kib
d02ef38799 MFC r267767:
Add FPU_KERN_KTHR flag to fpu_kern_enter(9).
Apply the flag to padlock(4) and aesni(4).
In aesni_cipher_process(), do not leak FPU context state on error.
2014-06-30 09:48:44 +00:00
marius
ff62446f90 MFC: r267967, r267968
- SC_NO_SYSMOUSE isn't currently supported by vt(4), so nuke it from vt.4.
- vt_vga(4) is a driver rather than a function so reference it accordingly.
- Uncomment HISTORY section given that vt(4) will first appear in 9.3.

Reviewed by:	emaste (modulo last part)
Sponsored by:	Bally Wulff Games & Entertainment GmbH
2014-06-30 09:38:14 +00:00
pfg
c41deb4cc8 MFC r267692, r267703:
Add -u (unbuffered output) after GNU sed.

Obtained from:	NetBSD
2014-06-29 18:54:41 +00:00
kib
fa905b5ead MFC r267491:
Use vn_io_fault for the writes from core dumping code.
2014-06-29 07:02:47 +00:00
bryanv
89702dd4fb MFC r267661, r267662, r267663:
- Remove an unnecessary kick of the host at the end of transmitting
  - Handle multiple calls to rxq_eof for single packet completion
  - Increment the pending packets more aggressively for TSO
2014-06-29 00:50:56 +00:00
bryanv
a672dfd83f MFC r267520, r267521, r267522, r267523, r267524:
- Remove two write-only local variables
  - Remove unused element in the vtnet_rxq structure
  - Remove kernel specific macro out of the VirtIO PCI header file
  - Move the VIRTIO_RING_F_* defines out of virtqueue.h into
    virtio_config.h
  - Make the feature negotiation code easier to follow
  - Force two byte alignment for all control message headers
2014-06-29 00:37:59 +00:00
jhb
7a51d55007 MFC 267647:
Trust the state of a power resource that we get from a working _STA method
instead of trying to cache it.
2014-06-27 20:57:12 +00:00
jhb
6af57d4a5e MFC 267291:
Use strcasecmp() instead of strcmp() when checking user-supplied encoding
names so that encoding names are treated as case-insensitive.  This allows
the use of 'utf-8' instead of 'UTF-8' for example and matches the behavior
of iconv(1).

PR:		167977
2014-06-27 20:39:45 +00:00
jhb
ef9a2f4c5e MFC 266293:
- Add support for dumping current resource usage for processes via a new -r
  flag to procstat.
- Add an -H flag to request information about threads rather than processes
  when dumping statistics.  Currently it is only used for -r to display
  resource usage for individual threads instead of the entire process.
2014-06-27 20:34:22 +00:00