public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Herrmann <herrmann.der.user@googlemail.com>
To: Dmitry Adamushko <dmitry.adamushko@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	Mike Travis <travis@sgi.com>,
	Tigran Aivazian <tigran@aivazian.fsnet.co.uk>,
	Thomas Gleixner <tglx@linutronix.de>,
	Borislav Petkov <borislav.petkov@amd.com>,
	Andreas Mohr <andi@lisas.de>, Jack Steiner <steiner@sgi.com>
Subject: Re: [ RFC, PATCH - 1/2, v2 ] x86-microcode: refactor microcode output messages
Date: Thu, 12 Nov 2009 16:20:26 +0100	[thread overview]
Message-ID: <20091112152026.GI18592@alberich.amd.com> (raw)
In-Reply-To: <b647ffbd0911120406o6e5bd58eq8aa022946f38f5ef@mail.gmail.com>

On Thu, Nov 12, 2009 at 01:06:36PM +0100, Dmitry Adamushko wrote:
> 2009/11/12 Dmitry Adamushko <dmitry.adamushko@gmail.com>:
> > 2009/11/12 Ingo Molnar <mingo@elte.hu>:
> >>
> >> -tip testing found the following bug - there's a _long_ boot delay of
> >> 58.6 seconds if the CPU family is not supported:
> >>
> >> [    1.421761] calling  microcode_init+0x0/0x137 @ 1
> >> [    1.426532] platform microcode: firmware: requesting amd-ucode/microcode_amd.bin
> >> [   61.433126] microcode: failed to load file amd-ucode/microcode_amd.bin
> >> [   61.439682] microcode: CPU0: AMD CPU family 0xf not supported
> >> [   61.445441] microcode: CPU1: AMD CPU family 0xf not supported
> >> [   61.451273] Microcode Update Driver: v2.00 <tigran@aivazian.fsnet.co.uk>, Peter Oruba
> >> [   61.459116] initcall microcode_init+0x0/0x137 returned 0 after 58625622 usecs
> >>
> >> Where does this delay come from?
> >
> > My guess is that it's comming from
> >
> > static int loading_timeout = 60;        /* In seconds */
> >
> > drivers/base/firmware_class.c
> >
> > given that you seem to have MICROCODE build in kernel, so this patch
> > http://git.kernel.org/?p=linux/kernel/git/x86/linux-2.6-tip.git;a=commit;h=d1c84f79a6ba992dc01e312c44a21496303874d6
> >
> > will result in sending a request for a firmware image to user-space
> > (unless that firmware image is also built-in into the kernel) and
> > user-space has not started yet.
> 
> btw., it doesn't make sense for request_firmware() to even try this if
> the system_state != SYSTEM_RUNNING and current == 'init' (it'd perhaps
> make some sense if it's been done in a context of another task -- like
> in case of a parallel boot).

> And perhaps it just makes sense for microcode to use request_firmware_nowait().

That would be asynchronous.

I think I should ensure that microcode_amd.c is compiled into
microcode.o if and only if its built as module. microcode_amd.c
supports only the firmware interface.

Thus I suggest to add below.

Regards,
Andreas

----
>From 99cd1e170a30ea81164fd13333a5e5bb9587e4e8 Mon Sep 17 00:00:00 2001
From: Andreas Herrmann <andreas.herrmann3@amd.com>
Date: Thu, 12 Nov 2009 16:08:38 +0100
Subject: [PATCH] x86, ucode-amd: Provide it only if microcode is compiled as module

microcode_amd.c supports only the firmware interface. Thus it depends
on the udev firmware helper. As we won't compile the micorode patches
into the kernel it also doesn't make sense to compile microcode_amd.c
into kernel.

This also ensures that loading an updated AMD microcode patch
container file is always possible via

Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
---
 arch/x86/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 17abcfa..0559ca3 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -959,7 +959,7 @@ config MICROCODE_INTEL
 
 config MICROCODE_AMD
 	bool "AMD microcode patch loading support"
-	depends on MICROCODE
+	depends on MICROCODE=m
 	select FW_LOADER
 	---help---
 	  If you select this option, microcode patch loading support for AMD
-- 
1.6.5.2


  reply	other threads:[~2009-11-12 15:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-02 20:08 [ RFC, PATCH - 1/2, v2 ] x86-microcode: refactor microcode output messages dimm
2009-11-04 12:27 ` Ingo Molnar
2009-11-05 15:37 ` Andreas Herrmann
2009-11-05 18:40   ` Dmitry Adamushko
2009-11-06 12:34     ` Andreas Herrmann
2009-11-06 12:56       ` Dmitry Adamushko
2009-11-06 19:46         ` Andreas Herrmann
2009-11-07 12:22           ` Dmitry Adamushko
2009-11-11 16:07             ` Dmitry Adamushko
2009-11-11 19:38               ` Andreas Herrmann
2009-11-12 11:33                 ` Ingo Molnar
2009-11-12 11:54                   ` Dmitry Adamushko
2009-11-12 12:06                     ` Dmitry Adamushko
2009-11-12 15:20                       ` Andreas Herrmann [this message]
2009-11-12 15:48                         ` Dmitry Adamushko
2009-11-12 17:09                           ` Borislav Petkov
2009-11-17  7:06                   ` [PATCH] x86, ucode-amd: Move family check to microcde_amd.c's init function Andreas Herrmann
2009-11-17  9:24                     ` [tip:x86/microcode] x86: " tip-bot for Andreas Herrmann

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=20091112152026.GI18592@alberich.amd.com \
    --to=herrmann.der.user@googlemail.com \
    --cc=andi@lisas.de \
    --cc=borislav.petkov@amd.com \
    --cc=dmitry.adamushko@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=steiner@sgi.com \
    --cc=tglx@linutronix.de \
    --cc=tigran@aivazian.fsnet.co.uk \
    --cc=travis@sgi.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