/** * struct nvdimm_pmu - data structure for nvdimm perf driver * @pmu: pmu data structure for nvdimm performance stats. * @dev: nvdimm device pointer. * @cpu: designated cpu for counter access. * @node: node for cpu hotplug notifier link. * @cpuhp_state: state for cpu hotplug notification. * @arch_cpumask: cpumask to get designated cpu for counter access.
*/ struct nvdimm_pmu { struct pmu pmu; struct device *dev; int cpu; struct hlist_node node; enum cpuhp_state cpuhp_state; /* cpumask provided by arch/platform specific code */ struct cpumask arch_cpumask;
};
/** * struct nd_namespace_common - core infrastructure of a namespace * @force_raw: ignore other personalities for the namespace (e.g. btt) * @dev: device model node * @claim: when set a another personality has taken ownership of the namespace * @claim_class: restrict claim type to a given class * @rw_bytes: access the raw namespace capacity with byte-aligned transfers
*/ struct nd_namespace_common { int force_raw; struct device dev; struct device *claim; enum nvdimm_claim_class claim_class; int (*rw_bytes)(struct nd_namespace_common *, resource_size_t offset, void *buf, size_t size, int rw, unsignedlong flags);
};
/** * struct nd_namespace_io - device representation of a persistent memory range * @dev: namespace device created by the nd region driver * @res: struct resource conversion of a NFIT SPA table * @size: cached resource_size(@res) for fast path size checks * @addr: virtual address to access the namespace range * @bb: badblocks list for the namespace range
*/ struct nd_namespace_io { struct nd_namespace_common common; struct resource res;
resource_size_t size; void *addr; struct badblocks bb;
};
/** * struct nd_namespace_pmem - namespace device for dimm-backed interleaved memory * @nsio: device and system physical address range to drive * @lbasize: logical sector size for the namespace in block-device-mode * @alt_name: namespace name supplied in the dimm label * @uuid: namespace name supplied in the dimm label * @id: ida allocated id
*/ struct nd_namespace_pmem { struct nd_namespace_io nsio; unsignedlong lbasize; char *alt_name;
uuid_t *uuid; int id;
};
/** * nvdimm_read_bytes() - synchronously read bytes from an nvdimm namespace * @ndns: device to read * @offset: namespace-relative starting offset * @buf: buffer to fill * @size: transfer length * * @buf is up-to-date upon return from this routine.
*/ staticinlineint nvdimm_read_bytes(struct nd_namespace_common *ndns,
resource_size_t offset, void *buf, size_t size, unsignedlong flags)
{ return ndns->rw_bytes(ndns, offset, buf, size, READ, flags);
}
/** * nvdimm_write_bytes() - synchronously write bytes to an nvdimm namespace * @ndns: device to write * @offset: namespace-relative starting offset * @buf: buffer to drain * @size: transfer length * * NVDIMM Namepaces disks do not implement sectors internally. Depending on * the @ndns, the contents of @buf may be in cpu cache, platform buffers, * or on backing memory media upon return from this routine. Flushing * to media is handled internal to the @ndns driver, if at all.
*/ staticinlineint nvdimm_write_bytes(struct nd_namespace_common *ndns,
resource_size_t offset, void *buf, size_t size, unsignedlong flags)
{ return ndns->rw_bytes(ndns, offset, buf, size, WRITE, flags);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.