From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Christoffer Dall <cdall@cs.columbia.edu>,
Marc Zyngier <marc.zyngier@arm.com>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
Will Deacon <will.deacon@arm.com>
Subject: linux-next: manual merge of the kvm-arm tree with the kvm tree
Date: Thu, 18 Sep 2014 13:52:26 +1000 [thread overview]
Message-ID: <20140918135226.0526f91f@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 2885 bytes --]
Hi all,
Today's linux-next merge of the kvm-arm tree got a conflict in
virt/kvm/arm/vgic.c between commit c06a841bf363 ("KVM: ARM: vgic:
register kvm_device_ops dynamically") from the kvm tree and commit
de56fb1923ca ("KVM: vgic: declare probe function pointer as const")
from the kvm-arm tree.
I fixed it up (see below) and can carry the fix as necessary (no action
is required).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc virt/kvm/arm/vgic.c
index 3ee3ce06bbec,efe6eee2e7eb..000000000000
--- a/virt/kvm/arm/vgic.c
+++ b/virt/kvm/arm/vgic.c
@@@ -1993,81 -2070,3 +1993,81 @@@ static struct kvm_device_ops kvm_arm_vg
.get_attr = vgic_get_attr,
.has_attr = vgic_has_attr,
};
+
+static void vgic_init_maintenance_interrupt(void *info)
+{
+ enable_percpu_irq(vgic->maint_irq, 0);
+}
+
+static int vgic_cpu_notify(struct notifier_block *self,
+ unsigned long action, void *cpu)
+{
+ switch (action) {
+ case CPU_STARTING:
+ case CPU_STARTING_FROZEN:
+ vgic_init_maintenance_interrupt(NULL);
+ break;
+ case CPU_DYING:
+ case CPU_DYING_FROZEN:
+ disable_percpu_irq(vgic->maint_irq);
+ break;
+ }
+
+ return NOTIFY_OK;
+}
+
+static struct notifier_block vgic_cpu_nb = {
+ .notifier_call = vgic_cpu_notify,
+};
+
+static const struct of_device_id vgic_ids[] = {
+ { .compatible = "arm,cortex-a15-gic", .data = vgic_v2_probe, },
+ { .compatible = "arm,gic-v3", .data = vgic_v3_probe, },
+ {},
+};
+
+int kvm_vgic_hyp_init(void)
+{
+ const struct of_device_id *matched_id;
- int (*vgic_probe)(struct device_node *,const struct vgic_ops **,
++ const int (*vgic_probe)(struct device_node *,const struct vgic_ops **,
+ const struct vgic_params **);
+ struct device_node *vgic_node;
+ int ret;
+
+ vgic_node = of_find_matching_node_and_match(NULL,
+ vgic_ids, &matched_id);
+ if (!vgic_node) {
+ kvm_err("error: no compatible GIC node found\n");
+ return -ENODEV;
+ }
+
+ vgic_probe = matched_id->data;
+ ret = vgic_probe(vgic_node, &vgic_ops, &vgic);
+ if (ret)
+ return ret;
+
+ ret = request_percpu_irq(vgic->maint_irq, vgic_maintenance_handler,
+ "vgic", kvm_get_running_vcpus());
+ if (ret) {
+ kvm_err("Cannot register interrupt %d\n", vgic->maint_irq);
+ return ret;
+ }
+
+ ret = __register_cpu_notifier(&vgic_cpu_nb);
+ if (ret) {
+ kvm_err("Cannot register vgic CPU notifier\n");
+ goto out_free_irq;
+ }
+
+ /* Callback into for arch code for setup */
+ vgic_arch_setup(vgic);
+
+ on_each_cpu(vgic_init_maintenance_interrupt, NULL, 1);
+
+ return kvm_register_device_ops(&kvm_arm_vgic_v2_ops,
+ KVM_DEV_TYPE_ARM_VGIC_V2);
+
+out_free_irq:
+ free_percpu_irq(vgic->maint_irq, kvm_get_running_vcpus());
+ return ret;
+}
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next reply other threads:[~2014-09-18 3:52 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-18 3:52 Stephen Rothwell [this message]
2014-09-18 15:13 ` linux-next: manual merge of the kvm-arm tree with the kvm tree Marc Zyngier
-- strict thread matches above, loose matches on Subject: below --
2023-04-06 3:06 Stephen Rothwell
2023-03-31 2:26 Stephen Rothwell
2022-12-01 2:16 Stephen Rothwell
2022-12-01 15:23 ` Marc Zyngier
2022-12-01 1:09 Stephen Rothwell
2022-12-01 0:57 Stephen Rothwell
2022-12-01 0:36 Stephen Rothwell
2022-12-01 0:24 Stephen Rothwell
2022-07-18 5:19 Stephen Rothwell
2022-05-05 4:47 Stephen Rothwell
2021-12-17 4:19 Stephen Rothwell
2021-12-09 22:01 broonie
2021-06-25 5:24 Stephen Rothwell
2021-06-25 5:20 Stephen Rothwell
2021-06-25 5:15 Stephen Rothwell
2021-06-23 5:53 Stephen Rothwell
2021-06-22 5:31 Stephen Rothwell
2021-04-22 4:43 Stephen Rothwell
2021-04-22 4:39 Stephen Rothwell
2020-07-13 4:40 Stephen Rothwell
2020-08-09 8:55 ` Stephen Rothwell
2020-07-13 4:39 Stephen Rothwell
2020-08-09 8:54 ` Stephen Rothwell
2020-03-25 3:23 Stephen Rothwell
2018-10-18 2:46 Stephen Rothwell
2017-04-10 3:52 Stephen Rothwell
2017-04-10 6:26 ` Christoffer Dall
2016-07-24 6:04 Stephen Rothwell
2016-07-24 5:59 Stephen Rothwell
2016-07-20 5:27 Stephen Rothwell
2015-10-16 3:53 Stephen Rothwell
2015-10-16 4:20 ` Wu, Feng
2014-11-26 6:19 Stephen Rothwell
2014-11-26 11:39 ` Christoffer Dall
2014-09-25 5:32 Stephen Rothwell
2014-09-08 6:04 Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140918135226.0526f91f@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=cdall@cs.columbia.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=marc.zyngier@arm.com \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).