From patchwork Mon Oct 14 13:07:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 13835011 X-Patchwork-Delegate: manivannanece23@gmail.com Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 860D61AB508; Mon, 14 Oct 2024 13:07:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728911260; cv=none; b=g6YofNmIFT1U3eXQak4FBkNi7AZ/6Oq21rb1jFFA8pEhbE0lwsEO6de12FGRfxl7VHQkKEqIqZGHhXZuNVyu5SZ8V2pFqt+vtYlaBrT7gDE/Ajz2eJ4O96gDqx1vjrKvOSfIf6K7LYdkpie0XJtab/gAY0QJ8U6tHfK5h4iy4eU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728911260; c=relaxed/simple; bh=9BTRwWkPM2WPp5j1i5kzqC7QIFL1b8FvDjCOakdpO3o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tHxQMrustCAt0AXULkiM8YWW0fjF5AbjOj2u5aiB+knbcff/1lN5BNuTohL2YJ5LORirGzePeJzPrJL44FcLZK/XV8tYZb6Fu+OEJe6JCELc0IogonJ1zDTb1dehnRrm+C/NUv9lvM8jivcEJog+z0UjP1fkh0hWxLl6H/gN3Rw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=RMWpEqQr; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=9VP4hrHH; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=RMWpEqQr; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=9VP4hrHH; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="RMWpEqQr"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="9VP4hrHH"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="RMWpEqQr"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="9VP4hrHH" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id B67071FE61; Mon, 14 Oct 2024 13:07:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1728911256; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=V2CRT0BA7K09BgT5YL2JQfhcvweXAfO6F7Tmt9UwGBs=; b=RMWpEqQrTz5dWbeRcC2GsLzQ24HBXqs8SlVufV1NMeeEkT7m7DG5JVFbTeTu/SEyiOeqCS 2LNwUdmdMyKtCCW/NAXI33Yb4Pp2RU+NomZezBXy9M8G8wb8KSNyRNfcBee6T9h7A0KBDb /D9K3IIZGzNDzLfVO+dt+CItxHmVMeE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1728911256; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=V2CRT0BA7K09BgT5YL2JQfhcvweXAfO6F7Tmt9UwGBs=; b=9VP4hrHHVbM2n+KgaSy4/OZLkGoFHq1tsbY/0lCNoBGcfTjQ7c+MlxXo0T/HxFqt58Mn3j bwoUZGcVHdFqPACA== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=RMWpEqQr; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=9VP4hrHH DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1728911256; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=V2CRT0BA7K09BgT5YL2JQfhcvweXAfO6F7Tmt9UwGBs=; b=RMWpEqQrTz5dWbeRcC2GsLzQ24HBXqs8SlVufV1NMeeEkT7m7DG5JVFbTeTu/SEyiOeqCS 2LNwUdmdMyKtCCW/NAXI33Yb4Pp2RU+NomZezBXy9M8G8wb8KSNyRNfcBee6T9h7A0KBDb /D9K3IIZGzNDzLfVO+dt+CItxHmVMeE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1728911256; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=V2CRT0BA7K09BgT5YL2JQfhcvweXAfO6F7Tmt9UwGBs=; b=9VP4hrHHVbM2n+KgaSy4/OZLkGoFHq1tsbY/0lCNoBGcfTjQ7c+MlxXo0T/HxFqt58Mn3j bwoUZGcVHdFqPACA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id A77BB13A42; Mon, 14 Oct 2024 13:07:35 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id WPpZJpcXDWcqTwAAD6G6ig (envelope-from ); Mon, 14 Oct 2024 13:07:35 +0000 From: Stanimir Varbanov To: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rpi-kernel@lists.infradead.org, linux-pci@vger.kernel.org, Broadcom internal kernel review list Cc: Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Jim Quinlan , Nicolas Saenz Julienne , Bjorn Helgaas , Lorenzo Pieralisi , kw@linux.com, Philipp Zabel , Andrea della Porta , Phil Elwell , Jonathan Bell , Stanimir Varbanov Subject: [PATCH v3 04/11] PCI: brcmstb: Expand inbound size calculation helper Date: Mon, 14 Oct 2024 16:07:03 +0300 Message-ID: <20241014130710.413-5-svarbanov@suse.de> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241014130710.413-1-svarbanov@suse.de> References: <20241014130710.413-1-svarbanov@suse.de> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: B67071FE61 X-Spam-Level: X-Spamd-Result: default: False [-1.51 / 50.00]; BAYES_HAM(-3.00)[100.00%]; SUSPICIOUS_RECIPS(1.50)[]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_TWELVE(0.00)[21]; FUZZY_BLOCKED(0.00)[rspamd.com]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FREEMAIL_CC(0.00)[linutronix.de,kernel.org,broadcom.com,gmail.com,google.com,linux.com,pengutronix.de,suse.com,raspberrypi.com,suse.de]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:dkim,suse.de:mid]; RCVD_VIA_SMTP_AUTH(0.00)[]; TAGGED_RCPT(0.00)[dt]; DKIM_TRACE(0.00)[suse.de:+]; R_RATELIMIT(0.00)[to_ip_from(RLw7mkaud87zuqqztkur5718rm)]; FREEMAIL_ENVRCPT(0.00)[gmail.com] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -1.51 X-Spam-Flag: NO BCM2712 memory map can supports up to 64GB of system memory, thus expand the inbound size calculation in helper function up to 64GB. Signed-off-by: Stanimir Varbanov Reviewed-by: Florian Fainelli --- v2 -> v3: - Added Reviewed-by tags. - Improved patch description (Florian). drivers/pci/controller/pcie-brcmstb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c index 9321280f6edb..b0ef2f31914d 100644 --- a/drivers/pci/controller/pcie-brcmstb.c +++ b/drivers/pci/controller/pcie-brcmstb.c @@ -309,8 +309,8 @@ static int brcm_pcie_encode_ibar_size(u64 size) if (log2_in >= 12 && log2_in <= 15) /* Covers 4KB to 32KB (inclusive) */ return (log2_in - 12) + 0x1c; - else if (log2_in >= 16 && log2_in <= 35) - /* Covers 64KB to 32GB, (inclusive) */ + else if (log2_in >= 16 && log2_in <= 36) + /* Covers 64KB to 64GB, (inclusive) */ return log2_in - 15; /* Something is awry so disable */ return 0;