lkml.org 
[lkml]   [2023]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v4 2/5] gpio: Add support for Intel LJCA USB GPIO driver
From


On 09.03.23 15:48, Arnd Bergmann wrote:
> On Thu, Mar 9, 2023, at 15:18, Linus Walleij wrote:
>> On Thu, Mar 9, 2023 at 2:53 PM Andy Shevchenko
>> <andriy.shevchenko@linux.intel.com> wrote:
>>
>> Yups. And I think the solution looks something like this:
>>
>> u8 obuf[LJCA_GPIO_BUF_SIZE] __aligned(8);
>> u8 ibuf[LJCA_GPIO_BUF_SIZE] __aligned(8);
>>
>> __aligned(4) if it's 32bit DMA I guess? 8 always works that's
>> why we use it all over the IIO subsystem.
>
> I think it must be __aligned(ARCH_DMA_MINALIGN), to account
> for architectures with non-coherent DMA.

In theory, yes, you can do that.
Is that a better solution than using what kmalloc() is
designed to provide. I don't think so.

Regards
Oliver

\
 
 \ /
  Last update: 2023-03-27 00:52    [W:2.619 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site