From patchwork Mon Nov 17 10:21:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wangyijing X-Patchwork-Id: 40885 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 26FA224035 for ; Mon, 17 Nov 2014 09:42:03 +0000 (UTC) Received: by mail-lb0-f200.google.com with SMTP id f15sf11357415lbj.11 for ; Mon, 17 Nov 2014 01:42:02 -0800 (PST) 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=dgm/elxzmogJZkgHJZIhYHqj9eBCkWUUoStOSCXr54c=; b=VijN2yQsAUfrruTm2bw1IykvNjuTHl4TuDHhzUaAkTUdTQRdP+NNtISb/pW0FwTAaF 1EXaMNUL57MqCpwPauSPackkXXSHhgHIUgeINnjFL8sGGPn/1y2ffYmek7TEYc/lrjlc PSmYnad5moNMLo4Xo8SFL/WdCX60WHMPOLU+f+75sq5+zaAEEVq0hhnyCtZ0SatjeFjz nFMkRXpWuUiQVs1CeY8YPPjnhrFyP7ceKnAWZIUEtckS92vTCakD1ggCs3gLbPZnVrnB ogiq0yT7ERS0HQgsZ+nxbv19r/EgPdQ+ItR1na229drPnsyZ1rIMRiAJKGPW+4iPYWAJ e9NA== X-Gm-Message-State: ALoCoQm+medhUoLKga1Mj1n8fsU9bhxTmbvWBK1q2x7Jn1Nf9W77ZAbBNk4XoKzTsAPhJPUvGFsJ X-Received: by 10.194.86.66 with SMTP id n2mr41951wjz.7.1416217322021; Mon, 17 Nov 2014 01:42:02 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.7.71 with SMTP id da7ls96010lad.31.gmail; Mon, 17 Nov 2014 01:42:01 -0800 (PST) X-Received: by 10.112.164.69 with SMTP id yo5mr14928937lbb.16.1416217321702; Mon, 17 Nov 2014 01:42:01 -0800 (PST) Received: from mail-lb0-f170.google.com (mail-lb0-f170.google.com. [209.85.217.170]) by mx.google.com with ESMTPS id pz8si51195469lbb.36.2014.11.17.01.42.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Nov 2014 01:42:01 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.170 as permitted sender) client-ip=209.85.217.170; Received: by mail-lb0-f170.google.com with SMTP id w7so7013427lbi.29 for ; Mon, 17 Nov 2014 01:42:01 -0800 (PST) X-Received: by 10.112.62.166 with SMTP id z6mr8744936lbr.74.1416217321559; Mon, 17 Nov 2014 01:42:01 -0800 (PST) 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.184.201 with SMTP id ew9csp1127239lbc; Mon, 17 Nov 2014 01:42:00 -0800 (PST) X-Received: by 10.68.249.133 with SMTP id yu5mr28192310pbc.31.1416217319959; Mon, 17 Nov 2014 01:41:59 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ps5si19332357pac.221.2014.11.17.01.41.59 for ; Mon, 17 Nov 2014 01:41:59 -0800 (PST) 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 S1752128AbaKQJk6 (ORCPT + 26 others); Mon, 17 Nov 2014 04:40:58 -0500 Received: from szxga01-in.huawei.com ([119.145.14.64]:43184 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751674AbaKQJkw (ORCPT ); Mon, 17 Nov 2014 04:40:52 -0500 Received: from 172.24.2.119 (EHLO szxeml462-hub.china.huawei.com) ([172.24.2.119]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CEO10156; Mon, 17 Nov 2014 17:40:48 +0800 (CST) Received: from localhost.localdomain (10.175.100.166) by szxeml462-hub.china.huawei.com (10.82.67.205) with Microsoft SMTP Server id 14.3.158.1; Mon, 17 Nov 2014 17:40:34 +0800 From: Yijing Wang To: Bjorn Helgaas CC: , , Xinwei Hu , Wuyun , , Russell King , , Thomas Gleixner , Benjamin Herrenschmidt , , Tony Luck , , Thierry Reding , Liviu Dudau , , Yijing Wang , Yijing Wang Subject: [RFC PATCH 09/16] PCI: Associate .get_msi_ctrl() with pci_host_bridge Date: Mon, 17 Nov 2014 18:21:43 +0800 Message-ID: <1416219710-26088-10-git-send-email-wangyijing@huawei.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1416219710-26088-1-git-send-email-wangyijing@huawei.com> References: <1416219710-26088-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.217.170 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: , From: Yijing Wang Signed-off-by: Yijing Wang --- drivers/pci/host-bridge.c | 1 + include/linux/pci.h | 2 ++ 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host-bridge.c index 49b6c21..872cae1 100644 --- a/drivers/pci/host-bridge.c +++ b/drivers/pci/host-bridge.c @@ -58,6 +58,7 @@ struct pci_host_bridge *pci_create_host_bridge( host->dev.parent = parent; INIT_LIST_HEAD(&host->windows); host->dev.release = pci_release_host_bridge_dev; + host->get_msi_ctrl = info->get_msi_ctrl; /* this is hack, just for build, will be removed later*/ b = kzalloc(sizeof(*b), GFP_KERNEL); diff --git a/include/linux/pci.h b/include/linux/pci.h index a51f5f5..af1ee86 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -408,6 +408,7 @@ struct pci_host_bridge { int domain; void *sysdata; struct pci_ops *ops; + struct msi_controller *(*get_msi_ctrl)(struct pci_dev *pdev); void (*release_fn)(struct pci_host_bridge *); void *release_data; }; @@ -416,6 +417,7 @@ struct pci_host_info { u8 res_type; void *arg; struct list_head *resources; /*just for build, will clean up later */ + struct msi_controller *(*get_msi_ctrl)(struct pci_dev *pdev); int (*init_res)(struct pci_host_bridge *host, struct pci_host_info *info); };