* [linux-sof-driver:pr/1818 2/5] sound/soc/sof/loader.c:209:13: error: invalid storage class for function 'sof_get_windows'
@ 2020-03-04 16:52 kbuild test robot
0 siblings, 0 replies; only message in thread
From: kbuild test robot @ 2020-03-04 16:52 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 52729 bytes --]
tree: https://github.com/thesofproject/linux pr/1818
head: 2691f8a3fbf75c72674fb40b274f903f0cde77f4
commit: 8c8b94c14ca4a0cfe44181ad5187379cdd365848 [2/5] SoC: SOF: Introduce extended manifest
config: x86_64-sof-customedconfig-sof-defconfig (attached as .config)
compiler: gcc-7 (Debian 7.5.0-5) 7.5.0
reproduce:
git checkout 8c8b94c14ca4a0cfe44181ad5187379cdd365848
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
In file included from include/linux/linkage.h:7:0,
from include/linux/kernel.h:8,
from include/asm-generic/bug.h:19,
from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/gfp.h:5,
from include/linux/firmware.h:7,
from sound/soc/sof/loader.c:13:
sound/soc/sof/loader.c: In function 'snd_sof_fw_ext_man_parse':
>> include/linux/export.h:98:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
extern typeof(sym) sym; \
^
>> include/linux/export.h:147:39: note: in expansion of macro '___EXPORT_SYMBOL'
#define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
^~~~~~~~~~~~~~~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
include/linux/export.h:158:29: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
^~~~~~~~~~~~~~
>> sound/soc/sof/loader.c:204:1: note: in expansion of macro 'EXPORT_SYMBOL'
EXPORT_SYMBOL(snd_sof_fw_ext_man_parse);
^~~~~~~~~~~~~
In file included from include/linux/firmware.h:6:0,
from sound/soc/sof/loader.c:13:
>> include/linux/compiler.h:301:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
static void * __section(.discard.addressable) __used \
^
>> include/linux/export.h:51:2: note: in expansion of macro '__ADDRESSABLE'
__ADDRESSABLE(sym) \
^~~~~~~~~~~~~
>> include/linux/export.h:108:2: note: in expansion of macro '__KSYMTAB_ENTRY'
__KSYMTAB_ENTRY(sym, sec)
^~~~~~~~~~~~~~~
>> include/linux/export.h:147:39: note: in expansion of macro '___EXPORT_SYMBOL'
#define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
^~~~~~~~~~~~~~~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
include/linux/export.h:158:29: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
^~~~~~~~~~~~~~
>> sound/soc/sof/loader.c:204:1: note: in expansion of macro 'EXPORT_SYMBOL'
EXPORT_SYMBOL(snd_sof_fw_ext_man_parse);
^~~~~~~~~~~~~
>> sound/soc/sof/loader.c:209:13: error: invalid storage class for function 'sof_get_windows'
static void sof_get_windows(struct snd_sof_dev *sdev)
^~~~~~~~~~~~~~~
>> sound/soc/sof/loader.c:209:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
static void sof_get_windows(struct snd_sof_dev *sdev)
^~~~~~
In file included from include/linux/linkage.h:7:0,
from include/linux/kernel.h:8,
from include/asm-generic/bug.h:19,
from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/gfp.h:5,
from include/linux/firmware.h:7,
from sound/soc/sof/loader.c:13:
>> sound/soc/sof/loader.c:372:15: error: non-static declaration of 'sof_fw_ready' follows static declaration
EXPORT_SYMBOL(sof_fw_ready);
^
include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
include/linux/export.h:158:29: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
^~~~~~~~~~~~~~
sound/soc/sof/loader.c:372:1: note: in expansion of macro 'EXPORT_SYMBOL'
EXPORT_SYMBOL(sof_fw_ready);
^~~~~~~~~~~~~
sound/soc/sof/loader.c:329:5: note: previous definition of 'sof_fw_ready' was here
int sof_fw_ready(struct snd_sof_dev *sdev, u32 msg_id)
^~~~~~~~~~~~
In file included from include/linux/firmware.h:6:0,
from sound/soc/sof/loader.c:13:
>> include/linux/compiler.h:301:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
static void * __section(.discard.addressable) __used \
^
>> include/linux/export.h:51:2: note: in expansion of macro '__ADDRESSABLE'
__ADDRESSABLE(sym) \
^~~~~~~~~~~~~
>> include/linux/export.h:108:2: note: in expansion of macro '__KSYMTAB_ENTRY'
__KSYMTAB_ENTRY(sym, sec)
^~~~~~~~~~~~~~~
>> include/linux/export.h:147:39: note: in expansion of macro '___EXPORT_SYMBOL'
#define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
^~~~~~~~~~~~~~~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
include/linux/export.h:158:29: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
^~~~~~~~~~~~~~
sound/soc/sof/loader.c:372:1: note: in expansion of macro 'EXPORT_SYMBOL'
EXPORT_SYMBOL(sof_fw_ready);
^~~~~~~~~~~~~
sound/soc/sof/loader.c:375:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
int snd_sof_parse_module_memcpy(struct snd_sof_dev *sdev,
^~~
In file included from include/linux/linkage.h:7:0,
from include/linux/kernel.h:8,
from include/asm-generic/bug.h:19,
from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/gfp.h:5,
from include/linux/firmware.h:7,
from sound/soc/sof/loader.c:13:
>> sound/soc/sof/loader.c:457:15: error: non-static declaration of 'snd_sof_parse_module_memcpy' follows static declaration
EXPORT_SYMBOL(snd_sof_parse_module_memcpy);
^
include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
include/linux/export.h:158:29: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
^~~~~~~~~~~~~~
sound/soc/sof/loader.c:457:1: note: in expansion of macro 'EXPORT_SYMBOL'
EXPORT_SYMBOL(snd_sof_parse_module_memcpy);
^~~~~~~~~~~~~
sound/soc/sof/loader.c:375:5: note: previous definition of 'snd_sof_parse_module_memcpy' was here
int snd_sof_parse_module_memcpy(struct snd_sof_dev *sdev,
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/firmware.h:6:0,
from sound/soc/sof/loader.c:13:
>> include/linux/compiler.h:301:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
static void * __section(.discard.addressable) __used \
^
>> include/linux/export.h:51:2: note: in expansion of macro '__ADDRESSABLE'
__ADDRESSABLE(sym) \
^~~~~~~~~~~~~
>> include/linux/export.h:108:2: note: in expansion of macro '__KSYMTAB_ENTRY'
__KSYMTAB_ENTRY(sym, sec)
^~~~~~~~~~~~~~~
>> include/linux/export.h:147:39: note: in expansion of macro '___EXPORT_SYMBOL'
#define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
^~~~~~~~~~~~~~~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
include/linux/export.h:158:29: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
^~~~~~~~~~~~~~
sound/soc/sof/loader.c:457:1: note: in expansion of macro 'EXPORT_SYMBOL'
EXPORT_SYMBOL(snd_sof_parse_module_memcpy);
^~~~~~~~~~~~~
sound/soc/sof/loader.c:459:12: error: invalid storage class for function 'check_header'
static int check_header(struct snd_sof_dev *sdev, const struct firmware *fw)
^~~~~~~~~~~~
sound/soc/sof/loader.c:459:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
static int check_header(struct snd_sof_dev *sdev, const struct firmware *fw)
^~~~~~
sound/soc/sof/loader.c:486:12: error: invalid storage class for function 'load_modules'
static int load_modules(struct snd_sof_dev *sdev, const struct firmware *fw)
^~~~~~~~~~~~
sound/soc/sof/loader.c:540:12: error: invalid storage class for function 'strip_fw'
static int strip_fw(struct snd_sof_dev *sdev, u32 bytes)
^~~~~~~~
In file included from include/linux/linkage.h:7:0,
from include/linux/kernel.h:8,
from include/asm-generic/bug.h:19,
from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/gfp.h:5,
from include/linux/firmware.h:7,
from sound/soc/sof/loader.c:13:
sound/soc/sof/loader.c:602:15: error: non-static declaration of 'snd_sof_load_firmware_raw' follows static declaration
EXPORT_SYMBOL(snd_sof_load_firmware_raw);
^
include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
include/linux/export.h:158:29: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
^~~~~~~~~~~~~~
sound/soc/sof/loader.c:602:1: note: in expansion of macro 'EXPORT_SYMBOL'
EXPORT_SYMBOL(snd_sof_load_firmware_raw);
^~~~~~~~~~~~~
sound/soc/sof/loader.c:555:5: note: previous definition of 'snd_sof_load_firmware_raw' was here
int snd_sof_load_firmware_raw(struct snd_sof_dev *sdev)
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/firmware.h:6:0,
from sound/soc/sof/loader.c:13:
include/linux/compiler.h:301:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
static void * __section(.discard.addressable) __used \
^
include/linux/export.h:51:2: note: in expansion of macro '__ADDRESSABLE'
__ADDRESSABLE(sym) \
^~~~~~~~~~~~~
include/linux/export.h:108:2: note: in expansion of macro '__KSYMTAB_ENTRY'
__KSYMTAB_ENTRY(sym, sec)
^~~~~~~~~~~~~~~
include/linux/export.h:147:39: note: in expansion of macro '___EXPORT_SYMBOL'
#define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
^~~~~~~~~~~~~~~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
include/linux/export.h:158:29: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
^~~~~~~~~~~~~~
sound/soc/sof/loader.c:602:1: note: in expansion of macro 'EXPORT_SYMBOL'
EXPORT_SYMBOL(snd_sof_load_firmware_raw);
^~~~~~~~~~~~~
sound/soc/sof/loader.c:604:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
int snd_sof_load_firmware_memcpy(struct snd_sof_dev *sdev)
^~~
In file included from include/linux/linkage.h:7:0,
from include/linux/kernel.h:8,
from include/asm-generic/bug.h:19,
from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/gfp.h:5,
from include/linux/firmware.h:7,
from sound/soc/sof/loader.c:13:
sound/soc/sof/loader.c:642:15: error: non-static declaration of 'snd_sof_load_firmware_memcpy' follows static declaration
EXPORT_SYMBOL(snd_sof_load_firmware_memcpy);
^
include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
include/linux/export.h:158:29: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
^~~~~~~~~~~~~~
sound/soc/sof/loader.c:642:1: note: in expansion of macro 'EXPORT_SYMBOL'
EXPORT_SYMBOL(snd_sof_load_firmware_memcpy);
^~~~~~~~~~~~~
--
In file included from include/linux/linkage.h:7:0,
from include/linux/kernel.h:8,
from include/asm-generic/bug.h:19,
from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/gfp.h:5,
from include/linux/firmware.h:7,
from sound/soc//sof/loader.c:13:
sound/soc//sof/loader.c: In function 'snd_sof_fw_ext_man_parse':
>> include/linux/export.h:98:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
extern typeof(sym) sym; \
^
>> include/linux/export.h:147:39: note: in expansion of macro '___EXPORT_SYMBOL'
#define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
^~~~~~~~~~~~~~~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
include/linux/export.h:158:29: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
^~~~~~~~~~~~~~
sound/soc//sof/loader.c:204:1: note: in expansion of macro 'EXPORT_SYMBOL'
EXPORT_SYMBOL(snd_sof_fw_ext_man_parse);
^~~~~~~~~~~~~
In file included from include/linux/firmware.h:6:0,
from sound/soc//sof/loader.c:13:
>> include/linux/compiler.h:301:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
static void * __section(.discard.addressable) __used \
^
>> include/linux/export.h:51:2: note: in expansion of macro '__ADDRESSABLE'
__ADDRESSABLE(sym) \
^~~~~~~~~~~~~
>> include/linux/export.h:108:2: note: in expansion of macro '__KSYMTAB_ENTRY'
__KSYMTAB_ENTRY(sym, sec)
^~~~~~~~~~~~~~~
>> include/linux/export.h:147:39: note: in expansion of macro '___EXPORT_SYMBOL'
#define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
^~~~~~~~~~~~~~~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
include/linux/export.h:158:29: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
^~~~~~~~~~~~~~
sound/soc//sof/loader.c:204:1: note: in expansion of macro 'EXPORT_SYMBOL'
EXPORT_SYMBOL(snd_sof_fw_ext_man_parse);
^~~~~~~~~~~~~
sound/soc//sof/loader.c:209:13: error: invalid storage class for function 'sof_get_windows'
static void sof_get_windows(struct snd_sof_dev *sdev)
^~~~~~~~~~~~~~~
sound/soc//sof/loader.c:209:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
static void sof_get_windows(struct snd_sof_dev *sdev)
^~~~~~
In file included from include/linux/linkage.h:7:0,
from include/linux/kernel.h:8,
from include/asm-generic/bug.h:19,
from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/gfp.h:5,
from include/linux/firmware.h:7,
from sound/soc//sof/loader.c:13:
sound/soc//sof/loader.c:372:15: error: non-static declaration of 'sof_fw_ready' follows static declaration
EXPORT_SYMBOL(sof_fw_ready);
^
include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
include/linux/export.h:158:29: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
^~~~~~~~~~~~~~
sound/soc//sof/loader.c:372:1: note: in expansion of macro 'EXPORT_SYMBOL'
EXPORT_SYMBOL(sof_fw_ready);
^~~~~~~~~~~~~
sound/soc//sof/loader.c:329:5: note: previous definition of 'sof_fw_ready' was here
int sof_fw_ready(struct snd_sof_dev *sdev, u32 msg_id)
^~~~~~~~~~~~
In file included from include/linux/firmware.h:6:0,
from sound/soc//sof/loader.c:13:
>> include/linux/compiler.h:301:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
static void * __section(.discard.addressable) __used \
^
>> include/linux/export.h:51:2: note: in expansion of macro '__ADDRESSABLE'
__ADDRESSABLE(sym) \
^~~~~~~~~~~~~
>> include/linux/export.h:108:2: note: in expansion of macro '__KSYMTAB_ENTRY'
__KSYMTAB_ENTRY(sym, sec)
^~~~~~~~~~~~~~~
>> include/linux/export.h:147:39: note: in expansion of macro '___EXPORT_SYMBOL'
#define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
^~~~~~~~~~~~~~~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
include/linux/export.h:158:29: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
^~~~~~~~~~~~~~
sound/soc//sof/loader.c:372:1: note: in expansion of macro 'EXPORT_SYMBOL'
EXPORT_SYMBOL(sof_fw_ready);
^~~~~~~~~~~~~
sound/soc//sof/loader.c:375:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
int snd_sof_parse_module_memcpy(struct snd_sof_dev *sdev,
^~~
In file included from include/linux/linkage.h:7:0,
from include/linux/kernel.h:8,
from include/asm-generic/bug.h:19,
from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/gfp.h:5,
from include/linux/firmware.h:7,
from sound/soc//sof/loader.c:13:
sound/soc//sof/loader.c:457:15: error: non-static declaration of 'snd_sof_parse_module_memcpy' follows static declaration
EXPORT_SYMBOL(snd_sof_parse_module_memcpy);
^
include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
include/linux/export.h:158:29: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
^~~~~~~~~~~~~~
sound/soc//sof/loader.c:457:1: note: in expansion of macro 'EXPORT_SYMBOL'
EXPORT_SYMBOL(snd_sof_parse_module_memcpy);
^~~~~~~~~~~~~
sound/soc//sof/loader.c:375:5: note: previous definition of 'snd_sof_parse_module_memcpy' was here
int snd_sof_parse_module_memcpy(struct snd_sof_dev *sdev,
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/firmware.h:6:0,
from sound/soc//sof/loader.c:13:
>> include/linux/compiler.h:301:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
static void * __section(.discard.addressable) __used \
^
>> include/linux/export.h:51:2: note: in expansion of macro '__ADDRESSABLE'
__ADDRESSABLE(sym) \
^~~~~~~~~~~~~
>> include/linux/export.h:108:2: note: in expansion of macro '__KSYMTAB_ENTRY'
__KSYMTAB_ENTRY(sym, sec)
^~~~~~~~~~~~~~~
>> include/linux/export.h:147:39: note: in expansion of macro '___EXPORT_SYMBOL'
#define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
^~~~~~~~~~~~~~~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
include/linux/export.h:158:29: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
^~~~~~~~~~~~~~
sound/soc//sof/loader.c:457:1: note: in expansion of macro 'EXPORT_SYMBOL'
EXPORT_SYMBOL(snd_sof_parse_module_memcpy);
^~~~~~~~~~~~~
sound/soc//sof/loader.c:459:12: error: invalid storage class for function 'check_header'
static int check_header(struct snd_sof_dev *sdev, const struct firmware *fw)
^~~~~~~~~~~~
sound/soc//sof/loader.c:459:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
static int check_header(struct snd_sof_dev *sdev, const struct firmware *fw)
^~~~~~
sound/soc//sof/loader.c:486:12: error: invalid storage class for function 'load_modules'
static int load_modules(struct snd_sof_dev *sdev, const struct firmware *fw)
^~~~~~~~~~~~
sound/soc//sof/loader.c:540:12: error: invalid storage class for function 'strip_fw'
static int strip_fw(struct snd_sof_dev *sdev, u32 bytes)
^~~~~~~~
In file included from include/linux/linkage.h:7:0,
from include/linux/kernel.h:8,
from include/asm-generic/bug.h:19,
from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/gfp.h:5,
from include/linux/firmware.h:7,
from sound/soc//sof/loader.c:13:
sound/soc//sof/loader.c:602:15: error: non-static declaration of 'snd_sof_load_firmware_raw' follows static declaration
EXPORT_SYMBOL(snd_sof_load_firmware_raw);
^
include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
include/linux/export.h:158:29: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
^~~~~~~~~~~~~~
sound/soc//sof/loader.c:602:1: note: in expansion of macro 'EXPORT_SYMBOL'
EXPORT_SYMBOL(snd_sof_load_firmware_raw);
^~~~~~~~~~~~~
sound/soc//sof/loader.c:555:5: note: previous definition of 'snd_sof_load_firmware_raw' was here
int snd_sof_load_firmware_raw(struct snd_sof_dev *sdev)
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/firmware.h:6:0,
from sound/soc//sof/loader.c:13:
>> include/linux/compiler.h:301:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
static void * __section(.discard.addressable) __used \
^
>> include/linux/export.h:51:2: note: in expansion of macro '__ADDRESSABLE'
__ADDRESSABLE(sym) \
^~~~~~~~~~~~~
>> include/linux/export.h:108:2: note: in expansion of macro '__KSYMTAB_ENTRY'
__KSYMTAB_ENTRY(sym, sec)
^~~~~~~~~~~~~~~
>> include/linux/export.h:147:39: note: in expansion of macro '___EXPORT_SYMBOL'
#define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
^~~~~~~~~~~~~~~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
include/linux/export.h:158:29: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
^~~~~~~~~~~~~~
sound/soc//sof/loader.c:602:1: note: in expansion of macro 'EXPORT_SYMBOL'
EXPORT_SYMBOL(snd_sof_load_firmware_raw);
^~~~~~~~~~~~~
sound/soc//sof/loader.c:604:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
int snd_sof_load_firmware_memcpy(struct snd_sof_dev *sdev)
^~~
In file included from include/linux/linkage.h:7:0,
from include/linux/kernel.h:8,
from include/asm-generic/bug.h:19,
from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/gfp.h:5,
from include/linux/firmware.h:7,
from sound/soc//sof/loader.c:13:
sound/soc//sof/loader.c:642:15: error: non-static declaration of 'snd_sof_load_firmware_memcpy' follows static declaration
EXPORT_SYMBOL(snd_sof_load_firmware_memcpy);
^
include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
include/linux/export.h:158:29: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
^~~~~~~~~~~~~~
sound/soc//sof/loader.c:642:1: note: in expansion of macro 'EXPORT_SYMBOL'
EXPORT_SYMBOL(snd_sof_load_firmware_memcpy);
^~~~~~~~~~~~~
sound/soc//sof/loader.c:604:5: note: previous definition of 'snd_sof_load_firmware_memcpy' was here
int snd_sof_load_firmware_memcpy(struct snd_sof_dev *sdev)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/firmware.h:6:0,
from sound/soc//sof/loader.c:13:
>> include/linux/compiler.h:301:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
static void * __section(.discard.addressable) __used \
^
>> include/linux/export.h:51:2: note: in expansion of macro '__ADDRESSABLE'
__ADDRESSABLE(sym) \
^~~~~~~~~~~~~
include/linux/export.h:108:2: note: in expansion of macro '__KSYMTAB_ENTRY'
__KSYMTAB_ENTRY(sym, sec)
^~~~~~~~~~~~~~~
include/linux/export.h:147:39: note: in expansion of macro '___EXPORT_SYMBOL'
#define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
^~~~~~~~~~~~~~~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
include/linux/export.h:158:29: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
^~~~~~~~~~~~~~
sound/soc//sof/loader.c:642:1: note: in expansion of macro 'EXPORT_SYMBOL'
EXPORT_SYMBOL(snd_sof_load_firmware_memcpy);
^~~~~~~~~~~~~
sound/soc//sof/loader.c:644:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
int snd_sof_load_firmware(struct snd_sof_dev *sdev)
^~~
In file included from include/linux/linkage.h:7:0,
from include/linux/kernel.h:8,
from include/asm-generic/bug.h:19,
from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/gfp.h:5,
from include/linux/firmware.h:7,
from sound/soc//sof/loader.c:13:
sound/soc//sof/loader.c:652:15: error: non-static declaration of 'snd_sof_load_firmware' follows static declaration
EXPORT_SYMBOL(snd_sof_load_firmware);
^
include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
include/linux/export.h:158:29: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
^~~~~~~~~~~~~~
sound/soc//sof/loader.c:652:1: note: in expansion of macro 'EXPORT_SYMBOL'
EXPORT_SYMBOL(snd_sof_load_firmware);
^~~~~~~~~~~~~
sound/soc//sof/loader.c:644:5: note: previous definition of 'snd_sof_load_firmware' was here
int snd_sof_load_firmware(struct snd_sof_dev *sdev)
^~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/firmware.h:6:0,
from sound/soc//sof/loader.c:13:
include/linux/compiler.h:301:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
static void * __section(.discard.addressable) __used \
^
include/linux/export.h:51:2: note: in expansion of macro '__ADDRESSABLE'
__ADDRESSABLE(sym) \
^~~~~~~~~~~~~
include/linux/export.h:108:2: note: in expansion of macro '__KSYMTAB_ENTRY'
__KSYMTAB_ENTRY(sym, sec)
^~~~~~~~~~~~~~~
include/linux/export.h:147:39: note: in expansion of macro '___EXPORT_SYMBOL'
#define __EXPORT_SYMBOL(sym, sec, ns) ___EXPORT_SYMBOL(sym, sec, ns)
^~~~~~~~~~~~~~~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
include/linux/export.h:158:29: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
^~~~~~~~~~~~~~
sound/soc//sof/loader.c:652:1: note: in expansion of macro 'EXPORT_SYMBOL'
EXPORT_SYMBOL(snd_sof_load_firmware);
^~~~~~~~~~~~~
sound/soc//sof/loader.c:654:1: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
int snd_sof_run_firmware(struct snd_sof_dev *sdev)
^~~
In file included from include/linux/linkage.h:7:0,
from include/linux/kernel.h:8,
from include/asm-generic/bug.h:19,
from arch/x86/include/asm/bug.h:83,
from include/linux/bug.h:5,
from include/linux/mmdebug.h:5,
from include/linux/gfp.h:5,
from include/linux/firmware.h:7,
from sound/soc//sof/loader.c:13:
sound/soc//sof/loader.c:725:15: error: non-static declaration of 'snd_sof_run_firmware' follows static declaration
EXPORT_SYMBOL(snd_sof_run_firmware);
^
include/linux/export.h:98:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
#define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
^~~~~~~~~~~~~~~
include/linux/export.h:158:29: note: in expansion of macro '_EXPORT_SYMBOL'
#define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
^~~~~~~~~~~~~~
sound/soc//sof/loader.c:725:1: note: in expansion of macro 'EXPORT_SYMBOL'
EXPORT_SYMBOL(snd_sof_run_firmware);
^~~~~~~~~~~~~
sound/soc//sof/loader.c:654:5: note: previous definition of 'snd_sof_run_firmware' was here
int snd_sof_run_firmware(struct snd_sof_dev *sdev)
^~~~~~~~~~~~~~~~~~~~
vim +/sof_get_windows +209 sound/soc/sof/loader.c
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 146
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 147 /* parse extended FW manifest data structures */
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 148 int snd_sof_fw_ext_man_parse(struct snd_sof_dev *sdev, const void *data)
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 149 {
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 150 const struct ext_man_elem_header *elem_hdr;
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 151 const struct ext_man_header *head = data;
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 152 ssize_t remaining;
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 153 uintptr_t iptr;
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 154 int ret = 0;
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 155
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 156 remaining = head->full_size - head->header_size;
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 157
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 158 /* Assert firmware starts with extended manifest */
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 159 if (snd_sof_ext_man_size(data) == 0)
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 160 return -EINVAL;
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 161
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 162 /* in compatible version */
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 163 if (EXT_MAN_VERSION_INCOMPATIBLE(EXT_MAN_VERSION, head->header_version)) {
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 164 dev_err(sdev->dev, "warning: extended manifest version 0x%X differ from used 0x%X\n",
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 165 head->header_version, EXT_MAN_VERSION);
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 166 return -EINVAL;
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 167 }
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 168
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 169 /* get first header */
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 170 iptr = (uintptr_t)data + head->header_size;
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 171
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 172 while (remaining > 0) {
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 173 elem_hdr = (struct ext_man_elem_header *)iptr;
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 174
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 175 dev_dbg(sdev->dev, "found ext_man header type %d size 0x%X\n",
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 176 elem_hdr->type, elem_hdr->size);
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 177
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 178 /* process structure data */
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 179 switch (elem_hdr->type) {
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 180 default:
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 181 dev_warn(sdev->dev, "warning: unknown ext_man header type %d size 0x%X\n",
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 182 elem_hdr->type, elem_hdr->size);
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 183 break;
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 184 }
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 185
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 186 if (ret < 0) {
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 187 dev_err(sdev->dev, "error: failed to parse ext_man header type %d size 0x%X\n",
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 188 elem_hdr->type, elem_hdr->size);
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 189 break;
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 190 }
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 191
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 192 /* decrement remaining data counter */
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 193 remaining -= elem_hdr->size;
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 194
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 195 /* move to next header */
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 196 iptr += elem_hdr->size;
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 197 }
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 198
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 199 if (remaining != 0) {
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 200 dev_err(sdev->dev, "error: ext_man header is inconsistent\n");
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 201
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 202 return ret;
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 203 }
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 @204 EXPORT_SYMBOL(snd_sof_fw_ext_man_parse);
8c8b94c14ca4a0 Karol Trzcinski 2020-03-02 205
91ba196c17ce82 Daniel Baluta 2019-07-30 206 /*
91ba196c17ce82 Daniel Baluta 2019-07-30 207 * IPC Firmware ready.
91ba196c17ce82 Daniel Baluta 2019-07-30 208 */
91ba196c17ce82 Daniel Baluta 2019-07-30 @209 static void sof_get_windows(struct snd_sof_dev *sdev)
91ba196c17ce82 Daniel Baluta 2019-07-30 210 {
91ba196c17ce82 Daniel Baluta 2019-07-30 211 struct sof_ipc_window_elem *elem;
91ba196c17ce82 Daniel Baluta 2019-07-30 212 u32 outbox_offset = 0;
91ba196c17ce82 Daniel Baluta 2019-07-30 213 u32 stream_offset = 0;
91ba196c17ce82 Daniel Baluta 2019-07-30 214 u32 inbox_offset = 0;
91ba196c17ce82 Daniel Baluta 2019-07-30 215 u32 outbox_size = 0;
91ba196c17ce82 Daniel Baluta 2019-07-30 216 u32 stream_size = 0;
91ba196c17ce82 Daniel Baluta 2019-07-30 217 u32 inbox_size = 0;
91ba196c17ce82 Daniel Baluta 2019-07-30 218 int window_offset;
91ba196c17ce82 Daniel Baluta 2019-07-30 219 int bar;
91ba196c17ce82 Daniel Baluta 2019-07-30 220 int i;
91ba196c17ce82 Daniel Baluta 2019-07-30 221
91ba196c17ce82 Daniel Baluta 2019-07-30 222 if (!sdev->info_window) {
91ba196c17ce82 Daniel Baluta 2019-07-30 223 dev_err(sdev->dev, "error: have no window info\n");
91ba196c17ce82 Daniel Baluta 2019-07-30 224 return;
91ba196c17ce82 Daniel Baluta 2019-07-30 225 }
91ba196c17ce82 Daniel Baluta 2019-07-30 226
91ba196c17ce82 Daniel Baluta 2019-07-30 227 bar = snd_sof_dsp_get_bar_index(sdev, SOF_FW_BLK_TYPE_SRAM);
91ba196c17ce82 Daniel Baluta 2019-07-30 228 if (bar < 0) {
91ba196c17ce82 Daniel Baluta 2019-07-30 229 dev_err(sdev->dev, "error: have no bar mapping\n");
91ba196c17ce82 Daniel Baluta 2019-07-30 230 return;
91ba196c17ce82 Daniel Baluta 2019-07-30 231 }
91ba196c17ce82 Daniel Baluta 2019-07-30 232
91ba196c17ce82 Daniel Baluta 2019-07-30 233 for (i = 0; i < sdev->info_window->num_windows; i++) {
91ba196c17ce82 Daniel Baluta 2019-07-30 234 elem = &sdev->info_window->window[i];
91ba196c17ce82 Daniel Baluta 2019-07-30 235
91ba196c17ce82 Daniel Baluta 2019-07-30 236 window_offset = snd_sof_dsp_get_window_offset(sdev, elem->id);
91ba196c17ce82 Daniel Baluta 2019-07-30 237 if (window_offset < 0) {
91ba196c17ce82 Daniel Baluta 2019-07-30 238 dev_warn(sdev->dev, "warn: no offset for window %d\n",
91ba196c17ce82 Daniel Baluta 2019-07-30 239 elem->id);
91ba196c17ce82 Daniel Baluta 2019-07-30 240 continue;
91ba196c17ce82 Daniel Baluta 2019-07-30 241 }
91ba196c17ce82 Daniel Baluta 2019-07-30 242
91ba196c17ce82 Daniel Baluta 2019-07-30 243 switch (elem->type) {
91ba196c17ce82 Daniel Baluta 2019-07-30 244 case SOF_IPC_REGION_UPBOX:
91ba196c17ce82 Daniel Baluta 2019-07-30 245 inbox_offset = window_offset + elem->offset;
91ba196c17ce82 Daniel Baluta 2019-07-30 246 inbox_size = elem->size;
91ba196c17ce82 Daniel Baluta 2019-07-30 247 snd_sof_debugfs_io_item(sdev,
91ba196c17ce82 Daniel Baluta 2019-07-30 248 sdev->bar[bar] +
91ba196c17ce82 Daniel Baluta 2019-07-30 249 inbox_offset,
91ba196c17ce82 Daniel Baluta 2019-07-30 250 elem->size, "inbox",
91ba196c17ce82 Daniel Baluta 2019-07-30 251 SOF_DEBUGFS_ACCESS_D0_ONLY);
91ba196c17ce82 Daniel Baluta 2019-07-30 252 break;
91ba196c17ce82 Daniel Baluta 2019-07-30 253 case SOF_IPC_REGION_DOWNBOX:
91ba196c17ce82 Daniel Baluta 2019-07-30 254 outbox_offset = window_offset + elem->offset;
91ba196c17ce82 Daniel Baluta 2019-07-30 255 outbox_size = elem->size;
91ba196c17ce82 Daniel Baluta 2019-07-30 256 snd_sof_debugfs_io_item(sdev,
91ba196c17ce82 Daniel Baluta 2019-07-30 257 sdev->bar[bar] +
91ba196c17ce82 Daniel Baluta 2019-07-30 258 outbox_offset,
91ba196c17ce82 Daniel Baluta 2019-07-30 259 elem->size, "outbox",
91ba196c17ce82 Daniel Baluta 2019-07-30 260 SOF_DEBUGFS_ACCESS_D0_ONLY);
91ba196c17ce82 Daniel Baluta 2019-07-30 261 break;
91ba196c17ce82 Daniel Baluta 2019-07-30 262 case SOF_IPC_REGION_TRACE:
91ba196c17ce82 Daniel Baluta 2019-07-30 263 snd_sof_debugfs_io_item(sdev,
91ba196c17ce82 Daniel Baluta 2019-07-30 264 sdev->bar[bar] +
91ba196c17ce82 Daniel Baluta 2019-07-30 265 window_offset +
91ba196c17ce82 Daniel Baluta 2019-07-30 266 elem->offset,
91ba196c17ce82 Daniel Baluta 2019-07-30 267 elem->size, "etrace",
91ba196c17ce82 Daniel Baluta 2019-07-30 268 SOF_DEBUGFS_ACCESS_D0_ONLY);
91ba196c17ce82 Daniel Baluta 2019-07-30 269 break;
91ba196c17ce82 Daniel Baluta 2019-07-30 270 case SOF_IPC_REGION_DEBUG:
91ba196c17ce82 Daniel Baluta 2019-07-30 271 snd_sof_debugfs_io_item(sdev,
91ba196c17ce82 Daniel Baluta 2019-07-30 272 sdev->bar[bar] +
91ba196c17ce82 Daniel Baluta 2019-07-30 273 window_offset +
91ba196c17ce82 Daniel Baluta 2019-07-30 274 elem->offset,
91ba196c17ce82 Daniel Baluta 2019-07-30 275 elem->size, "debug",
91ba196c17ce82 Daniel Baluta 2019-07-30 276 SOF_DEBUGFS_ACCESS_D0_ONLY);
91ba196c17ce82 Daniel Baluta 2019-07-30 277 break;
91ba196c17ce82 Daniel Baluta 2019-07-30 278 case SOF_IPC_REGION_STREAM:
91ba196c17ce82 Daniel Baluta 2019-07-30 279 stream_offset = window_offset + elem->offset;
91ba196c17ce82 Daniel Baluta 2019-07-30 280 stream_size = elem->size;
91ba196c17ce82 Daniel Baluta 2019-07-30 281 snd_sof_debugfs_io_item(sdev,
91ba196c17ce82 Daniel Baluta 2019-07-30 282 sdev->bar[bar] +
91ba196c17ce82 Daniel Baluta 2019-07-30 283 stream_offset,
91ba196c17ce82 Daniel Baluta 2019-07-30 284 elem->size, "stream",
91ba196c17ce82 Daniel Baluta 2019-07-30 285 SOF_DEBUGFS_ACCESS_D0_ONLY);
91ba196c17ce82 Daniel Baluta 2019-07-30 286 break;
91ba196c17ce82 Daniel Baluta 2019-07-30 287 case SOF_IPC_REGION_REGS:
91ba196c17ce82 Daniel Baluta 2019-07-30 288 snd_sof_debugfs_io_item(sdev,
91ba196c17ce82 Daniel Baluta 2019-07-30 289 sdev->bar[bar] +
91ba196c17ce82 Daniel Baluta 2019-07-30 290 window_offset +
91ba196c17ce82 Daniel Baluta 2019-07-30 291 elem->offset,
91ba196c17ce82 Daniel Baluta 2019-07-30 292 elem->size, "regs",
91ba196c17ce82 Daniel Baluta 2019-07-30 293 SOF_DEBUGFS_ACCESS_D0_ONLY);
91ba196c17ce82 Daniel Baluta 2019-07-30 294 break;
91ba196c17ce82 Daniel Baluta 2019-07-30 295 case SOF_IPC_REGION_EXCEPTION:
91ba196c17ce82 Daniel Baluta 2019-07-30 296 sdev->dsp_oops_offset = window_offset + elem->offset;
91ba196c17ce82 Daniel Baluta 2019-07-30 297 snd_sof_debugfs_io_item(sdev,
91ba196c17ce82 Daniel Baluta 2019-07-30 298 sdev->bar[bar] +
91ba196c17ce82 Daniel Baluta 2019-07-30 299 window_offset +
91ba196c17ce82 Daniel Baluta 2019-07-30 300 elem->offset,
91ba196c17ce82 Daniel Baluta 2019-07-30 301 elem->size, "exception",
91ba196c17ce82 Daniel Baluta 2019-07-30 302 SOF_DEBUGFS_ACCESS_D0_ONLY);
91ba196c17ce82 Daniel Baluta 2019-07-30 303 break;
91ba196c17ce82 Daniel Baluta 2019-07-30 304 default:
91ba196c17ce82 Daniel Baluta 2019-07-30 305 dev_err(sdev->dev, "error: get illegal window info\n");
91ba196c17ce82 Daniel Baluta 2019-07-30 306 return;
91ba196c17ce82 Daniel Baluta 2019-07-30 307 }
91ba196c17ce82 Daniel Baluta 2019-07-30 308 }
91ba196c17ce82 Daniel Baluta 2019-07-30 309
91ba196c17ce82 Daniel Baluta 2019-07-30 310 if (outbox_size == 0 || inbox_size == 0) {
91ba196c17ce82 Daniel Baluta 2019-07-30 311 dev_err(sdev->dev, "error: get illegal mailbox window\n");
91ba196c17ce82 Daniel Baluta 2019-07-30 312 return;
91ba196c17ce82 Daniel Baluta 2019-07-30 313 }
91ba196c17ce82 Daniel Baluta 2019-07-30 314
91ba196c17ce82 Daniel Baluta 2019-07-30 315 snd_sof_dsp_mailbox_init(sdev, inbox_offset, inbox_size,
91ba196c17ce82 Daniel Baluta 2019-07-30 316 outbox_offset, outbox_size);
91ba196c17ce82 Daniel Baluta 2019-07-30 317 sdev->stream_box.offset = stream_offset;
91ba196c17ce82 Daniel Baluta 2019-07-30 318 sdev->stream_box.size = stream_size;
91ba196c17ce82 Daniel Baluta 2019-07-30 319
91ba196c17ce82 Daniel Baluta 2019-07-30 320 dev_dbg(sdev->dev, " mailbox upstream 0x%x - size 0x%x\n",
91ba196c17ce82 Daniel Baluta 2019-07-30 321 inbox_offset, inbox_size);
91ba196c17ce82 Daniel Baluta 2019-07-30 322 dev_dbg(sdev->dev, " mailbox downstream 0x%x - size 0x%x\n",
91ba196c17ce82 Daniel Baluta 2019-07-30 323 outbox_offset, outbox_size);
91ba196c17ce82 Daniel Baluta 2019-07-30 324 dev_dbg(sdev->dev, " stream region 0x%x - size 0x%x\n",
91ba196c17ce82 Daniel Baluta 2019-07-30 325 stream_offset, stream_size);
91ba196c17ce82 Daniel Baluta 2019-07-30 326 }
91ba196c17ce82 Daniel Baluta 2019-07-30 327
91ba196c17ce82 Daniel Baluta 2019-07-30 328 /* check for ABI compatibility and create memory windows on first boot */
91ba196c17ce82 Daniel Baluta 2019-07-30 329 int sof_fw_ready(struct snd_sof_dev *sdev, u32 msg_id)
91ba196c17ce82 Daniel Baluta 2019-07-30 330 {
91ba196c17ce82 Daniel Baluta 2019-07-30 331 struct sof_ipc_fw_ready *fw_ready = &sdev->fw_ready;
91ba196c17ce82 Daniel Baluta 2019-07-30 332 int offset;
91ba196c17ce82 Daniel Baluta 2019-07-30 333 int bar;
91ba196c17ce82 Daniel Baluta 2019-07-30 334 int ret;
91ba196c17ce82 Daniel Baluta 2019-07-30 335
91ba196c17ce82 Daniel Baluta 2019-07-30 336 /* mailbox must be on 4k boundary */
91ba196c17ce82 Daniel Baluta 2019-07-30 337 offset = snd_sof_dsp_get_mailbox_offset(sdev);
91ba196c17ce82 Daniel Baluta 2019-07-30 338 if (offset < 0) {
91ba196c17ce82 Daniel Baluta 2019-07-30 339 dev_err(sdev->dev, "error: have no mailbox offset\n");
91ba196c17ce82 Daniel Baluta 2019-07-30 340 return offset;
91ba196c17ce82 Daniel Baluta 2019-07-30 341 }
91ba196c17ce82 Daniel Baluta 2019-07-30 342
91ba196c17ce82 Daniel Baluta 2019-07-30 343 bar = snd_sof_dsp_get_bar_index(sdev, SOF_FW_BLK_TYPE_SRAM);
91ba196c17ce82 Daniel Baluta 2019-07-30 344 if (bar < 0) {
91ba196c17ce82 Daniel Baluta 2019-07-30 345 dev_err(sdev->dev, "error: have no bar mapping\n");
91ba196c17ce82 Daniel Baluta 2019-07-30 346 return -EINVAL;
91ba196c17ce82 Daniel Baluta 2019-07-30 347 }
91ba196c17ce82 Daniel Baluta 2019-07-30 348
91ba196c17ce82 Daniel Baluta 2019-07-30 349 dev_dbg(sdev->dev, "ipc: DSP is ready 0x%8.8x offset 0x%x\n",
91ba196c17ce82 Daniel Baluta 2019-07-30 350 msg_id, offset);
91ba196c17ce82 Daniel Baluta 2019-07-30 351
91ba196c17ce82 Daniel Baluta 2019-07-30 352 /* no need to re-check version/ABI for subsequent boots */
91ba196c17ce82 Daniel Baluta 2019-07-30 353 if (!sdev->first_boot)
91ba196c17ce82 Daniel Baluta 2019-07-30 354 return 0;
91ba196c17ce82 Daniel Baluta 2019-07-30 355
91ba196c17ce82 Daniel Baluta 2019-07-30 356 /* copy data from the DSP FW ready offset */
91ba196c17ce82 Daniel Baluta 2019-07-30 357 sof_block_read(sdev, bar, offset, fw_ready, sizeof(*fw_ready));
91ba196c17ce82 Daniel Baluta 2019-07-30 358
91ba196c17ce82 Daniel Baluta 2019-07-30 359 /* make sure ABI version is compatible */
91ba196c17ce82 Daniel Baluta 2019-07-30 360 ret = snd_sof_ipc_valid(sdev);
91ba196c17ce82 Daniel Baluta 2019-07-30 361 if (ret < 0)
91ba196c17ce82 Daniel Baluta 2019-07-30 362 return ret;
91ba196c17ce82 Daniel Baluta 2019-07-30 363
91ba196c17ce82 Daniel Baluta 2019-07-30 364 /* now check for extended data */
91ba196c17ce82 Daniel Baluta 2019-07-30 365 snd_sof_fw_parse_ext_data(sdev, bar, offset +
91ba196c17ce82 Daniel Baluta 2019-07-30 366 sizeof(struct sof_ipc_fw_ready));
91ba196c17ce82 Daniel Baluta 2019-07-30 367
91ba196c17ce82 Daniel Baluta 2019-07-30 368 sof_get_windows(sdev);
91ba196c17ce82 Daniel Baluta 2019-07-30 369
91ba196c17ce82 Daniel Baluta 2019-07-30 370 return 0;
91ba196c17ce82 Daniel Baluta 2019-07-30 371 }
91ba196c17ce82 Daniel Baluta 2019-07-30 @372 EXPORT_SYMBOL(sof_fw_ready);
91ba196c17ce82 Daniel Baluta 2019-07-30 373
:::::: The code@line 209 was first introduced by commit
:::::: 91ba196c17ce8202b8554e9ad12efd2a2e74f21a ASoC: SOF: Intel: byt: Refactor fw ready / mem windows creation
:::::: TO: Daniel Baluta <daniel.baluta@nxp.com>
:::::: CC: Ranjani Sridharan <ranjani.sridharan@intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 32946 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-03-04 16:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-04 16:52 [linux-sof-driver:pr/1818 2/5] sound/soc/sof/loader.c:209:13: error: invalid storage class for function 'sof_get_windows' kbuild test robot
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.