public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] misc. sn2 updates
@ 2003-09-08 19:19 Jesse Barnes
  2003-09-11  0:16 ` Ian Wienand
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jesse Barnes @ 2003-09-08 19:19 UTC (permalink / raw)
  To: linux-ia64

Fix a couple of sn2 files.

Jesse

diff -Nru a/arch/ia64/sn/io/machvec/pci_dma.c b/arch/ia64/sn/io/machvec/pci_dma.c
--- a/arch/ia64/sn/io/machvec/pci_dma.c	Mon Sep  8 12:13:26 2003
+++ b/arch/ia64/sn/io/machvec/pci_dma.c	Mon Sep  8 12:13:26 2003
@@ -597,7 +597,7 @@
 	if (!sn_dma_supported(dev, dma_mask))
 		return 0;
 
-	dev->dma_mask = dma_mask;
+	*dev->dma_mask = dma_mask;
 	return 1;
 }
 EXPORT_SYMBOL(sn_dma_set_mask);
diff -Nru a/include/asm-ia64/sn/hcl.h b/include/asm-ia64/sn/hcl.h
--- a/include/asm-ia64/sn/hcl.h	Mon Sep  8 12:13:26 2003
+++ b/include/asm-ia64/sn/hcl.h	Mon Sep  8 12:13:26 2003
@@ -10,6 +10,7 @@
 #define _ASM_IA64_SN_HCL_H
 
 #include <asm/sn/sgi.h>
+#include <asm/sn/invent.h>
 
 extern vertex_hdl_t hwgraph_root;
 extern vertex_hdl_t linux_busnum;
diff -Nru a/include/asm-ia64/sn/pci/pciio.h b/include/asm-ia64/sn/pci/pciio.h
--- a/include/asm-ia64/sn/pci/pciio.h	Mon Sep  8 12:13:26 2003
+++ b/include/asm-ia64/sn/pci/pciio.h	Mon Sep  8 12:13:26 2003
@@ -695,5 +695,39 @@
 extern int              pciio_error_handler(vertex_hdl_t, int, ioerror_mode_t, ioerror_t *);
 extern int		pciio_dma_enabled(vertex_hdl_t);
 
+/**
+ * sn_pci_set_vchan - Set the requested Virtual Channel bits into the mapped DMA
+ *                    address.
+ * @pci_dev: pci device pointer
+ * @addr: mapped dma address
+ * @vchan: Virtual Channel to use 0 or 1.
+ *
+ * Set the Virtual Channel bit in the mapped dma address.
+ */
+
+static inline int
+sn_pci_set_vchan(struct pci_dev *pci_dev,
+		 dma_addr_t *addr,
+		 int vchan)
+{
+	if (vchan > 1) {
+		return -1;
+	}
+
+	if (!(*addr >> 32))     /* Using a mask here would be cleaner */
+		return 0;       /* but this generates better code */
+
+	if (vchan = 1) {
+		/* Set Bit 57 */
+		*addr |= (1UL << 57);
+	}
+	else {
+		/* Clear Bit 57 */
+		*addr &= ~(1UL << 57);
+	}
+
+	return 0;
+}
+
 #endif				/* C or C++ */
 #endif				/* _ASM_SN_PCI_PCIIO_H */
diff -Nru a/include/asm-ia64/sn/sn2/intr.h b/include/asm-ia64/sn/sn2/intr.h
--- a/include/asm-ia64/sn/sn2/intr.h	Mon Sep  8 12:13:26 2003
+++ b/include/asm-ia64/sn/sn2/intr.h	Mon Sep  8 12:13:26 2003
@@ -17,10 +17,11 @@
 #define SGI_II_ERROR			(0x31)
 #define SGI_XBOW_ERROR			(0x32)
 #define SGI_PCIBR_ERROR			(0x33)
+#define SGI_ACPI_SCI_INT		(0x34)
 #define SGI_XPC_NOTIFY			(0xe7)
 
 #define IA64_SN2_FIRST_DEVICE_VECTOR	(0x34)
-#define IA64_SN2_LAST_DEVICE_VECTOR	(0xe6)
+#define IA64_SN2_LAST_DEVICE_VECTOR	(0xe7)
 
 #define SN2_IRQ_RESERVED        (0x1)
 #define SN2_IRQ_CONNECTED       (0x2)

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

* Re: [PATCH] misc. sn2 updates
  2003-09-08 19:19 [PATCH] misc. sn2 updates Jesse Barnes
@ 2003-09-11  0:16 ` Ian Wienand
  2003-09-11 14:51 ` Jesse Barnes
  2003-09-11 15:22 ` Christoph Hellwig
  2 siblings, 0 replies; 4+ messages in thread
From: Ian Wienand @ 2003-09-11  0:16 UTC (permalink / raw)
  To: linux-ia64

On Mon, Sep 08, 2003 at 12:19:44PM -0700, Jesse Barnes wrote:
> Fix a couple of sn2 files.

I'm not sure if it was this change, but something like it appears to
have broken the qla1280 driver when building with CONFIG_GENERIC :

In file included from include/asm/sn/pci/pciio.h:20,
                 from drivers/scsi/qla1280.c:382:
include/asm/sn/hcl.h:82: error: syntax error before "invplace_t"
include/asm/sn/hcl.h:83: warning: function declaration isn't a prototype
include/asm/sn/hcl.h:84: error: syntax error before "major_t"
include/asm/sn/hcl.h:84: warning: function declaration isn't a prototype
include/asm/sn/hcl.h:85: error: syntax error before "major_t"
include/asm/sn/hcl.h:85: warning: function declaration isn't a prototype
drivers/scsi/qla1280.c: In function `qla1280_64bit_start_scsi':
drivers/scsi/qla1280.c:3693: warning: implicit declaration of function `sn_pci_set_vchan'

-i
ianw@gelato.unsw.edu.au
http://www.gelato.unsw.edu.au

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

* Re: [PATCH] misc. sn2 updates
  2003-09-08 19:19 [PATCH] misc. sn2 updates Jesse Barnes
  2003-09-11  0:16 ` Ian Wienand
@ 2003-09-11 14:51 ` Jesse Barnes
  2003-09-11 15:22 ` Christoph Hellwig
  2 siblings, 0 replies; 4+ messages in thread
From: Jesse Barnes @ 2003-09-11 14:51 UTC (permalink / raw)
  To: linux-ia64

No, generic compiles won't work until the discontig patch gets merged
somehow.  Did I accidentally reenable arch/ia64/sn/ as part of the
generic target?  It should be commented out.

Jesse

On Thu, Sep 11, 2003 at 10:16:18AM +1000, Ian Wienand wrote:
> On Mon, Sep 08, 2003 at 12:19:44PM -0700, Jesse Barnes wrote:
> > Fix a couple of sn2 files.
> 
> I'm not sure if it was this change, but something like it appears to
> have broken the qla1280 driver when building with CONFIG_GENERIC :
> 
> In file included from include/asm/sn/pci/pciio.h:20,
>                  from drivers/scsi/qla1280.c:382:
> include/asm/sn/hcl.h:82: error: syntax error before "invplace_t"
> include/asm/sn/hcl.h:83: warning: function declaration isn't a prototype
> include/asm/sn/hcl.h:84: error: syntax error before "major_t"
> include/asm/sn/hcl.h:84: warning: function declaration isn't a prototype
> include/asm/sn/hcl.h:85: error: syntax error before "major_t"
> include/asm/sn/hcl.h:85: warning: function declaration isn't a prototype
> drivers/scsi/qla1280.c: In function `qla1280_64bit_start_scsi':
> drivers/scsi/qla1280.c:3693: warning: implicit declaration of function `sn_pci_set_vchan'
> 
> -i
> ianw@gelato.unsw.edu.au
> http://www.gelato.unsw.edu.au

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

* Re: [PATCH] misc. sn2 updates
  2003-09-08 19:19 [PATCH] misc. sn2 updates Jesse Barnes
  2003-09-11  0:16 ` Ian Wienand
  2003-09-11 14:51 ` Jesse Barnes
@ 2003-09-11 15:22 ` Christoph Hellwig
  2 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2003-09-11 15:22 UTC (permalink / raw)
  To: linux-ia64

On Thu, Sep 11, 2003 at 07:51:18AM -0700, Jesse Barnes wrote:
> No, generic compiles won't work until the discontig patch gets merged
> somehow.  Did I accidentally reenable arch/ia64/sn/ as part of the
> generic target?  It should be commented out.

This is actually Jes' fault because he enables SN2-specific Hacks in
qla1280 for the generic build.  He hacked around my previous specific
complaint by using weak linking hacks, but your asm/sn/ changes show
once again that this idea is flawed..


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

end of thread, other threads:[~2003-09-11 15:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-08 19:19 [PATCH] misc. sn2 updates Jesse Barnes
2003-09-11  0:16 ` Ian Wienand
2003-09-11 14:51 ` Jesse Barnes
2003-09-11 15:22 ` Christoph Hellwig

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