diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2011-04-22 09:13:54 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2011-05-10 16:53:44 -0400 |
commit | f30e6d3e419bfb5540fa82ba7eca01d578556e6b (patch) | |
tree | e4d6e7bad161a76b09557bf7513358ae1ce8f7fb /include/linux/firewire.h | |
parent | 020abf03cd659388f94cb328e1e1df0656e0d7ff (diff) |
firewire: octlet AT payloads can be stack-allocated
We do not need slab allocations anymore in order to satisfy
streaming DMA mapping constraints, thanks to commit da28947e7e36
"firewire: ohci: avoid separate DMA mapping for small AT payloads".
(Besides, the slab-allocated buffers that firewire-core, firewire-sbp2,
and firedtv used to provide for 8-byte write and lock requests were
still not fully portable since they crossed cacheline boundaries or
shared a cacheline with unrelated CPU-accessed data. snd-firewire-lib
got this aspect right by using an extra kmalloc/ kfree just for the
8-byte transaction buffer.)
This change replaces kmalloc'ed lock transaction scratch buffers in
firewire-core, firedtv, and snd-firewire-lib by local stack allocations.
Perhaps the most notable result of the change is simpler locking because
there is no need to serialize usages of preallocated per-device buffers
anymore. Also, allocations and deallocations are simpler.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Diffstat (limited to 'include/linux/firewire.h')
-rw-r--r-- | include/linux/firewire.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/firewire.h b/include/linux/firewire.h index c64f3680d4f1..de90e1ff8488 100644 --- a/include/linux/firewire.h +++ b/include/linux/firewire.h | |||
@@ -125,7 +125,6 @@ struct fw_card { | |||
125 | struct delayed_work bm_work; /* bus manager job */ | 125 | struct delayed_work bm_work; /* bus manager job */ |
126 | int bm_retries; | 126 | int bm_retries; |
127 | int bm_generation; | 127 | int bm_generation; |
128 | __be32 bm_transaction_data[2]; | ||
129 | int bm_node_id; | 128 | int bm_node_id; |
130 | bool bm_abdicate; | 129 | bool bm_abdicate; |
131 | 130 | ||
@@ -447,6 +446,6 @@ int fw_iso_context_stop(struct fw_iso_context *ctx); | |||
447 | void fw_iso_context_destroy(struct fw_iso_context *ctx); | 446 | void fw_iso_context_destroy(struct fw_iso_context *ctx); |
448 | void fw_iso_resource_manage(struct fw_card *card, int generation, | 447 | void fw_iso_resource_manage(struct fw_card *card, int generation, |
449 | u64 channels_mask, int *channel, int *bandwidth, | 448 | u64 channels_mask, int *channel, int *bandwidth, |
450 | bool allocate, __be32 buffer[2]); | 449 | bool allocate); |
451 | 450 | ||
452 | #endif /* _LINUX_FIREWIRE_H */ | 451 | #endif /* _LINUX_FIREWIRE_H */ |