Commit Graph

272623 Commits

Author SHA1 Message Date
msaitoh bf613abd37 s/is is/is/ in comment. 2019-12-27 07:02:26 +00:00
msaitoh 74868e2a8b s/recevive/receive/ in comment. 2019-12-27 06:52:43 +00:00
nonaka 9788d54b08 hvn(4): Handle CFI field of VLAN. 2019-12-27 05:59:53 +00:00
nonaka d64fd1df19 hvn(4): Use vlan_{get,set,has}_tag(). 2019-12-27 05:56:42 +00:00
msaitoh 2ed6366cda s/like like/like/ in comment. 2019-12-27 04:50:41 +00:00
ad bfe890c63e PR kern/48044: panic: kernel diagnostic assertion "uvmexp.swpgonly + npages <= uvmexp.swpginuse" failed
swpgonly is updated asynchronously with regard to swap use.  We can't assert
this condition with confidence in the post-5.0 world, at least not without
broader changes.  swpgonly's ultimate use is of a heuristic nature so this
is no problem at all.
2019-12-27 00:46:38 +00:00
kamil a047abdf83 Cherry-pick LLVM upstream patch to fix build of compiler-rt
commit 52b5fe5f45b1908e140e05a4eceaaac7002be768
Author: Kamil Rytarowski <n54@gmx.com>
Date:   Wed Dec 25 04:05:10 2019 +0100

    [compiler-rt] [netbsd] Define _RTLD_SOURCE to fix build

    The TLS base (LWP private pointer) functions are namespaced and
    hidden i.e. inside the _RTLD_SOURCE namespace.
2019-12-27 00:35:05 +00:00
kamil 4d3a90668a Harmonize the namespace of fast TLS base pointer getter functions
Protect __lwp_getprivate_fast() with _RTLD_SOURCE, _LIBC_SOURCE and
__LIBPTHREAD_SOURCE__.

Include in this namespace <sys/tcl.h> and use __BEGIN_DECLS/__END_DECLS
for the sake of consistency.
2019-12-27 00:32:16 +00:00
msaitoh aa22ab9772 Add cas(4). 2019-12-26 17:52:49 +00:00
msaitoh 7ec7eb336d Fix a bug that the driver sometimes incorrectly attach gentbi(4) instead of
gphyter(4) on non-fiber device.

Tested with Sun Quad GigaSwift Ethernet UTP (QGE) (part no. 501-6522) on
amd64. On this environment, the problem frequently had occurred. I also
tested with other 4 cas(4) variants.
2019-12-26 17:51:08 +00:00
msaitoh 00f090f254 Improve flow control. 2019-12-26 15:32:37 +00:00
msaitoh 6db9ca1bea Apply OpenBSD rev. 1.34:
> Set Rx early threshold and Tx DMA thesholds.
 >
 > From Linux via FreeBSD
2019-12-26 15:26:58 +00:00
msaitoh 022cc28eec Fix address of STGE_MaxFrameSize. Same as other OSes. 2019-12-26 15:23:11 +00:00
isaki e2d715c36e Improve and simplify around audio_realloc(). 2019-12-26 11:27:03 +00:00
isaki 22b0add35a Use M_WAITOK instead of M_NOWAIT.
These allocations don't require NOWAIT constraints.
Will fix PR kern/54796.
2019-12-26 11:24:55 +00:00
skrll ccab745f7a Use PIC_IRQBASE_ALLOC for all pic_add calls and track/use each cpu irqbase 2019-12-26 11:09:11 +00:00
kamil 3097490d1b Put ptrace_read_lwpstatus() and process_read_lwpstatus() to a new file
Fixes "no PTRACE" kernel build, in particular zaurus kernel=INSTALL_C700.
2019-12-26 08:52:38 +00:00
skrll 34e695ab0e Whitespace 2019-12-26 08:48:53 +00:00
skrll cb7423f7bc Use PIC_IRQBASE_ALLOC and allow conditional attachment of interrupt
handlers (for RPI4)

(missing from previous commit)
2019-12-26 08:27:43 +00:00
msaitoh 40064e2457 s/lenght/length/ 2019-12-26 04:53:11 +00:00
msaitoh fd43308655 Fix typo in comment. 2019-12-26 04:44:10 +00:00
yamaguchi bf9931110f Fix lack of of sysctl_teardown() in ixl(4) 2019-12-26 03:55:00 +00:00
yamaguchi e7597c7cbc ixl(4) supports IFCAP_CSUM_*_Rx
OKed by msaitoh@n.o.
2019-12-26 03:17:01 +00:00
yamaguchi 271043cbbf Improve DDPRINTF for ixl(4) 2019-12-26 03:08:19 +00:00
msaitoh 157af15806 Update supported device list with part number. From FreeBSD. 2019-12-25 15:56:35 +00:00
kamil c208376fe2 Cast PTRACE_LWP_GETPRIVATE to (void *) through (intptr_t)
Fixes sparc build.
2019-12-25 15:54:02 +00:00
thorpej 9c6d8a8de4 Remove assertions that no longer make sense now that the bus acquire / release
logic is handled by the upper layer.
2019-12-25 14:08:47 +00:00
skrll 3408cd769d Add EARLYCONS=bcm2711 example (commented out) 2019-12-25 10:51:20 +00:00
skrll 33abe87a8a Use PIC_IRQBASE_ALLOC and allow conditional attachment of interrupt
handlers (for RPI4)
2019-12-25 10:49:29 +00:00
kamil 7dea4f94d7 Read TLS base pointer with _lwp_getprivate()
This avoid usage of fast versions that are mostly internal to RTLD.
2019-12-25 02:23:37 +00:00
thorpej 97fb3f4ba0 Revert previous until issues can be sorted out. 2019-12-25 01:19:56 +00:00
joerg 8e5b2c30bd Since pthread_setspecific requires locks, ensure that they are acquired
before fork and dropped in both parent and child. At least Python
depends on TSD after fork, even though it is undefined behavior in
POSIX.
2019-12-25 00:44:45 +00:00
uwe 6c118d6c68 G/c the list of old files that are gone for decades. 2019-12-24 23:41:05 +00:00
kamil bd290c46da Define _RTLD_SOURCE in t_ptrace_wait.c
The __lwp_gettcb_fast() and __lwp_getprivate_fast() functions are
namespaced on a selection of ports.
2019-12-24 21:09:38 +00:00
skrll ce4097d53a Update pic_add to allocate and return an irqbase if passed
PIC_IRQBASE_ALLOC.
2019-12-24 20:40:09 +00:00
skrll 58fb1c2bca Make pic_sourcebase static 2019-12-24 20:37:44 +00:00
kamil b240202ac3 Fix compiler-rt sanitizer build with >= 9.99.30
Cherry-pick (patched):
    [compiler-rt] Adapt for ptrace(2) changes in NetBSD-9.99.30

    Enable compat support for now legacy PT_LWPINFO.
    Support PT_LWPSTATUS and PT_LWPNEXT.

4b8232d4f0
2019-12-24 19:51:00 +00:00
kamil 589ca91f53 Welcome to NetBSD 9.99.30!
Addition of PT_LWPSTATUS, PT_LWPNEXT with compat32 and core(5) support.
2019-12-24 15:20:34 +00:00
kamil 4f79a48470 Introduce PT_LWPSTATUS + PT_LWPNEXT, obsolete PT_LWPINFO
PT_LWPINFO is a legacy ptrace(2) operation that was originally intended
to retrieve the thread (LWP) information inside a traced process.

It has a number of flaws and is confused with PT_LWPINFO from FreeBSD.

PT_LWPSTATUS and PT_LWPNEXT address the problems (shortly by: rename,
removal of pl_event) and introduces new features: signal context
(pl_sigpend, pl_sigmask), LWP name (pl_name), LWP TLS base address
(pl_private). The private pointer was so far missing information for
a debugger.

PT_LWPSTATUS@nnn is now shipped with core(5) files and contain LWP specific
information, so far missed in the core(5) files.

PT_LWPSTATUS retrieves LWP information for the prompted thread.
PT_LWPNEXT retrieves LWP information for the next thread, borrowing the
semantics from NetBSD specific PT_LWPINFO.

PT_LWPINFO is namespaced with __LEGACY_PT_LWPINFO and still available for
the foreseeable future, without plans of removing it.

Add ATF tests for PT_LWPSTATUS + PT_LWPNEXT.

Keep ATF tests for PT_LWPINFO.

Switch GDB to new API.

Proposed on tech-kern@.
2019-12-24 14:50:59 +00:00
skrll 8b228a4193 We follow linux mainline and they're using 2711 and not 2838 for RPI4 2019-12-24 14:10:51 +00:00
skrll 2866af170a Match brcm,bcm2711-cprman 2019-12-24 13:40:56 +00:00
knakahara cd6969c346 Fix missing splnet() for ether_ioctl() caused by if_vmx.c:r1.32.
pointed out by nonaka@n.o, thanks.
2019-12-24 10:21:08 +00:00
skrll 9f5d7b7ea8 Traiing whitespace 2019-12-24 09:12:56 +00:00
thorpej 4e68445898 Make ichsmb and piixpm MP-safe:
- Synchronize with the interrupt handler using a mutex.
- Use a condvar to wait for completion, rather than tsleep().
- Mark our interrupt handler as such.

Also, other general correctness fixes:
- Loop around testing the completion condition to protect aginst
  spurious wakes.
- The "i2c exec" function returns an error code, so actually do so.
2019-12-24 06:27:17 +00:00
msaitoh 3e48777a82 Fix error path in gem(4)'s TX checksum offload.
- Avoid accessing free'd m0 on error. Use m_freem() instead of m_free().
   Reported by maxv@.
 - Tested by martin@, macallan@ and jdc@.
2019-12-24 05:00:19 +00:00
msaitoh 36c3b70882 Don't force using SMBUS0SEL register.
- Use it depending on USE_SMBUS0SEL bit.
- If we use SMBUS0EN_LO register to select the port, update the port
  select bits only.
2019-12-24 03:43:34 +00:00
msaitoh d0ba9abf31 - Read SB800_SMB_HOSTC correctly. This register is not in the PCI config space
but in the I/O space.
- The bit 0 of SB800_SMB_HOSTC is 0 on SMI or 1 on IRQ, so invert the check.
- Modify comment.
- Whitespace fix.
2019-12-23 23:41:43 +00:00
msaitoh 7b9ef9e6ef Fix number of port for Hudson rev. 0x1f and newer. Same as OpenBSD and Linux. 2019-12-23 23:31:23 +00:00
sevan 40e981e167 AVB 2019-12-23 23:31:18 +00:00
sevan c10e2250c5 bsd-family-tree 2019-12-23 23:12:00 +00:00