]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 years agoFix the GLOBAL macro so it works (upper vs lowercase X), use it in _EENTRY.
ian [Thu, 25 Dec 2014 16:43:15 +0000 (16:43 +0000)]
Fix the GLOBAL macro so it works (upper vs lowercase X), use it in _EENTRY.

9 years agoStylish changes... put tabs where they need to be in macros, move lines
ian [Thu, 25 Dec 2014 16:36:02 +0000 (16:36 +0000)]
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.

9 years agoReplace CC_VAR with CCV, since the CC_VAR macro doesn't exist.
kevlo [Thu, 25 Dec 2014 15:17:57 +0000 (15:17 +0000)]
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.

9 years agoFix the comment introduced in r276192 so that it clearly
rmacklem [Thu, 25 Dec 2014 14:44:04 +0000 (14:44 +0000)]
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

9 years agoFix VIMAGE build.
ae [Thu, 25 Dec 2014 13:38:51 +0000 (13:38 +0000)]
Fix VIMAGE build.

9 years agoRemove _PROF_PROLOGUE from the EENTRY() macros. These macros define
ian [Thu, 25 Dec 2014 04:41:43 +0000 (04:41 +0000)]
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.

9 years agoOops, I fumbled a semicolon on the style changes; recover it.
ian [Thu, 25 Dec 2014 04:18:31 +0000 (04:18 +0000)]
Oops, I fumbled a semicolon on the style changes; recover it.

9 years agoChange the style of the DO_AST macro to match the others in this file --
ian [Thu, 25 Dec 2014 03:41:56 +0000 (03:41 +0000)]
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.

9 years agoMove libxo to /lib
alfred [Thu, 25 Dec 2014 03:15:56 +0000 (03:15 +0000)]
Move libxo to /lib

Update ObsoleteFiles to reflect libxo move.

Reviewed by: ngie
Differential Revision: https://reviews.freebsd.org/D1370

9 years agoPrevent zpool upgrade failing due to unavailable pools
smh [Thu, 25 Dec 2014 02:17:17 +0000 (02:17 +0000)]
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

9 years agoA deadlock in the NFSv4 server with vfs.nfsd.enable_locallocks=1
rmacklem [Thu, 25 Dec 2014 01:55:17 +0000 (01:55 +0000)]
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

9 years agoModify vop_stdadvlock{async}() so that it only
rmacklem [Wed, 24 Dec 2014 22:58:08 +0000 (22:58 +0000)]
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

9 years agoDisplay the correct value for cache Level of Coherency. Like the other
ian [Wed, 24 Dec 2014 19:47:50 +0000 (19:47 +0000)]
Display the correct value for cache Level of Coherency.  Like the other
levels being displayed here, its value needs a +1 adjustment.

9 years agoCleanup up ARM *frame structures...
ian [Wed, 24 Dec 2014 18:54:31 +0000 (18:54 +0000)]
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>

9 years agoBuild gperf before gcc
emaste [Wed, 24 Dec 2014 18:51:25 +0000 (18:51 +0000)]
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

9 years agoRename ip4_def_policy variable to def_policy. It is used by both IPv4 and
ae [Wed, 24 Dec 2014 18:34:56 +0000 (18:34 +0000)]
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

9 years agoEliminate unnecessary references to pte.h internals by using the standard
ian [Wed, 24 Dec 2014 17:12:51 +0000 (17:12 +0000)]
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>

9 years agoRename pic_ipi_get to pic_ipi_read for intrng.
andrew [Wed, 24 Dec 2014 15:25:18 +0000 (15:25 +0000)]
Rename pic_ipi_get to pic_ipi_read for intrng.

9 years agoFix missing \n in committers-ports.dot while adding myself
bofh [Wed, 24 Dec 2014 13:25:22 +0000 (13:25 +0000)]
Fix missing \n in committers-ports.dot while adding myself

Differential Revision: https://reviews.freebsd.org/D1365
Submitted by: danfe
Approved by: bapt(mentor)

9 years agoSwitch i.MX to use the platform code to help with a single Freescale kernel.
andrew [Wed, 24 Dec 2014 12:26:43 +0000 (12:26 +0000)]
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

9 years agoClarify to explain that C99 conforming compilers don't need CMPLX*().
ed [Wed, 24 Dec 2014 10:13:53 +0000 (10:13 +0000)]
Clarify to explain that C99 conforming compilers don't need CMPLX*().

Discussed with: kargl@

9 years agoUpdate Mentor and Mentee Information (bofh)
bofh [Wed, 24 Dec 2014 09:25:16 +0000 (09:25 +0000)]
Update Mentor and Mentee Information (bofh)

Differential Revision: https://reviews.freebsd.org/D1363
Reviewed by: bapt
Approved by: bapt

9 years agoFix tunable and sysctl handling of the fail_on_task_timeout knob.
scottl [Wed, 24 Dec 2014 07:04:04 +0000 (07:04 +0000)]
Fix tunable and sysctl handling of the fail_on_task_timeout knob.

Reviewed by: emax
Obtained from: Netflix, Inc.
MFC after: 3 days

9 years agoBring in the last round of updates before adding the interrupt support.
loos [Wed, 24 Dec 2014 04:24:08 +0000 (04:24 +0000)]
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.

9 years agoAdd Intel vendor ID to the device table to make it more uniform so
imp [Wed, 24 Dec 2014 03:49:33 +0000 (03:49 +0000)]
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.

9 years agoImproves the GPIO API description a little bit.
loos [Wed, 24 Dec 2014 03:24:50 +0000 (03:24 +0000)]
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

9 years agoRevert a glitched mismerge that got caught up in the prior commit.
ian [Wed, 24 Dec 2014 03:09:55 +0000 (03:09 +0000)]
Revert a glitched mismerge that got caught up in the prior commit.
The PJ4B family is still armv7, not armv6.

9 years agoDefine the old-school arm arch constants we still use internally based on
ian [Wed, 24 Dec 2014 03:02:12 +0000 (03:02 +0000)]
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.

9 years agoAllow info to display correctly in for varying tabstop settings
smh [Wed, 24 Dec 2014 01:50:44 +0000 (01:50 +0000)]
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

9 years agoDon't assume required FDT properties are present.
ian [Wed, 24 Dec 2014 01:19:11 +0000 (01:19 +0000)]
Don't assume required FDT properties are present.

9 years agoRevert r276101, it didn't fix the problem and causes a compile error
ian [Wed, 24 Dec 2014 01:10:53 +0000 (01:10 +0000)]
Revert r276101, it didn't fix the problem and causes a compile error
(nested comment blocks).

9 years agoRemove if_stf.h. It contains only one function declaration used by if_stf(4).
ae [Tue, 23 Dec 2014 20:54:59 +0000 (20:54 +0000)]
Remove if_stf.h. It contains only one function declaration used by if_stf(4).
Also make in_stf_protosw structure static.

9 years agoDo not return the total number of available pins but the maximum pin number
loos [Tue, 23 Dec 2014 19:31:56 +0000 (19:31 +0000)]
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.

9 years agoBump the valid GPIO range for rfkill up from 8 to 16.
adrian [Tue, 23 Dec 2014 18:48:45 +0000 (18:48 +0000)]
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>

9 years agoRemove in_gif.h and in6_gif.h files. They only contain function
ae [Tue, 23 Dec 2014 16:17:37 +0000 (16:17 +0000)]
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.

9 years agoUpdate comment: only one file in the FAT file system EFI boot image
emaste [Tue, 23 Dec 2014 16:00:25 +0000 (16:00 +0000)]
Update comment: only one file in the FAT file system EFI boot image

Sponsored by: The FreeBSD Foundation

9 years agoUse explicit --output-target to set EFI file format
emaste [Tue, 23 Dec 2014 15:58:45 +0000 (15:58 +0000)]
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

9 years agoConvert a couple lingering NO_FORTH conditionals to test MK_FORTH.
ian [Tue, 23 Dec 2014 15:42:34 +0000 (15:42 +0000)]
Convert a couple lingering NO_FORTH conditionals to test MK_FORTH.

9 years agoWe can stop iterating once we've found the DOF section.
markj [Tue, 23 Dec 2014 15:42:33 +0000 (15:42 +0000)]
We can stop iterating once we've found the DOF section.

Submitted by: Fedor Indutny <fedor@indutny.com>

9 years agoFix a memory leak that occured when looking up CTF info for a symbol.
markj [Tue, 23 Dec 2014 15:40:57 +0000 (15:40 +0000)]
Fix a memory leak that occured when looking up CTF info for a symbol.

9 years agoRestore the trap type argument to the DTrace trap hook, removed in r268600.
markj [Tue, 23 Dec 2014 15:38:19 +0000 (15:38 +0000)]
Restore the trap type argument to the DTrace trap hook, removed in r268600.
It's redundant at the moment since it can be obtained from the trapframe
on the architectures where DTrace is supported, but this won't be the case
with ARM.

9 years agoHide block device VPD pages for non-block devices.
mav [Tue, 23 Dec 2014 15:18:28 +0000 (15:18 +0000)]
Hide block device VPD pages for non-block devices.

MFC after: 2 weeks

9 years agoFix kernel builds with "options NFS_DEBUG" that
rmacklem [Tue, 23 Dec 2014 14:24:36 +0000 (14:24 +0000)]
Fix kernel builds with "options NFS_DEBUG" that
were broken by r276096. Also delete the two
kernel options NFS_GATHERDELAY, NFS_WDELAYHASHSIZ
which are no longer used.

Reported by: bz

9 years agom_clrprotoflags() is designed to cleanup M_PROTO flags when mbufs cross
glebius [Tue, 23 Dec 2014 12:26:35 +0000 (12:26 +0000)]
m_clrprotoflags() is designed to cleanup M_PROTO flags when mbufs cross
protocol and facility boundaries.  However, now it cleans up only the
first mbuf, while intent clearly means all mbufs in a possible chain.

Differential Revision: https://reviews.freebsd.org/D1352
Reviewed by: rpaulo, gnn, adrian
Sponsored by: Nginx, Inc.

9 years agoFix build with recent binutils
bapt [Tue, 23 Dec 2014 10:43:35 +0000 (10:43 +0000)]
Fix build with recent binutils

Recent binutils considered the .gnu.warning.symbol section as a fatal error when
run with --fatal-warnings which makes any users of "insecure" functions from
libc failing to build with recent binutils.

Introduce a new macro: LD_FATAL_WARNINGS=no to run ld(1) with
--no-fatal-warnings for the users of "insecure" functions

Differential Revision: https://reviews.freebsd.org/D1320

9 years agoFix potential division by zero after r275920.
mav [Tue, 23 Dec 2014 10:18:42 +0000 (10:18 +0000)]
Fix potential division by zero after r275920.

Reported by: Coverity Scan
CID: 1260387
MFC after: 3 days

9 years agoAlways sync the global ZFS config cache to reflect the new mosconfig
smh [Tue, 23 Dec 2014 09:31:24 +0000 (09:31 +0000)]
Always sync the global ZFS config cache to reflect the new mosconfig

This fixes out of date zpool.cache for root pools, which can cause issues
such as confusion of zdb etc.

MFC after: 1 month

9 years agoAlways select the card before we do the 4.x specific stuff and
imp [Tue, 23 Dec 2014 05:50:53 +0000 (05:50 +0000)]
Always select the card before we do the 4.x specific stuff and
deselect it after setting the block size. This is a similar bug that
was fixed elsewhere, but not here. This makes sure that we leave the
card deselected at the end of the loop, and we don't send any commands
to the card without it selected.

Reviewed by: ian@

9 years agoTemporarily disable the cpus directive until I figure out what's wrong.
rpaulo [Tue, 23 Dec 2014 03:00:18 +0000 (03:00 +0000)]
Temporarily disable the cpus directive until I figure out what's wrong.

9 years agoAllow ktr(4) tracing of all guest exceptions via the tunable
neel [Tue, 23 Dec 2014 02:14:49 +0000 (02:14 +0000)]
Allow ktr(4) tracing of all guest exceptions via the tunable
"hw.vmm.trace_guest_exceptions".  To enable this feature set the tunable
to "1" before loading vmm.ko.

Tracing the guest exceptions can be useful when debugging guest triple faults.

Note that there is a performance impact when exception tracing is enabled
since every exception will now trigger a VM-exit.

Also, handle machine check exceptions that happen during guest execution
by vectoring to the host's machine check handler via "int $18".

Discussed with: grehan
MFC after: 2 weeks

9 years agoAdd an UPDATING entry for r276096, which removed the kernel
rmacklem [Tue, 23 Dec 2014 01:32:18 +0000 (01:32 +0000)]
Add an UPDATING entry for r276096, which removed the kernel
sources for the old NFS client and server.

9 years agoRemove the old NFS client and server from head,
rmacklem [Tue, 23 Dec 2014 00:47:46 +0000 (00:47 +0000)]
Remove the old NFS client and server from head,
which means that the NFSCLIENT and NFSSERVER
kernel options will no longer work. This commit
only removes the kernel components. Removal of
unused code in the user utilities will be done
later. This commit does not include an addition
to UPDATING, but that will be committed in a
few minutes.

Discussed on: freebsd-fs

9 years agoUse "RCS tag" instead of "$FreeBSD$ tag", since svn will obediently
des [Mon, 22 Dec 2014 23:03:18 +0000 (23:03 +0000)]
Use "RCS tag" instead of "$FreeBSD$ tag", since svn will obediently
expand the latter.

MFC after: 3 days

9 years agoAdd a new loader(8) variable, twiddle_divisor, allowing control over the
ian [Mon, 22 Dec 2014 22:07:22 +0000 (22:07 +0000)]
Add a new loader(8) variable, twiddle_divisor, allowing control over the
output frequency of the "twiddle" IO progress indicator.  The default
value is 1.  For larger values N, the next stage of the animation is only
output on every Nth call to the output routine.  A sufficiently large N
effectively disables the animation completely.

9 years agoStrip trailing / characters from paths in "not present" index entries, not
cperciva [Mon, 22 Dec 2014 21:52:37 +0000 (21:52 +0000)]
Strip trailing / characters from paths in "not present" index entries, not
just "directory" entries.

Prior to this commit, if / was added as part of a security update (how? In
the most recent case, because lib32 was accidentally omitted and was then
re-added, and every installer distribution set gets its own paths) then
the code which was supposed to filter out updates to deleted parts of the
base system (if someone decides to delete / then we shouldn't re-create it
for them) would instead get confused and decided that while / should exist,
// should not exist and needs to be removed.

This fixes the bug which caused freebsd-update to want to delete / (which is
harmless, since `rm /` fails, but scary nonetheless).  A workaround is being
applied to the update bits in order to avoid triggering the bug on unpatched
systems.

PR: 196055, 196091, 196147

9 years agoAdd VAMI (VMware Appliance Management Interface) port.
marck [Mon, 22 Dec 2014 21:26:49 +0000 (21:26 +0000)]
Add VAMI (VMware Appliance Management Interface) port.

Reviewed by: eadler
MFC after: 2 weeks

9 years agoAdd a divisor parameter to twiddle() so that callers can request that output
ian [Mon, 22 Dec 2014 20:42:36 +0000 (20:42 +0000)]
Add a divisor parameter to twiddle() so that callers can request that output
only happen on every Nth call.  Update the existing twiddle() calls done in
various IO loops to roughly reflect the relative IO sizes.  That is, tftp
and nfs call twiddle() on every 1K block, ufs on every filesystem block,
so the network calls now use a much larger divisor than disk IO calls.

Also add a new twiddle_divisor() function that allows an application to set
a global divisor that is applied on top of the per-call divisors.  Nothing
calls this yet, but loader(8) will be using it to further throttle the
cursor for slow serial consoles.

9 years agoDon't require ${SYSDIR}/../COPYRIGHT to exist. Fall back to the
imp [Mon, 22 Dec 2014 19:10:21 +0000 (19:10 +0000)]
Don't require ${SYSDIR}/../COPYRIGHT to exist. Fall back to the
current date if we can't find it.

MFC After: 2 weeks

9 years agoMake this compile when TERM_EMU is not defined.
imp [Mon, 22 Dec 2014 19:10:11 +0000 (19:10 +0000)]
Make this compile when TERM_EMU is not defined.

9 years agoFix multiple ntp vulnerabilities.
delphij [Mon, 22 Dec 2014 18:54:55 +0000 (18:54 +0000)]
Fix multiple ntp vulnerabilities.

Reviewed by: roberto (earlier revision), philip
Security: CVE-2014-9293, CVE-2014-9294
Security: CVE-2014-9295, CVE-2014-9296
Security: FreeBSD-SA-14:31.ntp

Differential Revision: https://reviews.freebsd.org/D1343

9 years agoFix panic when resizing ZFS zvol's
smh [Mon, 22 Dec 2014 18:39:38 +0000 (18:39 +0000)]
Fix panic when resizing ZFS zvol's

Resizing a ZFS ZVOL with debug enabled would result in a panic due to
recursion on dp_config_rwlock.

The upstream change "3464 zfs synctask code needs restructuring" changed
zvol_set_volsize to avoid the recursion on dp_config_rwlock, but this was
missed when originally merged in by r248571 due to significant differences
in our codebases in this area.

These changes also relied on bring in changes from upstream:
3557 dumpvp_size is not updated correctly when a dump zvol's size is
changed, which where also not present.

In order to help prevent future issues in this area a direct comparison
and diff minimisation from current upstream version (b515258) of zvol.c.

Differential Revision: https://reviews.freebsd.org/D1302
MFC after: 1 month
X-MFC-With: r276063 & r276066
Sponsored by: Multiplay

9 years agoRefactor zvol locking to minimise diff with upstream
smh [Mon, 22 Dec 2014 17:04:51 +0000 (17:04 +0000)]
Refactor zvol locking to minimise diff with upstream

Use #define zfsdev_state_lock spa_namespace_lock instead of replacing all
zfsdev_state_lock with spa_namespace_lock to minimise changes from upstream.

Differential Revision: D1302
MFC after: 1 month
X-MFC-With r276063
Sponsored by: Multiplay

9 years agoExplicitly treat timeouts when waiting for IBF or OBF to change state as an
jhb [Mon, 22 Dec 2014 16:53:04 +0000 (16:53 +0000)]
Explicitly treat timeouts when waiting for IBF or OBF to change state as an
error.  This fixes occasional hangs in the IPMI kcs thread when using
ipmitool locally.

MFC after: 1 week

9 years agovt: register the memory regions used by the vt drivers
royger [Mon, 22 Dec 2014 16:46:07 +0000 (16:46 +0000)]
vt: register the memory regions used by the vt drivers

Current VT drivers don't register the memory regions they use with the
nexus. This patch makes vt_vga and vt_efifb register the memory regions they
use.

This is needed (at least) for Xen support, since the FreeBSD kernel will try
to use the holes in the memory map to map memory from other domains and
setup it's grant table.

Sponsored by: Citrix Systems R&D
Reported by: sbruno
Tested by: emaste
Reviewed by: ray
PR: 195537
Differential Revision: https://reviews.freebsd.org/D1291

9 years agoStandardise on illumos for #ifdef's in zvol.c
smh [Mon, 22 Dec 2014 16:38:29 +0000 (16:38 +0000)]
Standardise on illumos for #ifdef's in zvol.c

Also correct as per style(9) on the use of #ifdef comments.

This is a no-op change as pre-cursor to a full cleanup and merge with
upstream zvol changes.

Sponsored by: Multiplay

9 years agoAdd AArch64 machine time and relocations for readelf
emaste [Mon, 22 Dec 2014 16:34:59 +0000 (16:34 +0000)]
Add AArch64 machine time and relocations for readelf

Reviewed by: andrew
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1333

9 years agoSet up default shstrtab entries at shstrtab initialization
emaste [Mon, 22 Dec 2014 16:31:09 +0000 (16:31 +0000)]
Set up default shstrtab entries at shstrtab initialization

Instead of waiting until the addition of the first non-default entry.
This fixes a segfault when strip(1) is asked to remove every section from
an object file.

Upstream elftoolchain ticket 463

Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D1341

9 years agoRemove some leftovers from OMAP3 support.
loos [Mon, 22 Dec 2014 16:29:15 +0000 (16:29 +0000)]
Remove some leftovers from OMAP3 support.

9 years agoSimplify the use of locks where possible, remove the locking when it is not
loos [Mon, 22 Dec 2014 16:12:55 +0000 (16:12 +0000)]
Simplify the use of locks where possible, remove the locking when it is not
required.

Simplify the code a little bit.

Reviewed by: andrew (previous version)

9 years agoIn sbappend*() family of functions clear M_PROTO flags of incoming
glebius [Mon, 22 Dec 2014 15:39:24 +0000 (15:39 +0000)]
In sbappend*() family of functions clear M_PROTO flags of incoming
mbufs. sbappendstream() already does this in m_demote().

PR: 196174
Sponsored by: Nginx, Inc.

9 years agoAdd flag VM_ALLOC_NOWAIT for vm_page_grab() that prevents sleeping and
glebius [Mon, 22 Dec 2014 09:02:21 +0000 (09:02 +0000)]
Add flag VM_ALLOC_NOWAIT for vm_page_grab() that prevents sleeping and
allows the function to fail.

Reviewed by: kib, alc
Sponsored by: Nginx, Inc.

9 years agoDo not clear flag that vm_page_alloc() doesn't support.
glebius [Mon, 22 Dec 2014 09:00:47 +0000 (09:00 +0000)]
Do not clear flag that vm_page_alloc() doesn't support.

Submitted by: kib

9 years agoDocument flags of vm_page allocation functions.
glebius [Mon, 22 Dec 2014 08:59:44 +0000 (08:59 +0000)]
Document flags of vm_page allocation functions.

Reviewed by: alc

9 years agoUpdate the text for building texinfo with build-tools to reflect the fact
ngie [Mon, 22 Dec 2014 04:54:57 +0000 (04:54 +0000)]
Update the text for building texinfo with build-tools to reflect the fact
that make install is being called as well

MFC after: 1 week
X-MFC with: r276052

9 years agoBuild selective portions of gnu/usr.bin/texinfo as part of build-tools to
ngie [Mon, 22 Dec 2014 04:52:24 +0000 (04:52 +0000)]
Build selective portions of gnu/usr.bin/texinfo as part of build-tools to
ensure that building on a host without makeinfo (i.e. a host where
make delete-old -DWITHOUT_INFO was run), then building with MK_INFO == yes
doesn't manifest in build errors when building info pages

This manifested itself like the following when I was build testing an MFC
change on stable/10:

  makeinfo --no-split -I /usr/src/gnu/lib/libregex/doc -I /usr/src/gnu/lib/libregex/doc regex.texi  -o regex.info
  makeinfo: not found
  *** [regex.info] Error code 127

make[6]: stopped in /usr/src/gnu/lib/libregex/doc
1 error

Tested on a head VM without makeinfo installed and by building with MK_INFO=yes

MFC after: 1 week

9 years agoReplace the clock divisor terms with values that also result in a 1 MHz
ian [Mon, 22 Dec 2014 00:50:01 +0000 (00:50 +0000)]
Replace the clock divisor terms with values that also result in a 1 MHz
clock, but actually work on real hardware, unlike the original set of
values I chose.

PR: 195009
Submitted by: Scott Ellis <jumpnowtek@gmail.com>

9 years agoAdd -march=armv7a to the kernel compile for all ARM systems which are v7a.
ian [Sun, 21 Dec 2014 23:48:32 +0000 (23:48 +0000)]
Add -march=armv7a to the kernel compile for all ARM systems which are v7a.

Submitted by: Michal Meloun <meloun@miracle.cz>

9 years agoAdd __FreeBSD_version guards around hsearch_r to ease MFCing the code to
ngie [Sun, 21 Dec 2014 23:47:30 +0000 (23:47 +0000)]
Add __FreeBSD_version guards around hsearch_r to ease MFCing the code to
stable/10

It was added when __FreeBSD_version was ~1100027

9 years agoAllow -march=armv7a on the gcc command line, for compatibility with clang.
ian [Sun, 21 Dec 2014 23:45:13 +0000 (23:45 +0000)]
Allow -march=armv7a on the gcc command line, for compatibility with clang.
This will result in __ARM_ARCH_7A__ being defined during the compile.

When compiling with gcc, it will still only generate armv6 opcodes itself,
but should pass the arch to gas so that inline asm can use v7 opcodes.

9 years agosh: Move some code from onint() to onsig(), making onint() noreturn.
jilles [Sun, 21 Dec 2014 23:09:59 +0000 (23:09 +0000)]
sh: Move some code from onint() to onsig(), making onint() noreturn.

As a result, the INTON macro which is used many times generates fewer
bytes of code.

9 years agosh: Remove EXP_REDIR.
jilles [Sun, 21 Dec 2014 22:18:30 +0000 (22:18 +0000)]
sh: Remove EXP_REDIR.

EXP_REDIR was supposed to generate pathnames in redirection if exactly one
file matches, as permitted but not required by POSIX in interactive mode. It
is unlikely this will be implemented.

No functional change is intended.

MFC after: 1 week

9 years agoFix the unwinder to get past functions with no stack but may cause an
andrew [Sun, 21 Dec 2014 21:38:12 +0000 (21:38 +0000)]
Fix the unwinder to get past functions with no stack but may cause an
exception. In this case no registers will be updated but the link register
will be copied to the program counter to be used to find the calling
function. In this case the program counter may be updated and we should
continue with the trace.

9 years agoPull out the fdt mapping code into intr.c. The arm_intrng branch also
andrew [Sun, 21 Dec 2014 21:27:12 +0000 (21:27 +0000)]
Pull out the fdt mapping code into intr.c. The arm_intrng branch also
defines this function allowing the mapping method to change when we move
to it.

9 years agoEliminate a "cast discards qualifiers" warning when building with gcc.
ian [Sun, 21 Dec 2014 21:24:19 +0000 (21:24 +0000)]
Eliminate a "cast discards qualifiers" warning when building with gcc.

9 years agoEliminate a redundant declaration.
ian [Sun, 21 Dec 2014 21:23:53 +0000 (21:23 +0000)]
Eliminate a redundant declaration.

9 years agoRemove a volatile qualifier on return type that is ignored and results in
ian [Sun, 21 Dec 2014 21:11:54 +0000 (21:11 +0000)]
Remove a volatile qualifier on return type that is ignored and results in
a -Wreturn-type warning when compiled with gcc.

9 years agoFurther reduce the diff between the arm_intrng gic driver and the version
andrew [Sun, 21 Dec 2014 17:25:21 +0000 (17:25 +0000)]
Further reduce the diff between the arm_intrng gic driver and the version
in head.

9 years agoSwitch zfsboot installer force 4K option to use vfs.zfs.min_auto_ashift=12
smh [Sun, 21 Dec 2014 17:21:29 +0000 (17:21 +0000)]
Switch zfsboot installer force 4K option to use vfs.zfs.min_auto_ashift=12

Previously we used gnop(8) to fake 4K sector size disks but ZFS now has a
sysctl to control this when creating new top level vdev's so use that
instead.

Differential Revision: D566
MFC after: 1 month
Sponsored by: Multiplay

9 years agoAllow whitspace to appear between device name and unit number in loaderdev.
ian [Sun, 21 Dec 2014 17:10:24 +0000 (17:10 +0000)]
Allow whitspace to appear between device name and unit number in loaderdev.
This allows the same value to be used in u-boot commands and the loaderdev
env var that gets passed to ubldr, for example 'fatload mmc 1 ${bootfile}".

9 years agoReduce the diff between the lpc interrupt controller in head and arm_intrng
andrew [Sun, 21 Dec 2014 16:59:41 +0000 (16:59 +0000)]
Reduce the diff between the lpc interrupt controller in head and arm_intrng

9 years agoReduce the diff in the Ti aintc between head and arm_intrng
andrew [Sun, 21 Dec 2014 16:48:57 +0000 (16:48 +0000)]
Reduce the diff in the Ti aintc between head and arm_intrng

9 years agostyle (9) nits
smh [Sun, 21 Dec 2014 16:38:29 +0000 (16:38 +0000)]
style (9) nits

Use return (val); instead of return val;

Differential Revision: D838
MFC after: 2 weeks
Sponsored by: Multiplay

9 years agoReduce the diff between head and arm_intrng with the bcm2835 interrupt
andrew [Sun, 21 Dec 2014 16:35:42 +0000 (16:35 +0000)]
Reduce the diff between head and arm_intrng with the bcm2835 interrupt
controller.

9 years agoReturn the error from ahci_setup_interrupt in ahci_attach
smh [Sun, 21 Dec 2014 16:32:57 +0000 (16:32 +0000)]
Return the error from ahci_setup_interrupt in ahci_attach

Previously ahci_attach returned a hard coded ENXIO instead of the value
from ahci_setup_interrupt. This is effectively a NOOP change as currently
ahci_setup_interrupt only ever returns 0 or ENXIO, so just there to protect
against any future changes to that.

Differential Revision: D838
MFC after: 2 weeks
Sponsored by: Multiplay

9 years agoReduce the diff to the arm_intrng project branch by having the read/write
andrew [Sun, 21 Dec 2014 16:21:56 +0000 (16:21 +0000)]
Reduce the diff to the arm_intrng project branch by having the read/write
macros take the softc they are accessing.

9 years agoClamp ahci max irq's to AHCI_MAX_IRQS
smh [Sun, 21 Dec 2014 16:15:29 +0000 (16:15 +0000)]
Clamp ahci max irq's to AHCI_MAX_IRQS

This prevents the possiblity of any overruns on the statically allocated
struct irqs field.

Differential Revision: D838
MFC after: 2 weeks
X-MFC-With: r276012
Sponsored by: Multiplay

9 years agoAdd a constant AHCI_MAX_IRQS removing magic number
smh [Sun, 21 Dec 2014 16:07:46 +0000 (16:07 +0000)]
Add a constant AHCI_MAX_IRQS removing magic number

Sponsored by: Multiplay

9 years agoDon't check twice that inp is not NULL.
tuexen [Sun, 21 Dec 2014 13:58:53 +0000 (13:58 +0000)]
Don't check twice that inp is not NULL.

Reported by: Coverity
CID: 748671
MFC after: 3 days

9 years agoAdd VN_OPEN_NAMECACHE flag for vn_open_cred(9), which requests that
kib [Sun, 21 Dec 2014 13:32:07 +0000 (13:32 +0000)]
Add VN_OPEN_NAMECACHE flag for vn_open_cred(9), which requests that
the created file name was cached.  Use the flag for core dumps.

Requested by: rpaulo
Tested by: pho (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

9 years agoHandle MAKEENTRY cnp flag in the VOP_CREATE(). Curiously, some
kib [Sun, 21 Dec 2014 13:29:33 +0000 (13:29 +0000)]
Handle MAKEENTRY cnp flag in the VOP_CREATE().  Curiously, some
fs, e.g. smbfs, already did it.

Tested by: pho (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks