mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ashok Raj <ashok.raj@intel.com>
To: akpm@osdl.org
Cc: vatsa@in.ibm.com, ak@muc.de, shaohua.li@intel.com,
	linux-kernel@vger.kernel.org
Subject: [PATCH] Dont create a control file for BSP that cannot be removed
Date: Fri, 17 Mar 2006 04:30:13 -0800	[thread overview]
Message-ID: <20060317043013.A13623@unix-os.sc.intel.com> (raw)

Hi Andrew

this patch just doesnt create an online file if the logical cpu cannot be
offlined.

We originally added to support ppc64 if the kernel has support but BIOS indicated
no offline support, we just didnt create online files for them.

We used the same method in ia64 as well, if we have a cpu taking platform interrupts
but cannot be removed if those interrupts cannot be re-targeted to another cpu.


-- 
Cheers,
Ashok Raj
- Open Source Technology Center


Don't create "online" control file for BSP (i386/x86_64) since its
not removable.

Signed-off-by: Ashok Raj <ashok.raj@intel.com>
-----------------------------------------------------------
 arch/i386/kernel/topology.c |    9 +++++++++
 1 files changed, 9 insertions(+)

Index: linux-2.6.16-rc6-mm1/arch/i386/kernel/topology.c
===================================================================
--- linux-2.6.16-rc6-mm1.orig/arch/i386/kernel/topology.c
+++ linux-2.6.16-rc6-mm1/arch/i386/kernel/topology.c
@@ -41,6 +41,15 @@ int arch_register_cpu(int num){
 		parent = &node_devices[node].node;
 #endif /* CONFIG_NUMA */
 
+	/*
+	 * CPU0 cannot be offlined due to several
+	 * restrictions and assumptions in kernel. This basically
+	 * doesnt add a control file, one cannot attempt to offline
+	 * BSP.
+	 */
+	if (!num)
+		cpu_devices[num].cpu.no_control = 1;
+
 	return register_cpu(&cpu_devices[num].cpu, num, parent);
 }
 

                 reply	other threads:[~2006-03-17 12:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20060317043013.A13623@unix-os.sc.intel.com \
    --to=ashok.raj@intel.com \
    --cc=ak@muc.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shaohua.li@intel.com \
    --cc=vatsa@in.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome