aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2020-05-13 18:07:37 +0000
committerKyle Evans <kevans@FreeBSD.org>2020-05-13 18:07:37 +0000
commitc79cee71363ddaeb3c5ab7d3ccb87a11e1860d95 (patch)
tree482bc9b1d4468d4fe52b090605655632d3b00b8e
parent0721214a60cbfe95fef3fabe256de8f8e62b3427 (diff)
Notes
-rw-r--r--sys/ddb/db_expr.c5
-rw-r--r--sys/dev/amdtemp/amdtemp.c4
-rw-r--r--sys/dev/nvdimm/nvdimm.c3
-rw-r--r--sys/dev/ow/ow.c2
-rw-r--r--sys/net/mppcc.c2
-rw-r--r--sys/sys/systm.h4
-rw-r--r--sys/vm/vm_radix.c2
7 files changed, 14 insertions, 8 deletions
diff --git a/sys/ddb/db_expr.c b/sys/ddb/db_expr.c
index b3198611a04c..340951089248 100644
--- a/sys/ddb/db_expr.c
+++ b/sys/ddb/db_expr.c
@@ -34,6 +34,7 @@
__FBSDID("$FreeBSD$");
#include <sys/param.h>
+#include <sys/systm.h>
#include <ddb/ddb.h>
#include <ddb/db_lex.h>
@@ -229,7 +230,7 @@ db_add_expr(db_expr_t *valuep)
lhs |= rhs;
break;
default:
- __unreachable();
+ __assert_unreachable();
}
t = db_read_token();
}
@@ -313,7 +314,7 @@ db_logical_relation_expr(
lhs = (lhs <= rhs);
break;
default:
- __unreachable();
+ __assert_unreachable();
}
t = db_read_token();
}
diff --git a/sys/dev/amdtemp/amdtemp.c b/sys/dev/amdtemp/amdtemp.c
index 597737c98c8c..80c0e3c538ef 100644
--- a/sys/dev/amdtemp/amdtemp.c
+++ b/sys/dev/amdtemp/amdtemp.c
@@ -666,7 +666,7 @@ amdtemp_gettemp0f(device_t dev, amdsensor_t sensor)
temp |= AMDTEMP_TTSR_SELCORE;
break;
default:
- __unreachable();
+ __assert_unreachable();
}
pci_write_config(dev, AMDTEMP_THERMTP_STAT, temp, 1);
@@ -766,7 +766,7 @@ amdtemp_gettemp17h(device_t dev, amdsensor_t sensor)
("sensor %d: not valid", (int)sensor));
return (amdtemp_decode_fam10h_to_17h(sc->sc_offset, val, true));
default:
- __unreachable();
+ __assert_unreachable();
}
}
diff --git a/sys/dev/nvdimm/nvdimm.c b/sys/dev/nvdimm/nvdimm.c
index 4f3696fefd50..66638636ef0e 100644
--- a/sys/dev/nvdimm/nvdimm.c
+++ b/sys/dev/nvdimm/nvdimm.c
@@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$");
#include "opt_ddb.h"
#include <sys/param.h>
+#include <sys/systm.h>
#include <sys/bio.h>
#include <sys/bitstring.h>
#include <sys/bus.h>
@@ -236,7 +237,7 @@ read_label(struct nvdimm_dev *nv, int num)
return (0);
}
}
- __unreachable();
+ __assert_unreachable();
}
static int
diff --git a/sys/dev/ow/ow.c b/sys/dev/ow/ow.c
index eda33ea986d4..a6583accaa59 100644
--- a/sys/dev/ow/ow.c
+++ b/sys/dev/ow/ow.c
@@ -507,7 +507,7 @@ again:
return (EIO);
goto again;
default: /* NOTREACHED */
- __unreachable();
+ __assert_unreachable();
}
if (dir) {
OWLL_WRITE_ONE(lldev, &timing_regular);
diff --git a/sys/net/mppcc.c b/sys/net/mppcc.c
index 8ec21ad7c652..c1bf566c790c 100644
--- a/sys/net/mppcc.c
+++ b/sys/net/mppcc.c
@@ -232,7 +232,7 @@ int MPPC_Compress(u_char **src, u_char **dst, u_long *srcCnt, u_long *dstCnt, ch
} else if (off < 8192) { /* 16-bit offset; 320 <= offset < 8192 */
putbits16(*dst, 0xc000|(off-320), 16, &olen, &l);
} else { /* NOTREACHED */
- __unreachable();
+ __assert_unreachable();
rtn &= ~MPPC_OK;
return (rtn);
}
diff --git a/sys/sys/systm.h b/sys/sys/systm.h
index 628dd4e0f5b1..b105a27a6f73 100644
--- a/sys/sys/systm.h
+++ b/sys/sys/systm.h
@@ -117,6 +117,9 @@ void kassert_panic(const char *fmt, ...) __printflike(1, 2);
VNASSERT(exp, vp, ("condition %s not met at %s:%d (%s)", \
_exp, __FILE__, __LINE__, __func__)); \
} while (0)
+#define __assert_unreachable() \
+ panic("executing segment marked as unreachable at %s:%d (%s)\n", \
+ __FILE__, __LINE__, __func__)
#else
#define KASSERT(exp,msg) do { \
} while (0)
@@ -125,6 +128,7 @@ void kassert_panic(const char *fmt, ...) __printflike(1, 2);
} while (0)
#define VNPASS(exp, vp) do { \
} while (0)
+#define __assert_unreachable() __unreachable()
#endif
#ifndef CTASSERT /* Allow lint to override */
diff --git a/sys/vm/vm_radix.c b/sys/vm/vm_radix.c
index ce9edad13c1e..31666f0053c3 100644
--- a/sys/vm/vm_radix.c
+++ b/sys/vm/vm_radix.c
@@ -209,7 +209,7 @@ vm_radix_node_load(smrnode_t *p, enum vm_radix_access access)
case SMR:
return (smr_entered_load(p, vm_radix_smr));
}
- __unreachable();
+ __assert_unreachable();
}
static __inline void