* [PATCH v2 1/1] fs: debugfs: fix build error at powerpc platform
@ 2023-10-02 14:57 Frank Li
2023-10-02 18:14 ` Arnd Bergmann
0 siblings, 1 reply; 3+ messages in thread
From: Frank Li @ 2023-10-02 14:57 UTC (permalink / raw)
To: bhe
Cc: Frank.Li, arnd, dmaengine, gregkh, imx, linux-kernel, lkp,
oe-kbuild-all, rafael, vkoul
ld: fs/debugfs/file.o: in function `debugfs_print_regs':
file.c:(.text+0x95a): undefined reference to `ioread64be'
>> ld: file.c:(.text+0x9dd): undefined reference to `ioread64'
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202309291322.3pZiyosI-lkp@intel.com/
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
Notes:
Change from v1 to v2
- fixed it by #include <linux/io-64-nonatomic-hi-lo.h>
fs/debugfs/file.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
index 5b8d4fd7c747..ca6208c49339 100644
--- a/fs/debugfs/file.c
+++ b/fs/debugfs/file.c
@@ -15,6 +15,7 @@
#include <linux/pagemap.h>
#include <linux/debugfs.h>
#include <linux/io.h>
+#include <linux/io-64-nonatomic-hi-lo.h>
#include <linux/slab.h>
#include <linux/atomic.h>
#include <linux/device.h>
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v2 1/1] fs: debugfs: fix build error at powerpc platform
2023-10-02 14:57 [PATCH v2 1/1] fs: debugfs: fix build error at powerpc platform Frank Li
@ 2023-10-02 18:14 ` Arnd Bergmann
2023-10-02 18:28 ` Frank Li
0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2023-10-02 18:14 UTC (permalink / raw)
To: Frank Li, Baoquan He
Cc: dmaengine, Greg Kroah-Hartman, imx, linux-kernel,
kernel test robot, oe-kbuild-all, Rafael J . Wysocki, Vinod Koul
On Mon, Oct 2, 2023, at 16:57, Frank Li wrote:
> ld: fs/debugfs/file.o: in function `debugfs_print_regs':
> file.c:(.text+0x95a): undefined reference to `ioread64be'
>>> ld: file.c:(.text+0x9dd): undefined reference to `ioread64'
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes:
> https://lore.kernel.org/oe-kbuild-all/202309291322.3pZiyosI-lkp@intel.com/
> Signed-off-by: Frank Li <Frank.Li@nxp.com>
> ---
I still think this is wrong, for the reasons I explained in
https://lore.kernel.org/all/b795ed61-0174-487f-a263-8431e7c76af5@app.fastmail.com/
The part that I had missed earlier is how this is
related to GENERIC_IOMAP, since on those architectures,
the ioread helpers are not just fixed-endian MMIO accessors
like readl and readq but also multiplex to the PIO functions
(inb/inw/inl) that do not have a 64-bit version because x86
and PCI both only define those up to 32 bit width.
The best workaround is probably to use readq() instead of
ioread64(), or swab64(readl()) instead of ioread64_be().
This should work on all 64-bit architectures, plus any 32-bit
one that defines readq(), so you can just use an 'ifdef readq'
around the call.
Arnd
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v2 1/1] fs: debugfs: fix build error at powerpc platform
2023-10-02 18:14 ` Arnd Bergmann
@ 2023-10-02 18:28 ` Frank Li
0 siblings, 0 replies; 3+ messages in thread
From: Frank Li @ 2023-10-02 18:28 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Baoquan He, dmaengine, Greg Kroah-Hartman, imx, linux-kernel,
kernel test robot, oe-kbuild-all, Rafael J . Wysocki, Vinod Koul
On Mon, Oct 02, 2023 at 08:14:47PM +0200, Arnd Bergmann wrote:
> On Mon, Oct 2, 2023, at 16:57, Frank Li wrote:
> > ld: fs/debugfs/file.o: in function `debugfs_print_regs':
> > file.c:(.text+0x95a): undefined reference to `ioread64be'
> >>> ld: file.c:(.text+0x9dd): undefined reference to `ioread64'
> >
> > Reported-by: kernel test robot <lkp@intel.com>
> > Closes:
> > https://lore.kernel.org/oe-kbuild-all/202309291322.3pZiyosI-lkp@intel.com/
> > Signed-off-by: Frank Li <Frank.Li@nxp.com>
> > ---
>
> I still think this is wrong, for the reasons I explained in
> https://lore.kernel.org/all/b795ed61-0174-487f-a263-8431e7c76af5@app.fastmail.com/
>
> The part that I had missed earlier is how this is
> related to GENERIC_IOMAP, since on those architectures,
> the ioread helpers are not just fixed-endian MMIO accessors
> like readl and readq but also multiplex to the PIO functions
> (inb/inw/inl) that do not have a 64-bit version because x86
> and PCI both only define those up to 32 bit width.
>
> The best workaround is probably to use readq() instead of
> ioread64(), or swab64(readl()) instead of ioread64_be().
>
> This should work on all 64-bit architectures, plus any 32-bit
> one that defines readq(), so you can just use an 'ifdef readq'
> around the call.
My previous patchs were dropped by vinod.
I think it'd better remove 64bit register at previous patch serise.
Let me create a seperate patch to enable 64bit register support for debug
fs.
Frank
>
> Arnd
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-02 18:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-02 14:57 [PATCH v2 1/1] fs: debugfs: fix build error at powerpc platform Frank Li
2023-10-02 18:14 ` Arnd Bergmann
2023-10-02 18:28 ` Frank Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox