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 518C7E6FE30 for ; Fri, 6 Sep 2024 16:47:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=WpzrJwFWF69f5IefxBH9lpZ07tA454P/7WPhR9i11QI=; b=y1hTQsHQNaaqTMxXozbPke21Oh rRLZlbLM5EXCc22bUERgqWN8gZd9/UAWEuoX7KsSYp3qXIb0fD4ADhVbkIQO691qC849xJU+u5ggN xG1mWKWGNw+50gce23NzIDWrCnBW/6aTLQPWPrsn9xHkQ6FrJDhmaG6OssJ/MCKFBoAvrloL+ogI7 a3qVYnOgcoot0+S0TV+g1m+0WdSEUsZz3DdGNtsIMTZK5BpV0poFJqmyVROJHY8uLHxt/KMVYeBio 8W0IWbMFgIdtQ9CmMls8YIF4SYQSDhYZ8JWIOBW3SyTuTAYgmetolmAq6cZZqp++jbDXQpIrwkuPs QL7NofoQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1smc7U-0000000D1Za-0nD9; Fri, 06 Sep 2024 16:47:36 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1smc6P-0000000D1NR-2S5y for linux-arm-kernel@lists.infradead.org; Fri, 06 Sep 2024 16:46:33 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 39DC5A45165; Fri, 6 Sep 2024 16:46:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E5D33C4CEC4; Fri, 6 Sep 2024 16:46:26 +0000 (UTC) Date: Fri, 6 Sep 2024 17:46:24 +0100 From: Catalin Marinas To: Steven Price Cc: Marc Zyngier , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Will Deacon , Suzuki K Poulose Subject: Re: [PATCH 2/2] irqchip/gic-v3-its: Rely on genpool alignment Message-ID: References: <20240905091738.28544-1-steven.price@arm.com> <20240905091738.28544-3-steven.price@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240905091738.28544-3-steven.price@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240906_094632_076091_598D67CD X-CRM114-Status: GOOD ( 11.82 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Sep 05, 2024 at 10:17:38AM +0100, Steven Price wrote: > diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c > index 557214c774c3..49aacf96ade2 100644 > --- a/drivers/irqchip/irq-gic-v3-its.c > +++ b/drivers/irqchip/irq-gic-v3-its.c > @@ -700,7 +700,6 @@ static struct its_collection *its_build_mapd_cmd(struct its_node *its, > u8 size = ilog2(desc->its_mapd_cmd.dev->nr_ites); > > itt_addr = virt_to_phys(desc->its_mapd_cmd.dev->itt); > - itt_addr = ALIGN(itt_addr, ITS_ITT_ALIGN); > > its_encode_cmd(cmd, GITS_CMD_MAPD); > its_encode_devid(cmd, desc->its_mapd_cmd.dev->device_id); > @@ -3495,7 +3494,7 @@ static struct its_device *its_create_device(struct its_node *its, u32 dev_id, > */ > nr_ites = max(2, nvecs); > sz = nr_ites * (FIELD_GET(GITS_TYPER_ITT_ENTRY_SIZE, its->typer) + 1); > - sz = max(sz, ITS_ITT_ALIGN) + ITS_ITT_ALIGN - 1; > + sz = max(sz, ITS_ITT_ALIGN); Even without the gen_pool patch, I think the only problem was the slob allocator which we got rid of. > itt = itt_alloc_pool(its->numa_node, sz); With gen_pool created with a min order of get_order(ITS_ITT_ALIGN), I don't think we even need the sz = max(...) above. It's harmless though. Reviewed-by: Catalin Marinas