Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1722994rwd; Tue, 13 Jun 2023 13:12:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6Hk9116FKAfiRSC+OWhy7uU/RDPwusOB/ny8WPJrIMHmGOtlYsKB/sLLLpCCd+1iRc+s2E X-Received: by 2002:a17:907:1c93:b0:97d:f8aa:6d37 with SMTP id nb19-20020a1709071c9300b0097df8aa6d37mr13652381ejc.61.1686687153705; Tue, 13 Jun 2023 13:12:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686687153; cv=none; d=google.com; s=arc-20160816; b=fsaodo0Bma4t/fnT1GBlyIUPZmEbMxLbNKP7a75C7MWdOIEtV64wOI8YRzZzFH9H6P 5KlhFQABzz+0Tq61xq2fRmSYzFlRWZ5BAKHUX958HDIuopX8MhIEA+JEMti8XR4bwet3 ilc0Kmjis6cL9ZWFBeHNIyhKldu+LW60XF1rvG9ndPnXw68fe1AzNIiuUdsqoxzLxKdV Z+OX3j0AUm1CzuNZMVFhjkM/s52K4Lo77J9bJOF9dw2+zc7LiZ4kaR/7sHlV773lFBwa STthuupu6bq9H8QqPg0MiOHgYO4R5jBm8pWJ2qJSDDkxr003Gsrl4nG6rshCoX0403ij Mwtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=6zLa0WPOmEMvR+V1QtqA65+qPECdR/ipUqpB9aBVcDE=; b=CjlTvhrcYSxOYHlBGilAr9I7JB/zJzKgxCjdvkMIQrcZH5NsPvE0eRfaYlFZJbR/94 MQLjBVXNpZqQ8mTXA4J15rZ6VMXt7kdZCPacii8yl2scehsOA2wE+lNlHA6Uzz5nGFIc 508uPeQSzbMswVC8ri6PW6C7zektxriymN5ygEQCixzOE9W5Rs5v8c4XJxzlPGYgseBh duosewDhn6xy5b08/SkX5/1VUrN4tFxZX1zdZC/h4QCysO9ndJIQjVTjFWS5TRa+aDds 6+hKETXUIV+wo9PBNCtIR7Xc1dGpVCYayuEMTuYBmYJRcEhp5iNkFcZSG+OLBI3JiCfE 9Uhw== 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 q19-20020a1709066b1300b0097455b9d069si7593802ejr.1033.2023.06.13.13.12.07; Tue, 13 Jun 2023 13:12:33 -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 S234635AbjFMTtb (ORCPT + 99 others); Tue, 13 Jun 2023 15:49:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231882AbjFMTt2 (ORCPT ); Tue, 13 Jun 2023 15:49:28 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93E11170E; Tue, 13 Jun 2023 12:49:27 -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 BF3E560AB8; Tue, 13 Jun 2023 19:49:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E29E4C433D9; Tue, 13 Jun 2023 19:49:20 +0000 (UTC) Date: Tue, 13 Jun 2023 20:49:18 +0100 From: Catalin Marinas To: Christophe Leroy Cc: Andrew Morton , Linus Torvalds , Vlastimil Babka , Michael Ellerman , Nicholas Piggin , 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: Re: [PATCH 0/3] Move the ARCH_DMA_MINALIGN definition to asm/cache.h Message-ID: References: <20230613155245.1228274-1-catalin.marinas@arm.com> <5cc13519-e606-4dca-b22c-2dcb7bf06d32@csgroup.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5cc13519-e606-4dca-b22c-2dcb7bf06d32@csgroup.eu> 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 On Tue, Jun 13, 2023 at 04:42:40PM +0000, Christophe Leroy wrote: > > > Le 13/06/2023 ? 17:52, Catalin Marinas a ?crit?: > > Hi, > > > > The ARCH_KMALLOC_MINALIGN reduction series defines a generic > > ARCH_DMA_MINALIGN in linux/cache.h: > > > > https://lore.kernel.org/r/20230612153201.554742-2-catalin.marinas@arm.com/ > > > > Unfortunately, this causes a duplicate definition warning for > > microblaze, powerpc (32-bit only) and sh as these architectures define > > ARCH_DMA_MINALIGN in a different file than asm/cache.h. Move the macro > > to asm/cache.h to avoid this issue and also bring them in line with the > > other architectures. > > What about mips ? > > arch/mips/include/asm/mach-generic/kmalloc.h:#define ARCH_DMA_MINALIGN 128 > arch/mips/include/asm/mach-ip32/kmalloc.h:#define ARCH_DMA_MINALIGN 32 > arch/mips/include/asm/mach-ip32/kmalloc.h:#define ARCH_DMA_MINALIGN 128 > arch/mips/include/asm/mach-n64/kmalloc.h:#define ARCH_DMA_MINALIGN L1_CACHE_BYTES > arch/mips/include/asm/mach-tx49xx/kmalloc.h:#define ARCH_DMA_MINALIGN L1_CACHE_BYTES Sorry, I should have mentioned it in the cover letter (discussed here - https://lore.kernel.org/r/ZIhPaixb%2F0ve7zZo@arm.com/). These kmalloc.h files are included in asm/cache.h, based on which machine is enabled, so there's no problem for mips. It makes more sense to keep them in those mach-*/kmalloc.h files instead of having lots of #ifdefs in cache.h. -- Catalin