diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-03-04 00:05:42 -0500 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-03-04 00:05:42 -0500 |
commit | 2e22ea7cea0f7de86fd30df867fbf5b7e8eee0fd (patch) | |
tree | 8b8e5583fb2787ff7107a6f59b114ddcd2c2f691 /drivers/ieee1394/nodemgr.h | |
parent | 638bee71c83a2837b48062fdc5b222163cf53d79 (diff) | |
parent | 645af4e9e0e32481e3336dda813688732c7e5f0f (diff) |
Merge branch 'x86/core' into x86/mce2
Diffstat (limited to 'drivers/ieee1394/nodemgr.h')
-rw-r--r-- | drivers/ieee1394/nodemgr.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/ieee1394/nodemgr.h b/drivers/ieee1394/nodemgr.h index 15ea09733e84..ee5acdbd114a 100644 --- a/drivers/ieee1394/nodemgr.h +++ b/drivers/ieee1394/nodemgr.h | |||
@@ -21,9 +21,11 @@ | |||
21 | #define _IEEE1394_NODEMGR_H | 21 | #define _IEEE1394_NODEMGR_H |
22 | 22 | ||
23 | #include <linux/device.h> | 23 | #include <linux/device.h> |
24 | #include <asm/system.h> | ||
24 | #include <asm/types.h> | 25 | #include <asm/types.h> |
25 | 26 | ||
26 | #include "ieee1394_core.h" | 27 | #include "ieee1394_core.h" |
28 | #include "ieee1394_transactions.h" | ||
27 | #include "ieee1394_types.h" | 29 | #include "ieee1394_types.h" |
28 | 30 | ||
29 | struct csr1212_csr; | 31 | struct csr1212_csr; |
@@ -154,6 +156,22 @@ static inline int hpsb_node_entry_valid(struct node_entry *ne) | |||
154 | void hpsb_node_fill_packet(struct node_entry *ne, struct hpsb_packet *packet); | 156 | void hpsb_node_fill_packet(struct node_entry *ne, struct hpsb_packet *packet); |
155 | int hpsb_node_write(struct node_entry *ne, u64 addr, | 157 | int hpsb_node_write(struct node_entry *ne, u64 addr, |
156 | quadlet_t *buffer, size_t length); | 158 | quadlet_t *buffer, size_t length); |
159 | static inline int hpsb_node_read(struct node_entry *ne, u64 addr, | ||
160 | quadlet_t *buffer, size_t length) | ||
161 | { | ||
162 | unsigned int g = ne->generation; | ||
163 | |||
164 | smp_rmb(); | ||
165 | return hpsb_read(ne->host, ne->nodeid, g, addr, buffer, length); | ||
166 | } | ||
167 | static inline int hpsb_node_lock(struct node_entry *ne, u64 addr, int extcode, | ||
168 | quadlet_t *buffer, quadlet_t arg) | ||
169 | { | ||
170 | unsigned int g = ne->generation; | ||
171 | |||
172 | smp_rmb(); | ||
173 | return hpsb_lock(ne->host, ne->nodeid, g, addr, extcode, buffer, arg); | ||
174 | } | ||
157 | int nodemgr_for_each_host(void *data, int (*cb)(struct hpsb_host *, void *)); | 175 | int nodemgr_for_each_host(void *data, int (*cb)(struct hpsb_host *, void *)); |
158 | 176 | ||
159 | int init_ieee1394_nodemgr(void); | 177 | int init_ieee1394_nodemgr(void); |