Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1482123rwd; Tue, 13 Jun 2023 09:39:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ751Log6uXYdNd3kdndWi1mvw8FMvRoxdqPAzJ9PgE57BC4WQVktnCCLlyRMi5uHY8Ic1LX X-Received: by 2002:a17:90a:468c:b0:25c:2dc:361f with SMTP id z12-20020a17090a468c00b0025c02dc361fmr3702717pjf.31.1686674348785; Tue, 13 Jun 2023 09:39:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686674348; cv=none; d=google.com; s=arc-20160816; b=cX8lbQIARKMDBui+mnhcygne2valhtZCbr8r6t95G7rkuu+3AFbpDO0gShzjczDCqs p9alba863HWSJSNA6AsS08ZX+i7gwdn+UBOkDyoaNmjKd+eAhhAShzDiCQJ19hSGKoEa GH2uVfG5SGiEuYmEvjS+miPv1Ug4kXBIh9wSb3gwJIwx6OTu/7crAjQp6xYHo3N/DyUU k8eQhXlf0zOEpPgfBnzGF4vwyZPFlqt2Hv/BC27OEURBhU1eMnmVsaBUvGzbfGPyKYU+ mOfdTJ2b4CR7CAQlJmnD548GeIF9C5EMhLpWaQ/nwozw7SbD//ucWLK7nmMYefqPyZ1E pjOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ZWFtnaYOKnzE7nuQsYo60kMP3tnCr7xZmmhPWpwUP9U=; b=BNRSB685xwdiEtubBSEyyyiw3kmrlPxemA1sUqPrvETpcYfw+0ln7k0qMv9LZy/vFU Mn5ZnRaHGLhWnfDoETl5dY82C8uFMLaSZHRGHYy+2YZpXnRND6ltpVFp4PgnXqnsUItB v3bLkBzaZ/mm04Qjobwaku0vXRtbFYNguMLFJxq0RwQWrKNClvnvq6MjbW4Z/pzMzXH8 mJzhMXB0C9bEHM54WQOIotgn9ElKxVMxr8d9rTJF/hiMtrql2/xH3/c3qH5WsM9ZXrkL oupxy7+NjFfQehpm+FYUAkzWz8yd8rx/PpQKa2NCLLGpdSYHuDDiCTLiU2Z16oRVS7wm NDIw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 8-20020a17090a004800b0024e3c22a7dbsi10979259pjb.113.2023.06.13.09.38.57; Tue, 13 Jun 2023 09:39:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240619AbjFMPw4 (ORCPT + 99 others); Tue, 13 Jun 2023 11:52:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237274AbjFMPwz (ORCPT ); Tue, 13 Jun 2023 11:52:55 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31A5F1AC; Tue, 13 Jun 2023 08:52:54 -0700 (PDT) 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 BD85A633BC; Tue, 13 Jun 2023 15:52:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C6635C433F1; Tue, 13 Jun 2023 15:52:50 +0000 (UTC) From: Catalin Marinas To: Andrew Morton Cc: Linus Torvalds , Vlastimil Babka , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Michal Simek , Yoshinori Sato , Rich Felker , John Paul Adrian Glaubitz , linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, kernel test robot Subject: [PATCH 1/3] powerpc: Move the ARCH_DMA_MINALIGN definition to asm/cache.h Date: Tue, 13 Jun 2023 16:52:43 +0100 Message-Id: <20230613155245.1228274-2-catalin.marinas@arm.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230613155245.1228274-1-catalin.marinas@arm.com> References: <20230613155245.1228274-1-catalin.marinas@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The powerpc architecture defines ARCH_DMA_MINALIGN in asm/page_32.h and only if CONFIG_NOT_COHERENT_CACHE is enabled (32-bit platforms only). Move this macro to asm/cache.h to allow a generic ARCH_DMA_MINALIGN definition in linux/cache.h without redefine errors/warnings. Signed-off-by: Catalin Marinas Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202306131053.1ybvRRhO-lkp@intel.com/ Cc: Michael Ellerman Cc: Nicholas Piggin Cc: Christophe Leroy Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/include/asm/cache.h | 4 ++++ arch/powerpc/include/asm/page_32.h | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/include/asm/cache.h b/arch/powerpc/include/asm/cache.h index ae0a68a838e8..69232231d270 100644 --- a/arch/powerpc/include/asm/cache.h +++ b/arch/powerpc/include/asm/cache.h @@ -33,6 +33,10 @@ #define IFETCH_ALIGN_BYTES (1 << IFETCH_ALIGN_SHIFT) +#ifdef CONFIG_NOT_COHERENT_CACHE +#define ARCH_DMA_MINALIGN L1_CACHE_BYTES +#endif + #if !defined(__ASSEMBLY__) #ifdef CONFIG_PPC64 diff --git a/arch/powerpc/include/asm/page_32.h b/arch/powerpc/include/asm/page_32.h index 56f217606327..b9ac9e3a771c 100644 --- a/arch/powerpc/include/asm/page_32.h +++ b/arch/powerpc/include/asm/page_32.h @@ -12,10 +12,6 @@ #define VM_DATA_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS32 -#ifdef CONFIG_NOT_COHERENT_CACHE -#define ARCH_DMA_MINALIGN L1_CACHE_BYTES -#endif - #if defined(CONFIG_PPC_256K_PAGES) || \ (defined(CONFIG_PPC_8xx) && defined(CONFIG_PPC_16K_PAGES)) #define PTE_SHIFT (PAGE_SHIFT - PTE_T_LOG2 - 2) /* 1/4 of a page */