public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@engr.sgi.com>
To: linux-ia64@vger.kernel.org
Subject: Re: bk pull on ia64 linux tree
Date: Tue, 11 May 2004 18:39:09 +0000	[thread overview]
Message-ID: <200405111139.09765.jbarnes@engr.sgi.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0401121658240.14305@evo.osdl.org>

[-- Attachment #1: Type: text/plain, Size: 685 bytes --]

On Tuesday, May 11, 2004 12:06 am, Christoph Hellwig wrote:
> On Tue, May 11, 2004 at 12:02:34AM -0700, David Mosberger wrote:
> > <pfg@sgi.com> (04/05/06 1.1587.10.10)
> >    [PATCH] ia64: SN2 - remove node_first_cpu member
> >
> >    Remove node_first_cpu member from nodepda_s and replace its usage with
> > calls to sn_get_node_first_cpu().
>
> This should still use the topology API even if Pat decided to ignore the
> review.

Right.  Here's a patch to kill it.

sn_get_node_first_cpu() is redundant, so kill it.  Since calls to this routine 
happen rather late in the boot process, using the generic topology functions 
is safe.  Fixup the callers and kill the function.

Jesse

[-- Attachment #2: kill-sn-first-cpu.patch --]
[-- Type: text/plain, Size: 3612 bytes --]

# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.1620  -> 1.1621 
#	include/asm-ia64/sn/arch.h	1.8     -> 1.9    
#	arch/ia64/sn/io/sn2/ml_SN_intr.c	1.11    -> 1.12   
#	drivers/char/sn_serial.c	1.12    -> 1.13   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 04/05/11	jbarnes@tomahawk.engr.sgi.com	1.1621
# kill redundant function
# --------------------------------------------
#
diff -Nru a/arch/ia64/sn/io/sn2/ml_SN_intr.c b/arch/ia64/sn/io/sn2/ml_SN_intr.c
--- a/arch/ia64/sn/io/sn2/ml_SN_intr.c	Tue May 11 11:28:00 2004
+++ b/arch/ia64/sn/io/sn2/ml_SN_intr.c	Tue May 11 11:28:00 2004
@@ -12,6 +12,7 @@
 #include <asm/smp.h>
 #include <asm/irq.h>
 #include <asm/hw_irq.h>
+#include <asm/topology.h>
 #include <asm/sn/sgi.h>
 #include <asm/sn/iograph.h>
 #include <asm/sn/hcl.h>
@@ -36,25 +37,6 @@
 extern cnodeid_t master_node_get(vertex_hdl_t vhdl);
 extern nasid_t master_nasid;
 
-cpuid_t
-sn_get_node_first_cpu(cnodeid_t cnode) {
-	int cpuid = -1, slice;
-
-	for (slice = CPUS_PER_NODE - 1; slice >= 0; slice--) {
-		cpuid = cnode_slice_to_cpuid(cnode, slice);
-		if (cpuid == NR_CPUS)
-			continue;
-		if (!cpu_online(cpuid))
-			continue;
-		break;
-	}
-	if (slice < 0) {
-		return CPU_NONE;
-	}
-	return cpuid;
-}
-
-
 /*  Initialize some shub registers for interrupts, both IO and error. */
 void intr_init_vecblk(cnodeid_t node)
 {
@@ -78,13 +60,13 @@
 		HUB_S((unsigned long *)GLOBAL_MMR_ADDR(nasid, SH_INT_NODE_ID_CONFIG),
 			node_id_config.sh_int_node_id_config_regval);
 		cnode = nasid_to_cnodeid(master_nasid);
-		cpu = sn_get_node_first_cpu(cnode);
+		cpu = first_cpu(node_to_cpumask(cnode));
 		cpu = cpu_physical_id(cpu);
 		SAL_CALL(ret_stuff, SN_SAL_REGISTER_CE, nasid, cpu, master_nasid,0,0,0,0);
 		if (ret_stuff.status < 0)
 			printk("%s: SN_SAL_REGISTER_CE SAL_CALL failed\n",__FUNCTION__);
 	} else {
-		cpu = sn_get_node_first_cpu(node);
+		cpu = first_cpu(node_to_cpumask(node));
 		cpu = cpu_physical_id(cpu);
 	}
 
diff -Nru a/drivers/char/sn_serial.c b/drivers/char/sn_serial.c
--- a/drivers/char/sn_serial.c	Tue May 11 11:28:00 2004
+++ b/drivers/char/sn_serial.c	Tue May 11 11:28:00 2004
@@ -500,10 +500,9 @@
 	nasid_t console_nasid;
 	unsigned int console_irq;
 	int result;
-	extern cpuid_t sn_get_node_first_cpu(cnodeid_t cnode);
 
 	console_nasid = ia64_sn_get_console_nasid();
-	intr_cpuid = sn_get_node_first_cpu(NASID_TO_COMPACT_NODEID(console_nasid));
+	intr_cpuid = first_cpu(node_to_cpumask(NASID_TO_COMPACT_NODEID(console_nasid)));
 	intr_cpuloc = cpu_physical_id(intr_cpuid);
 	console_irq = CPU_VECTOR_TO_IRQ(intr_cpuloc, SGI_UART_VECTOR);
 
diff -Nru a/include/asm-ia64/sn/arch.h b/include/asm-ia64/sn/arch.h
--- a/include/asm-ia64/sn/arch.h	Tue May 11 11:28:00 2004
+++ b/include/asm-ia64/sn/arch.h	Tue May 11 11:28:00 2004
@@ -20,8 +20,6 @@
 typedef u64	mmr_t;
 typedef u64	nic_t;
 
-#define CNODE_TO_CPU_BASE(_cnode)	(sn_get_node_first_cpu(_cnode))
-
 #define NASID_TO_COMPACT_NODEID(nasid)  (nasid_to_cnodeid(nasid))
 #define COMPACT_TO_NASID_NODEID(cnode)  (cnodeid_to_nasid(cnode))
 
@@ -34,9 +32,7 @@
 #define	INVALID_PARTID		((partid_t)-1)
 
 extern cpuid_t cnodetocpu(cnodeid_t);
-void   sn_flush_all_caches(long addr, long bytes);
-
-extern int     is_fine_dirmode(void);
-
+extern void sn_flush_all_caches(long addr, long bytes);
+extern int is_fine_dirmode(void);
 
 #endif /* _ASM_IA64_SN_ARCH_H */

  parent reply	other threads:[~2004-05-11 18:39 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-13  0:59 bk pull on ia64 linux tree Linus Torvalds
2004-01-13  1:17 ` David Mosberger
2004-01-13  1:36 ` David Mosberger
2004-01-13 16:08 ` Jesse Barnes
2004-01-27  1:37 ` David Mosberger
2004-01-27 10:23 ` Jes Sorensen
2004-01-27 14:49 ` Martin Hicks
2004-01-27 16:22 ` David Mosberger
2004-01-27 21:57 ` David Mosberger
2004-02-11  5:19 ` David Mosberger
2004-02-12  1:05 ` Keith Owens
2004-02-12  1:31 ` David Mosberger
2004-02-13 22:44 ` Andrew Morton
2004-02-13 22:46 ` David Mosberger
2004-02-23 19:12 ` David Mosberger
2004-03-12  5:37 ` David Mosberger
2004-03-17 19:14 ` David Mosberger
2004-03-25 20:30 ` David Mosberger
2004-04-09 16:05 ` David Mosberger
2004-04-23  6:48 ` David Mosberger
2004-04-29 22:21 ` David Mosberger
2004-04-30 17:49 ` David Mosberger
2004-05-03 22:58 ` David Mosberger
2004-05-11  7:02 ` David Mosberger
2004-05-11  7:06 ` Christoph Hellwig
2004-05-11 18:39 ` Jesse Barnes [this message]
2004-05-21 21:45 ` David Mosberger
2004-06-05  5:57 ` David Mosberger
2004-06-19  6:58 ` David Mosberger
2004-06-30  0:04 ` David Mosberger
2004-06-30  0:44 ` Peter Chubb
2004-06-30  0:52 ` David Mosberger
2004-06-30 16:23 ` Jesse Barnes
2004-07-06 18:46 ` David Mosberger
2004-07-27  7:19 ` David Mosberger
2004-07-30 21:17 ` Luck, Tony
2004-08-04 22:05 ` Luck, Tony
2004-08-09 18:09 ` Luck, Tony
2004-08-23 21:23 ` tony.luck
2004-09-03  6:05 ` tony.luck
2004-09-09  5:51 ` Luck, Tony
2004-09-13 19:46 ` Luck, Tony
2004-09-16 22:39 ` Luck, Tony
2004-09-21 20:09 ` Luck, Tony
2004-09-22 23:14 ` Luck, Tony
2004-09-23 23:23 ` Luck, Tony
2004-09-28 18:34 ` Luck, Tony
2004-09-30 16:43 ` Luck, Tony
2004-10-01 16:42 ` Luck, Tony
2004-10-07 22:56 ` Luck, Tony
2004-10-20  0:15 ` Luck, Tony
2004-10-21  0:17 ` Luck, Tony
2004-10-27  3:58 ` Luck, Tony
2004-11-04  0:22 ` Luck, Tony
2004-11-12 17:42 ` Luck, Tony
2005-01-19 18:52 ` Luck, Tony
2005-01-23  3:05 ` Luck, Tony
2005-01-24 16:53 ` Jesse Barnes
2005-01-25  6:30 ` Luck, Tony
2005-01-25 23:03 ` Luck, Tony
2005-03-18 23:30 ` Luck, Tony
  -- strict thread matches above, loose matches on Subject: below --
2003-07-28 20:39 David Mosberger
2003-08-16  1:20 ` David Mosberger
2003-09-09  6:43 ` David Mosberger
2003-10-16 22:27 ` David Mosberger
2003-10-17  3:36 ` David Mosberger
2003-10-25  6:44 ` David Mosberger
2003-11-11  0:55 ` David Mosberger
2003-11-11  2:38 ` David Mosberger
2003-11-12  7:18 ` David Mosberger
2003-11-21 22:12 ` David Mosberger
2003-11-26  7:55 ` David Mosberger
2003-12-21  8:05 ` David Mosberger

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=200405111139.09765.jbarnes@engr.sgi.com \
    --to=jbarnes@engr.sgi.com \
    --cc=linux-ia64@vger.kernel.org \
    /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