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 2BBFBC54734 for ; Tue, 27 Aug 2024 13:52:30 +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:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=kdAODXXHs1qk0zUEub9dcTai5+Df0/AXug9c4YPfLL4=; b=CSyCkmISI9L1plxR5rGttJuo2l HJX/oOaS12sfILSnbEJImzwWiw7lraIrhwr+qrWgOfGotZZoqH11UqXMCkSPwf7LfEzGic030IvtS lAnkI1PwSAqO5PU6KiSvvO862pchz7UxUd4uD62MQzWF/NRT1fq/QsoNatVKEYeY2ouCkFp7vGHpL hpiHUPOc7caAnVkyuljlfJHNeIWE4AADee8ZHHCbgaZ08sMkcX7pUiYwZLTl2ATMGKXihJVhYRSj2 BlhsHK1Xq3b5fnNXmNefj7Fv8wW8rsdsU9a46njBlP6W+gWGgRkVjVE90lYdbHslVcu7t/8XHL5vV Khk2Vkjg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1siwcO-0000000BWtf-0iOA; Tue, 27 Aug 2024 13:52:20 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1siwbY-0000000BWkS-4Ba1 for linux-arm-kernel@lists.infradead.org; Tue, 27 Aug 2024 13:51:30 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4108DDA7; Tue, 27 Aug 2024 06:51:54 -0700 (PDT) Received: from [10.1.196.40] (e121345-lin.cambridge.arm.com [10.1.196.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4D5EC3F66E; Tue, 27 Aug 2024 06:51:27 -0700 (PDT) Message-ID: Date: Tue, 27 Aug 2024 14:51:25 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/8] perf/arm-cmn: Refactor node ID handling. Again. To: Ilkka Koskinen Cc: will@kernel.org, mark.rutland@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <998064aa2bdb0e39f91b4f1fea2f428689978ea9.1723229941.git.robin.murphy@arm.com> From: Robin Murphy Content-Language: en-GB In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240827_065129_101412_7D64FB86 X-CRM114-Status: UNSURE ( 7.15 ) X-CRM114-Notice: Please train this message. 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 24/08/2024 2:00 am, Ilkka Koskinen wrote: [...] >> static struct arm_cmn_node *arm_cmn_node_to_xp(const struct arm_cmn *cmn, >>                            const struct arm_cmn_node *dn) >> { >> -    struct arm_cmn_nodeid nid = arm_cmn_nid(cmn, dn->id); >> -    int xp_idx = cmn->mesh_x * nid.y + nid.x; >> +    int id = dn->id >> (dn->portid_bits + dn->deviceid_bits); >> +    int bits = arm_cmn_xyidbits(cmn); >> +    int x = id > bits; >                   ^^^ > > Instead of comparison, shouldn't that be bit shift? Oh dear indeed... and of course the effects of that would only show up on hardware configurations I don't have. Good catch, thanks! Cheers, Robin.