public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* Re: Altix I/O code reorganization - 14 of 21
@ 2004-08-11 23:33 Pat Gefre
  2004-08-12  9:20 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Pat Gefre @ 2004-08-11 23:33 UTC (permalink / raw)
  To: linux-ia64, linux-kernel, hch

> 007-io-hub-provider:
>    tio_provider and hub_provider have exactly the same methods, no need to
>    keep the xtalk_provider_t abstraction at all
> 

The abstraction was done for future expansion.  We have removed it 
and in the future if we do need to abstract these 2 providers, we will 
submit another patch.



# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2004/08/11 16:48:48-05:00 pfg@sgi.com 
#   Files needed to provide services for our I/O Hub devices
# 
# arch/ia64/sn/ioif/xtalk/xtalk_providers.c
#   2004/08/11 16:47:53-05:00 pfg@sgi.com +59 -0
# 
# arch/ia64/sn/ioif/xtalk/xtalk_providers.c
#   2004/08/11 16:47:53-05:00 pfg@sgi.com +0 -0
#   BitKeeper file /work.attica2/pfg/Linux/2.5-BK/to-base-2.6/arch/ia64/sn/ioif/xtalk/xtalk_providers.c
# 
# arch/ia64/sn/ioif/xtalk/Makefile
#   2004/08/11 16:47:51-05:00 pfg@sgi.com +10 -0
# 
# arch/ia64/sn/ioif/xtalk/Makefile
#   2004/08/11 16:47:51-05:00 pfg@sgi.com +0 -0
#   BitKeeper file /work.attica2/pfg/Linux/2.5-BK/to-base-2.6/arch/ia64/sn/ioif/xtalk/Makefile
# 
diff -Nru a/arch/ia64/sn/ioif/xtalk/Makefile b/arch/ia64/sn/ioif/xtalk/Makefile
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ia64/sn/ioif/xtalk/Makefile	2004-08-11 16:49:20 -05:00
@@ -0,0 +1,10 @@
+#
+# This file is subject to the terms and conditions of the GNU General Public
+# License.  See the file "COPYING" in the main directory of this archive
+# for more details.
+#
+# Copyright (C) 2002-2003 Silicon Graphics, Inc.  All Rights Reserved.
+#
+# Makefile for the sn2 io routines.
+
+obj-y				+=  xtalk_providers.o
diff -Nru a/arch/ia64/sn/ioif/xtalk/xtalk_providers.c b/arch/ia64/sn/ioif/xtalk/xtalk_providers.c
--- /dev/null	Wed Dec 31 16:00:00 196900
+++ b/arch/ia64/sn/ioif/xtalk/xtalk_providers.c	2004-08-11 16:49:20 -05:00
@@ -0,0 +1,59 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2004 Silicon Graphics, Inc. All rights reserved.
+ */
+
+#include <linux/interrupt.h>
+#include <asm/sn/xtalk/xtalk_provider.h>
+#include <asm/sn/xtalk/xwidgetdev.h>
+#include <asm/sn/xtalk/xtalk_sal.h>
+#include <asm/sn/sn_sal.h>
+
+struct sn_irq_info *sal_xtalk_intr_alloc(struct xwidget_info *widget_info,
+					 int req_irq, nasid_t req_nasid,
+					 int req_slice)
+{
+	struct ia64_sal_retval ret_stuff;
+	ret_stuff.status = 0;
+	ret_stuff.v0 = 0;
+
+	SAL_CALL_NOLOCK(ret_stuff, (u64) SN_SAL_XTALK,
+			(u64) XTALK_CALL_INTR_ALLOC, (u64) widget_info,
+			(u64) req_irq, (u64) req_nasid, (u64) req_slice, 0, 0);
+
+	printk("sal_xtalk_intr_alloc: v0=0x%lx\n", ret_stuff.v0);
+	if (ret_stuff.status = SALRET_OK) {
+		return (struct sn_irq_info *)ret_stuff.v0;
+	} else {
+		return (struct sn_irq_info *)NULL;
+	}
+}
+
+void sal_xtalk_intr_free(struct xwidget_info *widget_info,
+			 struct sn_irq_info *sn_irq_info)
+{
+	struct ia64_sal_retval ret_stuff;
+	ret_stuff.status = 0;
+	ret_stuff.v0 = 0;
+
+	SAL_CALL_NOLOCK(ret_stuff, (u64) SN_SAL_XTALK,
+			(u64) XTALK_CALL_INTR_FREE, (u64) widget_info,
+			(u64) sn_irq_info, 0, 0, 0, 0);
+}
+
+xtalk_provider_t hub_provider = {
+
+	(xtalk_intr_alloc_f *) sal_xtalk_intr_alloc,
+	(xtalk_intr_free_f *) sal_xtalk_intr_free,
+
+};
+
+xtalk_provider_t tio_provider = {
+
+	(xtalk_intr_alloc_f *) sal_xtalk_intr_alloc,
+	(xtalk_intr_free_f *) sal_xtalk_intr_free,
+
+};

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Altix I/O code reorganization - 14 of 21
  2004-08-11 23:33 Altix I/O code reorganization - 14 of 21 Pat Gefre
@ 2004-08-12  9:20 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2004-08-12  9:20 UTC (permalink / raw)
  To: Pat Gefre; +Cc: linux-ia64, linux-kernel, hch

On Wed, Aug 11, 2004 at 06:33:22PM -0500, Pat Gefre wrote:
> > 007-io-hub-provider:
> >    tio_provider and hub_provider have exactly the same methods, no need to
> >    keep the xtalk_provider_t abstraction at all
> > 
> 
> The abstraction was done for future expansion.  We have removed it 
> and in the future if we do need to abstract these 2 providers, we will 
> submit another patch.

> +xtalk_provider_t hub_provider = {
> +
> +	(xtalk_intr_alloc_f *) sal_xtalk_intr_alloc,
> +	(xtalk_intr_free_f *) sal_xtalk_intr_free,
> +
> +};
> +
> +xtalk_provider_t tio_provider = {
> +
> +	(xtalk_intr_alloc_f *) sal_xtalk_intr_alloc,
> +	(xtalk_intr_free_f *) sal_xtalk_intr_free,
> +
> +};

you still have it in this patch.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-08-12  9:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-11 23:33 Altix I/O code reorganization - 14 of 21 Pat Gefre
2004-08-12  9:20 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox