From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752893AbbLRL1c (ORCPT ); Fri, 18 Dec 2015 06:27:32 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:35732 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751791AbbLRL13 (ORCPT ); Fri, 18 Dec 2015 06:27:29 -0500 Message-ID: <5673EB79.9000105@huawei.com> Date: Fri, 18 Dec 2015 19:18:17 +0800 From: Hanjun Guo User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: Tomasz Nowicki , , , , , , , , CC: , , , , , , , , Subject: Re: [PATCH V2 07/10] ARM64, ACPI, PCI: I/O Remapping Table (IORT) initial support. References: <1450353133-15992-1-git-send-email-tn@semihalf.com> <1450353133-15992-8-git-send-email-tn@semihalf.com> In-Reply-To: <1450353133-15992-8-git-send-email-tn@semihalf.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.17.188] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020203.5673EB80.0179,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 68b4c384e5bbe271c0236218316ac806 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2015/12/17 19:52, Tomasz Nowicki wrote: > +++ b/include/linux/iort.h > @@ -0,0 +1,38 @@ > +/* > + * Copyright (C) 2015, Linaro Ltd. > + * Author: Tomasz Nowicki > + * > + * This program is free software; you can redistribute it and/or modify it > + * under the terms and conditions of the GNU General Public License, > + * version 2, as published by the Free Software Foundation. > + * > + * This program is distributed in the hope it will be useful, but WITHOUT > + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for > + * more details. > + * > + * You should have received a copy of the GNU General Public License along with > + * this program; if not, write to the Free Software Foundation, Inc., 59 Temple > + * Place - Suite 330, Boston, MA 02111-1307 USA. > + */ > + > +#ifndef __IORT_H__ > +#define __IORT_H__ > + > +#include > + > +#ifdef CONFIG_ACPI I think we need use CONFIG_IORT_TABLE here, or the code will be compiled error on no-ARM64 platform, and it will lead to undefined function, just as the kbuild test robot pointed out: All errors (new ones prefixed by >>): drivers/built-in.o: In function `pci_msi_domain_get_msi_rid': >> (.text+0x3175d): undefined reference to `iort_find_pci_id' Thanks Hanjun > + > +struct fwnode_handle; > + > +int iort_register_domain_token(int trans_id, struct fwnode_handle *fw_node); > +struct fwnode_handle *iort_find_its_domain_token(int trans_id); > +struct fwnode_handle *iort_find_pci_domain_token(struct device *dev); > +int iort_find_pci_id(struct pci_dev *pdev, u32 req_id, u32 *dev_id); > +#else /* CONFIG_ACPI */ > +static inline int > +iort_find_pci_id(struct pci_dev *pdev, u32 req_id, u32 *dev_id) > +{ return -ENXIO; } > +#endif /* CONFIG_ACPI */ > + > +#endif /* __IORT_H__ */