From patchwork Tue Jul 18 00:28:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13316644 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 36284C001DE for ; Tue, 18 Jul 2023 00:31:35 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 5312DAEA; Tue, 18 Jul 2023 02:30:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5312DAEA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1689640293; bh=CrZhbPZ9FwBTokvrtGGOK79L/OJY8CV+5y15IrPndTc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=gJp487AEKAzmZxy7mQKuk+xFTw3GuAwc6KPgVcRzKQ+RYAOrsHekPc9CWpjtHze4K PAO++edHGhK9vW9SO05MGbOoUdx2jaB72fSMhxd0vUyEsnX4nnM2+2xsViEAJisMuF YoLJGUVVgISIXQScvqji3/9aCNEazU4/Wd4h4jEc= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 130A6F80494; Tue, 18 Jul 2023 02:30:16 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 53765F80494; Tue, 18 Jul 2023 02:30:16 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 452B9F8027B; Tue, 18 Jul 2023 02:30:09 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 2EF72F8027B for ; Tue, 18 Jul 2023 02:29:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2EF72F8027B Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=ffFY7WQw Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E4EB761371; Tue, 18 Jul 2023 00:29:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4E153C433CB; Tue, 18 Jul 2023 00:29:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689640195; bh=CrZhbPZ9FwBTokvrtGGOK79L/OJY8CV+5y15IrPndTc=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ffFY7WQwV/lqerPI7KGjBkdWpPe8ulAGvEL+wXiFTO16y+pNJ9c8f7GOBNJlmpgVS q1L59AjKvKUptn+tpiXZOAIwGOd8k8jXHPVoaVhPKGy8kEFj4cia9cgNUBKWiGDO2z BAiMeQtjYsnYltDjmxcygnG0CfiAM56ihDVDIhqNP2f88MzLw/Ak70pMTzBFdxN0Y1 IRlQ9aeEyNfcFQBSFJ51mNms8lHrHPNY9WdKkn+Fbricq6jamNIRxff5kfNBDIYeWH n2CAPOzyEz1351o5EQZ5vr1eU+wC3ZUSuu1ynu49xdpHbrnqq2xjqNf0+r1HrjaqOM rgVRgtdH79D7A== From: Mark Brown Date: Tue, 18 Jul 2023 01:28:42 +0100 Subject: [PATCH v2 1/5] driver core: Provide stubs for !IOMEM builds MIME-Version: 1.0 Message-Id: <20230718-asoc-topology-kunit-enable-v2-1-0ee11e662b92@kernel.org> References: <20230718-asoc-topology-kunit-enable-v2-0-0ee11e662b92@kernel.org> In-Reply-To: <20230718-asoc-topology-kunit-enable-v2-0-0ee11e662b92@kernel.org> To: Liam Girdwood , Brendan Higgins , David Gow , Jaroslav Kysela , Takashi Iwai , Greg Kroah-Hartman , "Rafael J. Wysocki" Cc: alsa-devel@alsa-project.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, Mark Brown X-Mailer: b4 0.13-dev-099c9 X-Developer-Signature: v=1; a=openpgp-sha256; l=1963; i=broonie@kernel.org; h=from:subject:message-id; bh=CrZhbPZ9FwBTokvrtGGOK79L/OJY8CV+5y15IrPndTc=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBktdz5m2OQFGCRftcMVv/Funt3wXBqKcBsv56oL Laitxdvs3yJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZLXc+QAKCRAk1otyXVSH 0MefB/99za3fuZtdz0rVH5AeHcPCF7GaJTRkzzIhb5WwHhbT8jCNeBK3G8u+r9F0ahtSfH+YHlN 1DcaMJ3qZtpnxkYNNO2VzxP9Z0swluuMgWoN5XbfsjVEyJz4xUkPpcK7J9avwS5Qs/xhm8br2YI tcTu+Gkv56YKzfd/zcpFwU+ep5lRpZG9k9JV+l7VKUVcvkLjuM05U9HD6b79Jv6Fd/kEQTnhA+k FmnRWzn141+lRfXHfXSmHxP8uDsSYB7guASWtRkdW/YAb5IABf8N3kZRC8RmRUpEF7vex++xnEp VHZEv8dGY4WNMrykQUZZOSg862WtTXokJI/I8WxJPsWpv54O X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Message-ID-Hash: YG4CWDVZII3MMHMTPRT4TEPP2S4NSFKP X-Message-ID-Hash: YG4CWDVZII3MMHMTPRT4TEPP2S4NSFKP X-MailFrom: broonie@kernel.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The various _ioremap_resource functions are not built when CONFIG_HAS_IOMEM is disabled but no stubs are provided. Given how widespread IOMEM usage is in drivers and how rare !IOMEM configurations are in practical use let's just provide some stubs so users will build without having to add explicit dependencies on HAS_IOMEM. The most likely use case is builds with UML for KUnit testing. Signed-off-by: Mark Brown Reviewed-by: David Gow Reviewed-by: Greg Kroah-Hartman --- include/linux/device.h | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/include/linux/device.h b/include/linux/device.h index bbaeabd04b0d..6731d7dc1a2a 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -349,6 +349,7 @@ unsigned long devm_get_free_pages(struct device *dev, gfp_t gfp_mask, unsigned int order); void devm_free_pages(struct device *dev, unsigned long addr); +#ifdef CONFIG_HAS_IOMEM void __iomem *devm_ioremap_resource(struct device *dev, const struct resource *res); void __iomem *devm_ioremap_resource_wc(struct device *dev, @@ -357,6 +358,31 @@ void __iomem *devm_ioremap_resource_wc(struct device *dev, void __iomem *devm_of_iomap(struct device *dev, struct device_node *node, int index, resource_size_t *size); +#else + +static inline +void __iomem *devm_ioremap_resource(struct device *dev, + const struct resource *res) +{ + return ERR_PTR(-EINVAL); +} + +static inline +void __iomem *devm_ioremap_resource_wc(struct device *dev, + const struct resource *res) +{ + return ERR_PTR(-EINVAL); +} + +static inline +void __iomem *devm_of_iomap(struct device *dev, + struct device_node *node, int index, + resource_size_t *size) +{ + return ERR_PTR(-EINVAL); +} + +#endif /* allows to add/remove a custom action to devres stack */ void devm_remove_action(struct device *dev, void (*action)(void *), void *data); From patchwork Tue Jul 18 00:28:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13316646 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 46BF9C0015E for ; Tue, 18 Jul 2023 00:32:08 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 78501E10; Tue, 18 Jul 2023 02:31:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 78501E10 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1689640326; bh=wRRnJwjd9xFCNGY/0Tqpmscr+RMrnGnIgCFrmukZL1s=; h=From:Date:Subject:References:In-Reply-To:To:Cc:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=s374Fs/cPbQq+sehDfvWdRR5N9yk6FBQz93wyb3tOvBJSA7vSZidLcrLTY68xcqXM y9tkY6623/y3LLpRE9Dxn7NKZdVTfUQfauakZbPhGUfwVckuRgAxpirvz6p3gqOs3L U5S1kLt3UP/64eD4Dlez34OUik+GC9Up4ypOtGak= Received: by alsa1.perex.cz (Postfix, from userid 50401) id AC3D5F80563; Tue, 18 Jul 2023 02:30:20 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id A1B65F80563; Tue, 18 Jul 2023 02:30:19 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0FE8CF80153; Tue, 18 Jul 2023 02:30:11 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 21051F80153 for ; Tue, 18 Jul 2023 02:30:01 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 21051F80153 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=fNirPgcq Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E03906136E; Tue, 18 Jul 2023 00:29:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C4734C433D9; Tue, 18 Jul 2023 00:29:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689640199; bh=wRRnJwjd9xFCNGY/0Tqpmscr+RMrnGnIgCFrmukZL1s=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=fNirPgcqr0ah+kdMBVwWRxPBnVTY51yFpbxXmVMGo4Ow/gkTvPRIkts7f69Hk5ngG F/xpp6iysIAAvNhg41/4Bovj8jfZ27eypmzzMW5GlUv/NLDO7AG1JDhQGbfGsMlZ5M SoKw8ht1r4Sb++IP2N2zeXIRnsRtHM9t+s5EoPiiZMC0B/bCM5aZ0ykWYGUx/Hljjs S1mLj6w6mjHPTA8mYqv7jy3uhN3k/VSmHwdGS/e3jFo2Pd9fywLeHdkosL+8ZFxqJN MylH9VpNnV36a+AtPN+AmyK7UTQSJnw3bwGIHR5eIyKz+pDpici5nUB+nuYkwNpAhP E5F9MWIaxCoWw== From: Mark Brown Date: Tue, 18 Jul 2023 01:28:43 +0100 Subject: [PATCH v2 2/5] platform: Provide stubs for !HAS_IOMEM builds MIME-Version: 1.0 Message-Id: <20230718-asoc-topology-kunit-enable-v2-2-0ee11e662b92@kernel.org> References: <20230718-asoc-topology-kunit-enable-v2-0-0ee11e662b92@kernel.org> In-Reply-To: <20230718-asoc-topology-kunit-enable-v2-0-0ee11e662b92@kernel.org> To: Liam Girdwood , Brendan Higgins , David Gow , Jaroslav Kysela , Takashi Iwai , Greg Kroah-Hartman , "Rafael J. Wysocki" Cc: alsa-devel@alsa-project.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, Mark Brown X-Mailer: b4 0.13-dev-099c9 X-Developer-Signature: v=1; a=openpgp-sha256; l=2126; i=broonie@kernel.org; h=from:subject:message-id; bh=wRRnJwjd9xFCNGY/0Tqpmscr+RMrnGnIgCFrmukZL1s=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBktdz5HH5KULEXbuQ1q25QSGhhphNIcj9NRdlYN NgFp+BhFLGJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZLXc+QAKCRAk1otyXVSH 0CeGB/0V05WlCqnoWtp17MzhLgPRsjEddQIW26JPMXN0EMFxBus8RjbLsuwVOs88wy5oq/vHLZT tgjoOEB8ZFnCOL1zxrbnuuUfFJWqAHFwQcVJHzdwCBSZOD/kElqRLfZJZMu9/Wr47eOiYg6vfra 4iCi6f6S6a0EHF8LyRgF4NT7Xaom9J8xYoeyLvp5aBiCPMWiGr/M3Q1M9m3Y0gCMjgfvC8j3/k6 /i8x7HlCwlbIcEAL/kYUnEIeRKSTlGlTcKZJLkfkw4+MYx5v7kVqEIb+5sxNqRv8hNboSSxY+N+ dwQJ6NaU17fD77ORtRHlV8T9DkDeLxMIfsW5+wrzB5twpsKn X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Message-ID-Hash: XW3C6X7BDXRQVB5B4GVMEPL4AOTRXFPV X-Message-ID-Hash: XW3C6X7BDXRQVB5B4GVMEPL4AOTRXFPV X-MailFrom: broonie@kernel.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The various _ioremap_resource functions are not built when CONFIG_HAS_IOMEM is disabled but no stubs are provided. Given how widespread IOMEM usage is in drivers and how rare !IOMEM configurations are in practical use let's just provide some stubs so users will build without having to add explicit dependencies on IOMEM. The most likely use case is builds with UML for KUnit testing. Signed-off-by: Mark Brown Reviewed-by: David Gow Reviewed-by: Greg Kroah-Hartman --- include/linux/platform_device.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index b845fd83f429..7a41c72c1959 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h @@ -63,6 +63,8 @@ extern struct resource *platform_get_mem_or_io(struct platform_device *, extern struct device * platform_find_device_by_driver(struct device *start, const struct device_driver *drv); + +#ifdef CONFIG_HAS_IOMEM extern void __iomem * devm_platform_get_and_ioremap_resource(struct platform_device *pdev, unsigned int index, struct resource **res); @@ -72,6 +74,32 @@ devm_platform_ioremap_resource(struct platform_device *pdev, extern void __iomem * devm_platform_ioremap_resource_byname(struct platform_device *pdev, const char *name); +#else + +static inline void __iomem * +devm_platform_get_and_ioremap_resource(struct platform_device *pdev, + unsigned int index, struct resource **res) +{ + return ERR_PTR(-EINVAL); +} + + +static inline void __iomem * +devm_platform_ioremap_resource(struct platform_device *pdev, + unsigned int index) +{ + return ERR_PTR(-EINVAL); +} + +static inline void __iomem * +devm_platform_ioremap_resource_byname(struct platform_device *pdev, + const char *name) +{ + return ERR_PTR(-EINVAL); +} + +#endif + extern int platform_get_irq(struct platform_device *, unsigned int); extern int platform_get_irq_optional(struct platform_device *, unsigned int); extern int platform_irq_count(struct platform_device *); From patchwork Tue Jul 18 00:28:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13316647 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 95B1CEB64DC for ; Tue, 18 Jul 2023 00:32:25 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 05936BC0; Tue, 18 Jul 2023 02:31:34 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 05936BC0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1689640344; bh=snD0Eo/VYjRjGit1jZ3DB3f+21qBXC5DToerjkMGLGM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=atkZ1nUa+Ct/+wmLTPXc/Tc3F/9Ov2DcnosV5wONlwy/oVwowKRzn0X0n8yFkbz3f XfHp63mdr5fHP6RkNGv9awQLFI8eSaF9WCVJXD6LGihzH8Rnuelu0j7WHrZ4gf+gNn GalUBwJfZPAa7NL2ZL03u4paEjf/uWL0hhJttdKA= Received: by alsa1.perex.cz (Postfix, from userid 50401) id E79C6F80587; Tue, 18 Jul 2023 02:30:23 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 76334F8057E; Tue, 18 Jul 2023 02:30:23 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3CA2AF8027B; Tue, 18 Jul 2023 02:30:13 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 58E5BF8032D for ; Tue, 18 Jul 2023 02:30:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 58E5BF8032D Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=EASJiqi7 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 451B061370; Tue, 18 Jul 2023 00:30:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D47CBC433CA; Tue, 18 Jul 2023 00:29:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689640202; bh=snD0Eo/VYjRjGit1jZ3DB3f+21qBXC5DToerjkMGLGM=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=EASJiqi7Ly00yQGpkuE68DknJ2uuk81E+xf84VkP6/LvzK2+EyM2xkKbswtkHeoqa tZ0ImiGE0GItbBWGDp6gmalV1wKrmCNt3+5SmOvCENeIQ/HTI6VyX9iaU86Z8QqfUT AYfaQTZ2BbRBghwtycDsx4i4xpGQ4bwqBKUBS9v0vkOqUlYnSOPTMMS0IUvSjcG4w8 7snqjWeGqMXUCraC43lHkm+luQ0BSGEaihe7xxetFzr/ar6+tlrH++gxmGKWV4W/ha SqLgCzqeH3ShsHujBZY5lLl3SdNgAstuAl5BGOYfLY9vtnh1rXdadrOdmCYJ9o8roT +aT9GnK56QD5Q== From: Mark Brown Date: Tue, 18 Jul 2023 01:28:44 +0100 Subject: [PATCH v2 3/5] ALSA: Enable build with UML MIME-Version: 1.0 Message-Id: <20230718-asoc-topology-kunit-enable-v2-3-0ee11e662b92@kernel.org> References: <20230718-asoc-topology-kunit-enable-v2-0-0ee11e662b92@kernel.org> In-Reply-To: <20230718-asoc-topology-kunit-enable-v2-0-0ee11e662b92@kernel.org> To: Liam Girdwood , Brendan Higgins , David Gow , Jaroslav Kysela , Takashi Iwai , Greg Kroah-Hartman , "Rafael J. Wysocki" Cc: alsa-devel@alsa-project.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, Mark Brown X-Mailer: b4 0.13-dev-099c9 X-Developer-Signature: v=1; a=openpgp-sha256; l=1000; i=broonie@kernel.org; h=from:subject:message-id; bh=snD0Eo/VYjRjGit1jZ3DB3f+21qBXC5DToerjkMGLGM=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBktdz6QD6q9FAILvFmBY8HlF3zn6cc9gUPfjrQS OQ9Y5c72fKJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZLXc+gAKCRAk1otyXVSH 0GOPB/9bMFYsS1o4LqHp876+Z8FMoLwbWJqrzAD4yRpkJGzYmmvjkgcmEgpoQ8PqIsWLwcS0lhH 8KiyzGYfeVEPHd7KCfGFlAmYXUkUKdnOBPLJ+Soncc7w6AXIHvULLU+UFtXhbBYpGAmZfHl8Lue w1Fz3y2zUFXFwE6PgzipDZ+tKN5rEB4H2Jjzu2Dyk+VDqulT4CiOeOgZPTAvxOXpmOtlOL/pwAc QAWOaiK+37tXolRxEiy5fLptJL6lLbSyZr24lY6ptIkT6erfXvRB8fisEkf3eELagl9UHBHKZVE 1pNTd21Jy4nepcNB44BulWg9iVtFUF2Au/W8kG86TJs4co6a X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Message-ID-Hash: IVJ5OXIFL5QRCWUE5KMMHMKBNZOU72RS X-Message-ID-Hash: IVJ5OXIFL5QRCWUE5KMMHMKBNZOU72RS X-MailFrom: broonie@kernel.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: In order to facilitate testing using KUnit allow ALSA to build with UML, it's not super useful at runtime but that's a user problem rather than an actual dependency. The apparent reason for the dependency was the widespread use of iomem APIs in ALSA drivers, earlier patches in this series have provided stubs for these APIs so that there are no build time issues even without individual drivers having IOMEM dependencies added. Signed-off-by: Mark Brown Tested-by: David Gow --- sound/Kconfig | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sound/Kconfig b/sound/Kconfig index 0ddfb717b81d..f0e15822e858 100644 --- a/sound/Kconfig +++ b/sound/Kconfig @@ -39,8 +39,6 @@ config SOUND_OSS_CORE_PRECLAIM source "sound/oss/dmasound/Kconfig" -if !UML - menuconfig SND tristate "Advanced Linux Sound Architecture" help @@ -103,8 +101,6 @@ source "sound/virtio/Kconfig" endif # SND -endif # !UML - endif # SOUND config AC97_BUS From patchwork Tue Jul 18 00:28:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13316649 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1F3C8C0015E for ; Tue, 18 Jul 2023 00:32:57 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id E5E85E7D; Tue, 18 Jul 2023 02:32:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E5E85E7D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1689640375; bh=TnBFqbbzgjL9q9pFRoc5uu6BkdcO9YJ7JVR18QHszz8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=c8c/KJP+RBk29RhbXrjMWN2bDu6mmYgE0iBd5+3kSh1bYgRjReARtS5XY75twzOXO GFAG3HfGRcSKgokPy5SO005SvPTNxsd6icH+rU35zjMJ6XGuRP1oo5USuNa2Fc9/iI JYwYzjJ4cUfyty35RvlKTpZMuybcabLagZVxefs0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id AAB5CF805B6; Tue, 18 Jul 2023 02:30:29 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 0F844F805B1; Tue, 18 Jul 2023 02:30:29 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 35080F8056F; Tue, 18 Jul 2023 02:30:20 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 5C7E3F8047D for ; Tue, 18 Jul 2023 02:30:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5C7E3F8047D Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=QFCqQ5kp Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 489C2611E4; Tue, 18 Jul 2023 00:30:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 227CEC433CB; Tue, 18 Jul 2023 00:30:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689640205; bh=TnBFqbbzgjL9q9pFRoc5uu6BkdcO9YJ7JVR18QHszz8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=QFCqQ5kpDBAZut64is23SI4XYkwbREKPk7YnHtzhOX/44gm1e3W0iCQuWoN0WeXGO v6N/UtRzdGa8z5j176iLY6EvGSgc2kcColzkxtehcH7krcxnBrb/Lr1nsQlcNiySFE ySAuUTl4CR/UFybm39QMKnF0Obr72c//Q19eZudm3E7AjPSnpaEEjwpcUQxyOOAk7S rRpHTtpsYljDBneVm9z+lFExD7ty7C6ZIVSHgUOsR/SkshyYqaHU/kfCI4R1Hgq4Iv 6Zt4fhVCgiJ7X+qhcTByDEXmqTPCo/5o1fGBU2T+nEMR9PIrn27zw6pwuM/LYPQH4B zrbyRqmGxlF6A== From: Mark Brown Date: Tue, 18 Jul 2023 01:28:45 +0100 Subject: [PATCH v2 4/5] kunit: Enable ASoC in all_tests.config MIME-Version: 1.0 Message-Id: <20230718-asoc-topology-kunit-enable-v2-4-0ee11e662b92@kernel.org> References: <20230718-asoc-topology-kunit-enable-v2-0-0ee11e662b92@kernel.org> In-Reply-To: <20230718-asoc-topology-kunit-enable-v2-0-0ee11e662b92@kernel.org> To: Liam Girdwood , Brendan Higgins , David Gow , Jaroslav Kysela , Takashi Iwai , Greg Kroah-Hartman , "Rafael J. Wysocki" Cc: alsa-devel@alsa-project.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, Mark Brown X-Mailer: b4 0.13-dev-099c9 X-Developer-Signature: v=1; a=openpgp-sha256; l=682; i=broonie@kernel.org; h=from:subject:message-id; bh=TnBFqbbzgjL9q9pFRoc5uu6BkdcO9YJ7JVR18QHszz8=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBktdz7HozPq6/0jZyA+LN1Ps89o2TkTwzkcl5KI J3xvqpfRNmJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZLXc+wAKCRAk1otyXVSH 0OFvB/9NgrBslexf8gRgZFmniJLbG2h+DpvBHPNQPNoMULIICq6HOmESVC9hKdYwmPPxJ92sKoN K3XTy52yPYwRCOLzALT3ySa0Z1SaKNagy+iV+u3y5XU/gIMRLdABWdb8ePxl7nA54dlUWTlQO/7 Fr7rypotbMCcxtoBmOzWt2yvBM88Ec5e3mSnUfAFebD7kksS1+rWBt1V7Lf7gqPJJRfFknaX3CT 3duA4rIUoutsJveB9t+ciZaWXD6LZ4CsswIoWkzxE10yh+KgB8rispipeEsf6HvRVX/WokiXCL+ Of9HYRLBc6vlT/zez7DgpLV56nl//xTUSX4DB/NR7tWGDtgj X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Message-ID-Hash: M34BZOAVH45DZ2EUPH2ZMER4DWXWGNGL X-Message-ID-Hash: M34BZOAVH45DZ2EUPH2ZMER4DWXWGNGL X-MailFrom: broonie@kernel.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: There are KUnit tests for some of the ASoC utility functions which are not enabled in the KUnit all_tests.config, do so. Signed-off-by: Mark Brown Reviewed-by: David Gow --- tools/testing/kunit/configs/all_tests.config | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/testing/kunit/configs/all_tests.config b/tools/testing/kunit/configs/all_tests.config index 0393940c706a..13d15bc693fb 100644 --- a/tools/testing/kunit/configs/all_tests.config +++ b/tools/testing/kunit/configs/all_tests.config @@ -35,3 +35,7 @@ CONFIG_DAMON_DBGFS=y CONFIG_SECURITY=y CONFIG_SECURITY_APPARMOR=y + +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_SOC=y From patchwork Tue Jul 18 00:28:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 13316648 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0E921C0015E for ; Tue, 18 Jul 2023 00:32:50 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 28A8AAE8; Tue, 18 Jul 2023 02:31:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 28A8AAE8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1689640369; bh=JAzoOFG/Nu8slUNucj7uOz4cfFujARjvN2vXgzUIK1A=; h=From:Date:Subject:References:In-Reply-To:To:Cc:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=ItH6RPP/YY+4EwOq/dwTG56wxW30ecwi26yJbGqgLfhHs8rYao1liC8RhXDQOX8yG UjZX5H/ro85X38YhVzYdBR1hOPph+fMXQ6CvELlNpceYpmhARedboJoCtkId16A65p swAcyIk2NCjRW2R2LgDZZ9c9iX+lf5N0RwEt5QrY= Received: by alsa1.perex.cz (Postfix, from userid 50401) id F077DF805AC; Tue, 18 Jul 2023 02:30:26 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 87456F80589; Tue, 18 Jul 2023 02:30:26 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 30720F80549; Tue, 18 Jul 2023 02:30:17 +0200 (CEST) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 866BBF8007E for ; Tue, 18 Jul 2023 02:30:10 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 866BBF8007E Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=YvQqEprQ Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7F8C661373; Tue, 18 Jul 2023 00:30:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 25D6FC433CD; Tue, 18 Jul 2023 00:30:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689640208; bh=JAzoOFG/Nu8slUNucj7uOz4cfFujARjvN2vXgzUIK1A=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=YvQqEprQqVyhFnp8+OUXg8pRCxeC3vbWvTgFQQNCproWiJCdMA1DDRIsSKz2TkAaw cVBDdOw7VHIHK6zpdW38XrTD19lh8KooRc4CDnfATXrw37yoL7kwklK4PvrvYLObxa zNAvVTnLLKIMcQhWUjgAxF3ZUvf9m8wGcdO30+RnEv7YKT6s7Su2o1BCMJq8v0xPTC DsBdd/LS5VIPJfzHR6u+q6qXEcsfB++icmKKpryicPS3fCCeSGSW77LIvc8S2WREtC /TMcpVvDgJ1PpkbBr0XetNnoArXBrZc4RRkunkV2LbN5CIkmYP+uGt+FqQoAuq6taS x3CicQ841H9lA== From: Mark Brown Date: Tue, 18 Jul 2023 01:28:46 +0100 Subject: [PATCH v2 5/5] ASoC: topology: Add explicit build option MIME-Version: 1.0 Message-Id: <20230718-asoc-topology-kunit-enable-v2-5-0ee11e662b92@kernel.org> References: <20230718-asoc-topology-kunit-enable-v2-0-0ee11e662b92@kernel.org> In-Reply-To: <20230718-asoc-topology-kunit-enable-v2-0-0ee11e662b92@kernel.org> To: Liam Girdwood , Brendan Higgins , David Gow , Jaroslav Kysela , Takashi Iwai , Greg Kroah-Hartman , "Rafael J. Wysocki" Cc: alsa-devel@alsa-project.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, Mark Brown X-Mailer: b4 0.13-dev-099c9 X-Developer-Signature: v=1; a=openpgp-sha256; l=1884; i=broonie@kernel.org; h=from:subject:message-id; bh=JAzoOFG/Nu8slUNucj7uOz4cfFujARjvN2vXgzUIK1A=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBktdz89eZeCatJqqik+rdtJuQ3aMTz8rpLjbLzp bAzrGqDcOCJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZLXc/AAKCRAk1otyXVSH 0DheB/93ie1XMriGLa9EzlZkgGTvUtO7p43OdgwKKPP7V5pc/KvlqZhprG2rZyQzCPEaMfWPp/M q5J2PB/o2q0ZSEjWgy38TBC0uet1p/JYDykObACJxtmPEgVrestHy9wbcmdiNF89yybkxChwIsS d/CPt2BjwQ7WjAxMFNR+tk3kUs+V5d6n8jeE1MT++rToKx0p9U1kYtnuCHpOZESuDG4h52GQsG6 xO9KwVRLwzzteUD4bJKYmsJ/zk94AHMS6FiCYgRx9RzxIBLCkApiMkiCXhAZapKf3j9bFs9+SjU cynKPWoetBvG7IgiVec6xpuS+bW+jipEV7h1yJIcW6F5gtGP X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB Message-ID-Hash: KRHEYJENZGBOLSBDECHEHTLYKJRDDBXV X-Message-ID-Hash: KRHEYJENZGBOLSBDECHEHTLYKJRDDBXV X-MailFrom: broonie@kernel.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The default KUnit build options are not supposed to enable any subsystems that were not already enabled but the topology code is a library which is generally selected by drivers that want to use it. Since KUnit is frequently run in virtual environments with minimal driver support this makes it difficult to enable the toplogy tests so provide an explicit Kconfig option which can be directly enabled when using KUnit, and also include this in the KUnit all_tests.config. Reviewed-by: David Gow Signed-off-by: Mark Brown --- sound/soc/Kconfig | 11 +++++++++++ tools/testing/kunit/configs/all_tests.config | 1 + 2 files changed, 12 insertions(+) diff --git a/sound/soc/Kconfig b/sound/soc/Kconfig index bfa9622e1ab1..439fa631c342 100644 --- a/sound/soc/Kconfig +++ b/sound/soc/Kconfig @@ -38,6 +38,17 @@ config SND_SOC_TOPOLOGY bool select SND_DYNAMIC_MINORS +config SND_SOC_TOPOLOGY_BUILD + bool "Build topology core" + select SND_SOC_TOPOLOGY + depends on KUNIT + help + This option exists to facilitate running the KUnit tests for + the topology core, KUnit is frequently tested in virtual + environments with minimal drivers enabled but the topology + core is usually selected by drivers. There is little reason + to enable it if not doing a KUnit build. + config SND_SOC_TOPOLOGY_KUNIT_TEST tristate "KUnit tests for SoC topology" depends on KUNIT diff --git a/tools/testing/kunit/configs/all_tests.config b/tools/testing/kunit/configs/all_tests.config index 13d15bc693fb..b8adb59455ef 100644 --- a/tools/testing/kunit/configs/all_tests.config +++ b/tools/testing/kunit/configs/all_tests.config @@ -39,3 +39,4 @@ CONFIG_SECURITY_APPARMOR=y CONFIG_SOUND=y CONFIG_SND=y CONFIG_SND_SOC=y +CONFIG_SND_SOC_TOPOLOGY_BUILD=y