LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Takashi Iwai <tiwai@suse.de>, YueHaibing <yuehaibing@huawei.com>
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
lgirdwood@gmail.com, broonie@kernel.org,
yingjiang.zhu@linux.intel.com
Subject: Re: [alsa-devel] [PATCH] ASoC: SOF: Intel: hda: Fix COMPILE_TEST build error
Date: Fri, 31 May 2019 13:44:40 -0500 [thread overview]
Message-ID: <e20ff9a0-0928-2864-c451-a24d86ccfc5c@linux.intel.com> (raw)
In-Reply-To: <s5hlfymsnfa.wl-tiwai@suse.de>
On 5/31/19 9:34 AM, Takashi Iwai wrote:
> On Fri, 31 May 2019 16:25:26 +0200,
> YueHaibing wrote:
>>
>> while building without PCI:
>>
>> sound/soc/sof/intel/hda.o: In function `hda_dsp_probe':
>> hda.c:(.text+0x79c): undefined reference to `pci_ioremap_bar'
>> hda.c:(.text+0x79c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `pci_ioremap_bar'
>> hda.c:(.text+0x7c4): undefined reference to `pci_ioremap_bar'
>> hda.c:(.text+0x7c4): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `pci_ioremap_bar'
>>
>> Reported-by: Hulk Robot <hulkci@huawei.com>
>> Fixes: e13ef82a9ab8 ("ASoC: SOF: add COMPILE_TEST for PCI options")
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>> ---
>> sound/soc/sof/intel/hda.c | 4 ++++
>> 1 file changed, 4 insertions(+)
>>
>> diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c
>> index 68db2ac..c1703c4 100644
>> --- a/sound/soc/sof/intel/hda.c
>> +++ b/sound/soc/sof/intel/hda.c
>> @@ -231,7 +231,9 @@ static int hda_init(struct snd_sof_dev *sdev)
>>
>> /* initialise hdac bus */
>> bus->addr = pci_resource_start(pci, 0);
>> +#if IS_ENABLED(CONFIG_PCI)
>> bus->remap_addr = pci_ioremap_bar(pci, 0);
>> +#endif
>> if (!bus->remap_addr) {
>> dev_err(bus->dev, "error: ioremap error\n");
>> return -ENXIO;
>> @@ -458,7 +460,9 @@ int hda_dsp_probe(struct snd_sof_dev *sdev)
>> goto hdac_bus_unmap;
>>
>> /* DSP base */
>> +#if IS_ENABLED(CONFIG_PCI)
>> sdev->bar[HDA_DSP_BAR] = pci_ioremap_bar(pci, HDA_DSP_BAR);
>> +#endif
>> if (!sdev->bar[HDA_DSP_BAR]) {
>> dev_err(sdev->dev, "error: ioremap error\n");
>> ret = -ENXIO;
>
> IMO, this should be better addressed by fixing in linux/pci.h
> instead, something like below (totally untested).
Indeed. I wanted to first enable COMPILE_TEST for SOF and do a PCI
cleanup in a second stage. It might take a while to synchronize those
changes and check if there are additional functions needed by others.
>
>
> thanks,
>
> Takashi
>
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -2005,8 +2005,19 @@ static inline void pci_mmcfg_late_init(void) { }
>
> int pci_ext_cfg_avail(void);
>
> +#ifdef CONFIG_PCI
> void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar);
> void __iomem *pci_ioremap_wc_bar(struct pci_dev *pdev, int bar);
> +#else
> +static inline void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar)
> +{
> + return NULL;
> +}
> +static inline void __iomem *pci_ioremap_wc_bar(struct pci_dev *pdev, int bar)
> +{
> + return NULL;
> +}
> +#endif
>
> #ifdef CONFIG_PCI_IOV
> int pci_iov_virtfn_bus(struct pci_dev *dev, int id);
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
next prev parent reply other threads:[~2019-05-31 18:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-31 14:25 YueHaibing
2019-05-31 14:34 ` Takashi Iwai
2019-05-31 18:44 ` Pierre-Louis Bossart [this message]
2019-05-31 17:24 ` [alsa-devel] " Pierre-Louis Bossart
2019-06-04 14:58 ` Applied "ASoC: SOF: Intel: hda: Fix COMPILE_TEST build error" to the asoc tree Mark Brown
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=e20ff9a0-0928-2864-c451-a24d86ccfc5c@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tiwai@suse.de \
--cc=yingjiang.zhu@linux.intel.com \
--cc=yuehaibing@huawei.com \
--subject='Re: [alsa-devel] [PATCH] ASoC: SOF: Intel: hda: Fix COMPILE_TEST build error' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).