From patchwork Mon Mar 25 08:34:47 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: 161035 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp3696525jan; Mon, 25 Mar 2019 01:37:11 -0700 (PDT) X-Google-Smtp-Source: APXvYqwh524JISXTgvtweUdc91aw9++pUxlgpIwriTMpgKaMFZEPAJN2nFRXhhH2NYsprlJX1oO/ X-Received: by 2002:a63:6fc1:: with SMTP id k184mr9712824pgc.239.1553503031464; Mon, 25 Mar 2019 01:37:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553503031; cv=none; d=google.com; s=arc-20160816; b=koxdrWHQZM/n1f/DxJYPlEy3/SbsJ37QoEs6aXSSC5Uk6xWWFQnmU/DN6ehl/WRfH1 FUrKaoGj8B7Q5twZrEBfbGRCs5qPSZpUfgXdqdLi/ixt57U2XbqtPXYENwmJaqSXEN0I Lrder7lV7t3AVcHlXbe+pwzrK+Y5NFiR2ympYYX9Gkp8gWaGDdMw06ktypcMVintFX7D rdr67KFm4RUt/bf+jB5MP40+95lGx8kVlEf+5AiFIWNhKrT1GljApwXVjpFylfxOUZV9 GucxlX133V2ivIKr2FiAHrYI4xj1ywiHDAJlxfGFm4KzyuLUxEOkJNa7dSSPhE354Nu+ 0X1w== 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=QQnbdjchjriqY7MOSz5Hvpx/cYkzjC8wC0YfZRMaepc=; b=iNE/SlC6XPK5zBGmHCvUHq3GhPr22ZBYkbnicU466mPDHp36aOt+cGjQSLSva4c1p6 9S+nD6j1A+TcUMSJFDhPAodYiXBjWu9/bnx0xsNPcWN3GzFURNqnsZajvnroBOFfoP72 9UiE6JnU3vQEU4a522ICd6WbKoY3q/DcohARHofqHlvVrjtmgi4Xk/ya6yH8J2n3lKqi NsIR8pfPhF7FlYYstLDx5lb7Xclt8+alFULW+gvv2isH6VnX3yx4ImE+Ye3/KqrMxADD F3IL6fmLzxs97zy5FfAPaWNdZ1cG+F4EQKQy8xgG69HKdkpbxON5tF2eE09OJL5/4ouv ljgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=wsjy9X5h; 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 u5si13080602pgi.162.2019.03.25.01.37.11; Mon, 25 Mar 2019 01:37:11 -0700 (PDT) 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=wsjy9X5h; 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 S1730258AbfCYIhJ (ORCPT + 31 others); Mon, 25 Mar 2019 04:37:09 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:36634 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726207AbfCYIhH (ORCPT ); Mon, 25 Mar 2019 04:37:07 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id x2P8aouR039638; Mon, 25 Mar 2019 03:36:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1553503010; bh=QQnbdjchjriqY7MOSz5Hvpx/cYkzjC8wC0YfZRMaepc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=wsjy9X5hpudLUlezpxjcI0n4ctExu9X3P0yG3a/mwGns8iM0J17YmMadMLRrcY8zF v3Q5dG3QzpdYkhHVKNjVZ+OFP+9/O14zPo3WdsLiBsUpivP4o5jX2HCRf8ngkM/seO sxrOFIZoGb4VHzIwJQgkLMbBBd8YpHWt1Fss7w0c= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x2P8aoRM088988 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 25 Mar 2019 03:36:50 -0500 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Mon, 25 Mar 2019 03:36:49 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1713.5 via Frontend Transport; Mon, 25 Mar 2019 03:36:49 -0500 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id x2P8ZsFs006534; Mon, 25 Mar 2019 03:36:45 -0500 From: Kishon Vijay Abraham I To: Gustavo Pimentel , Bjorn Helgaas , Rob Herring , Lorenzo Pieralisi , Arnd Bergmann , Murali Karicheri CC: Kishon Vijay Abraham I , Jingoo Han , Greg Kroah-Hartman , , , , , , Subject: [PATCH v2 12/26] PCI: keystone: Prevent ARM32 specific code to be compiled for ARM64 Date: Mon, 25 Mar 2019 14:04:47 +0530 Message-ID: <20190325083501.8088-13-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190325083501.8088-1-kishon@ti.com> References: <20190325083501.8088-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 dfe54553d832..93296d434f40 100644 --- a/drivers/pci/controller/dwc/pci-keystone.c +++ b/drivers/pci/controller/dwc/pci-keystone.c @@ -710,6 +710,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 @@ -729,6 +730,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) { @@ -778,12 +780,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);