freebsd-skq/sys/dev/nvdimm
Kyle Evans c79cee7136 kernel: provide panicky version of __unreachable
__builtin_unreachable doesn't raise any compile-time warnings/errors on its
own, so problems with its usage can't be easily detected. While it would be
nice for this situation to change and compilers to at least add a warning
for trivial cases where local state means the instruction can't be reached,
this isn't the case at the moment and likely will not happen.

This commit adds an __assert_unreachable, whose intent is incredibly clear:
it asserts that this instruction is unreachable. On INVARIANTS builds, it's
a panic(), and on non-INVARIANTS it expands to  __unreachable().

Existing users of __unreachable() are converted to __assert_unreachable,
to improve debuggability if this assumption is violated.

Reviewed by:	mjg
Differential Revision:	https://reviews.freebsd.org/D23793
2020-05-13 18:07:37 +00:00
..
nvdimm_acpi.c nvdimm(4): Only expose namespaces for accessible data SPAs 2019-11-12 15:50:30 +00:00
nvdimm_e820.c nvdimm_e820: Fix braino in size=all SPA hint 2019-10-18 03:01:21 +00:00
nvdimm_nfit.c nvdimm: only enumerate present nvdimm devices 2019-01-31 22:47:04 +00:00
nvdimm_ns.c nvdimm(4): Persist unit numbers in cdev 2019-10-18 21:32:45 +00:00
nvdimm_spa.c Use atomic for start_count in devstat_start_transaction(). 2019-12-30 03:13:38 +00:00
nvdimm_var.h Use atomic for start_count in devstat_start_transaction(). 2019-12-30 03:13:38 +00:00
nvdimm.c kernel: provide panicky version of __unreachable 2020-05-13 18:07:37 +00:00