Commit Graph

205114 Commits

Author SHA1 Message Date
bapt
cf139e2b7a Update mandoc to 1.13.2 2014-12-25 21:56:56 +00:00
pfg
f9a4136de0 patch: Bring in xstrdup and use it when appropriate.
The function savestr allows NULL return values during Plan A patching so in
case of out of memory conditions, Plan B can step in.  In many cases, NULL
value is not properly handled, so use xstrdup here (it's outside Plan A/B
patching, which means that even Plan B relies on successful operations).

Clean up some whitespaces while here

Obtained from:	OpenBSD
MFC after:	2 weeks
2014-12-25 21:51:28 +00:00
bapt
e28888b1f6 Import mandoc 1.13.2 2014-12-25 21:33:25 +00:00
ae
a5140616af Extern declarations in C files loses compile-time checking that
the functions' calls match their definitions. Move them to header files.

Reviewed by:	jilles (previous version)
2014-12-25 21:32:37 +00:00
phk
92a41d31d4 Deorbit the IEEE-488/GPIB support. 2014-12-25 20:15:13 +00:00
ian
dbb24e5ab9 Define only the CP15 register operations that are valid for the architecture.
Submitted by: Svatopluk Kraus <onwahe@gmail.com>,
              Michal Meloun <meloun@miracle.cz
2014-12-25 19:22:02 +00:00
ian
bb5aaad6a9 Add macros for asm barrier instructions with arch-specific implementations. 2014-12-25 19:08:39 +00:00
phk
ac5b1bdf71 Create the PKG_DIR if it is missing 2014-12-25 17:54:22 +00:00
alfred
b0cbc2ddd0 Fix OLD_LIBS for libxo moved to /lib
Pointed out by: kib
2014-12-25 17:53:43 +00:00
phk
17ba4d442c Use compiled in default keymaps which are available both in syscons and vt. 2014-12-25 17:50:04 +00:00
loos
33bb6f5b7f Add interrupt support for GPIO pins on OMAP4 and AM335x.
This enables the use of GPIO pins as interrupt sources for kernel devices
directly attached to gpiobus (userland notification will be added soon).

The use of gpio interrupts for other kernel devices will be possible when
intrng is complete.

All GPIO pins can be set to trigger on:

- active-low;
- active-high;
- rising edge;
- falling edge.

Tested on:	Beaglebone-black
2014-12-25 17:28:26 +00:00
ian
cb33ab8e9b For data and instruction prefetch aborts, call the same handler in the C
code, passing a 0/1 flag that indicates which type of abort it was.  This
sets the stage for unifying the handling of page faults in a single routine.

Submitted by: Svatopluk Kraus <onwahe@gmail.com>,
	      Michal Meloun <meloun@miracle.cz
2014-12-25 17:06:58 +00:00
ian
f01f71f3bd Create 'L' variants of all the ENTRY macros for file-static/local symbols.
If it seems like this is getting out of hand, I quite agree.  I wonder if
it's safe, here in the 21st century, to lose the distinction between C and
ASM symbols?
2014-12-25 16:49:33 +00:00
ian
3a37d3e11d Fix the GLOBAL macro so it works (upper vs lowercase X), use it in _EENTRY. 2014-12-25 16:43:15 +00:00
ian
9f817fa053 Stylish changes... put tabs where they need to be in macros, move lines
around so that related things are more grouped together, rewrite comments.

No functional changes, this is all so that the functional changes in the
next commit will stand out.
2014-12-25 16:36:02 +00:00
kevlo
6df4ee7c40 Replace CC_VAR with CCV, since the CC_VAR macro doesn't exist.
While here, add MLINK for CCV.9 and DECLARE_CC_MODULE.9.
2014-12-25 15:17:57 +00:00
rmacklem
ada0161b9f Fix the comment introduced in r276192 so that it clearly
states that the change is needed to avoid a deadlock.

Suggested by:	kib
MFC after:	1 week
2014-12-25 14:44:04 +00:00
ae
7d079a2d8e Fix VIMAGE build. 2014-12-25 13:38:51 +00:00
ian
87fbfdba80 Remove _PROF_PROLOGUE from the EENTRY() macros. These macros define
'extra' entry points which are nested within or provide a synonym name
for another function.  It's most likely not safe to be messing with the
IP and LR registers at anything other than the primary entry point to a
function.  Anywhere beyond initial function entry, those registers may
be in use as scratch or variable registers.
2014-12-25 04:41:43 +00:00
ian
9f04c20ac7 Oops, I fumbled a semicolon on the style changes; recover it. 2014-12-25 04:18:31 +00:00
ian
13654733b0 Change the style of the DO_AST macro to match the others in this file --
semicolons between the code and comments instead of after the comments,
and line continuations in the arbitrary but now consistant column 76.

No functional changes.
2014-12-25 03:41:56 +00:00
alfred
e257fca333 Move libxo to /lib
Update ObsoleteFiles to reflect libxo move.

Reviewed by: ngie
Differential Revision: https://reviews.freebsd.org/D1370
2014-12-25 03:15:56 +00:00
smh
b61b2d2e42 Prevent zpool upgrade failing due to unavailable pools
Prior to this fix "zpool upgrade" and "zpool upgrade -a" would fail due to
an assert when operating on unavailable pools.

We now print a warning to stderr but allow the processing of other pools
to procesed.

MFC after:	1 month
2014-12-25 02:17:17 +00:00
rmacklem
5309296f87 A deadlock in the NFSv4 server with vfs.nfsd.enable_locallocks=1
was reported via email. This was caused by a LOR between the
sleep lock used to serialize the local locking (nfsrv_locklf())
and locking the vnode. I believe this patch fixes the problem
by delaying relocking of the vnode until the sleep lock is
unlocked (nfsrv_unlocklf()). To avoid nfsvno_advlock() having the side
effect of unlocking the vnode, unlocking the vnode was moved to before
the functions that call nfsvno_advlock().
It shouldn't affect the execution of the default case where
vfs.nfsd.enable_locallocks=0.

Reported by:	loic.blot@unix-experience.fr
Discussed with:	kib
MFC after:	1 week
2014-12-25 01:55:17 +00:00
rmacklem
dac4c84940 Modify vop_stdadvlock{async}() so that it only
locks/unlocks the vnode and does a VOP_GETATTR()
for the SEEK_END case. This is safe to do, since
lf_advlock{async}() only uses the size argument
for the SEEK_END case.
The NFSv4 server needs this when
vfs.nfsd.enable_locallocks!=0 since locking the
vnode results in a LOR that can cause a deadlock
for the nfsd threads.

Reviewed by:	kib
MFC after:	1 week
2014-12-24 22:58:08 +00:00
ian
56ba75b822 Display the correct value for cache Level of Coherency. Like the other
levels being displayed here, its value needs a +1 adjustment.
2014-12-24 19:47:50 +00:00
ian
bd1ca6b379 Cleanup up ARM *frame structures...
- Eliminate unused irqframe
 - Eliminate unused saframe
 - Instead of splitting r4-sp storage between the stack and switchframe,
   just put all the registers in switchframe and eliminate the un_32 struct.

Submitted by:	Svatopluk Kraus <onwahe@gmail.com>,
		Michal Meloun <meloun@miracle.cz>
2014-12-24 18:54:31 +00:00
emaste
3c6d556e12 Build gperf before gcc
The ARM image builds build the in-tree gcc in order to build u-boot
and gperf is needed to build gcc, but is no longer installed on archs
that use clang.

Invoking the make targets as separate steps is done to work around
a build failure which is not yet fully understood.

Reviewed by:	gjb, imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1317
2014-12-24 18:51:25 +00:00
ae
84b82e8873 Rename ip4_def_policy variable to def_policy. It is used by both IPv4 and
IPv6. Initialize it only once in def_policy_init(). Remove its
initialization from key_init() and make it static.

Remove several fields from struct secpolicy:
* lock - it isn't so useful having mutex in the structure, but the only
  thing we do with it is initialization and destroying.
* state - it has only two values - DEAD and ALIVE. Instead of take a lock
  and change the state to DEAD, then take lock again in GC function and
  delete policy from the chain - keep in the chain only ALIVE policies.
* scangen - it was used in GC function to protect from sending several
  SADB_SPDEXPIRE messages for one SPD entry. Now we don't keep DEAD entries
  in the chain and there is no need to have scangen variable.

Use TAILQ to implement SPD entries chain. Use rmlock to protect access
to SPD entries chain. Protect all SP lookup with RLOCK, and use WLOCK
when we are inserting (or removing) SP entry in the chain.

Instead of using pattern "LOCK(); refcnt++; UNLOCK();", use refcount(9)
API to implement refcounting in SPD. Merge code from key_delsp() and
_key_delsp() into _key_freesp(). And use KEY_FREESP() macro in all cases
when we want to release reference or just delete SP entry.

Obtained from:	Yandex LLC
Sponsored by:	Yandex LLC
2014-12-24 18:34:56 +00:00
ian
fdf0d9eb06 Eliminate unnecessary references to pte.h internals by using the standard
pmap_kenter_temporary() to map pages while dumping.

Submitted by:	Svatopluk Kraus <onwahe@gmail.com>,
		Michal Meloun <meloun@miracle.cz>
2014-12-24 17:12:51 +00:00
andrew
23dcfe5ff8 Rename pic_ipi_get to pic_ipi_read for intrng. 2014-12-24 15:25:18 +00:00
bofh
7a8cf9f70a Fix missing \n in committers-ports.dot while adding myself
Differential Revision:	https://reviews.freebsd.org/D1365
Submitted by:	danfe
Approved by:	bapt(mentor)
2014-12-24 13:25:22 +00:00
andrew
d3612ba11b Switch i.MX to use the platform code to help with a single Freescale kernel.
Differential Revision:	https://reviews.freebsd.org/D1349
Reviewed by:	ian, rpaulo
2014-12-24 12:26:43 +00:00
ed
2ee805f46e Clarify to explain that C99 conforming compilers don't need CMPLX*().
Discussed with: kargl@
2014-12-24 10:13:53 +00:00
bofh
6671ba9b2c Update Mentor and Mentee Information (bofh)
Differential Revision:	https://reviews.freebsd.org/D1363
Reviewed by:	bapt
Approved by:	bapt
2014-12-24 09:25:16 +00:00
scottl
99c6362019 Fix tunable and sysctl handling of the fail_on_task_timeout knob.
Reviewed by:	emax
Obtained from:	Netflix, Inc.
MFC after:	3 days
2014-12-24 07:04:04 +00:00
loos
065d16fc26 Bring in the last round of updates before adding the interrupt support.
Fix the following issues:

- Removed revision from device softc, it isn't used anywhere else out of
  device attach routine;

- Move the duplicated code for verification of valid banks (and pins) to
  a single function;

- Use some macros to simplify the handling of some constants;

- Update some stale comments.
2014-12-24 04:24:08 +00:00
imp
6658f63889 Add Intel vendor ID to the device table to make it more uniform so
that all the pnp info to match the device is in the fxp_ident_table.
2014-12-24 03:49:33 +00:00
loos
c08d4c8760 Improves the GPIO API description a little bit.
gpio_pin_max must return the maximum supported pin number and not the total
number of pins on the system.

PR:		157070
Submitted by:	brix
2014-12-24 03:24:50 +00:00
ian
0a95065599 Revert a glitched mismerge that got caught up in the prior commit.
The PJ4B family is still armv7, not armv6.
2014-12-24 03:09:55 +00:00
ian
d8272d0a83 Define the old-school arm arch constants we still use internally based on
the somewhat newer constants predefined by the compiler.  This will allow
userland apps to use various machine/foo.h headers without CPUTYPE defined.
2014-12-24 03:02:12 +00:00
smh
c2b9de7894 Allow info to display correctly in for varying tabstop settings
The SAMPLE message and notes where tab seperated for some parts and hence
displayed incorrectly unless tabstop was set to 8. Switch to spaces to it
displays correctly independent of the tabstop setting.

Sponsored by:	Multiplay
2014-12-24 01:50:44 +00:00
ian
50207a4516 Don't assume required FDT properties are present. 2014-12-24 01:19:11 +00:00
ian
f885269f67 Revert r276101, it didn't fix the problem and causes a compile error
(nested comment blocks).
2014-12-24 01:10:53 +00:00
ae
d6158111f9 Remove if_stf.h. It contains only one function declaration used by if_stf(4).
Also make in_stf_protosw structure static.
2014-12-23 20:54:59 +00:00
loos
3f6045f508 Do not return the total number of available pins but the maximum pin number
we can cope.

Previously the returned value could prevent access to some of the pins.
2014-12-23 19:31:56 +00:00
adrian
18735ee573 Bump the valid GPIO range for rfkill up from 8 to 16.
AR5416 and later NICs have more than 8 (Well, more than 6) GPIO pins.
So to support rfkill on these NICs we need to bump this up or the
rfkill GPIO pin may get reset to the wrong value.

Noticed by: Anthony Jenkins <scoobi_doo@yahoo.com>
2014-12-23 18:48:45 +00:00
ae
aec9c75c1b Remove in_gif.h and in6_gif.h files. They only contain function
declarations used by gif(4). Instead declare these functions in C files.
Also make some variables static.
2014-12-23 16:17:37 +00:00
emaste
42dfcce67a Update comment: only one file in the FAT file system EFI boot image
Sponsored by:	The FreeBSD Foundation
2014-12-23 16:00:25 +00:00
emaste
c2a20050e7 Use explicit --output-target to set EFI file format
According to objcopy(1) --target is for use where the input and output
formats are the same ("no translation"). In practice it does detect the
input format in any case, but be explicit that we're specifying the
output format as we are translating from ELF to EFI PE format.

Sponsored by:	The FreeBSD Foundation
2014-12-23 15:58:45 +00:00