diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2011-02-09 09:30:09 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2011-02-09 09:30:09 +0000 |
commit | 0d902c8c54bbc36f24b40c49eb9872aa75b779e4 (patch) | |
tree | f5c2ae63204ab4032b6be29dea6d5bfe02809a5d /firmware/export | |
parent | 19ea72ff63744c51292cd1d2d1c2792b009892aa (diff) | |
download | rockbox-0d902c8c54bbc36f24b40c49eb9872aa75b779e4.tar.gz rockbox-0d902c8c54bbc36f24b40c49eb9872aa75b779e4.zip |
Buffering should align itself and not rely on buffering_reset parameters when storage alignment matters so that wrapped reads maintain alignment.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29258 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export')
-rw-r--r-- | firmware/export/system.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/firmware/export/system.h b/firmware/export/system.h index 65db721bb4..78bddae387 100644 --- a/firmware/export/system.h +++ b/firmware/export/system.h | |||
@@ -388,11 +388,14 @@ static inline void cpucache_flush(void) | |||
388 | #define STORAGE_PAD(x) ((x) + CACHEALIGN_SIZE - 1) | 388 | #define STORAGE_PAD(x) ((x) + CACHEALIGN_SIZE - 1) |
389 | /* Number of bytes in the last cacheline assuming buffer of size x is aligned */ | 389 | /* Number of bytes in the last cacheline assuming buffer of size x is aligned */ |
390 | #define STORAGE_OVERLAP(x) ((x) & (CACHEALIGN_SIZE - 1)) | 390 | #define STORAGE_OVERLAP(x) ((x) & (CACHEALIGN_SIZE - 1)) |
391 | #define STORAGE_ALIGN_BUFFER(start, size) \ | ||
392 | ALIGN_BUFFER((start), (size), CACHEALIGN_SIZE) | ||
391 | #else | 393 | #else |
392 | #define STORAGE_ALIGN_ATTR | 394 | #define STORAGE_ALIGN_ATTR |
393 | #define STORAGE_ALIGN_DOWN(x) (x) | 395 | #define STORAGE_ALIGN_DOWN(x) (x) |
394 | #define STORAGE_PAD(x) (x) | 396 | #define STORAGE_PAD(x) (x) |
395 | #define STORAGE_OVERLAP(x) 0 | 397 | #define STORAGE_OVERLAP(x) 0 |
398 | #define STORAGE_ALIGN_BUFFER(start, size) | ||
396 | #endif | 399 | #endif |
397 | 400 | ||
398 | /* Double-cast to avoid 'dereferencing type-punned pointer will | 401 | /* Double-cast to avoid 'dereferencing type-punned pointer will |