History log of /src/sys/external/bsd/common/
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.5 19-Dec-2021 riastradh

Narrow the CPPFLAGS for drm subsystems.

No need for the whole kernel to be built with -I flags for the drm
header files.


1.4 19-Dec-2021 riastradh

Move Linux SRCU to common.


1.3 19-Dec-2021 riastradh

Move Linux RCU to common.


1.2 19-Dec-2021 riastradh

Draft Linux tasklet implementation.


Revision tags: netbsd-8-3-RELEASE netbsd-9-4-RELEASE netbsd-9-3-RELEASE thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 isaki-audio2-base pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422 nick-nhusb-base-20160319
1.1 25-Feb-2016 skrll

branches: 1.1.2; 1.1.6; 1.1.10; 1.1.22;
Missed this file in the linux_work move.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base thorpej-ifq-base thorpej-altq-separation-base
1.21 25-Feb-2023 riastradh

linux asm/barrier.h: Fix !MULTIPROCESSOR build.


1.20 24-Feb-2023 riastradh

drm: Eliminate __HAVE_ATOMIC_AS_MEMBAR conditionals.

Discussed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2023/02/23/msg028729.html


Revision tags: netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.19 19-Jul-2022 riastradh

branches: 1.19.4;
linux: Add alpha definitions of mb/wmb/rmb too for fun.

Who wants to plug an amdgpu into their alpha?


1.18 19-Jul-2022 riastradh

linux: Clarify error message in asm/barrier.h. Not just for drm.


1.17 19-Jul-2022 riastradh

linux: Add mips definitions for mb, wmb, rmb.


1.16 19-Jul-2022 riastradh

linux: Use dsb(sy/st/ld) from arm/cpufunc.h for mb/wmb/rmb.

Works on more Arm CPU types this way. From skrll.


1.15 17-Jul-2022 riastradh

drm: Fix missing barrier definitions on arm.

The definition will work on armv7; don't think we have any drmkms
drivers on armv<7.


1.14 17-Jul-2022 riastradh

drm: Comment *mb() vs smp_*mb() and omit default for *mb().

In general membar_*() is _not_ enough for *mb(), because membar_*()
is only for CPU/CPU synchronization on normal memory, and *mb()
requires machine-dependent I/O logic. Leave it as an `#error' case
if the architecture isn't listed here. But membar_*() is OK for
smp_*().

Fill in powerpc and sparc while here, as examples of what the
now-removed defaults failed to do. If you want to use drm on a mips
or alpha system yer gonna hafta fill this in yourself.


1.13 09-Apr-2022 riastradh

linux: Convert various API shims to use membar_release/acquire.


1.12 27-Dec-2021 riastradh

linux: Define mb/wmb/rmb as mfence/sfence/lfence on i386 too.

Not the same as membar_*; drm uses mb to order special instructions
like clflush which require mfence for ordering.


1.11 19-Dec-2021 riastradh

linux: For uniprocessor, define smp_*mb as __insn_barrier.

Otherwise ordering might not be guaranteed in the event of
preemption.

XXX pullup


1.10 19-Dec-2021 riastradh

linux: Eliminate read_barrier_depends, smp_read_barrier_depends.

These no longer exist in Linux; instead, Linux now uses READ_ONCE.


1.9 19-Dec-2021 riastradh

linux: Define mb/wmb/rmb for x86.

These are _not_ SMP barriers; on Linux they specifically mean
mfence/sfence/lfence. Although membar_sync and mb agree, and
membar_consumer and rmb agree, membar_producer and wmb _do not_ agree
on x86 -- Linux's wmb is specifically sfence, which is important only
for unusual memory types, whereas our membar_producer is limited to
ordinary memory.


1.8 19-Dec-2021 riastradh

Use adequate memory barrier for load-acquire semantics.

It is unfortunate that we chose the name membar_enter to have the
wrong semantics for this.


1.7 19-Dec-2021 riastradh

Move smp_mb_before/after_atomic from linux/atomic.h to asm/barrier.h.


1.6 19-Dec-2021 riastradh

Side-load linux/compiler.h in asm/barrier.h.


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base
1.5 16-Oct-2020 jmcneill

Fix mb/wmb/rmb on aarch64 to use dsb instead of dmb.


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
1.4 28-Aug-2018 riastradh

For module build assume multiprocessor.


Revision tags: pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202
1.3 11-Sep-2017 maya

branches: 1.3.2; 1.3.4; 1.3.6;
keep dsb in vchiq code.

dsb refers to an arm instruction, so it won't be used on MI code.


1.2 11-Sep-2017 maya

add dsb macro from vchiq


1.1 11-Sep-2017 maya

Move barrier to common so it can be shared with vchiq


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.4 19-Dec-2021 riastradh

linux: Make WARN_ONCE actually happen only once.


1.3 19-Dec-2021 riastradh

linux: Move BUILD_BUG_* to common linux/build_bug.h.


1.2 19-Dec-2021 riastradh

Make BUILD_BUG_ON_INVALID work on bit-field expressions.


1.1 19-Dec-2021 riastradh

Move linux/bug.h and asm/bug.h to common.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.2 19-Dec-2021 riastradh

Define Linux byte order macros __BIG_ENDIAN/__LITTLE_ENDIAN.


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3
1.1 16-Feb-2020 riastradh

branches: 1.1.2; 1.1.6;
Missed a drm2 -> common move.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3
1.1 14-Feb-2020 riastradh

branches: 1.1.2; 1.1.6;
Fix undoing of -Wpointer-arith workaround.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base
1.1 25-Oct-2022 riastradh

linux asm/vmware.h: Fill this in with hypercall asm.

Not sure if it's necessary to support vmcall or vmmcall -- if so,
need to deal with binary patching inline asm, ugh.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.17 02-Oct-2024 rin

linux/bitops: Fix overestimate for BITS_TO_LONGS(9)

Fortunately, this seems harmless except for allocating
excessive buffer memory.

Pointed out by nonaka@, OK riastradh@.


Revision tags: perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.16 19-Dec-2021 riastradh

branches: 1.16.4; 1.16.10;
Move Linux atomic bitops from linux/atomic.h to linux/bitops.h.


1.15 19-Dec-2021 riastradh

provide BITS_PER_TYPE


Author: Maya Rashish <maya@NetBSD.org>


1.14 19-Dec-2021 riastradh

Add a BIT_MASK in bits.h, move it to common so bitops.h can sideload

match linux.


Author: Maya Rashish <maya@NetBSD.org>


1.13 19-Dec-2021 riastradh

define BITS_PER_LONG. use compiler-defined macro instead of sizeof.


Author: Maya Rashish <maya@NetBSD.org>


1.12 19-Dec-2021 riastradh

Remove duplicate definition of BITS_PER_BYTE


Author: Maya Rashish <maya@NetBSD.org>


1.11 19-Dec-2021 riastradh

sign_extend64, GENMASK_ULL, for_each_clear_bit


1.10 19-Dec-2021 riastradh

Add BITS_PER_BYTE and BIT_ULL. Fix type of BIT.


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base
1.9 05-Dec-2019 maya

Add what appears to be the fixes to CVE-2019-0154, CVE-2019-0155.
This commit requires review, but I'd also like it to be tested by others
while it is being reviewed.

CVE-2019-0155:
It was discovered that the Intel i915 graphics chipsets allowed userspace
to modify page table entries via writes to MMIO from the Blitter Command
Streamer and expose kernel memory information. A local attacker could use
this to expose sensitive information or possibly elevate privileges.

CVE-2019-0154:
It was discovered that the Intel i915 graphics chipsets could cause
a system hang when userspace performed a read from GT memory mapped
input output (MMIO) when the product is in certain low power states.
A local attacker could use this to cause a denial of service.

From upstream commits to linux-4.4.y:


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
1.8 27-Aug-2018 riastradh

branches: 1.8.2; 1.8.6; 1.8.8;
Give find_first/next_set/zero_bit a chance to work.

Self-review comments on the draft thrown together in a hurry two
weeks ago:

- I bet I screwed up for_each_set_bit or something.
- There might be several bits wrong in this __find_next_bit routine!
- for_each_set_bit is busted.
- Maybe I should test this stuff before I commit it.
- Hey, cool, buffer overflow here.
- What was I thinking.
- how did this even
- Was I drunk? I'm never drunk.
- I don't even drink.
- It wasn't even that late at night...


1.7 27-Aug-2018 riastradh

Move hweight8 next to its cousins.


1.6 27-Aug-2018 riastradh

Add find_first_bit, find_next_bit, for_each_set_bit.


1.5 27-Aug-2018 riastradh

Implement find_next_zero_bit. Define find_first_zero_bit in terms of it.


1.4 27-Aug-2018 riastradh

Add fls to <linux/bitops.h>.


1.3 27-Aug-2018 riastradh

Add hweight64.


1.2 27-Aug-2018 riastradh

... Provide GENMASK


Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>


1.1 27-Aug-2018 riastradh

move bitops.h so we can include it from kernel.h

match linux side-loading of this header.


Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.1 19-Dec-2021 riastradh

Add a BIT_MASK in bits.h, move it to common so bitops.h can sideload

match linux.


Author: Maya Rashish <maya@NetBSD.org>


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.1 19-Dec-2021 riastradh

Move linux/bug.h and asm/bug.h to common.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.4 19-Dec-2021 riastradh

drm: Make BUILD_BUG_ON_ZERO do something.


1.3 19-Dec-2021 riastradh

stub BUILD_BUG_ON_ZERO, from openbsd.

This is a dual purpose macro that asserts but can also be used in
expressions. Provide the expression implementation.


Author: Maya Rashish <maya@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>


1.2 19-Dec-2021 riastradh

linux: Simplify build_bug.h and add static_assert.


1.1 19-Dec-2021 riastradh

linux: Move BUILD_BUG_* to common linux/build_bug.h.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.9 17-Jul-2022 riastradh

linux/compiler.h: Add missing barriers in READ_ONCE, WRITE_ONCE.


1.8 09-Apr-2022 riastradh

linux: Convert various API shims to use membar_release/acquire.


1.7 17-Feb-2022 riastradh

drm/vmwgfx: First draft. Passes make depend, doesn't build yet.


1.6 19-Dec-2021 riastradh

linux: Add __same_type and __must_be_array.


1.5 19-Dec-2021 riastradh

linux: Add offsetofend.


1.4 19-Dec-2021 riastradh

Move attributes, barrier(), and likely/unlikely to linux/compiler.h.


1.3 19-Dec-2021 riastradh

Define smp_store_mb, smp_store_release.


1.2 19-Dec-2021 riastradh

Replace ACCESS_ONCE by READ_ONCE, WRITE_ONCE.


1.1 19-Dec-2021 riastradh

Move <linux/compiler.h> to common.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.12 19-Dec-2021 riastradh

linux: Timeout audit -- linux/completion.h.


1.11 19-Dec-2021 riastradh

linux: wait_for_completion


1.10 19-Dec-2021 riastradh

sys/kernel.h for hardclock_ticks


Author: Maya Rashish <maya@NetBSD.org>


1.9 19-Dec-2021 riastradh

sys/param.h for KASSERT etc


Author: Maya Rashish <maya@NetBSD.org>


1.8 19-Dec-2021 riastradh

Implement wait_for_completion_timeout.


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base
1.7 03-Jul-2020 maxv

hardclock_ticks -> getticks()


Revision tags: netbsd-8-3-RELEASE netbsd-9-4-RELEASE netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 isaki-audio2-base pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base
1.6 11-Jan-2017 skrll

Add a reinit_completion function


Revision tags: pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 nick-nhusb-base-20150921 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base
1.5 02-Sep-2014 jmcneill

branches: 1.5.2; 1.5.4;
IPL_VM -> IPL_SCHED


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE netbsd-7-nhusb-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 tls-maxphys-base netbsd-7-base tls-earlyentropy-base
1.4 03-Jul-2014 riastradh

branches: 1.4.4;
Add some notes on using these shims to port Linux kernel code.


Revision tags: rmind-smpnet-base rmind-smpnet-nbase yamt-pagecache-base9
1.3 05-May-2014 skrll

branches: 1.3.2; 1.3.4;
Use a spinlock for completions. Makes vchiq pass LOCKDEBUG where other
spinlocks where held when trying to use the completion API.


Revision tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15
1.2 01-Apr-2014 riastradh

branches: 1.2.2;
Explicitly kassert the precondition c_done != 0 in _completion_claim.


1.1 01-Apr-2014 riastradh

Move <linux/completion.h> from drm2 to external/bsd/common.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base
1.1 25-Oct-2022 riastradh

linux/dmapool.h: Start filling out stubs.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-9-4-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base netbsd-9-3-RELEASE thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base
1.3 16-Apr-2019 mrg

fix various problems i've seen where cv_*wait*() return ERESTART,
which is -3 in netbsd, which we have mapped linux ERESTARTSYS to.

this has a problem because linux code often returns errors and
pointers in the same value, and pointer values between -4095 and
-1 are considered as error returns, but -3 ends up as 3 and thus
is not considered an error, and mayhem ensues.

with this in place my kabylake system seems actually stable, i
have not triggered any of my prior issues in almost 4 weeks now.


Taylor asked me to write up a description and then wrote most of
the text below for me :-)


In Linux code, we always work with ERESTARTSYS so the code meaning
start over is a positive NetBSD errno safe for PTR_ERR/ERR_PTR.
To achieve this:
1. adapt all cv_waits that return to Linux so they map ERESTART to
ERESTARTSYS, and
2. adapt all returns to userland so they convert ERESTARTSYS to
ERESTART.
Leave EINTR and all other error codes alone.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
1.2 27-Aug-2018 riastradh

Define PTR_ERR_OR_ZERO.


Revision tags: pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 nick-nhusb-base-20150921
1.1 18-Aug-2015 skrll

branches: 1.1.2; 1.1.6; 1.1.10; 1.1.16; 1.1.22; 1.1.24; 1.1.26;
Move linux/err.h into common/include.

OK riastradh@


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.5 19-Dec-2021 riastradh

EHWPOISON


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base
1.4 16-Apr-2019 mrg

fix various problems i've seen where cv_*wait*() return ERESTART,
which is -3 in netbsd, which we have mapped linux ERESTARTSYS to.

this has a problem because linux code often returns errors and
pointers in the same value, and pointer values between -4095 and
-1 are considered as error returns, but -3 ends up as 3 and thus
is not considered an error, and mayhem ensues.

with this in place my kabylake system seems actually stable, i
have not triggered any of my prior issues in almost 4 weeks now.


Taylor asked me to write up a description and then wrote most of
the text below for me :-)


In Linux code, we always work with ERESTARTSYS so the code meaning
start over is a positive NetBSD errno safe for PTR_ERR/ERR_PTR.
To achieve this:
1. adapt all cv_waits that return to Linux so they map ERESTART to
ERESTARTSYS, and
2. adapt all returns to userland so they convert ERESTARTSYS to
ERESTART.
Leave EINTR and all other error codes alone.


Revision tags: pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 netbsd-7-2-RELEASE pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 netbsd-7-1-2-RELEASE pgoyette-compat-base netbsd-7-1-1-RELEASE tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 netbsd-7-1-RELEASE netbsd-7-1-RC2 nick-nhusb-base-20170204 netbsd-7-nhusb-base-20170116 bouyer-socketcan-base pgoyette-localcount-20170107 netbsd-7-1-RC1 nick-nhusb-base-20161204 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE nick-nhusb-base-20161004 localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 netbsd-7-0-1-RELEASE nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 netbsd-7-0-RELEASE nick-nhusb-base-20150921 netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base tls-maxphys-base netbsd-7-base tls-earlyentropy-base
1.3 16-Jul-2014 riastradh

branches: 1.3.2; 1.3.6; 1.3.24; 1.3.32;
Make it build and boot on my test machines.

Screen blanks on boot on the Ivy Bridge system with

DRM error in cpt_serr_int_handler: PCH transcoder A FIFO underrun

But after that everything is OK. Appears to be an upstream problem.
To investigate...

I think there's a cache flushing issue somewhere -- there are little
display artefacts on my T60.


1.2 03-Jul-2014 riastradh

Add some notes on using these shims to port Linux kernel code.


Revision tags: rmind-smpnet-base rmind-smpnet-nbase yamt-pagecache-base9
1.1 07-Apr-2014 riastradh

branches: 1.1.2; 1.1.4;
Move <linux/errno.h> from drm2 to common.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base
1.2 25-Oct-2022 riastradh

linux/export.h: Side-load linux/stringify.h.

Expected by some users.


Revision tags: bouyer-sunxi-drm-base
1.1 19-Dec-2021 riastradh

Include linux/export.h in linux/printk.h, move to common

linux does this through:
printk.h -> linkage.h -> export.h

this will require less patching of drm files.

Author: Maya Rashish <maya@NetBSD.org>


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base
1.1 25-Oct-2022 riastradh

linux/frame.h: STACK_FRAME_NON_STANDARD


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.3 19-Dec-2021 riastradh

gfpflags_allow_blocking


1.2 19-Dec-2021 riastradh

Define __GFP_RETRY_MAYFAIL as an alias for __GFP_NORETRY.


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
1.1 27-Aug-2018 riastradh

branches: 1.1.2; 1.1.6;
gfp.h and slab.h are now used in kernel.h, so move to common.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base
1.46 25-Oct-2022 riastradh

linux/kernel.h: S16_MIN, S32_MIN, S64_MIN


Revision tags: bouyer-sunxi-drm-base
1.45 19-Dec-2021 riastradh

amdgpu: amdgpu_gfx.c

...plus a bogus stub for sscanf, hoping it's not that important


1.44 19-Dec-2021 riastradh

linux: might_sleep_if


1.43 19-Dec-2021 riastradh

drm: Another pass over i915. Most of i915 gem builds now.


1.42 19-Dec-2021 riastradh

linux: S16_MAX, S32_MAX, S64_MAX


1.41 19-Dec-2021 riastradh

drm: Add __is_constexpr.


1.40 19-Dec-2021 riastradh

Define Linux byte order macros __BIG_ENDIAN/__LITTLE_ENDIAN.


1.39 19-Dec-2021 riastradh

ALIGN_DOWN seems to be an alias for round_down.


1.38 19-Dec-2021 riastradh

Move attributes, barrier(), and likely/unlikely to linux/compiler.h.


1.37 19-Dec-2021 riastradh

DEFINE_STATIC_KEY_FALSE


1.36 19-Dec-2021 riastradh

__maybe_unused, typecheck


1.35 19-Dec-2021 riastradh

might_sleep, add_taint


1.34 19-Dec-2021 riastradh

Define empty __deprecated.


1.33 19-Dec-2021 riastradh

DIV_ROUND_DOWN_ULL


1.32 19-Dec-2021 riastradh

Define u64_to_user_ptr.


1.31 19-Dec-2021 riastradh

Replace ACCESS_ONCE by READ_ONCE, WRITE_ONCE.


1.30 19-Dec-2021 riastradh

Define clamp_val.


1.29 19-Dec-2021 riastradh

Actually use the type in min_t/max_t.

Otherwise we do not get the truncation we might expect. Probably not
a big deal, but we should match the semantics.

XXX pullup-7
XXX pullup-8


1.28 19-Dec-2021 riastradh

Add some side loads to <linux/kernel.h> to help reduce diffs.


1.27 19-Dec-2021 riastradh

Move IS_REACHABLE to <linux/kernel.h> to avoid double definition.


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base
1.26 19-Oct-2020 jmcneill

Define __BIG_ENDIAN or __LITTLE_ENDIAN depending on target endianness


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3
1.25 14-Feb-2020 maya

Reduce diffs by side-loading some header files like Linux.

From riastradh


1.24 14-Feb-2020 riastradh

Implement (obsolete) simple_strtol stub; reduce diff.


Revision tags: ad-namecache-base2 ad-namecache-base1 ad-namecache-base phil-wifi-20191119
1.23 30-Sep-2019 christos

branches: 1.23.2;
use __inline
add missing __printflike attributes


1.22 29-Sep-2019 mrg

fix another sign compare warning:

cast 'int ret' to size_t when comparing against another size_t
and 'ret' has known to be 0 or positive.


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
1.21 27-Aug-2018 riastradh

Define __must_check to actually use warn_unused_result.


1.20 27-Aug-2018 riastradh

Copy va_list before using it twice.


1.19 27-Aug-2018 riastradh

Just define ACCESS_ONCE rather than patch it out.


1.18 27-Aug-2018 riastradh

Define noinline in <linux/kernel.h>.


1.17 27-Aug-2018 riastradh

Define DIV_ROUND_CLOSEST_ULL and div_s64.


1.16 27-Aug-2018 riastradh

Define min3/max3. XXX: Multiple evaluation. Hope it's OK!


1.15 27-Aug-2018 riastradh

Add kvasprintf to <linux/kernel.h>.


1.14 27-Aug-2018 riastradh

Implement Linux kasprintf.


1.13 27-Aug-2018 riastradh

move bitops.h so we can include it from kernel.h

match linux side-loading of this header.


Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>


1.12 27-Aug-2018 riastradh

some more definitions necessary

ifdef out all the i915 gtt virtual memory stuff that errors,
unless it looks exactly like the old code and then merge the
netbsd ifdefs for it.

we don't want to use their ALIGN(, which has more arguments,
use the old alt function.
merge in the old intel_acpi.c code.
don't duplicate DECLARE_BITMAP


Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>


1.11 27-Aug-2018 riastradh

more declarations of things we need.

more power management ops.


Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>


1.10 27-Aug-2018 riastradh

move printk to common so we can reasonably include it from kernel.h
(linux side-loads the same)


Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>


1.9 06-Aug-2018 riastradh

libkern min/max is 32-bit. Linux min/max is generic. @!*#@!$&

XXX pullup


Revision tags: pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 nick-nhusb-base-20150921
1.8 20-Aug-2015 skrll

branches: 1.8.10; 1.8.16; 1.8.18;
Tweak IS_ENABLED to allow CONFIG_FOO values.

No functional change to drm2.

LGTM from riastradh@


Revision tags: nick-nhusb-base-20150606
1.7 20-Apr-2015 riastradh

Add container_of to libkern.

Given x = &c->f, container_of(x, T, f) yields c, where T is the type
of c.

Discussed on tech-kern a while ago:

https://mail-index.netbsd.org/tech-kern/2013/03/21/msg015131.html


Revision tags: nick-nhusb-base-20150406
1.6 25-Feb-2015 riastradh

Add clamp to <linux/kernel.h>.


1.5 25-Feb-2015 riastradh

Add kstrtol.


Revision tags: nick-nhusb-base tls-maxphys-base netbsd-7-base tls-earlyentropy-base
1.4 16-Jul-2014 riastradh

branches: 1.4.2; 1.4.4; 1.4.6;
First whack at radeon driver.

No hardware to test yet, but it builds.


1.3 16-Jul-2014 riastradh

Make it build and boot on my test machines.

Screen blanks on boot on the Ivy Bridge system with

DRM error in cpt_serr_int_handler: PCH transcoder A FIFO underrun

But after that everything is OK. Appears to be an upstream problem.
To investigate...

I think there's a cache flushing issue somewhere -- there are little
display artefacts on my T60.


Revision tags: rmind-smpnet-base rmind-smpnet-nbase yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15
1.2 01-Apr-2014 riastradh

branches: 1.2.2; 1.2.4; 1.2.6;
Merge changes from drm2 <linux/kernel.h> to common <linux/kernel.h>.


Revision tags: riastradh-drm2-base3
1.1 05-Sep-2013 skrll

Pull across some linux header files from riastradh-drm2, but put them
in a shared location.

Riastradh: nick, OK.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.1 19-Dec-2021 riastradh

linux: Stub linux/kmemleak.h.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.32 19-Dec-2021 riastradh

i915: more work


1.31 19-Dec-2021 riastradh

i915: another whack at it


1.30 19-Dec-2021 riastradh

i915: More progress.


1.29 19-Dec-2021 riastradh

linux/list.h: Add list_safe_reset_next.


1.28 19-Dec-2021 riastradh

Provide list_for_each_entry_safe_reverse and reorder for consistency


Author: Maya Rashish <maya@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>


1.27 19-Dec-2021 riastradh

list_for_each_entry_from_reverse


1.26 19-Dec-2021 riastradh

list_bulk_move_tail


1.25 19-Dec-2021 riastradh

Omit outdated comment.


1.24 19-Dec-2021 riastradh

provide list_for_each_entry_from (XXX needs review)


Author: Maya Rashish <maya@NetBSD.org>


1.23 19-Dec-2021 riastradh

provide list_is_first


Author: Maya Rashish <maya@NetBSD.org>


1.22 19-Dec-2021 riastradh

list_is_last


1.21 19-Dec-2021 riastradh

__list_del_entry, and poison list_del.


1.20 19-Dec-2021 riastradh

Move struct list_head to <linux/types.h>.


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3
1.19 14-Feb-2020 riastradh

Add LIST_HEAD to <linux/nbsd-namespace.h> too.


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
1.18 27-Aug-2018 riastradh

branches: 1.18.6;
Define list_splice_init.


1.17 27-Aug-2018 riastradh

Make sure to call pslist_entry_init.


1.16 27-Aug-2018 riastradh

Give hlist iteration half a chance of working, oops.


1.15 27-Aug-2018 riastradh

Implement list_splice_tail_init.


1.14 27-Aug-2018 riastradh

Add list_replace_init.


1.13 27-Aug-2018 riastradh

Fix hlist_for_each_entry_safe: temp is hlist_node, not element.


1.12 27-Aug-2018 riastradh

Fix order of arguments of hlist_add_head_rcu.


1.11 27-Aug-2018 riastradh

Fix hlist_for_each_entry_rcu like hlist_for_each_entry.


1.10 27-Aug-2018 riastradh

Define list_entry_first_or_null.


1.9 27-Aug-2018 riastradh

Fix hlist iteration again with more fields and null checks.


1.8 27-Aug-2018 riastradh

Fix hlist_for_each_entry to use the specified field.


1.7 27-Aug-2018 riastradh

Rewrite linux hlist with our pslist.

Upstream uses RCU for this now, so we need it.


1.6 27-Aug-2018 riastradh

Rewrite hashtable.h locally so it might work here.


Revision tags: netbsd-8-3-RELEASE netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422 nick-nhusb-base-20160319 nick-nhusb-base-20151226 nick-nhusb-base-20150921 nick-nhusb-base-20150606 nick-nhusb-base-20150406 nick-nhusb-base
1.5 20-Aug-2014 riastradh

branches: 1.5.18; 1.5.20;
Add some Linux list routines.


Revision tags: tls-maxphys-base netbsd-7-base tls-earlyentropy-base
1.4 16-Jul-2014 riastradh

branches: 1.4.2; 1.4.4;
First whack at radeon driver.

No hardware to test yet, but it builds.


1.3 16-Jul-2014 riastradh

Make it build and boot on my test machines.

Screen blanks on boot on the Ivy Bridge system with

DRM error in cpt_serr_int_handler: PCH transcoder A FIFO underrun

But after that everything is OK. Appears to be an upstream problem.
To investigate...

I think there's a cache flushing issue somewhere -- there are little
display artefacts on my T60.


1.2 03-Jul-2014 riastradh

Add some notes on using these shims to port Linux kernel code.


Revision tags: rmind-smpnet-base rmind-smpnet-nbase yamt-pagecache-base9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3
1.1 05-Sep-2013 skrll

branches: 1.1.2; 1.1.4; 1.1.6;
Pull across some linux header files from riastradh-drm2, but put them
in a shared location.

Riastradh: nick, OK.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3
1.1 16-Feb-2020 riastradh

branches: 1.1.2; 1.1.6;
Move another file from drm2 to common for <linux/kernel.h>.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base
1.1 25-Oct-2022 riastradh

linux asm/uaccess.h: strncpy_from_user

(which does not actually have strncpy semantics, naturally, from what
I can gather)


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.2 19-Dec-2021 riastradh

linux: Allow non-VLA structs in struct_size.

Upstream sometimes uses

struct foo {
int x;
short y[1];
};

instead of short y[] with struct_size.


1.1 19-Dec-2021 riastradh

linux: Move linux/overflow.h from drm2 to common.

Needed so linux/slab.h can side-load it.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.14 09-Mar-2024 mrg

drm(4): make pr_debug equivalent to aprint_debug

significantly reduces the default spam from amdgpu(4).


Revision tags: netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.13 29-Jul-2022 riastradh

branches: 1.13.4;
drm: Reduce verbosity of drm kernel messages.


1.12 19-Dec-2021 riastradh

amdgpu_fb.c
amdgpu_fence.c
amdgpu_gart.c
amdgpu_fixpt31_32.c
amdgpu_fiji_smumgr.c
amdgpu_gem.c
amdgpu_gfx_v10_0.c
amdgpu_gfx_v6_0.c through amdgpu_gfx_v9_0.c
amdgpu_gmc.c
amdgpu_gmc_v6_0.c through amdgpu_gmc_v10_0.c
amdgpu_gtt_mgr.c
some amdgpu_h* files
some amdgpu_i* files
some amdgpu_j* files
amdgpu_kms.c
some amdgpu_m* and amdgpu_n* files


1.11 19-Dec-2021 riastradh

i915: hack hack hack


1.10 19-Dec-2021 riastradh

pr_info_ratelimited, not really


1.9 19-Dec-2021 riastradh

Include linux/export.h in linux/printk.h, move to common

linux does this through:
printk.h -> linkage.h -> export.h

this will require less patching of drm files.

Author: Maya Rashish <maya@NetBSD.org>


1.8 19-Dec-2021 riastradh

Define pr_warn.


1.7 19-Dec-2021 riastradh

Define struct va_format.


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
1.6 28-Aug-2018 skrll

branches: 1.6.2; 1.6.6;
Add KERN_{EMERG,ALERT,NOTICE}


1.5 28-Aug-2018 skrll

Sort KERN_* macros according to severity (worst first)


1.4 28-Aug-2018 skrll

s/drm // in the KERN_* macros as this is common


1.3 27-Aug-2018 riastradh

Define pr_debug = printf.


1.2 27-Aug-2018 riastradh

provide pr_notice
avoid needing unregister_oom_notifier
use intel_register_dsm_handler(dev), as older drm does
provide dummy async_schedule
provide atomic_or
match side-loading


Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>


1.1 27-Aug-2018 riastradh

move printk to common so we can reasonably include it from kernel.h
(linux side-loads the same)


Author: coypu <coypu@sdf.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.8 19-Dec-2021 riastradh

Make intel_psr.c build
netbsd-ify
Stub out intel_lpe_audio.c (for now?).
Hammer intel_opregion.c into shape.
Hack up intel_lrc.c
Adapt intel_reset.c
Stub out intel_region_lmem.c
Adapt intel_ring_submission.c
Adapt intel_rps.c
Adapt intel_sdvo.c
Adapt intel_runtime_pm.c
Adapt intel_sideband.c
Adapt intel_sprite.c
Adapt intel_tv.c
Adapt intel_tc.c
Adapt intel_sseu.c
Adapt intel_timeline.c
Adapt intel_uc_fw.c and fix typo
Fix up intel_uncore.c
intel_vga.c
intel_wakeref.c
intel_vdsc.c
intel_wopcm.c
intel_workarounds.c
i915_globals.c
Fix up intelfb.c
Stub out intel_guc_log.c
Stub out intel_dsi_dcs_backlight.c
i915_perf.c
intel_hdmi.c
intel_hdcp.c


Author: Maya Rashish <maya@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>


1.7 19-Dec-2021 riastradh

linux: Add cond_synchronize_rcu.


1.6 19-Dec-2021 riastradh

linux: rcu_replace_pointer


1.5 19-Dec-2021 riastradh

linux/rcupdate: Stub init_rcu_head, destroy_rcu_head.


1.4 19-Dec-2021 riastradh

Simplify rcu_* definitions with atomic_load/store_*.


1.3 19-Dec-2021 riastradh

linux/bug.h for WARN_ON


Author: Maya Rashish <maya@NetBSD.org>


1.2 19-Dec-2021 riastradh

Omit __insn_barrier where implied or subsumed by volatile.


1.1 19-Dec-2021 riastradh

Move Linux RCU to common.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.13 22-Dec-2021 thorpej

Reduce code duplication: kmem_cache_create() is now exactly the same as
kmem_cache_create_dtor() except for the dtor argument, so implement
the former in terms of the latter.


1.12 22-Dec-2021 thorpej

Do the last change differently:

Instead of having a pre-destruct hook, put knowledge of passive
serialization into the pool allocator directly, enabled by PR_PSERIALIZE
when the pool / pool_cache is initialized. This will guarantee that
a passive serialization barrier will be performed before the object's
destructor is called, or before the page containing the object is freed
back to the system (in the case of no destructor). Note that the internal
allocator overhead is different when PR_PSERIALIZE is used (it implies
PR_NOTOUCH, because the objects must remain in a valid state).

In the DRM Linux API shim, this allows us to remove the custom page
allocator for SLAB_TYPESAFE_BY_RCU.


1.11 21-Dec-2021 thorpej

- For kmem_cache_create_dtor(), use a pre-destructor to issue the
synchronize_rcu() if the caller uses SLAB_TYPESAFE_BY_RCU. A
special pool allocator is not required in this case.
- Now that SLAB_TYPESAFE_BY_RCU does the right thing, no need to
call synchronize_rcu() in __i915_request_dtor().


1.10 19-Dec-2021 riastradh

linux: Side-load linux/overflow.h in linux/slab.h.


1.9 19-Dec-2021 riastradh

linux: Allow GFP_NOWAIT too.


1.8 19-Dec-2021 riastradh

linux: Use kmem directly for Linux kmalloc.

Take advantage of this to do LOCKDEBUG_MEM_CHECK at the point of
kfree_rcu rather than in the RCU GC thread.


1.7 19-Dec-2021 riastradh

i915: Defer destroying request lock and fence until page destruction.


1.6 19-Dec-2021 riastradh

kmem_cache is used at IPL_VM


Author: Maya Rashish <maya@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>


1.5 19-Dec-2021 riastradh

Fix inverted notion of whether to wait for allocation


Author: Maya Rashish <maya@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>


1.4 19-Dec-2021 riastradh

Define kinda bogus ARCH_KMALLOC_MINALIGN that's probably enough.


1.3 19-Dec-2021 riastradh

KMEM_CACHE, SLAB_TYPESAFE_BY_RCU


1.2 19-Dec-2021 riastradh

Define kmem_cache_shrink = pool_cache_reclaim.


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
1.1 27-Aug-2018 riastradh

branches: 1.1.2; 1.1.6;
gfp.h and slab.h are now used in kernel.h, so move to common.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.4 19-Dec-2021 riastradh

Make intel_psr.c build
netbsd-ify
Stub out intel_lpe_audio.c (for now?).
Hammer intel_opregion.c into shape.
Hack up intel_lrc.c
Adapt intel_reset.c
Stub out intel_region_lmem.c
Adapt intel_ring_submission.c
Adapt intel_rps.c
Adapt intel_sdvo.c
Adapt intel_runtime_pm.c
Adapt intel_sideband.c
Adapt intel_sprite.c
Adapt intel_tv.c
Adapt intel_tc.c
Adapt intel_sseu.c
Adapt intel_timeline.c
Adapt intel_uc_fw.c and fix typo
Fix up intel_uncore.c
intel_vga.c
intel_wakeref.c
intel_vdsc.c
intel_wopcm.c
intel_workarounds.c
i915_globals.c
Fix up intelfb.c
Stub out intel_guc_log.c
Stub out intel_dsi_dcs_backlight.c
i915_perf.c
intel_hdmi.c
intel_hdcp.c


Author: Maya Rashish <maya@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>


1.3 19-Dec-2021 riastradh

Call it srcu_struct like linux does.


Author: Maya Rashish <maya@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>


1.2 19-Dec-2021 riastradh

Linux namespace for srcu.


1.1 19-Dec-2021 riastradh

Move Linux SRCU to common.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.1 19-Dec-2021 riastradh

linux: Add offsetofend.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.1 19-Dec-2021 riastradh

<linux/stringify.h> for __stringify.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.7 17-Jul-2022 riastradh

linux: Add missing symbol namespacing for tasklet, sync_file.


1.6 19-Dec-2021 riastradh

Make intel_psr.c build
netbsd-ify
Stub out intel_lpe_audio.c (for now?).
Hammer intel_opregion.c into shape.
Hack up intel_lrc.c
Adapt intel_reset.c
Stub out intel_region_lmem.c
Adapt intel_ring_submission.c
Adapt intel_rps.c
Adapt intel_sdvo.c
Adapt intel_runtime_pm.c
Adapt intel_sideband.c
Adapt intel_sprite.c
Adapt intel_tv.c
Adapt intel_tc.c
Adapt intel_sseu.c
Adapt intel_timeline.c
Adapt intel_uc_fw.c and fix typo
Fix up intel_uncore.c
intel_vga.c
intel_wakeref.c
intel_vdsc.c
intel_wopcm.c
intel_workarounds.c
i915_globals.c
Fix up intelfb.c
Stub out intel_guc_log.c
Stub out intel_dsi_dcs_backlight.c
i915_perf.c
intel_hdmi.c
intel_hdcp.c


Author: Maya Rashish <maya@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>


1.5 19-Dec-2021 riastradh

Rework linux_tasklet.c a little.

Provide some more hacks for i915's grubby paws.


1.4 19-Dec-2021 riastradh

Add some i915drmkms additions to the tasklet API.


1.3 19-Dec-2021 riastradh

Make a bit more room in the columns here.


1.2 19-Dec-2021 riastradh

No tasklet_disable_nosync implemented at the moment.


1.1 19-Dec-2021 riastradh

Draft Linux tasklet implementation.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.3 19-Dec-2021 riastradh

Move dma_addr_t to linux/types.h.


1.2 19-Dec-2021 riastradh

Move struct list_head to <linux/types.h>.


1.1 19-Dec-2021 riastradh

Move <linux/types.h> to common.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.25 19-Dec-2021 riastradh

linux/workqueue: Draft queue_rcu_work.


1.24 19-Dec-2021 riastradh

i915: another whack at it


1.23 19-Dec-2021 riastradh

stub struct rcu_work


Author: Maya Rashish <maya@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>


1.22 19-Dec-2021 riastradh

Side-load linux/stringify.h in linux/workqueue.h.

(via linux/timer.h upstream)


1.21 19-Dec-2021 riastradh

alloc_workqueue


1.20 19-Dec-2021 riastradh

Stubs for init/destroy delayed work on stack.


1.19 19-Dec-2021 riastradh

Constify work_pending, delayed_work_pending.


1.18 19-Dec-2021 riastradh

drain_workqueue


1.17 19-Dec-2021 riastradh

Add work_pending, delayed_work_pending.


1.16 19-Dec-2021 riastradh

Implement return value of flush_work, flush_delayed_work.


1.15 19-Dec-2021 riastradh

Namespacing for system_unbound_wq.


1.14 19-Dec-2021 riastradh

New system_unbound_wq.


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
1.13 27-Aug-2018 riastradh

Rework Linux workqueue synchronization yet again.

- Use a low bit in the pointer to the queue, rather than whether the
pointer is null or not, to determine whether the work item is
queued/scheduled.

- _Preserve_ the pointer to the queue after we release the work.

- Release the work _before_ executing the function, not after.

This simplifies some things: we no longer have to distinguish whether
the work is queued or running in the functions where we are trying to
modify it. The pointer has to be preserved even after the work is
released so that we can flush the workqueue after the work has been
released.


1.12 27-Aug-2018 riastradh

Avoid the prospect of callout calls piling up.

Don't ever callout_schedule the callout while an existing call may be
in progress.

Echo some cases from cancel_delayed_work in flush_delayed_work.


1.11 27-Aug-2018 riastradh

Fix semantics of flush_work and flush_delayed_work.

- Change return type to void.
=> Upstream it is bool, but exactly one of hundreds of callers
actually use it, and I don't think the semantics is clear.

- Make sure to wait for whichever of the current work _and_ the next
batch queued is currently there in the workqueue.

- Don't retry a cancelled callout. Cancellation in the state
DELAYED_WORK_CANCELLED is guaranteed.


1.10 27-Aug-2018 riastradh

Add missing namespace for flush_scheduled_work.


1.9 27-Aug-2018 riastradh

Draft rewrite of Linux workqueue reimplementation.

Just use an explicit thread; don't attempt to fudge it with
workqueue(9). No doubt there are various mistakes in here, but they
should be easier to get right than the mega-kludgerific nonsense that
preceded this draft.


1.8 27-Aug-2018 riastradh

Add system_power_efficient_wq.


1.7 27-Aug-2018 riastradh

Namespace system_long_wq.


1.6 27-Aug-2018 riastradh

Implement flush_delayed_work.


1.5 27-Aug-2018 riastradh

Also Linux wants work->func to work.


1.4 27-Aug-2018 riastradh

Add mega-kludgerific current_work().


1.3 27-Aug-2018 riastradh

Add system_long_wq.


1.2 27-Aug-2018 riastradh

Define dummy INIT_WORK_ONSTACK and destroy_work_onstack.


Revision tags: netbsd-8-3-RELEASE netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422 nick-nhusb-base-20160319
1.1 24-Feb-2016 skrll

branches: 1.1.2; 1.1.6; 1.1.10; 1.1.22; 1.1.24; 1.1.26;
Move linux_work.c and workqueue.h from sys/external/bsd/drm2 to
sys/external/common so that they can be used by others.

LGTM from riastradh@

These should really live outside sys/external, but that can be decided
later


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.7 19-Dec-2021 riastradh

linux: Fix rcu_barrier so it actually waits for everything.


1.6 19-Dec-2021 riastradh

linux: Rate-limit RCU GC thread as a cheap experiment.


1.5 19-Dec-2021 riastradh

linux: Use kmem directly for Linux kmalloc.

Take advantage of this to do LOCKDEBUG_MEM_CHECK at the point of
kfree_rcu rather than in the RCU GC thread.


1.4 19-Dec-2021 riastradh

Make intel_psr.c build
netbsd-ify
Stub out intel_lpe_audio.c (for now?).
Hammer intel_opregion.c into shape.
Hack up intel_lrc.c
Adapt intel_reset.c
Stub out intel_region_lmem.c
Adapt intel_ring_submission.c
Adapt intel_rps.c
Adapt intel_sdvo.c
Adapt intel_runtime_pm.c
Adapt intel_sideband.c
Adapt intel_sprite.c
Adapt intel_tv.c
Adapt intel_tc.c
Adapt intel_sseu.c
Adapt intel_timeline.c
Adapt intel_uc_fw.c and fix typo
Fix up intel_uncore.c
intel_vga.c
intel_wakeref.c
intel_vdsc.c
intel_wopcm.c
intel_workarounds.c
i915_globals.c
Fix up intelfb.c
Stub out intel_guc_log.c
Stub out intel_dsi_dcs_backlight.c
i915_perf.c
intel_hdmi.c
intel_hdcp.c


Author: Maya Rashish <maya@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>


1.3 19-Dec-2021 riastradh

linux: Add cond_synchronize_rcu.


1.2 19-Dec-2021 riastradh

linux/rcupdate: Stub init_rcu_head, destroy_rcu_head.


1.1 19-Dec-2021 riastradh

Move Linux RCU to common.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.4 19-Dec-2021 riastradh

Make intel_psr.c build
netbsd-ify
Stub out intel_lpe_audio.c (for now?).
Hammer intel_opregion.c into shape.
Hack up intel_lrc.c
Adapt intel_reset.c
Stub out intel_region_lmem.c
Adapt intel_ring_submission.c
Adapt intel_rps.c
Adapt intel_sdvo.c
Adapt intel_runtime_pm.c
Adapt intel_sideband.c
Adapt intel_sprite.c
Adapt intel_tv.c
Adapt intel_tc.c
Adapt intel_sseu.c
Adapt intel_timeline.c
Adapt intel_uc_fw.c and fix typo
Fix up intel_uncore.c
intel_vga.c
intel_wakeref.c
intel_vdsc.c
intel_wopcm.c
intel_workarounds.c
i915_globals.c
Fix up intelfb.c
Stub out intel_guc_log.c
Stub out intel_dsi_dcs_backlight.c
i915_perf.c
intel_hdmi.c
intel_hdcp.c


Author: Maya Rashish <maya@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>


1.3 19-Dec-2021 riastradh

'struct srcu' is actually called 'struct srcu_struct'


Author: Iain Hibbert <plunky@netbsd.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>


1.2 19-Dec-2021 riastradh

Omit __insn_barrier where implied or subsumed by volatile.


1.1 19-Dec-2021 riastradh

Move Linux SRCU to common.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base thorpej-ifq-base thorpej-altq-separation-base
1.12 24-Feb-2023 riastradh

drm: Eliminate __HAVE_ATOMIC_AS_MEMBAR conditionals.

Discussed on tech-kern:
https://mail-index.netbsd.org/tech-kern/2023/02/23/msg028729.html


Revision tags: netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.11 09-Apr-2022 riastradh

branches: 1.11.4;
linux: Convert various API shims to use membar_release/acquire.


1.10 27-Dec-2021 riastradh

linux: Fix copypasto in comment.


1.9 19-Dec-2021 riastradh

drm: Sprinkle miscellaneous includes.


1.8 19-Dec-2021 riastradh

linux: Use indirection for percpu simpleq.

Simpleq requires pointers into the head to work, but percpu(9) may
move objects around, so we have to allocate the simpleq head
separately with kmem(9).


1.7 19-Dec-2021 riastradh

Make intel_psr.c build
netbsd-ify
Stub out intel_lpe_audio.c (for now?).
Hammer intel_opregion.c into shape.
Hack up intel_lrc.c
Adapt intel_reset.c
Stub out intel_region_lmem.c
Adapt intel_ring_submission.c
Adapt intel_rps.c
Adapt intel_sdvo.c
Adapt intel_runtime_pm.c
Adapt intel_sideband.c
Adapt intel_sprite.c
Adapt intel_tv.c
Adapt intel_tc.c
Adapt intel_sseu.c
Adapt intel_timeline.c
Adapt intel_uc_fw.c and fix typo
Fix up intel_uncore.c
intel_vga.c
intel_wakeref.c
intel_vdsc.c
intel_wopcm.c
intel_workarounds.c
i915_globals.c
Fix up intelfb.c
Stub out intel_guc_log.c
Stub out intel_dsi_dcs_backlight.c
i915_perf.c
intel_hdmi.c
intel_hdcp.c


Author: Maya Rashish <maya@NetBSD.org>
Committer: Taylor R Campbell <riastradh@NetBSD.org>


1.6 19-Dec-2021 riastradh

Fix membars in tasklet_disable/enable.


1.5 19-Dec-2021 riastradh

Rework linux_tasklet.c a little.

Provide some more hacks for i915's grubby paws.


1.4 19-Dec-2021 riastradh

Omit __insn_barrier where implied or subsumed by volatile.


1.3 19-Dec-2021 riastradh

Add some i915drmkms additions to the tasklet API.


1.2 19-Dec-2021 riastradh

Sprinkle in another assertion for good measure.


1.1 19-Dec-2021 riastradh

Draft Linux tasklet implementation.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.61 09-Apr-2022 riastradh

linux: Convert various API shims to use membar_release/acquire.


1.60 31-Dec-2021 riastradh

drm: Convert noisy flush_workqueue message to dtrace probe.


1.59 19-Dec-2021 riastradh

linux: Downgrade warning about flushing from workqueue to debug.


1.58 19-Dec-2021 riastradh

linux: Make flush_workqueue a noop if run from the workqueue.

I think this matches Linux semantics but this is very much not clear
and not written down anywhere obvious and why is this such a
semantically incoherent mess.


1.57 19-Dec-2021 riastradh

linux: Fix flush_workqueue.

Simplify mechanism: we know there's only a single thread here that
processes scheduled work in FIFO order (no multi-CPU workqueues --
would have to adapt if there were), so just schedule a work item that
notifies of completion. The previous mechanism of counting 0, 1, or
2 generation numbers was broken by an earlier change to avoid abuse
of tailqs arising from clever TAILQ_CONCAT.


1.56 19-Dec-2021 riastradh

linux: Update workqueue flush to reflect TAILQ_CONCAT change.


1.55 19-Dec-2021 riastradh

linux/workqueue: Draft queue_rcu_work.


1.54 19-Dec-2021 riastradh

linux/workqueue: Use atomic_load/store.


1.53 19-Dec-2021 riastradh

i915: another whack at it


1.52 19-Dec-2021 riastradh

alloc_workqueue


1.51 19-Dec-2021 riastradh

Constify work_pending, delayed_work_pending.


1.50 19-Dec-2021 riastradh

drain_workqueue


1.49 19-Dec-2021 riastradh

Add work_pending, delayed_work_pending.


1.48 19-Dec-2021 riastradh

Implement return value of flush_work, flush_delayed_work.


1.47 19-Dec-2021 riastradh

New system_unbound_wq.


1.46 19-Dec-2021 riastradh

Fix copypasta in error branch.

XXX pullup to HEAD


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3
1.45 01-Feb-2020 riastradh

Fix abuse of TAILQ_CONCAT.

Other parts of this expect that the entries will be on wq->wq_queue
or wq->wq_dqueue, so we can't just move a batch of entries onto a
temporary queue. Instead, use a marker node to delimit when the
batch ends.

XXX pullup


Revision tags: netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base
1.44 19-Mar-2019 ryo

branches: 1.44.4; 1.44.6;
- dwc2 need calling linux_workqueue_init() to avoid panic.
- use INIT_ONCE/FINI_ONCE to linux_workqueue_{init,fini}() for being called from dwc2.

TODO: dwc2 should be written as kernel module depenging on a linux module.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
1.43 27-Aug-2018 riastradh

Workqueue lock must be at IPL_VM for use in interrupts, duh.


1.42 27-Aug-2018 riastradh

Don't skimp on the last batch of work when worker is dying.

This is capitalism. We can't afford to waste time the worker could
spend on labour even if we work 'em to death!


1.41 27-Aug-2018 riastradh

Sprinkle dtrace probes all over the Linux workqueue stuff.


1.40 27-Aug-2018 riastradh

Fix post-cancellation case of queue_delayed_work.

Request the callout queue immediately, as if it hadn't been cancelled
at all, rather than reschedule for the next tick.


1.39 27-Aug-2018 riastradh

Rework Linux workqueue synchronization yet again.

- Use a low bit in the pointer to the queue, rather than whether the
pointer is null or not, to determine whether the work item is
queued/scheduled.

- _Preserve_ the pointer to the queue after we release the work.

- Release the work _before_ executing the function, not after.

This simplifies some things: we no longer have to distinguish whether
the work is queued or running in the functions where we are trying to
modify it. The pointer has to be preserved even after the work is
released so that we can flush the workqueue after the work has been
released.


1.38 27-Aug-2018 riastradh

Fix flush_delayed_work semantics: run it now if it was scheduled.


1.37 27-Aug-2018 riastradh

Reorder fields to get better space savings than bit fields.


1.36 27-Aug-2018 riastradh

Document workqueue semantics as I understand it.


1.35 27-Aug-2018 riastradh

Avoid the prospect of callout calls piling up.

Don't ever callout_schedule the callout while an existing call may be
in progress.

Echo some cases from cancel_delayed_work in flush_delayed_work.


1.34 27-Aug-2018 riastradh

Don't let more than one thread claim credit for cancellation.


1.33 27-Aug-2018 riastradh

Factor out waiting for current work.


1.32 27-Aug-2018 riastradh

Merge two similar branches.


1.31 27-Aug-2018 riastradh

Deduplicate callout destruction.


1.30 27-Aug-2018 riastradh

Deduplicate callout initialization.


1.29 27-Aug-2018 riastradh

Handle a bazillion additional cases I hadn't considered.

There's a lot of duplication here. To be deduplicated in a
subsequent commit.


1.28 27-Aug-2018 riastradh

Fix semantics of flush_work and flush_delayed_work.

- Change return type to void.
=> Upstream it is bool, but exactly one of hundreds of callers
actually use it, and I don't think the semantics is clear.

- Make sure to wait for whichever of the current work _and_ the next
batch queued is currently there in the workqueue.

- Don't retry a cancelled callout. Cancellation in the state
DELAYED_WORK_CANCELLED is guaranteed.


1.27 27-Aug-2018 riastradh

Reverse the sense of some branches for simplicity.


1.26 27-Aug-2018 riastradh

Fix bugs in workqueue destruction.


1.25 27-Aug-2018 riastradh

Fully initialize workqueue struct. Zalloc for paranoia.


1.24 27-Aug-2018 riastradh

No need to retry in cancel_delayed_work_sync after all.


1.23 27-Aug-2018 riastradh

Deduplicate post-cancellation logic.


1.22 27-Aug-2018 riastradh

Don't touch a work after it is released.


1.21 27-Aug-2018 riastradh

Non-waiting cancellation may need to release work too.


1.20 27-Aug-2018 riastradh

After cancel and callout_halt, may need to reload workqueue.


1.19 27-Aug-2018 riastradh

Don't wait forever to flush if the worker thread has no work.


1.18 27-Aug-2018 riastradh

Sprinkle some assertions.


1.17 27-Aug-2018 riastradh

Exercise greater care in acquiring and releasing work.


1.16 27-Aug-2018 riastradh

Add missing break.


1.15 27-Aug-2018 riastradh

Add KASSERT about state after callout fires.


1.14 27-Aug-2018 riastradh

Work is not necessarily queued in flush_work either.

Regularize style: use initializer only if the wq is guaranteed, and
confirmed by KASSERT, to be set


1.13 27-Aug-2018 riastradh

Work is not necessarily queued in cancel_work.


1.12 27-Aug-2018 riastradh

Draft rewrite of Linux workqueue reimplementation.

Just use an explicit thread; don't attempt to fudge it with
workqueue(9). No doubt there are various mistakes in here, but they
should be easier to get right than the mega-kludgerific nonsense that
preceded this draft.


1.11 27-Aug-2018 riastradh

Make flush_delayed_work actually run it. Oops.

XXX pullup-7
XXX pullup-8


1.10 27-Aug-2018 riastradh

Disable broken workqueue_whoami garbage.


1.9 27-Aug-2018 riastradh

Omit vestigial cruft.


1.8 27-Aug-2018 riastradh

Try to avoid uninitialized garbage that gcc helpfully ignores.


1.7 27-Aug-2018 riastradh

Try not to ask rbtree to overwrite random fields with garbage.


1.6 27-Aug-2018 riastradh

Add system_power_efficient_wq.


1.5 27-Aug-2018 riastradh

Implement flush_delayed_work.


1.4 27-Aug-2018 riastradh

Also Linux wants work->func to work.


1.3 27-Aug-2018 riastradh

Add mega-kludgerific current_work().


1.2 27-Aug-2018 riastradh

Add system_long_wq.


Revision tags: netbsd-8-3-RELEASE netbsd-8-2-RELEASE netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320 nick-nhusb-base-20170204 bouyer-socketcan-base pgoyette-localcount-20170107 nick-nhusb-base-20161204 pgoyette-localcount-20161104 nick-nhusb-base-20161004 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base nick-nhusb-base-20160907 nick-nhusb-base-20160529 nick-nhusb-base-20160422 nick-nhusb-base-20160319
1.1 24-Feb-2016 skrll

branches: 1.1.2; 1.1.6; 1.1.10; 1.1.22; 1.1.24; 1.1.26;
Move linux_work.c and workqueue.h from sys/external/bsd/drm2 to
sys/external/common so that they can be used by others.

LGTM from riastradh@

These should really live outside sys/external, but that can be decided
later