Received: by 10.223.176.5 with SMTP id f5csp628554wra; Fri, 9 Feb 2018 04:46:34 -0800 (PST) X-Google-Smtp-Source: AH8x226xEg8tLg0NfHawewC0bZZ9eCeckFZ3VwzbAwbLHlOQmCsnNktVWlSQA1BeV/G3ubsL45gh X-Received: by 10.99.126.79 with SMTP id o15mr2327194pgn.364.1518180394341; Fri, 09 Feb 2018 04:46:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518180394; cv=none; d=google.com; s=arc-20160816; b=KNnxBuTeS5bBKRjcwB3rx4RtIiu+er75Dfn1Lio+OSrKqFcaqu4Wki8AKAhdB4BpOu VznvAtUD2T9lh7jp68QUL46jcUdFN1CL3kCOTI8XXZR1hA38dwYZL+1aVcVRo/cYytqM qFtkd3/x348BM7zRX2Sase5tVKeBcOJ8kmDL+B43HOQ3aucJDGO3WTaTyu2t8hg1+QIq NocKLPnaF/1X2fqCPeweh6Mbk0AqALV3+PCiXdWRyZpar0s65i3ZlaTlUM7FrUH+NqFB +NtTi519RfpZXuptAFJJJTXp3lax+Yr1qELE59MLYseEl2NKs1ob8rZx0S+xXICBZZhr aNUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:cc:references:to :subject:dkim-signature:arc-authentication-results; bh=X3r3mrRKpHQZizR7GhIRYqfHyiSaghpctZc72qffR1Y=; b=ImvjwgBPhgrDOwD+owEOFu1FXukYfqcp3jjDxK0SC9oi/M1Yw9En8AzzHDKNVIlXuN DZ8JzLcI1y1j/NLGLK9parAIv6+wnAA4YeAmy9l+m0/33ppoSh4IHh6QHgyJUv6+eqlz joJ1srrCE39po1RFgm6vEUiO9uFa5CCnAVXem7psnX8kmuSkYa0TDkxL8uU9Gzsvb0Oy 5R70KnnLQYzjxrlJxNxrIU/fjiI3TMhkklLmBz+Hi7lji50fYvo2UileSRfz7V1VejFE Xvhi55ySRUHOmCegzKI68NgnQodlTcNJ/+NdfbdOLrIhQpygDIv48nPUg5sqFpBpobJz Ymkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Z2e13iIA; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w12si882850pgp.407.2018.02.09.04.46.19; Fri, 09 Feb 2018 04:46:34 -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=@ti.com header.s=ti-com-17Q1 header.b=Z2e13iIA; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751087AbeBIMpK (ORCPT + 99 others); Fri, 9 Feb 2018 07:45:10 -0500 Received: from lelnx194.ext.ti.com ([198.47.27.80]:30565 "EHLO lelnx194.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750918AbeBIMpJ (ORCPT ); Fri, 9 Feb 2018 07:45:09 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id w19CirgK012846; Fri, 9 Feb 2018 06:44:53 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1518180293; bh=4QcCjzHGobTbprtdvy95z+JGVXNn1Wfjo8GCj/934aQ=; h=Subject:To:References:CC:From:Date:In-Reply-To; b=Z2e13iIA1RTrrFJkF6I3Pebrrh/Eusz7zJ+3jCfsE+e4AtgckpD9sLAKIiEuiZCRw MtQg7E2iirS01PSGWv1oC1Gh663baWivVx4KcZlwOBR2QvmJ9K7gWSPFaaH90fadVn pmD2q7um/O9bOLxmsT0bdOm8u3oIRhTn4sLDM2DM= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w19Cirfq014900; Fri, 9 Feb 2018 06:44:53 -0600 Received: from DLEE110.ent.ti.com (157.170.170.21) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Fri, 9 Feb 2018 06:44:53 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE110.ent.ti.com (157.170.170.21) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Fri, 9 Feb 2018 06:44:53 -0600 Received: from [172.24.190.233] (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w19Cin4B007396; Fri, 9 Feb 2018 06:44:50 -0600 Subject: Re: [PATCH v2 1/3] PCI: endpoint: Handle 64-bit BARs properly To: Bjorn Helgaas References: <20180208123346.20784-1-niklas.cassel@axis.com> <20180208123346.20784-2-niklas.cassel@axis.com> <20180208215735.GD98765@bhelgaas-glaptop.roam.corp.google.com> CC: Niklas Cassel , Lorenzo Pieralisi , Bjorn Helgaas , Sekhar Nori , Cyrille Pitchen , Niklas Cassel , Shawn Lin , John Keeping , , From: Kishon Vijay Abraham I Message-ID: <5e54c525-1b78-bef3-7f83-82eb872837da@ti.com> Date: Fri, 9 Feb 2018 18:14:49 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20180208215735.GD98765@bhelgaas-glaptop.roam.corp.google.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Bjorn, On Friday 09 February 2018 03:27 AM, Bjorn Helgaas wrote: > On Thu, Feb 08, 2018 at 06:17:32PM +0530, Kishon Vijay Abraham I wrote: >> Hi, >> >> On Thursday 08 February 2018 06:03 PM, Niklas Cassel wrote: >>> A 64-bit BAR uses the succeeding BAR for the upper bits, therefore >>> we cannot call pci_epc_set_bar() on a BAR that follows a 64-bit BAR. >>> >>> If pci_epc_set_bar() is called with flag PCI_BASE_ADDRESS_MEM_TYPE_64, >> >> Not related to $patch. But I have a query on when >> PCI_BASE_ADDRESS_MEM_TYPE_64 should be set. Whether if the size is > >> 4G or if the address can be mapped anywhere in the 64-bit PCIe >> address space or both? > > In general, PCI_BASE_ADDRESS_MEM_TYPE_64 should be set if the BAR is > 64 bits wide. IORESOURCE_MEM_64 is similar. okay, if the HW support 64bit BAR, 64 bit flag should be set and not based on size or anything else? Thanks Kishon