search for: on_each_cpu_cond

Displaying 17 results from an estimated 17 matches for "on_each_cpu_cond".

2016 Apr 01
0
[PATCH v3 2/6] smp: add function to execute a function synchronously on a physical cpu
...-EINVAL; + + queue_work_on(cpu, system_wq, &sscs.work); + wait_for_completion(&sscs.done); + + return sscs.ret; +} +EXPORT_SYMBOL_GPL(smp_call_sync_on_phys_cpu); diff --git a/kernel/up.c b/kernel/up.c index 1760bf3..afd395c 100644 --- a/kernel/up.c +++ b/kernel/up.c @@ -82,3 +82,12 @@ void on_each_cpu_cond(bool (*cond_func)(int cpu, void *info), preempt_enable(); } EXPORT_SYMBOL(on_each_cpu_cond); + +int smp_call_sync_on_phys_cpu(unsigned int cpu, int (*func)(void *), void *par) +{ + if (cpu != 0) + return -EINVAL; + + return func(par); +} +EXPORT_SYMBOL_GPL(smp_call_sync_on_phys_cpu); -- 2.6.2
2016 Apr 05
0
[PATCH v4 3/6] smp: add function to execute a function synchronously on a cpu
...+ return -ENXIO; + + queue_work_on(cpu, system_wq, &sscs.work); + wait_for_completion(&sscs.done); + + return sscs.ret; +} +EXPORT_SYMBOL_GPL(smp_call_on_cpu); diff --git a/kernel/up.c b/kernel/up.c index 3ccee2b..8266810b 100644 --- a/kernel/up.c +++ b/kernel/up.c @@ -83,3 +83,20 @@ void on_each_cpu_cond(bool (*cond_func)(int cpu, void *info), preempt_enable(); } EXPORT_SYMBOL(on_each_cpu_cond); + +int smp_call_on_cpu(unsigned int cpu, bool pin, int (*func)(void *), void *par) +{ + int ret; + + if (cpu != 0) + return -ENXIO; + + if (pin) + hypervisor_pin_vcpu(0); + ret = func(par); + if (pin)...
2016 Apr 06
0
[PATCH v5 3/6] smp: add function to execute a function synchronously on a cpu
...) + return -ENXIO; + + queue_work_on(cpu, system_wq, &sscs.work); + wait_for_completion(&sscs.done); + + return sscs.ret; +} +EXPORT_SYMBOL_GPL(smp_call_on_cpu); diff --git a/kernel/up.c b/kernel/up.c index 3ccee2b..ee81ac9 100644 --- a/kernel/up.c +++ b/kernel/up.c @@ -83,3 +83,20 @@ void on_each_cpu_cond(bool (*cond_func)(int cpu, void *info), preempt_enable(); } EXPORT_SYMBOL(on_each_cpu_cond); + +int smp_call_on_cpu(unsigned int cpu, int (*func)(void *), void *par, bool phys) +{ + int ret; + + if (cpu != 0) + return -ENXIO; + + if (phys) + hypervisor_pin_vcpu(0); + ret = func(par); + if (ph...
2016 Apr 01
8
[PATCH v3 0/6] Support calling functions on dedicated physical cpu
Some hardware (e.g. Dell Studio laptops) require special functions to be called on physical cpu 0 in order to avoid occasional hangs. When running as dom0 under Xen this could be achieved only via special boot parameters (vcpu pinning) limiting the hypervisor in it's scheduling decisions. This patch series is adding a generic function to be able to temporarily pin a (virtual) cpu to a
2016 Apr 01
8
[PATCH v3 0/6] Support calling functions on dedicated physical cpu
Some hardware (e.g. Dell Studio laptops) require special functions to be called on physical cpu 0 in order to avoid occasional hangs. When running as dom0 under Xen this could be achieved only via special boot parameters (vcpu pinning) limiting the hypervisor in it's scheduling decisions. This patch series is adding a generic function to be able to temporarily pin a (virtual) cpu to a
2016 Mar 21
8
[PATCH v2 0/6] Support calling functions on dedicated physical cpu
Some hardware (e.g. Dell Studio laptops) require special functions to be called on physical cpu 0 in order to avoid occasional hangs. When running as dom0 under Xen this could be achieved only via special boot parameters (vcpu pinning) limiting the hypervisor in it's scheduling decisions. This patch series is adding a generic function to be able to temporarily pin a (virtual) cpu to a
2016 Mar 21
8
[PATCH v2 0/6] Support calling functions on dedicated physical cpu
Some hardware (e.g. Dell Studio laptops) require special functions to be called on physical cpu 0 in order to avoid occasional hangs. When running as dom0 under Xen this could be achieved only via special boot parameters (vcpu pinning) limiting the hypervisor in it's scheduling decisions. This patch series is adding a generic function to be able to temporarily pin a (virtual) cpu to a
2016 Mar 21
0
[PATCH v2 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()
...up.c +++ b/kernel/up.c @@ -6,6 +6,7 @@ #include <linux/kernel.h> #include <linux/export.h> #include <linux/smp.h> +#include <linux/hypervisor.h> int smp_call_function_single(int cpu, void (*func) (void *info), void *info, int wait) @@ -85,9 +86,17 @@ EXPORT_SYMBOL(on_each_cpu_cond); int smp_call_sync_on_phys_cpu(unsigned int cpu, int (*func)(void *), void *par) { + int ret; + if (cpu != 0) return -EINVAL; - return func(par); + preempt_disable(); + hypervisor_pin_vcpu(0); + ret = func(par); + hypervisor_pin_vcpu(-1); + preempt_enable(); + + return ret; } EXPORT_S...
2016 Apr 01
0
[PATCH v3 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()
...up.c +++ b/kernel/up.c @@ -6,6 +6,7 @@ #include <linux/kernel.h> #include <linux/export.h> #include <linux/smp.h> +#include <linux/hypervisor.h> int smp_call_function_single(int cpu, void (*func) (void *info), void *info, int wait) @@ -85,9 +86,17 @@ EXPORT_SYMBOL(on_each_cpu_cond); int smp_call_sync_on_phys_cpu(unsigned int cpu, int (*func)(void *), void *par) { + int ret; + if (cpu != 0) return -EINVAL; - return func(par); + preempt_disable(); + hypervisor_pin_vcpu(0); + ret = func(par); + hypervisor_pin_vcpu(-1); + preempt_enable(); + + return ret; } EXPORT_S...
2016 Apr 01
2
[PATCH v3 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()
...gt; #include <linux/kernel.h> > #include <linux/export.h> > #include <linux/smp.h> > +#include <linux/hypervisor.h> > > int smp_call_function_single(int cpu, void (*func) (void *info), void *info, > int wait) > @@ -85,9 +86,17 @@ EXPORT_SYMBOL(on_each_cpu_cond); > > int smp_call_sync_on_phys_cpu(unsigned int cpu, int (*func)(void *), void *par) > { > + int ret; > + > if (cpu != 0) > return -EINVAL; > > - return func(par); > + preempt_disable(); > + hypervisor_pin_vcpu(0); > + ret = func(par); > + hypervis...
2016 Apr 01
2
[PATCH v3 5/6] virt, sched: add cpu pinning to smp_call_sync_on_phys_cpu()
...gt; #include <linux/kernel.h> > #include <linux/export.h> > #include <linux/smp.h> > +#include <linux/hypervisor.h> > > int smp_call_function_single(int cpu, void (*func) (void *info), void *info, > int wait) > @@ -85,9 +86,17 @@ EXPORT_SYMBOL(on_each_cpu_cond); > > int smp_call_sync_on_phys_cpu(unsigned int cpu, int (*func)(void *), void *par) > { > + int ret; > + > if (cpu != 0) > return -EINVAL; > > - return func(par); > + preempt_disable(); > + hypervisor_pin_vcpu(0); > + ret = func(par); > + hypervis...
2016 Aug 29
6
[PATCH v6 0/6] Support calling functions on dedicated physical cpu
Some hardware (e.g. Dell Studio laptops) require special functions to be called on physical cpu 0 in order to avoid occasional hangs. When running as dom0 under Xen this could be achieved only via special boot parameters (vcpu pinning) limiting the hypervisor in it's scheduling decisions. This patch series is adding a generic function to be able to temporarily pin a (virtual) cpu to a
2016 Aug 29
6
[PATCH v6 0/6] Support calling functions on dedicated physical cpu
Some hardware (e.g. Dell Studio laptops) require special functions to be called on physical cpu 0 in order to avoid occasional hangs. When running as dom0 under Xen this could be achieved only via special boot parameters (vcpu pinning) limiting the hypervisor in it's scheduling decisions. This patch series is adding a generic function to be able to temporarily pin a (virtual) cpu to a
2016 Apr 05
10
[PATCH v4 0/6] Support calling functions on dedicated physical cpu
Some hardware (e.g. Dell Studio laptops) require special functions to be called on physical cpu 0 in order to avoid occasional hangs. When running as dom0 under Xen this could be achieved only via special boot parameters (vcpu pinning) limiting the hypervisor in it's scheduling decisions. This patch series is adding a generic function to be able to temporarily pin a (virtual) cpu to a
2016 Apr 05
10
[PATCH v4 0/6] Support calling functions on dedicated physical cpu
Some hardware (e.g. Dell Studio laptops) require special functions to be called on physical cpu 0 in order to avoid occasional hangs. When running as dom0 under Xen this could be achieved only via special boot parameters (vcpu pinning) limiting the hypervisor in it's scheduling decisions. This patch series is adding a generic function to be able to temporarily pin a (virtual) cpu to a
2016 Apr 06
14
[PATCH v5 0/6] Support calling functions on dedicated physical cpu
Some hardware (e.g. Dell Studio laptops) require special functions to be called on physical cpu 0 in order to avoid occasional hangs. When running as dom0 under Xen this could be achieved only via special boot parameters (vcpu pinning) limiting the hypervisor in it's scheduling decisions. This patch series is adding a generic function to be able to temporarily pin a (virtual) cpu to a
2016 Apr 06
14
[PATCH v5 0/6] Support calling functions on dedicated physical cpu
Some hardware (e.g. Dell Studio laptops) require special functions to be called on physical cpu 0 in order to avoid occasional hangs. When running as dom0 under Xen this could be achieved only via special boot parameters (vcpu pinning) limiting the hypervisor in it's scheduling decisions. This patch series is adding a generic function to be able to temporarily pin a (virtual) cpu to a