Message ID | 20230613155245.1228274-1-catalin.marinas@arm.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp659043vqr; Tue, 13 Jun 2023 09:08:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5xcSxNAtZWokgid0ivV+qEfiW5TvKt9veUdbVxVVddVvapMLUCcXM9Qht5IOzTP+BOUaak X-Received: by 2002:a19:d609:0:b0:4ef:e895:cff2 with SMTP id n9-20020a19d609000000b004efe895cff2mr5440492lfg.64.1686672485943; Tue, 13 Jun 2023 09:08:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686672485; cv=none; d=google.com; s=arc-20160816; b=jJbu5P6xAFm8sWVdxpo7laPApHCDaa8t6v6nROC0c7JlmU3c4Rvhuxn2ti2YPFiIZa adOwbGQXq4qqoTKKQIm/RWcer9Fb9b7TRJK+qHbqYIhOxq2ZrXkQbvV0GKfhojKe4t4u NRihLRDNshA5yTSFTxtXf7sQtzoIl0KCPjF7BxjDhJpDzQmiaqaAtcUwT5514VceGXeA dedfKnS+Rnye6CbrCGL5BggwiJP3JQszeZdjqp4FgA2v73zvBhL/GeSDYTYpCIDFMqOy 14Lki2/WWdcG101ooyCMnPW/v15rTOtePdYlTjLdQRvafth9pB2MlptCqtL5ATy7wkaw fe5w== 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 :message-id:date:subject:cc:to:from; bh=1KMdg4h2rdyKwg2MZCVnpO5GIJhVhtCCo3vx/8VF8EE=; b=O3KpxtYyLVpCllp8r9/ujJN89NONA/51AdqBbKuQWIovy5lY8Atq/7pqxnsQ6rmYK4 MrsvbBsMQtY/PvbF0eSrtLCPS4fpFvN42A+yJYqOrkIkQmGhCZB63N+u07J7HR90GYAB UlkvIjpCEUg2xD6rcI1XyLtuBxRrIuboWSKKqH7O2ccgrP9eDJOSyTNwef7zYuGG62bY ibg1+r+sDF7nTLNz4O+fxHER7OcJu7Cf0EURC2r46Vq6BWqKDBiK7DJ8GAc/mjhAfTkv taEIEe9ceaKz3cEbShu5JwEwEgnHFG/zsLfAAkf2jtHFVgNjwTkeKx/lAaqEnRWW32mc 390A== 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 w1-20020a170906184100b00977cc168e2csi6430291eje.262.2023.06.13.09.07.37; Tue, 13 Jun 2023 09:08:05 -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 S237409AbjFMPwz (ORCPT <rfc822;lekhanya01809@gmail.com> + 99 others); Tue, 13 Jun 2023 11:52:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237195AbjFMPww (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 13 Jun 2023 11:52:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F406D1AC; Tue, 13 Jun 2023 08:52:51 -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 049CF633BC; Tue, 13 Jun 2023 15:52:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D806C433F0; Tue, 13 Jun 2023 15:52:48 +0000 (UTC) From: Catalin Marinas <catalin.marinas@arm.com> To: Andrew Morton <akpm@linux-foundation.org> Cc: Linus Torvalds <torvalds@linux-foundation.org>, Vlastimil Babka <vbabka@suse.cz>, Michael Ellerman <mpe@ellerman.id.au>, Nicholas Piggin <npiggin@gmail.com>, Christophe Leroy <christophe.leroy@csgroup.eu>, Michal Simek <monstr@monstr.eu>, Yoshinori Sato <ysato@users.sourceforge.jp>, Rich Felker <dalias@libc.org>, John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/3] Move the ARCH_DMA_MINALIGN definition to asm/cache.h Date: Tue, 13 Jun 2023 16:52:42 +0100 Message-Id: <20230613155245.1228274-1-catalin.marinas@arm.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768604288658701290?= X-GMAIL-MSGID: =?utf-8?q?1768604288658701290?= |
Series |
Move the ARCH_DMA_MINALIGN definition to asm/cache.h
|
|
Message
Catalin Marinas
June 13, 2023, 3:52 p.m. UTC
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. Andrew, if the arch maintainers cc'ed are fine with such change, could you please take these three patches together with the ARCH_KMALLOC_MINALIGN series? Thank you. Catalin Marinas (3): powerpc: Move the ARCH_DMA_MINALIGN definition to asm/cache.h microblaze: Move the ARCH_{DMA,SLAB}_MINALIGN definitions to asm/cache.h sh: Move the ARCH_DMA_MINALIGN definition to asm/cache.h arch/microblaze/include/asm/cache.h | 5 +++++ arch/microblaze/include/asm/page.h | 5 ----- arch/powerpc/include/asm/cache.h | 4 ++++ arch/powerpc/include/asm/page_32.h | 4 ---- arch/sh/include/asm/cache.h | 6 ++++++ arch/sh/include/asm/page.h | 6 ------ 6 files changed, 15 insertions(+), 15 deletions(-)
Comments
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 > > Andrew, if the arch maintainers cc'ed are fine with such change, could > you please take these three patches together with the > ARCH_KMALLOC_MINALIGN series? > > Thank you. > > Catalin Marinas (3): > powerpc: Move the ARCH_DMA_MINALIGN definition to asm/cache.h > microblaze: Move the ARCH_{DMA,SLAB}_MINALIGN definitions to > asm/cache.h > sh: Move the ARCH_DMA_MINALIGN definition to asm/cache.h > > arch/microblaze/include/asm/cache.h | 5 +++++ > arch/microblaze/include/asm/page.h | 5 ----- > arch/powerpc/include/asm/cache.h | 4 ++++ > arch/powerpc/include/asm/page_32.h | 4 ---- > arch/sh/include/asm/cache.h | 6 ++++++ > arch/sh/include/asm/page.h | 6 ------ > 6 files changed, 15 insertions(+), 15 deletions(-) >
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.