Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
e476f944
Commit
e476f944
authored
Oct 07, 2016
by
Dan Williams
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-4.9/dax' into libnvdimm-for-next
parents
178d6f4b
4e65e938
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
365 additions
and
233 deletions
+365
-233
drivers/dax/Kconfig
drivers/dax/Kconfig
+5
-0
drivers/dax/dax.c
drivers/dax/dax.c
+350
-227
drivers/dax/dax.h
drivers/dax/dax.h
+3
-2
drivers/dax/pmem.c
drivers/dax/pmem.c
+4
-3
drivers/nvdimm/Kconfig
drivers/nvdimm/Kconfig
+1
-1
fs/char_dev.c
fs/char_dev.c
+1
-0
include/uapi/linux/magic.h
include/uapi/linux/magic.h
+1
-0
No files found.
drivers/dax/Kconfig
View file @
e476f944
...
...
@@ -23,4 +23,9 @@ config DEV_DAX_PMEM
Say Y if unsure
config NR_DEV_DAX
int "Maximum number of Device-DAX instances"
default 32768
range 256 2147483647
endif
drivers/dax/dax.c
View file @
e476f944
This diff is collapsed.
Click to expand it.
drivers/dax/dax.h
View file @
e476f944
...
...
@@ -13,12 +13,13 @@
#ifndef __DAX_H__
#define __DAX_H__
struct
device
;
struct
dax_dev
;
struct
resource
;
struct
dax_region
;
void
dax_region_put
(
struct
dax_region
*
dax_region
);
struct
dax_region
*
alloc_dax_region
(
struct
device
*
parent
,
int
region_id
,
struct
resource
*
res
,
unsigned
int
align
,
void
*
addr
,
unsigned
long
flags
);
int
devm_create_dax_dev
(
struct
dax_region
*
dax_region
,
struct
resource
*
res
,
int
count
);
struct
dax_dev
*
devm_create_dax_dev
(
struct
dax_region
*
dax_region
,
struct
resource
*
res
,
int
count
);
#endif
/* __DAX_H__ */
drivers/dax/pmem.c
View file @
e476f944
...
...
@@ -24,7 +24,7 @@ struct dax_pmem {
struct
completion
cmp
;
};
struct
dax_pmem
*
to_dax_pmem
(
struct
percpu_ref
*
ref
)
st
atic
st
ruct
dax_pmem
*
to_dax_pmem
(
struct
percpu_ref
*
ref
)
{
return
container_of
(
ref
,
struct
dax_pmem
,
ref
);
}
...
...
@@ -61,6 +61,7 @@ static int dax_pmem_probe(struct device *dev)
int
rc
;
void
*
addr
;
struct
resource
res
;
struct
dax_dev
*
dax_dev
;
struct
nd_pfn_sb
*
pfn_sb
;
struct
dax_pmem
*
dax_pmem
;
struct
nd_region
*
nd_region
;
...
...
@@ -126,12 +127,12 @@ static int dax_pmem_probe(struct device *dev)
return
-
ENOMEM
;
/* TODO: support for subdividing a dax region... */
rc
=
devm_create_dax_dev
(
dax_region
,
&
res
,
1
);
dax_dev
=
devm_create_dax_dev
(
dax_region
,
&
res
,
1
);
/* child dax_dev instances now own the lifetime of the dax_region */
dax_region_put
(
dax_region
);
return
rc
;
return
PTR_ERR_OR_ZERO
(
dax_dev
)
;
}
static
struct
nd_device_driver
dax_pmem_driver
=
{
...
...
drivers/nvdimm/Kconfig
View file @
e476f944
...
...
@@ -89,7 +89,7 @@ config NVDIMM_PFN
Select Y if unsure
config NVDIMM_DAX
bool
"NVDIMM DAX: Raw access to persistent memory"
tristate
"NVDIMM DAX: Raw access to persistent memory"
default LIBNVDIMM
depends on NVDIMM_PFN
help
...
...
fs/char_dev.c
View file @
e476f944
...
...
@@ -406,6 +406,7 @@ void cd_forget(struct inode *inode)
spin_lock
(
&
cdev_lock
);
list_del_init
(
&
inode
->
i_devices
);
inode
->
i_cdev
=
NULL
;
inode
->
i_mapping
=
&
inode
->
i_data
;
spin_unlock
(
&
cdev_lock
);
}
...
...
include/uapi/linux/magic.h
View file @
e476f944
...
...
@@ -65,6 +65,7 @@
#define V9FS_MAGIC 0x01021997
#define BDEVFS_MAGIC 0x62646576
#define DAXFS_MAGIC 0x64646178
#define BINFMTFS_MAGIC 0x42494e4d
#define DEVPTS_SUPER_MAGIC 0x1cd1
#define FUTEXFS_SUPER_MAGIC 0xBAD1DEA
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment