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 0B9FBC77B7F for ; Fri, 19 May 2023 15:49:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=d2qr5ZPCw1faRcVGWZBMpFodRX6NRaLLvjplcpEZj2Y=; b=Ykbwmp1HERx429 ZEzutAkd6ZvJHtenSvRWXvWBMGZ2WhlL6PbixXPBZYNlfWnRrmPHrE+xD/IqUSPf47aUtJZyFtCI3 o+oRO+89yyrYP1dsCgmxdnroZlAItMdXI+ZoOudRAWa4CEUi16GFRA7fA+OiHK/5GSvSspfCPARw4 JRRHzYhG9Q64RCCXk9a6NvrDxXNqWCnpLChlWtiwf1Zi+MSxrrQcFWN9hbTG5dZW5WTE0tSnvlpPN sQ+49pGx8I90isuFgHGmkKKfKWo3SGNtpM6mNZztNSEmbzakQFi0jGUFxVmGrRf/sDitpGa55iWek R5OhkwrzVxZ+EMhxFvOw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q02Ly-00Gdns-0L; Fri, 19 May 2023 15:49:14 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q02Lv-00GdnG-0T for linux-arm-kernel@lists.infradead.org; Fri, 19 May 2023 15:49:12 +0000 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 BCFA061138; Fri, 19 May 2023 15:49:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E4E51C433D2; Fri, 19 May 2023 15:49:06 +0000 (UTC) Date: Fri, 19 May 2023 16:49:04 +0100 From: Catalin Marinas To: Linus Torvalds , Arnd Bergmann , Christoph Hellwig , Greg Kroah-Hartman Cc: Will Deacon , Marc Zyngier , Andrew Morton , Herbert Xu , Ard Biesheuvel , Isaac Manjarres , Saravana Kannan , Alasdair Kergon , Daniel Vetter , Joerg Roedel , Mark Brown , Mike Snitzer , "Rafael J. Wysocki" , Robin Murphy , linux-mm@kvack.org, iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v4 01/15] mm/slab: Decouple ARCH_KMALLOC_MINALIGN from ARCH_DMA_MINALIGN Message-ID: References: <20230518173403.1150549-1-catalin.marinas@arm.com> <20230518173403.1150549-2-catalin.marinas@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230518173403.1150549-2-catalin.marinas@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230519_084911_242155_E79A5206 X-CRM114-Status: GOOD ( 16.64 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, May 18, 2023 at 06:33:49PM +0100, Catalin Marinas wrote: > diff --git a/include/linux/slab.h b/include/linux/slab.h > index 6b3e155b70bf..3f76e7c53ada 100644 > --- a/include/linux/slab.h > +++ b/include/linux/slab.h > @@ -235,14 +235,24 @@ void kmem_dump_obj(void *object); > * alignment larger than the alignment of a 64-bit integer. > * Setting ARCH_DMA_MINALIGN in arch headers allows that. > */ > -#if defined(ARCH_DMA_MINALIGN) && ARCH_DMA_MINALIGN > 8 > +#ifdef ARCH_DMA_MINALIGN > +#define ARCH_HAS_DMA_MINALIGN > +#if ARCH_DMA_MINALIGN > 8 && !defined(ARCH_KMALLOC_MINALIGN) > #define ARCH_KMALLOC_MINALIGN ARCH_DMA_MINALIGN > -#define KMALLOC_MIN_SIZE ARCH_DMA_MINALIGN > -#define KMALLOC_SHIFT_LOW ilog2(ARCH_DMA_MINALIGN) > +#endif > #else > +#define ARCH_DMA_MINALIGN __alignof__(unsigned long long) > +#endif > + > +#ifndef ARCH_KMALLOC_MINALIGN > #define ARCH_KMALLOC_MINALIGN __alignof__(unsigned long long) > #endif > > +#if ARCH_KMALLOC_MINALIGN > 8 > +#define KMALLOC_MIN_SIZE ARCH_KMALLOC_MINALIGN > +#define KMALLOC_SHIFT_LOW ilog2(KMALLOC_MIN_SIZE) > +#endif And another fixup here (reported by the test robot; I pushed the fixups to the git branch): diff --git a/include/linux/slab.h b/include/linux/slab.h index 3f76e7c53ada..50dcf9cfbf62 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -246,9 +246,7 @@ void kmem_dump_obj(void *object); #ifndef ARCH_KMALLOC_MINALIGN #define ARCH_KMALLOC_MINALIGN __alignof__(unsigned long long) -#endif - -#if ARCH_KMALLOC_MINALIGN > 8 +#elif ARCH_KMALLOC_MINALIGN > 8 #define KMALLOC_MIN_SIZE ARCH_KMALLOC_MINALIGN #define KMALLOC_SHIFT_LOW ilog2(KMALLOC_MIN_SIZE) #endif -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel