All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: Liam Girdwood <liam.r.girdwood@linux.intel.com>,
	alsa-devel@alsa-project.org, Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH 01/11] ASoC: SOF: Add Sound Open Firmware driver core
Date: Wed, 25 Jul 2018 08:57:40 -0500	[thread overview]
Message-ID: <452cc12a-6c7d-e6e8-bc9b-b896f892b9a0@linux.intel.com> (raw)
In-Reply-To: <s5hva93wyvz.wl-tiwai@suse.de>

On 7/25/18 2:36 AM, Takashi Iwai wrote:
> On Tue, 24 Jul 2018 17:57:42 +0200,
> Pierre-Louis Bossart wrote:
>>
>> we seem to have a new 0-day report with randconfig related to the
>> page/sgbuffer management. Not sure why it wasn't seen before, I've
>> already fixed quite a few exotic configurations for non-Intel targets.
>>
>> sound/soc/sof/core.c: In function 'snd_sof_create_page_table':
>> sound/soc/sof/core.c:201:10: error: implicit declaration of function
>> 'snd_sgbuf_aligned_pages' [-Werror=implicit-function-declaration]
>>    pages = snd_sgbuf_aligned_pages(size);
>>            ^
>> Looking at the code:
>>> +static inline unsigned int sof_get_pages(size_t size)
>>> +{
>>> +	return (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
>>> +}
>> this inline doesn't seem to be used but duplicates the code from
>>
>> static inline unsigned int snd_sgbuf_aligned_pages(size_t size)
>> {
>>      return (size + PAGE_SIZE - 1) >> PAGE_SHIFT;
>> }
>>
>> which is used below
>>> +int snd_sof_create_page_table(struct snd_sof_dev *sdev,
>>> +			      struct snd_dma_buffer *dmab,
>>> +			      unsigned char *page_table, size_t size)
>>> +{
>>> +	int i, pages;
>>> +
>>> +	pages = snd_sgbuf_aligned_pages(size);
>> this code doesn't compile unless CONFIG_SND_DMA_SGBUF is defined (it
>> is set for the intel-specific code but not for the SOF core). We can
>> fix this in different ways
>> 0. require SND_CMD_SGBUF for the core - likely not desirable
>> 1. use sof_get_pages()
>> 2. change include/sound/memalloc.h to make sure this
>> snd_sgbuf_aligned_pages() inline is available whether
>> CONFIG_SND_DMA_SGBUF is defined or not - maybe making sure while we
>> are at it that the malloc and free functions are empty static inlines?
> 
> The latter sounds like a better choice to me.
> Just move the function to outside ifdef.

Will do, thanks for the feedback.
-Pierre

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

      reply	other threads:[~2018-07-25 14:00 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-19 18:53 [PATCH 01/11] ASoC: SOF: Add Sound Open Firmware driver core Liam Girdwood
2018-07-19 18:53 ` [PATCH 02/11] ASoC: SOF: Add Sound Open Firmware KControl support Liam Girdwood
2018-07-23 18:58   ` Mark Brown
2018-07-19 18:53 ` [PATCH 03/11] ASoC: SOF: Add driver debug support Liam Girdwood
2018-07-23 19:03   ` Mark Brown
2018-07-19 18:53 ` [PATCH 04/11] ASoC: SOF: Add support for IPC IO between DSP and Host Liam Girdwood
2018-07-19 18:53 ` [PATCH 05/11] ASoC: SOF: Add PCM operations support Liam Girdwood
2018-07-24 15:07   ` Mark Brown
2018-07-19 18:53 ` [PATCH 06/11] ASoC: SOF: Add support for loading topologies Liam Girdwood
2018-07-19 18:53 ` [PATCH 07/11] ASoC: SOF: Add DSP firmware trace event support Liam Girdwood
2018-07-19 18:53 ` [PATCH 08/11] ASoC: SOF: Add DSP HW abstraction operations Liam Girdwood
2018-07-30 15:21   ` Mark Brown
2018-07-19 18:53 ` [PATCH 09/11] ASoC: SOF: Add firmware loader support Liam Girdwood
2018-07-19 18:53 ` [PATCH 10/11] ASoC: SOF: Add userspace ABI support Liam Girdwood
2018-07-19 18:53 ` [PATCH 11/11] ASoC: SOF: Add Build support for SOF core Liam Girdwood
2018-07-20 14:11   ` Pierre-Louis Bossart
2018-07-19 18:58 ` [PATCH 01/11] ASoC: SOF: Add Sound Open Firmware driver core Takashi Iwai
2018-07-20 11:05   ` Liam Girdwood
2018-07-23 18:56 ` Mark Brown
2018-08-22 16:26   ` Liam Girdwood
2018-07-24 15:57 ` Pierre-Louis Bossart
2018-07-25  7:36   ` Takashi Iwai
2018-07-25 13:57     ` Pierre-Louis Bossart [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=452cc12a-6c7d-e6e8-bc9b-b896f892b9a0@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.