[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4905D568.20701@sgi.com>
Date: Mon, 27 Oct 2008 07:51:20 -0700
From: Mike Travis <travis@....com>
To: Ingo Molnar <mingo@...e.hu>
CC: Andi Kleen <andi@...stfloor.org>, Pavel Machek <pavel@...e.cz>,
Rusty Russell <rusty@...tcorp.com.au>,
Andrew Morton <akpm@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Jack Steiner <steiner@....com>,
"H. Peter Anvin" <hpa@...or.com>,
Richard Purdie <rpurdie@...ys.net>,
LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH 1/1] SGI x86 UV: Update SCIR driver to use idle_cpu function
Subject: SGI x86 UV: Update SCIR driver to use idle_cpu function
> Please send the cpu_idle() cleanup patch separately.
Change UV heartbeat function to use idle_cpu to determine cpu's
"idleness". Realign uv_hub definitions.
Signed-of-by: Mike Travis <travis@....com>
---
arch/x86/include/asm/uv/uv_hub.h | 26 +++++++++++++-------------
arch/x86/kernel/genx2apic_uv_x.c | 4 ++--
2 files changed, 15 insertions(+), 15 deletions(-)
--- test-tip-latest.orig/arch/x86/include/asm/uv/uv_hub.h
+++ test-tip-latest/arch/x86/include/asm/uv/uv_hub.h
@@ -128,19 +128,19 @@ struct uv_scir_s {
* They are kept together in a struct to minimize cache misses.
*/
struct uv_hub_info_s {
- unsigned long global_mmr_base;
- unsigned long gpa_mask;
- unsigned long gnode_upper;
- unsigned long lowmem_remap_top;
- unsigned long lowmem_remap_base;
- unsigned short pnode;
- unsigned short pnode_mask;
- unsigned short coherency_domain_number;
- unsigned short numa_blade_id;
- unsigned char blade_processor_id;
- unsigned char m_val;
- unsigned char n_val;
- struct uv_scir_s scir;
+ unsigned long global_mmr_base;
+ unsigned long gpa_mask;
+ unsigned long gnode_upper;
+ unsigned long lowmem_remap_top;
+ unsigned long lowmem_remap_base;
+ unsigned short pnode;
+ unsigned short pnode_mask;
+ unsigned short coherency_domain_number;
+ unsigned short numa_blade_id;
+ unsigned char blade_processor_id;
+ unsigned char m_val;
+ unsigned char n_val;
+ struct uv_scir_s scir;
};
DECLARE_PER_CPU(struct uv_hub_info_s, __uv_hub_info);
--- test-tip-latest.orig/arch/x86/kernel/genx2apic_uv_x.c
+++ test-tip-latest/arch/x86/kernel/genx2apic_uv_x.c
@@ -371,8 +371,8 @@ static void uv_heartbeat(unsigned long i
/* flip heartbeat bit */
bits ^= SCIR_CPU_HEARTBEAT;
- /* are we the idle thread? */
- if (current->pid == 0)
+ /* is this cpu idle? */
+ if (idle_cpu(smp_processor_id()))
bits &= ~SCIR_CPU_ACTIVITY;
else
bits |= SCIR_CPU_ACTIVITY;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists