Message ID | 20230410011325.26850-1-rdunlap@infradead.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1631397vqo; Sun, 9 Apr 2023 19:10:06 -0700 (PDT) X-Google-Smtp-Source: AKy350ZjX1ClLElbg48vHC2tvkQVG7Ae2r0m7eKidUtnHuAlPJ5EsKV+csHL2kP82W/PZGJau7dj X-Received: by 2002:a17:906:4ecb:b0:94a:46c0:248 with SMTP id i11-20020a1709064ecb00b0094a46c00248mr5376273ejv.41.1681092606453; Sun, 09 Apr 2023 19:10:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681092606; cv=none; d=google.com; s=arc-20160816; b=Z2rLgEWNAveSEssyT4Oa/V6bl8Lj0M8qQ/94JUcoO/k1t+UZEY68xRkkCUcB2hzCCe 5jM/edXJ9/5l2YiSCOSovWbotBq0AVgnyLJvldEi1GKziQZnZW74lZclHb8h6aHbPeXG h42iQnQdpQNWyx51tFce9hw8q0ziWd6/3fJwFiS04+y4PFZeEmuO8agYs2hLpyNnx3hh zZZgxRogGOGuNd8rH4STHPUeTj1WH9BcbHYvOwL8LGwEnZJ1Gvgl7ZFQDvNizGkF7L2i RMfGLjphOx5PKEu8LWdoXgEFq0vah5IchlghoYvHu8wsl8ErgwKRZFWfg8wgNI4ct8jJ jcZw== 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=VdW0QiWZs5tGfWPYA1DUgJb23J28q3ZPvcBOi0zT0BE=; b=x7fjEl405nj7LWeyEgRa716NxKNBD1xsbddGf12+yX3F4mRUf4O49E8fdtUsuT0djy L8JO/DEdAn3rL2/ClzAPSm+yaW+F4EWnTotDWThf32FxpRGrMETOUPxi+UnvuumluHkf RPrLr59/l1djT7HnCa5OJyTCEppJIarrRArh9iBLKJ73mXUsDO91mVGiCUJAtVwHm2Qy 1tmiXovnaQN5CF1FUvV8KnivkSMQtieVdifGT/A5JzMWkKuArwqQhAgTJZF9HzV17Ua6 XaUg6tmbx+YIG8DBiQ7sgXggoPeprbJ3pmnw7gL13EtAvCTG2UIcclvn1gpxgab6y5s1 sjMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=daWXvKb1; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e20-20020a17090658d400b009476ce937e0si9734803ejs.875.2023.04.09.19.09.42; Sun, 09 Apr 2023 19:10:06 -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=@infradead.org header.s=bombadil.20210309 header.b=daWXvKb1; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229676AbjDJBNu (ORCPT <rfc822;yuanzuo1009@gmail.com> + 99 others); Sun, 9 Apr 2023 21:13:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229665AbjDJBNt (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 9 Apr 2023 21:13:49 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B1643A9A; Sun, 9 Apr 2023 18:13:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=VdW0QiWZs5tGfWPYA1DUgJb23J28q3ZPvcBOi0zT0BE=; b=daWXvKb1EIcxg0HC4CwHgCtg37 uOSPNeR3CtfZXI4UL1UQEKRw53ztrrwSN16KQDm0/4UjmKQBs/K4fdMJS1HKBP8Y2lFCOxRQuzvy+ X/QkANaB6jdpL1QM2u5V4JiTpYp1CIgii1o//f8tyFp/CHbaSd7E8IL75M0NWjF/wt+vxJviwGu+z iZqE/xoSuYH0mj4H0lD4fmN4yAnheEX/ke1abhcxu8W4roCX4+2RCCDCUDnQYUWYfWqdULe/K6RvQ JbetAX6DydD8As2XFOgUHaCRA9XZNIA9GMa0CZsceZI5KaSgue60KcV8q/9bGl1IQCz+DO4rLq033 1oudGLig==; Received: from [2601:1c2:980:9ec0::2764] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1plg61-00EPd9-31; Mon, 10 Apr 2023 01:13:26 +0000 From: Randy Dunlap <rdunlap@infradead.org> To: linux-kernel@vger.kernel.org Cc: Randy Dunlap <rdunlap@infradead.org>, Richard Weinberger <richard@nod.at>, Anton Ivanov <anton.ivanov@cambridgegreys.com>, Johannes Berg <johannes@sipsolutions.net>, Damien Le Moal <damien.lemoal@opensource.wdc.com>, linux-ide@vger.kernel.org, linux-um@lists.infradead.org, Geert Uytterhoeven <geert@linux-m68k.org> Subject: [PATCH v3] UML: pata_cs5536: fix build for X86_32 UML with TRACEPOINTS Date: Sun, 9 Apr 2023 18:13:25 -0700 Message-Id: <20230410011325.26850-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.40.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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?1762753360479555999?= X-GMAIL-MSGID: =?utf-8?q?1762753360479555999?= |
Series |
[v3] UML: pata_cs5536: fix build for X86_32 UML with TRACEPOINTS
|
|
Commit Message
Randy Dunlap
April 10, 2023, 1:13 a.m. UTC
Current build of pata_cs5536 for i386 UML fails with: ERROR: modpost: "__tracepoint_write_msr" [drivers/ata/pata_cs5536.ko] undefined! ERROR: modpost: "do_trace_write_msr" [drivers/ata/pata_cs5536.ko] undefined! ERROR: modpost: "__tracepoint_read_msr" [drivers/ata/pata_cs5536.ko] undefined! ERROR: modpost: "do_trace_read_msr" [drivers/ata/pata_cs5536.ko] undefined! Add the arch/x86/lib/msr.o binary to resolve these undefined symbols. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Richard Weinberger <richard@nod.at> Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com> Cc: Johannes Berg <johannes@sipsolutions.net> Cc: Damien Le Moal <damien.lemoal@opensource.wdc.com> Cc: linux-ide@vger.kernel.org Cc: linux-um@lists.infradead.org Cc: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Damien Le Moal <damien.lemoal@opensource.wdc.com> --- v2: change from not building on UML to fixing the build on UML v3: add Rev-by: Damien Le Moal arch/x86/um/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Hi Randy,
kernel test robot noticed the following build warnings:
[auto build test WARNING on uml/next]
[also build test WARNING on uml/fixes wireless-next/main wireless/main linus/master v6.3-rc6 next-20230411]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Randy-Dunlap/UML-pata_cs5536-fix-build-for-X86_32-UML-with-TRACEPOINTS/20230410-091733
base: git://git.kernel.org/pub/scm/linux/kernel/git/uml/linux next
patch link: https://lore.kernel.org/r/20230410011325.26850-1-rdunlap%40infradead.org
patch subject: [PATCH v3] UML: pata_cs5536: fix build for X86_32 UML with TRACEPOINTS
config: um-i386_defconfig (https://download.01.org/0day-ci/archive/20230412/202304120048.v4uqUq9Q-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-8) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/intel-lab-lkp/linux/commit/2782ce24954318f1698ec910691250f4d287d817
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Randy-Dunlap/UML-pata_cs5536-fix-build-for-X86_32-UML-with-TRACEPOINTS/20230410-091733
git checkout 2782ce24954318f1698ec910691250f4d287d817
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=um SUBARCH=i386 olddefconfig
make W=1 O=build_dir ARCH=um SUBARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Link: https://lore.kernel.org/oe-kbuild-all/202304120048.v4uqUq9Q-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> arch/x86/um/../lib/msr.c:30: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* Read an MSR with error handling
arch/x86/um/../lib/msr.c:52: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* Write an MSR with error handling
arch/x86/um/../lib/msr.c:91: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* Set @bit in a MSR @msr.
arch/x86/um/../lib/msr.c:104: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* Clear @bit in a MSR @msr.
vim +30 arch/x86/um/../lib/msr.c
22085a66c2fab6 Borislav Petkov 2014-03-09 28
22085a66c2fab6 Borislav Petkov 2014-03-09 29 /**
22085a66c2fab6 Borislav Petkov 2014-03-09 @30 * Read an MSR with error handling
22085a66c2fab6 Borislav Petkov 2014-03-09 31 *
22085a66c2fab6 Borislav Petkov 2014-03-09 32 * @msr: MSR to read
22085a66c2fab6 Borislav Petkov 2014-03-09 33 * @m: value to read into
22085a66c2fab6 Borislav Petkov 2014-03-09 34 *
22085a66c2fab6 Borislav Petkov 2014-03-09 35 * It returns read data only on success, otherwise it doesn't change the output
22085a66c2fab6 Borislav Petkov 2014-03-09 36 * argument @m.
22085a66c2fab6 Borislav Petkov 2014-03-09 37 *
22085a66c2fab6 Borislav Petkov 2014-03-09 38 */
3e7bbe15ed84e3 Zhao Xuehui 2021-04-08 39 static int msr_read(u32 msr, struct msr *m)
22085a66c2fab6 Borislav Petkov 2014-03-09 40 {
22085a66c2fab6 Borislav Petkov 2014-03-09 41 int err;
22085a66c2fab6 Borislav Petkov 2014-03-09 42 u64 val;
22085a66c2fab6 Borislav Petkov 2014-03-09 43
22085a66c2fab6 Borislav Petkov 2014-03-09 44 err = rdmsrl_safe(msr, &val);
22085a66c2fab6 Borislav Petkov 2014-03-09 45 if (!err)
22085a66c2fab6 Borislav Petkov 2014-03-09 46 m->q = val;
22085a66c2fab6 Borislav Petkov 2014-03-09 47
22085a66c2fab6 Borislav Petkov 2014-03-09 48 return err;
22085a66c2fab6 Borislav Petkov 2014-03-09 49 }
22085a66c2fab6 Borislav Petkov 2014-03-09 50
On Sun, 2023-04-09 at 18:13 -0700, Randy Dunlap wrote: > Current build of pata_cs5536 for i386 UML fails with: > > ERROR: modpost: "__tracepoint_write_msr" [drivers/ata/pata_cs5536.ko] undefined! > ERROR: modpost: "do_trace_write_msr" [drivers/ata/pata_cs5536.ko] undefined! > ERROR: modpost: "__tracepoint_read_msr" [drivers/ata/pata_cs5536.ko] undefined! > ERROR: modpost: "do_trace_read_msr" [drivers/ata/pata_cs5536.ko] undefined! > > Add the arch/x86/lib/msr.o binary to resolve these undefined symbols. > Hm. Does this make sense? I can't see it'd work on UML to configure an IDE device through MSRs? Surely that can't work? IOW, that entire driver can't really work anyway can it? OTOH, maybe theoretically it could work in PCI, just not with MSRs, and then this patch makes some sense? johannes
On 4/14/23 06:55, Johannes Berg wrote: > On Sun, 2023-04-09 at 18:13 -0700, Randy Dunlap wrote: >> Current build of pata_cs5536 for i386 UML fails with: >> >> ERROR: modpost: "__tracepoint_write_msr" [drivers/ata/pata_cs5536.ko] undefined! >> ERROR: modpost: "do_trace_write_msr" [drivers/ata/pata_cs5536.ko] undefined! >> ERROR: modpost: "__tracepoint_read_msr" [drivers/ata/pata_cs5536.ko] undefined! >> ERROR: modpost: "do_trace_read_msr" [drivers/ata/pata_cs5536.ko] undefined! >> >> Add the arch/x86/lib/msr.o binary to resolve these undefined symbols. >> > > Hm. Does this make sense? I can't see it'd work on UML to configure an > IDE device through MSRs? Surely that can't work? IOW, that entire driver > can't really work anyway can it? > > OTOH, maybe theoretically it could work in PCI, just not with MSRs, and > then this patch makes some sense? Hi, I was happy with v1, which just did "depends on !UML". Anyway, I'll drop this part of the quest to make UML build cleanly. Thanks.
On Fri, Apr 14, 2023 at 03:55:07PM +0200, Johannes Berg wrote: > On Sun, 2023-04-09 at 18:13 -0700, Randy Dunlap wrote: > > Current build of pata_cs5536 for i386 UML fails with: > > > > ERROR: modpost: "__tracepoint_write_msr" [drivers/ata/pata_cs5536.ko] undefined! > > ERROR: modpost: "do_trace_write_msr" [drivers/ata/pata_cs5536.ko] undefined! > > ERROR: modpost: "__tracepoint_read_msr" [drivers/ata/pata_cs5536.ko] undefined! > > ERROR: modpost: "do_trace_read_msr" [drivers/ata/pata_cs5536.ko] undefined! > > > > Add the arch/x86/lib/msr.o binary to resolve these undefined symbols. > > > > Hm. Does this make sense? I can't see it'd work on UML to configure an > IDE device through MSRs? Surely that can't work? IOW, that entire driver > can't really work anyway can it? > > OTOH, maybe theoretically it could work in PCI, just not with MSRs, and > then this patch makes some sense? I think it is is integrated into actual Geode SOCs. That being said something like the patch below seems as simple as it gets and at least gives build coverage on uml diff --git a/drivers/ata/pata_cs5536.c b/drivers/ata/pata_cs5536.c index ab47aeb5587f55..4f5d9afd51c9d8 100644 --- a/drivers/ata/pata_cs5536.c +++ b/drivers/ata/pata_cs5536.c @@ -27,7 +27,7 @@ #include <scsi/scsi_host.h> #include <linux/dmi.h> -#ifdef CONFIG_X86_32 +#if defined(CONFIG_X86_32) && !defined(CONFIG_UML) #include <asm/msr.h> static int use_msr; module_param_named(msr, use_msr, int, 0644);
Hi Christoph, On Sun, Apr 16, 2023 at 8:20 AM Christoph Hellwig <hch@infradead.org> wrote: > On Fri, Apr 14, 2023 at 03:55:07PM +0200, Johannes Berg wrote: > > On Sun, 2023-04-09 at 18:13 -0700, Randy Dunlap wrote: > > > Current build of pata_cs5536 for i386 UML fails with: > > > > > > ERROR: modpost: "__tracepoint_write_msr" [drivers/ata/pata_cs5536.ko] undefined! > > > ERROR: modpost: "do_trace_write_msr" [drivers/ata/pata_cs5536.ko] undefined! > > > ERROR: modpost: "__tracepoint_read_msr" [drivers/ata/pata_cs5536.ko] undefined! > > > ERROR: modpost: "do_trace_read_msr" [drivers/ata/pata_cs5536.ko] undefined! > > > > > > Add the arch/x86/lib/msr.o binary to resolve these undefined symbols. > > > > > > > Hm. Does this make sense? I can't see it'd work on UML to configure an > > IDE device through MSRs? Surely that can't work? IOW, that entire driver > > can't really work anyway can it? > > > > OTOH, maybe theoretically it could work in PCI, just not with MSRs, and > > then this patch makes some sense? > > I think it is is integrated into actual Geode SOCs. That being > said something like the patch below seems as simple as it gets and > at least gives build coverage on uml CS5536 is the Geode Companion Device, i.e. the South Bridge, which can be used with other devices, AFAIK. Gr{oetje,eeting}s, Geert
diff -- a/arch/x86/um/Makefile b/arch/x86/um/Makefile --- a/arch/x86/um/Makefile +++ b/arch/x86/um/Makefile @@ -21,7 +21,7 @@ obj-y += checksum_32.o syscalls_32.o obj-$(CONFIG_ELF_CORE) += elfcore.o subarch-y = ../lib/string_32.o ../lib/atomic64_32.o ../lib/atomic64_cx8_32.o -subarch-y += ../lib/cmpxchg8b_emu.o ../lib/atomic64_386_32.o +subarch-y += ../lib/cmpxchg8b_emu.o ../lib/atomic64_386_32.o ../lib/msr.o subarch-y += ../kernel/sys_ia32.o else