Skip to contentSkip to conversation

more sn2 cleanups

PATCH New Jesse Barnes 1 participant 1 message May 23, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 more sn2 cleanups

Here's another sn2 update. It includes a bunch of misc. bits:
o a bunch of cleanup from hch
o addition of DMA routine wrappers
o update of other PCI routines
o topology.h prototype addition.

 arch/ia64/Kconfig                            |   18 
 arch/ia64/Makefile                           |    3 
 arch/ia64/sn/io/Makefile                     |    4 
 arch/ia64/sn/io/drivers/Makefile             |    2 
 arch/ia64/sn/io/drivers/pciba.c              |  941 ---------------------------
 arch/ia64/sn/io/machvec/pci.c                |  176 -----
 arch/ia64/sn/io/machvec/pci_dma.c            |  128 +++
 arch/ia64/sn/io/platform_init/irix_io_init.c |    1 
 arch/ia64/sn/io/sn2/pcibr/Makefile           |    2 
 arch/ia64/sn/io/sn2/pcibr/pcibr_dvr.c        |  194 -----
 arch/ia64/sn/io/sn2/pic.c                    |    2 
 arch/ia64/sn/io/sn2/xbow.c                   |  133 ---
 arch/ia64/sn/io/xswitch.c                    |    2 
 arch/ia64/sn/kernel/sn_ksyms.c               |   19 
 include/asm-ia64/sn/pci/pciba.h              |  121 ---
 include/asm-ia64/sn/sgi.h                    |   26 
 include/asm-ia64/topology.h                  |    2 
 17 files changed, 165 insertions(+), 1609 deletions(-)

Thanks,
Jesse

arch/ia64/Kconfig +0 -18
diff -Naur -X /usr/people/jbarnes/dontdiff -u linux-2.5.69-ia64/arch/ia64/Kconfig linux-2.5.69-ia64-sn/arch/ia64/Kconfig
@@ -292,16 +292,6 @@
 	depends on IA64_GENERIC || IA64_DIG || IA64_HP_ZX1 || IA64_SGI_SN2
 	default y
 
-config IA64_SGI_SN
-	bool
-	depends on IA64_SGI_SN2
-	default y
-
-config HWGFS_FS
-	bool
-	depends on IA64_SGI_SN2
-	default y
-
 config IA64_SGI_SN_DEBUG
 	bool "Enable extra debugging code"
 	depends on IA64_SGI_SN2
@@ -340,14 +330,6 @@
 	depends on IA64_SGI_SN2
 	default y
 
-config PCIBA
-	tristate "PCIBA support"
-	depends on IA64_SGI_SN2
-	help
-	  IRIX PCIBA-inspired user mode PCI interface for the SGI SN (Scalable
-	  NUMA) platform for IA-64.  Unless you are compiling a kernel for an
-	  SGI SN IA-64 box, say N.
-
 # On IA-64, we always want an ELF /proc/kcore.
 config KCORE_ELF
 	bool
arch/ia64/Makefile +1 -2
diff -Naur -X /usr/people/jbarnes/dontdiff -u linux-2.5.69-ia64/arch/ia64/Makefile linux-2.5.69-ia64-sn/arch/ia64/Makefile
@@ -47,7 +47,6 @@
 endif
 
 cflags-$(CONFIG_ITANIUM_BSTEP_SPECIFIC)	+= -mb-step
-cflags-$(CONFIG_IA64_SGI_SN)		+= -DBRINGUP
 
 CFLAGS += $(cflags-y)
 head-y := arch/ia64/kernel/head.o arch/ia64/kernel/init_task.o
@@ -58,7 +57,7 @@
 core-$(CONFIG_IA64_DIG) 	+= arch/ia64/dig/
 core-$(CONFIG_IA64_GENERIC) 	+= arch/ia64/dig/
 core-$(CONFIG_IA64_HP_ZX1)	+= arch/ia64/dig/
-core-$(CONFIG_IA64_SGI_SN)	+= arch/ia64/sn/
+core-$(CONFIG_IA64_SGI_SN2)	+= arch/ia64/sn/
 
 drivers-$(CONFIG_PCI)		+= arch/ia64/pci/
 drivers-$(CONFIG_IA64_HP_SIM)	+= arch/ia64/hp/sim/
arch/ia64/sn/io/Makefile +2 -2
diff -Naur -X /usr/people/jbarnes/dontdiff -u linux-2.5.69-ia64/arch/ia64/sn/io/Makefile linux-2.5.69-ia64-sn/arch/ia64/sn/io/Makefile
@@ -9,7 +9,7 @@
 # Makefile for the sn io routines.
 #
 
-EXTRA_CFLAGS    := -DLITTLE_ENDIAN -DSHUB_SWAP_WAR
+EXTRA_CFLAGS    := -DLITTLE_ENDIAN
 
 obj-y += sgi_if.o xswitch.o sgi_io_sim.o cdl.o ate_utils.o \
-	 io.o machvec/ drivers/ platform_init/ sn2/ hwgfs/
\ No newline at end of file
+	 io.o machvec/ drivers/ platform_init/ sn2/ hwgfs/
arch/ia64/sn/io/drivers/Makefile +0 -2
diff -Naur -X /usr/people/jbarnes/dontdiff -u linux-2.5.69-ia64/arch/ia64/sn/io/drivers/Makefile linux-2.5.69-ia64-sn/arch/ia64/sn/io/drivers/Makefile
@@ -10,5 +10,3 @@
 EXTRA_CFLAGS    := -DLITTLE_ENDIAN
 
 obj-y				+= ioconfig_bus.o ifconfig_net.o
-
-obj-$(CONFIG_PCIBA)		+= pciba.o
arch/ia64/sn/io/drivers/pciba.c +0 -938

938 lines not on this page · raw message

arch/ia64/sn/io/machvec/pci.c +10 -166

206 lines not on this page · raw message

arch/ia64/sn/io/machvec/pci_dma.c +128 -0

134 lines not on this page · raw message

arch/ia64/sn/io/platform_init/irix_io_init.c +0 -1
diff -Naur -X /usr/people/jbarnes/dontdiff -u linux-2.5.69-ia64/arch/ia64/sn/io/platform_init/irix_io_init.c linux-2.5.69-ia64-sn/arch/ia64/sn/io/platform_init/irix_io_init.c
@@ -15,7 +15,6 @@
 #include <asm/sn/sn_cpuid.h>
 #include <asm/sn/klconfig.h>
 #include <asm/sn/sn_private.h>
-#include <asm/sn/pci/pciba.h>
 #include <linux/smp.h>
 #include <asm/sn/simulator.h>
 
arch/ia64/sn/io/sn2/pcibr/Makefile +1 -1
diff -Naur -X /usr/people/jbarnes/dontdiff -u linux-2.5.69-ia64/arch/ia64/sn/io/sn2/pcibr/Makefile linux-2.5.69-ia64-sn/arch/ia64/sn/io/sn2/pcibr/Makefile
@@ -9,7 +9,7 @@
 # Makefile for the sn2 specific pci bridge routines.
 #
 
-EXTRA_CFLAGS    := -DLITTLE_ENDIAN -DSHUB_SWAP_WAR
+EXTRA_CFLAGS    := -DLITTLE_ENDIAN
 
 obj-y += pcibr_ate.o pcibr_config.o pcibr_dvr.o pcibr_hints.o pcibr_intr.o pcibr_rrb.o \
 	 pcibr_slot.o pcibr_error.o
arch/ia64/sn/io/sn2/pcibr/pcibr_dvr.c +11 -183

238 lines not on this page · raw message

arch/ia64/sn/io/sn2/pic.c +0 -2
diff -Naur -X /usr/people/jbarnes/dontdiff -u linux-2.5.69-ia64/arch/ia64/sn/io/sn2/pic.c linux-2.5.69-ia64-sn/arch/ia64/sn/io/sn2/pic.c
@@ -35,8 +35,6 @@
 
 #define PCI_BUS_NO_1 1
 
-int pic_devflag = D_MP;
-
 extern int pcibr_attach2(vertex_hdl_t, bridge_t *, vertex_hdl_t, int, pcibr_soft_t *);
 extern void pcibr_driver_reg_callback(vertex_hdl_t, int, int, int);
 extern void pcibr_driver_unreg_callback(vertex_hdl_t, int, int, int);
arch/ia64/sn/io/sn2/xbow.c +9 -124

169 lines not on this page · raw message

arch/ia64/sn/io/xswitch.c +0 -2
diff -Naur -X /usr/people/jbarnes/dontdiff -u linux-2.5.69-ia64/arch/ia64/sn/io/xswitch.c linux-2.5.69-ia64-sn/arch/ia64/sn/io/xswitch.c
@@ -23,8 +23,6 @@
 #define	NEW(ptr)	(ptr = kmalloc(sizeof (*(ptr)), GFP_KERNEL))
 #define	DEL(ptr)	(kfree(ptr))
 
-int                     xswitch_devflag = D_MP;
-
 /*
  * This file provides generic support for Crosstalk
  * Switches, in a way that insulates crosstalk providers
arch/ia64/sn/kernel/sn_ksyms.c +0 -19
diff -Naur -X /usr/people/jbarnes/dontdiff -u linux-2.5.69-ia64/arch/ia64/sn/kernel/sn_ksyms.c linux-2.5.69-ia64-sn/arch/ia64/sn/kernel/sn_ksyms.c
@@ -26,25 +26,6 @@
 EXPORT_SYMBOL(base_io_scsi_ctlr_vhdl);
 EXPORT_SYMBOL(master_node_get);
 
-
-/*
- * symbols referenced by the PCIBA module
- */
-#include <asm/sn/invent.h>
-#include <asm/sn/hcl.h>
-#include <asm/sn/pci/pciio.h>
-#include <asm/sn/sn_cpuid.h>
-
-devfs_handle_t
-devfn_to_vertex(unsigned char busnum, unsigned int devfn);
-EXPORT_SYMBOL(devfn_to_vertex);
-EXPORT_SYMBOL(hwgraph_vertex_unref);
-EXPORT_SYMBOL(pciio_config_get);
-EXPORT_SYMBOL(pciio_info_slot_get);
-EXPORT_SYMBOL(hwgraph_edge_add);
-EXPORT_SYMBOL(pciio_info_master_get);
-EXPORT_SYMBOL(pciio_info_get);
-
 #ifdef CONFIG_IA64_SGI_SN_DEBUG
 EXPORT_SYMBOL(__pa_debug);
 EXPORT_SYMBOL(__va_debug);
include/asm-ia64/sn/pci/pciba.h +0 -121

121 lines not on this page · raw message

include/asm-ia64/sn/sgi.h +1 -25
diff -Naur -X /usr/people/jbarnes/dontdiff -u linux-2.5.69-ia64/include/asm-ia64/sn/sgi.h linux-2.5.69-ia64-sn/include/asm-ia64/sn/sgi.h
@@ -17,21 +17,15 @@
 #include <asm/uaccess.h>		/* for copy_??_user */
 #include <linux/mm.h>
 #include <linux/devfs_fs_kernel.h>
-#ifdef CONFIG_HWGFS_FS
 #include <linux/fs.h>
 #include <asm/sn/hwgfs.h>
+
 typedef hwgfs_handle_t vertex_hdl_t;
-#else
-typedef devfs_handle_t vertex_hdl_t;
-#endif
 
 typedef int64_t  __psint_t;	/* needed by klgraph.c */
 
 typedef enum { B_FALSE, B_TRUE } boolean_t;
 
-#define ctob(x)			((uint64_t)(x)*NBPC)
-#define btoc(x)			(((uint64_t)(x)+(NBPC-1))/NBPC)
-
 
 /*
 ** Possible return values from graph routines.
@@ -60,20 +54,10 @@
 #define NBPP PAGE_SIZE
 #define _PAGESZ PAGE_SIZE
 
-#ifndef D_MP
-#define D_MP 1
-#endif
-
 #ifndef MAXDEVNAME
 #define MAXDEVNAME 256
 #endif
 
-#ifndef NBPC
-#define NBPC 0
-#endif
-
-typedef uint64_t mrlock_t;	/* needed by devsupport.c */
-
 #define HUB_PIO_CONVEYOR 0x1
 #define CNODEID_NONE ((cnodeid_t)-1)
 #define XTALK_PCI_PART_NUM "030-1275-"
@@ -83,10 +67,6 @@
 #define COPYIN(a, b, c)		copy_from_user(b,a,c)
 #define COPYOUT(a, b, c)	copy_to_user(b,a,c)
 
-#define kvtophys(x)		(alenaddr_t) (x)
-#define POFFMASK		(NBPP - 1)
-#define poff(X)			((__psunsigned_t)(X) & POFFMASK)
-
 #define BZERO(a,b)		memset(a, 0, b)
 
 #define kern_malloc(x)		kmalloc(x, GFP_KERNEL)
@@ -172,10 +152,6 @@
  * Definitions that do not exist in linux *
  ******************************************/
 
-typedef int cred_t;	/* This is for compilation reasons */
-struct cred { int x; };
-
-
 #define DELAY(a)
 
 /************************************************
include/asm-ia64/topology.h +2 -0
diff -Naur -X /usr/people/jbarnes/dontdiff -u linux-2.5.69-ia64/include/asm-ia64/topology.h linux-2.5.69-ia64-sn/include/asm-ia64/topology.h
@@ -63,4 +63,6 @@
 /* Cross-node load balancing interval. */
 #define NODE_BALANCE_RATE 10
 
+void build_cpu_to_node_map(void);
+
 #endif /* _ASM_IA64_TOPOLOGY_H */