freebsd.git
9 years agoAdd support for reading MAM attributes to camcontrol(8) and libcam(3).
ken [Tue, 9 Jun 2015 21:39:38 +0000 (21:39 +0000)]
Add support for reading MAM attributes to camcontrol(8) and libcam(3).

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

9 years ago"status_reg.acpwr ? 1 : 0" is now the same as just "status_reg.acpwr".
sobomax [Tue, 9 Jun 2015 19:22:13 +0000 (19:22 +0000)]
"status_reg.acpwr ? 1 : 0" is now the same as just "status_reg.acpwr".

9 years agoFix a typo in a comment that has been carried over from am335x_pmic.c.
sobomax [Tue, 9 Jun 2015 19:17:33 +0000 (19:17 +0000)]
Fix a typo in a comment that has been carried over from am335x_pmic.c.

9 years agoUse tab to do identation consistently.
sobomax [Tue, 9 Jun 2015 19:04:55 +0000 (19:04 +0000)]
Use tab to do identation consistently.

9 years agoExtend TPS65217 support to be able to pull and decode battery
sobomax [Tue, 9 Jun 2015 18:46:31 +0000 (18:46 +0000)]
Extend TPS65217 support to be able to pull and decode battery
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".

9 years agoAccount for superpage mappings that are created by pmap_copy().
alc [Tue, 9 Jun 2015 18:04:28 +0000 (18:04 +0000)]
Account for superpage mappings that are created by pmap_copy().

9 years agoSwitch from make_dev_alias to make_dev_alias_p since make_dev_alias_p can
ambrisko [Tue, 9 Jun 2015 15:51:11 +0000 (15:51 +0000)]
Switch from make_dev_alias to make_dev_alias_p since make_dev_alias_p can
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

9 years agoInclude opt_em.h now that there are actual kernel compile options for em(4).
sbruno [Tue, 9 Jun 2015 14:31:18 +0000 (14:31 +0000)]
Include opt_em.h now that there are actual kernel compile options for em(4).

Submitted by: jfv
MFC after: 2 week
Sponsored by: Limelight Networks

9 years agoWhen updating/accessing the timehands, barriers are needed to ensure
kib [Tue, 9 Jun 2015 11:49:56 +0000 (11:49 +0000)]
When updating/accessing the timehands, barriers are needed to ensure
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

9 years agoHandle X2APIC entries in the MADT for APICs with an ID < 255. At least one
jhb [Tue, 9 Jun 2015 10:49:40 +0000 (10:49 +0000)]
Handle X2APIC entries in the MADT for APICs with an ID < 255.  At least one
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

9 years agoSupport guest writes to the TSC by enabling the "use TSC offsetting"
tychon [Tue, 9 Jun 2015 00:14:47 +0000 (00:14 +0000)]
Support guest writes to the TSC by enabling the "use TSC offsetting"
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

9 years agoMap the allocated DMA memory into the address space.
marcel [Mon, 8 Jun 2015 22:01:34 +0000 (22:01 +0000)]
Map the allocated DMA memory into the address space.

9 years agoImplement mmap(2) for the busdma resource.
marcel [Mon, 8 Jun 2015 21:47:44 +0000 (21:47 +0000)]
Implement mmap(2) for the busdma resource.

9 years agoMerge r283870 from amd64:
dim [Mon, 8 Jun 2015 20:12:44 +0000 (20:12 +0000)]
Merge r283870 from amd64:

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

9 years agoProperly initialize flags for accept4(2) not to return spurious EINVAL.
jkim [Mon, 8 Jun 2015 20:03:15 +0000 (20:03 +0000)]
Properly initialize flags for accept4(2) not to return spurious EINVAL.
Note this fixes a Linuxulator regression introduced in r283490.

PR: 200662

9 years agoMove contrib/top/top.X to contrib/top/top.xs and move
marcel [Mon, 8 Jun 2015 19:45:24 +0000 (19:45 +0000)]
Move contrib/top/top.X to contrib/top/top.xs and move
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

9 years agoCleanup some style(9) issues.
bdrewery [Mon, 8 Jun 2015 19:24:18 +0000 (19:24 +0000)]
Cleanup some style(9) issues.

- Whitespace.
- Comments.
- Wrap long lines.

MFC after: 2 weeks
X-MFC-with: r284105,r284106
Sponsored by: EMC / Isilon Storage Division

9 years agoIt has been long time that when doing 'ls -G /path/to/a/symlink', instead of
delphij [Mon, 8 Jun 2015 19:13:04 +0000 (19:13 +0000)]
It has been long time that when doing 'ls -G /path/to/a/symlink', instead of
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

9 years agoRevert r284153, as I believe it breaks the dtrace sdt module. I will
jhb [Mon, 8 Jun 2015 18:06:00 +0000 (18:06 +0000)]
Revert r284153, as I believe it breaks the dtrace sdt module.  I will
fix the original issue a different way.

9 years agoFutex is an aligned 32-bit integer. Use the proper instruction and
dchagin [Mon, 8 Jun 2015 17:39:25 +0000 (17:39 +0000)]
Futex is an aligned 32-bit integer. Use the proper instruction and
operand when dereferencing futex pointer.

9 years agoAdd user facing errors for exceeding process memory limits
emaste [Mon, 8 Jun 2015 16:07:07 +0000 (16:07 +0000)]
Add user facing errors for exceeding process memory limits

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

9 years agoAdd an internal "locked" variant of linker_file_lookup_set() and change
jhb [Mon, 8 Jun 2015 14:06:47 +0000 (14:06 +0000)]
Add an internal "locked" variant of linker_file_lookup_set() and change
the public function to acquire the global linker lock directly.  This
permits linker_file_lookup_set() to be safely used from other modules.

9 years agoAdd makefile to build geom_map kld. Document some GEOM_* options
ae [Mon, 8 Jun 2015 13:23:56 +0000 (13:23 +0000)]
Add makefile to build geom_map kld. Document some GEOM_* options
in NOTES and geom(4).

9 years agoTeach G_PART_GPT class to handle g_resize_provider event.
ae [Mon, 8 Jun 2015 12:52:41 +0000 (12:52 +0000)]
Teach G_PART_GPT class to handle g_resize_provider event.

MFC after: 10 days

9 years agobackout remove of -q option for pw [user|group] next
bapt [Mon, 8 Jun 2015 05:27:34 +0000 (05:27 +0000)]
backout remove of -q option for pw [user|group] next

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.

9 years agoFix typo
bapt [Mon, 8 Jun 2015 05:06:17 +0000 (05:06 +0000)]
Fix typo

9 years agoRetire VM_FREEPOOL_CACHE as the next step in eliminating PG_CACHE pages.
alc [Mon, 8 Jun 2015 04:59:32 +0000 (04:59 +0000)]
Retire VM_FREEPOOL_CACHE as the next step in eliminating PG_CACHE pages.

Differential Revision: https://reviews.freebsd.org/D2712
Reviewed by: kib
Sponsored by: EMC / Isilon Storage Division

9 years agoAdd busdma_mem_alloc & busdma_mem_free.
marcel [Mon, 8 Jun 2015 03:23:20 +0000 (03:23 +0000)]
Add busdma_mem_alloc & busdma_mem_free.

9 years agoCope with .. less memory.
adrian [Mon, 8 Jun 2015 03:01:19 +0000 (03:01 +0000)]
Cope with .. less memory.

9 years agoAdd DMA memory allocation and freeing.
marcel [Mon, 8 Jun 2015 03:00:36 +0000 (03:00 +0000)]
Add DMA memory allocation and freeing.
Slightly rework the tag handling.

9 years agoBreak out the current 802.11 software scan methods into an indirect table.
adrian [Mon, 8 Jun 2015 02:35:43 +0000 (02:35 +0000)]
Break out the current 802.11 software scan methods into an indirect table.

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.)

9 years agoRevert my previoius commit as it explicit pollute the ficl on other
araujo [Mon, 8 Jun 2015 02:31:46 +0000 (02:31 +0000)]
Revert my previoius commit as it explicit pollute the ficl on other
architectures. It will be reworked by GSoC students.

Requested by: ngie, bms and pfg.

9 years agoRemove the start-scan call and re-inline it for now.
adrian [Mon, 8 Jun 2015 00:30:58 +0000 (00:30 +0000)]
Remove the start-scan call and re-inline it for now.

9 years agoFix mistakes than came along with r284139
bapt [Sun, 7 Jun 2015 21:59:43 +0000 (21:59 +0000)]
Fix mistakes than came along with r284139

9 years agoRemove '-q' support for pw [user|group] next
bapt [Sun, 7 Jun 2015 21:57:20 +0000 (21:57 +0000)]
Remove '-q' support for pw [user|group] next

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.

9 years agoFix setting uid/gid min/max via pw
bapt [Sun, 7 Jun 2015 20:59:59 +0000 (20:59 +0000)]
Fix setting uid/gid min/max via pw

9 years agoFix generating configuration file
bapt [Sun, 7 Jun 2015 20:44:06 +0000 (20:44 +0000)]
Fix generating configuration file

9 years agoFix duplicate checking
bapt [Sun, 7 Jun 2015 19:59:01 +0000 (19:59 +0000)]
Fix duplicate checking

9 years agoRemove uneeded code (already done by pw_make_v7)
bapt [Sun, 7 Jun 2015 19:39:06 +0000 (19:39 +0000)]
Remove uneeded code (already done by pw_make_v7)

9 years agoIn case of rename validate the length of the new name
bapt [Sun, 7 Jun 2015 19:33:25 +0000 (19:33 +0000)]
In case of rename validate the length of the new name

Check early that the new name fits MAXLOGNAME and store it in pwconf

9 years agoRefactor input validation
bapt [Sun, 7 Jun 2015 19:03:41 +0000 (19:03 +0000)]
Refactor input validation

Mutualize code to validate inputs of both 'user' and 'group' command
Test that the input name fits into MAXLOGNAME

9 years agowitness: don't warn about matrix inconsistencies without holding the mutex
markj [Sun, 7 Jun 2015 18:59:47 +0000 (18:59 +0000)]
witness: don't warn about matrix inconsistencies without holding the mutex

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

9 years agoFinish converting -7 to pwconf
bapt [Sun, 7 Jun 2015 15:54:57 +0000 (15:54 +0000)]
Finish converting -7 to pwconf

9 years agoAdd new USB quirk.
hselasky [Sun, 7 Jun 2015 15:47:58 +0000 (15:47 +0000)]
Add new USB quirk.

PR: 200693
MFC after: 1 week

9 years agoHandle -7 via gloval pwconf
bapt [Sun, 7 Jun 2015 15:33:08 +0000 (15:33 +0000)]
Handle -7 via gloval pwconf

9 years agoInitialize conf using menset(3)
bapt [Sun, 7 Jun 2015 15:29:58 +0000 (15:29 +0000)]
Initialize conf using menset(3)

9 years agoHandle pretty print (-P) via global pwconf
bapt [Sun, 7 Jun 2015 15:27:17 +0000 (15:27 +0000)]
Handle pretty print (-P) via global pwconf

9 years agoHandle dryrun (-N) via global pwconf
bapt [Sun, 7 Jun 2015 15:09:53 +0000 (15:09 +0000)]
Handle dryrun (-N) via global pwconf

9 years agoSort headers
bapt [Sun, 7 Jun 2015 14:57:16 +0000 (14:57 +0000)]
Sort headers

9 years agoHandle -C and -Y locally and stop adding them to arglist
bapt [Sun, 7 Jun 2015 14:54:07 +0000 (14:54 +0000)]
Handle -C and -Y locally and stop adding them to arglist

9 years agoAdd a new global struct pwconf to store etcpath, rootdir and struct userconf
bapt [Sun, 7 Jun 2015 14:34:38 +0000 (14:34 +0000)]
Add a new global struct pwconf to store etcpath, rootdir and struct userconf

Do not add anymore -R and -V to arglist
Add an error message if both -V and -R are set in arguments

9 years agoFix pw userdel -r not deleting homedir
bapt [Sun, 7 Jun 2015 14:32:52 +0000 (14:32 +0000)]
Fix pw userdel -r not deleting homedir

9 years agoInclude header libi386.h to silence the clang warning of implicit declaration
araujo [Sun, 7 Jun 2015 14:20:48 +0000 (14:20 +0000)]
Include header libi386.h to silence the clang warning of implicit declaration
of functions biospci_*.

Differential Revision: D2668
Reviewed by: rodrigc

9 years agoStop checking for ARM_TP_ADDRESS when we mean to check if building for
andrew [Sun, 7 Jun 2015 13:59:02 +0000 (13:59 +0000)]
Stop checking for ARM_TP_ADDRESS when we mean to check if building for
ARMv6 or later.

9 years agoTest explicitly the result of strcmp to be consistent with the rest of the code
bapt [Sun, 7 Jun 2015 11:38:26 +0000 (11:38 +0000)]
Test explicitly the result of strcmp to be consistent with the rest of the code

9 years agoImprove readability by reducing indentations levels
bapt [Sun, 7 Jun 2015 11:35:34 +0000 (11:35 +0000)]
Improve readability by reducing indentations levels

9 years agoRemove one level of indentation
bapt [Sun, 7 Jun 2015 11:30:33 +0000 (11:30 +0000)]
Remove one level of indentation

9 years agoMove user deletion code into a separate function to improve readability
bapt [Sun, 7 Jun 2015 11:26:28 +0000 (11:26 +0000)]
Move user deletion code into a separate function to improve readability

9 years agoInstead of always casting the pw_checkname input to u_char * and casting it back
bapt [Sun, 7 Jun 2015 10:57:02 +0000 (10:57 +0000)]
Instead of always casting the pw_checkname input to u_char * and casting it back
to char *, change pw_checkname to directly take char * in input

9 years agoRemove pc_cpu, it was duplicating pc_cpuid so was unneeded.
andrew [Sun, 7 Jun 2015 10:50:15 +0000 (10:50 +0000)]
Remove pc_cpu, it was duplicating pc_cpuid so was unneeded.

9 years agoSync with NetBSD:
bapt [Sun, 7 Jun 2015 10:01:59 +0000 (10:01 +0000)]
Sync with NetBSD:

- fix types of rl_completion_entry_function and rl_add_defun
- call update pos before completion to refresh the screen
From Thomas Eriksson

Adjust API to a more modern readline (Ryo Onodera)

remove duplicate declaration

9 years agocompat nvpair.h: make sure that the names are mangled only for kernel
avg [Sun, 7 Jun 2015 08:54:25 +0000 (08:54 +0000)]
compat nvpair.h: make sure that the names are mangled only for kernel

Currently there is no good reason to mangle the userland API.
The change was introduced in eac1d566b46edef765754203bef22c75c1699966,
r279437.  Also see https://reviews.freebsd.org/D1881.

I am still convinced that nv should not have introduced intentionally
conflicting API.

Discussed with: rstone
X-MFC with: r279437
Sponsored by: ClusterHQ

9 years agoImplement '-s' to copy as symlink, similar to the current -l link(2) handling.
bdrewery [Sun, 7 Jun 2015 06:30:25 +0000 (06:30 +0000)]
Implement '-s' to copy as symlink, similar to the current -l link(2) handling.

This is also implemented in at least GNU coreutils cp.

While here also improve the '-l' handling to not open(2) the source file as
it does not actually need the descriptor.

Sponsored by: EMC / Isilon Storage Division

9 years agoCleanup some indentation issues.
bdrewery [Sun, 7 Jun 2015 03:49:41 +0000 (03:49 +0000)]
Cleanup some indentation issues.

9 years agoUpdate print_INTEL_TLB() by the tag values from the Intel SDM
kib [Sat, 6 Jun 2015 22:03:24 +0000 (22:03 +0000)]
Update print_INTEL_TLB() by the tag values from the Intel SDM
rev. 55.  The modern CPUs cache and TLB descriptions looked quite
questionable without the update, e.g. Haswell i7 4770S reported:
Data TLB: 4 KB pages, 4-way set associative, 64 entries
L2 cache: 256 kbytes, 8-way associative, 64 bytes/line
After the update, the report is:
Data TLB: 1 GByte pages, 4-way set associative, 4 entries
Data TLB: 4 KB pages, 4-way set associative, 64 entries
Instruction TLB: 2M/4M pages, fully associative, 8 entries
Instruction TLB: 4KByte pages, 8-way set associative, 64 entries
64-Byte prefetching
Shared 2nd-Level TLB: 4 KByte/2MByte pages, 8-way associative, 1024 entries
L2 cache: 256 kbytes, 8-way associative, 64 bytes/line
Some tags were apparently removed from the table 3-21, Vol. 2A.  Keep
them around, but add a comment stating the removal.

Update the format line for cpu_stdext_feature according to the bits
from the SDM rev.55.  It appears that Haswells do not store %cs and
%ds values in the FPU save area.

Store content of the %ecx register from the CPUID leaf 0x7
subleaf 0 as cpu_stdext_feature2 and print defined bits from it,
again acording to SDM rev. 55.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 years agoRework exception entry to help with DTrace. We now store the stack pointer
andrew [Sat, 6 Jun 2015 21:52:46 +0000 (21:52 +0000)]
Rework exception entry to help with DTrace. We now store the stack pointer
before adjusting it to store any registers. This is needed as DTrace may
need to adjust the kernel stack pointer, and previously the new stack
pointer would have needed to be checked incase it was changed.

9 years agoSet the correct UBLDR_LOADADDR for the Wandboard and
gjb [Sat, 6 Jun 2015 21:11:17 +0000 (21:11 +0000)]
Set the correct UBLDR_LOADADDR for the Wandboard and
Cubox/Hummingboard images.

Submitted by: ian
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

9 years agoReadd the warning level gcc 4.2 still complains
bapt [Sat, 6 Jun 2015 19:43:41 +0000 (19:43 +0000)]
Readd the warning level gcc 4.2 still complains

9 years agoRe-introduce this - it doesn't compile clean on a mips target
adrian [Sat, 6 Jun 2015 19:15:08 +0000 (19:15 +0000)]
Re-introduce this - it doesn't compile clean on a mips target
(eg CARAMBOLA2.)

9 years agoChange BUS_PROBE_HOOVER from -500 to -1000000. We have PCI bus drivers
marcel [Sat, 6 Jun 2015 17:25:45 +0000 (17:25 +0000)]
Change BUS_PROBE_HOOVER from -500 to -1000000. We have PCI bus drivers
return -1000 and -10000 to establish a pecking order and we don't want
catch-all or match-all drivers to attach instead of them.

With this change poto(4) can be compiled into the kernel (or preloaded
from the loader), without impact.

9 years agoTurns out amd64 is hit too by ix. When it works, turn it back on.
imp [Sat, 6 Jun 2015 17:08:06 +0000 (17:08 +0000)]
Turns out amd64 is hit too by ix. When it works, turn it back on.

9 years agoRevert previous change. The magical constants can't be changed
marcel [Sat, 6 Jun 2015 17:04:36 +0000 (17:04 +0000)]
Revert previous change. The magical constants can't be changed
(easily) without having to go to other drivers to change the
magical return values. This wouldn't be so bad if there were
proper defines for these constants.

In particular dev/acpica/acpi_pcib_pci.c returns -1000 as the
probe priority and it's expected that this driver gets to
attach over the common PCI bus drivers.

9 years agolibdtrace: allow D libraries to declare dependencies on kernel modules
markj [Sat, 6 Jun 2015 16:47:45 +0000 (16:47 +0000)]
libdtrace: allow D libraries to declare dependencies on kernel modules

The "depends_on module" pragma can be used to declare a dependency on a
DTrace module, which for kernel probes corresponds to a KLD. Such
dependencies cannot be checked if the KLD is compiled into the kernel.
Therefore, allow a module dependency to be satisfied if either a kernel
module or a KLD with the specified name is loaded.

Differential Revision: https://reviews.freebsd.org/D2653
Reviewed by: gnn, rpaulo
Reported by: gnn

9 years agoix module doesn't compile on i386, so remove it from the build.
imp [Sat, 6 Jun 2015 16:45:59 +0000 (16:45 +0000)]
ix module doesn't compile on i386, so remove it from the build.
It can be restored when it builds again.

9 years agoMap the LAW for the RouterBoard's NAND LBC memory.
jhibbits [Sat, 6 Jun 2015 16:38:40 +0000 (16:38 +0000)]
Map the LAW for the RouterBoard's NAND LBC memory.

Without creating a LAW entry, any access to the NAND hangs the CPU.

The original intent was to add a quirk to map all of the RouterBoard's LBC
address space in one shot, which would fix it for both NAND and the CF, and
that's probably still in the cards.  However, for now, this makes NAND usable
without a separate hack.

Things left before the RouterBoard can run standalone:
* Add partitions to the NAND (not specified by the FDT, which we currently
  require).
* Create a YAFFS partition for the kernel.  The Mikrotik boot loader requires a
  4MB partition at the beginning of NAND, with a file called 'kernel' in the
  root.

9 years agounionfs: fix suspendability check bugs
markj [Sat, 6 Jun 2015 16:36:13 +0000 (16:36 +0000)]
unionfs: fix suspendability check bugs

- MNTK_SUSPENDABLE is set in mnt_kern_flag, not mnt_flag.
- The lower layer of a unionfs mount is read-only, so the mount should
  be suspendable iff the upper layer is suspendable.
- Remove a couple of superfluous comments.

Differential Revision: https://reviews.freebsd.org/D2714
Reviewed by: kib, mjg

9 years agoAdd proto_busdma.c to the module.
marcel [Sat, 6 Jun 2015 16:20:39 +0000 (16:20 +0000)]
Add proto_busdma.c to the module.

9 years agoAdd DMA tag management to the C library and Python binding.
marcel [Sat, 6 Jun 2015 16:14:03 +0000 (16:14 +0000)]
Add DMA tag management to the C library and Python binding.

9 years agoDMA support part 1: DMA tag create & destroy
marcel [Sat, 6 Jun 2015 16:09:25 +0000 (16:09 +0000)]
DMA support part 1: DMA tag create & destroy

Create a special resource (= device special file) for management
of tags and maps, as well as for mapping memory into the address
space. DMA resources are managed using the PROTO_IOC_BUSDMA ioctl.
Part 1 implements tag creation, derivation and destruction.

9 years agoDon't return -10000 as the probe priority. That's lower than what
marcel [Sat, 6 Jun 2015 15:51:11 +0000 (15:51 +0000)]
Don't return -10000 as the probe priority. That's lower than what
BUS_PROBE_HOOVER is. Drivers like proto(4), when compiled into the
kernel or preloaded, will render your system useless by virtue of
attaching to your PCI busses.

Return BUS_PROBE_GENERIC instead. It's just the next priority up
from BUS_PROBE_HOOVER. No other meaning has been give to its use.
While BUS_PROBE_DEFAULT seems like a better candidate, it's hard
not to think that there must be some reason why these drivers
return -10000 in the first place.

Differential Revision: D2705

9 years agoInclude a header required for vtophys().
br [Sat, 6 Jun 2015 14:26:40 +0000 (14:26 +0000)]
Include a header required for vtophys().

9 years agoRemove useless WARNS
bapt [Sat, 6 Jun 2015 13:49:54 +0000 (13:49 +0000)]
Remove useless WARNS

9 years agoRemove WARNS atrun builds fine with clang and gcc
bapt [Sat, 6 Jun 2015 13:20:02 +0000 (13:20 +0000)]
Remove WARNS atrun builds fine with clang and gcc

9 years agoAdd const to the copyright variable
bapt [Sat, 6 Jun 2015 13:13:39 +0000 (13:13 +0000)]
Add const to the copyright variable
Bump WARNS to level 2

9 years agoRemove WARNS keylogin build fine with clang and gcc
bapt [Sat, 6 Jun 2015 13:09:49 +0000 (13:09 +0000)]
Remove WARNS keylogin build fine with clang and gcc

9 years agoBump WARNS level to 1
bapt [Sat, 6 Jun 2015 13:08:48 +0000 (13:08 +0000)]
Bump WARNS level to 1

9 years agoRemove unused variable
bapt [Sat, 6 Jun 2015 13:08:31 +0000 (13:08 +0000)]
Remove unused variable

9 years agoMake global variables static
bapt [Sat, 6 Jun 2015 12:43:05 +0000 (12:43 +0000)]
Make global variables static
Remove WARNS from Makefile

9 years agoBump level WARNINGS to 3
bapt [Sat, 6 Jun 2015 12:41:25 +0000 (12:41 +0000)]
Bump level WARNINGS to 3

9 years agoMake global variables static
bapt [Sat, 6 Jun 2015 12:39:00 +0000 (12:39 +0000)]
Make global variables static
Remove WARNS from Makefile

9 years agoRemove WARNS vtfontcvt builds find with clang and gcc with maximum level warning
bapt [Sat, 6 Jun 2015 12:34:59 +0000 (12:34 +0000)]
Remove WARNS vtfontcvt builds find with clang and gcc with maximum level warning

9 years agoFix history
bapt [Sat, 6 Jun 2015 12:10:10 +0000 (12:10 +0000)]
Fix history

9 years agoFix HISTORY and add AUTHORS section
bapt [Sat, 6 Jun 2015 12:08:10 +0000 (12:08 +0000)]
Fix HISTORY and add AUTHORS section

Obtained from: OpenBSD (by schwarze@)

9 years agoFix history, add AUTHORS section
bapt [Sat, 6 Jun 2015 12:04:38 +0000 (12:04 +0000)]
Fix history, add AUTHORS section

Obtained from: OpenBSD (by schwarze@)

9 years agoComplete documenting the HISTORY
bapt [Sat, 6 Jun 2015 12:01:35 +0000 (12:01 +0000)]
Complete documenting the HISTORY

Obtained from: OpenBSD (by schwarze@)

9 years agoFix history (appeared in 1BSD)
bapt [Sat, 6 Jun 2015 11:58:19 +0000 (11:58 +0000)]
Fix history (appeared in 1BSD)

Obtained from: OpenBSD (by schwarze@)

9 years agoComplete documenting the HISTORY of what remains of the 1BSD heritage
bapt [Sat, 6 Jun 2015 11:55:35 +0000 (11:55 +0000)]
Complete documenting the HISTORY of what remains of the 1BSD heritage

Obtained from: OpenBSD (by schwarze@)

9 years agoFix history: colrm(1) appeared in 1BSD not 3.0BSD
bapt [Sat, 6 Jun 2015 11:42:43 +0000 (11:42 +0000)]
Fix history: colrm(1) appeared in 1BSD not 3.0BSD
Add Author section

Obtained from: OpenBSD (change by schwarze@)

9 years agoAdd myself (brnrd / Bernard Spil) to committers docs
brnrd [Sat, 6 Jun 2015 11:19:21 +0000 (11:19 +0000)]
Add myself (brnrd / Bernard Spil) to committers docs

- Add myself and vsevolod (mentor) to committers-ports.dot
- Add koobs and vsevolod as mentors to committers-ports.dot

Submitted by: brnrd@freebsd.org
Approved by: vsevolod (mentor), koobs (mentor)
Differential Revision: https://reviews.freebsd.org/D2648

9 years agoSet the correct register when calling sigprocmask in longjmp.
andrew [Sat, 6 Jun 2015 10:28:38 +0000 (10:28 +0000)]
Set the correct register when calling sigprocmask in longjmp.

Submitted by: Patrick Wildt <patrick@bitrig.org>
Obtained from: drahn@bitrig.org