Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp789990imj; Thu, 7 Feb 2019 11:53:03 -0800 (PST) X-Google-Smtp-Source: AHgI3IbDqhmAdszxNCqdyA+NxANjtaut+aSYmRocYCHVcqjVuX9jCdGgsqwONCBcb1fkqJ+795gV X-Received: by 2002:a17:902:d708:: with SMTP id w8mr10804435ply.294.1549569183660; Thu, 07 Feb 2019 11:53:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549569183; cv=none; d=google.com; s=arc-20160816; b=vccDWGMma4TusctlPVxYMQzPb7uGXsQdLhpRI2lz7vZbsAlhaiPVn7LfO3uLFmXdJl M2LpiaHVRTFKnTVB7LhSYDziVSGGXkVbCd4ZXk7WP6QxbBRwpOFPGXCcfk8X6GMJblRv XeiCGt/f8tZiuNY0AdkTaoqsrCSVxyhgsaAgnigyQAq1/Nxb0JZNVpjtpim7alPhHbN+ GcGWa1aODAoI3nb6eJbrZGyifhSpXvh8PoX92wSFfRO8c4r+kFpUHPec8+nbrXxI9Z6Y vdHEcWh2KiabYHccbby+q6/ajJaxri9AJSIhYbEH29+j2Gh4s9wDvDWbmQDtUBUvqnEu cHWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Yc5OZ6Y0zz2kQuMJRabjX19dPw4MuriOrTXEwzubak4=; b=wrEEQI2Mg7HxBLDjWaN0YQwC8mxmpnLDd+oFZdKVFT+brJ+Y6hS8L5V3ZCgIGZL5Qi uaanFju01CvRK7AgDJ03Q5+pW5DW41Nwlxt7uiYueEhHSgz+d+AiFImY6hviVui3lTz4 CMwCoS8MtNiBRYch8fHCU6t5Ot1A0NdPW+v3sDY/ah0a98oUGVrSG/DxTvpovyLvQsWn rc8rfj+itAWxg51O/rI+/5qSOyKCW7x5FcW5o/bOZHAwjyM9Cn9Ll/LNARLrFawuN1qx qHQe1XdLUTSE9+wz5je1zuRRXO4oH1oTQrs0JvHUY1awwyLIrnENvYhy1AXRcwJ1Uydr 8Oog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=e+hYjJZd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id d26si4879845pge.573.2019.02.07.11.52.47; Thu, 07 Feb 2019 11:53:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=e+hYjJZd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727221AbfBGTwf (ORCPT + 99 others); Thu, 7 Feb 2019 14:52:35 -0500 Received: from mail.kernel.org ([198.145.29.99]:55326 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727076AbfBGTwf (ORCPT ); Thu, 7 Feb 2019 14:52:35 -0500 Received: from localhost (unknown [69.71.4.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0E9A32147C; Thu, 7 Feb 2019 19:52:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549569154; bh=yNiMpTVg55DaX5Wf82kFMN/MvA5KnKfjzih2bD2G7iI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=e+hYjJZdsYNknAZCPGXeN2oMMyEhTpy+RSXu9dl/HyycUAcl8E7nH471ma+Mmeymp GG9RLlISCngYJDib5cVcO824lVsGIaNNBSIr0N3AOYzxbkXHR5YLdzkFeHyoHSi6mw 3UdqSqt4aB8x6fqygxfHjFJ0g5T6nEfy9CoaxMxs= Date: Thu, 7 Feb 2019 13:52:30 -0600 From: Bjorn Helgaas To: honghui.zhang@mediatek.com Cc: youlin.pei@mediatek.com, lorenzo.pieralisi@arm.com, poza@codeaurora.org, fred@fredlawl.com, linux-pci@vger.kernel.org, rafael.j.wysocki@intel.com, linux-kernel@vger.kernel.org, jianjun.wang@mediatek.com, ryder.lee@mediatek.com, linux-mediatek@lists.infradead.org, matthias.bgg@gmail.com, linux-arm-kernel@lists.infradead.org Subject: Re: [RFC PATCH] PCI/portdrv: Support for subtractive decode bridge Message-ID: <20190207195230.GJ7268@google.com> References: <1544758829-10327-1-git-send-email-honghui.zhang@mediatek.com> <20190207151816.GI7268@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190207151816.GI7268@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 07, 2019 at 09:18:16AM -0600, Bjorn Helgaas wrote: > On Fri, Dec 14, 2018 at 11:40:29AM +0800, honghui.zhang@mediatek.com wrote: > > From: Honghui Zhang > > > > The Class Code for subtractive decode PCI-to-PCI bridge is 060401h, > > change the class_mask values to make portdrv support this type bridge. > > I assume you have a Root Port or Switch Port that supports subtractive > decode? I'm trying to understand how such a device would work. > > Out of curiosity, can you show the "lspci -vv" output for the device > and the downstream devices of interest? Actually, since subtractive decode has to do with how the bridge interacts with its *peers*, what would be interesting is the host bridge window information from ACPI _CRS or DT and the lspci info for everything under that host bridge. Assuming we're talking about a Root Port, I guess that would mean anything inside the host bridge windows but outside the positive decode windows (the normal PCI-PCI bridge apertures in the Root Ports) would be claimed by the subtractive decode Root Port? I guess you would want this because this path ultimately leads to an ISA or similar bus where you don't know what resources the device actually consumes? Bjorn