<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/sound/memalloc.h, branch v5.14</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.14</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.14'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2021-06-10T11:10:09Z</updated>
<entry>
<title>ALSA: core: Fix build error due to missing PAGE_SIZE</title>
<updated>2021-06-10T11:10:09Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2021-06-10T11:09:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=83fbcaed24d797528de00c024674fd58e8f1634f'/>
<id>urn:sha1:83fbcaed24d797528de00c024674fd58e8f1634f</id>
<content type='text'>
The recent refactoring of memalloc stuff removed the inclusion of
asm/page.h for simplicity, but it turned out this caused a compile
error due the lack of PAGE_SIZE definition on some architectures.
Do a partial revert for recovering from that.

Fixes: 37af81c5998f ("ALSA: core: Abstract memory alloc helpers")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Link: https://lore.kernel.org/r/202106101858.PfXMMuAa-lkp@intel.com
Link: https://lore.kernel.org/r/20210610110935.10393-1-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: core: Move mmap handler into memalloc ops</title>
<updated>2021-06-10T08:15:21Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2021-06-09T16:25:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a202bd1ad86d59c07f24f0a201c5ade320b51e30'/>
<id>urn:sha1:a202bd1ad86d59c07f24f0a201c5ade320b51e30</id>
<content type='text'>
This patch moves the mmap handling code into the common memalloc
handler.  It allows us to reduce the memory-type specific code in PCM
code gracefully.

Link: https://lore.kernel.org/r/20210609162551.7842-5-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: core: Abstract memory alloc helpers</title>
<updated>2021-06-10T08:15:21Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2021-06-09T16:25:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=37af81c5998f4b0f23fb452cffa4b8a1c00ce95b'/>
<id>urn:sha1:37af81c5998f4b0f23fb452cffa4b8a1c00ce95b</id>
<content type='text'>
This patch introduces the ops table to each memory allocation type
(SNDRV_DMA_TYPE_XXX) and abstract the handling for the better code
management.  Then we get separate the page allocation, release and
other tasks for each type, especially for the SG buffer.

Each buffer type has now callbacks in the struct snd_malloc_ops, and
the common helper functions call those ops accordingly.  The former
inline code that is specific to SG-buffer is moved into the local
sgbuf.c, and we can simplify the PCM code without details of memory
handling.

Link: https://lore.kernel.org/r/20210609162551.7842-4-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: core: Drop snd_sgbuf_get_ptr()</title>
<updated>2021-06-10T08:15:21Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2021-06-09T16:25:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=84a0374051c1582ed9ace6cd63cdbfb15ed4b797'/>
<id>urn:sha1:84a0374051c1582ed9ace6cd63cdbfb15ed4b797</id>
<content type='text'>
snd_sgbuf_get_ptr() and its sibling snd_pcm_sgbuf_get_ptr() are no
longer used by any drivers.  Let's drop them.

Link: https://lore.kernel.org/r/20210609162551.7842-3-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: memalloc: Make SG-buffer helper usable for continuous buffer, too</title>
<updated>2020-06-15T16:01:52Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2020-06-15T16:00:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2a1f3368bff609504cdc984cdb7cef467bb0b2b0'/>
<id>urn:sha1:2a1f3368bff609504cdc984cdb7cef467bb0b2b0</id>
<content type='text'>
We have a few helper functions for making the access to the buffer
address easier on SG-buffer.  Those are specific to the buffer that is
allocated with SG-buffer type, and it makes hard to use both SG and
non-SG buffers in the same code.

This patch adds a few simple checks and lets the helpers to deal with
both SG- and continuous buffers gracefully.  It's a preliminary step
for the upcoming patch that mimics the buffer type on the fly.

Link: https://lore.kernel.org/r/20200615160045.2703-4-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: memalloc: Drop snd_dma_pci_data() macro</title>
<updated>2019-11-11T08:14:07Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2019-11-05T07:14:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2bc1e1fdd0fc54ef6aee14c7710af21ce816b398'/>
<id>urn:sha1:2bc1e1fdd0fc54ef6aee14c7710af21ce816b398</id>
<content type='text'>
Now that all users have been converted, we can drop snd_dma_pci_data()
macro definition.

Link: https://lore.kernel.org/r/20191108164637.1110-1-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: memalloc: Add vmalloc buffer allocation support</title>
<updated>2019-11-06T14:43:33Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2019-11-05T08:01:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1fe7f397cfe229494a88c6496b53ba532d4d4a42'/>
<id>urn:sha1:1fe7f397cfe229494a88c6496b53ba532d4d4a42</id>
<content type='text'>
This patch adds the vmalloc buffer support to ALSA memalloc core.  A
new type, SNDRV_DMA_TYPE_VMALLOC was added.

The vmalloc buffer has been already supported in the PCM via a few own
helper functions, but the user sometimes get confused and misuse
them.  With this patch, the whole buffer management is integrated into
the memalloc core, so they can be used in a sole common way.

Link: https://lore.kernel.org/r/20191105080138.1260-3-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156</title>
<updated>2019-05-30T18:26:35Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-27T06:55:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1a59d1b8e05ea6ab45f7e18897de1ef0e6bc3da6'/>
<id>urn:sha1:1a59d1b8e05ea6ab45f7e18897de1ef0e6bc3da6</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license as published by
  the free software foundation either version 2 of the license or at
  your option any later version this program is distributed in the
  hope that it will be useful but without any warranty without even
  the implied warranty of merchantability or fitness for a particular
  purpose see the gnu general public license for more details you
  should have received a copy of the gnu general public license along
  with this program if not write to the free software foundation inc
  59 temple place suite 330 boston ma 02111 1307 usa

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 1334 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Reviewed-by: Richard Fontana &lt;rfontana@redhat.com&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ALSA: Replace snd_malloc_pages() and snd_free_pages() with standard helpers, take#2</title>
<updated>2019-03-27T16:15:01Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2018-11-23T18:38:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=734b5a0bbdf43518e6739c8156a985e385e557fe'/>
<id>urn:sha1:734b5a0bbdf43518e6739c8156a985e385e557fe</id>
<content type='text'>
snd_malloc_pages() and snd_free_pages() are merely thin wrappers of
the standard page allocator / free functions.  Even the arguments are
compatible with some standard helpers, so there is little merit of
keeping these wrappers.

This patch replaces the all existing callers of snd_malloc_pages() and
snd_free_pages() with the direct calls of the standard helper
functions.  In this version, we use a recently introduced one,
alloc_pages_exact(), which suits better than the old
snd_malloc_pages() implementation for our purposes.  Then we can avoid
the waste of pages by alignment to power-of-two.

Since alloc_pages_exact() does split pages, we need no longer
__GFP_COMP flag; or better to say, we must not pass __GFP_COMP to
alloc_pages_exact().  So the former unconditional addition of
__GFP_COMP flag in snd_malloc_pages() is dropped, as well as in most
other places.

Reviewed-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
Acked-by: Michal Hocko &lt;mhocko@suse.com&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: isa: Avoid passing NULL to memory allocators</title>
<updated>2019-02-01T16:16:40Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2019-02-01T11:14:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0b6a2c9cf4a00f54a0916499ece8a5cf3cced385'/>
<id>urn:sha1:0b6a2c9cf4a00f54a0916499ece8a5cf3cced385</id>
<content type='text'>
We used to pass NULL to memory allocators for ISA devices due to
historical reasons.  But we prefer rather a proper device object to be
assigned, so let's fix it by replacing snd_dma_isa_data() call with
card-&gt;dev reference, and kill snd_dma_isa_data() definition.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
</feed>
