2008-07-28 16:48:53

by Peter Oruba

[permalink] [raw]
Subject: [patch 00/11] x86: AMD microcode patch loading support v2

AMD microcode patch loader v2, rebased to Linux master.

Thanks,
Peter Oruba
>From [email protected] Mon Jul 28 18:44:47 2008
Message-Id: <[email protected]>
User-Agent: quilt/0.46_cvs20080326-19.1
Date: Mon, 28 Jul 2008 18:44:12 +0200
From: Peter Oruba <[email protected]>
To: Ingo Molnar <[email protected]>,
Thomas Gleixner <[email protected]>,
Tigran Aivazian <[email protected]>
Cc: LKML <[email protected]>,
Peter Oruba <[email protected]>
Bcc: [email protected]
Subject: [patch 01/11] [PATCH 01/11] x86: Add entry to MAINTAINERS file
References: <[email protected]>
Content-Disposition: inline; filename=0001-x86-Add-entry-to-MAINTAINERS-file.patch

Add an entry to the MAINTAINERS file for AMD CPU microcode
patch loading support.

Signed-off-by: Peter Oruba <[email protected]>
---
MAINTAINERS | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 03c5d6c..28f867d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -384,6 +384,11 @@ M: [email protected]
L: [email protected]
S: Supported

+AMD MICROCODE UPDATE SUPPORT
+P: Peter Oruba
+M: [email protected]
+S: Supported
+
AMS (Apple Motion Sensor) DRIVER
P: Stelian Pop
M: [email protected]
--
1.5.4.5




2008-07-28 18:02:11

by Ingo Molnar

[permalink] [raw]
Subject: Re: [patch 00/11] x86: AMD microcode patch loading support v2


* Peter Oruba <[email protected]> wrote:

> AMD microcode patch loader v2, rebased to Linux master.

applied to tip/x86/microcode - thanks Peter.

One open issue i noticed is the checkpatch warnings:

$ scripts/checkpatch.pl --file arch/x86/kernel/microcode_amd.c
total: 0 errors, 10 warnings, 1 checks, 521 lines checked

$ scripts/checkpatch.pl --file arch/x86/kernel/microcode.c
total: 2 errors, 12 warnings, 477 lines checked

$ scripts/checkpatch.pl --file arch/x86/kernel/microcode_intel.c
total: 1 errors, 11 warnings, 546 lines checked

Could you send delta patch(es) to fix them up? You can pick up the
committed patches via:

http://people.redhat.com/mingo/tip.git/README

and do something like:

git-checkout tip/master
git-merge tip/x86/microcode

to get the latest code plus your changes.

Thanks,

Ingo

2008-07-29 08:10:54

by Ingo Molnar

[permalink] [raw]
Subject: [PATCH] x86, microcode support: fix build error


>From 45b1e23eca1c53fa79a611a2bc8c93697ede6c97 Mon Sep 17 00:00:00 2001
From: Ingo Molnar <[email protected]>
Date: Tue, 29 Jul 2008 09:42:17 +0200
Subject: [PATCH] x86, microcode support: fix build error
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

fix:

arch/x86/kernel/microcode.c:412: error: static declaration of ‘microcode_init’ follows non-static declaration
include/asm/microcode.h:1: error: previous declaration of ‘microcode_init’ was here
arch/x86/kernel/microcode.c:454: error: static declaration of ‘microcode_exit’ follows non-static declaration
include/asm/microcode.h:2: error: previous declaration of ‘microcode_exit’ was here

Signed-off-by: Ingo Molnar <[email protected]>
---
arch/x86/kernel/microcode.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/microcode.c b/arch/x86/kernel/microcode.c
index 1e42e79..9a88184 100644
--- a/arch/x86/kernel/microcode.c
+++ b/arch/x86/kernel/microcode.c
@@ -415,7 +415,7 @@ static struct notifier_block __refdata mc_cpu_notifier = {
.notifier_call = mc_cpu_callback,
};

-static int microcode_init(void *opaque, struct module *module)
+int microcode_init(void *opaque, struct module *module)
{
struct microcode_ops *ops = (struct microcode_ops *)opaque;
int error;
@@ -457,7 +457,7 @@ static int microcode_init(void *opaque, struct module *module)
}
EXPORT_SYMBOL_GPL(microcode_init);

-static void __exit microcode_exit (void)
+void __exit microcode_exit (void)
{
microcode_dev_exit();

2008-07-29 08:11:18

by Ingo Molnar

[permalink] [raw]
Subject: Re: [patch 00/11] x86: AMD microcode patch loading support v2


>From 224e946b81166d732f3e9b414cb69612072fb500 Mon Sep 17 00:00:00 2001
From: Ingo Molnar <[email protected]>
Date: Tue, 29 Jul 2008 09:52:55 +0200
Subject: [PATCH] x86, microcode: fix symbol exports

fix tons of build errors:

arch/x86/kernel/built-in.o: In function `microcode_fini_cpu':
microcode_intel.c:(.text+0x11598): undefined reference to `microcode_mutex'
microcode_intel.c:(.text+0x115a4): undefined reference to `ucode_cpu_info'
microcode_intel.c:(.text+0x115ae): undefined reference to `ucode_cpu_info'
microcode_intel.c:(.text+0x115bc): undefined reference to `microcode_mutex'
[...]

Signed-off-by: Ingo Molnar <[email protected]>
---
arch/x86/kernel/microcode.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/x86/kernel/microcode.c b/arch/x86/kernel/microcode.c
index 9a88184..758b958 100644
--- a/arch/x86/kernel/microcode.c
+++ b/arch/x86/kernel/microcode.c
@@ -104,16 +104,16 @@ MODULE_LICENSE("GPL");
struct microcode_ops *microcode_ops;

/* no concurrent ->write()s are allowed on /dev/cpu/microcode */
-static DEFINE_MUTEX(microcode_mutex);
+DEFINE_MUTEX(microcode_mutex);
EXPORT_SYMBOL_GPL(microcode_mutex);

-static struct ucode_cpu_info ucode_cpu_info[NR_CPUS];
+struct ucode_cpu_info ucode_cpu_info[NR_CPUS];
EXPORT_SYMBOL_GPL(ucode_cpu_info);

#ifdef CONFIG_MICROCODE_OLD_INTERFACE
-static void __user *user_buffer; /* user area microcode data buffer */
+void __user *user_buffer; /* user area microcode data buffer */
EXPORT_SYMBOL_GPL(user_buffer);
-static unsigned int user_buffer_size; /* it's size */
+unsigned int user_buffer_size; /* it's size */
EXPORT_SYMBOL_GPL(user_buffer_size);

static int do_microcode_update (void)
@@ -230,7 +230,7 @@ MODULE_ALIAS_MISCDEV(MICROCODE_MINOR);
#endif

/* fake device for request_firmware */
-static struct platform_device *microcode_pdev;
+struct platform_device *microcode_pdev;
EXPORT_SYMBOL_GPL(microcode_pdev);

static void microcode_init_cpu(int cpu, int resume)

2008-07-29 08:11:38

by Ingo Molnar

[permalink] [raw]
Subject: Re: [patch 00/11] x86: AMD microcode patch loading support v2


>From 5d7b605245b1aa1a9cd6549b1f57d69273eb0c37 Mon Sep 17 00:00:00 2001
From: Ingo Molnar <[email protected]>
Date: Tue, 29 Jul 2008 10:07:36 +0200
Subject: [PATCH] x86, microcode: fix module license string

fix:

FATAL: modpost: GPL-incompatible module microcode_amd.ko uses GPL-only symbol 'set_cpus_allowed_ptr'

Signed-off-by: Ingo Molnar <[email protected]>
---
arch/x86/kernel/microcode_amd.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/microcode_amd.c b/arch/x86/kernel/microcode_amd.c
index db199e3..fd9e68e 100644
--- a/arch/x86/kernel/microcode_amd.c
+++ b/arch/x86/kernel/microcode_amd.c
@@ -40,7 +40,7 @@

MODULE_DESCRIPTION("AMD Microcode Update Driver");
MODULE_AUTHOR("Peter Oruba <[email protected]>");
-MODULE_LICENSE("GPLv2");
+MODULE_LICENSE("GPL v2");

#define UCODE_MAGIC 0x00414d44
#define UCODE_EQUIV_CPU_TABLE_TYPE 0x00000000

2008-07-29 08:12:53

by Ingo Molnar

[permalink] [raw]
Subject: Re: [patch 00/11] x86: AMD microcode patch loading support v2


* Ingo Molnar <[email protected]> wrote:

> and do something like:
>
> git-checkout tip/master
> git-merge tip/x86/microcode
>
> to get the latest code plus your changes.

i've pushed out 3 build fixes into tip/x86/microcode and test-merged it
into tip/master. I'll test it some more today before pushing out its
integration.

Ingo