riastradh
2c5bb0268e
Forgot to commit drm_trace_netbsd.h. Too late to force an update...
2018-08-27 15:23:40 +00:00
riastradh
f2331d9572
Draft support for drm prime.
2018-08-27 15:22:53 +00:00
sevan
697ce8551e
Remove references to -c flag which was never included.
2018-08-27 15:16:49 +00:00
riastradh
68e5b0fb16
Work around `kmap' namespace clash another way.
2018-08-27 15:13:17 +00:00
riastradh
0fce50c8ae
Omit vestigial diff from radeon_mode.h.
2018-08-27 15:13:05 +00:00
riastradh
a81852d086
Convert to long for format expedience.
2018-08-27 15:12:35 +00:00
riastradh
71276a2c0e
Try agp_i810_borrow only if CONFIG_AGP is enabled.
2018-08-27 15:12:21 +00:00
riastradh
b9e03b7c3c
opt_mtrr.h is x86-only.
2018-08-27 15:12:09 +00:00
riastradh
ff4e551ba1
Use PHYS_TO_BUS_MEM in generic bus_dmamap_load_pglist code.
...
For arm and x86, this is a noop. For powerpc, it is defined by some
relevant header file.
2018-08-27 15:11:58 +00:00
riastradh
061a015a40
Implement drm_md_clflush_* for powerpc with dcbf.
2018-08-27 15:11:46 +00:00
riastradh
5f9c05cc86
Use Linux atomic64 for ww mutex class.
...
This way we can take advantage of the hash-locked atomic64 on
platforms that lack native atomic_inc_64_nv.
2018-08-27 15:11:32 +00:00
riastradh
b12f5a5441
Implement atomic64_add_return and atomic64_inc_return.
2018-08-27 15:11:17 +00:00
riastradh
ac306aa704
Sort.
2018-08-27 15:11:04 +00:00
riastradh
88b7f7da4f
Fix argument types of atomic64_add/sub to be sensible.
...
Technically Linux does use long long rather than int64_t, but that's
silly.
2018-08-27 15:10:52 +00:00
riastradh
101f4868d0
Implement ATOMIC64_INIT.
2018-08-27 15:10:41 +00:00
riastradh
e733144d22
Need <uvm/uvm.h> for struct uvm_object.
2018-08-27 15:10:25 +00:00
riastradh
8def7a33b3
Sprinkle AGP conditionals where needed.
2018-08-27 15:10:12 +00:00
riastradh
290bbba29a
Work around a namespacing clash between dtrace and linux symbol.
2018-08-27 15:09:58 +00:00
riastradh
11e2f4e40e
Use dtrace probes to implement i915_trace.h.
2018-08-27 15:09:35 +00:00
riastradh
1d9ce7071c
Hash-locked atomic64 to give ports like powerpc32 a chance at radeon.
2018-08-27 15:08:54 +00:00
riastradh
fdce7bed9d
Delete spurious file accidentally committed.
2018-08-27 15:08:25 +00:00
riastradh
936018793f
dtrace sdt probes for linux rcu.
2018-08-27 15:07:59 +00:00
riastradh
70435d9314
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!
2018-08-27 15:07:44 +00:00
riastradh
077afc9a15
Work around broken empty expansion of SDT_PROBE* if !KDTRACE_HOOKS.
2018-08-27 15:07:29 +00:00
riastradh
e794a29ba6
sdt dtrace probes for linux kmap.
2018-08-27 15:07:11 +00:00
riastradh
5248a24ccc
sdt dtrace probes for linux idr.
2018-08-27 15:06:54 +00:00
riastradh
ccfee5f718
Sprinkle dtrace probes all over the Linux workqueue stuff.
2018-08-27 15:06:37 +00:00
riastradh
0466378a17
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.
2018-08-27 15:06:20 +00:00
riastradh
e27b343568
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.
2018-08-27 15:06:02 +00:00
riastradh
a1c732f301
Fix flush_delayed_work semantics: run it now if it was scheduled.
2018-08-27 15:05:44 +00:00
riastradh
168b5894a5
Reorder fields to get better space savings than bit fields.
2018-08-27 15:05:30 +00:00
riastradh
31bca41163
Document workqueue semantics as I understand it.
2018-08-27 15:05:16 +00:00
riastradh
1fca7189a5
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.
2018-08-27 15:05:01 +00:00
riastradh
296411f744
Don't let more than one thread claim credit for cancellation.
2018-08-27 15:04:45 +00:00
riastradh
50219d6a99
Factor out waiting for current work.
2018-08-27 15:04:32 +00:00
riastradh
6bba4bb671
Merge two similar branches.
2018-08-27 15:04:19 +00:00
riastradh
d2984e1fab
Deduplicate callout destruction.
2018-08-27 15:03:59 +00:00
riastradh
450ff8bbdc
Deduplicate callout initialization.
2018-08-27 15:03:45 +00:00
riastradh
a1f195dae7
Handle a bazillion additional cases I hadn't considered.
...
There's a lot of duplication here. To be deduplicated in a
subsequent commit.
2018-08-27 15:03:32 +00:00
riastradh
6810725695
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.
2018-08-27 15:03:20 +00:00
riastradh
9cb8c351bd
Reverse the sense of some branches for simplicity.
2018-08-27 15:03:07 +00:00
riastradh
5f1b90f39a
Fix bugs in workqueue destruction.
2018-08-27 15:02:52 +00:00
riastradh
7a09cf8a76
Fully initialize workqueue struct. Zalloc for paranoia.
2018-08-27 15:02:38 +00:00
riastradh
551d54d11f
No need to retry in cancel_delayed_work_sync after all.
2018-08-27 15:02:19 +00:00
riastradh
535de6e400
Deduplicate post-cancellation logic.
2018-08-27 15:02:08 +00:00
riastradh
5891db5c6e
Don't touch a work after it is released.
2018-08-27 15:01:47 +00:00
riastradh
01334e6900
Non-waiting cancellation may need to release work too.
2018-08-27 15:01:13 +00:00
riastradh
61b3d58635
After cancel and callout_halt, may need to reload workqueue.
2018-08-27 15:00:57 +00:00
riastradh
5638bd9cfa
Don't wait forever to flush if the worker thread has no work.
2018-08-27 15:00:27 +00:00
riastradh
6c0c863ee4
Sprinkle some assertions.
2018-08-27 14:59:58 +00:00