From patchwork Mon Nov 14 14:23:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juergen Gross X-Patchwork-Id: 19832 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2175715wru; Mon, 14 Nov 2022 06:29:18 -0800 (PST) X-Google-Smtp-Source: AA0mqf4oQ21Z3FzWc8FQQT6+Kv6SIUM1gAgJliGhikU39GHsgwDe2grPcxZb3sd0rFRbe56WzbXy X-Received: by 2002:a17:907:1042:b0:7a2:6d38:1085 with SMTP id oy2-20020a170907104200b007a26d381085mr10416925ejb.114.1668436157959; Mon, 14 Nov 2022 06:29:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668436157; cv=none; d=google.com; s=arc-20160816; b=jp3fR5kNOOm7d+Abei/mkVlYepqvCMcz1uwzaMLBwA10MviFkIuhITdzA+lDLo52jt obvY7Bwr1GTAFiy/NpBhJVNEWgO4pq72uuDWfddi91Lk5EgXs/1LKHwFmela/k7Gaylq Cj4fcdjbLJNpsAfX4//NKjRyIfLoFbptvZQkqzJidta51nNrCoVnmiaVkuYPqYeOh5YU gRygkhss66hqFRH/wHlTUS4CCvrVtqt10Qi/HSuwyGLfTeVS4NL68ZZC93zcIcrDkcdY s3WuTlMYz9gZ/e4f2ieZGtoOqmN6DMk2NDEWTc3m6g1v9pBj/PSVNzogmmY19yJL7Hao oAHQ== 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 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.28.52; Mon, 14 Nov 2022 06:29:17 -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 + 99 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749482112245573895?= X-GMAIL-MSGID: =?utf-8?q?1749482112245573895?= 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 Acked-by: Stefano Stabellini --- 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) |