All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Linux Kernel <linux-kernel@vger.kernel.org>
Cc: Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>
Subject: don't print out SMP info on UP kernels.
Date: Tue, 27 Jun 2006 14:40:54 -0400	[thread overview]
Message-ID: <20060627184054.GD7914@redhat.com> (raw)

On UP kernels, it's silly to print out info about SMP alternatives..

 SMP alternatives: switching to UP code
 Freeing SMP alternatives: 0k freed

Signed-off-by: Dave Jones <davej@redhat.com>

--- linux-2.6.17.noarch/arch/i386/kernel/alternative.c~	2006-06-20 13:44:40.000000000 -0400
+++ linux-2.6.17.noarch/arch/i386/kernel/alternative.c	2006-06-20 13:46:33.000000000 -0400
@@ -118,6 +118,7 @@ void apply_alternatives(struct alt_instr
 	}
 }
 
+#ifdef CONFIG_SMP
 static void alternatives_smp_save(struct alt_instr *start, struct alt_instr *end)
 {
 	struct alt_instr *a;
@@ -282,6 +283,8 @@ void alternatives_smp_switch(int smp)
 	}
 	spin_unlock_irqrestore(&smp_alt, flags);
 }
+#endif
+
 
 void __init alternative_instructions(void)
 {
@@ -290,6 +290,8 @@ void __init alternative_instructions(voi
 {
 	apply_alternatives(__alt_instructions, __alt_instructions_end);
 
+#ifdef CONFIG_SMP
+
 	/* switch to patch-once-at-boottime-only mode and free the
 	 * tables in case we know the number of CPUs will never ever
 	 * change */
@@ -318,4 +322,5 @@ void __init alternative_instructions(voi
 					    _text, _etext);
 		alternatives_smp_switch(0);
 	}
+#endif
 }
--- linux-2.6.17.noarch/arch/i386/kernel/module.c~	2006-06-20 14:08:15.000000000 -0400
+++ linux-2.6.17.noarch/arch/i386/kernel/module.c	2006-06-20 14:08:56.000000000 -0400
@@ -125,6 +125,7 @@ int module_finalize(const Elf_Ehdr *hdr,
 		void *aseg = (void *)alt->sh_addr;
 		apply_alternatives(aseg, aseg + alt->sh_size);
 	}
+#ifdef CONFIG_SMP
 	if (locks && text) {
 		void *lseg = (void *)locks->sh_addr;
 		void *tseg = (void *)text->sh_addr;
@@ -132,10 +133,13 @@ int module_finalize(const Elf_Ehdr *hdr,
 					    lseg, lseg + locks->sh_size,
 					    tseg, tseg + text->sh_size);
 	}
+#endif
 	return 0;
 }
 
 void module_arch_cleanup(struct module *mod)
 {
+#ifdef CONFIG_SMP
 	alternatives_smp_module_del(mod);
+#endif
 }

-- 
http://www.codemonkey.org.uk

                 reply	other threads:[~2006-06-27 18:41 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=20060627184054.GD7914@redhat.com \
    --to=davej@redhat.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /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 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.