From patchwork Wed Aug 1 20:01:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Reza Arbab X-Patchwork-Id: 952373 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41gkpG56qRz9s3Z for ; Thu, 2 Aug 2018 06:06:14 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 41gkpG3K2zzF1sg for ; Thu, 2 Aug 2018 06:06:14 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=arbab@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 41gkhs0PwyzF1Qn for ; Thu, 2 Aug 2018 06:01:32 +1000 (AEST) Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w71Jxo7Q078229 for ; Wed, 1 Aug 2018 16:01:29 -0400 Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.152]) by mx0a-001b2d01.pphosted.com with ESMTP id 2kkgq6e4tn-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 01 Aug 2018 16:01:26 -0400 Received: from localhost by e34.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 1 Aug 2018 14:01:25 -0600 Received: from b03cxnp07029.gho.boulder.ibm.com (9.17.130.16) by e34.co.us.ibm.com (192.168.1.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 1 Aug 2018 14:01:22 -0600 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp07029.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w71K1L8W64290880 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 1 Aug 2018 13:01:21 -0700 Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A77FDC6062; Wed, 1 Aug 2018 14:01:21 -0600 (MDT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 88F36C6055; Wed, 1 Aug 2018 14:01:21 -0600 (MDT) Received: from arbab-laptop.localdomain (unknown [9.24.3.46]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTP; Wed, 1 Aug 2018 14:01:21 -0600 (MDT) Received: by arbab-laptop.localdomain (Postfix, from userid 152845) id C9CBF4603A5; Wed, 1 Aug 2018 15:01:19 -0500 (CDT) From: Reza Arbab To: skiboot@lists.ozlabs.org Date: Wed, 1 Aug 2018 15:01:14 -0500 X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1533153679-10109-1-git-send-email-arbab@linux.ibm.com> References: <1533153679-10109-1-git-send-email-arbab@linux.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18080120-0016-0000-0000-000009111043 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009468; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01068926; UDB=6.00549578; IPR=6.00847266; MB=3.00022445; MTD=3.00000008; XFM=3.00000015; UTC=2018-08-01 20:01:24 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18080120-0017-0000-0000-00003FD76255 Message-Id: <1533153679-10109-2-git-send-email-arbab@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-08-01_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1808010202 Subject: [Skiboot] [PATCH 1/6] pci: Move logging macros to pci.h X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alistair Popple MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Move the PCI{TRACE,DBG,NOTICE,ERR} logging macros from pci.c to pci.h so they can be used in other files. Signed-off-by: Reza Arbab Reviewed-by: Alistair Popple --- core/pci.c | 21 --------------------- include/pci.h | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/core/pci.c b/core/pci.c index 109459b..6ba6eda 100644 --- a/core/pci.c +++ b/core/pci.c @@ -29,27 +29,6 @@ static struct phb *phbs[MAX_PHB_ID]; int last_phb_id = 0; -#define PCITRACE(_p, _bdfn, fmt, a...) \ - prlog(PR_TRACE, "PHB#%04x:%02x:%02x.%x " fmt, \ - (_p)->opal_id, \ - ((_bdfn) >> 8) & 0xff, \ - ((_bdfn) >> 3) & 0x1f, (_bdfn) & 0x7, ## a) -#define PCIDBG(_p, _bdfn, fmt, a...) \ - prlog(PR_DEBUG, "PHB#%04x:%02x:%02x.%x " fmt, \ - (_p)->opal_id, \ - ((_bdfn) >> 8) & 0xff, \ - ((_bdfn) >> 3) & 0x1f, (_bdfn) & 0x7, ## a) -#define PCINOTICE(_p, _bdfn, fmt, a...) \ - prlog(PR_NOTICE, "PHB#%04x:%02x:%02x.%x " fmt, \ - (_p)->opal_id, \ - ((_bdfn) >> 8) & 0xff, \ - ((_bdfn) >> 3) & 0x1f, (_bdfn) & 0x7, ## a) -#define PCIERR(_p, _bdfn, fmt, a...) \ - prlog(PR_ERR, "PHB#%04x:%02x:%02x.%x " fmt, \ - (_p)->opal_id, \ - ((_bdfn) >> 8) & 0xff, \ - ((_bdfn) >> 3) & 0x1f, (_bdfn) & 0x7, ## a) - /* * Generic PCI utilities */ diff --git a/include/pci.h b/include/pci.h index 253dbd8..c6aa664 100644 --- a/include/pci.h +++ b/include/pci.h @@ -23,6 +23,27 @@ #include #include +#define PCITRACE(_p, _bdfn, fmt, a...) \ + prlog(PR_TRACE, "PHB#%04x:%02x:%02x.%x " fmt, \ + (_p)->opal_id, \ + ((_bdfn) >> 8) & 0xff, \ + ((_bdfn) >> 3) & 0x1f, (_bdfn) & 0x7, ## a) +#define PCIDBG(_p, _bdfn, fmt, a...) \ + prlog(PR_DEBUG, "PHB#%04x:%02x:%02x.%x " fmt, \ + (_p)->opal_id, \ + ((_bdfn) >> 8) & 0xff, \ + ((_bdfn) >> 3) & 0x1f, (_bdfn) & 0x7, ## a) +#define PCINOTICE(_p, _bdfn, fmt, a...) \ + prlog(PR_NOTICE, "PHB#%04x:%02x:%02x.%x " fmt, \ + (_p)->opal_id, \ + ((_bdfn) >> 8) & 0xff, \ + ((_bdfn) >> 3) & 0x1f, (_bdfn) & 0x7, ## a) +#define PCIERR(_p, _bdfn, fmt, a...) \ + prlog(PR_ERR, "PHB#%04x:%02x:%02x.%x " fmt, \ + (_p)->opal_id, \ + ((_bdfn) >> 8) & 0xff, \ + ((_bdfn) >> 3) & 0x1f, (_bdfn) & 0x7, ## a) + struct pci_device; struct pci_cfg_reg_filter;