From patchwork Mon Oct 27 13:22:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wangyijing X-Patchwork-Id: 39626 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4BE582118A for ; Mon, 27 Oct 2014 12:46:46 +0000 (UTC) Received: by mail-wg0-f72.google.com with SMTP id k14sf661369wgh.7 for ; Mon, 27 Oct 2014 05:46:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=9ne1VkvgsvOlVA73BoRAOkUI55afzrqn0ZBXW4Z8/6Y=; b=loC8js8w/FJGDHFyqkr01OfEqOKSU5DTTUjuJGwBn8Ne5mfT84zjXosQfxOjN4Gge9 +3Nnwgs6Lf1YEebe54UVW4D4vGxaBaGkCVsmpCSD+1h05OposyhdlJFrmHEvfJbeBjIH 4KCkd2qoMWTIsQXxFKhrGOvD9G569mPT/+uNwJO4sOGJ7rkTwb7cvqeNnBZVP6GsuajF +wwzC2PWgeU0AVVv/BbnglidPkXAfKAw48Q39aSgbZGvDaiDaNtpW1jt44+UuMK3QT5N zOzpxqltlaatExbC6w4g4WgrGXGHyVkZindZPDWJ3FRd5c6MAgY4Mip6au8gseJiat4N OmXA== X-Gm-Message-State: ALoCoQnhoRV8bG9TCuRwJINpkk2wjOeRJWiqvbX5bytg47x5fcvE6G0u7nQ6ML78RHI4iJBbkcq8 X-Received: by 10.180.90.115 with SMTP id bv19mr3852701wib.1.1414414005445; Mon, 27 Oct 2014 05:46:45 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.243.9 with SMTP id wu9ls92975lac.51.gmail; Mon, 27 Oct 2014 05:46:45 -0700 (PDT) X-Received: by 10.112.156.138 with SMTP id we10mr8994299lbb.88.1414414005261; Mon, 27 Oct 2014 05:46:45 -0700 (PDT) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id nz4si19743813lbb.113.2014.10.27.05.46.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 27 Oct 2014 05:46:45 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by mail-la0-f53.google.com with SMTP id mc6so1379959lab.26 for ; Mon, 27 Oct 2014 05:46:45 -0700 (PDT) X-Received: by 10.112.97.135 with SMTP id ea7mr23629590lbb.46.1414414005162; Mon, 27 Oct 2014 05:46:45 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.84.229 with SMTP id c5csp282376lbz; Mon, 27 Oct 2014 05:46:44 -0700 (PDT) X-Received: by 10.67.30.34 with SMTP id kb2mr23429397pad.97.1414414003559; Mon, 27 Oct 2014 05:46:43 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id dd1si10409684pbc.122.2014.10.27.05.46.42 for ; Mon, 27 Oct 2014 05:46:43 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752891AbaJ0Mlv (ORCPT + 26 others); Mon, 27 Oct 2014 08:41:51 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:28073 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751836AbaJ0Mlm (ORCPT ); Mon, 27 Oct 2014 08:41:42 -0400 Received: from 172.24.2.119 (EHLO szxeml404-hub.china.huawei.com) ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CBJ49233; Mon, 27 Oct 2014 20:41:30 +0800 (CST) Received: from localhost.localdomain (10.175.100.166) by szxeml404-hub.china.huawei.com (10.82.67.59) with Microsoft SMTP Server id 14.3.158.1; Mon, 27 Oct 2014 20:41:22 +0800 From: Yijing Wang To: Bjorn Helgaas CC: , , Xinwei Hu , Wuyun , , Russell King , , Thomas Gleixner , Konrad Rzeszutek Wilk , , Joerg Roedel , , , "Benjamin Herrenschmidt" , , , Sebastian Ott , "Tony Luck" , , "David S. Miller" , , Chris Metcalf , Ralf Baechle , Lucas Stach , David Vrabel , "Sergei Shtylyov" , Michael Ellerman , Thierry Reding , "Thomas Petazzoni" , Yijing Wang Subject: [PATCH 06/16] Mips/MSI: Save MSI controller in pci sysdata Date: Mon, 27 Oct 2014 21:22:12 +0800 Message-ID: <1414416142-31239-7-git-send-email-wangyijing@huawei.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1414416142-31239-1-git-send-email-wangyijing@huawei.com> References: <1414416142-31239-1-git-send-email-wangyijing@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.100.166] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: wangyijing@huawei.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Save MSI controller in pci sysdata, add arch pcibios_msi_controller() to extract out MSI controller. Signed-off-by: Yijing Wang --- arch/mips/include/asm/pci.h | 3 +++ arch/mips/pci/pci.c | 9 +++++++++ 2 files changed, 12 insertions(+), 0 deletions(-) diff --git a/arch/mips/include/asm/pci.h b/arch/mips/include/asm/pci.h index 974b0e3..d7cd850 100644 --- a/arch/mips/include/asm/pci.h +++ b/arch/mips/include/asm/pci.h @@ -43,6 +43,9 @@ struct pci_controller { int iommu; +#ifdef CONFIG_PCI_MSI + struct msi_controller *msi_ctrl; +#endif /* Optional access methods for reading/writing the bus number of the PCI controller */ int (*get_busno)(void); diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c index 1bf60b1..7917cba 100644 --- a/arch/mips/pci/pci.c +++ b/arch/mips/pci/pci.c @@ -36,6 +36,15 @@ unsigned long PCIBIOS_MIN_MEM; static int pci_initialized; +#ifdef CONFIG_PCI_MSI +struct msi_controller *pcibios_msi_controller(struct pci_bus *bus) +{ + struct pci_controller *ctrl = bus->sysdata; + + return ctrl->msi_ctrl; +} +#endif + /* * We need to avoid collisions with `mirrored' VGA ports * and other strange ISA hardware, so we always want the