Skip to content

ASoC: SOF: Move config switches to preprocessor ifs - #242

Closed
cujomalainey wants to merge 1 commit into
thesofproject:topic/sof-devfrom
cujomalainey:topic/sof-dev
Closed

ASoC: SOF: Move config switches to preprocessor ifs#242
cujomalainey wants to merge 1 commit into
thesofproject:topic/sof-devfrom
cujomalainey:topic/sof-dev

Conversation

@cujomalainey

Copy link
Copy Markdown

Hiding configs in ifs reduces readability into what is a config and what
is code, this is easier to identify

Hiding configs in ifs reduces readability into what is a config and what
is code, this is easier to identify
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
@plbossart

Copy link
Copy Markdown
Member

@cujomalainey this is standard practice for configs that are tristate, and it's how it's been coded for the sklylake driver.
We could use #if IS_ENABLED() if this makes you happy but I don't think you proposal is acceptable as is?

@cujomalainey

Copy link
Copy Markdown
Author

@plbossart I was unaware of the convention, did some research on the topic. TIL.

cujomalainey pushed a commit to cujomalainey/linux that referenced this pull request Nov 19, 2019
commit 33cd712 upstream
Currently the mailbox framework sets txdone_method to TXDONE_BY_POLL if
the controller sets txdone_by_poll. However some clients can have a
mechanism to do TXDONE_BY_ACK which they can specify by knows_txdone.
However, we endup setting both TXDONE_BY_POLL and TXDONE_BY_ACK in that
case. In such scenario, we may end up with below warnings as the tx
ticker is run both by mailbox framework and the client.
WARNING: CPU: 1 PID: 0 at kernel/time/hrtimer.c:805 hrtimer_forward+0x88/0xd8
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.12.0-rc5 thesofproject#242
Hardware name: ARM LTD ARM Juno Development Platform
task: ffff8009768ca700 task.stack: ffff8009768f8000
PC is at hrtimer_forward+0x88/0xd8
LR is at txdone_hrtimer+0xd4/0xf8
Call trace:
hrtimer_forward+0x88/0xd8
__hrtimer_run_queues+0xe4/0x158
hrtimer_interrupt+0xa4/0x220
arch_timer_handler_phys+0x30/0x40
handle_percpu_devid_irq+0x78/0x130
generic_handle_irq+0x24/0x38
__handle_domain_irq+0x5c/0xb8
gic_handle_irq+0x54/0xa8
This patch fixes the issue by resetting TXDONE_BY_POLL if client has set
knows_txdone.
Cc: Alexey Klimov <alexey.klimov@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
oder-chiou pushed a commit to oder-chiou/linux-soundwire that referenced this pull request May 5, 2026
Add a big batch of test coverage to assert all aspects of the tcx opts
attach, detach and query API:
# ./vmtest.sh -- ./test_progs -t tc_opts
[...]
thesofproject#238 tc_opts_after:OK
thesofproject#239 tc_opts_append:OK
thesofproject#240 tc_opts_basic:OK
thesofproject#241 tc_opts_before:OK
thesofproject#242 tc_opts_chain_classic:OK
thesofproject#243 tc_opts_demixed:OK
thesofproject#244 tc_opts_detach:OK
thesofproject#245 tc_opts_detach_after:OK
thesofproject#246 tc_opts_detach_before:OK
thesofproject#247 tc_opts_dev_cleanup:OK
thesofproject#248 tc_opts_invalid:OK
thesofproject#249 tc_opts_mixed:OK
thesofproject#250 tc_opts_prepend:OK
thesofproject#251 tc_opts_replace:OK
thesofproject#252 tc_opts_revision:OK
Summary: 15/0 PASSED, 0 SKIPPED, 0 FAILED
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/r/20230719140858.13224-8-daniel@iogearbox.net
Signed-off-by: Alexei Starovoitov <ast@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>
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.

2 participants

@cujomalainey@plbossart