From patchwork Mon Mar 25 09:39:33 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: 161077 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp3751764jan; Mon, 25 Mar 2019 02:45:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqx5gZBAMUWvD6qQrNjYU6TeTv+N6fJH5q7+Ac0vvGWVDv75+dzqnnoz0e1jRwnFXQUxNDIO X-Received: by 2002:a62:ee03:: with SMTP id e3mr23436945pfi.241.1553507105911; Mon, 25 Mar 2019 02:45:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553507105; cv=none; d=google.com; s=arc-20160816; b=tw/h5szW4CCiyZ9EoTjjZhYyKuA6VRWurY+rkVVsDIwigVfsV9d1psofn2StCMCArp eiiDexMw3ng8zac1ceuhKXF5ArrUAEdR7eDkINZxhG0LBPo3Hx3fTgL+xUzpR1poHN/s VUV3tE+LAVZFNQmTrTPuVmrFSq8Q79ASMauLFsneO6iG/WzFafqnrmYC5/NiPploEC3y zwN5ueKOw5b60L5juGsGgyzw3b9oGz38PYAiPvLemzw35U0szdkz5qevd6EpJegTA/y7 yJQNiuL5H7OglCsTZO4EpN9pL0qwQG5RcRYf/ZXWDJFp+f0CEmCtcNxtbRV0kziNvjqO NKYw== 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=JrKi1qa4WreY1YPxu/7OyNVmJXufR9Tjo8p5qO5efIfIXpxTe4tLWEig+jpbJBlLiw 4Ozz4i4o4z09TpnxZGaNXCN8yLzYzIZQAYpxMvYeS2LTrf7Rs+Nlps1ogQs+q7LEEbb2 5Nd0DPwb8WsRO6MtgGh/l7MG1tFs3e3raF3qcCwo3xj4sN8aS2Tj3seR/YZ7MkjZrIy0 lJQehHkX6fpWSciY+mXEolkpPtaVwmbqsJF4KzhyjDIGyaApVwQpG9gexHHX/xXxRN/j /ao1vZm/vk2rijlbsWwwdzbqNLQZ5oeTuLz9wHud5OhBvyuz/fJssxmdwctZxV1Hpq5e HWLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=NDl3Qn7Z; 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 f131si13517296pfc.92.2019.03.25.02.45.05; Mon, 25 Mar 2019 02:45:05 -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=NDl3Qn7Z; 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 S1730662AbfCYJnZ (ORCPT + 31 others); Mon, 25 Mar 2019 05:43:25 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:44996 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730601AbfCYJnP (ORCPT ); Mon, 25 Mar 2019 05:43:15 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x2P9gphc067981; Mon, 25 Mar 2019 04:42:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1553506971; bh=QQnbdjchjriqY7MOSz5Hvpx/cYkzjC8wC0YfZRMaepc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=NDl3Qn7ZEu82lsf1vt+RnsEdWpkiUl45E1Fcy1ZZNJ4MQ5Rs6PemOxjbDS/1L/mu0 oaUcM7nDgMOpCDvCbURT5JcG1ZHRrN+qKC6H05F/XLBa59BZZG4jP0+8vHFcALnYuK eDIuWgHM05SkM/K3MQZZHiQK8g4/A44hMLdzs2PI= Received: from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x2P9gpqu109935 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 25 Mar 2019 04:42:51 -0500 Received: from DLEE114.ent.ti.com (157.170.170.25) by DLEE100.ent.ti.com (157.170.170.30) 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 04:42:51 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE114.ent.ti.com (157.170.170.25) 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 04:42:51 -0500 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id x2P9feaR028077; Mon, 25 Mar 2019 04:42:46 -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 , , , , , , , Minghuan Lian , Mingkai Hu , Roy Zang , Jesper Nilsson Subject: [PATCH v3 12/26] PCI: keystone: Prevent ARM32 specific code to be compiled for ARM64 Date: Mon, 25 Mar 2019 15:09:33 +0530 Message-ID: <20190325093947.32633-13-kishon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190325093947.32633-1-kishon@ti.com> References: <20190325093947.32633-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);