[PATCH] [31/34] i386: convert to the kthread API




From: "Eric W. Biederman" <ebiederm@xxxxxxxxxxxx>

This patch just trivial converts from calling kernel_thread and daemonize
to just calling kthread_run.

Signed-off-by: Eric W. Biederman <ebiederm@xxxxxxxxxxxx>
Signed-off-by: Andi Kleen <ak@xxxxxxx>
Cc: Andi Kleen <ak@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

arch/i386/kernel/io_apic.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)

Index: linux/arch/i386/kernel/io_apic.c
===================================================================
--- linux.orig/arch/i386/kernel/io_apic.c
+++ linux/arch/i386/kernel/io_apic.c
@@ -35,6 +35,7 @@
#include <linux/msi.h>
#include <linux/htirq.h>
#include <linux/freezer.h>
+#include <linux/kthread.h>

#include <asm/io.h>
#include <asm/smp.h>
@@ -661,8 +662,6 @@ static int balanced_irq(void *unused)
unsigned long prev_balance_time = jiffies;
long time_remaining = balanced_irq_interval;

- daemonize("kirqd");
-
/* push everything to CPU 0 to give us a starting point. */
for (i = 0 ; i < NR_IRQS ; i++) {
irq_desc[i].pending_mask = cpumask_of_cpu(0);
@@ -722,10 +721,9 @@ static int __init balanced_irq_init(void
}

printk(KERN_INFO "Starting balanced_irq\n");
- if (kernel_thread(balanced_irq, NULL, CLONE_KERNEL) >= 0)
+ if (!IS_ERR(kthread_run(balanced_irq, NULL, "kirqd")))
return 0;
- else
- printk(KERN_ERR "balanced_irq_init: failed to spawn balanced_irq");
+ printk(KERN_ERR "balanced_irq_init: failed to spawn balanced_irq");
failed:
for_each_possible_cpu(i) {
kfree(irq_cpu_data[i].irq_delta);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: [PATCH] kthread: airo.c
    ... we're at it try to kill the idiociy of doing the trylock in the calling ... here's a small incremental patch ontop of yours to implement my ... struct semaphore sem; ... +static int airo_thread ...
    (Linux-Kernel)
  • Re: [PATCH] debug cgroup: remove unneeded cgroup_lock
    ... don't have to hold cgroup_mutex when calling cgroup_task_count. ... (Although this conflicts with a patch that I'm about to send out that ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • [PATCH 33/34] x86/amd-iommu: Move reset_iommu_command_buffer out of locked code
    ... This patch removes the ugly contruct where the ... iommu->lock must be released while before calling the ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • Re: [Question] inotify : process based filtering of events
    ... which, when used, will only collect events for the calling ... With nested attributes patch you can add your own callback which will ... smaller amount of work than extending inotify with new flag and redoing ...
    (Linux-Kernel)
  • [opensuse] YaST YOU problem...
    ... Signature check for patch info files failed. ... I went into the patches folder and found this file and deleted it, ... Calling an illegal alien an 'undocumented worker', ...
    (SuSE)