Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3706676imw; Mon, 11 Jul 2022 14:08:10 -0700 (PDT) X-Google-Smtp-Source: AGRyM1so8eMG5H38Qf7ARwterFfXLi1gXcZDpVBPplwdt8BXQHBp016/dFfU22lZX1hudYGCaO/2 X-Received: by 2002:a17:906:ef8b:b0:72b:45a2:2232 with SMTP id ze11-20020a170906ef8b00b0072b45a22232mr11069209ejb.484.1657573690429; Mon, 11 Jul 2022 14:08:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657573690; cv=none; d=google.com; s=arc-20160816; b=e5W6CiB7CF4dXbG+p89O4rQpsyVaNd8ZUf+G1xLW9v+DxWuSQ+4HARDhGoOVASMwI4 KXpQ+mPMJYoEOu0aK5CkO5HqnnbXInTBBykg2gKcN0NTvpkG6N9hyzrCCnXQQb8+jGCY UOF9LSarFAD0l+nxe+URmGPDK0OF7Xrsqm5mZyOvz8wL09s/tgOkHrTeAmWtqRwhw2J4 tHA5aOdIGkzgL1aSCHRx4mW/mr4dOmYfM5ZKBShyD6IWmgTcTsHcvjxXsKa3rxfV+ogE N1KuHuLT9JnWpjLA7sccj+sPyv/o6pTKVGI/4IMfOLoZP/XZWNtEiwCKpZPOb+eBXVn8 HjPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:user-agent:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=UYN9BcZPzF/0k+8dTXrcV5IlkfKd+IJSUOQ3rcDYeBo=; b=TAYSRoEC+g/lHmLpEMsA/quuffFuUiahd4wvgCPuqbwVIaUNAq3BHH5utBXltg1Sm6 orv5pR5rPigbh7ptC/0idqQ6lloKxmS9jClFAvhNCPCq75vgIcZpvMW74fSmExYm6rOX eMAx7beqvgK8QCyQuFuzwgj7oskLC794DST1qe8WLmxbyVvCJLDmNnRspF7MU/2yfcLW gFERWWd8M/URcYLW8zyXCRffyqKT+pz9SkKXCG5S7bHNhV/7pwoul31tbmT9twI8i71s yfH6+zYfZWZ6iu5ToB5dDqb7gY5eZzMFV5tvlBxw+XGgqQ+EEBbzniab0p6Wg0Zgnfs1 R5aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QEZdIJJu; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b30-20020a509f21000000b0043a3801ebf9si12146028edf.327.2022.07.11.14.07.45; Mon, 11 Jul 2022 14:08:10 -0700 (PDT) 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=@kernel.org header.s=k20201202 header.b=QEZdIJJu; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231226AbiGKUtE (ORCPT + 99 others); Mon, 11 Jul 2022 16:49:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229593AbiGKUtC (ORCPT ); Mon, 11 Jul 2022 16:49:02 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57A9D11173; Mon, 11 Jul 2022 13:49:00 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E49EE6168C; Mon, 11 Jul 2022 20:48:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3DDD5C34115; Mon, 11 Jul 2022 20:48:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1657572539; bh=zuU3VsAsUph7e7zwXq/2Epxqe4K3n6QYBMJuw+41dg4=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=QEZdIJJu0iVDm5NdwtCFe8ql1UaFVZCcBfNxEaQasbGH2e7uNQEXBN7doLRzt2Bsy fs1vcf55GP8RVcGkH99C1uibkz/WVo6CqTcGCPMf76uao0WqlGEaDab+BHznqGcKWN q3Z2sBjpDR338LdZl+EPanBntinMBqPKGHT/n2XtlYlk9Rgsg9SJ2I6nIgNW0x8Yjs 4cmMd8K9DZe8kCVEBa0rYUMaZs1lEB++Rkdybbjm3iAET1jz7drgtyxFSCbDvkqHTK enwqPC13nWd6/4hp9rcochN04yl2mCLLHO7xE+XG7hmnC0s4HGV/HccK710csMM5bV pxnTx7huysVhw== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20220711162713.2467476-1-dlatypov@google.com> References: <20220711162713.2467476-1-dlatypov@google.com> Subject: Re: [PATCH] clk: explicitly disable CONFIG_UML_PCI_OVER_VIRTIO in .kunitconfig From: Stephen Boyd Cc: linux-kernel@vger.kernel.org, kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org, skhan@linuxfoundation.org, linux-clk@vger.kernel.org, Daniel Latypov , Maxime Ripard To: Daniel Latypov , brendanhiggins@google.com, davidgow@google.com Date: Mon, 11 Jul 2022 13:48:57 -0700 User-Agent: alot/0.10 Message-Id: <20220711204859.3DDD5C34115@smtp.kernel.org> X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org Quoting Daniel Latypov (2022-07-11 09:27:13) > CONFIG_UML_PCI_OVER_VIRTIO=3Dy is needed to enable CONFIG_PCI=3Dy on UML. > However, this causes test failures when running the clk tests, i.e. > $ ./tools/testing/kunit/kunit.py run --kunitconfig=3Ddrivers/clk >=20 > A snippet of the particular error is: > > ok 1 - clk_gate_test_parent_rate > > ------------[ cut here ]------------ > > WARNING: CPU: 0 PID: 45 at lib/logic_iomem.c:141 __raw_readl+0x9f/0xd0 >=20 > This is triggered by this cast in the test: > 143 ctx->fake_mem =3D (void __force __iomem *)&ctx->fake_reg; > this seems to work except when logic iomem is enabled, i.e. > CONFIG_INDIRECT_IOMEM=3Dy. >=20 > As a short-term fix, explicitly disable CONFIG_UML_PCI_OVER_VIRTIO in > drivers/clk/.kunitconfig so we can enable it for everyone else by > default in kunit.py. >=20 > The long-term fix probably requires something more complicated, like > #ifdef CONFIG_INDIRECT_IOMEM > logic_iomem_add_region(...); > #endif If this is how platform IO is mocked then yes we'll have to implement that. >=20 > Signed-off-by: Daniel Latypov > Reported-by: Maxime Ripard > Tested-by: Maxime Ripard > --- > Note: this targeting the -kselftest kunit branch. > There's a commit that triggers this by enabling logic iomem by default > [1] and there's also a commit that lets disable it via kunitconfig file > [2], which this fix relies on. >=20 > [1] https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest= .git/commit/?h=3Dkunit&id=3D6fc3a8636a7b0f7dbd6d0a4e450e765dc17518d4 > [2] https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest= .git/commit/?h=3Dkunit&id=3D8a7c6f859a20ca36a9e3ce71662de697898c9ef5 > --- Acked-by: Stephen Boyd