Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5563462rwb; Mon, 14 Nov 2022 06:30:33 -0800 (PST) X-Google-Smtp-Source: AA0mqf6rMzCU2NdfEXDdJmdSsnXrakR9zClOFgYPH9YvnYSI4+Sx6nFpnSE77esOHnWXAFenRNqh X-Received: by 2002:a50:ee13:0:b0:463:a83c:e0af with SMTP id g19-20020a50ee13000000b00463a83ce0afmr10903426eds.158.1668436233071; Mon, 14 Nov 2022 06:30:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668436233; cv=none; d=google.com; s=arc-20160816; b=sSZndrYcZatZ/aXeQ+MzYMSiF/fjYM/sR51lJdyE/XRQgHMQYOjO6hNbDeQYlakuVu Oyv0ebhhCdLwl9B3fVJc8lv8T70KthZuURYzA2tXISxAtAiRgg9kHTmIdJmCh6QG6e/9 fr7Jopo1C3vm5vOAFDgKCTstm9dGg8aCJrf+0aZOvJRFdWhgkRuvdcKraxUW93E+/9sl CKqeCfr7CyPnBLYzM0h57t3Jiptk9f/5tDuqeEtvvlUIOz+/6cTZRIkTBHs2w1kbdl5d /NbVGlT86ilQ7VWODhKQLSctimG4bwZhMoY8j2s8/JSZYSP3sSwkEN4hDdpO+S51wEwL NoZA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=sAfl5fuNeiYw163kQkU47PxfF3Zja2zKggUEdCCcBhk=; b=cCF88+Epj6d3UJrps5562Bma68x7IqupsMX6TiLIx4dmzrjB7IX8o4ikwX/a3NSi3T yrWbLiI3aw7ycHKgHJDuyAsmPDQHP0UIvtNyRwXIzauCNHeTint1YNZkCwkMV4llDk2M EQkbfdBvR8YcInHzsNhnX/A8kiKqqwl/MFgaBTrKQ0LrTnzpTxpnMOaksizzFmIyWV2g Pyst/azSFbhUa8CXfZZs20G5+iiq3qlOIZhqGJY1FFuV0MwPNqmjOmojPbU8DeYIZqBk SCMnnPsg/xChTw/ALzA4Lb7oo4rFeGsed8zXauHHIJyQxJQkrChjYT4M58tO4bpsu2js lyMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=gp8JXilt; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p11-20020a056402500b00b00461fa05b004si8725551eda.105.2022.11.14.06.30.10; Mon, 14 Nov 2022 06:30:33 -0800 (PST) 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=@suse.com header.s=susede1 header.b=gp8JXilt; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236533AbiKNOX6 (ORCPT + 88 others); Mon, 14 Nov 2022 09:23:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229909AbiKNOXy (ORCPT ); Mon, 14 Nov 2022 09:23:54 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7664021276 for ; Mon, 14 Nov 2022 06:23:53 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id B547620047; Mon, 14 Nov 2022 14:23:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1668435831; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=sAfl5fuNeiYw163kQkU47PxfF3Zja2zKggUEdCCcBhk=; b=gp8JXiltXKb1uWqjC2t5qQtcG7+F9MBrH/xUbap/0IPmp81Z94Iz2J/dS88U0CRcqLhWQV wTEvQEfHqi/kDIGYEh8ZGKJV6Es/bCBCLhtpO9FonmMEi/N9et6tYlBl/oV3YJbbAQPHDW xXQhut/guvd1A7piXFT6qk4zMoX7oLM= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 8528113A92; Mon, 14 Nov 2022 14:23:51 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id OwIAH3dPcmMtagAAMHmgww (envelope-from ); Mon, 14 Nov 2022 14:23:51 +0000 From: Juergen Gross To: linux-kernel@vger.kernel.org Cc: Juergen Gross , Stefano Stabellini , Oleksandr Tyshchenko , xen-devel@lists.xenproject.org Subject: [PATCH] xen/platform-pci: use define instead of literal number Date: Mon, 14 Nov 2022 15:23:48 +0100 Message-Id: <20221114142348.1499-1-jgross@suse.com> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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 Instead of "0x01" use the HVM_PARAM_CALLBACK_TYPE_PCI_INTX define from the interface header in get_callback_via(). Signed-off-by: Juergen Gross --- drivers/xen/platform-pci.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/xen/platform-pci.c b/drivers/xen/platform-pci.c index 18f0ed8b1f93..24a3de1b7b03 100644 --- a/drivers/xen/platform-pci.c +++ b/drivers/xen/platform-pci.c @@ -54,7 +54,8 @@ static uint64_t get_callback_via(struct pci_dev *pdev) pin = pdev->pin; /* We don't know the GSI. Specify the PCI INTx line instead. */ - return ((uint64_t)0x01 << HVM_CALLBACK_VIA_TYPE_SHIFT) | /* PCI INTx identifier */ + return ((uint64_t)HVM_PARAM_CALLBACK_TYPE_PCI_INTX << + HVM_CALLBACK_VIA_TYPE_SHIFT) | ((uint64_t)pci_domain_nr(pdev->bus) << 32) | ((uint64_t)pdev->bus->number << 16) | ((uint64_t)(pdev->devfn & 0xff) << 8) | -- 2.35.3