diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2010-02-21 11:57:32 -0500 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2010-02-24 14:36:55 -0500 |
commit | ecb1cf9c446ad7e8248160fe6797cd9bed817f24 (patch) | |
tree | b31a52f938f7eee08f26455c2602bb8aca94bd9e /drivers/firewire | |
parent | 6498ba04aee69540f8f586438f90d58e5b8e6936 (diff) |
firewire: ohci: reorder struct fw_ohci for better cache efficiency
The config_rom struct members are only accessed during relatively
infrequent self-ID-complete interrupts and only if the local config ROM
was changed, while the ar_, at_, ir_, it_ members are used very
frequently during I/O. Hence move the config_rom members further down.
More importantly, make the huge self_id_buffer member the last one; this
is only accessed in self-ID-complete interrupts.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/firewire')
-rw-r--r-- | drivers/firewire/ohci.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index 047331e59b31..39ddb620cad5 100644 --- a/drivers/firewire/ohci.c +++ b/drivers/firewire/ohci.c | |||
@@ -166,9 +166,6 @@ struct fw_ohci { | |||
166 | struct fw_card card; | 166 | struct fw_card card; |
167 | 167 | ||
168 | __iomem char *registers; | 168 | __iomem char *registers; |
169 | dma_addr_t self_id_bus; | ||
170 | __le32 *self_id_cpu; | ||
171 | struct tasklet_struct bus_reset_tasklet; | ||
172 | int node_id; | 169 | int node_id; |
173 | int generation; | 170 | int generation; |
174 | int request_generation; /* for timestamping incoming requests */ | 171 | int request_generation; /* for timestamping incoming requests */ |
@@ -182,14 +179,6 @@ struct fw_ohci { | |||
182 | * this driver with this lock held. | 179 | * this driver with this lock held. |
183 | */ | 180 | */ |
184 | spinlock_t lock; | 181 | spinlock_t lock; |
185 | u32 self_id_buffer[512]; | ||
186 | |||
187 | /* Config rom buffers */ | ||
188 | __be32 *config_rom; | ||
189 | dma_addr_t config_rom_bus; | ||
190 | __be32 *next_config_rom; | ||
191 | dma_addr_t next_config_rom_bus; | ||
192 | __be32 next_header; | ||
193 | 182 | ||
194 | struct ar_context ar_request_ctx; | 183 | struct ar_context ar_request_ctx; |
195 | struct ar_context ar_response_ctx; | 184 | struct ar_context ar_response_ctx; |
@@ -201,6 +190,18 @@ struct fw_ohci { | |||
201 | u64 ir_context_channels; | 190 | u64 ir_context_channels; |
202 | u32 ir_context_mask; | 191 | u32 ir_context_mask; |
203 | struct iso_context *ir_context_list; | 192 | struct iso_context *ir_context_list; |
193 | |||
194 | __be32 *config_rom; | ||
195 | dma_addr_t config_rom_bus; | ||
196 | __be32 *next_config_rom; | ||
197 | dma_addr_t next_config_rom_bus; | ||
198 | __be32 next_header; | ||
199 | |||
200 | __le32 *self_id_cpu; | ||
201 | dma_addr_t self_id_bus; | ||
202 | struct tasklet_struct bus_reset_tasklet; | ||
203 | |||
204 | u32 self_id_buffer[512]; | ||
204 | }; | 205 | }; |
205 | 206 | ||
206 | static inline struct fw_ohci *fw_ohci(struct fw_card *card) | 207 | static inline struct fw_ohci *fw_ohci(struct fw_card *card) |