ASoC: wm8994: Skip setting of the WM8994_MICBIAS register for WM1811
Subsystems (4)
Sasha Levin
maintainerPATCH 5/9 s390/init: add missing __init annotations
In reply to Sasha LevinFrom: Ilya Leoshkevich <[email protected]>
[ Upstream commit fcb2b70cdb194157678fb1a75f9ff499aeba3d2a ]
Add __init to reserve_memory_end, reserve_oldmem and remove_oldmem. Sometimes these functions are not inlined, and then the build complains about section mismatch.
--- arch/s390/kernel/setup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/s390/kernel/setup.c +3 -3
@@ -537,7 +537,7 @@ static struct notifier_block kdump_mem_nb = {/* * Make sure that the area behind memory_end is protected */ -static void reserve_memory_end (void ) +static void __init reserve_memory_end (void ) {#ifdef CONFIG_CRASH_DUMP if (ipl_info.type == IPL_TYPE_FCP_DUMP &&
@@ -555,7 +555,7 @@ static void reserve_memory_end(void)/* * Make sure that oldmem, where the dump is stored, is protected */ -static void reserve_oldmem (void ) +static void __init reserve_oldmem (void ) {#ifdef CONFIG_CRASH_DUMP if (OLDMEM_BASE )
@@ -567,7 +567,7 @@ static void reserve_oldmem(void)/* * Make sure that oldmem, where the dump is stored, is protected */ -static void remove_oldmem (void ) +static void __init remove_oldmem (void ) {#ifdef CONFIG_CRASH_DUMP if (OLDMEM_BASE )
Signature · 1 line
2.25.1
Sasha Levin
maintainerPATCH 7/9 drm/amdkfd: fix a memory leak issue
In reply to Sasha LevinFrom: Dennis Li <[email protected]>
[ Upstream commit 087d764159996ae378b08c0fdd557537adfd6899 ]
In the resume stage of GPU recovery, start_cpsch will call pm_init which set pm->allocated as false, cause the next pm_release_ib has no chance to release ib memory.
Add pm_release_ib in stop_cpsch which will be called in the suspend stage of GPU recovery.
--- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +2 -0
@@ -1101,6 +1101,8 @@ static int stop_cpsch(struct device_queue_manager *dqm)unmap_queues_cpsch (dqm,KFD_UNMAP_QUEUES_FILTER_ALL_QUEUES ,0 );dqm_unlock (dqm); +pm_release_ib (&dqm->packets); +kfd_gtt_sa_free (dqm->dev, dqm->fence_mem);pm_uninit (&dqm->packets);
Signature · 6 lines
2.25.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Sasha Levin
maintainerPATCH 4/9 RISC-V: Take text_mutex in ftrace_init_nop()
In reply to Sasha LevinFrom: Palmer Dabbelt <[email protected]>
[ Upstream commit 66d18dbda8469a944dfec6c49d26d5946efba218 ]
Without this we get lockdep failures. They're spurious failures as SMP isn't up when ftrace_init_nop() is called. As far as I can tell the easiest fix is to just take the lock, which also seems like the safest fix.
--- arch/riscv/include/asm/ftrace.h | 7 +++++++ arch/riscv/kernel/ftrace.c | 19 +++++++++++++++++++ 2 files changed, 26 insertions(+)
arch/riscv/include/asm/ftrace.h +7 -0
@@ -63,4 +63,11 @@ do { \* Let auipc+jalr be the basic *mcount unit*, so we make it 8 bytes here. */ #define MCOUNT_INSN_SIZE 8 + +#ifndef __ASSEMBLY__ +struct dyn_ftrace ; +int ftrace_init_nop (struct module *mod,struct dyn_ftrace *rec); +#define ftrace_init_nop ftrace_init_nop +#endif +#endif
arch/riscv/kernel/ftrace.c +19 -0
@@ -88,6 +88,25 @@ int ftrace_make_nop(struct module *mod, struct dyn_ftrace *rec,return __ftrace_modify_call (rec->ip, addr, false); } + +/* +* This is called early on, and isn't wrapped by +* ftrace_arch_code_modify_{prepare,post_process}() and therefor doesn't hold +* text_mutex, which triggers a lockdep failure. SMP isn't running so we could +* just directly poke the text, but it's simpler to just take the lock +* ourselves. +*/ +int ftrace_init_nop (struct module *mod,struct dyn_ftrace *rec) +{ +int out; + +ftrace_arch_code_modify_prepare (); + out =ftrace_make_nop (mod, rec,MCOUNT_ADDR ); +ftrace_arch_code_modify_post_process (); + +return out; +} +int ftrace_update_ftrace_func (ftrace_func_t func) { int ret = __ftrace_modify_call((unsigned long)&ftrace_call,
Signature · 1 line
2.25.1
Sasha Levin
maintainerPATCH 8/9 i2c: core: Call i2c_acpi_install_space_handler() before i2c_acpi_register_devices()
In reply to Sasha LevinFrom: Hans de Goede <[email protected]>
[ Upstream commit 21653a4181ff292480599dad996a2b759ccf050f ]
Some ACPI i2c-devices _STA method (which is used to detect if the device is present) use autodetection code which probes which device is present over i2c. This requires the I2C ACPI OpRegion handler to be registered before we enumerate i2c-clients under the i2c-adapter.
This fixes the i2c touchpad on the Lenovo ThinkBook 14-IIL and ThinkBook 15 IIL not getting an i2c-client instantiated and thus not working.
--- drivers/i2c/i2c-core-base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/i2c-core-base.c +1 -1
@@ -1292,8 +1292,8 @@ static int i2c_register_adapter(struct i2c_adapter *adap)/* create pre-declared device nodes */ of_i2c_register_devices (adap); -i2c_acpi_register_devices (adap);i2c_acpi_install_space_handler (adap); +i2c_acpi_register_devices (adap);if (adap->nr < __i2c_first_dynamic_bus_num)i2c_scan_static_board_info (adap);
Signature · 1 line
2.25.1
Sasha Levin
maintainerPATCH 6/9 lockdep: fix order in trace_hardirqs_off_caller()
In reply to Sasha LevinFrom: Sven Schnelle <[email protected]>
[ Upstream commit 73ac74c7d489756d2313219a108809921dbfaea1 ]
Switch order so that locking state is consistent even if the IRQ tracer calls into lockdep again.
--- kernel/trace/trace_preemptirq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/trace/trace_preemptirq.c +2 -2
@@ -59,14 +59,14 @@ EXPORT_SYMBOL(trace_hardirqs_on_caller); __visible void trace_hardirqs_off_caller(unsigned long caller_addr) { +lockdep_hardirqs_off (CALLER_ADDR0 ); +if (!this_cpu_read (tracing_irq_cpu)) {this_cpu_write (tracing_irq_cpu,1 );tracer_hardirqs_off (CALLER_ADDR0 , caller_addr);if (!in_nmi ())trace_irq_disable_rcuidle (CALLER_ADDR0 , caller_addr); } - -lockdep_hardirqs_off (CALLER_ADDR0 ); }EXPORT_SYMBOL (trace_hardirqs_off_caller);#endif /* CONFIG_TRACE_IRQFLAGS */
Signature · 1 line
2.25.1
Sasha Levin
maintainerPATCH 9/9 objtool: Fix noreturn detection for ignored functions
In reply to Sasha LevinFrom: Josh Poimboeuf <[email protected]>
[ Upstream commit db6c6a0df840e3f52c84cc302cc1a08ba11a4416 ]
When a function is annotated with STACK_FRAME_NON_STANDARD, objtool doesn't validate its code paths. It also skips sibling call detection within the function.
But sibling call detection is actually needed for the case where the ignored function doesn't have any return instructions. Otherwise objtool naively marks the function as implicit static noreturn, which affects the reachability of its callers, resulting in "unreachable instruction" warnings.
Fix it by just enabling sibling call detection for ignored functions. The 'insn->ignore' check in add_jump_destinations() is no longer needed after
e6da9567959e ("objtool: Don't use ignore flag for fake jumps").
Fixes the following warning:
arch/x86/kvm/vmx/vmx.o: warning: objtool: vmx_handle_exit_irqoff()+0x142: unreachable instruction
which triggers on an allmodconfig with CONFIG_GCOV_KERNEL unset.
--- tools/objtool/check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/objtool/check.c +1 -1
@@ -503,7 +503,7 @@ static int add_jump_destinations(struct objtool_file *file) insn->type != INSN_JUMP_UNCONDITIONAL)continue ; -if (insn->ignore || insn->offset ==FAKE_JUMP_OFFSET ) +if (insn->offset ==FAKE_JUMP_OFFSET )continue ; rela = find_rela_by_dest_range(insn->sec, insn->offset,
Signature · 1 line
2.25.1
Sasha Levin
maintainerPATCH 1/9 ASoC: wm8994: Skip setting of the WM8994_MICBIAS register for WM1811
From: Sylwester Nawrocki <[email protected]>
[ Upstream commit 811c5494436789e7149487c06e0602b507ce274b ]
The WM8994_MICBIAS register is not available in the WM1811 CODEC so skip initialization of that register for that device.
This suppresses an error during boot:
"wm8994-codec: ASoC: error at snd_soc_component_update_bits on wm8994-codec"
--- sound/soc/codecs/wm8994.c | 2 ++ sound/soc/codecs/wm_hubs.c | 3 +++ sound/soc/codecs/wm_hubs.h | 1 + 3 files changed, 6 insertions(+)
sound/soc/codecs/wm8994.c +2 -0
@@ -4051,11 +4051,13 @@ static int wm8994_component_probe(struct snd_soc_component *component) wm8994->hubs.dcs_readback_mode =2 ;break ; } + wm8994->hubs.micd_scthr = true;break ;case WM8958 : wm8994->hubs.dcs_readback_mode =1 ; wm8994->hubs.hp_startup_mode =1 ; + wm8994->hubs.micd_scthr = true;switch (control->revision) {case 0 :
sound/soc/codecs/wm_hubs.c +3 -0
@@ -1227,6 +1227,9 @@ int wm_hubs_handle_analogue_pdata(struct snd_soc_component *component,snd_soc_component_update_bits (component,WM8993_ADDITIONAL_CONTROL ,WM8993_LINEOUT2_FB ,WM8993_LINEOUT2_FB ); +if (!hubs->micd_scthr) +return 0 ; + snd_soc_component_update_bits(component, WM8993_MICBIAS, WM8993_JD_SCTHR_MASK | WM8993_JD_THR_MASK | WM8993_MICB1_LVL | WM8993_MICB2_LVL,
sound/soc/codecs/wm_hubs.h +1 -0
@@ -31,6 +31,7 @@ struct wm_hubs_data {int hp_startup_mode;int series_startup;int no_series_update; +bool micd_scthr;bool no_cache_dac_hp_direct;struct list_head dcs_cache;
Signature · 1 line
2.25.1
Sasha Levin
maintainerPATCH 2/9 ASoC: wm8994: Ensure the device is resumed in wm89xx_mic_detect functions
From: Sylwester Nawrocki <[email protected]>
[ Upstream commit f5a2cda4f1db89776b64c4f0f2c2ac609527ac70 ]
When the wm8958_mic_detect, wm8994_mic_detect functions get called from the machine driver, e.g. from the card's late_probe() callback, the CODEC device may be PM runtime suspended and any regmap writes have no effect. Add PM runtime calls to these functions to ensure the device registers are updated as expected.
This suppresses an error during boot
"wm8994-codec: ASoC: error at snd_soc_component_update_bits on wm8994-codec" caused by the regmap access error due to the cache_only flag being set.
--- sound/soc/codecs/wm8994.c | 8 ++++++++ 1 file changed, 8 insertions(+)
sound/soc/codecs/wm8994.c +8 -0
@@ -3376,6 +3376,8 @@ int wm8994_mic_detect(struct snd_soc_component *component, struct snd_soc_jack *return -EINVAL ; } +pm_runtime_get_sync (component->dev); +switch (micbias) {case 1 : micdet = &wm8994->micdet[0 ];
@@ -3423,6 +3425,8 @@ int wm8994_mic_detect(struct snd_soc_component *component, struct snd_soc_jack *snd_soc_dapm_sync (dapm); +pm_runtime_put (component->dev); +return 0 ; }EXPORT_SYMBOL_GPL (wm8994_mic_detect);
@@ -3790,6 +3794,8 @@ int wm8958_mic_detect(struct snd_soc_component *component, struct snd_soc_jack *return -EINVAL ; } +pm_runtime_get_sync (component->dev); +if (jack) {snd_soc_dapm_force_enable_pin (dapm,"CLK_SYS" );snd_soc_dapm_sync (dapm);
@@ -3858,6 +3864,8 @@ int wm8958_mic_detect(struct snd_soc_component *component, struct snd_soc_jack *snd_soc_dapm_sync (dapm); } +pm_runtime_put (component->dev); +return 0 ; }EXPORT_SYMBOL_GPL (wm8958_mic_detect);
Signature · 1 line
2.25.1
Sasha Levin
maintainerPATCH 3/9 ASoC: Intel: bytcr_rt5640: Add quirk for MPMAN Converter9 2-in-1
In reply to Sasha LevinFrom: Hans de Goede <[email protected]>
[ Upstream commit 6a0137101f47301fff2da6ba4b9048383d569909 ]
The MPMAN Converter9 2-in-1 almost fully works with out default settings. The only problem is that it has only 1 speaker so any sounds only playing on the right channel get lost.
Add a quirk for this model using the default settings + MONO_SPEAKER.
--- sound/soc/intel/boards/bytcr_rt5640.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
sound/soc/intel/boards/bytcr_rt5640.c +10 -0
@@ -588,6 +588,16 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {BYT_RT5640_SSP0_AIF1 | BYT_RT5640_MCLK_EN), }, + { /* MPMAN Converter 9, similar hw as the I.T.Works TW891 2-in-1 */ + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"MPMAN" ), + DMI_MATCH(DMI_PRODUCT_NAME, "Converter9"), + }, + .driver_data = (void *)(BYTCR_INPUT_DEFAULTS | +BYT_RT5640_MONO_SPEAKER | +BYT_RT5640_SSP0_AIF1 | + BYT_RT5640_MCLK_EN), + }, {/* MPMAN MPWIN895CL */ .matches = {
Signature · 1 line
2.25.1