All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Daniel J Blueman <daniel@numascale-asia.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
	tglx@linutronix.de, bp@alien8.de, daniel@numascale-asia.com
Subject: [tip:x86/platform] x86, AMD, NB: Use u16 for northbridge IDs in amd_get_nb_id
Date: Tue, 22 Jan 2013 08:50:58 -0800	[thread overview]
Message-ID: <tip-8b84c8df38d5796da2e8cd051666d203ddabcb62@git.kernel.org> (raw)
In-Reply-To: <1353997932-8475-2-git-send-email-daniel@numascale-asia.com>

Commit-ID:  8b84c8df38d5796da2e8cd051666d203ddabcb62
Gitweb:     http://git.kernel.org/tip/8b84c8df38d5796da2e8cd051666d203ddabcb62
Author:     Daniel J Blueman <daniel@numascale-asia.com>
AuthorDate: Tue, 27 Nov 2012 14:32:10 +0800
Committer:  Borislav Petkov <bp@suse.de>
CommitDate: Thu, 10 Jan 2013 16:17:58 +0100

x86, AMD, NB: Use u16 for northbridge IDs in amd_get_nb_id

Change amd_get_nb_id to return u16 to support >255 memory controllers,
and related consistency fixes.

Signed-off-by: Daniel J Blueman <daniel@numascale-asia.com>
Link: http://lkml.kernel.org/r/1353997932-8475-2-git-send-email-daniel@numascale-asia.com
Signed-off-by: Borislav Petkov <bp@alien8.de>
---
 arch/x86/include/asm/processor.h | 2 +-
 arch/x86/kernel/cpu/amd.c        | 4 ++--
 drivers/edac/amd64_edac.c        | 5 +++--
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/arch/x86/include/asm/processor.h b/arch/x86/include/asm/processor.h
index 888184b..cf50054 100644
--- a/arch/x86/include/asm/processor.h
+++ b/arch/x86/include/asm/processor.h
@@ -943,7 +943,7 @@ extern void start_thread(struct pt_regs *regs, unsigned long new_ip,
 extern int get_tsc_mode(unsigned long adr);
 extern int set_tsc_mode(unsigned int val);
 
-extern int amd_get_nb_id(int cpu);
+extern u16 amd_get_nb_id(int cpu);
 
 struct aperfmperf {
 	u64 aperf, mperf;
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
index 15239ff..782c456 100644
--- a/arch/x86/kernel/cpu/amd.c
+++ b/arch/x86/kernel/cpu/amd.c
@@ -364,9 +364,9 @@ static void __cpuinit amd_detect_cmp(struct cpuinfo_x86 *c)
 #endif
 }
 
-int amd_get_nb_id(int cpu)
+u16 amd_get_nb_id(int cpu)
 {
-	int id = 0;
+	u16 id = 0;
 #ifdef CONFIG_SMP
 	id = per_cpu(cpu_llc_id, cpu);
 #endif
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index a3fe39b..29be39d 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -939,7 +939,8 @@ static u64 get_error_address(struct mce *m)
 		struct amd64_pvt *pvt;
 		u64 cc6_base, tmp_addr;
 		u32 tmp;
-		u8 mce_nid, intlv_en;
+		u16 mce_nid;
+		u8 intlv_en;
 
 		if ((addr & GENMASK(24, 47)) >> 24 != 0x00fdf7)
 			return addr;
@@ -2181,7 +2182,7 @@ static int init_csrows(struct mem_ctl_info *mci)
 }
 
 /* get all cores on this DCT */
-static void get_cpus_on_this_dct_cpumask(struct cpumask *mask, unsigned nid)
+static void get_cpus_on_this_dct_cpumask(struct cpumask *mask, u16 nid)
 {
 	int cpu;
 

  reply	other threads:[~2013-01-22 16:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-27  6:32 [PATCH 1/4 v7] AMD64 EDAC: Add multi-domain support Daniel J Blueman
2012-11-27  6:32 ` [PATCH 2/4 v7] AMD64 EDAC: Consistently use u16 for northbridge IDs in amd_get_nb_id Daniel J Blueman
2013-01-22 16:50   ` tip-bot for Daniel J Blueman [this message]
2012-11-27  6:32 ` [PATCH 3/4 v7] AMD64 EDAC: Fix PCI function lookup Daniel J Blueman
2012-11-29 13:36   ` Borislav Petkov
2012-11-27  6:32 ` [PATCH 4/4 v7] AMD64 EDAC: Fix type usage in NB IDs and memory ranges Daniel J Blueman
2012-11-29 14:34   ` Borislav Petkov
2013-01-22 16:49 ` [tip:x86/platform] x86, AMD, NB: Add multi-domain support tip-bot for Daniel J Blueman

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=tip-8b84c8df38d5796da2e8cd051666d203ddabcb62@git.kernel.org \
    --to=daniel@numascale-asia.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /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.