Commit Graph

246824 Commits

Author SHA1 Message Date
mlelstv
5773e158f4 Extend dkdriver interface with a d_firstopen function. This is called
by dk_open() for the first opener and mirrors the use of the d_lastclose
callback.

Bump kernel version for the interface change.
2016-11-28 08:42:20 +00:00
msaitoh
399346f34a Fix vlan check bug in ixv_setup_vlan_support(). 2016-11-28 08:31:17 +00:00
rin
cc1877ba3a Calculate CPU usage (pcpu) once per process if it is required. This change
significantly improves performance for slow machines when output is sorted
by pcpu.

ok martin
2016-11-28 08:21:10 +00:00
rin
b095bb75a7 for donlist{,_sysctl}:
- obtain log_ccpu = log(ccpu) rather than ccpu itself
- use common default values and warn users appropriately when errors occur
ok martin
2016-11-28 08:19:23 +00:00
rin
078edf9ccc KNF
ok martin
2016-11-28 08:18:27 +00:00
ozaki-r
b8a0fa35f1 Use redirection instead of pipeline
This is a workaround for PR bin/51667.
2016-11-28 07:29:56 +00:00
knakahara
615120480e fix build of ixv enabled NO_PCI_MSI_MSIX option. 2016-11-28 06:09:19 +00:00
knakahara
d018cf3a86 fix build of amd64/i386 with NO_PCI_MSI_MSIX option. 2016-11-28 05:00:41 +00:00
mrg
31f9789f00 fix non-DIAG builds. 2016-11-28 04:18:08 +00:00
msaitoh
470b7282b1 FreeBSD r280182 made new file ix_txrx.c and moved ixgbe.c and ixv's common
code into it. Before sync with whole of them, just move ixgbe.c and ixv.c's
common code into ix_txrx.c from ixgbe.c. In this commit, only ixgbe.c is split
into the device dependent part and the common part. ixv.c isn't change to make
this commit no functional change. To use ixv.c with ix_txrx.c, it's required
to modify the common part's API and functions themselves.

 This commit is done to make the next change easy to understand.
2016-11-28 02:23:33 +00:00
joerg
cf9fc2baf8 Don't check parent capabilities when a parent interface hasn't been
assigned.
2016-11-28 00:39:03 +00:00
maya
506421b347 Do not attempt to pass -llinfo to route.
llinfo was removed, and the command fails because of it.
2016-11-27 19:04:40 +00:00
christos
787783f1e0 switch vax to new binutils and gdb. 2016-11-27 18:53:05 +00:00
christos
a6a34af0f6 regen for vax 2016-11-27 18:52:05 +00:00
christos
e1c8b4e692 fix printf formats for time_t 2016-11-27 17:06:09 +00:00
kamil
266caf90fb Add accessors for available x86 Debug Registers
There are 8 Debug Registers on i386 (available at least since 80386) and 16
on AMD64. Currently DR4 and DR5 are reserved on both cpu-families and
DR9-DR15 are still reserved on AMD64. Therefore add accessors for DR0-DR3,
DR6-DR7 for all ports.

Debug Registers x86:
 * DR0-DR3  Debug Address Registers
 * DR4-DR5  Reserved
 * DR6      Debug Status Register
 * DR7      Debug Control Register
 * DR8-DR15 Reserved

Access the registers is available only from a kernel (ring 0) as there is
needed top protected access. For this reason there is need to use special
XEN functions to get and set the registers in the XEN3 kernels.

XEN specific functions as defined in NetBSD:
 - HYPERVISOR_get_debugreg()
 - HYPERVISOR_set_debugreg()

This code extends the existing rdr6() and ldr6() accessor for additional:
 - rdr0() & ldr0()
 - rdr1() & ldr1()
 - rdr2() & ldr2()
 - rdr3() & ldr3()
 - rdr7() & ldr7()

Traditionally accessors for DR6 were passing vaddr_t argument, while it's
appropriate type for DR0-DR3, DR6-DR7 should be using u_long, however it's
not a big deal. The resulting functionality should be equivalent so stick
to this convention and use the vaddr_t type for all DR accessors.

There was already a function defined for rdr6() in XEN, but it had a nit on
AMD64 as it was casting HYPERVISOR_get_debugreg() to u_int (32-bit on
AMD64), truncating result. It still works for DR6, but for the sake of
simplicity always return full 64-bit value.

New accessors duplicate functionality of the dr0() function available on
i386 within the KSTACK_CHECK_DR0 option. dr0() is a specialized layer with
logic to set appropriate types of interrupts, now accessors are designed to
pass verbatim values from user-land (with simple sanity checks in the
kernel). At the moment there are no plans to make possible to coexist
KSTACK_CHECK_DR0 with debug registers for user applications (debuggers).

     options KSTACK_CHECK_DR0
     Detect kernel stack overflow using DR0 register.  This option uses DR0
     register exclusively so you can't use DR0 register for other purpose
     (e.g., hardware breakpoint) if you turn this on.

The KSTACK_CHECK_DR0 functionality was designed for i386 and never ported
to amd64.

Code tested on i386 and amd64 with kernels: GENERIC, XEN3_DOMU, XEN3_DOM0.

Sponsored by <The NetBSD Foundation>
2016-11-27 14:49:21 +00:00
kamil
264c910082 Fix rdr6() function on amd64
According to the AMD64 SysV ABI the first returned value is passed in RAX,
not in RDI. Actually RDI is used for the first argument passed to a
function.

So far this function was dead code, it will be used for a ptrace(2)
feature to support CPU watchpoints.

The rdr6() function reads state of the DR6 register and returns its value.

Sponsored by <The NetBSD Foundation>
2016-11-27 02:32:56 +00:00
maya
0dc211a8da spaces to tabs 2016-11-27 00:21:43 +00:00
dholland
aa08bfea54 More of previous. 2016-11-26 21:17:06 +00:00
dholland
a714102aaa fix comment about initialization-time calls; ok joerg 2016-11-26 20:38:20 +00:00
nonaka
42e0ec980f PCI MSI/MSI-X manipulation stub functions are not provided as weak alias. 2016-11-26 15:03:23 +00:00
christos
c0404860d1 mention PAX_SEGVGUARD dependency on FILEASSOC 2016-11-26 13:59:45 +00:00
christos
1b50694b4e Mention fileassoc dependencies 2016-11-26 13:54:34 +00:00
mlelstv
2dbabc22a3 size routine returns -1 on error, not an error code. 2016-11-26 12:32:03 +00:00
njoly
71f142f40a +librumpnet_vlan.so.0.0.debug 2016-11-26 11:36:38 +00:00
njoly
c48e94e5c7 Fix NetBSD keyword expansion. 2016-11-26 11:20:09 +00:00
skrll
3b191b8ea9 regen 2016-11-26 09:37:39 +00:00
skrll
bf61fd495e Add an axe(4) from FreeBSD 2016-11-26 09:36:43 +00:00
skrll
b44ec47371 Trailing whitespace 2016-11-26 09:35:30 +00:00
kamil
f97e335d53 Add: PCB process control block 2016-11-26 03:33:34 +00:00
ozaki-r
9ca7228bde Skip dumping if no bus is used 2016-11-26 03:20:42 +00:00
ozaki-r
6d9a9bf113 Add basic tests for vlan(4) 2016-11-26 03:19:48 +00:00
ozaki-r
6adeabf576 Rumpify vlan(4) 2016-11-26 03:17:58 +00:00
kamil
83cbb4a834 Print integers as hex with %#x rather than with plain %x
# if used with o, x or X specifiers the value is preceeded with 0, 0x or 0X
respectively for values different than zero.

Noted by <christos>

Sponsored by <The NetBSD Foundation>
2016-11-26 02:34:49 +00:00
jnemeth
6532ac6b7a Set path for includes_HEADERS. Change suggested by christos@. 2016-11-26 02:12:18 +00:00
dholland
59abaf22ec 1.6 was the first amd64 release. (although it didn't really work too well
before -5)
2016-11-26 01:09:33 +00:00
dholland
4399963d75 Note that really old compat is only useful for running 32-bit binaries.
XXX: someone please indicate what the oldest possible extant x86_64
binaries are; I can't find an authoritative source.
2016-11-26 00:34:01 +00:00
dholland
783f19ce78 fileassoc is used by PaX as well as veriexec - update note accordingly. 2016-11-25 23:33:46 +00:00
dholland
e850baa794 sort iwm* before iwn* 2016-11-25 23:15:28 +00:00
dholland
b4fd4c7a4f The compat options should all be in one block. 2016-11-25 23:06:58 +00:00
christos
5235206633 PR/51652: Sevan Janiyan: makefs dies due to segmentation fault
Don't dereference NULL when running out of nodes during rename.
2016-11-25 23:02:44 +00:00
kamil
af6e917d6c Fix several printf(3)-like functions usage with printing integers
Integers as hex shall no be printed with PRIx8, but with plain "x".

Pointed by <christos>

Sponsored by <The NetBSD Foundation>
2016-11-25 20:01:05 +00:00
tsutsui
e89ab04e6a Add a missing newline in help message. 2016-11-25 17:37:04 +00:00
skrll
1f1b3d821b regen 2016-11-25 15:37:19 +00:00
skrll
055f224744 Add an axe(4) device from OpenBSD 2016-11-25 15:35:35 +00:00
maxv
54a825ed9a Remove this comment and allow the beginning of .data to be mapped with
large pages. The issue is fixed, the lapic va is dynamically allocated
now.
2016-11-25 14:26:53 +00:00
maxv
b487884215 Move the virtual address of the LAPIC page out of the data segment on amd64
and i386. The old design was error-prone, and it didn't allow us to map the
data segment with large pages.

Now, the VA is allocated dynamically in the pmap bootstrap code, and entered
manually later. We go from using &local_apic to using *local_apic_va, and we
therefore need one more level of indirection in the asm code.

Discussed on tech-kern.
2016-11-25 14:12:55 +00:00
christos
1394df1c79 cast to register_t because not all 'struct reg' members are the right type. 2016-11-25 14:10:31 +00:00
msaitoh
9908098057 Remove #ifdef NETBSD_MSI_OR_MSIX to be simple. ixv(4) isn't attached if
__HAVE_PCI_MSI_MSIX isn't set because MSI-X must be used.
2016-11-25 13:33:24 +00:00
skrll
a7c71d30d6 +#include "opt_usb.h" 2016-11-25 12:56:29 +00:00