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 67AF0E668B1 for ; Sat, 20 Dec 2025 17:38:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To: Content-Type:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To :Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=horH9CBmhkNGsp1lq0gmO/OTTd6pHUkaLeg/I2169Zg=; b=LZPzrnOM7W1rSXaCF+h9vSIC1H d1ZoB0G7GxoZrqkwf1nXw7j+0VMJ4xHRDwVizqD59ycdKvFjrMInfhvFDZsACfvZqGRvi9I3y2HqA sOqRKzfweYTWuD6Wq5uiX+X/PE/3Kqb8SmRaq0LfJBfoxMAM/caoViMn33/hule4HIu7xi87jB1pI 7QvV3qXlOVR31GiKPWGdEa8lvULCkG7TzybzQRb8ZMSyeEuIRYyTTZBPY8Hj9ZBGjCS0pnFyos8Vr UHzpQ0qYGDFalOuR1eHURixj6CllgxrimACJ3zfBVj4pQn9R2LZ+7poxh24KWDQ2KkgamLmcBGBXH U8IbvF1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vX0tw-0000000BmjY-1NTp; Sat, 20 Dec 2025 17:37:56 +0000 Received: from mgamail.intel.com ([192.198.163.10]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vX0tt-0000000Bmij-0QhG for linux-arm-kernel@lists.infradead.org; Sat, 20 Dec 2025 17:37:54 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1766252273; x=1797788273; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=ZjJ3WshKbqsummQRbdCDiWBW16+8R9IjNscHTzIFoZY=; b=Vz2pSmJ9drxKFUyNATtDvXdZ6fOsL2ARFQb5IOaL/xV+c4TwEm3n8Ylf PuafDLrGBn6S9YXf9IuV1Z0bngy3+SXN0Mst9apm5xojJuKjCNzTtRuuf w5KaVn/1sc9BqX5WX+pjwl6/UpttboGNEJPx0dCeno07BQSkBqTcT1WLm HxQSEI4mg6IGzXAbf5lJ6uwgBf/P4l1hXCajwWDQU5Z++TEzDyOmssrHz PgjuCa09R+FRWxUhMUldplrakbyxCbb2YCZpWG4f6uO2RUxtXTJW1ad7d ggFHEJjHzVI1EZ2QOm7pU2mMyYNAePrh+EU+fud5OQJ8rdCw3XS9CyphD g==; X-CSE-ConnectionGUID: VY2Lbfl/S5mtbJFdq7AAIA== X-CSE-MsgGUID: 7I7+KRHESWm2TaaJ24oo5w== X-IronPort-AV: E=McAfee;i="6800,10657,11648"; a="79547256" X-IronPort-AV: E=Sophos;i="6.21,164,1763452800"; d="scan'208";a="79547256" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2025 09:37:49 -0800 X-CSE-ConnectionGUID: AH5DQBOtSTG8o5r+GG6cOg== X-CSE-MsgGUID: DgFt65WaRCGsdZWvZrV8rA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,164,1763452800"; d="scan'208";a="199123719" Received: from igk-lkp-server01.igk.intel.com (HELO 8a0c053bdd2a) ([10.211.93.152]) by orviesa007.jf.intel.com with ESMTP; 20 Dec 2025 09:37:45 -0800 Received: from kbuild by 8a0c053bdd2a with local (Exim 4.98.2) (envelope-from ) id 1vX0ti-000000004iu-23hx; Sat, 20 Dec 2025 17:37:42 +0000 Date: Sat, 20 Dec 2025 18:37:38 +0100 From: kernel test robot To: Barry Song <21cnbao@gmail.com>, catalin.marinas@arm.com, m.szyprowski@samsung.com, robin.murphy@arm.com, will@kernel.org Subject: Re: [PATCH 5/6] dma-mapping: Allow batched DMA sync operations if supported by the arch Message-ID: <202512201836.f6KX6WMH-lkp@intel.com> References: <20251219053658.84978-6-21cnbao@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20251219053658.84978-6-21cnbao@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20251220_093753_185958_B17B4816 X-CRM114-Status: GOOD ( 12.13 ) 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: , Cc: v-songbaohua@oppo.com, zhengtangquan@oppo.com, ryan.roberts@arm.com, anshuman.khandual@arm.com, maz@kernel.org, llvm@lists.linux.dev, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, oe-kbuild-all@lists.linux.dev, surenb@google.com, ardb@kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Barry, kernel test robot noticed the following build errors: [auto build test ERROR on linus/master] [also build test ERROR on next-20251219] [cannot apply to arm64/for-next/core v6.16-rc1] [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/Barry-Song/arm64-Provide-dcache_by_myline_op_nosync-helper/20251219-195810 base: linus/master patch link: https://lore.kernel.org/r/20251219053658.84978-6-21cnbao%40gmail.com patch subject: [PATCH 5/6] dma-mapping: Allow batched DMA sync operations if supported by the arch config: x86_64-kexec (https://download.01.org/0day-ci/archive/20251220/202512201836.f6KX6WMH-lkp@intel.com/config) compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251220/202512201836.f6KX6WMH-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202512201836.f6KX6WMH-lkp@intel.com/ All errors (new ones prefixed by >>): >> kernel/dma/direct.c:456:4: error: call to undeclared function 'dma_direct_unmap_phys_batch_add'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 456 | dma_direct_unmap_phys_batch_add(dev, sg->dma_address, | ^ kernel/dma/direct.c:456:4: note: did you mean 'dma_direct_unmap_phys'? kernel/dma/direct.h:188:20: note: 'dma_direct_unmap_phys' declared here 188 | static inline void dma_direct_unmap_phys(struct device *dev, dma_addr_t addr, | ^ >> kernel/dma/direct.c:484:22: error: call to undeclared function 'dma_direct_map_phys_batch_add'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 484 | sg->dma_address = dma_direct_map_phys_batch_add(dev, sg_phys(sg), | ^ 2 errors generated. vim +/dma_direct_unmap_phys_batch_add +456 kernel/dma/direct.c 439 440 /* 441 * Unmaps segments, except for ones marked as pci_p2pdma which do not 442 * require any further action as they contain a bus address. 443 */ 444 void dma_direct_unmap_sg(struct device *dev, struct scatterlist *sgl, 445 int nents, enum dma_data_direction dir, unsigned long attrs) 446 { 447 struct scatterlist *sg; 448 int i; 449 bool need_sync = false; 450 451 for_each_sg(sgl, sg, nents, i) { 452 if (sg_dma_is_bus_address(sg)) { 453 sg_dma_unmark_bus_address(sg); 454 } else { 455 need_sync = true; > 456 dma_direct_unmap_phys_batch_add(dev, sg->dma_address, 457 sg_dma_len(sg), dir, attrs); 458 } 459 } 460 if (need_sync && !dev_is_dma_coherent(dev)) 461 arch_sync_dma_batch_flush(); 462 } 463 #endif 464 465 int dma_direct_map_sg(struct device *dev, struct scatterlist *sgl, int nents, 466 enum dma_data_direction dir, unsigned long attrs) 467 { 468 struct pci_p2pdma_map_state p2pdma_state = {}; 469 struct scatterlist *sg; 470 int i, ret; 471 bool need_sync = false; 472 473 for_each_sg(sgl, sg, nents, i) { 474 switch (pci_p2pdma_state(&p2pdma_state, dev, sg_page(sg))) { 475 case PCI_P2PDMA_MAP_THRU_HOST_BRIDGE: 476 /* 477 * Any P2P mapping that traverses the PCI host bridge 478 * must be mapped with CPU physical address and not PCI 479 * bus addresses. 480 */ 481 break; 482 case PCI_P2PDMA_MAP_NONE: 483 need_sync = true; > 484 sg->dma_address = dma_direct_map_phys_batch_add(dev, sg_phys(sg), 485 sg->length, dir, attrs); 486 if (sg->dma_address == DMA_MAPPING_ERROR) { 487 ret = -EIO; 488 goto out_unmap; 489 } 490 break; 491 case PCI_P2PDMA_MAP_BUS_ADDR: 492 sg->dma_address = pci_p2pdma_bus_addr_map( 493 p2pdma_state.mem, sg_phys(sg)); 494 sg_dma_len(sg) = sg->length; 495 sg_dma_mark_bus_address(sg); 496 continue; 497 default: 498 ret = -EREMOTEIO; 499 goto out_unmap; 500 } 501 sg_dma_len(sg) = sg->length; 502 } 503 504 if (need_sync && !dev_is_dma_coherent(dev)) 505 arch_sync_dma_batch_flush(); 506 return nents; 507 508 out_unmap: 509 dma_direct_unmap_sg(dev, sgl, i, dir, attrs | DMA_ATTR_SKIP_CPU_SYNC); 510 return ret; 511 } 512 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki