From patchwork Sun Sep 28 20:53:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Suthikulpanit, Suravee" X-Patchwork-Id: 38045 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9C5B2218C3 for ; Sun, 28 Sep 2014 20:54:57 +0000 (UTC) Received: by mail-wi0-f198.google.com with SMTP id n3sf1679341wiv.9 for ; Sun, 28 Sep 2014 13:54:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=D92E+aDeramWMkEBThOSFY6fPcxy7yW1LcO68d9EO5U=; b=Ahv+3SBgOc6j+Qb2mHjeez5SzOzzV8UwK4oRT4vAvw43VS2gOvqNUK48yDpzJYpq+P 3K6ZehQZ2AHo7RrQrdv308F61f5cgo5YdHwSQrALz3qpFZY4A7UI7NvoaUknflmnJxWn 5T2GB60fqvMZMGEWIwl2s18VPz+dVBxQt5ZPtUN6mj7+l5wpsIlgv5d2Wz4DaZnS/S93 JflAh8nv2tmqe/MLtzsm2v4j8HeTRLEgvMKYjghM2c8WzHyyr+r2LF4ah4yg7hNPY6ik oFXgSTjEbNtYDU34ZRjXHvJfA/zDvqpczZkh+HyHzIFwkHlhGd7jnkBh2K96tjJHk/Ba M+4Q== X-Gm-Message-State: ALoCoQnfQRNJhmDH8yqC/+B/4dSTpWKxGvWu2kG7ZyVi93kDNDXvFv8Rq9AsjIHFXoCSbAaSVTof X-Received: by 10.181.8.226 with SMTP id dn2mr5446854wid.4.1411937696822; Sun, 28 Sep 2014 13:54:56 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.20.6 with SMTP id j6ls535961lae.24.gmail; Sun, 28 Sep 2014 13:54:56 -0700 (PDT) X-Received: by 10.152.4.165 with SMTP id l5mr35478796lal.49.1411937696492; Sun, 28 Sep 2014 13:54:56 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com [209.85.215.45]) by mx.google.com with ESMTPS id n5si15963032lbc.90.2014.09.28.13.54.56 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 28 Sep 2014 13:54:56 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by mail-la0-f45.google.com with SMTP id q1so5318247lam.32 for ; Sun, 28 Sep 2014 13:54:56 -0700 (PDT) X-Received: by 10.152.88.16 with SMTP id bc16mr15420177lab.56.1411937696375; Sun, 28 Sep 2014 13:54:56 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.130.169 with SMTP id of9csp85254lbb; Sun, 28 Sep 2014 13:54:55 -0700 (PDT) X-Received: by 10.68.190.9 with SMTP id gm9mr8204663pbc.151.1411937694460; Sun, 28 Sep 2014 13:54:54 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ef7si20141473pac.71.2014.09.28.13.54.53 for ; Sun, 28 Sep 2014 13:54:54 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754376AbaI1Uyu (ORCPT + 27 others); Sun, 28 Sep 2014 16:54:50 -0400 Received: from mail-by2on0123.outbound.protection.outlook.com ([207.46.100.123]:56592 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753525AbaI1Uyp (ORCPT ); Sun, 28 Sep 2014 16:54:45 -0400 Received: from BY2PR02CA005.namprd02.prod.outlook.com (10.255.247.25) by BN1PR02MB197.namprd02.prod.outlook.com (10.242.214.146) with Microsoft SMTP Server (TLS) id 15.0.1039.15; Sun, 28 Sep 2014 20:54:42 +0000 Received: from BN1BFFO11FD027.protection.gbl (2a01:111:f400:7c10::1:191) by BY2PR02CA005.outlook.office365.com (2a01:111:e400:2c16::25) with Microsoft SMTP Server (TLS) id 15.0.1039.15 via Frontend Transport; Sun, 28 Sep 2014 20:54:41 +0000 Received: from atltwp02.amd.com (165.204.84.222) by BN1BFFO11FD027.mail.protection.outlook.com (10.58.144.90) with Microsoft SMTP Server id 15.0.1029.15 via Frontend Transport; Sun, 28 Sep 2014 20:54:39 +0000 X-WSS-ID: 0NCMQ2Y-08-OWM-02 X-M-MSG: Received: from satlvexedge02.amd.com (satlvexedge02.amd.com [10.177.96.29]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by atltwp02.amd.com (Axway MailGate 5.3.1) with ESMTPS id 2A75FD1602A; Sun, 28 Sep 2014 15:54:33 -0500 (CDT) Received: from SATLEXDAG05.amd.com (10.181.40.11) by SATLVEXEDGE02.amd.com (10.177.96.29) with Microsoft SMTP Server (TLS) id 14.3.195.1; Sun, 28 Sep 2014 15:55:01 -0500 Received: from ssuthiku-fedora-lt.amd.com (10.180.168.240) by satlexdag05.amd.com (10.181.40.11) with Microsoft SMTP Server id 14.3.195.1; Sun, 28 Sep 2014 16:54:36 -0400 From: To: , , , , , , , , CC: , , , , , Suravee Suthikulpanit , Liviu Dudau Subject: [RFC 3/4] arm64: Do not call enable PCI resources when specify PCI_PROBE_ONLY Date: Sun, 28 Sep 2014 15:53:29 -0500 Message-ID: <1411937610-22125-4-git-send-email-suravee.suthikulpanit@amd.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1411937610-22125-1-git-send-email-suravee.suthikulpanit@amd.com> References: <1411937610-22125-1-git-send-email-suravee.suthikulpanit@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:165.204.84.222; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(428002)(189002)(199003)(10300001)(86362001)(20776003)(120916001)(93916002)(64706001)(85852003)(102836001)(101416001)(50986999)(89996001)(85306004)(21056001)(88136002)(105586002)(47776003)(31966008)(19580395003)(95666004)(44976005)(87286001)(83072002)(53416004)(62966002)(48376002)(76482002)(83322001)(19580405001)(229853001)(50466002)(86152002)(92566001)(87936001)(92726001)(50226001)(97736003)(84676001)(36756003)(2201001)(33646002)(4396001)(104166001)(79102003)(80022003)(106466001)(99396003)(74502003)(76176999)(77156001)(107046002)(81342003)(77982003)(90102001)(68736004)(81542003)(46102003)(77096002)(74662003); DIR:OUT; SFP:1102; SCL:1; SRVR:BN1PR02MB197; H:atltwp02.amd.com; FPR:; MLV:sfv; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:BN1PR02MB197; X-Forefront-PRVS: 03484C0ABF Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-OriginatorOrg: amd4.onmicrosoft.com Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: suravee.suthikulpanit@amd.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Suravee Suthikulpanit When specify PCI_PROBE_ONLY, the resource parent does not get assigned. Therefore, pci_enable_resources() return error saying that "BAR x not claimed". Note: This same logic is also used in the arch/arm/kernel/bios32.c Cc: Liviu Dudau Cc: Bjorn Helgaas Cc: Will Deacon Cc: Catalin Marinas Signed-off-by: Suravee Suthikulpanit --- arch/arm64/kernel/pci.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c index ce5836c..7fd4d2b 100644 --- a/arch/arm64/kernel/pci.c +++ b/arch/arm64/kernel/pci.c @@ -68,3 +68,11 @@ void pci_bus_assign_domain_nr(struct pci_bus *bus, struct device *parent) bus->domain_nr = domain; } #endif + +int pcibios_enable_device(struct pci_dev *dev, int mask) +{ + if (pci_has_flag(PCI_PROBE_ONLY)) + return 0; + + return pci_enable_resources(dev, mask); +}