Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1579022
| From | Thomas Gleixner <tglx@linutronix.de> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 1/5] irq: set {msi_domain,syscore}_ops as __ro_after_init |
| Date | 2017-02-11 13:10 +0100 |
| Message-ID | <t9EF3-wX-9@gated-at.bofh.it> (permalink) |
| References | <t9uPn-2IM-5@gated-at.bofh.it> <t9C0x-7jp-5@gated-at.bofh.it> <t9DpD-83k-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Sat, 11 Feb 2017, Jess Frazelle wrote:
> On February 11, 2017 1:14:52 AM PST, Thomas Gleixner <tglx@linutronix.de> wrote:
> >The same is true for cpuhotunplug operations.
>
> This makes sense. Will remove.
That's true for all other patches touching sysops as well. But instead of
giving up I'd recommend to look into the following:
Go through all callsites which use un/register_syscore_ops() and figure out
how many of them are possibly called post init. From a quick grep I can
only find the KVM module, but there might be more.
Lets assume it's KVM only. So you could do the following:
Put something like this into virt/kvm/kvm_main.c, which is a builtin file
static struct syscore_ops ops __ro_after_init = {
....
};
int __init foo()
{
register_ops(&ops);
}
and because we know that kvm is single instance you can just have:
static struct syscore_ops *kvm_ops;
void kvm_set_sysop(*vmx_ops)
{
kvm_ops = ops;
}
and then have the kvm_syscore callbacks:
static callback()
{
if (kvm_ops)
kvm_ops->callback()
}
Sanity checks and serialization omitted. Then switch kvm_exit/init over to
it.
After that you can make all syscore_ops __ro_after_init, remove the export
from (un)register_syscore_ops() and make that __init.
Not much of an effort and probably worth the trouble.
Thanks,
tglx
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 1/5] irq: set {msi_domain,syscore}_ops as __ro_after_init Jess Frazelle <me@jessfraz.com> - 2017-02-11 02:40 +0100
[PATCH v2 5/5] x86: set msi_domain_ops as __ro_after_init Jess Frazelle <me@jessfraz.com> - 2017-02-11 02:40 +0100
[PATCH v2 3/5] pci: set msi_domain_ops as __ro_after_init Jess Frazelle <me@jessfraz.com> - 2017-02-11 02:40 +0100
RE: [PATCH v2 3/5] pci: set msi_domain_ops as __ro_after_init KY Srinivasan <kys@microsoft.com> - 2017-02-12 05:10 +0100
Re: [PATCH v2 3/5] pci: set msi_domain_ops as __ro_after_init Keith Busch <keith.busch@intel.com> - 2017-02-13 19:10 +0100
Re: [PATCH v2 1/5] irq: set {msi_domain,syscore}_ops as __ro_after_init Thomas Gleixner <tglx@linutronix.de> - 2017-02-11 10:20 +0100
Re: [PATCH v2 1/5] irq: set {msi_domain,syscore}_ops as __ro_after_init Thomas Gleixner <tglx@linutronix.de> - 2017-02-11 10:30 +0100
Re: [PATCH v2 1/5] irq: set {msi_domain,syscore}_ops as __ro_after_init Jess Frazelle <me@jessfraz.com> - 2017-02-11 11:50 +0100
Re: [PATCH v2 1/5] irq: set {msi_domain,syscore}_ops as __ro_after_init Thomas Gleixner <tglx@linutronix.de> - 2017-02-11 13:10 +0100
Re: [PATCH v2 1/5] irq: set {msi_domain,syscore}_ops as __ro_after_init Jessica Frazelle <me@jessfraz.com> - 2017-02-11 13:20 +0100
csiph-web