Commit Graph

255746 Commits

Author SHA1 Message Date
christos 36038078db prevent assert on unmount. 2018-01-13 22:06:21 +00:00
bouyer bc90bc10ae Also set ih_realfun/ih_realarg in Xen's intr_establish_xname() as
intr_disestablish() use them.
Should fix the panic at device detach time (esp. at shutdown time).
2018-01-13 20:36:06 +00:00
uwe 61017f5783 Use .Ar to mark up the variable parts of sysctl nodes. 2018-01-13 19:57:35 +00:00
uwe cb316becc0 Try to improve markup. 2018-01-13 19:50:52 +00:00
uwe e8f73b2316 Fix semantic markup. 2018-01-13 18:57:48 +00:00
jdolecek f79b91c0fc fix swapped comments for EFER LME and LMA 2018-01-13 17:55:57 +00:00
uwe dde1c9cadb Fix semantic markup. 2018-01-13 17:35:33 +00:00
reinoud bcbdff55f3 Make NetBSD/usermode link again! 2018-01-13 16:20:33 +00:00
reinoud bf890827c2 Implement dummy process_read_dbreg() and process_write_dbreg() used in x86 2018-01-13 15:15:03 +00:00
bouyer 4a5416ecc9 Needs cpu_init_tss() for application processor too. 2018-01-13 14:48:13 +00:00
uwe 5b547519fa Miscellaneous formatting tweaks. 2018-01-13 14:47:58 +00:00
reinoud abd507e504 Add dbreg structure prototype needed for x86_64 2018-01-13 14:39:15 +00:00
uwe 806a4be8ea Improve formatting of "Other options" section. Use -compact list to
squash groups of options together.  The price for that is that now
items need explicit .Pp but the result looks more readable.
2018-01-13 14:34:00 +00:00
bouyer 0d0135df3a Xen now needs cpu_init_tss() too. Makes XEN3PAE_DOMU boot again. 2018-01-13 14:12:57 +00:00
uwe 6df3f1ceb3 Fix fancy "options" lines as mandoc seems to interpret some of them
differently than nroff does.  Use \*q for literal double quotes,
protect literal space.
2018-01-13 14:11:40 +00:00
uwe 47d66394b3 Fix trailing whitespace. 2018-01-13 14:00:50 +00:00
reinoud c14455fea7 Compilation of a kernel outside the build.sh framework exposed the
uninitialised usage of `error' in interrupt_avert_intr(). In theory it can
reach the `out' label without `error' initialized. No idea if that really ever
happens in practice.
2018-01-13 13:53:36 +00:00
uwe a83bb4c355 Move device lines to the top of the synopsis section. Group related
options.  Drop the count from the wsmux declaration, it hasn't been
necessary for ages.
2018-01-13 13:49:10 +00:00
christos 11e1cc2161 added commented out AUTOFS pseudo-device entries 2018-01-13 12:38:16 +00:00
christos d131c53716 add more __dead/EXIT_FAILURE 2018-01-13 12:36:35 +00:00
uwe 7746691c80 Fix another column width. 2018-01-13 12:20:49 +00:00
uwe 19051f4362 Use .Fn when describing C macros 2018-01-13 12:14:26 +00:00
uwe 41e2c287e6 Fix column width in postscript output. 2018-01-13 12:06:48 +00:00
reinoud 71340b7fa9 Keep up with changes in ld(4): adding ioctl handling on the ld(4) instead of
using the old dedicated ldflush() function.
2018-01-13 10:27:58 +00:00
nat ffcb8cef5c Set size of mtusize before calling getsockopt to obtain mtu size. 2018-01-13 10:20:45 +00:00
reinoud 7ede974ba2 Add the missing strategy argument of ldattach() 2018-01-13 10:08:35 +00:00
pgoyette ae2ebaa7a5 Add: BIDI = boy, I did it 2018-01-13 03:35:40 +00:00
macallan 49265ef4d6 enable font loading 2018-01-12 23:38:24 +00:00
kamil 0e68b604ab Fix an unitialized memory read bug in ps(1)
rawcpu of type int, is declared inside main(){} and it can be passed as
uninitialized to setpinfo().
The setpinfo() function has a switch checking the value of rawcpu:

  if (!rawcpu)
    pi[i].pcpu /= 1.0 - exp(ki[i].p_swtime * log_ccpu);

rawcpu is set to 1 with the command line argument "-C".

   -C           Change the way the CPU percentage is calculated by using a
                "raw" CPU calculation that ignores "resident" time (this
                normally has no effect).

Bug reproducible with an invocation: "ps u". It hides with "ps uC".

Initialize rawcpu by default to 0, before the getopt(3) machinery.

Detected with MSan running on NetBSD/amd64.

Sponsored by <The NetBSD Foundation>
2018-01-12 23:01:14 +00:00
jakllsch 31c83f40e5 We always need bp->b_resid initialized before we try to toss the transfer. 2018-01-12 19:38:52 +00:00
para 5a7bbe7301 fix comment
pool stats are listed 'vmstat -m' not 'vmstat -i'
2018-01-12 18:54:37 +00:00
jakllsch 83dc325d38 Add clocks gates and divisors for H3/H5 SPI[01] controllers. 2018-01-12 18:22:35 +00:00
christos 30c863de44 Set EV_ONESHOT to prevent rescheduling
XXX: pullup-8
2018-01-12 17:58:51 +00:00
christos 47cdb20d40 missing printflike 2018-01-12 17:54:36 +00:00
mrg c0b6dc1bfc fix hang at 4B microseconds (1h12 or so), and simplify part of the previous 2018-01-12 09:47:44 +00:00
maxv 7e24d946f2 Split svs_page_add in two, one half will be used for other purposes, and
update a comment.
2018-01-12 09:12:01 +00:00
maxv ea5cba5f01 Remove unused. 2018-01-12 06:24:43 +00:00
mrg 0b66f15894 fix time goes backwards problems on sparc.
there are a few things here:
- there's a race between reading the limit register (which clears
  the interrupt and the limit bit) and increasing the latest offset.
  this can happen easily if an interrupt comes between the read and
  the call to tickle_tc() that increases the offset (i obverved this
  actually happening.)
- in early boot, sometimes the counter can cycle twice before the
  tickle happens.

to handle these issues, add two workarounds:
- if the limit bit isn't set, but the counter value is less than
  the previous value, and the offset hasn't changed, use the same
  fixup as if the limit bit was set.  this handles the first case
  above.
- add a hard-workaround for never allowing returning a smaller
  value (except during 32 bit overflow): if the result is less than
  the last result, add fixups until it does (or until it would
  overflow.)

the first workaround fixes general run-time issues, and the second
fixes issues only seen during boot.

also expand some comments in timer_sun4m.c and re-enable the sun4m
sub-microsecond tmr_ustolim4m() support (but it's always called with
at least 'tick' microseconds, so the end result is the same.)
2018-01-12 06:01:33 +00:00
mrg f68267163e fix several KASSERT()s and locking in a few places.
fixes DIAGNOSTIC kernels and still plays.
2018-01-12 05:59:20 +00:00
nat 91843a6b25 Allow open of audioctl devices whilst audio is open with the mixer
disabled.

XXX pullup -8
2018-01-12 04:10:10 +00:00
christos d7d7f74c03 sprinkle __dead, use EXIT_{SUCCESS,FAILURE} 2018-01-11 13:44:26 +00:00
maxv 6f93fcf6fc Introduce a new svs_page_add function, which can be used to map in the user
space a VA from the kernel space.

Use it to replace the PDIR_SLOT_PCPU slot: at boot time each CPU creates
its own slot which maps only its own pcpu_entry plus the common area (IDT+
LDT).

This way, the pcpu areas of the remote CPUs are not mapped in userland.
2018-01-11 13:35:15 +00:00
maxv 096556c986 The uarea must always be page-aligned. 2018-01-11 11:15:34 +00:00
maxv b04c8d4fdc Add ist0 to pcpu_entry. 2018-01-11 10:38:13 +00:00
maxv 17f3460377 Initialize ist0 in cpu_init_tss. On amd64 this is the DDB stack, and it has
nothing to do with ci_intrstack. While here, style, and don't forget to
pass UVM_KMF_ZERO in uvm_km_alloc.
2018-01-11 10:30:26 +00:00
pgoyette bf5029f187 kern.module.verbose is a boolean, not an integer. We had it right in the
text following the table, but the table itself was wrong.

Thanks to martin@ for pointing this out.
2018-01-11 09:53:55 +00:00
msaitoh 7ecbd9a2cc Changing CR4 register may change cpuid values. For example, setting
CR4_OSXSAVE sets CPUID2_OSXSAVE. The CPUID2_OSXSAVE is in ci_feat_val[1],
so update it after changing CR4.
2018-01-11 09:18:16 +00:00
maxv 759fb17c3d Declare new SVS_* variants: SVS_ENTER_NOSTACK and SVS_LEAVE_NOSTACK. Use
SVS_ENTER_NOSTACK in the syscall entry point, and put it before the code
that touches curlwp. (curlwp is located in the direct map.)

Then, disable __HAVE_CPU_UAREA_ROUTINES (to be removed later). This moves
the kernel stack into pmap_kernel(), and not the direct map. That's a
change I've always wanted to make: because of the direct map we can't add
a redzone on the stack, and basically, a stack overflow can go very far
in memory without being detected (as far as erasing all of the system's
memory).

Finally, unmap the direct map from userland.
2018-01-11 09:00:04 +00:00
wiz acf36137d0 New sentence, new line. Remove empty macro. 2018-01-11 08:59:27 +00:00
ozaki-r 11f91074e6 Change the prefix of test names to ipsecif_ to distinguish from tests for ipsec(4) 2018-01-11 07:58:22 +00:00