From patchwork Wed Jan 24 18:10:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 125698 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp581123ljf; Wed, 24 Jan 2018 10:13:51 -0800 (PST) X-Google-Smtp-Source: AH8x227JalHrjsGYU5vvHR8Eyr4Vxc9pvm07sfFFcn9NmsrT9uKcxsrywzIbz99vE79Yuy2jNDYb X-Received: by 10.36.160.5 with SMTP id o5mr9436709ite.79.1516817631499; Wed, 24 Jan 2018 10:13:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516817631; cv=none; d=google.com; s=arc-20160816; b=Kdmqyo91dhNbcAKVYcrS0NommznDgsEwFEqxZ66Hhm/Xjuzu57qFLVJTf+T2qPJ6jZ 9HAE73nd27vIsXFTfAcr7V40LAtE4KYTTLNwsSDHOVS2LdhzZ8BXtOlQI/a5GJw2dm+G VZXqJ8qKgqRHTBvNJSF73sAlEgRdkxpQI+kHIQPRGKDpvWEbRRmTzl5j23GEDSRriVGV rokq12gW5lNU3JXUF94fifhLE3AbLKf8HYX8DPUN7PyatLNy2lDxYG8R+F5EGJvTJcfp RLShdrTaLOGDnmC8spTaoSFoKqI53LLMhBgtb+umfLj0Fgg+dg3yo9urWDMTriRg1n5k wEMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:cc:references:in-reply-to:message-id:date:to :from:dkim-signature:arc-authentication-results; bh=zB6JGVcRyS6hdHXQQqgZnHAJhGhGQq9n/mnwvAnOo08=; b=tVHUtVPmbBjS9B3xANvnD/LqYSSeVkZh320yG087OKR5Os+KqUvui7aJ+DEX/6+/aA iF2l+5NHBOLPFrd8ccCMEgC3Dn5/kG4jIgTiFDR2CIAiV3e49WrG9ophAc5Z6BsfZ7s/ jatZvfG2atNI2Jtdnroz/HugrE14BLOe4Wc+UILBHngZTQwrGiUNFSBt3um6MKceFHN8 Ka1t71hObyauOH6OMiqS8uQ8MNdqpIsIkaeN+v+AF652vH+xiKXnKUHbrdOxAEX+QpnD 3CCKv2pOPkG/Nnfs4QmfXsMF93W9APvvJCT3xzjKv96huLplyzGNZu34LbguFgnjQf6e WrrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=AVNRNEDA; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id r18si616300iod.120.2018.01.24.10.13.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Jan 2018 10:13:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=AVNRNEDA; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eePVh-00077O-S9; Wed, 24 Jan 2018 18:10:57 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eePVg-00077C-Qj for xen-devel@lists.xenproject.org; Wed, 24 Jan 2018 18:10:57 +0000 X-Inumbo-ID: e9090449-0131-11e8-ba59-bc764e045a96 Received: from mail-wr0-x243.google.com (unknown [2a00:1450:400c:c0c::243]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id e9090449-0131-11e8-ba59-bc764e045a96; Wed, 24 Jan 2018 19:10:51 +0100 (CET) Received: by mail-wr0-x243.google.com with SMTP id f11so4987854wre.4 for ; Wed, 24 Jan 2018 10:10:55 -0800 (PST) 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=cXQvMhGWrZos9BJG2l8H7M2pULnhVpCMwaOz0/F3tsQ=; b=AVNRNEDA6sx7O/WtgVkbzvUSY97eeOo2htlpT6cmhiRf1mm/b2op51dX2Q/2JmcJo4 9J1Z79+obKc3yOv7hiDujlGCYm3iwrmghkG22XpGffLDgCVWkrxK1pEfUv9XBqoojC3C J/Ytjwof6GbRxDeqQaXihb8MMpLlFZDeeOa54= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=cXQvMhGWrZos9BJG2l8H7M2pULnhVpCMwaOz0/F3tsQ=; b=kEgAkTZ5qcl4IYugg42sgn2bT0JAO/HMvehkYMueSpUCS4WxDVVFIG41AXPOUxQVQ5 6yx5m2Uu/yJa2ArNTAQP0jq4wLTZLob4SK4NvLxaSEPdC/TwE0m2XMBKp3cXE7/EXHLp +4A9kq593sCT7TrX7DbKM7O0sWVmygZTPW2nYexgrxkYOGPAef6I8rKDnEDnDb+c6dIF pKOh9mQCRDC37dyck/IVieLxNwIrBlGw3Y/kbM2vb9ONEgbLb3GsoGeyTIYNgShn9uCW PITliJFTThkVDkY8lCSa3KPEYFfocyrYKE1AROtT+wnDH5c4aPxmuzeAsuErouPwT+A9 0xDA== X-Gm-Message-State: AKwxytfqNAnk0ytwr1JU8YZ9X+z9CqdvHWMFUEElu7v+uxwc2g+Gup+f 20oEwAJayaKMAjcGZcywJH37RQ== X-Received: by 10.223.150.172 with SMTP id u41mr6257191wrb.193.1516817454406; Wed, 24 Jan 2018 10:10:54 -0800 (PST) Received: from e104803-lin.lan (mail.andrep.de. [217.160.17.100]) by smtp.gmail.com with ESMTPSA id r68sm899379wmd.47.2018.01.24.10.10.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 24 Jan 2018 10:10:53 -0800 (PST) From: Andre Przywara To: Julien Grall , Stefano Stabellini Date: Wed, 24 Jan 2018 18:10:51 +0000 Message-Id: <20180124181058.6157-2-andre.przywara@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180124181058.6157-1-andre.przywara@linaro.org> References: <20180124181058.6157-1-andre.przywara@linaro.org> Cc: xen-devel@lists.xenproject.org Subject: [Xen-devel] [PATCH v3 1/8] ARM: VGIC: drop unneeded gic_restore_pending_irqs() X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" In gic_restore_pending_irqs() we push our pending virtual IRQs into the list registers. This function is called once from gic_inject(), just before we return to the guest, but also in gic_restore_state(), when we context-switch a VCPU. Having a closer look it turns out that the later call is not needed, since we will always call gic_inject() anyway. So remove that call (and the forward declaration) to streamline this interface and make separating the GIC from the VGIC world later. Signed-off-by: Andre Przywara Reviewed-by: Julien Grall Reviewed-by: Stefano Stabellini --- xen/arch/arm/gic.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c index bac8ada2bb..721a17a9d7 100644 --- a/xen/arch/arm/gic.c +++ b/xen/arch/arm/gic.c @@ -36,8 +36,6 @@ #include #include -static void gic_restore_pending_irqs(struct vcpu *v); - static DEFINE_PER_CPU(uint64_t, lr_mask); #define lr_all_full() (this_cpu(lr_mask) == ((1 << gic_hw_ops->info->nr_lrs) - 1)) @@ -91,8 +89,6 @@ void gic_restore_state(struct vcpu *v) gic_hw_ops->restore_state(v); isb(); - - gic_restore_pending_irqs(v); } /* desc->irq needs to be disabled before calling this function */