From patchwork Tue Jun 13 15:52:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Catalin Marinas X-Patchwork-Id: 107455 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp670758vqr; Tue, 13 Jun 2023 09:23:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5vku59SIZ5V6wIUkbGSQ6xw2vXQ6yKkWPT+W4KvUtcXgDfM5elICgDA7GIo8FTEGxRj7Q4 X-Received: by 2002:a17:902:b18f:b0:1af:d812:d16 with SMTP id s15-20020a170902b18f00b001afd8120d16mr9381175plr.21.1686673407483; Tue, 13 Jun 2023 09:23:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686673407; cv=none; d=google.com; s=arc-20160816; b=WJH0wlPkmrsaq7K1Z4cIubT4FEnP+/liR/7+u5Hvj84LRz1hittI1TgG0axx8+OYvi vxLpZ01JJLB+6mfboFgpN7TMiLYhAmh9O9ViKPwDxyMEv6Ycp0vzn+eCMnWcJnIOwfT7 6t2wT7iC6CRxrbiCebedtrwI5ZreccH3fnXTjQVfExPEpmXdKrvNojXTyZ2VqYClMTMi 6AFQHRG4aEVXErV7OMmcfVorZ2Ptb48On8dOhogBj1Vym1a/anTV/TSSi/cnJwKu4qDg Ajn468UMiAk7fRDG1IY4ug/ktrqVRYCXJABSZiLJVhx8oPM3HlX7EefhpaEfrwHWMTKS exrg== 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=GQw0wiRGcXa018XfRxaZD8PocHePtgjx9k7inQODNY4=; b=OPBJHFADyTXAT0Y+dI0N+lbHPdqLKeIl/uMpLYa3MYiK9/e46RL7Jb9RQfVN+sDEWv XrlMFctPNb962UdmhT12NXwNbfs1GECFgjCcFzJ5lboLxvc3FcMlAEXP/nmdIAqWuxjd eYOl1doqmpisCip57J9TIizfhSE750H7mOvFkQjWg8j+YyRLrDqM3VJdqgOnidlszU+q niSwhcnb0bx+mVIYDR/PyMCMmE0pD5FWQpXbk+Maa9cO5S/RbuN6iKEg1m/LqkxYNFcb O5PexuRQKr54C3ZKdLKockzxGBvNWfvUgpk0Vk6fVSmYaGobj49Epd9xuitVAO3T6ZiF vc0g== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i4-20020a170902c94400b0019e57f5a5aesi9493634pla.567.2023.06.13.09.22.55; Tue, 13 Jun 2023 09:23:27 -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 S242974AbjFMPxD (ORCPT + 99 others); Tue, 13 Jun 2023 11:53:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242807AbjFMPxB (ORCPT ); Tue, 13 Jun 2023 11:53:01 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BEB91BC; Tue, 13 Jun 2023 08:53:00 -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 F2FCB61F1E; Tue, 13 Jun 2023 15:52:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2F14CC433F0; Tue, 13 Jun 2023 15:52:56 +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 Subject: [PATCH 3/3] sh: Move the ARCH_DMA_MINALIGN definition to asm/cache.h Date: Tue, 13 Jun 2023 16:52:45 +0100 Message-Id: <20230613155245.1228274-4-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 X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768605254651120259?= X-GMAIL-MSGID: =?utf-8?q?1768605254651120259?= The sh architecture defines ARCH_DMA_MINALIGN in asm/page.h. Move it 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 Cc: Yoshinori Sato Cc: Rich Felker Cc: John Paul Adrian Glaubitz Cc: linux-sh@vger.kernel.org --- arch/sh/include/asm/cache.h | 6 ++++++ arch/sh/include/asm/page.h | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/sh/include/asm/cache.h b/arch/sh/include/asm/cache.h index 32dfa6b82ec6..b38dbc975581 100644 --- a/arch/sh/include/asm/cache.h +++ b/arch/sh/include/asm/cache.h @@ -14,6 +14,12 @@ #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) +/* + * Some drivers need to perform DMA into kmalloc'ed buffers + * and so we have to increase the kmalloc minalign for this. + */ +#define ARCH_DMA_MINALIGN L1_CACHE_BYTES + #define __read_mostly __section(".data..read_mostly") #ifndef __ASSEMBLY__ diff --git a/arch/sh/include/asm/page.h b/arch/sh/include/asm/page.h index 09ac6c7faee0..62f4b9edcb98 100644 --- a/arch/sh/include/asm/page.h +++ b/arch/sh/include/asm/page.h @@ -174,10 +174,4 @@ typedef struct page *pgtable_t; #include #include -/* - * Some drivers need to perform DMA into kmalloc'ed buffers - * and so we have to increase the kmalloc minalign for this. - */ -#define ARCH_DMA_MINALIGN L1_CACHE_BYTES - #endif /* __ASM_SH_PAGE_H */