summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-vpn/wireguard/files/wireguard-0.0.20170531-remove-padata-hotplug.patch')
-rw-r--r--net-vpn/wireguard/files/wireguard-0.0.20170531-remove-padata-hotplug.patch188
1 files changed, 0 insertions, 188 deletions
diff --git a/net-vpn/wireguard/files/wireguard-0.0.20170531-remove-padata-hotplug.patch b/net-vpn/wireguard/files/wireguard-0.0.20170531-remove-padata-hotplug.patch
deleted file mode 100644
index a1f4b80d01d..00000000000
--- a/net-vpn/wireguard/files/wireguard-0.0.20170531-remove-padata-hotplug.patch
+++ /dev/null
@@ -1,188 +0,0 @@
-From 1e0405942cecfd6de2a7707f3027f326d6f2fdb4 Mon Sep 17 00:00:00 2001
-From: "Jason A. Donenfeld" <Jason@zx2c4.com>
-Date: Thu, 1 Jun 2017 16:55:20 +0200
-Subject: compat: remove padata hotplug code
-
-It's different on different kernel versions, and we're not using it
-anyway, so it's easiest to just get rid of it, rather than having
-another ifdef maze.
----
- src/compat/padata/padata.c | 149 ---------------------------------------------
- 1 file changed, 149 deletions(-)
-
-diff --git a/src/compat/padata/padata.c b/src/compat/padata/padata.c
-index 480c43f..25836db 100644
---- a/src/compat/padata/padata.c
-+++ b/src/compat/padata/padata.c
-@@ -677,131 +677,8 @@ void padata_stop(struct padata_instance *pinst)
- mutex_unlock(&pinst->lock);
- }
-
--#ifdef CONFIG_HOTPLUG_CPU
--
--static int __padata_add_cpu(struct padata_instance *pinst, int cpu)
--{
-- struct parallel_data *pd;
--
-- if (cpumask_test_cpu(cpu, cpu_online_mask)) {
-- pd = padata_alloc_pd(pinst, pinst->cpumask.pcpu,
-- pinst->cpumask.cbcpu);
-- if (!pd)
-- return -ENOMEM;
--
-- padata_replace(pinst, pd);
--
-- if (padata_validate_cpumask(pinst, pinst->cpumask.pcpu) &&
-- padata_validate_cpumask(pinst, pinst->cpumask.cbcpu))
-- __padata_start(pinst);
-- }
--
-- return 0;
--}
--
--static int __padata_remove_cpu(struct padata_instance *pinst, int cpu)
--{
-- struct parallel_data *pd = NULL;
--
-- if (cpumask_test_cpu(cpu, cpu_online_mask)) {
--
-- if (!padata_validate_cpumask(pinst, pinst->cpumask.pcpu) ||
-- !padata_validate_cpumask(pinst, pinst->cpumask.cbcpu))
-- __padata_stop(pinst);
--
-- pd = padata_alloc_pd(pinst, pinst->cpumask.pcpu,
-- pinst->cpumask.cbcpu);
-- if (!pd)
-- return -ENOMEM;
--
-- padata_replace(pinst, pd);
--
-- cpumask_clear_cpu(cpu, pd->cpumask.cbcpu);
-- cpumask_clear_cpu(cpu, pd->cpumask.pcpu);
-- }
--
-- return 0;
--}
--
-- /**
-- * padata_remove_cpu - remove a cpu from the one or both(serial and parallel)
-- * padata cpumasks.
-- *
-- * @pinst: padata instance
-- * @cpu: cpu to remove
-- * @mask: bitmask specifying from which cpumask @cpu should be removed
-- * The @mask may be any combination of the following flags:
-- * PADATA_CPU_SERIAL - serial cpumask
-- * PADATA_CPU_PARALLEL - parallel cpumask
-- */
--int padata_remove_cpu(struct padata_instance *pinst, int cpu, int mask)
--{
-- int err;
--
-- if (!(mask & (PADATA_CPU_SERIAL | PADATA_CPU_PARALLEL)))
-- return -EINVAL;
--
-- mutex_lock(&pinst->lock);
--
-- get_online_cpus();
-- if (mask & PADATA_CPU_SERIAL)
-- cpumask_clear_cpu(cpu, pinst->cpumask.cbcpu);
-- if (mask & PADATA_CPU_PARALLEL)
-- cpumask_clear_cpu(cpu, pinst->cpumask.pcpu);
--
-- err = __padata_remove_cpu(pinst, cpu);
-- put_online_cpus();
--
-- mutex_unlock(&pinst->lock);
--
-- return err;
--}
--
--static inline int pinst_has_cpu(struct padata_instance *pinst, int cpu)
--{
-- return cpumask_test_cpu(cpu, pinst->cpumask.pcpu) ||
-- cpumask_test_cpu(cpu, pinst->cpumask.cbcpu);
--}
--
--static int padata_cpu_online(unsigned int cpu, struct hlist_node *node)
--{
-- struct padata_instance *pinst;
-- int ret;
--
-- pinst = hlist_entry_safe(node, struct padata_instance, node);
-- if (!pinst_has_cpu(pinst, cpu))
-- return 0;
--
-- mutex_lock(&pinst->lock);
-- ret = __padata_add_cpu(pinst, cpu);
-- mutex_unlock(&pinst->lock);
-- return ret;
--}
--
--static int padata_cpu_prep_down(unsigned int cpu, struct hlist_node *node)
--{
-- struct padata_instance *pinst;
-- int ret;
--
-- pinst = hlist_entry_safe(node, struct padata_instance, node);
-- if (!pinst_has_cpu(pinst, cpu))
-- return 0;
--
-- mutex_lock(&pinst->lock);
-- ret = __padata_remove_cpu(pinst, cpu);
-- mutex_unlock(&pinst->lock);
-- return ret;
--}
--
--static enum cpuhp_state hp_online;
--#endif
--
- static void __padata_free(struct padata_instance *pinst)
- {
--#ifdef CONFIG_HOTPLUG_CPU
-- cpuhp_state_remove_instance_nocalls(hp_online, &pinst->node);
--#endif
--
- padata_stop(pinst);
- padata_free_pd(pinst->pd);
- free_cpumask_var(pinst->cpumask.pcpu);
-@@ -995,9 +872,6 @@ struct padata_instance *padata_alloc(struct workqueue_struct *wq,
- kobject_init(&pinst->kobj, &padata_attr_type);
- mutex_init(&pinst->lock);
-
--#ifdef CONFIG_HOTPLUG_CPU
-- cpuhp_state_add_instance_nocalls(hp_online, &pinst->node);
--#endif
- return pinst;
-
- err_free_masks:
-@@ -1019,26 +893,3 @@ void padata_free(struct padata_instance *pinst)
- {
- kobject_put(&pinst->kobj);
- }
--
--#ifdef CONFIG_HOTPLUG_CPU
--
--static __init int padata_driver_init(void)
--{
-- int ret;
--
-- ret = cpuhp_setup_state_multi(CPUHP_AP_ONLINE_DYN, "padata:online",
-- padata_cpu_online,
-- padata_cpu_prep_down);
-- if (ret < 0)
-- return ret;
-- hp_online = ret;
-- return 0;
--}
--module_init(padata_driver_init);
--
--static __exit void padata_driver_exit(void)
--{
-- cpuhp_remove_multi_state(hp_online);
--}
--module_exit(padata_driver_exit);
--#endif
---
-cgit v1.1-9-ge9c1d
-