Skip to content

Commit febbe9b

Browse files
committed
Merge tag 'counter-fixes-for-6.8b' of https://git.kernel.org/pub/scm/linux/kernel/git/wbg/counter into char-misc-linus
William writes: First set of Counter fixes for 6.8 One fix to ensure private data in struct counter_device_allochelper has minimum alignment for safe DMA operations. * tag 'counter-fixes-for-6.8b' of https://git.kernel.org/pub/scm/linux/kernel/git/wbg/counter: counter: fix privdata alignment
2 parents daaf528 + c83ccdc commit febbe9b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/counter/counter-core.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,11 @@ struct counter_device_allochelper {
3131
struct counter_device counter;
3232

3333
/*
34-
* This is cache line aligned to ensure private data behaves like if it
35-
* were kmalloced separately.
34+
* This ensures private data behaves like if it were kmalloced
35+
* separately. Also ensures the minimum alignment for safe DMA
36+
* operations (which may or may not mean cache alignment).
3637
*/
37-
unsigned long privdata[] ____cacheline_aligned;
38+
unsigned long privdata[] __aligned(ARCH_DMA_MINALIGN);
3839
};
3940

4041
static void counter_device_release(struct device *dev)

0 commit comments

Comments
 (0)