lkml.org 
[lkml]   [2004]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: Altix I/O code reorganization - 14 of 21
Date
> 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,
+
+};
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.036 / U:4.748 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site