Skip to content

Commit a5ce429

Browse files
committed
Merge tag 'libnvdimm-fixes-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm
Pull libnvdimm fixes from Dan Williams: "A regression fix for a bootup crash condition introduced in this merge window and some other minor fixups: - Fix regression in ACPI NFIT table handling leading to crashes and driver load failures. - Move the nvdimm mailing list - Miscellaneous minor fixups" * tag 'libnvdimm-fixes-5.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: ACPI: NFIT: Fix support for variable 'SPA' structure size MAINTAINERS: Move nvdimm mailing list tools/testing/nvdimm: Make symbol '__nfit_test_ioremap' static libnvdimm: Remove duplicate struct declaration
2 parents 393f42f + e9cfd25 commit a5ce429

File tree

10 files changed

+69
-55
lines changed

10 files changed

+69
-55
lines changed

Documentation/ABI/obsolete/sysfs-class-dax

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
What: /sys/class/dax/
22
Date: May, 2016
33
KernelVersion: v4.7
4-
Contact: linux-nvdimm@lists.01.org
4+
Contact: nvdimm@lists.linux.dev
55
Description: Device DAX is the device-centric analogue of Filesystem
66
DAX (CONFIG_FS_DAX). It allows memory ranges to be
77
allocated and mapped without need of an intervening file

Documentation/ABI/removed/sysfs-bus-nfit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
What: /sys/bus/nd/devices/regionX/nfit/ecc_unit_size
22
Date: Aug, 2017
33
KernelVersion: v4.14 (Removed v4.18)
4-
Contact: linux-nvdimm@lists.01.org
4+
Contact: nvdimm@lists.linux.dev
55
Description:
66
(RO) Size of a write request to a DIMM that will not incur a
77
read-modify-write cycle at the memory controller.

Documentation/ABI/testing/sysfs-bus-nfit

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Interface Table (NFIT)' section in the ACPI specification
55
What: /sys/bus/nd/devices/nmemX/nfit/serial
66
Date: Jun, 2015
77
KernelVersion: v4.2
8-
Contact: linux-nvdimm@lists.01.org
8+
Contact: nvdimm@lists.linux.dev
99
Description:
1010
(RO) Serial number of the NVDIMM (non-volatile dual in-line
1111
memory module), assigned by the module vendor.
@@ -14,7 +14,7 @@ Description:
1414
What: /sys/bus/nd/devices/nmemX/nfit/handle
1515
Date: Apr, 2015
1616
KernelVersion: v4.2
17-
Contact: linux-nvdimm@lists.01.org
17+
Contact: nvdimm@lists.linux.dev
1818
Description:
1919
(RO) The address (given by the _ADR object) of the device on its
2020
parent bus of the NVDIMM device containing the NVDIMM region.
@@ -23,23 +23,23 @@ Description:
2323
What: /sys/bus/nd/devices/nmemX/nfit/device
2424
Date: Apr, 2015
2525
KernelVersion: v4.1
26-
Contact: linux-nvdimm@lists.01.org
26+
Contact: nvdimm@lists.linux.dev
2727
Description:
2828
(RO) Device id for the NVDIMM, assigned by the module vendor.
2929

3030

3131
What: /sys/bus/nd/devices/nmemX/nfit/rev_id
3232
Date: Jun, 2015
3333
KernelVersion: v4.2
34-
Contact: linux-nvdimm@lists.01.org
34+
Contact: nvdimm@lists.linux.dev
3535
Description:
3636
(RO) Revision of the NVDIMM, assigned by the module vendor.
3737

3838

3939
What: /sys/bus/nd/devices/nmemX/nfit/phys_id
4040
Date: Apr, 2015
4141
KernelVersion: v4.2
42-
Contact: linux-nvdimm@lists.01.org
42+
Contact: nvdimm@lists.linux.dev
4343
Description:
4444
(RO) Handle (i.e., instance number) for the SMBIOS (system
4545
management BIOS) Memory Device structure describing the NVDIMM
@@ -49,7 +49,7 @@ Description:
4949
What: /sys/bus/nd/devices/nmemX/nfit/flags
5050
Date: Jun, 2015
5151
KernelVersion: v4.2
52-
Contact: linux-nvdimm@lists.01.org
52+
Contact: nvdimm@lists.linux.dev
5353
Description:
5454
(RO) The flags in the NFIT memory device sub-structure indicate
5555
the state of the data on the nvdimm relative to its energy
@@ -68,7 +68,7 @@ What: /sys/bus/nd/devices/nmemX/nfit/format1
6868
What: /sys/bus/nd/devices/nmemX/nfit/formats
6969
Date: Apr, 2016
7070
KernelVersion: v4.7
71-
Contact: linux-nvdimm@lists.01.org
71+
Contact: nvdimm@lists.linux.dev
7272
Description:
7373
(RO) The interface codes indicate support for persistent memory
7474
mapped directly into system physical address space and / or a
@@ -84,15 +84,15 @@ Description:
8484
What: /sys/bus/nd/devices/nmemX/nfit/vendor
8585
Date: Apr, 2016
8686
KernelVersion: v4.7
87-
Contact: linux-nvdimm@lists.01.org
87+
Contact: nvdimm@lists.linux.dev
8888
Description:
8989
(RO) Vendor id of the NVDIMM.
9090

9191

9292
What: /sys/bus/nd/devices/nmemX/nfit/dsm_mask
9393
Date: May, 2016
9494
KernelVersion: v4.7
95-
Contact: linux-nvdimm@lists.01.org
95+
Contact: nvdimm@lists.linux.dev
9696
Description:
9797
(RO) The bitmask indicates the supported device specific control
9898
functions relative to the NVDIMM command family supported by the
@@ -102,7 +102,7 @@ Description:
102102
What: /sys/bus/nd/devices/nmemX/nfit/family
103103
Date: Apr, 2016
104104
KernelVersion: v4.7
105-
Contact: linux-nvdimm@lists.01.org
105+
Contact: nvdimm@lists.linux.dev
106106
Description:
107107
(RO) Displays the NVDIMM family command sets. Values
108108
0, 1, 2 and 3 correspond to NVDIMM_FAMILY_INTEL,
@@ -118,7 +118,7 @@ Description:
118118
What: /sys/bus/nd/devices/nmemX/nfit/id
119119
Date: Apr, 2016
120120
KernelVersion: v4.7
121-
Contact: linux-nvdimm@lists.01.org
121+
Contact: nvdimm@lists.linux.dev
122122
Description:
123123
(RO) ACPI specification 6.2 section 5.2.25.9, defines an
124124
identifier for an NVDIMM, which refelects the id attribute.
@@ -127,7 +127,7 @@ Description:
127127
What: /sys/bus/nd/devices/nmemX/nfit/subsystem_vendor
128128
Date: Apr, 2016
129129
KernelVersion: v4.7
130-
Contact: linux-nvdimm@lists.01.org
130+
Contact: nvdimm@lists.linux.dev
131131
Description:
132132
(RO) Sub-system vendor id of the NVDIMM non-volatile memory
133133
subsystem controller.
@@ -136,7 +136,7 @@ Description:
136136
What: /sys/bus/nd/devices/nmemX/nfit/subsystem_rev_id
137137
Date: Apr, 2016
138138
KernelVersion: v4.7
139-
Contact: linux-nvdimm@lists.01.org
139+
Contact: nvdimm@lists.linux.dev
140140
Description:
141141
(RO) Sub-system revision id of the NVDIMM non-volatile memory subsystem
142142
controller, assigned by the non-volatile memory subsystem
@@ -146,7 +146,7 @@ Description:
146146
What: /sys/bus/nd/devices/nmemX/nfit/subsystem_device
147147
Date: Apr, 2016
148148
KernelVersion: v4.7
149-
Contact: linux-nvdimm@lists.01.org
149+
Contact: nvdimm@lists.linux.dev
150150
Description:
151151
(RO) Sub-system device id for the NVDIMM non-volatile memory
152152
subsystem controller, assigned by the non-volatile memory
@@ -156,15 +156,15 @@ Description:
156156
What: /sys/bus/nd/devices/ndbusX/nfit/revision
157157
Date: Jun, 2015
158158
KernelVersion: v4.2
159-
Contact: linux-nvdimm@lists.01.org
159+
Contact: nvdimm@lists.linux.dev
160160
Description:
161161
(RO) ACPI NFIT table revision number.
162162

163163

164164
What: /sys/bus/nd/devices/ndbusX/nfit/scrub
165165
Date: Sep, 2016
166166
KernelVersion: v4.9
167-
Contact: linux-nvdimm@lists.01.org
167+
Contact: nvdimm@lists.linux.dev
168168
Description:
169169
(RW) This shows the number of full Address Range Scrubs (ARS)
170170
that have been completed since driver load time. Userspace can
@@ -177,7 +177,7 @@ Description:
177177
What: /sys/bus/nd/devices/ndbusX/nfit/hw_error_scrub
178178
Date: Sep, 2016
179179
KernelVersion: v4.9
180-
Contact: linux-nvdimm@lists.01.org
180+
Contact: nvdimm@lists.linux.dev
181181
Description:
182182
(RW) Provides a way to toggle the behavior between just adding
183183
the address (cache line) where the MCE happened to the poison
@@ -196,7 +196,7 @@ Description:
196196
What: /sys/bus/nd/devices/ndbusX/nfit/dsm_mask
197197
Date: Jun, 2017
198198
KernelVersion: v4.13
199-
Contact: linux-nvdimm@lists.01.org
199+
Contact: nvdimm@lists.linux.dev
200200
Description:
201201
(RO) The bitmask indicates the supported bus specific control
202202
functions. See the section named 'NVDIMM Root Device _DSMs' in
@@ -205,7 +205,7 @@ Description:
205205
What: /sys/bus/nd/devices/ndbusX/nfit/firmware_activate_noidle
206206
Date: Apr, 2020
207207
KernelVersion: v5.8
208-
Contact: linux-nvdimm@lists.01.org
208+
Contact: nvdimm@lists.linux.dev
209209
Description:
210210
(RW) The Intel platform implementation of firmware activate
211211
support exposes an option let the platform force idle devices in
@@ -225,7 +225,7 @@ Description:
225225
What: /sys/bus/nd/devices/regionX/nfit/range_index
226226
Date: Jun, 2015
227227
KernelVersion: v4.2
228-
Contact: linux-nvdimm@lists.01.org
228+
Contact: nvdimm@lists.linux.dev
229229
Description:
230230
(RO) A unique number provided by the BIOS to identify an address
231231
range. Used by NVDIMM Region Mapping Structure to uniquely refer

Documentation/ABI/testing/sysfs-bus-papr-pmem

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
What: /sys/bus/nd/devices/nmemX/papr/flags
22
Date: Apr, 2020
33
KernelVersion: v5.8
4-
Contact: linuxppc-dev <[email protected]>, linux-nvdimm@lists.01.org,
4+
Contact: linuxppc-dev <[email protected]>, nvdimm@lists.linux.dev,
55
Description:
66
(RO) Report flags indicating various states of a
77
papr-pmem NVDIMM device. Each flag maps to a one or
@@ -36,7 +36,7 @@ Description:
3636
What: /sys/bus/nd/devices/nmemX/papr/perf_stats
3737
Date: May, 2020
3838
KernelVersion: v5.9
39-
Contact: linuxppc-dev <[email protected]>, linux-nvdimm@lists.01.org,
39+
Contact: linuxppc-dev <[email protected]>, nvdimm@lists.linux.dev,
4040
Description:
4141
(RO) Report various performance stats related to papr-scm NVDIMM
4242
device. Each stat is reported on a new line with each line

Documentation/driver-api/nvdimm/nvdimm.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ LIBNVDIMM: Non-Volatile Devices
44

55
libnvdimm - kernel / libndctl - userspace helper library
66

7-
linux-nvdimm@lists.01.org
7+
nvdimm@lists.linux.dev
88

99
Version 13
1010

MAINTAINERS

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5237,7 +5237,7 @@ DEVICE DIRECT ACCESS (DAX)
52375237
M: Dan Williams <[email protected]>
52385238
M: Vishal Verma <[email protected]>
52395239
M: Dave Jiang <[email protected]>
5240-
L: linux-nvdimm@lists.01.org
5240+
L: nvdimm@lists.linux.dev
52415241
S: Supported
52425242
F: drivers/dax/
52435243

@@ -7006,7 +7006,7 @@ M: Dan Williams <[email protected]>
70067006
R: Matthew Wilcox <[email protected]>
70077007
R: Jan Kara <[email protected]>
70087008
7009-
L: linux-nvdimm@lists.01.org
7009+
L: nvdimm@lists.linux.dev
70107010
S: Supported
70117011
F: fs/dax.c
70127012
F: include/linux/dax.h
@@ -10378,7 +10378,7 @@ LIBNVDIMM BLK: MMIO-APERTURE DRIVER
1037810378
M: Dan Williams <[email protected]>
1037910379
M: Vishal Verma <[email protected]>
1038010380
M: Dave Jiang <[email protected]>
10381-
L: linux-nvdimm@lists.01.org
10381+
L: nvdimm@lists.linux.dev
1038210382
S: Supported
1038310383
Q: https://patchwork.kernel.org/project/linux-nvdimm/list/
1038410384
P: Documentation/nvdimm/maintainer-entry-profile.rst
@@ -10389,7 +10389,7 @@ LIBNVDIMM BTT: BLOCK TRANSLATION TABLE
1038910389
M: Vishal Verma <[email protected]>
1039010390
M: Dan Williams <[email protected]>
1039110391
M: Dave Jiang <[email protected]>
10392-
L: linux-nvdimm@lists.01.org
10392+
L: nvdimm@lists.linux.dev
1039310393
S: Supported
1039410394
Q: https://patchwork.kernel.org/project/linux-nvdimm/list/
1039510395
P: Documentation/nvdimm/maintainer-entry-profile.rst
@@ -10399,15 +10399,15 @@ LIBNVDIMM PMEM: PERSISTENT MEMORY DRIVER
1039910399
M: Dan Williams <[email protected]>
1040010400
M: Vishal Verma <[email protected]>
1040110401
M: Dave Jiang <[email protected]>
10402-
L: linux-nvdimm@lists.01.org
10402+
L: nvdimm@lists.linux.dev
1040310403
S: Supported
1040410404
Q: https://patchwork.kernel.org/project/linux-nvdimm/list/
1040510405
P: Documentation/nvdimm/maintainer-entry-profile.rst
1040610406
F: drivers/nvdimm/pmem*
1040710407

1040810408
LIBNVDIMM: DEVICETREE BINDINGS
1040910409
M: Oliver O'Halloran <[email protected]>
10410-
L: linux-nvdimm@lists.01.org
10410+
L: nvdimm@lists.linux.dev
1041110411
S: Supported
1041210412
Q: https://patchwork.kernel.org/project/linux-nvdimm/list/
1041310413
F: Documentation/devicetree/bindings/pmem/pmem-region.txt
@@ -10418,7 +10418,7 @@ M: Dan Williams <[email protected]>
1041810418
M: Vishal Verma <[email protected]>
1041910419
M: Dave Jiang <[email protected]>
1042010420
M: Ira Weiny <[email protected]>
10421-
L: linux-nvdimm@lists.01.org
10421+
L: nvdimm@lists.linux.dev
1042210422
S: Supported
1042310423
Q: https://patchwork.kernel.org/project/linux-nvdimm/list/
1042410424
P: Documentation/nvdimm/maintainer-entry-profile.rst

drivers/acpi/nfit/core.c

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -686,29 +686,36 @@ int nfit_spa_type(struct acpi_nfit_system_address *spa)
686686
return -1;
687687
}
688688

689+
static size_t sizeof_spa(struct acpi_nfit_system_address *spa)
690+
{
691+
if (spa->flags & ACPI_NFIT_LOCATION_COOKIE_VALID)
692+
return sizeof(*spa);
693+
return sizeof(*spa) - 8;
694+
}
695+
689696
static bool add_spa(struct acpi_nfit_desc *acpi_desc,
690697
struct nfit_table_prev *prev,
691698
struct acpi_nfit_system_address *spa)
692699
{
693700
struct device *dev = acpi_desc->dev;
694701
struct nfit_spa *nfit_spa;
695702

696-
if (spa->header.length != sizeof(*spa))
703+
if (spa->header.length != sizeof_spa(spa))
697704
return false;
698705

699706
list_for_each_entry(nfit_spa, &prev->spas, list) {
700-
if (memcmp(nfit_spa->spa, spa, sizeof(*spa)) == 0) {
707+
if (memcmp(nfit_spa->spa, spa, sizeof_spa(spa)) == 0) {
701708
list_move_tail(&nfit_spa->list, &acpi_desc->spas);
702709
return true;
703710
}
704711
}
705712

706-
nfit_spa = devm_kzalloc(dev, sizeof(*nfit_spa) + sizeof(*spa),
713+
nfit_spa = devm_kzalloc(dev, sizeof(*nfit_spa) + sizeof_spa(spa),
707714
GFP_KERNEL);
708715
if (!nfit_spa)
709716
return false;
710717
INIT_LIST_HEAD(&nfit_spa->list);
711-
memcpy(nfit_spa->spa, spa, sizeof(*spa));
718+
memcpy(nfit_spa->spa, spa, sizeof_spa(spa));
712719
list_add_tail(&nfit_spa->list, &acpi_desc->spas);
713720
dev_dbg(dev, "spa index: %d type: %s\n",
714721
spa->range_index,

include/linux/libnvdimm.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ static inline void __iomem *devm_nvdimm_ioremap(struct device *dev,
141141

142142
struct nvdimm_bus;
143143
struct module;
144-
struct device;
145144
struct nd_blk_region;
146145
struct nd_blk_region_desc {
147146
int (*enable)(struct nvdimm_bus *nvdimm_bus, struct device *dev);

tools/testing/nvdimm/test/iomap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ struct nfit_test_resource *get_nfit_res(resource_size_t resource)
6262
}
6363
EXPORT_SYMBOL(get_nfit_res);
6464

65-
void __iomem *__nfit_test_ioremap(resource_size_t offset, unsigned long size,
65+
static void __iomem *__nfit_test_ioremap(resource_size_t offset, unsigned long size,
6666
void __iomem *(*fallback_fn)(resource_size_t, unsigned long))
6767
{
6868
struct nfit_test_resource *nfit_res = get_nfit_res(offset);

0 commit comments

Comments
 (0)