Skip to contentSkip to conversation

sn2 pci fixes (among others)

PATCH In review Jesse Barnes 2 participants 5 messages Aug 7, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sn2 pci fixes (among others)

sn2 still doesn't use ACPI to describe PCI busses on the system (I'm working on it), so we have to do it the old fashioned way. This patch also includes a few other fixes.

 io/hwgfs/interface.c           |    5 -
 io/machvec/pci.c               |   85 +++--------------------
 io/machvec/pci_bus_cvlink.c    |  151 ++++++++++++++---------------------------
 io/platform_init/sgi_io_init.c |   31 --------
 kernel/sn2/cache.c             |    6 +

Thanks,
Jesse

arch/ia64/sn/io/hwgfs/interface.c +1 -4
diff -Nru a/arch/ia64/sn/io/hwgfs/interface.c b/arch/ia64/sn/io/hwgfs/interface.c
@@ -40,14 +40,11 @@
 #include <linux/namei.h>
 #include <linux/string.h>
 #include <linux/slab.h>
+#include <linux/dcache.h>
 #include <asm/sn/hwgfs.h>
 
 
 extern struct vfsmount *hwgfs_vfsmount;
-
-/* TODO: Move this to some .h file or, more likely, use a slightly
-   different interface from lookup_create. */
-extern struct dentry *lookup_create(struct nameidata *nd, int is_dir);
 
 static int
 walk_parents_mkdir(
arch/ia64/sn/io/machvec/pci.c +13 -72

119 lines not on this page · raw message

arch/ia64/sn/io/machvec/pci_bus_cvlink.c +54 -95

225 lines not on this page · raw message

arch/ia64/sn/io/platform_init/sgi_io_init.c +1 -30
diff -Nru a/arch/ia64/sn/io/platform_init/sgi_io_init.c b/arch/ia64/sn/io/platform_init/sgi_io_init.c
@@ -9,15 +9,13 @@
 #include <linux/types.h>
 #include <linux/config.h>
 #include <linux/slab.h>
+#include <linux/smp.h>
 #include <asm/sn/sgi.h>
 #include <asm/sn/io.h>
 #include <asm/sn/sn_cpuid.h>
 #include <asm/sn/klconfig.h>
 #include <asm/sn/sn_private.h>
 #include <asm/sn/pda.h>
-#include <linux/smp.h>
-
-extern int init_hcl(void);
 
 /*
  * per_hub_init
@@ -79,31 +77,4 @@
 
 	/* Initialize error interrupts for this hub. */
 	hub_error_init(cnode);
-}
-
-/*
- * This routine is responsible for the setup of all the IRIX hwgraph style
- * stuff that's been pulled into linux.  It's called by sn_pci_find_bios which
- * is called just before the generic Linux PCI layer does its probing (by 
- * platform_pci_fixup aka sn_pci_fixup).
- *
- * It is very IMPORTANT that this call is only made by the Master CPU!
- *
- */
-
-void
-sgi_master_io_infr_init(void)
-{
-	extern void irix_io_init(void);
-
-	init_hcl(); /* Sets up the hwgraph compatibility layer with devfs */
-	irix_io_init(); /* Do IRIX Compatibility IO Init */
-
-#ifdef	CONFIG_KDB
-	{
-		extern void kdba_io_init(void);
-		kdba_io_init();
-	}
-#endif
-
 }
arch/ia64/sn/kernel/sn2/cache.c +6 -0
diff -Nru a/arch/ia64/sn/kernel/sn2/cache.c b/arch/ia64/sn/kernel/sn2/cache.c
@@ -26,6 +26,12 @@
 sn_flush_all_caches(long flush_addr, long bytes)
 {
 	flush_icache_range(flush_addr, flush_addr+bytes);
+	/*
+	 * The last call may have returned before the caches
+	 * were actually flushed, so we call it again to make
+	 * sure.
+	 */
+	flush_icache_range(flush_addr, flush_addr+bytes);
 	mb();
 }
 EXPORT_SYMBOL(sn_flush_all_caches);
#1 lore raw

Patch is fine with me (since it touches SGI files only), but one tip:
in the future, you may want to use diffstat -p1 so that the useful part of the common path-name prefix is maintained.

	--david
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · On Thu, 7 Aug 2003 13:42:56 -0700, [email protected] (Jesse Barnes) said:

Jesse> sn2 still doesn't use ACPI to describe PCI busses on the system (I'm Jesse> working on it), so we have to do it the old fashioned way. This patch Jesse> also includes a few other fixes.

  Jesse> io/hwgfs/interface.c           |    5 -
  Jesse> io/machvec/pci.c               |   85 +++--------------------
  Jesse> io/machvec/pci_bus_cvlink.c    |  151 ++++++++++++++---------------------------
  Jesse> io/platform_init/sgi_io_init.c |   31 --------
  Jesse> kernel/sn2/cache.c             |    6 +

Jesse> Thanks,
Jesse> Jesse

#2 lore raw
In reply to Jesse Barnes
Quoted 3 lines · David Mosberger

Patch is fine with me (since it touches SGI files only), but one tip:
in the future, you may want to use diffstat -p1 so that the useful part of the common path-name prefix is maintained.

Oops, thanks. I'll do that.

Jesse

#3 lore raw
In reply to Jesse Barnes
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · On Thu, 7 Aug 2003 13:42:56 -0700, [email protected] (Jesse Barnes) said:

Jesse> sn2 still doesn't use ACPI to describe PCI busses on the system (I'm Jesse> working on it), so we have to do it the old fashioned way. This patch Jesse> also includes a few other fixes.

Actually, the patch didn't apply. I'm pushing out the latest linux-ia64-2.5 as I'm writing this. Should be there in a few...

	--david
#4 lore raw
In reply to Jesse Barnes
Quoted 8 lines · David Mosberger
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line · On Thu, 7 Aug 2003 13:42:56 -0700, [email protected] (Jesse Barnes) said:

Jesse> sn2 still doesn't use ACPI to describe PCI busses on the system (I'm Jesse> working on it), so we have to do it the old fashioned way. This patch Jesse> also includes a few other fixes.

Actually, the patch didn't apply. I'm pushing out the latest linux-ia64-2.5 as I'm writing this. Should be there in a few...

I'm not quite sure how I hosed that one, but here's another one.

 arch/ia64/sn/io/hwgfs/interface.c           |    5 
 arch/ia64/sn/io/machvec/pci.c               |   86 ++-------------
 arch/ia64/sn/io/machvec/pci_bus_cvlink.c    |  151 ++++++++++------------------
 arch/ia64/sn/io/platform_init/sgi_io_init.c |   31 -----
 arch/ia64/sn/kernel/sn2/cache.c             |    6 +
 include/asm-ia64/sn/hcl.h                   |    1 

Thanks,
Jesse

arch/ia64/sn/io/hwgfs/interface.c +1 -4
diff -Nru a/arch/ia64/sn/io/hwgfs/interface.c b/arch/ia64/sn/io/hwgfs/interface.c
@@ -40,14 +40,11 @@
 #include <linux/namei.h>
 #include <linux/string.h>
 #include <linux/slab.h>
+#include <linux/dcache.h>
 #include <asm/sn/hwgfs.h>
 
 
 extern struct vfsmount *hwgfs_vfsmount;
-
-/* TODO: Move this to some .h file or, more likely, use a slightly
-   different interface from lookup_create. */
-extern struct dentry *lookup_create(struct nameidata *nd, int is_dir);
 
 static int
 walk_parents_mkdir(
arch/ia64/sn/io/machvec/pci.c +13 -73

119 lines not on this page · raw message

arch/ia64/sn/io/machvec/pci_bus_cvlink.c +54 -95

225 lines not on this page · raw message

arch/ia64/sn/io/platform_init/sgi_io_init.c +1 -30
diff -Nru a/arch/ia64/sn/io/platform_init/sgi_io_init.c b/arch/ia64/sn/io/platform_init/sgi_io_init.c
@@ -9,15 +9,13 @@
 #include <linux/types.h>
 #include <linux/config.h>
 #include <linux/slab.h>
+#include <linux/smp.h>
 #include <asm/sn/sgi.h>
 #include <asm/sn/io.h>
 #include <asm/sn/sn_cpuid.h>
 #include <asm/sn/klconfig.h>
 #include <asm/sn/sn_private.h>
 #include <asm/sn/pda.h>
-#include <linux/smp.h>
-
-extern int init_hcl(void);
 
 /*
  * per_hub_init
@@ -79,31 +77,4 @@
 
 	/* Initialize error interrupts for this hub. */
 	hub_error_init(cnode);
-}
-
-/*
- * This routine is responsible for the setup of all the IRIX hwgraph style
- * stuff that's been pulled into linux.  It's called by sn_pci_find_bios which
- * is called just before the generic Linux PCI layer does its probing (by 
- * platform_pci_fixup aka sn_pci_fixup).
- *
- * It is very IMPORTANT that this call is only made by the Master CPU!
- *
- */
-
-void
-sgi_master_io_infr_init(void)
-{
-	extern void irix_io_init(void);
-
-	init_hcl(); /* Sets up the hwgraph compatibility layer with devfs */
-	irix_io_init(); /* Do IRIX Compatibility IO Init */
-
-#ifdef	CONFIG_KDB
-	{
-		extern void kdba_io_init(void);
-		kdba_io_init();
-	}
-#endif
-
 }
arch/ia64/sn/kernel/sn2/cache.c +6 -0
diff -Nru a/arch/ia64/sn/kernel/sn2/cache.c b/arch/ia64/sn/kernel/sn2/cache.c
@@ -26,6 +26,12 @@
 sn_flush_all_caches(long flush_addr, long bytes)
 {
 	flush_icache_range(flush_addr, flush_addr+bytes);
+	/*
+	 * The last call may have returned before the caches
+	 * were actually flushed, so we call it again to make
+	 * sure.
+	 */
+	flush_icache_range(flush_addr, flush_addr+bytes);
 	mb();
 }
 EXPORT_SYMBOL(sn_flush_all_caches);
include/asm-ia64/sn/hcl.h +1 -0
diff -Nru a/include/asm-ia64/sn/hcl.h b/include/asm-ia64/sn/hcl.h
@@ -105,5 +105,6 @@
 extern char * vertex_to_name(vertex_hdl_t, char *, uint);
 extern graph_error_t hwgraph_vertex_unref(vertex_hdl_t);
 
+extern int init_hcl(void);
 
 #endif /* _ASM_IA64_SN_HCL_H */