diff for duplicates of <559ce4c1fef10c45eab12f65c4e0f0d9@codeaurora.org> diff --git a/a/1.txt b/N1/1.txt index afc7649..bd79d0f 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -52,10 +52,3 @@ are getting notified during cpu hot plug. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, Linux Foundation Collaborative Project --------------- next part -------------- -A non-text attachment was scrubbed... -Name: 0001-genirq-Notify-clients-whenever-there-is-change-in-af.patch -Type: text/x-diff -Size: 3321 bytes -Desc: not available -URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170317/409d9484/attachment-0001.bin> diff --git a/N1/2.hdr b/N1/2.hdr new file mode 100644 index 0000000..8d075b3 --- /dev/null +++ b/N1/2.hdr @@ -0,0 +1,6 @@ +Content-Transfer-Encoding: base64 +Content-Type: text/x-diff; + name=0001-genirq-Notify-clients-whenever-there-is-change-in-af.patch +Content-Disposition: attachment; + filename=0001-genirq-Notify-clients-whenever-there-is-change-in-af.patch; + size=3321 diff --git a/N1/2.txt b/N1/2.txt new file mode 100644 index 0000000..de15804 --- /dev/null +++ b/N1/2.txt @@ -0,0 +1,86 @@ +From 54b8d5164126fbdf14d1a9586342b972a6eb5537 Mon Sep 17 00:00:00 2001 +From: Prasad Sodagudi <psodagud@codeaurora.org> +Date: Thu, 16 Mar 2017 23:44:44 -0700 +Subject: [PATCH] genirq: Notify clients whenever there is change in affinity + +During the cpu hotplug, irq are getting migrated from +hotplugging core but not getting notitfied to client +drivers. So add parameter to irq_do_set_affinity(), +to check and notify client drivers during the cpu hotplug. + +Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org> +--- + kernel/irq/cpuhotplug.c | 2 +- + kernel/irq/internals.h | 2 +- + kernel/irq/manage.c | 9 ++++++--- + 3 files changed, 8 insertions(+), 5 deletions(-) + +diff --git a/kernel/irq/cpuhotplug.c b/kernel/irq/cpuhotplug.c +index 011f8c4..e293d9b 100644 +--- a/kernel/irq/cpuhotplug.c ++++ b/kernel/irq/cpuhotplug.c +@@ -38,7 +38,7 @@ static bool migrate_one_irq(struct irq_desc *desc) + if (!c->irq_set_affinity) { + pr_debug("IRQ%u: unable to set affinity\n", d->irq); + } else { +- int r = irq_do_set_affinity(d, affinity, false); ++ int r = irq_do_set_affinity(d, affinity, false, true); + if (r) + pr_warn_ratelimited("IRQ%u: set affinity failed(%d).\n", + d->irq, r); +diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h +index bc226e7..6abde48 100644 +--- a/kernel/irq/internals.h ++++ b/kernel/irq/internals.h +@@ -114,7 +114,7 @@ static inline void unregister_handler_proc(unsigned int irq, + extern void irq_set_thread_affinity(struct irq_desc *desc); + + extern int irq_do_set_affinity(struct irq_data *data, +- const struct cpumask *dest, bool force); ++ const struct cpumask *dest, bool force, bool notify); + + /* Inline functions for support of irq chips on slow busses */ + static inline void chip_bus_lock(struct irq_desc *desc) +diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c +index a4afe5c..aef8a96 100644 +--- a/kernel/irq/manage.c ++++ b/kernel/irq/manage.c +@@ -197,7 +197,7 @@ static inline bool irq_move_pending(struct irq_data *data) + #endif + + int irq_do_set_affinity(struct irq_data *data, const struct cpumask *mask, +- bool force) ++ bool force, bool notify) + { + struct irq_desc *desc = irq_data_to_desc(data); + struct irq_chip *chip = irq_data_get_irq_chip(data); +@@ -209,6 +209,9 @@ int irq_do_set_affinity(struct irq_data *data, const struct cpumask *mask, + case IRQ_SET_MASK_OK_DONE: + cpumask_copy(desc->irq_common_data.affinity, mask); + case IRQ_SET_MASK_OK_NOCOPY: ++ if (notify) ++ schedule_work(&desc->affinity_notify->work); ++ + irq_set_thread_affinity(desc); + ret = 0; + } +@@ -227,7 +230,7 @@ int irq_set_affinity_locked(struct irq_data *data, const struct cpumask *mask, + return -EINVAL; + + if (irq_can_move_pcntxt(data)) { +- ret = irq_do_set_affinity(data, mask, force); ++ ret = irq_do_set_affinity(data, mask, force, false); + } else { + irqd_set_move_pending(data); + irq_copy_pending(desc, mask); +@@ -375,7 +378,7 @@ static int setup_affinity(struct irq_desc *desc, struct cpumask *mask) + if (cpumask_intersects(mask, nodemask)) + cpumask_and(mask, mask, nodemask); + } +- irq_do_set_affinity(&desc->irq_data, mask, false); ++ irq_do_set_affinity(&desc->irq_data, mask, false, true); + return 0; + } + #else +-- +The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,\na Linux Foundation Collaborative Project diff --git a/a/content_digest b/N1/content_digest index 357cb43..54b432c 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -3,11 +3,16 @@ "ref\0alpine.DEB.2.20.1702271818370.4732@nanos\0" "ref\036fe90bcca0a9c6283c4012412ed2924@codeaurora.org\0" "ref\0alpine.DEB.2.20.1703132047250.3712@nanos\0" - "From\0psodagud@codeaurora.org (Sodagudi Prasad)\0" - "Subject\0Schedule affinity_notify work while migrating IRQs during hot plug\0" + "From\0Sodagudi Prasad <psodagud@codeaurora.org>\0" + "Subject\0Re: Schedule affinity_notify work while migrating IRQs during hot plug\0" "Date\0Fri, 17 Mar 2017 03:51:19 -0700\0" - "To\0linux-arm-kernel@lists.infradead.org\0" - "\00:1\0" + "To\0Thomas Gleixner <tglx@linutronix.de>\0" + "Cc\0linux-kernel@vger.kernel.org" + linux-arm-kernel@lists.infradead.org + james.morse@arm.com + will.deacon@arm.com + " catalin.marinas@arm.com\0" + "\01:1\0" "b\0" "On 2017-03-13 13:19, Thomas Gleixner wrote:\n" "> On Mon, 13 Mar 2017, Sodagudi Prasad wrote:\n" @@ -62,13 +67,95 @@ "-- \n" "The Qualcomm Innovation Center, Inc. is a member of the Code Aurora \n" "Forum,\n" - "Linux Foundation Collaborative Project\n" - "-------------- next part --------------\n" - "A non-text attachment was scrubbed...\n" - "Name: 0001-genirq-Notify-clients-whenever-there-is-change-in-af.patch\n" - "Type: text/x-diff\n" - "Size: 3321 bytes\n" - "Desc: not available\n" - URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170317/409d9484/attachment-0001.bin> + Linux Foundation Collaborative Project + "\01:2\0" + "fn\00001-genirq-Notify-clients-whenever-there-is-change-in-af.patch\0" + "b\0" + "From 54b8d5164126fbdf14d1a9586342b972a6eb5537 Mon Sep 17 00:00:00 2001\n" + "From: Prasad Sodagudi <psodagud@codeaurora.org>\n" + "Date: Thu, 16 Mar 2017 23:44:44 -0700\n" + "Subject: [PATCH] genirq: Notify clients whenever there is change in affinity\n" + "\n" + "During the cpu hotplug, irq are getting migrated from\n" + "hotplugging core but not getting notitfied to client\n" + "drivers. So add parameter to irq_do_set_affinity(),\n" + "to check and notify client drivers during the cpu hotplug.\n" + "\n" + "Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>\n" + "---\n" + " kernel/irq/cpuhotplug.c | 2 +-\n" + " kernel/irq/internals.h | 2 +-\n" + " kernel/irq/manage.c | 9 ++++++---\n" + " 3 files changed, 8 insertions(+), 5 deletions(-)\n" + "\n" + "diff --git a/kernel/irq/cpuhotplug.c b/kernel/irq/cpuhotplug.c\n" + "index 011f8c4..e293d9b 100644\n" + "--- a/kernel/irq/cpuhotplug.c\n" + "+++ b/kernel/irq/cpuhotplug.c\n" + "@@ -38,7 +38,7 @@ static bool migrate_one_irq(struct irq_desc *desc)\n" + " \tif (!c->irq_set_affinity) {\n" + " \t\tpr_debug(\"IRQ%u: unable to set affinity\\n\", d->irq);\n" + " \t} else {\n" + "-\t\tint r = irq_do_set_affinity(d, affinity, false);\n" + "+\t\tint r = irq_do_set_affinity(d, affinity, false, true);\n" + " \t\tif (r)\n" + " \t\t\tpr_warn_ratelimited(\"IRQ%u: set affinity failed(%d).\\n\",\n" + " \t\t\t\t\t d->irq, r);\n" + "diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h\n" + "index bc226e7..6abde48 100644\n" + "--- a/kernel/irq/internals.h\n" + "+++ b/kernel/irq/internals.h\n" + "@@ -114,7 +114,7 @@ static inline void unregister_handler_proc(unsigned int irq,\n" + " extern void irq_set_thread_affinity(struct irq_desc *desc);\n" + " \n" + " extern int irq_do_set_affinity(struct irq_data *data,\n" + "-\t\t\t const struct cpumask *dest, bool force);\n" + "+\t\tconst struct cpumask *dest, bool force, bool notify);\n" + " \n" + " /* Inline functions for support of irq chips on slow busses */\n" + " static inline void chip_bus_lock(struct irq_desc *desc)\n" + "diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c\n" + "index a4afe5c..aef8a96 100644\n" + "--- a/kernel/irq/manage.c\n" + "+++ b/kernel/irq/manage.c\n" + "@@ -197,7 +197,7 @@ static inline bool irq_move_pending(struct irq_data *data)\n" + " #endif\n" + " \n" + " int irq_do_set_affinity(struct irq_data *data, const struct cpumask *mask,\n" + "-\t\t\tbool force)\n" + "+\t\t\tbool force, bool notify)\n" + " {\n" + " \tstruct irq_desc *desc = irq_data_to_desc(data);\n" + " \tstruct irq_chip *chip = irq_data_get_irq_chip(data);\n" + "@@ -209,6 +209,9 @@ int irq_do_set_affinity(struct irq_data *data, const struct cpumask *mask,\n" + " \tcase IRQ_SET_MASK_OK_DONE:\n" + " \t\tcpumask_copy(desc->irq_common_data.affinity, mask);\n" + " \tcase IRQ_SET_MASK_OK_NOCOPY:\n" + "+\t\tif (notify)\n" + "+\t\t\tschedule_work(&desc->affinity_notify->work);\n" + "+\n" + " \t\tirq_set_thread_affinity(desc);\n" + " \t\tret = 0;\n" + " \t}\n" + "@@ -227,7 +230,7 @@ int irq_set_affinity_locked(struct irq_data *data, const struct cpumask *mask,\n" + " \t\treturn -EINVAL;\n" + " \n" + " \tif (irq_can_move_pcntxt(data)) {\n" + "-\t\tret = irq_do_set_affinity(data, mask, force);\n" + "+\t\tret = irq_do_set_affinity(data, mask, force, false);\n" + " \t} else {\n" + " \t\tirqd_set_move_pending(data);\n" + " \t\tirq_copy_pending(desc, mask);\n" + "@@ -375,7 +378,7 @@ static int setup_affinity(struct irq_desc *desc, struct cpumask *mask)\n" + " \t\tif (cpumask_intersects(mask, nodemask))\n" + " \t\t\tcpumask_and(mask, mask, nodemask);\n" + " \t}\n" + "-\tirq_do_set_affinity(&desc->irq_data, mask, false);\n" + "+\tirq_do_set_affinity(&desc->irq_data, mask, false, true);\n" + " \treturn 0;\n" + " }\n" + " #else\n" + "-- \n" + "The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,\\na Linux Foundation Collaborative Project" -cf2dd380e6cbdc514512ffdc85e3f0156042680eee7d197658607751dc8a56a8 +710eafea0db120f1cee41b89b1b4704a23d5aa12ce3e98f408c5e37779f64fb7
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.