Commit Graph

172857 Commits

Author SHA1 Message Date
Ed Schouten
21fe0af7aa Remove unneeded struct timezone.
We're only interested in a timestamp -- not the timezone.
2012-09-01 10:48:38 +00:00
Ed Schouten
4a8914c627 While there, remove an unneeded blank line.
MFC after:	1 month
2012-09-01 08:45:58 +00:00
Ed Schouten
ef42458103 Fix whitespace.
MFC after:	1 month
2012-09-01 08:45:19 +00:00
Rui Paulo
e04dfc407c Finish porting execsnoop to FreeBSD. This includes replacing the zonename
with a jail ID and removing the project ID from the list of options.
2012-09-01 08:14:21 +00:00
Rui Paulo
4685b7aabd The dtnfsclient module dependency should only be added if the old NFS
client support was compiled in.
2012-09-01 07:35:16 +00:00
Joel Dahl
77674f56a3 Minor mdoc fix. 2012-09-01 07:11:25 +00:00
Joel Dahl
b7d683e608 Remove trailing whitespace. 2012-09-01 06:23:13 +00:00
Joel Dahl
86006ccf73 Remove trailing whitespace. 2012-09-01 06:12:14 +00:00
Joel Dahl
6ef6e985ec Mdoc fixes. 2012-09-01 06:07:27 +00:00
Adrian Chadd
9c1b997551 Fix the PHY / CRC error bug in the AR5212 HAL, which apparently also pops
up on (at least) the AR5413.

The 30 second summary - if a CRC error frame comes in during PHY error
processing, that CRC bit will be set for all subsequent frames until
a non-CRC error frame is processed.

So to allow for accurate PHY error processing (Radar, and ANI on the AR5212
HAL chips) just tag the frame as being both CRC and PHY - let the driver
decide what to do with it.

PR:		kern/169362
2012-09-01 05:43:30 +00:00
Alan Cox
2d1f72d4b4 Introduce a new software PTE flag that indicates whether the mapping is
for a managed page.

Tested by:	jchandra
2012-09-01 03:46:28 +00:00
Pedro F. Giffuni
43981b6c53 Bring some changes from Bull's NFSv4 libtirpc implementation.
We especifically ignored the glibc compatibility changes
but this should help interaction with Solaris and Linux.
____

Fixed infinite loop in svc_run()
author	Steve Dickson
Tue, 10 Jun 2008 12:35:52 -0500 (13:35 -0400)
Fixed infinite loop in svc_run()
____

__rpc_taddr2uaddr_af() assumes the netbuf to always have a
non-zero data. This is a bad assumption and can lead to a
seg-fault. This patch adds a check for zero length and returns
NULL when found.
author	Steve Dickson
Mon, 27 Oct 2008 11:46:54 -0500 (12:46 -0400)
____

Changed clnt_spcreateerror() to return clearer
and more concise error messages.
author	Steve Dickson
Thu, 20 Nov 2008 08:55:31 -0500 (08:55 -0500)
____

Converted all uid and gid variables of the type uid_t and gid_t.
author	Steve Dickson
Wed, 28 Jan 2009 12:44:46 -0500 (12:44 -0500)
____

libtirpc: set r_netid and r_owner in __rpcb_findaddr_timed

These fields in the rpcbind GETADDR call are being passed uninitialized
to CLNT_CALL. In the case of x86_64 at least, this usually leads to a
segfault. On x86, it sometimes causes segfaults and other times causes
garbage to be sent on the wire.

rpcbind generally ignores the r_owner field for calls that come in over
the wire, so it really doesn't matter what we send in that slot. We just
need to send something. The reference implementation from Sun seems to
send a blank string. Have ours follow suit.
author	Jeff Layton
Fri, 13 Mar 2009 11:44:16 -0500 (12:44 -0400)
____

libtirpc: be sure to free cl_netid and cl_tp

When creating a client with clnt_tli_create, it uses strdup to copy
strings for these fields if nconf is passed in. clnt_dg_destroy frees
these strings already. Make sure clnt_vc_destroy frees them in the same
way.

author	Jeff Layton
Fri, 13 Mar 2009 11:47:36 -0500 (12:47 -0400)

Obtained from:	Bull GNU/Linux NFSv4 Project
MFC after:	3 weeks
2012-09-01 02:56:17 +00:00
Dimitry Andric
6a1fba3556 Fix a twelve year old bug in readelf: when process_dynamic_segment()
encounters a DT_RUNPATH entry, the global dynamic_info[] array is
overrun, causing some other global variable to be overwritten.

In my testcase, this was the section_headers variable, leading to
segfaults or jemalloc assertions when it was freed later on.

Thanks to Koop Mast for providing samples of a few "bad" .so files.

MFC after:	1 week
2012-08-31 23:28:41 +00:00
Ed Schouten
f66dc62abf Also relicense the ac(8) man page.
MFC after:	1 month
Discussed with:	Simon Gerraty and Chris Demetriou
2012-08-31 22:37:08 +00:00
Ed Schouten
e4e74ba352 Properly enable Clang-style atomics when available.
In addition to testing against cxx_atomic, we must check c_atomic. The
former is only set when building C++ code. Also use __has_extension
instead of __has_feature. This allows us to use the atomics outside of
C11.

Reported by:	Ariane van der Steldt <ariane stack nl>
PR:		threads/170073
2012-08-31 22:22:14 +00:00
Dimitry Andric
04b648fe23 Work around several warnings from clang in the xfs filesystem, when
linking it statically into the kernel.  With our gcc in base there are
no warnings, so also remove the WERROR= from the module makefile.

Noted by:	Eir Nym <eirnym@gmail.com>
MFC after:	1 week
2012-08-31 21:45:49 +00:00
Joel Dahl
8508578c7f Minor mdoc fixes. 2012-08-31 21:44:12 +00:00
John Baldwin
21056bd98b Similar to how r171350 fixed linking of kernel modules containing
firmware objects by adding --no-warn-mismatch to the linker flags,
add --no-warn-mismatch when linking firmware objects (*.fwo) as
well as to the link of the main kernel file.  This permits firmware
modules to be statically linked into an ia64 kernel.
2012-08-31 21:27:23 +00:00
John Baldwin
9c8a7771bb The implied source variable (.IMPSRC) didn't actually work in my previous
commit.  Change this to use .ALLSRC instead, but be careful to only use
the .fw file for NORMAL_FWO to ignore opt_global.h.
2012-08-31 21:10:38 +00:00
John Baldwin
3a45ae3c81 Add common rules for building firmware object files (NORMAL_FW to run
uudecode, and NORMAL_FWO to use ld to build the .fwo file) and use those
instead of explicit ld/uudecode invocations in sys/conf/files.  Apart from
increasing readability, this makes it possible to adjust the flags used for
firmware objects in one place.

MFC after:	2 weeks
2012-08-31 20:54:30 +00:00
Ed Schouten
8f67c5bc87 Relicense ac(8).
Though the license of the original ac(8) source code provides many
liberties, we are already somewhat violating it. The license requires us
to clearly comment any modifications to the source code, as the original
authors of course do not want to get bug reports for modified versions
of ac(8). This is something we have not done consistently.

The need for such a license clause has become less over time. It is very
unlikely that end users will contact the original authors, as the
copyright is from 1994. I contacted both the copyright holders. They
responded in a timely fashion and were more than willing to relicense it
to a 2-clause BSD license. To address any concerns about bug reports
going to the original authors instead of me, add my own name and email
address to the copyright statements as well.

MFC after:		1 month
Special thanks to:	Christopher Demetriou and Simon Gerraty
2012-08-31 18:26:39 +00:00
Joel Dahl
d56b30618d Mdoc fixes. 2012-08-31 17:18:41 +00:00
Joel Dahl
b47c28f3ba Remove trailing whitespace. 2012-08-31 16:57:16 +00:00
John Baldwin
6ce6b6c1d4 Add a -h flag similar to the -h flag for ln to force mv(1) to treat a
symbolic link to a directory for the target as a symbolic link instead of
a directory.  This makes it possible to atomically update a symbolic
link using rename().

Reviewed by:	gj
MFC after:	2 weeks
2012-08-31 14:35:01 +00:00
Marius Strobl
9e8100e77c Add a global MD macro for the VIS block size instead of duplicating
it and using magic values all over the place.

MFC after:	1 week
2012-08-31 11:15:01 +00:00
Scott Long
cfc0969ad4 Heavily optimize the case of small RX packets of 160 bytes or less. For
this case, allocate a plain mbuf and copy the frame into it, then send the
copy up the stack, leaving the original mbuf+cluster in place in the
receive ring for immediate re-use.  This saves a trip through 2 of the
3 zones of the compound mbuf allocator, a trip through busdma, and a trip
through the 1 of the 3 mbuf destructors.  For our load at Netflix, this can
lower CPU consumption by as much as 20%.  The copy algorithm is based on
investigative work from Luigi Rizzo earlier in the year.

Reviewed by:	jfv
Obtained from:	Netflix
2012-08-31 10:07:38 +00:00
Scott Long
6aedf62f32 Essentially revert r239912. The amr_periodic function hadn't been armed in
over 10 years and was dead code; the previous revision exposed it as such to
CLANG.  The solution is to cull the whole thing.
2012-08-31 09:42:46 +00:00
Ed Schouten
07df15dd9e Use better variable naming.
MFC after:	1 month
2012-08-31 08:48:53 +00:00
Alan Cox
059fb00f23 Replace all uses of the vm page queues lock by a r/w lock that is private
to this pmap.

Tested by:	Ian Lepore
2012-08-31 02:59:44 +00:00
Dag-Erling Smørgrav
d6c6eb82c0 The error syntax has changed. 2012-08-30 22:56:32 +00:00
Attilio Rao
d4a2ab8c07 Post r222812 KTR_CPUMASK started being initialized only as a tunable
handler and not more statically.

Unfortunately, it seems that this is not ideal for new platform bringup
and boot low level development (which needs ktr_cpumask to be effective
before tunables can be setup).

Because of this, add a way to statically initialize cpusets, by passing
an list of initializers, divided by commas. Also, provide a way to enforce
an all-set mask, for above mentioned initializers.

This imposes some differences on how KTR_CPUMASK is setup now as a
kernel option, and in particular this makes the words specifications
backward wrt. what is currently in -CURRENT. In order to avoid mismatches
between KTR_CPUMASK definition and other way to setup the mask
(tunable, sysctl) and to print it, change the ordering how
cpusetobj_print() and cpusetobj_scan() acquire the words belonging
to the set.
Please give a look to sys/conf/NOTES in order to understand how the
new format is supposed to work.

Also, ktr manpages will be updated shortly by gjb which volountereed
for this.

This patch won't be merged because it changes a POLA (at least
from the theoretical standpoint) and this is however a patch that
proves to be effective only in development environments.

Requested by:	rpaulo
Reviewed by:	jeff, rpaulo
2012-08-30 21:22:47 +00:00
Oleksandr Tymoshenko
1b1a53cf46 Add barebone Raspberry Pi port. Supported parts:
- Interrupts controller
  - Watchdog
  - System timer
  - Framebuffer (hardcoded resolution/bpp)
2012-08-30 20:59:37 +00:00
Oleksandr Tymoshenko
f70f23cc3e Add PrimeCell UART (PL011) driver
Obtained from:	Semihalf
2012-08-30 20:31:53 +00:00
John Baldwin
ec9a9cf1e0 Attach interrupt handlers during attach instead of during the first time
the interface is brought up.  Without this, the boot time interrupt
round-robin assignment does not think the allocated interrupt resources
are active and leaves them assigned to CPU 0.

While here, add descriptive tags to each interrupt handler when MSI-X
is used.

Reviewed by:	np
MFC after:	1 week
2012-08-30 17:47:39 +00:00
John Baldwin
28435fb7f6 Use callout(9) rather than timeout(9). Note that the periodic timer in
amr(4) is never started, so this should be even more of a NOP than
normal.
2012-08-30 17:37:01 +00:00
Adrian Chadd
c0bf0c307c The DIR-825 cal data is in an odd spot. I don't know why it's here.
(This works on my board because I wrote new caldata into this spot;
but this obviously won't work for stock DIR-825 units out there.)
2012-08-30 17:35:12 +00:00
Ed Schouten
b42c08d3c4 Massively refactor ac(8).
- Use queue(3) -- not some homegrown implementation of linked lists.
- Rename structures to _entry, as they are entries in the linked list --
  not the lists themselves.
- Don't store entire copies of struct utmpx in utmpx_entry, but only the
  members we're interested in. Large fields such as hostnames are not
  needed during the execution of the program.
- Give structure members useful names, instead of `name'.
- While there, use struct timevals instead of time_t's internally. This
  is not strictly useful, but while we're at it...
- Mark stuff static.
- Add missing const keywords.
- Remove unneeded prototypes.
- Remove workaround for sparc64-specific utmp problems. These don't
  apply to utmpx.
- Don't discard entries when timestamps are not monotone. This shouldn't
  ever happen with utmpx, but discarding them is a bit too harsh.
- Remove debug code. We nowadays have `getent utmpx', which can be used
  to analyze logfiles in depth.
- Use proper uppercasing/periods in comments.
- Print output of `ac -p' sorted alphabetically, instead of first
  occurrence.
- Properly check against pts/* instead of tty[PQRSpqrs]* to determine
  whether a TTY is a pseudo-terminal.

MFC after:	1 month
2012-08-30 16:45:27 +00:00
Hans Petter Selasky
710764f7c2 Preparations for adding USB HOST mode to the DWC OTG driver.
Merge register file with external one and put all register
definitions in a separate file.

Submitted by:	ray @
2012-08-30 16:19:05 +00:00
Alexander Motin
7d0ec9dd3f Add bunch of ATI HDMI HDA controller IDs.
Submitted by:	Dmitry Luhtionov <dmitryluhtionov@gmail.com>
MFC after:	1 week
2012-08-30 15:47:20 +00:00
Alexander Motin
49a4a59a54 Add IDs for JMicron JMB360/JMB362 AHCI SATA controllers.
MFC after:	1 week
2012-08-30 15:23:59 +00:00
John Baldwin
28b5187f44 Clarify that bus_dma does not stall future load requests once a load is
deferred.  The caller is required to enforce that if that is desired.

MFC after:	2 weeks
2012-08-30 14:44:30 +00:00
Gleb Smirnoff
3932d76033 In ifc_alloc_unit():
- In the !wildcard case, return ENOSPC instead of confusing EEXIST
  in case if ifc->ifc_maxunit reached.
- Fix unit leak, that I've introduced in previous revision.

Submitted by:	Daan Vreeken <Daan vitsch.nl>
2012-08-30 12:18:45 +00:00
Sergey Kandaurov
f2fbdacbf8 Remove a duplicated "thread". 2012-08-30 11:52:26 +00:00
Andrey Zonov
46448452c0 - Remove unused variables.
- Fix warnings about comparing signed and unsigned ints.

Approved by:	kib (mentor)
2012-08-30 08:54:13 +00:00
Andrey Zonov
193e2b5546 - It's also need to lock current memory.
Approved by:	kib (mentor)
MFC after:	1 week
2012-08-30 08:07:37 +00:00
Andrey Zonov
e145130e71 - Remove accounting of locked memory from vsunlock(9) that I missed in r239818.
Approved by:	kib (mentor)
2012-08-30 08:03:33 +00:00
Adrian Chadd
dae1b5d00a Migrate the AR9285 diversity configuration LNA configuration to use
some HAL definitions rather than local definitions.

The original source (ath9k) pulled this stuff from the QCA driver and
removed the HAL_* prefix.  I'm just restoring the correct order of things.

Obtained from:	Qualcomm Atheros
2012-08-30 06:55:47 +00:00
Jim Harris
a099c5cca0 Do not call sati_check_data_io() for SATI_UNMAP sequences.
This routine is intended only for commands such as INQUIRY where
the controller may fill out a smaller amount of data than allocated
by the host.

The end result of this bug was that isci(4) would report non-zero
resid for successful SCSI_UNMAP commands.

Sponsored by:	Intel
MFC after:	3 days
2012-08-30 00:43:14 +00:00
Adrian Chadd
5a7bc717f0 More attempts at space saving.
* add cam as a module to build - but build in scbus/da for now, as
  "cam" as a module includes all cam devices. Hardly space saving.
* Don't build FFS snapshot support.
2012-08-29 22:58:52 +00:00
Adrian Chadd
d4898ce666 Do a bunch of fixing and refactoring.
Fix up gzip to crunch right.

Add kenv, although I'm not yet sure why it isn't working on my MIPS
boards (reading kenv always returns blank.)
2012-08-29 22:55:50 +00:00