From patchwork Wed May 11 13:30:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 67537 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp237751qge; Wed, 11 May 2016 06:53:58 -0700 (PDT) X-Received: by 10.66.177.75 with SMTP id co11mr5142883pac.85.1462974838422; Wed, 11 May 2016 06:53:58 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id uy8si10036695pab.145.2016.05.11.06.53.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 May 2016 06:53:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b0UZJ-0003YJ-H6; Wed, 11 May 2016 13:52:53 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b0UV1-0006mz-Di for linux-arm-kernel@bombadil.infradead.org; Wed, 11 May 2016 13:48:27 +0000 Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]) by casper.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1b0UFb-0005Od-Fq for linux-arm-kernel@lists.infradead.org; Wed, 11 May 2016 13:32:32 +0000 Received: by mail-wm0-x233.google.com with SMTP id a17so83067875wme.0 for ; Wed, 11 May 2016 06:32:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=U7mp+o5DVSQUqu4qeeVKCJ41w2wFXgbOR5qzvhUjjKY=; b=CXiPpUVXJagVZSqB23GgScvMg0Pnyvikw60tXv1CpoVyWaX0CEGmq5YNlJobswwlsd lX2pdKOW0ehmQ1uJ7600Num6x4myGTB67QkYGiwiPyieiN+MmmCRThynp6WIvLpHZiFI Eipin7Hww64c3FIYHX1rpiALsWtswebRM65G8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=U7mp+o5DVSQUqu4qeeVKCJ41w2wFXgbOR5qzvhUjjKY=; b=e+mPTkJE9Erc6vZK7IYYbalxcbuNjOHOXrcZhOpkIsp0G4rlM0WcXbvcOZ1eO5cIYg hgbEab2CyIWVdGSurUsqoPUdJwgK+juOt57sAd1cnZ0N58cWvuIxHv2VPNF+9t8KOyPP XMQp+BdqtyBg4G0uq1WUrrmdXdLSWGOwFrpyeQmINqoEOXxztyG3LRZKkp14aRu9AmoV lTpNPIud3JXEAzgrboo251mzgVFc+vzL/7T4UaiEAJSV6TpfU9c767jFvDOglWfoM344 okrjgDTRDnd/xg09YMT+NlKueb4h3x0sqZvNAwMOMYww3R2cDiGu8cU36H1d21A/c/3J x49Q== X-Gm-Message-State: AOPr4FUJ8oOnP+2r9zk/dXBElXEnHCPamvxpRh2orilMVkaaZQyHrZEvcAVfgshGe8l4XkQh X-Received: by 10.28.16.136 with SMTP id 130mr4467887wmq.23.1462973529991; Wed, 11 May 2016 06:32:09 -0700 (PDT) Received: from localhost.localdomain ([94.18.191.146]) by smtp.gmail.com with ESMTPSA id 131sm8547278wmu.17.2016.05.11.06.32.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 11 May 2016 06:32:09 -0700 (PDT) From: Christoffer Dall To: Paolo Bonzini , =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= Subject: [PULL 20/29] clocksource: arm_arch_timer: Extend arch_timer_kvm_info to get the virtual IRQ Date: Wed, 11 May 2016 15:30:13 +0200 Message-Id: <1462973422-10021-21-git-send-email-christoffer.dall@linaro.org> X-Mailer: git-send-email 2.1.2.330.g565301e.dirty In-Reply-To: <1462973422-10021-1-git-send-email-christoffer.dall@linaro.org> References: <1462973422-10021-1-git-send-email-christoffer.dall@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160511_143231_571164_6D65B1BD X-CRM114-Status: GOOD ( 14.10 ) X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on casper.infradead.org summary: Content analysis details: (-2.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:233 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kvm@vger.kernel.org, Marc Zyngier , Julien Grall , linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, Christoffer Dall MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org From: Julien Grall Currently, the firmware table is parsed by the virtual timer code in order to retrieve the virtual timer interrupt. However, this is already done by the arch timer driver. To avoid code duplication, extend arch_timer_kvm_info to get the virtual IRQ. Note that the KVM code will be modified in a subsequent patch. Signed-off-by: Julien Grall Acked-by: Christoffer Dall Signed-off-by: Christoffer Dall --- drivers/clocksource/arm_arch_timer.c | 2 ++ include/clocksource/arm_arch_timer.h | 1 + 2 files changed, 3 insertions(+) -- 2.1.2.330.g565301e.dirty _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index 62bdfe7..bb58224 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -750,6 +750,8 @@ static void __init arch_timer_init(void) arch_timer_register(); arch_timer_common_init(); + + arch_timer_kvm_info.virtual_irq = arch_timer_ppi[VIRT_PPI]; } static void __init arch_timer_of_init(struct device_node *np) diff --git a/include/clocksource/arm_arch_timer.h b/include/clocksource/arm_arch_timer.h index 9101ed6b..9dd996a 100644 --- a/include/clocksource/arm_arch_timer.h +++ b/include/clocksource/arm_arch_timer.h @@ -51,6 +51,7 @@ enum arch_timer_reg { struct arch_timer_kvm_info { struct timecounter timecounter; + int virtual_irq; }; #ifdef CONFIG_ARM_ARCH_TIMER