nd.h (1b40e09a1232de537b193fa1b6b3ef16d3a1e397) | nd.h (f524bf271a5cf12a44253194abcf8b6688ff5b9d) |
---|---|
1/* 2 * Copyright(c) 2013-2015 Intel Corporation. All rights reserved. 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of version 2 of the GNU General Public License as 6 * published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope that it will be useful, but --- 79 unchanged lines hidden (view full) --- 88 * Lookup next in the repeating sequence of 01, 10, and 11. 89 */ 90static inline unsigned nd_inc_seq(unsigned seq) 91{ 92 static const unsigned next[] = { 0, 2, 3, 1 }; 93 94 return next[seq & 3]; 95} | 1/* 2 * Copyright(c) 2013-2015 Intel Corporation. All rights reserved. 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of version 2 of the GNU General Public License as 6 * published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope that it will be useful, but --- 79 unchanged lines hidden (view full) --- 88 * Lookup next in the repeating sequence of 01, 10, and 11. 89 */ 90static inline unsigned nd_inc_seq(unsigned seq) 91{ 92 static const unsigned next[] = { 0, 2, 3, 1 }; 93 94 return next[seq & 3]; 95} |
96 |
|
96enum nd_async_mode { 97 ND_SYNC, 98 ND_ASYNC, 99}; 100 101void wait_nvdimm_bus_probe_idle(struct device *dev); 102void nd_device_register(struct device *dev); 103void nd_device_unregister(struct device *dev, enum nd_async_mode mode); --- 6 unchanged lines hidden (view full) --- 110int __init nvdimm_init(void); 111int __init nd_region_init(void); 112void nvdimm_exit(void); 113void nd_region_exit(void); 114struct nvdimm; 115struct nvdimm_drvdata *to_ndd(struct nd_mapping *nd_mapping); 116int nvdimm_init_nsarea(struct nvdimm_drvdata *ndd); 117int nvdimm_init_config_data(struct nvdimm_drvdata *ndd); | 97enum nd_async_mode { 98 ND_SYNC, 99 ND_ASYNC, 100}; 101 102void wait_nvdimm_bus_probe_idle(struct device *dev); 103void nd_device_register(struct device *dev); 104void nd_device_unregister(struct device *dev, enum nd_async_mode mode); --- 6 unchanged lines hidden (view full) --- 111int __init nvdimm_init(void); 112int __init nd_region_init(void); 113void nvdimm_exit(void); 114void nd_region_exit(void); 115struct nvdimm; 116struct nvdimm_drvdata *to_ndd(struct nd_mapping *nd_mapping); 117int nvdimm_init_nsarea(struct nvdimm_drvdata *ndd); 118int nvdimm_init_config_data(struct nvdimm_drvdata *ndd); |
119int nvdimm_set_config_data(struct nvdimm_drvdata *ndd, size_t offset, 120 void *buf, size_t len); |
|
118struct nd_region *to_nd_region(struct device *dev); 119int nd_region_to_nstype(struct nd_region *nd_region); 120int nd_region_register_namespaces(struct nd_region *nd_region, int *err); 121u64 nd_region_interleave_set_cookie(struct nd_region *nd_region); 122void nvdimm_bus_lock(struct device *dev); 123void nvdimm_bus_unlock(struct device *dev); 124bool is_nvdimm_bus_locked(struct device *dev); 125void nvdimm_drvdata_release(struct kref *kref); 126void put_ndd(struct nvdimm_drvdata *ndd); 127int nd_label_reserve_dpa(struct nvdimm_drvdata *ndd); 128void nvdimm_free_dpa(struct nvdimm_drvdata *ndd, struct resource *res); 129struct resource *nvdimm_allocate_dpa(struct nvdimm_drvdata *ndd, 130 struct nd_label_id *label_id, resource_size_t start, 131 resource_size_t n); 132#endif /* __ND_H__ */ | 121struct nd_region *to_nd_region(struct device *dev); 122int nd_region_to_nstype(struct nd_region *nd_region); 123int nd_region_register_namespaces(struct nd_region *nd_region, int *err); 124u64 nd_region_interleave_set_cookie(struct nd_region *nd_region); 125void nvdimm_bus_lock(struct device *dev); 126void nvdimm_bus_unlock(struct device *dev); 127bool is_nvdimm_bus_locked(struct device *dev); 128void nvdimm_drvdata_release(struct kref *kref); 129void put_ndd(struct nvdimm_drvdata *ndd); 130int nd_label_reserve_dpa(struct nvdimm_drvdata *ndd); 131void nvdimm_free_dpa(struct nvdimm_drvdata *ndd, struct resource *res); 132struct resource *nvdimm_allocate_dpa(struct nvdimm_drvdata *ndd, 133 struct nd_label_id *label_id, resource_size_t start, 134 resource_size_t n); 135#endif /* __ND_H__ */ |