Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3179871pxj; Mon, 10 May 2021 21:27:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy6hZDX+VVlJmS8WkzqzGPBeWHDCm5JWHK44Rx1eytDWzuJ5lfDEastJgwwCj3SyjDzrs2r X-Received: by 2002:a17:906:a887:: with SMTP id ha7mr28968546ejb.365.1620707279090; Mon, 10 May 2021 21:27:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620707279; cv=none; d=google.com; s=arc-20160816; b=X6fseuU6aUEzbyQrSxag0oTJANkbLMeXQnVb5BgqRl9OGw4T1rC0y4TGd03EtmB/hw f8R8a1EObBJfgGofkETm8Cg9Bt2jUpWB/CGuaVEjDdItSLlLZ4L8se0S/zk19h1A0wd9 YnfPOXvWsxyH5P8JnAnLjZmxzh9bPnag1+i+SQB+xRByvedANT5lESxjZuLkbs/dzCCg 7DvBX3Ge0eT+qUIaDZzRgkZI6amE/5QEA8PoZyavDPhXnRAz2RB7bQ8etBYx8Eh1hGkN u0Ksfjdyo2JEsNJmKACWmcdtRrMjsx5xmIiKj9ZJh5l6ofBaEspfyRH0UA6KEmhXh4OR OxyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=KlHTwLuXefTG7UFati9w0MVbnUe7bxerTPnaYf49pvY=; b=NQrVdOBCfT8c2v6pBncc4h6DV5GeWSRksJmXgo3olOHj601qszjBY9m5fHcWPPcqDR /+kH2B0SQQpclfjWouD5MmnmX7oIxIynBsE39OVucawebtSdPhmCv+AuP+ybBA+4KRhc ns5CqLKSDsEIFk8MSEVGV+tNm5J+/3I0lDAfxP778sJ+3yn3c/RApYoTH2VQvcX92wmj qDxGxmpOyD2gmRUNmxt8kLCYf7jzS0CPSdDj7AUKfDYJkpXZ78wP4MFs+uL/5N/qsmWy LZOOYIDp7PFV9ahvGs04EnswxEolHxYfqMsfdZrAk0rDcUHFQ2Ef7eiTu4AyXQetqZJ0 8/2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=l14XsSKl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j27si14422379edj.600.2021.05.10.21.27.33; Mon, 10 May 2021 21:27:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=l14XsSKl; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229932AbhEKE1q (ORCPT + 99 others); Tue, 11 May 2021 00:27:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:44766 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229809AbhEKE1q (ORCPT ); Tue, 11 May 2021 00:27:46 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 49F7B61924; Tue, 11 May 2021 04:26:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1620707200; bh=wRXSAlpFD5A3K59gxjiDb9yv86dHCRapJK897k/KZVM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=l14XsSKl9CxxOWYR42hUKlBFXXCqRsNU0iQ4lXBq84RT8rQETaimZfDzd2C1O3cJ8 ygzYxkJuXRaxvAlaso+ih1MmvzmUQGvQdB/p5jgvZE4b3agkOHQbIIg/+6PvbfAD9B aK+EBGI6IftrjECs634bxCoLoY8Q2ZFKFH5YN1xXgO+yrZIo+MsvOaeF4Y96Rzd4/9 /YakEPdViMqYioKWHCcUCPmXwEfFna+c9tHKT7HMCEr1FGdJgUqOKUcaKRD3hOe1Ss Ir3in3DzvZsc60STYQByK6eRJGTYKK6UHT9gRCeGoNrIsnYrOm+4B+9WRJ7uMinmKw XdR5n98ZXteUA== Received: by mail-ot1-f54.google.com with SMTP id t4-20020a05683014c4b02902ed26dd7a60so6309424otq.7; Mon, 10 May 2021 21:26:40 -0700 (PDT) X-Gm-Message-State: AOAM533QfxNr6mtt6RnQOf7S82HlyVDUZfzouF8plRJz3e3ssQRj+y0q 8rTbLN7QGHU04tDWqL6zvJMN3ynUp+rgOwbC7VA= X-Received: by 2002:a9d:69c5:: with SMTP id v5mr23927948oto.108.1620707199581; Mon, 10 May 2021 21:26:39 -0700 (PDT) MIME-Version: 1.0 References: <20210511021656.17719-1-ansuelsmth@gmail.com> In-Reply-To: From: Ard Biesheuvel Date: Tue, 11 May 2021 06:26:28 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] arm: Enlarge IO_SPACE_LIMIT needed for some SoC To: Ansuel Smith Cc: Matthew Wilcox , Russell King , Jonathan Corbet , Linus Walleij , Florian Fainelli , Abbott Liu , Luis Chamberlain , Palmer Dabbelt , Linux Doc Mailing List , Linux Kernel Mailing List , Linux ARM Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 11 May 2021 at 04:32, Ansuel Smith wrote: > > On Tue, May 11, 2021 at 03:24:29AM +0100, Matthew Wilcox wrote: > > On Tue, May 11, 2021 at 04:16:54AM +0200, Ansuel Smith wrote: > > > Ipq8064 SoC requires larger IO_SPACE_LIMIT on second and third pci port. > > > > Do you really? I mean, yes, theoretically, I understand it, the > > hardware supports 64kB of I/O port space per root port. But I/O > > port space is rather deprecated these days. My laptop has precisely > > two devices with I/O ports, one with 64 bytes and the other with 32 > > bytes. Would you really suffer by allocating 16kB of I/O port > > space to each root port? > > We were talking about this in the other wrong patch. I also think this > much space looks wrong. The current ipq806x dts have this space so it's > actually broken from a long time. The only reason pci worked before was > because the pci driver didn't actually check if the settings were right. > New kernel introduced more checks and this problem showed up. (to be > more precise, the pci port are commonly used by the ath10k wifi and the > second ath10k wifi fails to init because of this problem) > If you can give me any hint on how to check if the space can be reduced > I would be very happy to investigate it. > In the driver I notice that the max buffer is set to 2k, could be this a > hint? > Could you share the output of lspci -vv from such a system? I agree with Matthew that fiddling with the size of the I/O space range probably papers over another problem, and with the odd exception, no PCIe card used on ARM systems actually uses their I/O BARs, even when they have them. (I used to carry a PCIe serial port card to UEFI plugfests because that was the only thing that would stop working if a system configured its I/O resource window incorrectly)