diff options
| author | Russell King <[email protected]> | 2016-01-26 13:39:55 +0000 |
|---|---|---|
| committer | Ulf Hansson <[email protected]> | 2016-02-29 11:03:18 +0100 |
| commit | e66e61cba1fffc53151b5303688f9c077f87104c (patch) | |
| tree | 4ef79503ced5d00d49917c439490e1dbc1f0a3c8 /tools/perf/scripts/python | |
| parent | 7f05538af71c7d30b5fc821cbe9f318edc645961 (diff) | |
mmc: sdhci: allocate alignment and DMA descriptor buffer together
Allocate both the alignment and DMA descriptor buffers together. The
size of the alignment buffer will always be aligned to the hosts
required alignment, which gives appropriate alignment to the DMA
descriptors.
We have a maximum of 128 segments, and a maximum alignment of 64 bits.
This gives a maximum alignment buffer size of 1024 bytes.
The DMA descriptors are a maximum of 12 bytes, and we allocate 128 * 2
+ 1 of these, which gives a maximum DMA descriptor buffer size of 3084
bytes.
This means the allocation for a 4K page sized system will be an order-1
allocation, since the resulting overall size is 4108. This is more
prone to failure than page-sized allocations, but since this allocation
commonly occurs at startup, the chances of failure are small.
Signed-off-by: Russell King <[email protected]>
[ Changed to check ADMA table alignment ]
Signed-off-by: Adrian Hunter <[email protected]>
Tested-by: Gregory CLEMENT <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions