* [PATCH v3] UML: pata_cs5536: fix build for X86_32 UML with TRACEPOINTS
@ 2023-04-10 1:13 Randy Dunlap
2023-04-11 17:01 ` kernel test robot
2023-04-14 13:55 ` Johannes Berg
0 siblings, 2 replies; 6+ messages in thread
From: Randy Dunlap @ 2023-04-10 1:13 UTC (permalink / raw)
To: linux-kernel
Cc: Randy Dunlap, Richard Weinberger, Anton Ivanov, Johannes Berg,
Damien Le Moal, linux-ide, linux-um, Geert Uytterhoeven
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(-)
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3] UML: pata_cs5536: fix build for X86_32 UML with TRACEPOINTS
2023-04-10 1:13 [PATCH v3] UML: pata_cs5536: fix build for X86_32 UML with TRACEPOINTS Randy Dunlap
@ 2023-04-11 17:01 ` kernel test robot
2023-04-14 13:55 ` Johannes Berg
1 sibling, 0 replies; 6+ messages in thread
From: kernel test robot @ 2023-04-11 17:01 UTC (permalink / raw)
To: Randy Dunlap, linux-kernel
Cc: oe-kbuild-all, Randy Dunlap, Richard Weinberger, Anton Ivanov,
Johannes Berg, Damien Le Moal, linux-ide, linux-um,
Geert Uytterhoeven
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
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3] UML: pata_cs5536: fix build for X86_32 UML with TRACEPOINTS
2023-04-10 1:13 [PATCH v3] UML: pata_cs5536: fix build for X86_32 UML with TRACEPOINTS Randy Dunlap
2023-04-11 17:01 ` kernel test robot
@ 2023-04-14 13:55 ` Johannes Berg
2023-04-14 15:29 ` Randy Dunlap
2023-04-16 6:20 ` Christoph Hellwig
1 sibling, 2 replies; 6+ messages in thread
From: Johannes Berg @ 2023-04-14 13:55 UTC (permalink / raw)
To: Randy Dunlap, linux-kernel
Cc: Richard Weinberger, Anton Ivanov, Damien Le Moal, linux-ide,
linux-um, Geert Uytterhoeven
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3] UML: pata_cs5536: fix build for X86_32 UML with TRACEPOINTS
2023-04-14 13:55 ` Johannes Berg
@ 2023-04-14 15:29 ` Randy Dunlap
2023-04-16 6:20 ` Christoph Hellwig
1 sibling, 0 replies; 6+ messages in thread
From: Randy Dunlap @ 2023-04-14 15:29 UTC (permalink / raw)
To: Johannes Berg, linux-kernel
Cc: Richard Weinberger, Anton Ivanov, Damien Le Moal, linux-ide,
linux-um, Geert Uytterhoeven
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.
--
~Randy
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3] UML: pata_cs5536: fix build for X86_32 UML with TRACEPOINTS
2023-04-14 13:55 ` Johannes Berg
2023-04-14 15:29 ` Randy Dunlap
@ 2023-04-16 6:20 ` Christoph Hellwig
2023-04-16 9:43 ` Geert Uytterhoeven
1 sibling, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2023-04-16 6:20 UTC (permalink / raw)
To: Johannes Berg
Cc: Randy Dunlap, linux-kernel, Richard Weinberger, Anton Ivanov,
Damien Le Moal, linux-ide, linux-um, Geert Uytterhoeven
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);
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v3] UML: pata_cs5536: fix build for X86_32 UML with TRACEPOINTS
2023-04-16 6:20 ` Christoph Hellwig
@ 2023-04-16 9:43 ` Geert Uytterhoeven
0 siblings, 0 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2023-04-16 9:43 UTC (permalink / raw)
To: Christoph Hellwig
Cc: Johannes Berg, Randy Dunlap, linux-kernel, Richard Weinberger,
Anton Ivanov, Damien Le Moal, linux-ide, linux-um
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
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-04-16 9:43 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-10 1:13 [PATCH v3] UML: pata_cs5536: fix build for X86_32 UML with TRACEPOINTS Randy Dunlap
2023-04-11 17:01 ` kernel test robot
2023-04-14 13:55 ` Johannes Berg
2023-04-14 15:29 ` Randy Dunlap
2023-04-16 6:20 ` Christoph Hellwig
2023-04-16 9:43 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox