Re: [PATCH v1 ] ALSA: core: memalloc: add page alignment for iram

2020-12-17 Thread Takashi Iwai
On Thu, 17 Dec 2020 16:38:22 +0100, Lars-Peter Clausen wrote: > > >> Maybe what we need is a check that runtime->dma_area is page aligned > >> and runtime->dma_bytes is a multiple of PAGE_SIZE. With a warning at > >> first and then turn this into a error a year later or so. > > OK, how about the

Re: [PATCH v1 ] ALSA: core: memalloc: add page alignment for iram

2020-12-17 Thread Lars-Peter Clausen
On 12/17/20 4:18 PM, Takashi Iwai wrote: On Thu, 17 Dec 2020 15:57:02 +0100, Lars-Peter Clausen wrote: On 12/17/20 3:24 PM, Takashi Iwai wrote: On Thu, 17 Dec 2020 14:16:48 +0100, Lars-Peter Clausen wrote: On 12/17/20 12:06 PM, Takashi Iwai wrote: On Thu, 17 Dec 2020 11:59:23 +0100,

Re: [PATCH v1 ] ALSA: core: memalloc: add page alignment for iram

2020-12-17 Thread Takashi Iwai
On Thu, 17 Dec 2020 15:57:02 +0100, Lars-Peter Clausen wrote: > > On 12/17/20 3:24 PM, Takashi Iwai wrote: > > On Thu, 17 Dec 2020 14:16:48 +0100, > > Lars-Peter Clausen wrote: > >> On 12/17/20 12:06 PM, Takashi Iwai wrote: > >>> On Thu, 17 Dec 2020 11:59:23 +0100, > >>> Lars-Peter Clausen wrote:

Re: [PATCH v1 ] ALSA: core: memalloc: add page alignment for iram

2020-12-17 Thread Lars-Peter Clausen
On 12/17/20 3:24 PM, Takashi Iwai wrote: On Thu, 17 Dec 2020 14:16:48 +0100, Lars-Peter Clausen wrote: On 12/17/20 12:06 PM, Takashi Iwai wrote: On Thu, 17 Dec 2020 11:59:23 +0100, Lars-Peter Clausen wrote: On 12/17/20 10:55 AM, Takashi Iwai wrote: On Thu, 17 Dec 2020 10:43:45 +0100,

Re: [PATCH v1 ] ALSA: core: memalloc: add page alignment for iram

2020-12-17 Thread Takashi Iwai
On Thu, 17 Dec 2020 14:16:48 +0100, Lars-Peter Clausen wrote: > > On 12/17/20 12:06 PM, Takashi Iwai wrote: > > On Thu, 17 Dec 2020 11:59:23 +0100, > > Lars-Peter Clausen wrote: > >> On 12/17/20 10:55 AM, Takashi Iwai wrote: > >>> On Thu, 17 Dec 2020 10:43:45 +0100, > >>> Lars-Peter Clausen

Re: [PATCH v1 ] ALSA: core: memalloc: add page alignment for iram

2020-12-17 Thread Lars-Peter Clausen
On 12/17/20 12:06 PM, Takashi Iwai wrote: On Thu, 17 Dec 2020 11:59:23 +0100, Lars-Peter Clausen wrote: On 12/17/20 10:55 AM, Takashi Iwai wrote: On Thu, 17 Dec 2020 10:43:45 +0100, Lars-Peter Clausen wrote: On 12/17/20 5:15 PM, Robin Gong wrote: Since mmap for userspace is based on page

Re: [PATCH v1 ] ALSA: core: memalloc: add page alignment for iram

2020-12-17 Thread Takashi Iwai
On Thu, 17 Dec 2020 11:59:23 +0100, Lars-Peter Clausen wrote: > > On 12/17/20 10:55 AM, Takashi Iwai wrote: > > On Thu, 17 Dec 2020 10:43:45 +0100, > > Lars-Peter Clausen wrote: > >> On 12/17/20 5:15 PM, Robin Gong wrote: > >>> Since mmap for userspace is based on page alignment, add page

Re: [PATCH v1 ] ALSA: core: memalloc: add page alignment for iram

2020-12-17 Thread Lars-Peter Clausen
On 12/17/20 10:55 AM, Takashi Iwai wrote: On Thu, 17 Dec 2020 10:43:45 +0100, Lars-Peter Clausen wrote: On 12/17/20 5:15 PM, Robin Gong wrote: Since mmap for userspace is based on page alignment, add page alignment for iram alloc from pool, otherwise, some good data located in the same page of

Re: [PATCH v1 ] ALSA: core: memalloc: add page alignment for iram

2020-12-17 Thread Lars-Peter Clausen
On 12/17/20 11:14 AM, Takashi Iwai wrote: On Thu, 17 Dec 2020 10:55:42 +0100, Takashi Iwai wrote: On Thu, 17 Dec 2020 10:43:45 +0100, Lars-Peter Clausen wrote: On 12/17/20 5:15 PM, Robin Gong wrote: Since mmap for userspace is based on page alignment, add page alignment for iram alloc from

Re: [PATCH v1 ] ALSA: core: memalloc: add page alignment for iram

2020-12-17 Thread Takashi Iwai
On Thu, 17 Dec 2020 10:55:42 +0100, Takashi Iwai wrote: > > On Thu, 17 Dec 2020 10:43:45 +0100, > Lars-Peter Clausen wrote: > > > > On 12/17/20 5:15 PM, Robin Gong wrote: > > > Since mmap for userspace is based on page alignment, add page alignment > > > for iram alloc from pool, otherwise, some

Re: [PATCH v1 ] ALSA: core: memalloc: add page alignment for iram

2020-12-17 Thread Takashi Iwai
On Thu, 17 Dec 2020 10:43:45 +0100, Lars-Peter Clausen wrote: > > On 12/17/20 5:15 PM, Robin Gong wrote: > > Since mmap for userspace is based on page alignment, add page alignment > > for iram alloc from pool, otherwise, some good data located in the same > > page of dmab->area maybe touched

Re: [PATCH v1 ] ALSA: core: memalloc: add page alignment for iram

2020-12-17 Thread Lars-Peter Clausen
On 12/17/20 5:15 PM, Robin Gong wrote: Since mmap for userspace is based on page alignment, add page alignment for iram alloc from pool, otherwise, some good data located in the same page of dmab->area maybe touched wrongly by userspace like pulseaudio. I wonder, do we also have to align size

Re: [PATCH v1 ] ALSA: core: memalloc: add page alignment for iram

2020-12-17 Thread Takashi Iwai
On Thu, 17 Dec 2020 17:15:47 +0100, Robin Gong wrote: > > Since mmap for userspace is based on page alignment, add page alignment > for iram alloc from pool, otherwise, some good data located in the same > page of dmab->area maybe touched wrongly by userspace like pulseaudio. > > Signed-off-by:

[PATCH v1 ] ALSA: core: memalloc: add page alignment for iram

2020-12-17 Thread Robin Gong
Since mmap for userspace is based on page alignment, add page alignment for iram alloc from pool, otherwise, some good data located in the same page of dmab->area maybe touched wrongly by userspace like pulseaudio. Signed-off-by: Robin Gong --- sound/core/memalloc.c | 3 ++- 1 file changed, 2