From patchwork Tue Mar 14 12:12:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Schnelle X-Patchwork-Id: 69597 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1730494wrd; Tue, 14 Mar 2023 05:36:50 -0700 (PDT) X-Google-Smtp-Source: AK7set/tsOXQXq3X6ugFwYd4PO/gPMfLxJPiv5x19w5ST9gDTDiEwR9kD9cVt5qLmG1flNlFWEhl X-Received: by 2002:a05:6a20:69a6:b0:bf:58d1:cea0 with SMTP id t38-20020a056a2069a600b000bf58d1cea0mr10340497pzk.31.1678797410130; Tue, 14 Mar 2023 05:36:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678797410; cv=none; d=google.com; s=arc-20160816; b=EfIpASdFEO3r2SkYddJouydhcVxHcQgRxVEaHCj09mN/T7v7yFdRK1dnmhz9ULyxr0 O7XonFCqp81NdCA1xj+KCNAOCrQGogUxe9IkQI7YHYv9K0B0oG+f6wLMp11amC/eS+Fn BmDxCQkOI4cuYHIJFVmq0schcvXu67a/KOi8x9qdUgVONX4gX9Cm1aL7qYd+m85GdRTy FJEfWiXEqjY/1F15MWJ6XVt1zyhtt9NAa+Xg2L0kGy4KJITMlecPQ7MRRKJBXdv9m5sy DX5yaPytbKQv2cog/C4lZlbnCo9wepmzVw9hYNTny3ycwUN1k8YyI33qYBnXsrPxx4Fj 5e7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=oygREVmvdgMc6J749+iyL98CqefoEwhnbtEYG+GUsuY=; b=uCt/WIFuJSBffh/3QzGp4iqEm+sehD1tXuM/LSgdeXDwXHFo1cpxBAVI6FKaiwqE1O YpCISy1d5/f2IzdVdxV/cI1BwmLhfrxwSIfJMuz85OyeBdmg+hayboaFZsGcFMkxDQK/ U5oJxPLfIpcweu/vRs/6sVo+m7yD/7oUbG0yzxcBnNiIRLS2oqi69ZfCJf89VpbGYw3X MiqrN0AQSaVPixBId+Pc3rMoj7Fn5qkKdQKHxjWdtHbKLYn+xUHi+06Ubra2vUZK/goN 7PcNjvTVBHPnFvWTPcbGV4N0kun5PRShoGG4FGHW8Rf83TAilH/qneqeZl5yFz/lKo++ 01jQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=iFhZ5bdk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r23-20020a63fc57000000b004fc238851cfsi2131642pgk.208.2023.03.14.05.36.37; Tue, 14 Mar 2023 05:36:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=iFhZ5bdk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231458AbjCNMPY (ORCPT + 99 others); Tue, 14 Mar 2023 08:15:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231823AbjCNMN6 (ORCPT ); Tue, 14 Mar 2023 08:13:58 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE129A0F12; Tue, 14 Mar 2023 05:13:09 -0700 (PDT) Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32EAWHD5005837; Tue, 14 Mar 2023 12:12:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=oygREVmvdgMc6J749+iyL98CqefoEwhnbtEYG+GUsuY=; b=iFhZ5bdkJg6qta470N/Yaf7w0J8JZaNy9vCJ8frZZuqV1G3qhjHOkAYJYQIewqkd84nO 2lvh27HcUI3HlQhxlgFqffbjHuRaIaFt0rJuWbzWB8WpPA7j74lPHcc2LxIIhmUqim2q yQt51dKFKu92ymOIFvZgNlxei1pP72F8eJ7Q/AeDeNPbMSNkBzFttH4eimFq4k5hGAEK bDHfMdPvbfvwJlNYEzHtcjO3jiZ+aYeIuZoyz+MbDAhu0pzQnN3nL2wfhoo7EQzrpvh+ sp3/nxiS2ovqoJVQv7q6hVzNQIu5UzvZvKdiXy95wJGB4FuYYIr4fAAkY7Z9ETEQeQ6b Mg== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3papenbxru-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Mar 2023 12:12:46 +0000 Received: from m0098420.ppops.net (m0098420.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 32EBN0YE003745; Tue, 14 Mar 2023 12:12:45 GMT Received: from ppma02fra.de.ibm.com (47.49.7a9f.ip4.static.sl-reverse.com [159.122.73.71]) by mx0b-001b2d01.pphosted.com (PPS) with ESMTPS id 3papenbxqx-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Mar 2023 12:12:45 +0000 Received: from pps.filterd (ppma02fra.de.ibm.com [127.0.0.1]) by ppma02fra.de.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 32E9I2SU019091; Tue, 14 Mar 2023 12:12:43 GMT Received: from smtprelay05.fra02v.mail.ibm.com ([9.218.2.225]) by ppma02fra.de.ibm.com (PPS) with ESMTPS id 3p8h96krup-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Mar 2023 12:12:43 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay05.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 32ECCfq415794852 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Mar 2023 12:12:41 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2848E2007B; Tue, 14 Mar 2023 12:12:41 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B29252007A; Tue, 14 Mar 2023 12:12:40 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 14 Mar 2023 12:12:40 +0000 (GMT) From: Niklas Schnelle To: Arnd Bergmann , Bjorn Helgaas Cc: Greg Kroah-Hartman , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Mauro Carvalho Chehab , Alan Stern , "Rafael J. Wysocki" , Geert Uytterhoeven , Paul Walmsley , Palmer Dabbelt , Albert Ou , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-pci@vger.kernel.org, Arnd Bergmann Subject: [PATCH v3 22/38] PCI: Make quirk using inw() depend on HAS_IOPORT Date: Tue, 14 Mar 2023 13:12:00 +0100 Message-Id: <20230314121216.413434-23-schnelle@linux.ibm.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230314121216.413434-1-schnelle@linux.ibm.com> References: <20230314121216.413434-1-schnelle@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: pA1WQtwPwt44qdraN1G1fumqpKZpC170 X-Proofpoint-GUID: K1tXEz11hHWgigT477pmHW1S3ADoa2Kh X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-14_06,2023-03-14_02,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 bulkscore=0 mlxlogscore=999 mlxscore=0 adultscore=0 phishscore=0 impostorscore=0 lowpriorityscore=0 malwarescore=0 clxscore=1015 priorityscore=1501 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303140103 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760346673152279299?= X-GMAIL-MSGID: =?utf-8?q?1760346673152279299?= In the future inw() and friends will not be compiled on architectures without I/O port support. Acked-by: Bjorn Helgaas Co-developed-by: Arnd Bergmann Signed-off-by: Niklas Schnelle --- drivers/pci/quirks.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 44cab813bf95..3289295f56a4 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -268,6 +268,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_2, quirk_isa_d DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_CBUS_3, quirk_isa_dma_hangs); #endif +#ifdef CONFIG_HAS_IOPORT /* * Intel NM10 "TigerPoint" LPC PM1a_STS.BM_STS must be clear * for some HT machines to use C4 w/o hanging. @@ -287,6 +288,7 @@ static void quirk_tigerpoint_bm_sts(struct pci_dev *dev) } } DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_TGP_LPC, quirk_tigerpoint_bm_sts); +#endif /* Chipsets where PCI->PCI transfers vanish or hang */ static void quirk_nopcipci(struct pci_dev *dev)