From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 55E29569C; Fri, 19 May 2023 09:28:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3E2FEC433EF; Fri, 19 May 2023 09:28:09 +0000 (UTC) Date: Fri, 19 May 2023 10:28:06 +0100 From: Catalin Marinas To: kernel test robot 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' Message-ID: References: <202305191155.zjUXPrvO-lkp@intel.com> Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 > | 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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4F1A8C7EE26 for ; Fri, 19 May 2023 09:28:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yf6OUWE46EyoEJilcH4y/F49EFhEgOHIt3vYitddl6I=; b=vz1xJimca2iAov Pq+TRceOpnsC5ngSMTYTc2orIoOZLcaZaPkjxry5l8atc6c9U0FHIq6/abAHfh4iQ4GaOZREKFAsg A7rGDceBv1uFZjeQ6OAU/jbs8Cbm3zX3nULw2Q3a4iCXvhVl/wa29FWfTjqUXghSqGjhYsr49qNEk yAOqMIJQ1OmB2XF8Sm1MFZnu/mu4sWh/K45jS5GZNAAUNc5OHo9WunOT61wuGucSMhDPA/2F603Dq xchDDucs4rjlyISL2pkyH8mNQfrbUyR8dLshssTPr7TcUmXUSLISRoyIV1ApEZG95p+ny8FVsEizi wA3P2o6ZUwsWjXoq2YoQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pzwPH-00Fi8D-1K; Fri, 19 May 2023 09:28:15 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pzwPD-00Fi76-1V for linux-arm-kernel@lists.infradead.org; Fri, 19 May 2023 09:28:14 +0000 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 A291561521; Fri, 19 May 2023 09:28:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3E2FEC433EF; Fri, 19 May 2023 09:28:09 +0000 (UTC) Date: Fri, 19 May 2023 10:28:06 +0100 From: Catalin Marinas To: kernel test robot 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' Message-ID: References: <202305191155.zjUXPrvO-lkp@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <202305191155.zjUXPrvO-lkp@intel.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230519_022812_635101_352BBA46 X-CRM114-Status: GOOD ( 16.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 > | 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