From patchwork Mon Jan 14 13:24:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 155472 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3656631jaa; Mon, 14 Jan 2019 05:26:47 -0800 (PST) X-Google-Smtp-Source: ALg8bN6CdPZhRmQUKQIQ6UZNoR0/hC4FB0s5rXVUXwiSoptDjn7MP85a/GxB8OjqwJlY2/Us79Lu X-Received: by 2002:a62:5b44:: with SMTP id p65mr25031036pfb.47.1547472407071; Mon, 14 Jan 2019 05:26:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547472407; cv=none; d=google.com; s=arc-20160816; b=1K8AMN6hnH0f0JQZjcsWrZQpoxMqKguFkaZzn3FQ+zYxSv+TSG+GAiaKw4zF+0HCGW 2cHiWo+HONnnSZweT647iys8DYjP67Pkga2Ev20ofhIGsyWFmOmYdEN4/I8WyqiLNObP k4axkE1o7vDPi3GLzithfX9Z7mILBFBXWYRNyqVRUvC6VX5uTa7hBh7+ujW2uIKeb5JP roEtFp1mH6TJGqOGfi7sBh3tbD2YngDrAYdrCBLr5VADoxagRaT6v3v0H6Mv6AfjkBd1 hbB79pRVvpVFIod3zvKvc+0HAs6vjq40KJ7EZ7NvvHU9nyUiJRlPZog0hEHUjCoO+Dj/ xd4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=GogJmhPjCHQln5mVKUVQZbQ+wSVFSwsYqqaCZro7fL4=; b=tFzYoB0NsaeUHSKpcEVtOZ9aa0FlXezlxs0CC6aYIIP0JfJTXvGNimGhonaTgYLDOz 9NBvpo+UoiB0OK0aCPVlgL8gOG5yLur/xY051Xr0C/HZznEB7MrKt246adc5jx0trD+/ NlAfFPtuNWs10+FtKpGBCXU6rzUoonK0X6zAFPUiUs5kUjSEHF6CXjjhRY1zMxpNR8nV c30jVPrTevsIgJ3/q+qGKfzyDlmqOtzVOaz89uLDXAobT6oYj9Z4RzZD6DOm4FdKmzhD aYrL1NEEmNzdxqgtg49Pz7Timc3WDQvGN9Rhe6LDzEOawaijWRk9ytMr/VeM2bRm0314 kthw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=oQwcW9+v; 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 o13si319419pgp.540.2019.01.14.05.26.46; Mon, 14 Jan 2019 05:26:47 -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=oQwcW9+v; 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 S1726894AbfANN0q (ORCPT + 31 others); Mon, 14 Jan 2019 08:26:46 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:37448 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726854AbfANN0n (ORCPT ); Mon, 14 Jan 2019 08:26:43 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id x0EDPs7b098170; Mon, 14 Jan 2019 07:25:54 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1547472354; bh=GogJmhPjCHQln5mVKUVQZbQ+wSVFSwsYqqaCZro7fL4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=oQwcW9+vGGXoQFzkFFMkyS+/zrvRPAh6e8C6iKuoM321++ugdV9tsIdhwMx4bUefT q2c6YRMMK5tmUormImD1GnWa5OSED4Q1P9ROShpg0uhaRBPXB2zI1b+ETJyqCPIlw0 eOOzcDA/5QjxHbYmskQxV04UEJWa8F7ohOM13sac= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x0EDPsSB088982 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 14 Jan 2019 07:25:54 -0600 Received: from DLEE100.ent.ti.com (157.170.170.30) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Mon, 14 Jan 2019 07:25:54 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Mon, 14 Jan 2019 07:25:54 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id x0EDOoWY028516; Mon, 14 Jan 2019 07:25:49 -0600 From: Kishon Vijay Abraham I To: Gustavo Pimentel , Rob Herring , Lorenzo Pieralisi CC: Kishon Vijay Abraham I , Jingoo Han , Bjorn Helgaas , Mark Rutland , Arnd Bergmann , Greg Kroah-Hartman , Murali Karicheri , Jesper Nilsson , , , , , , Subject: [PATCH 12/24] PCI: keystone: Prevent ARM32 specific code to be compiled for ARM64 Date: Mon, 14 Jan 2019 18:54:12 +0530 Message-ID: <20190114132424.6445-13-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190114132424.6445-1-kishon@ti.com> References: <20190114132424.6445-1-kishon@ti.com> MIME-Version: 1.0 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 hook_fault_code is an ARM32 specific API for hooking into data abort. Since pci-keystone.c will be used for AM65X platforms which is an ARM64 platform, allow hook_fault_code to be compiled only for ARM32. Signed-off-by: Kishon Vijay Abraham I --- drivers/pci/controller/dwc/pci-keystone.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.17.1 diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/controller/dwc/pci-keystone.c index d1ecf826dfe8..9d7cedd96505 100644 --- a/drivers/pci/controller/dwc/pci-keystone.c +++ b/drivers/pci/controller/dwc/pci-keystone.c @@ -693,6 +693,7 @@ static int ks_pcie_config_legacy_irq(struct keystone_pcie *ks_pcie) return ret; } +#ifdef CONFIG_ARM /* * When a PCI device does not exist during config cycles, keystone host gets a * bus error instead of returning 0xffffffff. This handler always returns 0 @@ -712,6 +713,7 @@ static int ks_pcie_fault(unsigned long addr, unsigned int fsr, return 0; } +#endif static int __init ks_pcie_init_id(struct keystone_pcie *ks_pcie) { @@ -761,12 +763,14 @@ static int __init ks_pcie_host_init(struct pcie_port *pp) if (ret < 0) return ret; +#ifdef CONFIG_ARM /* * PCIe access errors that result into OCP errors are caught by ARM as * "External aborts" */ hook_fault_code(17, ks_pcie_fault, SIGBUS, 0, "Asynchronous external abort"); +#endif ks_pcie_start_link(pci); dw_pcie_wait_for_link(pci);