Message ID | 20230111193957.27650-1-ansuelsmth@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp3504773wrt; Wed, 11 Jan 2023 11:46:08 -0800 (PST) X-Google-Smtp-Source: AMrXdXvw6H3sPxNcOD1JXe7renNa8giVhHkkJqfZmpd0dyWTRdnszcO502Ue4k8DiiC4Iz+Y9RUS X-Received: by 2002:a17:902:aa96:b0:18e:8223:6447 with SMTP id d22-20020a170902aa9600b0018e82236447mr71052541plr.22.1673466368342; Wed, 11 Jan 2023 11:46:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673466368; cv=none; d=google.com; s=arc-20160816; b=plC+8tmPsWoNXO4ZxYH29OAeHGUFNkp7h3RSlGCSD3zMdQURK4jjz9U3BwRaXd2Q61 TKe77JB1HoS8PhnDDNfNVSDDuooFRrdcuJu4q8PbO3xPEvQpscphz+IbrspUGLxd9Ytj M7ESbG7NqJXzkeEHqi6Sk6rUolUbHLrHecnjtzrK3Zt0zEqLCM5un8/CZghmwNhrizFu NUfrn4T5yx+liC/h1fs0C4hF5y1bmnSm6th2NwebBXCI1f/ZxCcbKQxH0D9ftci7EYEV kBvHLx5DZx6LQqyRM47iWtgGfsmHnoI/meq9iL/cQHKA7JelfCqxVn4HT2D+Klr1e2/M 2how== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=zqjyIjqa21DKlLc9aiLyfHVjAwLQSQqAdSY+ejwIkis=; b=CUKCp4tjdsnRY8pahYfv6exVxvM5ODiz340fefiHamwqy6nElrdfhqkvRtLkoGTJkg PrKsSTkl5uHS8L6MknWaAWlAEMBOAHkKD57aPFptNTCYORVrW2nqYbgDZNCxVOZCwoNr /7jJL+JNHxu7qSazvm2H5MNkdH7ydF3BNPCZKWWpgJkblz9RIUQOEyvWyGtX6dHFcRlt wi+rTxSC9KJmd/y4AZJU3mhEcY6W9JRkayLdlMVaF01tC5BWCHWWD972io25bDieCgH7 XuxaDvnViVVmt4/9e8dIm6aAAws8/5aBzKsAaDMM8TzOCqD6u4J6tlKIBlgYnq+SoR34 daZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cyZj3gnr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q10-20020a170902daca00b00186aad06b52si16383632plx.290.2023.01.11.11.45.55; Wed, 11 Jan 2023 11:46:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cyZj3gnr; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235109AbjAKTko (ORCPT <rfc822;syz17693488234@gmail.com> + 99 others); Wed, 11 Jan 2023 14:40:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44562 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234693AbjAKTkK (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 11 Jan 2023 14:40:10 -0500 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4011EE0A8; Wed, 11 Jan 2023 11:40:09 -0800 (PST) Received: by mail-wm1-x32e.google.com with SMTP id g19-20020a05600c4ed300b003d9eb1dbc0aso10550390wmq.3; Wed, 11 Jan 2023 11:40:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=zqjyIjqa21DKlLc9aiLyfHVjAwLQSQqAdSY+ejwIkis=; b=cyZj3gnrvmF8CnpQxy9/fPUf4R722i8raRiSVDtidZIzrJ6zAHa8P9TQTyQvB6Qp9i Mzq19yoP8G+5PhJl9UfKr6Hgy5oPu1chk6+ZLnkyoeCpbNycrTMAOvCCAobNvLUY38en YNTuuYKbGI4J2xwwVchiD2que80nEawIqs8NLOenb+ndIN93950B2EXXec1DdPVus4pb FXYbQHghxWEmsL053HHODj4vm+by7AZLaxhKz1mm/Kgy39KaECIMekfmqF7Y9p3DTdr+ ngDSSQPDMT7jk163/nhXbFqBT7eDNhy7s9fF0jF7wJ6kjD6+V/QJPgPmaIYxRW0oetor n5Gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zqjyIjqa21DKlLc9aiLyfHVjAwLQSQqAdSY+ejwIkis=; b=sbWIAifyNADCTxjSvAFU8NRo5DORgqUfRHKirJgION4BGSEy2V6vjVZheW0/nmMfx2 JBT1vdZH3VIDrNrv3PVZim+WYWPbRzALrWUWzlq/KLKKW/RapP4lUcRAZWjrcbdx5S+t /RIl7liPy2/vhWAR6mLuDG82v42UO5vgrc2ASjyTWhGE8r7KgC+QSstlK9aKAE2L7zHG HbuiYLm5a00RHvwzNFlEx9E2kN3HKkmKmIf056inZ1+obyEt5xzCYcyAHD9V8lKnhi3f OI1PrS3NNq/KIHGZkAjcwgSK7ZJrQ1ZK8WB/69+n7BGyNtAAUHfHxDm6NmNbrDW1h97p ooVg== X-Gm-Message-State: AFqh2krhanEd6xYDjQa7gyRnC+uLAFhlbDFIEM5RfMOFpcW3aVHm9hBT ESulV5UgKmM4wR7LXXSTykY= X-Received: by 2002:a05:600c:42d5:b0:3d6:e790:c9a0 with SMTP id j21-20020a05600c42d500b003d6e790c9a0mr63567225wme.10.1673466007570; Wed, 11 Jan 2023 11:40:07 -0800 (PST) Received: from localhost.localdomain (93-34-92-88.ip49.fastwebnet.it. [93.34.92.88]) by smtp.googlemail.com with ESMTPSA id p11-20020a05600c358b00b003cfa3a12660sm7815451wmq.1.2023.01.11.11.40.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Jan 2023 11:40:07 -0800 (PST) From: Christian Marangi <ansuelsmth@gmail.com> To: Michael Turquette <mturquette@baylibre.com>, Stephen Boyd <sboyd@kernel.org>, linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Christian Marangi <ansuelsmth@gmail.com> Subject: [RESEND PATCH] clk: Warn and add workaround on misuse of .parent_data with .name only Date: Wed, 11 Jan 2023 20:39:57 +0100 Message-Id: <20230111193957.27650-1-ansuelsmth@gmail.com> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754756670406305829?= X-GMAIL-MSGID: =?utf-8?q?1754756670406305829?= |
Series |
[RESEND] clk: Warn and add workaround on misuse of .parent_data with .name only
|
|
Commit Message
Christian Marangi
Jan. 11, 2023, 7:39 p.m. UTC
By a simple mistake in a .parent_names to .parent_data conversion it was
found that clk core assume fw_name is always provided with a parent_data
struct for each parent and never fallback to .name to get parent name even
if declared.
This is caused by clk_core_get that only checks for parent .fw_name and
doesn't handle .name.
While it's sane to request the dev to correctly do the conversion and
add both .fw_name and .name in a parent_data struct, it's not sane to
silently drop parents without a warning.
Fix this in 2 ways. Add a kernel warning when a wrong implementation is
used and copy .name in .fw_name in parent map populate function to
handle clk problems and malfunctions.
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
drivers/clk/clk.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
Comments
Greeting, FYI, we noticed WARNING:at_drivers/clk/clk.c:#clk_core_populate_parent_map due to commit (built with gcc-11): commit: cc3ff324b29f06b124b57f745fcc4ec624c87d16 ("[RESEND PATCH] clk: Warn and add workaround on misuse of .parent_data with .name only") url: https://github.com/intel-lab-lkp/linux/commits/Christian-Marangi/clk-Warn-and-add-workaround-on-misuse-of-parent_data-with-name-only/20230112-034048 base: https://git.kernel.org/cgit/linux/kernel/git/clk/linux.git clk-next patch link: https://lore.kernel.org/all/20230111193957.27650-1-ansuelsmth@gmail.com/ patch subject: [RESEND PATCH] clk: Warn and add workaround on misuse of .parent_data with .name only in testcase: kunit version: with following parameters: group: group-02 on test machine: 8 threads 1 sockets Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz (Haswell) with 16G memory caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace): If you fix the issue, kindly add following tag | Reported-by: kernel test robot <oliver.sang@intel.com> | Link: https://lore.kernel.org/oe-lkp/202301280943.6a383af9-oliver.sang@intel.com [ 81.119809][ T621] ------------[ cut here ]------------ [ 81.130925][ T621] Empty .fw_name with .name in test_gate's .parent_data. Using .name for .fw_name declaration. [ 81.141019][ T621] WARNING: CPU: 7 PID: 621 at drivers/clk/clk.c:4057 clk_core_populate_parent_map+0x405/0x610 [ 81.152038][ T621] Modules linked in: clk_gate_test intel_rapl_msr intel_rapl_common btrfs blake2b_generic xor raid6_pq libcrc32c x86_pkg_temp_thermal intel_powerclamp i915 coretemp sd_mod t10_pi kvm_intel crc64_rocksoft_generic crc64_rocksoft crc64 intel_gtt sg kvm drm_display_helper ipmi_devintf irqbypass ipmi_msghandler crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel sha512_ssse3 drm_buddy ttm ahci rapl mei_wdt libahci drm_kms_helper intel_cstate syscopyarea mei_me sysfillrect libata intel_uncore video mei sysimgblt wmi drm fuse ip_tables [ 81.200885][ T621] CPU: 7 PID: 621 Comm: kunit_try_catch Tainted: G N 6.2.0-rc1-00001-gcc3ff324b29f #1 [ 81.211561][ T621] Hardware name: Dell Inc. OptiPlex 9020/0DNKMN, BIOS A05 12/05/2013 [ 81.219409][ T621] RIP: clk_core_populate_parent_map+0x405/0x610 [ 81.226916][ T621] Code: 3c 24 00 0f 84 e8 fd ff ff 48 8b 44 24 20 80 38 00 0f 85 a3 01 00 00 48 8b 04 24 48 c7 c7 20 78 eb 83 48 8b 30 e8 8b 77 1d 01 <0f> 0b 4c 89 e0 48 c1 e8 03 42 80 3c 38 00 0f 85 6f 01 00 00 49 8b All code ======== 0: 3c 24 cmp $0x24,%al 2: 00 0f add %cl,(%rdi) 4: 84 e8 test %ch,%al 6: fd std 7: ff (bad) 8: ff 48 8b decl -0x75(%rax) b: 44 24 20 rex.R and $0x20,%al e: 80 38 00 cmpb $0x0,(%rax) 11: 0f 85 a3 01 00 00 jne 0x1ba 17: 48 8b 04 24 mov (%rsp),%rax 1b: 48 c7 c7 20 78 eb 83 mov $0xffffffff83eb7820,%rdi 22: 48 8b 30 mov (%rax),%rsi 25: e8 8b 77 1d 01 callq 0x11d77b5 2a:* 0f 0b ud2 <-- trapping instruction 2c: 4c 89 e0 mov %r12,%rax 2f: 48 c1 e8 03 shr $0x3,%rax 33: 42 80 3c 38 00 cmpb $0x0,(%rax,%r15,1) 38: 0f 85 6f 01 00 00 jne 0x1ad 3e: 49 rex.WB 3f: 8b .byte 0x8b Code starting with the faulting instruction =========================================== 0: 0f 0b ud2 2: 4c 89 e0 mov %r12,%rax 5: 48 c1 e8 03 shr $0x3,%rax 9: 42 80 3c 38 00 cmpb $0x0,(%rax,%r15,1) e: 0f 85 6f 01 00 00 jne 0x183 14: 49 rex.WB 15: 8b .byte 0x8b [ 81.246189][ T621] RSP: 0018:ffffc90000b17bb8 EFLAGS: 00010282 [ 81.252058][ T621] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 [ 81.259819][ T621] RDX: 0000000000000004 RSI: 0000000000000008 RDI: fffff52000162f69 [ 81.267588][ T621] RBP: 0000000000000000 R08: 0000000000000001 R09: ffffc90000b179ef [ 81.275349][ T621] R10: fffff52000162f3d R11: 0000000000000001 R12: ffffc90000b17e60 [ 81.283111][ T621] R13: 0000000000000000 R14: ffff88841e5f9180 R15: dffffc0000000000 [ 81.290858][ T621] FS: 0000000000000000(0000) GS:ffff8883b8980000(0000) knlGS:0000000000000000 [ 81.299564][ T621] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 81.305953][ T621] CR2: 00007fb2ba883550 CR3: 000000041ce14004 CR4: 00000000001706e0 [ 81.313714][ T621] DR0: ffffffff86045121 DR1: ffffffff86045122 DR2: ffffffff86045123 [ 81.321473][ T621] DR3: ffffffff86045123 DR6: 00000000ffff0ff0 DR7: 0000000000000600 [ 81.329231][ T621] Call Trace: [ 81.332363][ T621] <TASK> [ 81.335150][ T621] __clk_register (drivers/clk/clk.c:4150) [ 81.339656][ T621] clk_hw_register (include/linux/err.h:60 drivers/clk/clk.c:4242) [ 81.344063][ T621] __clk_hw_register_gate (drivers/clk/clk-gate.c:172) [ 81.349252][ T621] ? devm_clk_hw_release_gate (drivers/clk/clk-gate.c:134) [ 81.354612][ T621] ? update_curr (include/linux/cgroup.h:424 include/linux/cgroup.h:493 include/linux/cgroup.h:722 kernel/sched/fair.c:930) [ 81.359029][ T621] ? load_balance (kernel/sched/fair.c:11511) [ 81.363706][ T621] clk_gate_register_test_parent_data_legacy (drivers/clk/clk-gate_test.c:78 (discriminator 1)) clk_gate_test [ 81.371901][ T621] ? clk_gate_register_test_parent_hw (drivers/clk/clk-gate_test.c:68) clk_gate_test [ 81.379494][ T621] ? io_schedule_timeout (kernel/sched/core.c:6437) [ 81.384601][ T621] ? set_cpus_allowed_ptr (kernel/sched/core.c:2971) [ 81.389609][ T621] ? migrate_enable (kernel/sched/core.c:2971) [ 81.394274][ T621] kunit_try_run_case (lib/kunit/test.c:397) [ 81.399121][ T621] ? kunit_catch_run_case (lib/kunit/test.c:382) [ 81.404138][ T621] kunit_generic_run_threadfn_adapter (lib/kunit/try-catch.c:30) [ 81.410187][ T621] ? kunit_try_catch_throw (lib/kunit/try-catch.c:25) [ 81.415277][ T621] kthread (kernel/kthread.c:376) [ 81.419182][ T621] ? kthread_complete_and_exit (kernel/kthread.c:331) [ 81.424617][ T621] ret_from_fork (arch/x86/entry/entry_64.S:314) [ 81.428863][ T621] </TASK> [ 81.431732][ T621] ---[ end trace 0000000000000000 ]--- [ 81.437519][ T617] ok 4 clk_gate_register_test_parent_data_legacy [ 81.438007][ T617] ok 5 clk_gate_register_test_parent_hw [ 81.444626][ T623] gate bit exceeds LOWORD field [ 81.454990][ T617] ok 6 clk_gate_register_test_hiword_invalid [ 81.454995][ T617] # clk-gate-register-test: pass:6 fail:0 skip:0 total:6 [ 81.461124][ T617] # Totals: pass:6 fail:0 skip:0 total:6 [ 81.467942][ T617] ok 1 clk-gate-register-test [ 81.477887][ T617] KTAP version 1 [ 81.481605][ T617] # Subtest: clk-gate-test [ 81.481607][ T617] 1..3 [ 81.486715][ T617] ok 1 clk_gate_test_parent_rate [ 81.489938][ T625] clk_unregister: unregistering prepared clock: test_gate [ 81.501985][ T625] clk_unregister: unregistering prepared clock: test_parent [ 81.509082][ T617] ok 2 clk_gate_test_enable [ 81.509592][ T617] ok 3 clk_gate_test_disable [ 81.514273][ T617] # clk-gate-test: pass:3 fail:0 skip:0 total:3 [ 81.519038][ T617] # Totals: pass:3 fail:0 skip:0 total:3 [ 81.525093][ T617] ok 2 clk-gate-test [ 81.534272][ T617] KTAP version 1 [ 81.537994][ T617] # Subtest: clk-gate-invert-test [ 81.537997][ T617] 1..2 [ 81.543646][ T627] clk_unregister: unregistering prepared clock: test_gate [ 81.553473][ T627] clk_unregister: unregistering prepared clock: test_parent [ 81.560568][ T617] ok 1 clk_gate_test_invert_enable [ 81.561066][ T617] ok 2 clk_gate_test_invert_disable [ 81.566341][ T617] # clk-gate-invert-test: pass:2 fail:0 skip:0 total:2 [ 81.571695][ T617] # Totals: pass:2 fail:0 skip:0 total:2 [ 81.578336][ T617] ok 3 clk-gate-invert-test [ 81.588104][ T617] KTAP version 1 [ 81.591826][ T617] # Subtest: clk-gate-hiword-test [ 81.591829][ T617] 1..2 [ 81.597377][ T629] clk_unregister: unregistering prepared clock: test_gate [ 81.607364][ T629] clk_unregister: unregistering prepared clock: test_parent [ 81.614472][ T617] ok 1 clk_gate_test_hiword_enable [ 81.614987][ T617] ok 2 clk_gate_test_hiword_disable [ 81.620270][ T617] # clk-gate-hiword-test: pass:2 fail:0 skip:0 total:2 [ 81.625629][ T617] # Totals: pass:2 fail:0 skip:0 total:2 [ 81.632270][ T617] ok 4 clk-gate-hiword-test [ 81.642073][ T617] KTAP version 1 [ 81.645796][ T617] # Subtest: clk-gate-is_enabled-test [ 81.645798][ T617] 1..4 [ 81.651734][ T617] ok 1 clk_gate_test_is_enabled [ 81.654866][ T617] ok 2 clk_gate_test_is_disabled [ 81.660199][ T617] ok 3 clk_gate_test_is_enabled_inverted [ 81.665624][ T617] ok 4 clk_gate_test_is_disabled_inverted [ 81.671423][ T617] # clk-gate-is_enabled-test: pass:4 fail:0 skip:0 total:4 [ 81.677294][ T617] # Totals: pass:4 fail:0 skip:0 total:4 [ 81.684286][ T617] ok 5 clk-gate-is_enabled-test [ 81.737822][ T641] KTAP version 1 [ 81.741540][ T641] # Subtest: clk-leaf-mux-set-rate-parent [ 81.741543][ T641] 1..1 [ 81.748253][ T641] ok 1 clk_leaf_mux_set_rate_parent_determine_rate [ 81.751119][ T641] ok 1 clk-leaf-mux-set-rate-parent [ 81.762775][ T641] KTAP version 1 [ 81.766498][ T641] # Subtest: clk-test [ 81.766502][ T641] 1..4 [ 81.770991][ T641] ok 1 clk_test_get_rate [ 81.774516][ T641] ok 2 clk_test_set_get_rate [ 81.779284][ T641] ok 3 clk_test_set_set_get_rate [ 81.784257][ T641] ok 4 clk_test_round_set_get_rate [ 81.789343][ T641] # clk-test: pass:4 fail:0 skip:0 total:4 [ 81.794613][ T641] # Totals: pass:4 fail:0 skip:0 total:4 [ 81.800234][ T641] ok 2 clk-test [ 81.808994][ T641] KTAP version 1 [ 81.812718][ T641] # Subtest: clk-multiple-parents-mux-test [ 81.812721][ T641] 1..3 [ 81.819246][ T641] ok 1 clk_test_multiple_parents_mux_get_parent [ 81.822643][ T641] ok 2 clk_test_multiple_parents_mux_has_parent [ 81.829698][ T641] ok 3 clk_test_multiple_parents_mux_set_range_set_parent_get_rate # SKIP This needs to be fixed in the core. [ 81.836074][ T641] # clk-multiple-parents-mux-test: pass:2 fail:0 skip:1 total:3 [ 81.847794][ T641] # Totals: pass:2 fail:0 skip:1 total:3 [ 81.855207][ T641] ok 3 clk-multiple-parents-mux-test [ 81.865764][ T641] KTAP version 1 [ 81.869487][ T641] # Subtest: clk-mux-notifier [ 81.869491][ T641] 1..1 [ 81.878469][ T641] ok 1 clk_mux_notifier_set_parent_test [ 81.881330][ T641] ok 4 clk-mux-notifier [ 81.891344][ T641] KTAP version 1 [ 81.895065][ T641] # Subtest: clk-orphan-transparent-multiple-parent-mux-test [ 81.895069][ T641] 1..9 [ 81.903098][ T641] ok 1 clk_test_orphan_transparent_multiple_parent_mux_get_parent To reproduce: git clone https://github.com/intel/lkp-tests.git cd lkp-tests sudo bin/lkp install job.yaml # job file is attached in this email bin/lkp split-job --compatible job.yaml # generate the yaml file for lkp run sudo bin/lkp run generated-yaml-file # if come across any failure that blocks the test, # please remove ~/.lkp and /lkp dir to run from a clean state.
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 57b83665e5c3..dccd4ea6f692 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -4015,10 +4015,21 @@ static int clk_core_populate_parent_map(struct clk_core *core, ret = clk_cpy_name(&parent->name, parent_names[i], true); } else if (parent_data) { + const char *parent_name; + parent->hw = parent_data[i].hw; parent->index = parent_data[i].index; + parent_name = parent_data[i].fw_name; + + if (!parent_name && parent_data[i].name) { + WARN(1, "Empty .fw_name with .name in %s's .parent_data. Using .name for .fw_name declaration.\n", + core->name); + parent_name = parent_data[i].name; + } + ret = clk_cpy_name(&parent->fw_name, - parent_data[i].fw_name, false); + parent_name, false); + if (!ret) ret = clk_cpy_name(&parent->name, parent_data[i].name,