Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755731AbaLIC0M (ORCPT ); Mon, 8 Dec 2014 21:26:12 -0500 Received: from e23smtp07.au.ibm.com ([202.81.31.140]:54512 "EHLO e23smtp07.au.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751103AbaLIC0K (ORCPT ); Mon, 8 Dec 2014 21:26:10 -0500 Date: Tue, 9 Dec 2014 10:26:01 +0800 From: Wei Yang To: Yinghai Lu , weiyang@linux.vnet.ibm.com, Gavin Shan Cc: Benjamin Herrenschmidt , Bjorn Helgaas , Marek =?iso-8859-1?Q?Kord=EDk?= , Alexey Voronkov , "linux-pci@vger.kernel.org" , Linux Kernel Mailing List Subject: Re: [PATCH] PCI: Clear bridge MEM_64 flag if one child does not support it Message-ID: <20141209022601.GA16207@richard> Reply-To: Wei Yang References: <1418075552-26495-1-git-send-email-yinghai@kernel.org> <1418079372.13358.9.camel@kernel.crashing.org> <20141209001119.GA24661@shangw> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141209001119.GA24661@shangw> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 14120902-0025-0000-0000-000000AE781E Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 09, 2014 at 11:11:19AM +1100, Gavin Shan wrote: >On Mon, Dec 08, 2014 at 03:59:54PM -0800, Yinghai Lu wrote: >>On Mon, Dec 8, 2014 at 2:56 PM, Benjamin Herrenschmidt >> wrote: >>> On Mon, 2014-12-08 at 13:52 -0800, Yinghai Lu wrote: >>>> 2. or scan the children resource other than ROM to clear bridge MEM_64 >>>> for mmio pref. >>>> >>>> The patch is using second way so will keep child mmio pref into bridge >>>> mmio pref range. >>> >>> That means that having a single ROM BAR that is 32-bit and prefetchable >>> will downgrade the entire window to 32-bit ? That's not going to work >>> either. >> >>the ROM BAR get skipped during the checking. >> >>+ if (i != PCI_ROM_RESOURCE) >>+ mem64_mask &= r->flags & IORESOURCE_MEM_64; >>+ } >> >>> >>> I have GPUs with 16G BARs for example... suddenly they don't fit >>> anaymore because we downgraded the window to 32 bit because somewhere >>> there's a 32-bit pref resource ? >>> >>> That will break more than it fixes... >> >>Please check if this patch break your platform. I tried on my setup on >>x86. and it is still >>working on 64 bit resource allocation. >> > >I'm going to give it a spin and Richard, could you please apply Yinghai's >patch to see if your SRIOV code can work properly? > Yinghai & Gavin, I did a quick test on my machine. This patch doesn't affect the MMIO allocation on out platform, so SRIOV works fine. I will spend more time to read the patch to get more understanding about the problem. >Thanks, >Gavin -- Richard Yang Help you, Help me -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/