WARNING: multiple messages have this Message-ID
From: Thomas Gleixner <tglx@linutronix.de> To: LKML <linux-kernel@vger.kernel.org> Cc: linux-arch@vger.kernel.org, Peter Zijlstra <peterz@infradead.org>, Rusty Russell <rusty@rustcorp.com.au>, "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>, Ingo Molnar <mingo@kernel.org>, "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>, Paul Mundt <lethal@linux-sh.org> Subject: [patch 15/18] sh: Use generic idle thread allocation Date: Fri, 20 Apr 2012 13:05:54 -0000 Message-ID: <20120420124557.855203626@linutronix.de> (raw) In-Reply-To: <20120420122120.097464672@linutronix.de> [-- Attachment #0: sh-use-generic-idle-thread-allocation.patch --] [-- Type: text/plain, Size: 1951 bytes --] Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Paul Mundt <lethal@linux-sh.org> --- arch/sh/Kconfig | 1 + arch/sh/include/asm/processor.h | 4 ---- arch/sh/kernel/smp.c | 14 +------------- 3 files changed, 2 insertions(+), 17 deletions(-) Index: linux-2.6/arch/sh/Kconfig =================================================================== --- linux-2.6.orig/arch/sh/Kconfig +++ linux-2.6/arch/sh/Kconfig @@ -28,6 +28,7 @@ config SUPERH select RTC_LIB select GENERIC_ATOMIC64 select GENERIC_IRQ_SHOW + select GENERIC_SMP_IDLE_THREAD help The SuperH is a RISC processor targeted for use in embedded systems and consumer electronics; it was also used in the Sega Dreamcast Index: linux-2.6/arch/sh/include/asm/processor.h =================================================================== --- linux-2.6.orig/arch/sh/include/asm/processor.h +++ linux-2.6/arch/sh/include/asm/processor.h @@ -85,10 +85,6 @@ struct sh_cpuinfo { struct tlb_info itlb; struct tlb_info dtlb; -#ifdef CONFIG_SMP - struct task_struct *idle; -#endif - unsigned int phys_bits; unsigned long flags; } __attribute__ ((aligned(L1_CACHE_BYTES))); Index: linux-2.6/arch/sh/kernel/smp.c =================================================================== --- linux-2.6.orig/arch/sh/kernel/smp.c +++ linux-2.6/arch/sh/kernel/smp.c @@ -220,22 +220,10 @@ extern struct { void *thread_info; } stack_start; -int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *tidle) +int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *tsk) { - struct task_struct *tsk; unsigned long timeout; - tsk = cpu_data[cpu].idle; - if (!tsk) { - tsk = fork_idle(cpu); - if (IS_ERR(tsk)) { - pr_err("Failed forking idle task for cpu %d\n", cpu); - return PTR_ERR(tsk); - } - - cpu_data[cpu].idle = tsk; - } - per_cpu(cpu_state, cpu) = CPU_UP_PREPARE; /* Fill in data in head.S for secondary cpus */
From: Thomas Gleixner <tglx@linutronix.de> To: LKML <linux-kernel@vger.kernel.org> Cc: linux-arch@vger.kernel.org, Peter Zijlstra <peterz@infradead.org>, Rusty Russell <rusty@rustcorp.com.au>, "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>, Ingo Molnar <mingo@kernel.org>, "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>, Paul Mundt <lethal@linux-sh.org> Subject: [patch 15/18] sh: Use generic idle thread allocation Date: Fri, 20 Apr 2012 13:05:54 -0000 Message-ID: <20120420124557.855203626@linutronix.de> (raw) Message-ID: <20120420130554.e-xiV4cmXrcf9qql78G8tIBX4HCEBEYUVQ6m5NbE88g@z> (raw) In-Reply-To: <20120420122120.097464672@linutronix.de> [-- Attachment #0: sh-use-generic-idle-thread-allocation.patch --] [-- Type: text/plain, Size: 1953 bytes --] Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Paul Mundt <lethal@linux-sh.org> --- arch/sh/Kconfig | 1 + arch/sh/include/asm/processor.h | 4 ---- arch/sh/kernel/smp.c | 14 +------------- 3 files changed, 2 insertions(+), 17 deletions(-) Index: linux-2.6/arch/sh/Kconfig =================================================================== --- linux-2.6.orig/arch/sh/Kconfig +++ linux-2.6/arch/sh/Kconfig @@ -28,6 +28,7 @@ config SUPERH select RTC_LIB select GENERIC_ATOMIC64 select GENERIC_IRQ_SHOW + select GENERIC_SMP_IDLE_THREAD help The SuperH is a RISC processor targeted for use in embedded systems and consumer electronics; it was also used in the Sega Dreamcast Index: linux-2.6/arch/sh/include/asm/processor.h =================================================================== --- linux-2.6.orig/arch/sh/include/asm/processor.h +++ linux-2.6/arch/sh/include/asm/processor.h @@ -85,10 +85,6 @@ struct sh_cpuinfo { struct tlb_info itlb; struct tlb_info dtlb; -#ifdef CONFIG_SMP - struct task_struct *idle; -#endif - unsigned int phys_bits; unsigned long flags; } __attribute__ ((aligned(L1_CACHE_BYTES))); Index: linux-2.6/arch/sh/kernel/smp.c =================================================================== --- linux-2.6.orig/arch/sh/kernel/smp.c +++ linux-2.6/arch/sh/kernel/smp.c @@ -220,22 +220,10 @@ extern struct { void *thread_info; } stack_start; -int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *tidle) +int __cpuinit __cpu_up(unsigned int cpu, struct task_struct *tsk) { - struct task_struct *tsk; unsigned long timeout; - tsk = cpu_data[cpu].idle; - if (!tsk) { - tsk = fork_idle(cpu); - if (IS_ERR(tsk)) { - pr_err("Failed forking idle task for cpu %d\n", cpu); - return PTR_ERR(tsk); - } - - cpu_data[cpu].idle = tsk; - } - per_cpu(cpu_state, cpu) = CPU_UP_PREPARE; /* Fill in data in head.S for secondary cpus */
next prev parent reply index Thread overview: 82+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-04-20 13:05 [patch 00/18] SMP: Boot and CPU hotplug refactoring - Part 1 Thomas Gleixner 2012-04-20 13:05 ` [patch 01/18] m32r: Remove pointless function prototypes Thomas Gleixner 2012-04-20 13:05 ` [patch 02/18] smp: Add task_struct argument to __cpu_up() Thomas Gleixner 2012-04-20 13:05 ` Thomas Gleixner 2012-04-23 7:58 ` Jesper Nilsson 2012-04-23 7:58 ` Jesper Nilsson 2012-04-20 13:05 ` [patch 03/18] smp: Add generic smpboot facility Thomas Gleixner 2012-04-20 13:05 ` Thomas Gleixner 2012-04-20 20:07 ` Yinghai Lu 2012-04-20 20:07 ` Yinghai Lu 2012-04-21 2:07 ` Stephen Rothwell 2012-04-21 2:07 ` Stephen Rothwell 2012-04-20 13:05 ` [patch 04/18] smp: Provide generic idle thread allocation Thomas Gleixner 2012-04-20 13:05 ` Thomas Gleixner 2012-04-20 16:21 ` Sam Ravnborg 2012-04-20 16:21 ` Sam Ravnborg 2012-04-20 18:55 ` Thomas Gleixner 2012-04-20 18:55 ` Thomas Gleixner 2012-04-21 2:20 ` Stephen Rothwell 2012-04-21 2:20 ` Stephen Rothwell 2012-04-21 2:25 ` Frank Rowand 2012-04-21 2:25 ` Frank Rowand 2012-04-20 13:05 ` [patch 05/18] x86: Add task_struct argument to smp_ops.cpu_up Thomas Gleixner 2012-04-20 13:05 ` [patch 06/18] x86: Use generic idle thread allocation Thomas Gleixner 2012-04-20 13:05 ` [patch 07/18] powerpc: " Thomas Gleixner 2012-04-20 13:05 ` Thomas Gleixner 2012-04-20 13:05 ` [patch 08/18] ia64: " Thomas Gleixner 2012-04-20 13:05 ` [patch 09/18] arm: " Thomas Gleixner 2012-04-20 13:05 ` Thomas Gleixner 2012-04-20 13:05 ` [patch 11/18] hexagon: " Thomas Gleixner 2012-04-20 13:05 ` Thomas Gleixner 2012-04-24 16:47 ` Richard Kuo 2012-04-24 16:47 ` Richard Kuo 2012-04-20 13:05 ` [patch 10/18] mips: " Thomas Gleixner 2012-04-20 13:05 ` Thomas Gleixner 2012-04-20 13:05 ` [patch 12/18] s390: " Thomas Gleixner 2012-04-20 13:05 ` Thomas Gleixner 2012-04-23 7:09 ` Martin Schwidefsky 2012-04-23 7:09 ` Martin Schwidefsky 2012-04-20 13:05 ` [patch 13/18] blackfin: " Thomas Gleixner 2012-04-20 13:05 ` [patch 14/18] cris: " Thomas Gleixner 2012-04-23 7:57 ` Jesper Nilsson 2012-04-23 7:57 ` Jesper Nilsson 2012-04-20 13:05 ` Thomas Gleixner [this message] 2012-04-20 13:05 ` [patch 15/18] sh: " Thomas Gleixner 2012-04-21 3:18 ` Paul Mundt 2012-04-20 13:05 ` [patch 16/18] alpha: " Thomas Gleixner 2012-04-20 13:05 ` Thomas Gleixner 2012-04-20 13:05 ` [patch 17/18] parisc: " Thomas Gleixner 2012-04-20 13:05 ` Thomas Gleixner 2012-04-20 13:05 ` [patch 18/18] sparc: " Thomas Gleixner 2012-04-20 13:05 ` Thomas Gleixner 2012-04-22 19:52 ` David Miller 2012-04-20 13:16 ` [patch 00/18] SMP: Boot and CPU hotplug refactoring - Part 1 Thomas Gleixner 2012-04-20 13:21 ` Peter Zijlstra 2012-04-20 13:47 ` Thomas Gleixner 2012-04-21 0:08 ` Suresh Siddha 2012-05-03 9:41 ` Thomas Gleixner 2012-05-03 9:41 ` Thomas Gleixner 2012-05-03 23:42 ` Suresh Siddha 2012-04-20 15:42 ` Tejun Heo 2012-04-20 15:49 ` Peter Zijlstra 2012-04-20 15:56 ` Thomas Gleixner 2012-04-20 13:56 ` Srivatsa S. Bhat 2012-04-20 14:18 ` Thomas Gleixner 2012-04-24 18:44 ` Konrad Rzeszutek Wilk 2012-05-21 1:42 ` Rusty Russell 2012-05-21 8:25 ` Thomas Gleixner 2012-05-21 8:25 ` Thomas Gleixner 2012-05-22 0:53 ` Rusty Russell 2012-04-20 14:06 ` richard -rw- weinberger 2012-04-20 14:06 ` richard -rw- weinberger 2012-04-20 14:19 ` Thomas Gleixner 2012-04-20 14:27 ` James Bottomley 2012-04-20 17:55 ` Paul E. McKenney 2012-04-20 23:11 ` Venki Pallipadi 2012-04-21 1:04 ` Frank Rowand 2012-04-21 1:55 ` Frank Rowand 2012-04-22 21:01 ` Chris Metcalf 2012-04-22 21:01 ` Chris Metcalf 2012-04-30 8:05 ` Santosh Shilimkar 2012-04-30 8:05 ` Santosh Shilimkar
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20120420124557.855203626@linutronix.de \ --to=tglx@linutronix.de \ --cc=lethal@linux-sh.org \ --cc=linux-arch@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=mingo@kernel.org \ --cc=paulmck@linux.vnet.ibm.com \ --cc=peterz@infradead.org \ --cc=rusty@rustcorp.com.au \ --cc=srivatsa.bhat@linux.vnet.ibm.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Linux-arch Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/linux-arch/0 linux-arch/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 linux-arch linux-arch/ https://lore.kernel.org/linux-arch \ linux-arch@vger.kernel.org public-inbox-index linux-arch Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.linux-arch AGPL code for this site: git clone https://public-inbox.org/public-inbox.git