From: Catalin Marinas <catalin.marinas@arm.com>
To: kernel test robot <lkp@intel.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
linux-arm-kernel@lists.infradead.org
Subject: Re: [arm64:devel/kmalloc-minalign 14/15] mm/slab_common.c:872:6: error: use of undeclared identifier 'io_tlb_default_mem'
Date: Fri, 19 May 2023 10:28:06 +0100 [thread overview]
Message-ID: <ZGdBJl2VUURUWA0J@arm.com> (raw)
In-Reply-To: <202305191155.zjUXPrvO-lkp@intel.com>
On Fri, May 19, 2023 at 12:21:57PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git devel/kmalloc-minalign
> head: fb23b58c4b9af85f4be40fda6918fb03c558f052
> commit: c6bfb3f07647d9d3e454ff481dfd10ddb3d925f7 [14/15] mm: slab: Reduce the kmalloc() minimum alignment if DMA bouncing possible
> config: arm-randconfig-r025-20230517
> compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project b0fb98227c90adf2536c9ad644a74d5e92961111)
> reproduce (this is a W=1 build):
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # install arm cross compiling tool for clang build
> # apt-get install binutils-arm-linux-gnueabi
> # https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/commit/?id=c6bfb3f07647d9d3e454ff481dfd10ddb3d925f7
> git remote add arm64 https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git
> git fetch --no-tags arm64 devel/kmalloc-minalign
> git checkout c6bfb3f07647d9d3e454ff481dfd10ddb3d925f7
> # save the config file
> mkdir build_dir && cp config build_dir/.config
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm olddefconfig
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash
>
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202305191155.zjUXPrvO-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
> >> mm/slab_common.c:872:6: error: use of undeclared identifier 'io_tlb_default_mem'
> io_tlb_default_mem.nslabs == 0)
> ^
> 1 error generated.
Ah, I forgot that not all arches have the SWIOTLB enabled. I'll fold the
hunk below in the next update. Thanks for the report.
diff --git a/mm/slab_common.c b/mm/slab_common.c
index 84e5a5e435d6..a57aa1a7e7de 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -864,6 +864,7 @@ void __init setup_kmalloc_cache_index_table(void)
}
}
+#ifdef CONFIG_SWIOTLB
static unsigned int __kmalloc_minalign(void)
{
int cache_align = dma_get_cache_alignment();
@@ -874,6 +875,12 @@ static unsigned int __kmalloc_minalign(void)
return ARCH_KMALLOC_MINALIGN;
}
+#else
+static unsigned int __kmalloc_minalign(void)
+{
+ return dma_get_cache_alignment();
+}
+#endif
void __init
new_kmalloc_cache(int idx, enum kmalloc_cache_type type, slab_flags_t flags)
--
Catalin
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
parent reply other threads:[~2023-05-19 9:28 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <202305191155.zjUXPrvO-lkp@intel.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZGdBJl2VUURUWA0J@arm.com \
--to=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).