Commit Graph

249444 Commits

Author SHA1 Message Date
maxv
92ee76edc0 PRIu64 2017-03-10 15:06:20 +00:00
maxv
99560af1ad PMCs for amd64 - still disabled, like i386. 2017-03-10 14:54:12 +00:00
maxv
def5e125dc Move pmc.c into x86/, it can be shared with amd64. 2017-03-10 14:40:56 +00:00
maxv
55435ad083 unused 2017-03-10 13:42:47 +00:00
maxv
65d7f88d0e Switch to per-CPU PMC results, and completely rewrite the pmc(1) tool. Now
the PMCs are system-wide, fine-grained and more tunable by the user.

We don't do application tracking, since it would require to store the PMC
values in mdproc and starting/stopping the counters on each context switch.
While this doesn't seem to be particularly difficult to achieve, I don't
think it is really interesting; and if someone really wants to measure
the performance of an application, they can simply schedctl it to a cpu
and look at the PMC results for this cpu.

Note that several options are implemented but not yet used.
2017-03-10 13:09:11 +00:00
maya
cfef4500d4 Revert to version 1.55 of map_object.c. This reverts:
"really unmap the gap between the text and data rather than just removing
all access with mprotect().  the latter results in the kernel having to
keep track of that range separately since the permissions are different.
avoid calling mmap() with a size of zero."

As per toolchain/52054: src/libexec/ld.elf_so update breaks everything,
this commit is very broken for some people (but not others). chs mentioned
he has a fix, but best not to leave -current broken in the meantime.
2017-03-10 09:13:49 +00:00
martin
e20ae6cdb8 PR misc/52058: proc_trampoline became lwp_trampoline.
Sort.
2017-03-10 09:12:46 +00:00
martin
2f5e87a58e PR misc/52058: replace all proc_trampoline with lwp_trampoline belatedly. 2017-03-10 09:08:47 +00:00
ryo
fb766ff818 need to membar_producer() *before* switching.
pointed out by riastradh@, thanks
2017-03-10 07:35:58 +00:00
salazar
f7d42cd8c5 add my name to distrib/notes/common/main 2017-03-10 04:13:43 +00:00
christos
027a0f2366 fix MIN/MAX confusion. 2017-03-10 02:21:37 +00:00
macallan
47dd052817 attach display devices first so we see more kernel output on shark 2017-03-10 00:26:43 +00:00
macallan
26d02ed1aa - provide access to PCI memory space
- pass a DMA tag. Won't work but at least we don't crash anymore
TODO:
- magic number reduction. Seriously.
- figure out why DMA doesn't work

with this cards that don't need DMA or more than 1MB of MMIO space should work
2017-03-10 00:22:01 +00:00
macallan
4f80162adf if we have vlpci, map in 1MB worth of PCI memory space 2017-03-10 00:13:08 +00:00
macallan
99510641d1 include files.usb, vlpci needs-flag 2017-03-10 00:09:13 +00:00
tsutsui
9184265ae6 Add a driver for LUNA's front panel LCD. Ported from OpenBSD/luna88k.
Reviewed by enami@.  Tested by Naruaki Etomi and me.

A 68k LUNA with this driver will be demonstrated at AsiaBSDCon NetBSD booth
by Etomi-san, with LUNA-88K2 running OpenBSD/luna88k by Kenji Aoyama.
2017-03-09 14:05:58 +00:00
wiz
56a39ce52a Bump date for previous. Use American spelling. 2017-03-09 11:39:43 +00:00
maya
7ab45b5b71 Remove redundant null check before free. it is safe to free(NULL)
While here, clear up odd whitespace issue. NFC
2017-03-09 11:39:41 +00:00
hannken
06a21e4c73 Protect genfs_do_putpages() against vnodes disappearing during
a forced mount update from read-write to read-only.
2017-03-09 10:10:02 +00:00
knakahara
1ec2dc1686 ifp->if_transmit() must free mbuf even if error occurred.
Add missing m_freem(m) to if_nulltransmit().
Below ifp->if_transmit() implementations are already added m_freem(m) properly.
    - wm(4)
    - ixg(4)
    - ixv(4)
    - pppoe(4)
    - gif(4)
    - l2tp(4)

pointed out by ozaki-r@n.o, thanks.
2017-03-09 09:57:36 +00:00
roy
074272399a Only check target address collision if the sender address is the null
address (ie a DAD probe) or our matching address is either TENTATIVE
or DUPLICATED.
2017-03-09 08:41:56 +00:00
maya
06ee305e9a Clarify ttm state transitions tt_unpopulated<->tt_unbound<->tt_bound.
Assert it, too, and don't handle other cases.

We can add the assertion to ttm_agp_tt_unpopulate because it is called by
{nouveau,radeon}_ttm_tt_unpopulate, which is generically called
ttm_tt_unpopulate.

And the sole caller to ttm_tt_unpopulate (ttm_tt_destroy) only does so if the
state is unbound. the other caller is in a !NetBSD block.

We can add the assertion to ttm_agp_tt_populate and avoid handling the
!unpopulated case because the sole callers are {nouveau,radeon}_ttm_tt_populate
both of which return early in the !unpopulated case.

We can change the assertion on ttm_tt_wire because it is solely called by
ttm_bus_dma_populate, which already asserts that it is the unpopulated case.

from riastradh
2017-03-09 08:27:18 +00:00
maya
95f78b5be5 oops, copied the code from the wrong diff. ... unbreak the build, still
doing the same thing.
2017-03-09 08:05:21 +00:00
maya
023a9fa376 Restore unpopulated state on fail1 error path. I shouldn't have committed
it separately.

from riastradh@
2017-03-09 07:55:23 +00:00
maya
c36d1d9a25 Remove redundant handling for tt_unbound case, and assert that it is the
unpopulated case.

All callers of ttm_bus_dma_populate (ttm_agp_tt_populate,
radeon_ttm_tt_populate, nouveau_ttm_tt_populate) return early if it isn't
unpopulated.

from riastradh@
2017-03-09 07:50:50 +00:00
maya
e45033a08f Mark the state as unbound a bit earlier, to avoid triggering an assert in
the fail1 error path.

PR kern/52048: radeondrmkms: ttm->state == tt_unbound assertion
2017-03-09 07:42:36 +00:00
ozaki-r
1d5210cbd3 Tidy up again 2017-03-09 06:21:54 +00:00
ozaki-r
355df0ff57 Remove unnecessary splnet 2017-03-09 04:37:23 +00:00
chs
cf66c8999a really unmap the gap between the text and data rather than just removing
all access with mprotect().  the latter results in the kernel having to
keep track of that range separately since the permissions are different.
avoid calling mmap() with a size of zero.
2017-03-09 00:43:50 +00:00
chs
09187d6c0f in pmap_get_ptp(), if we need to allocate multiple new ptp levels
and succeed in allocating some pages but fail to get them all,
free any ptps we did allocate before returning.
also, only consume kernel-reserve pages if pmap_enter()
is called without PMAP_CANFAIL set, to help avoid deadlocking
during high memory pressure.
2017-03-09 00:21:55 +00:00
chs
037063a2ac use warnx() rather than warn() in a case where errno is not relevant. 2017-03-09 00:18:23 +00:00
chs
f517f4124f mention KDTRACE_HOOKS. 2017-03-09 00:17:32 +00:00
chs
b2e60798fc improve readability of TRAP_SIGDEBUG info.
also print the trapframe info like amd64 does.
2017-03-09 00:16:51 +00:00
chs
055f0eb483 improve readability of TRAP_SIGDEBUG info and add fsbase/gsbase. 2017-03-09 00:16:07 +00:00
chs
8a5bd5b187 set signo and code correctly for signals triggered by uvm_fault() errors. 2017-03-09 00:15:06 +00:00
chs
09fa8e0280 use kpreempt_disable() rather than splsoftclock() to disable preemption. 2017-03-09 00:14:03 +00:00
kre
b8b755e016 Do it properly. Thanks wiz. 2017-03-08 22:55:20 +00:00
kre
5d74cf5159 /usr/include/pmc.h is installed on i386 iff src/lib/libpmc/pmc_i386.c exists
(which it no longer does - only arm has a similar .c file so only arm
builds install pmc.h in /usr/include now)

This should unbreak the i386 build.
2017-03-08 21:56:05 +00:00
maxv
28df5cbbb5 A few changes:
* Use markers to reduce false sharing.
 * Remove XENDEBUG_SYNC and several debug messages, they are just useless.
 * Remove xen_vcpu_*. They are unused and not optimized: if we really
   wanted to flush ranges we should pack the VAs in a mmuext_op array
   instead of performing several hypercalls in a loop.
 * Start removing PG_k.
 * KNF, reorder, simplify and remove stupid comments.
2017-03-08 18:00:49 +00:00
jakllsch
d68ee6e41f Avoid tripping on opposite-endian sysconfig/fex blobs. 2017-03-08 17:06:35 +00:00
maxv
98b12bdd4b Mark as obsolete instead of removing (from Thomas Klausner). 2017-03-08 16:52:17 +00:00
maxv
279ed0db08 Add a version argument, set to 1, and check it in usr.bin/pmc. Use uint32_t
instead uint8_t since we now need 12bit selectors (10h family). And while
here KNF.
2017-03-08 16:42:27 +00:00
maxv
f8e693e577 Deprecate the pmc functions in libi386. The parameters will be updated,
and we are not interested in maintaining this anyway. Now i386's pmc
interface is opaque, which is good.
2017-03-08 16:09:27 +00:00
maxv
0446600dd7 We don't use libi386 anymore. 2017-03-08 16:05:29 +00:00
maxv
a2375778e5 Remove i386 from libpmc; it has its own interface (sysarch), and we won't
maintain compatibility.

Verily, I cannot build a distribution now, so I'm committing this rather
blindly. This being said, it looks correct enough.
2017-03-08 15:53:00 +00:00
tsutsui
0ba0846790 Fix format. 2017-03-08 11:45:14 +00:00
kardel
b6ca960363 PR kern/52039: use same safeguard as for the 82578 2017-03-08 08:00:09 +00:00
mrg
5c6be7789e build timingsafe_memcpy.c. 2017-03-08 07:45:11 +00:00
ozaki-r
5562362b1a Tidy up the lists 2017-03-08 07:32:58 +00:00
ozaki-r
ab05762cd7 Remove multicast stuffs from the list of Non MP-safe components 2017-03-08 06:59:36 +00:00