From patchwork Thu Oct 29 13:00:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Edworthy X-Patchwork-Id: 7518991 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3F5809F399 for ; Thu, 29 Oct 2015 13:00:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 71F3F20949 for ; Thu, 29 Oct 2015 13:00:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1309C2093C for ; Thu, 29 Oct 2015 13:00:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753521AbbJ2NAa (ORCPT ); Thu, 29 Oct 2015 09:00:30 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:15206 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751258AbbJ2NA3 convert rfc822-to-8bit (ORCPT ); Thu, 29 Oct 2015 09:00:29 -0400 Received: from unknown (HELO relmlir2.idc.renesas.com) ([10.200.68.152]) by relmlie1.idc.renesas.com with ESMTP; 29 Oct 2015 22:00:27 +0900 Received: from relmlac4.idc.renesas.com (relmlac4.idc.renesas.com [10.200.69.24]) by relmlir2.idc.renesas.com (Postfix) with ESMTP id 2B1534FBA2; Thu, 29 Oct 2015 22:00:27 +0900 (JST) Received: by relmlac4.idc.renesas.com (Postfix, from userid 0) id ECBD2480A4; Thu, 29 Oct 2015 22:00:26 +0900 (JST) Received: from relmlac4.idc.renesas.com (localhost [127.0.0.1]) by relmlac4.idc.renesas.com (Postfix) with ESMTP id D98A4480A3; Thu, 29 Oct 2015 22:00:26 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac4.idc.renesas.com with ESMTP id YBG24898; Thu, 29 Oct 2015 22:00:26 +0900 X-IronPort-AV: E=Sophos;i="5.20,214,1444662000"; d="scan'208";a="197477322" Received: from mail-sg2apc01lp0248.outbound.protection.outlook.com (HELO APC01-SG2-obe.outbound.protection.outlook.com) ([65.55.88.248]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA; 29 Oct 2015 22:00:25 +0900 Received: from PS1PR06MB1180.apcprd06.prod.outlook.com (10.169.63.140) by PS1PR06MB1177.apcprd06.prod.outlook.com (10.169.63.29) with Microsoft SMTP Server (TLS) id 15.1.306.13; Thu, 29 Oct 2015 13:00:23 +0000 Received: from PS1PR06MB1180.apcprd06.prod.outlook.com ([10.169.63.140]) by PS1PR06MB1180.apcprd06.prod.outlook.com ([10.169.63.140]) with mapi id 15.01.0306.003; Thu, 29 Oct 2015 13:00:23 +0000 From: Phil Edworthy To: Wolfram Sang CC: Bjorn Helgaas , Simon Horman , Nobuhiro Iwamatsu , Geert Uytterhoeven , "linux-pci@vger.kernel.org" , "linux-sh@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH 0/4] PCI: rcar: Add support for ARM64 and multiple instances Thread-Topic: [PATCH 0/4] PCI: rcar: Add support for ARM64 and multiple instances Thread-Index: AQHQ/P0BcR9ceUgNfUGFsDqB/FrMC56Ck0qAgAACDvA= Date: Thu, 29 Oct 2015 13:00:22 +0000 Message-ID: References: <1443781507-5011-1-git-send-email-phil.edworthy@renesas.com> <20151029123755.GC2351@katana> In-Reply-To: <20151029123755.GC2351@katana> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=phil.edworthy@renesas.com; x-originating-ip: [193.141.220.21] x-microsoft-exchange-diagnostics: 1; PS1PR06MB1177; 5:gaU6Ttzf1CKa1Do+CPIDRcFSnPjDJAWDYWVpgWMsS/k9ATip/4wnCvYxRTYv7FI3PaDZJn3pR9pFHz+VnTyuvB9XuZWN2aBjLgwsF/dyDbRSsz23dLz1grH3XcubnSgTD30eXkRaFm0KbcWLaHVT8g==; 24:/hlud9OuWjmy5LoRTZBULkEa0wz1nPyUrnjLHBAubOjS7UYAsv/xDcPoDj4SoD/fax/TktKtVnntDldM+HdiDXAk94reE6eOHcY4cVPc/Fk=; 20:nff+UiGSI7aT8d9n/AL0q5oGFEHbV8X9UwLERS3XPegrCXB8opMF0VomOoUTna6iM/rQJJORv/5+mSRSl+UPso7EMP03fnp34s7DT50jVhnrva8/ZG7GH6n/eoRe7JfdxZFS2vl1tl4dPYnxIr8sHdjDuuCc8AagNzGHcbec97c= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:PS1PR06MB1177; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(85106069007906); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(5005006)(520078)(3002001)(10201501046)(102215026); SRVR:PS1PR06MB1177; BCL:0; PCL:0; RULEID:; SRVR:PS1PR06MB1177; x-forefront-prvs: 0744CFB5E8 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(199003)(189002)(24454002)(105586002)(5008740100001)(5004730100002)(2900100001)(5001960100002)(122556002)(19580405001)(5002640100001)(110136002)(102836002)(106116001)(76176999)(5003600100002)(33656002)(189998001)(76576001)(2950100001)(54356999)(5007970100001)(40100003)(19580395003)(86362001)(575784001)(50986999)(15975445007)(77096005)(66066001)(101416001)(97736004)(106356001)(11100500001)(81156007)(74316001)(87936001)(92566002)(10400500002); DIR:OUT; SFP:1102; SCL:1; SRVR:PS1PR06MB1177; H:PS1PR06MB1180.apcprd06.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Oct 2015 13:00:22.6720 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: PS1PR06MB1177 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi Wolfram, On 29 October 2015 12:38, Wolfram wrote: > > Fixes and changes to get PCIe working on ARM64 with mulitple instances. > > > I've tested these on ARM (Koelsch board), and it works fine. > > I've also tested on ARM64 (Salvator-X board), but I currently have an issue > > I wanted to test these patches on arm64 as well, but even after merging > pci-next, I still get: > > drivers/pci/host/pcie-rcar.c: In function 'rcar_pcie_setup': > drivers/pci/host/pcie-rcar.c:380:4: error: implicit declaration of function > 'pci_ioremap_io' [-Werror=implicit-function-declaration] > > So, what do I miss? Ouch, my bad. I have been working with our out-of-tree BSP for the Salvator-X board on http://git.kernel.org/cgit/linux/kernel/git/horms/renesas-bsp.git, rcar-3.0.2 tag along with some patches from colleagues. I hadn't noticed this patch: From 913ff73dcf19bb57b0a7ad69e51105560d69fa9b Mon Sep 17 00:00:00 2001 From: Harunobu Kurokawa Date: Thu, 24 Sep 2015 22:55:58 +0900 Subject: [PATCH 03/15] arm64: PCI(e) arch support for ioremap function Refered the followings patch: http://lists.infradead.org/pipermail/linux-arm-kernel/2014-July/269206.html Signed-off-by: Harunobu Kurokawa --- arch/arm64/include/asm/io.h | 2 ++ arch/arm64/mm/ioremap.c | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h index 44be1e0..cea3651 100644 --- a/arch/arm64/include/asm/io.h +++ b/arch/arm64/include/asm/io.h @@ -149,6 +149,8 @@ static inline u64 __raw_readq(const volatile void __iomem *addr) #define IO_SPACE_LIMIT (PCI_IO_SIZE - 1) #define PCI_IOBASE ((void __iomem *)PCI_IO_START) +extern int pci_ioremap_io(unsigned int offset, phys_addr_t phys_addr); + /* * String version of I/O memory access operations. */ diff --git a/arch/arm64/mm/ioremap.c b/arch/arm64/mm/ioremap.c index 01e88c8..34f09a6 100644 --- a/arch/arm64/mm/ioremap.c +++ b/arch/arm64/mm/ioremap.c @@ -104,6 +104,19 @@ void __iomem *ioremap_cache(phys_addr_t phys_addr, size_t size) } EXPORT_SYMBOL(ioremap_cache); +#ifdef CONFIG_PCI +int pci_ioremap_io(unsigned int offset, phys_addr_t phys_addr) +{ + BUG_ON(offset + SZ_64K > IO_SPACE_LIMIT); + + return ioremap_page_range((unsigned long)PCI_IOBASE + offset, + (unsigned long)PCI_IOBASE + offset + SZ_64K, + phys_addr, + __pgprot(PROT_NORMAL_NC)); +} +EXPORT_SYMBOL_GPL(pci_ioremap_io); +#endif + /* * Must be called after early_fixmap_init */