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
f5417dc2
Commit
f5417dc2
authored
Jun 10, 2003
by
Patrick Mochel
Committed by
Linus Torvalds
Jun 10, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[driver model] Compile fixes for NUMA
parent
1bca238a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
18 deletions
+9
-18
drivers/base/memblk.c
drivers/base/memblk.c
+1
-8
drivers/base/node.c
drivers/base/node.c
+7
-8
include/linux/node.h
include/linux/node.h
+1
-2
No files found.
drivers/base/memblk.c
View file @
f5417dc2
...
...
@@ -13,13 +13,6 @@ static struct sysdev_class memblk_class = {
set_kset_name
(
"memblk"
),
};
static
struct
device_driver
memblk_driver
=
{
.
name
=
"memblk"
,
.
bus
=
&
system_bus_type
,
};
/*
* register_memblk - Setup a driverfs device for a MemBlk
* @num - MemBlk number to use when creating the device.
...
...
@@ -37,7 +30,7 @@ int __init register_memblk(struct memblk *memblk, int num, struct node *root)
error
=
sys_device_register
(
&
memblk
->
sysdev
);
if
(
!
error
)
error
=
sysfs_create_link
(
&
root
->
sysdev
.
kobj
,
&
memblk
->
sysdev
,
kobj
,
&
memblk
->
sysdev
.
kobj
,
memblk
->
sysdev
.
kobj
.
name
);
return
error
;
}
...
...
drivers/base/node.c
View file @
f5417dc2
...
...
@@ -2,7 +2,7 @@
* drivers/base/node.c - basic Node class support
*/
#include <linux/
device
.h>
#include <linux/
sysdev
.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/mm.h>
...
...
@@ -14,18 +14,17 @@ static struct sysdev_class node_class = {
};
static
ssize_t
node_read_cpumap
(
struct
device
*
dev
,
char
*
buf
)
static
ssize_t
node_read_cpumap
(
struct
sys_
device
*
dev
,
char
*
buf
)
{
struct
node
*
node_dev
=
to_node
(
to_root
(
dev
)
);
struct
node
*
node_dev
=
to_node
(
dev
);
return
sprintf
(
buf
,
"%lx
\n
"
,
node_dev
->
cpumap
);
}
static
SYSDEV_ATTR
(
cpumap
,
S_IRUGO
,
node_read_cpumap
,
NULL
);
#define K(x) ((x) << (PAGE_SHIFT - 10))
static
ssize_t
node_read_meminfo
(
struct
device
*
dev
,
char
*
buf
)
static
ssize_t
node_read_meminfo
(
struct
sys_
device
*
dev
,
char
*
buf
)
{
struct
sys_root
*
node
=
to_root
(
dev
);
int
nid
=
node
->
id
;
int
nid
=
dev
->
id
;
struct
sysinfo
i
;
si_meminfo_node
(
&
i
,
nid
);
return
sprintf
(
buf
,
"
\n
"
...
...
@@ -64,8 +63,8 @@ int __init register_node(struct node *node, int num, struct node *parent)
error
=
sys_device_register
(
&
node
->
sysdev
);
if
(
!
error
){
sys
_device_create_file
(
&
node
->
sysroot
.
dev
,
&
attr_cpumap
);
sys
_device_create_file
(
&
node
->
sysroot
.
dev
,
&
attr_meminfo
);
sys
dev_create_file
(
&
node
->
sys
dev
,
&
attr_cpumap
);
sys
dev_create_file
(
&
node
->
sys
dev
,
&
attr_meminfo
);
}
return
error
;
}
...
...
include/linux/node.h
View file @
f5417dc2
...
...
@@ -28,7 +28,6 @@ struct node {
extern
int
register_node
(
struct
node
*
,
int
,
struct
node
*
);
#define to_node(_root) container_of(_root, struct node, sysroot)
#define to_root(_dev) container_of(_dev, struct sys_root, dev)
#define to_node(sys_device) container_of(sys_device, struct node, sysdev)
#endif
/* _LINUX_NODE_H_ */
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