Skip to content

Update kernel ABI to latest FW version - #260

Merged
plbossart merged 1 commit into
topic/sof-devfrom
topic/abi
Nov 11, 2018
Merged

Update kernel ABI to latest FW version#260
plbossart merged 1 commit into
topic/sof-devfrom
topic/abi

Conversation

@lgirdwood

Copy link
Copy Markdown
Member

Mostly copies and changes for license header/include guards. Will test all tomorrow.

@plbossartplbossart left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we want to remove the SSP mode which no one seems to use? Or mark it as reserved (which would be cool if we change the layout with a future version)

@lgirdwood

Copy link
Copy Markdown
MemberAuthor

@plbossart lets reserve it - Will update both PRs

@lgirdwoodlgirdwood changed the title [WIP] Update kernel ABI to latest FW versionUpdate kernel ABI to latest FW versionNov 9, 2018
@lgirdwood
lgirdwoodforce-pushed the topic/abi branch 2 times, most recently from 1161f78 to be1ff26CompareNovember 9, 2018 16:20
@plbossart

plbossart commented Nov 9, 2018

Copy link
Copy Markdown
Member

even when I ignore the type issues reported by checkpatch, you still have a few (only took one per occurrence):

WARNING: please, no space before tabs
#168: FILE: include/sound/sof/control.h:77:
+^ISOF_CTRL_CMD_ENUM, ^I/**< maps to ALSA enum style controls */$
WARNING: Block comments should align the * on each line
#2838: FILE: include/uapi/sound/sof/trace.h:3:
+/*
+* This file is provided under a dual BSD/GPLv2 license. When using or
WARNING: please, no space before tabs
#168: FILE: include/sound/sof/control.h:77:
+^ISOF_CTRL_CMD_ENUM, ^I/**< maps to ALSA enum style controls */$
CHECK: Please don't use multiple blank lines
#271: FILE: include/sound/sof/dai-intel.h:49:
+
+

And this one is new to me.

WARNING: __packed is preferred over __attribute__((packed))
#382: FILE: include/sound/sof/dai-intel.h:160:
+} __attribute__((packed));

@lgirdwood
lgirdwoodforce-pushed the topic/abi branch 2 times, most recently from c746500 to 62cb293CompareNovember 9, 2018 21:00
@lgirdwood

Copy link
Copy Markdown
MemberAuthor

@plbossart I think these are all historical from before checkpatch. I've taken this opportunity to fix all the important ones for this update in both kernel and FW.
Please feel free to apply both FW and kernel ABI PR's if you have time tonight otherwise I can merge tomorrow if there are no new issues.

@plbossart

Copy link
Copy Markdown
Member

@lgirdwood I'll do a smoke test with both kernel and firmware and merge both if things look fine.

@plbossart

Copy link
Copy Markdown
Member

No issues with this PR and the matching SOF one, except for

[ 5.403033] sof-audio sof-audio: ipc tx succeeded: 0x30130000: GLB_TPLG_MSG: PIPE_COMPLETE
[ 5.403050] sof-audio sof-audio: error: failed to enter PM idle -11

Still no luck with the PM...

verified all files. The only things I noticed are

  • missing packed in eq.h
  • whitespace differences in header.h
  • missing lines in manifest.h
  • trace.h (packed vs packed, whitespaces in comments, different definition for long_entry_address uint32_t vs. uintptr_t, spurious ifndef at the end). As usual the trace is the worst :-(

In other words you work tomorrow... (If you merge the kernel use rebase-and-merge please, not git merge)

@ranj063

Copy link
Copy Markdown
Collaborator

No issues with this PR and the matching SOF one, except for

[ 5.403033] sof-audio sof-audio: ipc tx succeeded: 0x30130000: GLB_TPLG_MSG: PIPE_COMPLETE
[ 5.403050] sof-audio sof-audio: error: failed to enter PM idle -11

@plbossart do you see it even after you merged the latest PM PR #249

Still no luck with the PM...
verified all files. The only things I noticed are
* missing **packed** in eq.h
* whitespace differences in header.h
* missing lines in manifest.h
* trace.h (packed vs **packed**, whitespaces in comments, different definition for long_entry_address uint32_t vs. uintptr_t, spurious ifndef at the end). As usual the trace is the worst :-(
In other words you work tomorrow... (If you merge the kernel use rebase-and-merge please, not git merge)

@lgirdwood

lgirdwood commented Nov 11, 2018

Copy link
Copy Markdown
MemberAuthor

@plbossart I've just double checked everything and I cant see any missing packed in eq.h or problematic differences in trace.h . These were differences in an older version so I wonder if github loading was high on Friday. I've also done a git diff against my local branches and remote branches so it should all be in sync today.

@lgirdwood

lgirdwood commented Nov 11, 2018

Copy link
Copy Markdown
MemberAuthor

@ranj063 I had a quick check on the PM idle and we should see a dev_err() on all the suspend failures in pm.c. Error -11 is -EAGAIN and means "try again" so its the PM core here, please look at drivers/base/power/runtime.c and rpm_suspend() as it does return -EAGAIN in two places !

Copy FW IPC headers to include/sound/sof/.
Copy FW userspace ABI headers to include/uapi/sound/sof/.
Fix various include guards and comments for kernel.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
@plbossart

plbossart commented Nov 11, 2018

Copy link
Copy Markdown
Member

Try comparing your kernel and sof files, and you'll have the differences I reported, e.g.

diff eq.h /data/pbossart/SOF-public/sof-sdk/sof.git/src/include/uapi/user/eq.h 1d0
...
62c86< };---> } __attribute__((packed));72c96< };---> } __attribute__((packed));131c155< };---> } __attribute__((packed));141c165< };---> } __attribute__((packed));151c175< };---> } __attribute__((packed));164c188< #endif---> #endif /* __INCLUDE_UAPI_USER_EQ_H__ */
diff header.h /data/pbossart/SOF-public/sof-sdk/sof.git/src/include/uapi/user/header.h1d0
....
25c55< } __attribute__((packed));---> } __attribute__((packed));
diff manifest.h /data/pbossart/SOF-public/sof-sdk/sof.git/src/include/uapi/user/manifest.h> #include <stdint.h>102d131<
diff trace.h /data/pbossart/SOF-public/sof-sdk/sof.git/src/include/uapi/user/trace.h 25c50
< } __attribute__((__packed__));
---
> } __attribute__((packed));
67c92
< } __attribute__((__packed__));
---
> } __attribute__((packed));
74c99
< } __attribute__((__packed__));
---
> } __attribute__((packed));
79,83c104,108
< * Log entry header.
< *
< * The header is followed by an array of arguments (uint32_t[]).
< * Number of arguments is specified by the params_num field of log_entry
< */
---
> * Log entry header.
> *
> * The header is followed by an array of arguments (uint32_t[]).
> * Number of arguments is specified by the params_num field of log_entry
> */
90,91c115,116
< uintptr_t log_entry_address;	/* Address of log entry in ELF */
< } __attribute__((__packed__));
---
> uint32_t log_entry_address;	/* Address of log entry in ELF */
> } __attribute__((packed));
93c118
< #endif
---
> #endif //#ifndef __INCLUDE_LOGGING__

@plbossart

Copy link
Copy Markdown
Member

Never mind, if I fetch the latest branches again I only see differences in __packed and __attribute((packed)) which is ok. I'll merge both kernel and firmware.

@plbossart
plbossart merged commit b068508 into topic/sof-devNov 11, 2018
plbossart pushed a commit that referenced this pull request Nov 11, 2019
Since commit a211b8c ("ARM: dts: imx6qdl-sabreauto: Add sensors")
a storm of accelerometer interrupts is seen:
[ 114.211283] irq 260: nobody cared (try booting with the "irqpoll" option)
[ 114.218108] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.3.4 #1
[ 114.223960] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
[ 114.230531] [<c0112858>] (unwind_backtrace) from [<c010cdc8>] (show_stack+0x10/0x14)
[ 114.238301] [<c010cdc8>] (show_stack) from [<c0c1aa1c>] (dump_stack+0xd8/0x110)
[ 114.245644] [<c0c1aa1c>] (dump_stack) from [<c0193594>] (__report_bad_irq+0x30/0xc0)
[ 114.253417] [<c0193594>] (__report_bad_irq) from [<c01933ac>] (note_interrupt+0x108/0x298)
[ 114.261707] [<c01933ac>] (note_interrupt) from [<c018ffe4>] (handle_irq_event_percpu+0x70/0x80)
[ 114.270433] [<c018ffe4>] (handle_irq_event_percpu) from [<c019002c>] (handle_irq_event+0x38/0x5c)
[ 114.279326] [<c019002c>] (handle_irq_event) from [<c019438c>] (handle_level_irq+0xc8/0x154)
[ 114.287701] [<c019438c>] (handle_level_irq) from [<c018eda0>] (generic_handle_irq+0x20/0x34)
[ 114.296166] [<c018eda0>] (generic_handle_irq) from [<c0534214>] (mxc_gpio_irq_handler+0x30/0xf0)
[ 114.304975] [<c0534214>] (mxc_gpio_irq_handler) from [<c0534334>] (mx3_gpio_irq_handler+0x60/0xb0)
[ 114.313955] [<c0534334>] (mx3_gpio_irq_handler) from [<c018eda0>] (generic_handle_irq+0x20/0x34)
[ 114.322762] [<c018eda0>] (generic_handle_irq) from [<c018f3ac>] (__handle_domain_irq+0x64/0xe0)
[ 114.331485] [<c018f3ac>] (__handle_domain_irq) from [<c05215a8>] (gic_handle_irq+0x4c/0xa8)
[ 114.339862] [<c05215a8>] (gic_handle_irq) from [<c0101a70>] (__irq_svc+0x70/0x98)
[ 114.347361] Exception stack(0xc1301ec0 to 0xc1301f08)
[ 114.352435] 1ec0: 00000001 00000006 00000000 c130c340 00000001 c130f68 9785636d c13ea2e8
[ 114.360635] 1ee0: 9784907d 0000001a eaf99d78 0000001a 00000000 c1301f10 c0182b00 c0878de4
[ 114.368830] 1f00: 20000013 ffffffff
[ 114.372349] [<c0101a70>] (__irq_svc) from [<c0878de4>] (cpuidle_enter_state+0x168/0x5f4)
[ 114.380464] [<c0878de4>] (cpuidle_enter_state) from [<c08792ac>] (cpuidle_enter+0x28/0x38)
[ 114.388751] [<c08792ac>] (cpuidle_enter) from [<c015ef9c>] (do_idle+0x224/0x2a8)
[ 114.396168] [<c015ef9c>] (do_idle) from [<c015f3b8>] (cpu_startup_entry+0x18/0x20)
[ 114.403765] [<c015f3b8>] (cpu_startup_entry) from [<c1200e54>] (start_kernel+0x43c/0x500)
[ 114.411958] handlers:
[ 114.414302] [<a01028b8>] irq_default_primary_handler threaded [<fd7a3b08>] mma8452_interrupt
[ 114.422974] Disabling IRQ #260
CPU0 CPU1
....
260: 100001 0 gpio-mxc 31 Level mma8451
The MMA8451 interrupt triggers as low level, so the GPIO6_IO31 pin
needs to activate its pull up, otherwise it will stay always at low level
generating multiple interrupts.
The current device tree does not configure the IOMUX for this pin, so
it uses whathever comes configured from the bootloader.
The IOMUXC_SW_PAD_CTL_PAD_EIM_BCLK register value comes as 0x8000 from
the bootloader, which has PKE bit cleared, hence disabling the
pull-up.
Instead of relying on a previous configuration from the bootloader,
configure the GPIO6_IO31 pin with pull-up enabled in order to fix
this problem.
Fixes: a211b8c ("ARM: dts: imx6qdl-sabreauto: Add sensors")
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Reviewed-By: Leonard Crestez <leonard.crestez@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
wenliangwu pushed a commit that referenced this pull request Oct 30, 2023
Add various tests to check maximum number of supported programs
being attached:
# ./vmtest.sh -- ./test_progs -t tc_opts
[...]
./test_progs -t tc_opts
[ 1.185325] bpf_testmod: loading out-of-tree module taints kernel.
[ 1.186826] bpf_testmod: module verification failed: signature and/or required key missing - tainting kernel
[ 1.270123] tsc: Refined TSC clocksource calibration: 3407.988 MHz
[ 1.272428] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x311fc932722, max_idle_ns: 440795381586 ns
[ 1.276408] clocksource: Switched to clocksource tsc
#252 tc_opts_after:OK
#253 tc_opts_append:OK
#254 tc_opts_basic:OK
#255 tc_opts_before:OK
#256 tc_opts_chain_classic:OK
#257 tc_opts_chain_mixed:OK
#258 tc_opts_delete_empty:OK
#259 tc_opts_demixed:OK
#260 tc_opts_detach:OK
#261 tc_opts_detach_after:OK
#262 tc_opts_detach_before:OK
#263 tc_opts_dev_cleanup:OK
#264 tc_opts_invalid:OK
#265 tc_opts_max:OK <--- (new test)
#266 tc_opts_mixed:OK
#267 tc_opts_prepend:OK
#268 tc_opts_replace:OK
#269 tc_opts_revision:OK
Summary: 18/0 PASSED, 0 SKIPPED, 0 FAILED
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20230929204121.20305-2-daniel@iogearbox.net
wenliangwu pushed a commit that referenced this pull request Oct 30, 2023
Add a new test case which performs double query of the bpf_mprog through
libbpf API, but also via raw bpf(2) syscall. This is testing to gather
first the count and then in a subsequent probe the full information with
the program array without clearing passed structs in between.
# ./vmtest.sh -- ./test_progs -t tc_opts
[...]
./test_progs -t tc_opts
[ 1.398818] tsc: Refined TSC clocksource calibration: 3407.999 MHz
[ 1.400263] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x311fd336761, max_idle_ns: 440795243819 ns
[ 1.402734] clocksource: Switched to clocksource tsc
[ 1.426639] bpf_testmod: loading out-of-tree module taints kernel.
[ 1.428112] bpf_testmod: module verification failed: signature and/or required key missing - tainting kernel
#252 tc_opts_after:OK
#253 tc_opts_append:OK
#254 tc_opts_basic:OK
#255 tc_opts_before:OK
#256 tc_opts_chain_classic:OK
#257 tc_opts_chain_mixed:OK
#258 tc_opts_delete_empty:OK
#259 tc_opts_demixed:OK
#260 tc_opts_detach:OK
#261 tc_opts_detach_after:OK
#262 tc_opts_detach_before:OK
#263 tc_opts_dev_cleanup:OK
#264 tc_opts_invalid:OK
#265 tc_opts_max:OK
#266 tc_opts_mixed:OK
#267 tc_opts_prepend:OK
#268 tc_opts_query:OK <--- (new test)
#269 tc_opts_replace:OK
#270 tc_opts_revision:OK
Summary: 19/0 PASSED, 0 SKIPPED, 0 FAILED
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/r/20231006220655.1653-4-daniel@iogearbox.net
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
wenliangwu pushed a commit that referenced this pull request Oct 30, 2023
Add a new test case to query on an empty bpf_mprog and pass the revision
directly into expected_revision for attachment to assert that this does
succeed.
./test_progs -t tc_opts
[ 1.406778] tsc: Refined TSC clocksource calibration: 3407.990 MHz
[ 1.408863] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x311fcaf6eb0, max_idle_ns: 440795321766 ns
[ 1.412419] clocksource: Switched to clocksource tsc
[ 1.428671] bpf_testmod: loading out-of-tree module taints kernel.
[ 1.430260] bpf_testmod: module verification failed: signature and/or required key missing - tainting kernel
#252 tc_opts_after:OK
#253 tc_opts_append:OK
#254 tc_opts_basic:OK
#255 tc_opts_before:OK
#256 tc_opts_chain_classic:OK
#257 tc_opts_chain_mixed:OK
#258 tc_opts_delete_empty:OK
#259 tc_opts_demixed:OK
#260 tc_opts_detach:OK
#261 tc_opts_detach_after:OK
#262 tc_opts_detach_before:OK
#263 tc_opts_dev_cleanup:OK
#264 tc_opts_invalid:OK
#265 tc_opts_max:OK
#266 tc_opts_mixed:OK
#267 tc_opts_prepend:OK
#268 tc_opts_query:OK
#269 tc_opts_query_attach:OK <--- (new test)
#270 tc_opts_replace:OK
#271 tc_opts_revision:OK
Summary: 20/0 PASSED, 0 SKIPPED, 0 FAILED
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/r/20231006220655.1653-6-daniel@iogearbox.net
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
oder-chiou pushed a commit to oder-chiou/linux-soundwire that referenced this pull request May 5, 2026
Add several new tcx test cases to improve test coverage. This also includes
a few new tests with ingress instead of clsact qdisc, to cover the fix from
commit dc644b5 ("tcx: Fix splat in ingress_destroy upon tcx_entry_free").
# ./test_progs -t tc
[...]
thesofproject#234 tc_links_after:OK
thesofproject#235 tc_links_append:OK
thesofproject#236 tc_links_basic:OK
thesofproject#237 tc_links_before:OK
thesofproject#238 tc_links_chain_classic:OK
thesofproject#239 tc_links_chain_mixed:OK
thesofproject#240 tc_links_dev_cleanup:OK
thesofproject#241 tc_links_dev_mixed:OK
thesofproject#242 tc_links_ingress:OK
thesofproject#243 tc_links_invalid:OK
thesofproject#244 tc_links_prepend:OK
thesofproject#245 tc_links_replace:OK
thesofproject#246 tc_links_revision:OK
thesofproject#247 tc_opts_after:OK
thesofproject#248 tc_opts_append:OK
thesofproject#249 tc_opts_basic:OK
thesofproject#250 tc_opts_before:OK
thesofproject#251 tc_opts_chain_classic:OK
thesofproject#252 tc_opts_chain_mixed:OK
thesofproject#253 tc_opts_delete_empty:OK
thesofproject#254 tc_opts_demixed:OK
thesofproject#255 tc_opts_detach:OK
thesofproject#256 tc_opts_detach_after:OK
thesofproject#257 tc_opts_detach_before:OK
thesofproject#258 tc_opts_dev_cleanup:OK
thesofproject#259 tc_opts_invalid:OK
thesofproject#260 tc_opts_mixed:OK
thesofproject#261 tc_opts_prepend:OK
thesofproject#262 tc_opts_replace:OK
thesofproject#263 tc_opts_revision:OK
[...]
Summary: 44/38 PASSED, 0 SKIPPED, 0 FAILED
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/r/8699efc284b75ccdc51ddf7062fa2370330dc6c0.1692029283.git.daniel@iogearbox.net
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
oder-chiou pushed a commit to oder-chiou/linux-soundwire that referenced this pull request May 5, 2026
Add several new test cases which assert corner cases on the mprog query
mechanism, for example, around passing in a too small or a larger array
than the current count.
./test_progs -t tc_opts
thesofproject#252 tc_opts_after:OK
thesofproject#253 tc_opts_append:OK
thesofproject#254 tc_opts_basic:OK
thesofproject#255 tc_opts_before:OK
thesofproject#256 tc_opts_chain_classic:OK
thesofproject#257 tc_opts_chain_mixed:OK
thesofproject#258 tc_opts_delete_empty:OK
thesofproject#259 tc_opts_demixed:OK
thesofproject#260 tc_opts_detach:OK
thesofproject#261 tc_opts_detach_after:OK
thesofproject#262 tc_opts_detach_before:OK
thesofproject#263 tc_opts_dev_cleanup:OK
thesofproject#264 tc_opts_invalid:OK
thesofproject#265 tc_opts_max:OK
thesofproject#266 tc_opts_mixed:OK
thesofproject#267 tc_opts_prepend:OK
thesofproject#268 tc_opts_query:OK
thesofproject#269 tc_opts_query_attach:OK
thesofproject#270 tc_opts_replace:OK
thesofproject#271 tc_opts_revision:OK
Summary: 20/0 PASSED, 0 SKIPPED, 0 FAILED
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Reviewed-by: Alan Maguire <alan.maguire@oracle.com>
Link: https://lore.kernel.org/bpf/20231017081728.24769-1-daniel@iogearbox.net
oder-chiou pushed a commit to oder-chiou/linux-soundwire that referenced this pull request May 5, 2026
Add a bigger batch of test coverage to assert correct operation of
netkit devices and their BPF program management:
# ./test_progs -t tc_netkit
[...]
[ 1.166267] bpf_testmod: loading out-of-tree module taints kernel.
[ 1.166831] bpf_testmod: module verification failed: signature and/or required key missing - tainting kernel
[ 1.270957] tsc: Refined TSC clocksource calibration: 3407.988 MHz
[ 1.272579] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x311fc932722, max_idle_ns: 440795381586 ns
[ 1.275336] clocksource: Switched to clocksource tsc
thesofproject#257 tc_netkit_basic:OK
thesofproject#258 tc_netkit_device:OK
thesofproject#259 tc_netkit_multi_links:OK
thesofproject#260 tc_netkit_multi_opts:OK
thesofproject#261 tc_netkit_neigh_links:OK
Summary: 5/0 PASSED, 0 SKIPPED, 0 FAILED
[...]
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Martin KaFai Lau <martin.lau@kernel.org>
Link: https://lore.kernel.org/r/20231024214904.29825-8-daniel@iogearbox.net
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@lgirdwood@plbossart@ranj063@lrgirdwo