Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/nvdimm/nvdimm.c
Show All 29 Lines | |||||
#include <sys/cdefs.h> | #include <sys/cdefs.h> | ||||
__FBSDID("$FreeBSD$"); | __FBSDID("$FreeBSD$"); | ||||
#include "opt_acpi.h" | #include "opt_acpi.h" | ||||
#include "opt_ddb.h" | #include "opt_ddb.h" | ||||
#include <sys/param.h> | #include <sys/param.h> | ||||
#include <sys/systm.h> | |||||
#include <sys/bio.h> | #include <sys/bio.h> | ||||
#include <sys/bitstring.h> | #include <sys/bitstring.h> | ||||
#include <sys/bus.h> | #include <sys/bus.h> | ||||
#include <sys/kernel.h> | #include <sys/kernel.h> | ||||
#include <sys/lock.h> | #include <sys/lock.h> | ||||
#include <sys/malloc.h> | #include <sys/malloc.h> | ||||
#include <sys/module.h> | #include <sys/module.h> | ||||
#include <sys/uuid.h> | #include <sys/uuid.h> | ||||
▲ Show 20 Lines • Show All 185 Lines • ▼ Show 20 Lines | read_label(struct nvdimm_dev *nv, int num) | ||||
} | } | ||||
SLIST_FOREACH_SAFE(i, &nv->labels, link, next) { | SLIST_FOREACH_SAFE(i, &nv->labels, link, next) { | ||||
if (next == NULL || | if (next == NULL || | ||||
entry->label.dimm_phys_addr <= next->label.dimm_phys_addr) { | entry->label.dimm_phys_addr <= next->label.dimm_phys_addr) { | ||||
SLIST_INSERT_AFTER(i, entry, link); | SLIST_INSERT_AFTER(i, entry, link); | ||||
return (0); | return (0); | ||||
} | } | ||||
} | } | ||||
__unreachable(); | __assert_unreachable(); | ||||
} | } | ||||
static int | static int | ||||
read_labels(struct nvdimm_dev *nv) | read_labels(struct nvdimm_dev *nv) | ||||
{ | { | ||||
struct nvdimm_label_index *indices, *index1; | struct nvdimm_label_index *indices, *index1; | ||||
size_t bitfield_size, index_size, num_labels; | size_t bitfield_size, index_size, num_labels; | ||||
int error, n; | int error, n; | ||||
▲ Show 20 Lines • Show All 165 Lines • Show Last 20 Lines |