From patchwork Tue Apr 14 06:49:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Ellerman X-Patchwork-Id: 461061 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id EEF101401DE for ; Tue, 14 Apr 2015 16:58:49 +1000 (AEST) Received: from ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id D170A1A2FA1 for ; Tue, 14 Apr 2015 16:58:49 +1000 (AEST) X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from ozlabs.org (ozlabs.org [103.22.144.67]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 071191A1D08 for ; Tue, 14 Apr 2015 16:49:15 +1000 (AEST) Received: by ozlabs.org (Postfix) id DEEA81402BE; Tue, 14 Apr 2015 16:49:14 +1000 (AEST) Delivered-To: linuxppc-dev@ozlabs.org Received: by ozlabs.org (Postfix, from userid 1034) id BF31C14027F; Tue, 14 Apr 2015 16:49:14 +1000 (AEST) From: Michael Ellerman To: Subject: [PATCH 2/2] powerpc/cell: Fix iommu breakage caused by controller_ops change Date: Tue, 14 Apr 2015 16:49:06 +1000 Message-Id: <1428994146-23180-2-git-send-email-mpe@ellerman.id.au> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1428994146-23180-1-git-send-email-mpe@ellerman.id.au> References: <1428994146-23180-1-git-send-email-mpe@ellerman.id.au> Cc: gwshan@linux.vnet.ibm.com, dja@axtens.net X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" The recent patch to convert cell to use pci_controller_ops had a small bug which broke machines using an iommu. The set of phb->controller_ops was added after the check for name != "pci", meaning pcix/pcie PHBs weren't getting their ops set correctly. Fixes: 9c1368fc50e7 ("powerpc/cell: Move controller ops from ppc_md to controller_ops") Signed-off-by: Michael Ellerman Acked-by: Daniel Axtens --- arch/powerpc/platforms/cell/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c index d1be268b1e6e..36cff28d0293 100644 --- a/arch/powerpc/platforms/cell/setup.c +++ b/arch/powerpc/platforms/cell/setup.c @@ -127,13 +127,13 @@ static int cell_setup_phb(struct pci_controller *phb) if (rc) return rc; + phb->controller_ops = cell_pci_controller_ops; + np = phb->dn; model = of_get_property(np, "model", NULL); if (model == NULL || strcmp(np->name, "pci")) return 0; - phb->controller_ops = cell_pci_controller_ops; - /* Setup workarounds for spider */ if (strcmp(model, "Spider")) return 0;