linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manfred Schwarb <manfred99@gmx.ch>
To: linux-kernel@vger.kernel.org
Cc: Tigran Aivazian <tigran@veritas.com>, Manfred Schwarb <manfred99@gmx.ch>
Subject: [PATCH 2.4.28] backport sigmatch() issue in microcode.c
Date: Fri, 19 Nov 2004 05:04:04 -0500	[thread overview]
Message-ID: <20041119100403.32522.90565.83940@tp-meteodat6.cyberlink.ch> (raw)

Hi,

some weeks ago, Tigran Aivazian sent this patch to Marcelo
in a private email, I am unaware of the reasons why it is not included.

Just for public documentation, here is the 2.6.7 backport of the patch, which
allows the use of microcode updates also for old Pentium II machines.

Original explanation from Tigran:
	[PATCH] fix to microcode driver for the old CPUs.

	Here is a patch against Linux 2.6.7 which fixes the sigmatch() macro to
	work for the relatively old processors as well, which have 'pf == 0'
	(processor flags as read from MSR 0x17), For example, the processors
	failing without this patch are Pentium II 300 MHz (Klamath) with
	family/model/stepping 6/3/4 and 6/3/3.

It works for me.
Regards,
Manfred


--- linux-2.4.28/arch/i386/kernel/microcode.c.orig	2004-09-11 15:30:13.000000000 +0200
+++ linux-2.4.28/arch/i386/kernel/microcode.c	2004-09-11 16:36:43.000000000 +0200
@@ -109,7 +109,10 @@
 #define get_datasize(mc) \
 	(((microcode_t *)mc)->hdr.datasize ? \
 	 ((microcode_t *)mc)->hdr.datasize : DEFAULT_UCODE_DATASIZE)
-#define sigmatch(s1, s2, p1, p2) (((s1) == (s2)) && ((p1) & (p2)))
+
+#define sigmatch(s1, s2, p1, p2) \
+	(((s1) == (s2)) && (((p1) & (p2)) || (((p1) == 0) && ((p2) == 0))))
+
 #define exttable_size(et) ((et)->count * EXT_SIGNATURE_SIZE + EXT_HEADER_SIZE)
 
 /* serialize access to the physical write to MSR 0x79 */

             reply	other threads:[~2004-11-19 10:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-19 10:04 Manfred Schwarb [this message]
2004-11-24 20:04 ` [PATCH 2.4.28] backport sigmatch() issue in microcode.c Marcelo Tosatti

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=20041119100403.32522.90565.83940@tp-meteodat6.cyberlink.ch \
    --to=manfred99@gmx.ch \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tigran@veritas.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;
as well as URLs for NNTP newsgroup(s).