summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-01-18 18:46:20 -0800
committerLinus Torvalds <torvalds@home.osdl.org>2004-01-18 18:46:20 -0800
commit7445915447136ac18e051a29d1a82b7b05f3885b (patch)
treedc13d4d9ebef02cf56723007f707f051c9efcbc3 /include
parentdeec0d2278d8da61872c5686a89689ff3b7715ad (diff)
[PATCH] sn: Fix the last patch - missed an IS_PIC_SOFT and needed the CG definition
From: Pat Gefre <pfg@sgi.com> Fix the last patch - missed an IS_PIC_SOFT and needed the CG definition Header file clean up Added some __init definitions for functions that were init only Removed some 'porting' code - replaced it with linux calls/defintions Cleaned up some of the types we were using (ones that had been added) Fixed include files that had the wrong path in their ifdef'd names
Diffstat (limited to 'include')
-rw-r--r--include/asm-ia64/sn/addrs.h20
-rw-r--r--include/asm-ia64/sn/cdl.h2
-rw-r--r--include/asm-ia64/sn/clksupport.h3
-rw-r--r--include/asm-ia64/sn/dmamap.h26
-rw-r--r--include/asm-ia64/sn/geo.h6
-rw-r--r--include/asm-ia64/sn/hcl.h4
-rw-r--r--include/asm-ia64/sn/hcl_util.h2
-rw-r--r--include/asm-ia64/sn/hwgfs.h8
-rw-r--r--include/asm-ia64/sn/ioconfig_bus.h5
-rw-r--r--include/asm-ia64/sn/ioerror_handling.h4
-rw-r--r--include/asm-ia64/sn/klconfig.h6
-rw-r--r--include/asm-ia64/sn/ksys/elsc.h6
-rw-r--r--include/asm-ia64/sn/ksys/l1.h6
-rw-r--r--include/asm-ia64/sn/nodepda.h1
-rw-r--r--include/asm-ia64/sn/pci/bridge.h5
-rw-r--r--include/asm-ia64/sn/pci/pci_bus_cvlink.h6
-rw-r--r--include/asm-ia64/sn/pci/pci_defs.h70
-rw-r--r--include/asm-ia64/sn/pci/pcibr.h18
-rw-r--r--include/asm-ia64/sn/pci/pcibr_private.h21
-rw-r--r--include/asm-ia64/sn/pci/pciio.h33
-rw-r--r--include/asm-ia64/sn/pci/pciio_private.h8
-rw-r--r--include/asm-ia64/sn/pci/pic.h26
-rw-r--r--include/asm-ia64/sn/pda.h1
-rw-r--r--include/asm-ia64/sn/pio.h4
-rw-r--r--include/asm-ia64/sn/sgi.h95
-rw-r--r--include/asm-ia64/sn/sn2/addrs.h15
-rw-r--r--include/asm-ia64/sn/sn2/geo.h6
-rw-r--r--include/asm-ia64/sn/sn2/shub_md.h7
-rw-r--r--include/asm-ia64/sn/xtalk/xbow.h6
-rw-r--r--include/asm-ia64/sn/xtalk/xbow_info.h4
-rw-r--r--include/asm-ia64/sn/xtalk/xswitch.h6
-rw-r--r--include/asm-ia64/sn/xtalk/xtalk.h10
-rw-r--r--include/asm-ia64/sn/xtalk/xtalk_private.h6
-rw-r--r--include/asm-ia64/sn/xtalk/xtalkaddrs.h6
-rw-r--r--include/asm-ia64/sn/xtalk/xwidget.h10
35 files changed, 171 insertions, 291 deletions
diff --git a/include/asm-ia64/sn/addrs.h b/include/asm-ia64/sn/addrs.h
index 7b3f5d8614ee..4790718f31df 100644
--- a/include/asm-ia64/sn/addrs.h
+++ b/include/asm-ia64/sn/addrs.h
@@ -17,29 +17,15 @@
#include <asm/sn/types.h>
#endif
-#ifndef __ASSEMBLY__
-
-#define PS_UINT_CAST (__psunsigned_t)
-#define UINT64_CAST (uint64_t)
#define HUBREG_CAST (volatile mmr_t *)
-#elif __ASSEMBLY__
-
-#define PS_UINT_CAST
-#define UINT64_CAST
-#define HUBREG_CAST
-
-#endif
-
-
-
/*
* The following macros are used to index to the beginning of a specific
* node's address space.
*/
-#define NODE_OFFSET(_n) (UINT64_CAST (_n) << NASID_SHFT)
+#define NODE_OFFSET(_n) ((uint64_t) (_n) << NASID_SHFT)
#define NODE_CAC_BASE(_n) (CAC_BASE + NODE_OFFSET(_n))
#define NODE_HSPEC_BASE(_n) (HSPEC_BASE + NODE_OFFSET(_n))
@@ -55,7 +41,7 @@
#define RAW_NODE_SWIN_BASE(nasid, widget) \
- (NODE_IO_BASE(nasid) + (UINT64_CAST (widget) << SWIN_SIZE_BITS))
+ (NODE_IO_BASE(nasid) + ((uint64_t) (widget) << SWIN_SIZE_BITS))
#define WIDGETID_GET(addr) ((unsigned char)((addr >> SWIN_SIZE_BITS) & 0xff))
@@ -66,7 +52,7 @@
*/
#define SWIN_SIZE_BITS 24
-#define SWIN_SIZE (1UL<<24)
+#define SWIN_SIZE (1UL << 24)
#define SWIN_SIZEMASK (SWIN_SIZE - 1)
#define SWIN_WIDGET_MASK 0xF
diff --git a/include/asm-ia64/sn/cdl.h b/include/asm-ia64/sn/cdl.h
index ab41b288266b..0af675f6e14c 100644
--- a/include/asm-ia64/sn/cdl.h
+++ b/include/asm-ia64/sn/cdl.h
@@ -8,7 +8,9 @@
#ifndef _ASM_IA64_SN_CDL_H
#define _ASM_IA64_SN_CDL_H
+#ifdef __KERNEL__
#include <asm/sn/sgi.h>
+#endif
struct cdl {
int part_num; /* Part part number */
diff --git a/include/asm-ia64/sn/clksupport.h b/include/asm-ia64/sn/clksupport.h
index 029eeae1939c..ff5c1a00c115 100644
--- a/include/asm-ia64/sn/clksupport.h
+++ b/include/asm-ia64/sn/clksupport.h
@@ -1,5 +1,4 @@
/*
- *
* 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.
@@ -31,9 +30,7 @@
typedef long clkreg_t;
extern unsigned long sn_rtc_cycles_per_second;
-extern unsigned long sn_rtc_usec_per_cyc;
extern unsigned long sn_rtc_per_itc;
-extern unsigned long sn_rtc_delta;
#include <asm/sn/addrs.h>
diff --git a/include/asm-ia64/sn/dmamap.h b/include/asm-ia64/sn/dmamap.h
index 69134fe5c0c2..3bb55148fa9d 100644
--- a/include/asm-ia64/sn/dmamap.h
+++ b/include/asm-ia64/sn/dmamap.h
@@ -8,6 +8,8 @@
#ifndef _ASM_IA64_SN_DMAMAP_H
#define _ASM_IA64_SN_DMAMAP_H
+#include <asm/sn/types.h>
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -38,31 +40,9 @@ typedef struct dmamap {
int dma_index; /* Beginning map register to use */
int dma_size; /* Number of map registers to use */
paddr_t dma_addr; /* Corresponding bus addr for A24/A32 */
- caddr_t dma_virtaddr; /* Beginning virtual address that is mapped */
+ unsigned long dma_virtaddr; /* Beginning virtual address that is mapped */
} dmamap_t;
-struct alenlist_s;
-
-/*
- * Prototypes of exported functions
- */
-extern dmamap_t *dma_mapalloc(int, int, int, int);
-extern void dma_mapfree(dmamap_t *);
-extern int dma_map(dmamap_t *, caddr_t, int);
-extern int dma_map2(dmamap_t *, caddr_t, caddr_t, int);
-extern paddr_t dma_mapaddr(dmamap_t *, caddr_t);
-extern int dma_map_alenlist(dmamap_t *, struct alenlist_s *, size_t);
-extern uint ev_kvtoiopnum(caddr_t);
-
-/*
- * These variables are defined in master.d/kernel
- */
-extern struct map *a24map[];
-extern struct map *a32map[];
-
-extern int a24_mapsize;
-extern int a32_mapsize;
-
#ifdef __cplusplus
}
#endif
diff --git a/include/asm-ia64/sn/geo.h b/include/asm-ia64/sn/geo.h
index 105da0320bbf..f8060cd7e2dd 100644
--- a/include/asm-ia64/sn/geo.h
+++ b/include/asm-ia64/sn/geo.h
@@ -6,8 +6,8 @@
* Copyright (C) 1992 - 1997, 2000-2003 Silicon Graphics, Inc. All rights reserved.
*/
-#ifndef __SYS_GEO_H__
-#define __SYS_GEO_H__
+#ifndef _ASM_IA64_SN_GEO_H
+#define _ASM_IA64_SN_GEO_H
/* Include a platform-specific geo.h. It must define at least:
* geoid_t: Geographic identifier data type
@@ -42,4 +42,4 @@ extern void hwcfg_format_geoid_compt(char *buffer, geoid_t m, int compt);
extern geoid_t hwcfg_geo_get_self(geo_type_t type);
extern geoid_t hwcfg_geo_get_by_nasid(geo_type_t type, nasid_t nasid);
-#endif /* __SYS_GEO_H__ */
+#endif /* _ASM_IA64_SN_GEO_H */
diff --git a/include/asm-ia64/sn/hcl.h b/include/asm-ia64/sn/hcl.h
index b2732cfe962e..8597980b0142 100644
--- a/include/asm-ia64/sn/hcl.h
+++ b/include/asm-ia64/sn/hcl.h
@@ -103,8 +103,6 @@ extern int hwgraph_path_lookup(vertex_hdl_t, char *, vertex_hdl_t *, char **);
extern int hwgraph_info_export_LBL(vertex_hdl_t, char *, int);
extern int hwgraph_info_unexport_LBL(vertex_hdl_t, char *);
extern int hwgraph_info_remove_LBL(vertex_hdl_t, char *, arbitrary_info_t *);
-extern char * vertex_to_name(vertex_hdl_t, char *, uint);
-
-extern int init_hcl(void);
+extern char *vertex_to_name(vertex_hdl_t, char *, unsigned int);
#endif /* _ASM_IA64_SN_HCL_H */
diff --git a/include/asm-ia64/sn/hcl_util.h b/include/asm-ia64/sn/hcl_util.h
index c3d944907a8c..f32ecc728bef 100644
--- a/include/asm-ia64/sn/hcl_util.h
+++ b/include/asm-ia64/sn/hcl_util.h
@@ -9,7 +9,7 @@
#ifndef _ASM_IA64_SN_HCL_UTIL_H
#define _ASM_IA64_SN_HCL_UTIL_H
-extern char * dev_to_name(vertex_hdl_t, char *, uint);
+extern char * dev_to_name(vertex_hdl_t, char *, unsigned int);
extern int device_master_set(vertex_hdl_t, vertex_hdl_t);
extern vertex_hdl_t device_master_get(vertex_hdl_t);
extern cnodeid_t master_node_get(vertex_hdl_t);
diff --git a/include/asm-ia64/sn/hwgfs.h b/include/asm-ia64/sn/hwgfs.h
index a2c66568222b..39191b144805 100644
--- a/include/asm-ia64/sn/hwgfs.h
+++ b/include/asm-ia64/sn/hwgfs.h
@@ -1,3 +1,6 @@
+#ifndef _ASM_IA64_SN_HWGFS_H
+#define _ASM_IA64_SN_HWGFS_H
+
/*
* 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
@@ -5,9 +8,6 @@
*
* Copyright (C) 1992 - 1997, 2000-2003 Silicon Graphics, Inc. All rights reserved.
*/
-#ifndef _ASM_IA64_SN_HWGFS_H
-#define _ASM_IA64_SN_HWGFS_H
-
typedef struct dentry *hwgfs_handle_t;
extern hwgfs_handle_t hwgfs_register(hwgfs_handle_t dir, const char *name,
@@ -30,4 +30,4 @@ extern int hwgfs_generate_path(hwgfs_handle_t de, char *path, int buflen);
extern void *hwgfs_get_info(hwgfs_handle_t de);
extern int hwgfs_set_info(hwgfs_handle_t de, void *info);
-#endif
+#endif /* _ASM_IA64_SN_HWGFS_H */
diff --git a/include/asm-ia64/sn/ioconfig_bus.h b/include/asm-ia64/sn/ioconfig_bus.h
index 9fe0bdeef046..d84b774574ff 100644
--- a/include/asm-ia64/sn/ioconfig_bus.h
+++ b/include/asm-ia64/sn/ioconfig_bus.h
@@ -6,6 +6,9 @@
* Copyright (C) 2003 Silicon Graphics, Inc. All Rights Reserved.
*/
+#ifndef _ASM_IA64_SN_IOCONFIG_BUS_H
+#define _ASM_IA64_SN_IOCONFIG_BUS_H
+
#define IOCONFIG_PCIBUS "/boot/efi/ioconfig_pcibus"
#define POUND_CHAR '#'
#define MAX_LINE_LEN 128
@@ -20,3 +23,5 @@ struct ioconfig_parm {
struct ascii_moduleid{
unsigned char io_moduleid[8]; /* pci path name */
};
+
+#endif /* _ASM_IA64_SN_IOCONFIG_BUS_H */
diff --git a/include/asm-ia64/sn/ioerror_handling.h b/include/asm-ia64/sn/ioerror_handling.h
index 07da65e5b9e0..3873a3ea16d5 100644
--- a/include/asm-ia64/sn/ioerror_handling.h
+++ b/include/asm-ia64/sn/ioerror_handling.h
@@ -8,7 +8,6 @@
#ifndef _ASM_IA64_SN_IOERROR_HANDLING_H
#define _ASM_IA64_SN_IOERROR_HANDLING_H
-#include <linux/config.h>
#include <linux/types.h>
#include <asm/sn/sgi.h>
@@ -255,12 +254,13 @@ error_skip_point_mark(vertex_hdl_t v)
* one.
*/
if (v_error_skip_env_get(v, error_env) != GRAPH_SUCCESS) {
- error_env = snia_kmem_zalloc(sizeof(label_t), KM_NOSLEEP);
+ error_env = kmalloc(sizeof(label_t), GFP_KERNEL);
/* Unable to allocate memory for jum buffer. This should
* be a very rare occurrence.
*/
if (!error_env)
return(-1);
+ memset(error_env, 0, sizeof(label_t));
/* Store the jump buffer information on the vertex.*/
if (v_error_skip_env_set(v, error_env, 0) != GRAPH_SUCCESS)
return(-2);
diff --git a/include/asm-ia64/sn/klconfig.h b/include/asm-ia64/sn/klconfig.h
index 03b5a628d490..c1b601077e6b 100644
--- a/include/asm-ia64/sn/klconfig.h
+++ b/include/asm-ia64/sn/klconfig.h
@@ -11,12 +11,6 @@
#ifndef _ASM_IA64_SN_KLCONFIG_H
#define _ASM_IA64_SN_KLCONFIG_H
-#include <linux/config.h>
-
-/*
- * klconfig.h
- */
-
/*
* The KLCONFIG structures store info about the various BOARDs found
* during Hardware Discovery. In addition, it stores info about the
diff --git a/include/asm-ia64/sn/ksys/elsc.h b/include/asm-ia64/sn/ksys/elsc.h
index d7a5afb59b7e..01bd746af95c 100644
--- a/include/asm-ia64/sn/ksys/elsc.h
+++ b/include/asm-ia64/sn/ksys/elsc.h
@@ -5,8 +5,8 @@
*
* Copyright (C) 1992-1997, 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
*/
-#ifndef _ASM_SN_KSYS_ELSC_H
-#define _ASM_SN_KSYS_ELSC_H
+#ifndef _ASM_IA64_SN_KSYS_ELSC_H
+#define _ASM_IA64_SN_KSYS_ELSC_H
/*
* Error codes
@@ -36,4 +36,4 @@
#define ELSC_ERROR_NVMAGIC (-124) /* Bad magic no. in NVRAM */
#define ELSC_ERROR_MODULE (-125) /* Moduleid processing err */
-#endif /* _ASM_SN_KSYS_ELSC_H */
+#endif /* _ASM_IA64_SN_KSYS_ELSC_H */
diff --git a/include/asm-ia64/sn/ksys/l1.h b/include/asm-ia64/sn/ksys/l1.h
index 680adf040186..6b6bcacac93e 100644
--- a/include/asm-ia64/sn/ksys/l1.h
+++ b/include/asm-ia64/sn/ksys/l1.h
@@ -6,8 +6,8 @@
* Copyright (C) 1992-1997,2000-2003 Silicon Graphics, Inc. All Rights Reserved.
*/
-#ifndef _ASM_SN_KSYS_L1_H
-#define _ASM_SN_KSYS_L1_H
+#ifndef _ASM_IA64_SN_KSYS_L1_H
+#define _ASM_IA64_SN_KSYS_L1_H
#include <asm/sn/types.h>
@@ -128,4 +128,4 @@ int iobrick_rack_bay_type_get( nasid_t nasid, unsigned int *rack,
int iobrick_module_get( nasid_t nasid );
-#endif /* _ASM_SN_KSYS_L1_H */
+#endif /* _ASM_IA64_SN_KSYS_L1_H */
diff --git a/include/asm-ia64/sn/nodepda.h b/include/asm-ia64/sn/nodepda.h
index b8ecb51db321..281e62283acc 100644
--- a/include/asm-ia64/sn/nodepda.h
+++ b/include/asm-ia64/sn/nodepda.h
@@ -12,7 +12,6 @@
#include <linux/config.h>
#include <asm/sn/sgi.h>
#include <asm/irq.h>
-#include <asm/topology.h>
#include <asm/sn/intr.h>
#include <asm/sn/router.h>
#include <asm/sn/pda.h>
diff --git a/include/asm-ia64/sn/pci/bridge.h b/include/asm-ia64/sn/pci/bridge.h
index a527b4a9b2f6..fbb6e57b6170 100644
--- a/include/asm-ia64/sn/pci/bridge.h
+++ b/include/asm-ia64/sn/pci/bridge.h
@@ -37,7 +37,6 @@
#include <asm/sn/xtalk/xwidget.h>
#include <asm/sn/pci/pic.h>
-extern int io_get_sh_swapper(nasid_t);
#define BRIDGE_REG_GET32(reg) \
__swab32( *(volatile uint32_t *) (((uint64_t)reg)^4) )
@@ -46,11 +45,11 @@ extern int io_get_sh_swapper(nasid_t);
/* I/O page size */
-#if _PAGESZ == 4096
+#if PAGE_SIZE == 4096
#define IOPFNSHIFT 12 /* 4K per mapped page */
#else
#define IOPFNSHIFT 14 /* 16K per mapped page */
-#endif /* _PAGESZ */
+#endif /* PAGE_SIZE */
#define IOPGSIZE (1 << IOPFNSHIFT)
#define IOPG(x) ((x) >> IOPFNSHIFT)
diff --git a/include/asm-ia64/sn/pci/pci_bus_cvlink.h b/include/asm-ia64/sn/pci/pci_bus_cvlink.h
index e89ce22118f7..b78948486d2c 100644
--- a/include/asm-ia64/sn/pci/pci_bus_cvlink.h
+++ b/include/asm-ia64/sn/pci/pci_bus_cvlink.h
@@ -5,8 +5,8 @@
*
* Copyright (C) 1992 - 1997, 2000-2003 Silicon Graphics, Inc. All rights reserved.
*/
-#ifndef _ASM_SN_PCI_CVLINK_H
-#define _ASM_SN_PCI_CVLINK_H
+#ifndef _ASM_IA64_SN_PCI_CVLINK_H
+#define _ASM_IA64_SN_PCI_CVLINK_H
#include <asm/sn/types.h>
#include <asm/sn/sgi.h>
@@ -69,4 +69,4 @@ struct ioports_to_tlbs_s {
ig:11;
};
-#endif /* _ASM_SN_PCI_CVLINK_H */
+#endif /* _ASM_IA64_SN_PCI_CVLINK_H */
diff --git a/include/asm-ia64/sn/pci/pci_defs.h b/include/asm-ia64/sn/pci/pci_defs.h
index 10bae2d16db8..03d97f3edaaf 100644
--- a/include/asm-ia64/sn/pci/pci_defs.h
+++ b/include/asm-ia64/sn/pci/pci_defs.h
@@ -5,10 +5,8 @@
*
* Copyright (c) 1992-1997,2000-2003 Silicon Graphics, Inc. All rights reserved.
*/
-#ifndef _ASM_SN_PCI_PCI_DEFS_H
-#define _ASM_SN_PCI_PCI_DEFS_H
-
-#include <linux/config.h>
+#ifndef _ASM_IA64_SN_PCI_PCI_DEFS_H
+#define _ASM_IA64_SN_PCI_PCI_DEFS_H
/* defines for the PCI bus architecture */
@@ -244,7 +242,7 @@
#else
-extern uint pci_read(void * address, int type);
+extern unsigned int pci_read(void * address, int type);
extern void pci_write(void * address, int data, int type);
#define BYTE 1
@@ -328,24 +326,24 @@ typedef volatile struct pci_cfg_s {
uint16_t dev_id;
uint16_t cmd;
uint16_t status;
- uchar_t rev;
- uchar_t prog_if;
- uchar_t sub_class;
- uchar_t class;
- uchar_t line_size;
- uchar_t lt;
- uchar_t hdr_type;
- uchar_t bist;
+ uint8_t rev;
+ uint8_t prog_if;
+ uint8_t sub_class;
+ uint8_t class;
+ uint8_t line_size;
+ uint8_t lt;
+ uint8_t hdr_type;
+ uint8_t bist;
uint32_t bar[6];
uint32_t cardbus;
uint16_t subsys_vendor_id;
uint16_t subsys_dev_id;
uint32_t exp_rom;
uint32_t res[2];
- uchar_t int_line;
- uchar_t int_pin;
- uchar_t min_gnt;
- uchar_t max_lat;
+ uint8_t int_line;
+ uint8_t int_pin;
+ uint8_t min_gnt;
+ uint8_t max_lat;
} pci_cfg_t;
/*
@@ -356,21 +354,21 @@ typedef volatile struct pci_cfg1_s {
uint16_t dev_id;
uint16_t cmd;
uint16_t status;
- uchar_t rev;
- uchar_t prog_if;
- uchar_t sub_class;
- uchar_t class;
- uchar_t line_size;
- uchar_t lt;
- uchar_t hdr_type;
- uchar_t bist;
+ uint8_t rev;
+ uint8_t prog_if;
+ uint8_t sub_class;
+ uint8_t class;
+ uint8_t line_size;
+ uint8_t lt;
+ uint8_t hdr_type;
+ uint8_t bist;
uint32_t bar[2];
- uchar_t pri_bus_num;
- uchar_t snd_bus_num;
- uchar_t sub_bus_num;
- uchar_t slt;
- uchar_t io_base;
- uchar_t io_limit;
+ uint8_t pri_bus_num;
+ uint8_t snd_bus_num;
+ uint8_t sub_bus_num;
+ uint8_t slt;
+ uint8_t io_base;
+ uint8_t io_limit;
uint16_t snd_status;
uint16_t mem_base;
uint16_t mem_limit;
@@ -382,8 +380,8 @@ typedef volatile struct pci_cfg1_s {
uint16_t io_limit_upper;
uint32_t res;
uint32_t exp_rom;
- uchar_t int_line;
- uchar_t int_pin;
+ uint8_t int_line;
+ uint8_t int_pin;
uint16_t ppb_control;
} pci_cfg1_t;
@@ -416,11 +414,11 @@ typedef volatile struct cap_pcix_stat_reg_s {
} cap_pcix_stat_reg_t;
typedef volatile struct cap_pcix_type0_s {
- uchar_t pcix_cap_id;
- uchar_t pcix_cap_nxt;
+ uint8_t pcix_cap_id;
+ uint8_t pcix_cap_nxt;
cap_pcix_cmd_reg_t pcix_type0_command;
cap_pcix_stat_reg_t pcix_type0_status;
} cap_pcix_type0_t;
#endif /* __ASSEMBLY__ */
-#endif /* _ASM_SN_PCI_PCI_DEFS_H */
+#endif /* _ASM_IA64_SN_PCI_PCI_DEFS_H */
diff --git a/include/asm-ia64/sn/pci/pcibr.h b/include/asm-ia64/sn/pci/pcibr.h
index 606c4b5da069..6f812195707a 100644
--- a/include/asm-ia64/sn/pci/pcibr.h
+++ b/include/asm-ia64/sn/pci/pcibr.h
@@ -5,8 +5,8 @@
*
* Copyright (C) 1992-1997,2000-2003 Silicon Graphics, Inc. All rights reserved.
*/
-#ifndef _ASM_SN_PCI_PCIBR_H
-#define _ASM_SN_PCI_PCIBR_H
+#ifndef _ASM_IA64_SN_PCI_PCIBR_H
+#define _ASM_IA64_SN_PCI_PCIBR_H
#if defined(__KERNEL__)
@@ -421,7 +421,7 @@ struct pcibr_slot_info_resp_s {
int resp_bss_ninfo;
char resp_bss_devio_bssd_space[16];
iopaddr_t resp_bss_devio_bssd_base;
- bridgereg_t resp_bss_device;
+ uint64_t resp_bss_device;
int resp_bss_pmu_uctr;
int resp_bss_d32_uctr;
int resp_bss_d64_uctr;
@@ -429,7 +429,7 @@ struct pcibr_slot_info_resp_s {
unsigned resp_bss_d64_flags;
iopaddr_t resp_bss_d32_base;
unsigned resp_bss_d32_flags;
- atomic_t resp_bss_ext_ates_active;
+ atomic_t resp_bss_ext_ates_active;
volatile unsigned *resp_bss_cmd_pointer;
unsigned resp_bss_cmd_shadow;
int resp_bs_rrb_valid;
@@ -437,10 +437,10 @@ struct pcibr_slot_info_resp_s {
int resp_bs_rrb_valid_v2;
int resp_bs_rrb_valid_v3;
int resp_bs_rrb_res;
- bridgereg_t resp_b_resp;
- bridgereg_t resp_b_int_device;
- bridgereg_t resp_b_int_enable;
- bridgereg_t resp_b_int_host;
+ uint64_t resp_b_resp;
+ uint64_t resp_b_int_device;
+ uint64_t resp_b_int_enable;
+ uint64_t resp_b_int_host;
picreg_t resp_p_int_enable;
picreg_t resp_p_int_host;
struct pcibr_slot_func_info_resp_s {
@@ -507,4 +507,4 @@ struct pcibr_slot_info_resp_s {
/* ERANGE 34 */
/* EUNATCH 42 */
-#endif /* _ASM_SN_PCI_PCIBR_H */
+#endif /* _ASM_IA64_SN_PCI_PCIBR_H */
diff --git a/include/asm-ia64/sn/pci/pcibr_private.h b/include/asm-ia64/sn/pci/pcibr_private.h
index c4c26466bf94..40ddf25655bf 100644
--- a/include/asm-ia64/sn/pci/pcibr_private.h
+++ b/include/asm-ia64/sn/pci/pcibr_private.h
@@ -5,8 +5,8 @@
*
* Copyright (C) 1992 - 1997, 2000-2003 Silicon Graphics, Inc. All rights reserved.
*/
-#ifndef _ASM_SN_PCI_PCIBR_PRIVATE_H
-#define _ASM_SN_PCI_PCIBR_PRIVATE_H
+#ifndef _ASM_IA64_SN_PCI_PCIBR_PRIVATE_H
+#define _ASM_IA64_SN_PCI_PCIBR_PRIVATE_H
/*
* pcibr_private.h -- private definitions for pcibr
@@ -271,9 +271,9 @@ struct pcibr_intr_wrap_s {
#define PCIBR_BUS_IO_MAX 0x0FFFFFFF
#define PCIBR_BUS_IO_PAGE 0x100000
-#define PCIBR_BUS_SWIN_BASE _PAGESZ
+#define PCIBR_BUS_SWIN_BASE PAGE_SIZE
#define PCIBR_BUS_SWIN_MAX 0x000FFFFF
-#define PCIBR_BUS_SWIN_PAGE _PAGESZ
+#define PCIBR_BUS_SWIN_PAGE PAGE_SIZE
#define PCIBR_BUS_MEM_BASE 0x200000
#define PCIBR_BUS_MEM_MAX 0x3FFFFFFF
@@ -435,7 +435,7 @@ struct pcibr_soft_s {
/* Shadow value for Device(x) register,
* so we don't have to go to the chip.
*/
- bridgereg_t bss_device;
+ uint64_t bss_device;
/* Number of sets on GBR/REALTIME bit outstanding
* Used by Priority I/O for tracking reservations
@@ -650,17 +650,6 @@ struct pcibr_hints_s {
#define pcibr_soft_set(v,i) (hwgraph_fastinfo_set((v), (arbitrary_info_t)(i)))
/*
- * mem alloc/free macros
- */
-#define NEWAf(ptr,n,f) (ptr = snia_kmem_zalloc((n)*sizeof (*(ptr)), (f&PCIIO_NOSLEEP)?KM_NOSLEEP:KM_SLEEP))
-#define NEWA(ptr,n) (ptr = snia_kmem_zalloc((n)*sizeof (*(ptr)), KM_SLEEP))
-#define DELA(ptr,n) (kfree(ptr))
-
-#define NEWf(ptr,f) NEWAf(ptr,1,f)
-#define NEW(ptr) NEWA(ptr,1)
-#define DEL(ptr) DELA(ptr,1)
-
-/*
* Additional PIO spaces per slot are
* recorded in this structure.
*/
diff --git a/include/asm-ia64/sn/pci/pciio.h b/include/asm-ia64/sn/pci/pciio.h
index 8fa3d4975056..095dafda66f3 100644
--- a/include/asm-ia64/sn/pci/pciio.h
+++ b/include/asm-ia64/sn/pci/pciio.h
@@ -5,24 +5,34 @@
*
* Copyright (C) 1992 - 1997, 2000-2003 Silicon Graphics, Inc. All rights reserved.
*/
-#ifndef _ASM_SN_PCI_PCIIO_H
-#define _ASM_SN_PCI_PCIIO_H
+#ifndef _ASM_IA64_SN_PCI_PCIIO_H
+#define _ASM_IA64_SN_PCI_PCIIO_H
/*
* pciio.h -- platform-independent PCI interface
*/
-#include <linux/config.h>
+#ifdef __KERNEL__
#include <linux/ioport.h>
#include <asm/sn/ioerror.h>
#include <asm/sn/driver.h>
#include <asm/sn/hcl.h>
-
+#else
+#include <linux/ioport.h>
+#include <ioerror.h>
+#include <driver.h>
+#include <hcl.h>
+#endif
#ifndef __ASSEMBLY__
+#ifdef __KERNEL__
#include <asm/sn/dmamap.h>
#include <asm/sn/alenlist.h>
+#else
+#include <dmamap.h>
+#include <alenlist.h>
+#endif
typedef int pciio_vendor_id_t;
@@ -729,4 +739,17 @@ sn_pci_set_vchan(struct pci_dev *pci_dev,
}
#endif /* C or C++ */
-#endif /* _ASM_SN_PCI_PCIIO_H */
+
+
+/*
+ * Prototypes
+ */
+
+int snia_badaddr_val(volatile void *addr, int len, volatile void *ptr);
+nasid_t snia_get_console_nasid(void);
+nasid_t snia_get_master_baseio_nasid(void);
+/* XXX: should probably be called __sn2_pci_rrb_alloc */
+int snia_pcibr_rrb_alloc(struct pci_dev *pci_dev, int *count_vchan0, int *count_vchan1);
+pciio_endian_t snia_pciio_endian_set(struct pci_dev *pci_dev,
+ pciio_endian_t device_end, pciio_endian_t desired_end);
+#endif /* _ASM_IA64_SN_PCI_PCIIO_H */
diff --git a/include/asm-ia64/sn/pci/pciio_private.h b/include/asm-ia64/sn/pci/pciio_private.h
index b28009963ffb..83800ec1ca2f 100644
--- a/include/asm-ia64/sn/pci/pciio_private.h
+++ b/include/asm-ia64/sn/pci/pciio_private.h
@@ -5,8 +5,8 @@
*
* Copyright (C) 1992 - 1997, 2000-2003 Silicon Graphics, Inc. All rights reserved.
*/
-#ifndef _ASM_SN_PCI_PCIIO_PRIVATE_H
-#define _ASM_SN_PCI_PCIIO_PRIVATE_H
+#ifndef _ASM_IA64_SN_PCI_PCIIO_PRIVATE_H
+#define _ASM_IA64_SN_PCI_PCIIO_PRIVATE_H
#include <asm/sn/pci/pciio.h>
#include <asm/sn/pci/pci_defs.h>
@@ -16,8 +16,6 @@
* PCI drivers should NOT include this file.
*/
-#ident "sys/PCI/pciio_private: $Revision: 1.13 $"
-
/*
* All PCI providers set up PIO using this information.
*/
@@ -126,4 +124,4 @@ struct pciio_info_s {
};
extern char pciio_info_fingerprint[];
-#endif /* _ASM_SN_PCI_PCIIO_PRIVATE_H */
+#endif /* _ASM_IA64_SN_PCI_PCIIO_PRIVATE_H */
diff --git a/include/asm-ia64/sn/pci/pic.h b/include/asm-ia64/sn/pci/pic.h
index 21ccbc98604b..61944d84ec29 100644
--- a/include/asm-ia64/sn/pci/pic.h
+++ b/include/asm-ia64/sn/pci/pic.h
@@ -5,17 +5,8 @@
*
* Copyright (C) 1992 - 1997, 2000-2003 Silicon Graphics, Inc. All rights reserved.
*/
-#ifndef _ASM_SN_PCI_PIC_H
-#define _ASM_SN_PCI_PIC_H
-
-
-/*
- * The PIC ASIC is a follow-on to the Bridge and Xbridge ASICs.
- * It shares many of the same registers as those chips and therefore
- * the primary structure for the PIC will be bridge_s as defined
- * in irix/kern/sys/PCI/bridge.h. This file is intended as a complement
- * to bridge.h, which includes this file.
- */
+#ifndef _ASM_IA64_SN_PCI_PIC_H
+#define _ASM_IA64_SN_PCI_PIC_H
/*
* PIC AS DEVICE ZERO
@@ -65,13 +56,13 @@
*/
-#ifndef __ASSEMBLY__
-
-#ifdef __cplusplus
-extern "C" {
+#ifdef __KERNEL__
+#include <linux/types.h>
+#include <asm/sn/xtalk/xwidget.h> /* generic widget header */
+#else
+#include <xtalk/xwidget.h>
#endif
-// #include <sys/types.h>
#include <asm/sn/pci/pciio.h>
@@ -1996,5 +1987,4 @@ typedef uint64_t picreg_t;
} pic_px_write_buf_valid_fld_s;
} pic_px_write_buf_valid_u_t;
-#endif /* __ASSEMBLY__ */
-#endif /* _ASM_SN_PCI_PIC_H */
+#endif /* _ASM_IA64_SN_PCI_PIC_H */
diff --git a/include/asm-ia64/sn/pda.h b/include/asm-ia64/sn/pda.h
index 7162968474c7..4ed16e449d87 100644
--- a/include/asm-ia64/sn/pda.h
+++ b/include/asm-ia64/sn/pda.h
@@ -10,7 +10,6 @@
#include <linux/config.h>
#include <linux/cache.h>
-#include <linux/numa.h>
#include <asm/percpu.h>
#include <asm/system.h>
#include <asm/processor.h>
diff --git a/include/asm-ia64/sn/pio.h b/include/asm-ia64/sn/pio.h
index 3da7df9c4df0..4c0b9f0486a0 100644
--- a/include/asm-ia64/sn/pio.h
+++ b/include/asm-ia64/sn/pio.h
@@ -29,8 +29,8 @@ typedef volatile ulong* pioaddr_t;
typedef struct piomap {
- uint pio_bus;
- uint pio_adap;
+ unsigned int pio_bus;
+ unsigned int pio_adap;
int pio_flag;
int pio_reg;
char pio_name[7]; /* to identify the mapped device */
diff --git a/include/asm-ia64/sn/sgi.h b/include/asm-ia64/sn/sgi.h
index 6dc845509f33..2ac31ecb9711 100644
--- a/include/asm-ia64/sn/sgi.h
+++ b/include/asm-ia64/sn/sgi.h
@@ -1,5 +1,4 @@
/*
- *
* 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.
@@ -21,14 +20,17 @@
typedef hwgfs_handle_t vertex_hdl_t;
-typedef int64_t __psint_t; /* needed by klgraph.c */
+/* Nice general name length that lots of people like to use */
+#ifndef MAXDEVNAME
+#define MAXDEVNAME 256
+#endif
typedef enum { B_FALSE, B_TRUE } boolean_t;
/*
-** Possible return values from graph routines.
-*/
+ * Possible return values from graph routines.
+ */
typedef enum graph_error_e {
GRAPH_SUCCESS, /* 0 */
GRAPH_DUP, /* 1 */
@@ -40,69 +42,15 @@ typedef enum graph_error_e {
GRAPH_IN_USE /* 7 */
} graph_error_t;
-#define KM_SLEEP 0x0000
-#define KM_NOSLEEP 0x0001 /* needed by kmem_alloc_node(), kmem_zalloc()
- * calls */
-#define VM_NOSLEEP 0x0001 /* needed kmem_alloc_node(), kmem_zalloc_node
- * calls */
-#define XG_WIDGET_PART_NUM 0xC102 /* KONA/xt_regs.h XG_XT_PART_NUM_VALUE */
-
-typedef uint64_t vhandl_t;
-
-
-#define NBPP PAGE_SIZE
-#define _PAGESZ PAGE_SIZE
-
-#ifndef MAXDEVNAME
-#define MAXDEVNAME 256
-#endif
-
-#define HUB_PIO_CONVEYOR 0x1
#define CNODEID_NONE ((cnodeid_t)-1)
-#define XTALK_PCI_PART_NUM "030-1275-"
-#define kdebug 0
-
-
-#define COPYIN(a, b, c) copy_from_user(b,a,c)
-#define COPYOUT(a, b, c) copy_to_user(b,a,c)
-
-#define BZERO(a,b) memset(a, 0, b)
-
-#define kern_malloc(x) kmalloc(x, GFP_KERNEL)
-#define kern_free(x) kfree(x)
-
-typedef cpuid_t cpu_cookie_t;
#define CPU_NONE (-1)
#define GRAPH_VERTEX_NONE ((vertex_hdl_t)-1)
/*
- * mutext support mapping
+ * No code is complete without an Assertion macro
*/
-#define mutex_spinlock_init(s) spin_lock_init(s)
-inline static unsigned long
-mutex_spinlock(spinlock_t *sem) {
- unsigned long flags = 0;
-// spin_lock_irqsave(sem, flags);
- spin_lock(sem);
- return(flags);
-}
-// #define mutex_spinunlock(s,t) spin_unlock_irqrestore(s,t)
-#define mutex_spinunlock(s,t) spin_unlock(s)
-
-
-#define mutex_t struct semaphore
-#define mutex_init(s) init_MUTEX(s)
-#define mutex_init_locked(s) init_MUTEX_LOCKED(s)
-#define mutex_lock(s) down(s)
-#define mutex_unlock(s) up(s)
-
-#define io_splock(s) mutex_spinlock(s)
-#define io_spunlock(s,t) spin_unlock(s)
-
-#define spin_lock_destroy(s)
-
#if defined(DISABLE_ASSERT)
#define ASSERT(expr)
#define ASSERT_ALWAYS(expr)
@@ -122,33 +70,4 @@ mutex_spinlock(spinlock_t *sem) {
} } while(0)
#endif /* DISABLE_ASSERT */
-#define PRINT_PANIC panic
-
-/******************************************
- * Definitions that do not exist in linux *
- ******************************************/
-
-#define DELAY(a)
-
-/************************************************
- * Routines redefined to use linux equivalents. *
- ************************************************/
-
-/* #define FIXME(s) printk("FIXME: [ %s ] in %s at %s:%d\n", s, __FUNCTION__, __FILE__, __LINE__) */
-
-#define FIXME(s)
-
-/* move to stubs.c yet */
-#define dev_to_vhdl(dev) 0
-#define get_timestamp() 0
-#define us_delay(a)
-#define v_mapphys(a,b,c) 0 // printk("Fixme: v_mapphys - soft->base 0x%p\n", b);
-#define splhi() 0
-#define splx(s)
-
-extern void * snia_kmem_alloc_node(register size_t, register int, cnodeid_t);
-extern void * snia_kmem_zalloc(size_t, int);
-extern void * snia_kmem_zalloc_node(register size_t, register int, cnodeid_t );
-extern int is_specified(char *);
-
#endif /* _ASM_IA64_SN_SGI_H */
diff --git a/include/asm-ia64/sn/sn2/addrs.h b/include/asm-ia64/sn/sn2/addrs.h
index c415366196bf..b3f466fadc5f 100644
--- a/include/asm-ia64/sn/sn2/addrs.h
+++ b/include/asm-ia64/sn/sn2/addrs.h
@@ -1,5 +1,4 @@
/*
- *
* 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.
@@ -107,9 +106,9 @@ typedef union ia64_sn2_pa {
#define NASID_META_BITS 0 /* ???? */
#define NASID_LOCAL_BITS 7 /* same router as SN1 */
-#define NODE_ADDRSPACE_SIZE (UINT64_CAST 1 << NODE_SIZE_BITS)
-#define NASID_MASK (UINT64_CAST NASID_BITMASK << NASID_SHFT)
-#define NASID_GET(_pa) (int) ((UINT64_CAST (_pa) >> \
+#define NODE_ADDRSPACE_SIZE (1UL << NODE_SIZE_BITS)
+#define NASID_MASK ((uint64_t) NASID_BITMASK << NASID_SHFT)
+#define NASID_GET(_pa) (int) (((uint64_t) (_pa) >> \
NASID_SHFT) & NASID_BITMASK)
#define PHYS_TO_DMA(x) ( ((x & NASID_MASK) >> 2) | \
(x & (NODE_ADDRSPACE_SIZE - 1)) )
@@ -130,9 +129,9 @@ typedef union ia64_sn2_pa {
: RAW_NODE_SWIN_BASE(nasid, widget))
#else
#define NODE_SWIN_BASE(nasid, widget) \
- (NODE_IO_BASE(nasid) + (UINT64_CAST (widget) << SWIN_SIZE_BITS))
+ (NODE_IO_BASE(nasid) + ((uint64_t) (widget) << SWIN_SIZE_BITS))
#define LOCAL_SWIN_BASE(widget) \
- (UNCACHED | LOCAL_MMR_SPACE | ((UINT64_CAST (widget) << SWIN_SIZE_BITS)))
+ (UNCACHED | LOCAL_MMR_SPACE | (((uint64_t) (widget) << SWIN_SIZE_BITS)))
#endif /* __ASSEMBLY__ */
/*
@@ -142,12 +141,12 @@ typedef union ia64_sn2_pa {
*/
#define BWIN_INDEX_BITS 3
-#define BWIN_SIZE (UINT64_CAST 1 << BWIN_SIZE_BITS)
+#define BWIN_SIZE (1UL << BWIN_SIZE_BITS)
#define BWIN_SIZEMASK (BWIN_SIZE - 1)
#define BWIN_WIDGET_MASK 0x7
#define NODE_BWIN_BASE0(nasid) (NODE_IO_BASE(nasid) + BWIN_SIZE)
#define NODE_BWIN_BASE(nasid, bigwin) (NODE_BWIN_BASE0(nasid) + \
- (UINT64_CAST (bigwin) << BWIN_SIZE_BITS))
+ ((uint64_t) (bigwin) << BWIN_SIZE_BITS))
#define BWIN_WIDGETADDR(addr) ((addr) & BWIN_SIZEMASK)
#define BWIN_WINDOWNUM(addr) (((addr) >> BWIN_SIZE_BITS) & BWIN_WIDGET_MASK)
diff --git a/include/asm-ia64/sn/sn2/geo.h b/include/asm-ia64/sn/sn2/geo.h
index d182fad56a0a..599979c98478 100644
--- a/include/asm-ia64/sn/sn2/geo.h
+++ b/include/asm-ia64/sn/sn2/geo.h
@@ -6,8 +6,8 @@
* Copyright (C) 1992 - 1997, 2000-2003 Silicon Graphics, Inc. All rights reserved.
*/
-#ifndef __SYS_SN_SN2_GEO_H__
-#define __SYS_SN_SN2_GEO_H__
+#ifndef _ASM_IA64_SN_SN2_GEO_H
+#define _ASM_IA64_SN_SN2_GEO_H
/* Headers required by declarations in this file */
@@ -105,4 +105,4 @@ typedef union geoid_u {
#define GEO_INVALID_STR "<invalid>"
-#endif /* __SYS_SN_SN2_GEO_H__ */
+#endif /* _ASM_IA64_SN_SN2_GEO_H */
diff --git a/include/asm-ia64/sn/sn2/shub_md.h b/include/asm-ia64/sn/sn2/shub_md.h
index 2c4a7dc3b4f2..15b101446828 100644
--- a/include/asm-ia64/sn/sn2/shub_md.h
+++ b/include/asm-ia64/sn/sn2/shub_md.h
@@ -1,5 +1,4 @@
/*
- *
* 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.
@@ -8,8 +7,8 @@
*/
-#ifndef _SHUB_MD_H
-#define _SHUB_MD_H
+#ifndef _ASM_IA64_SN_SN2_SHUB_MD_H
+#define _ASM_IA64_SN_SN2_SHUB_MD_H
/* SN2 supports a mostly-flat address space with 4 CPU-visible, evenly spaced,
contiguous regions, or "software banks". On SN2, software bank n begins at
@@ -273,4 +272,4 @@
#define MD_BIST_MISCOMPARE(_n) (REMOTE_HUB_L(_n, SH_MMRBIST_ERR) & \
SH_MMRBIST_ERR_DETECTED_MASK)
-#endif /* _SHUB_MD_H */
+#endif /* _ASM_IA64_SN_SN2_SHUB_MD_H */
diff --git a/include/asm-ia64/sn/xtalk/xbow.h b/include/asm-ia64/sn/xtalk/xbow.h
index 679ad11aac83..596e17caaf29 100644
--- a/include/asm-ia64/sn/xtalk/xbow.h
+++ b/include/asm-ia64/sn/xtalk/xbow.h
@@ -5,8 +5,8 @@
*
* Copyright (C) 1992-1997,2000-2003 Silicon Graphics, Inc. All Rights Reserved.
*/
-#ifndef _ASM_SN_SN_XTALK_XBOW_H
-#define _ASM_SN_SN_XTALK_XBOW_H
+#ifndef _ASM_IA64_SN_XTALK_XBOW_H
+#define _ASM_IA64_SN_XTALK_XBOW_H
/*
* xbow.h - header file for crossbow chip and xbow section of xbridge
@@ -689,4 +689,4 @@ struct macrofield_s xbow_macrofield[] =
#endif /* MACROFIELD_LINE */
#endif /* __ASSEMBLY__ */
-#endif /* _ASM_SN_SN_XTALK_XBOW_H */
+#endif /* _ASM_IA64_SN_XTALK_XBOW_H */
diff --git a/include/asm-ia64/sn/xtalk/xbow_info.h b/include/asm-ia64/sn/xtalk/xbow_info.h
index 69130866d135..88aecc391007 100644
--- a/include/asm-ia64/sn/xtalk/xbow_info.h
+++ b/include/asm-ia64/sn/xtalk/xbow_info.h
@@ -5,8 +5,8 @@
*
* Copyright (C) 1992-1997,2000-2003 Silicon Graphics, Inc. All Rights Reserved.
*/
-#ifndef _ASM_SN_XTALK_XBOW_INFO_H
-#define _ASM_SN_XTALK_XBOW_INFO_H
+#ifndef _ASM_IA64_SN_XTALK_XBOW_INFO_H
+#define _ASM_IA64_SN_XTALK_XBOW_INFO_H
#include <linux/types.h>
diff --git a/include/asm-ia64/sn/xtalk/xswitch.h b/include/asm-ia64/sn/xtalk/xswitch.h
index c84e7e83dfb6..ce95afc24372 100644
--- a/include/asm-ia64/sn/xtalk/xswitch.h
+++ b/include/asm-ia64/sn/xtalk/xswitch.h
@@ -5,8 +5,8 @@
*
* Copyright (C) 1992-1997,2000-2003 Silicon Graphics, Inc. All Rights Reserved.
*/
-#ifndef _ASM_SN_XTALK_XSWITCH_H
-#define _ASM_SN_XTALK_XSWITCH_H
+#ifndef _ASM_IA64_SN_XTALK_XSWITCH_H
+#define _ASM_IA64_SN_XTALK_XSWITCH_H
/*
* xswitch.h - controls the format of the data
@@ -53,4 +53,4 @@ extern vertex_hdl_t xswitch_info_master_assignment_get(xswitch_info_t xswitc
#endif /* __ASSEMBLY__ */
-#endif /* _ASM_SN_XTALK_XSWITCH_H */
+#endif /* _ASM_IA64_SN_XTALK_XSWITCH_H */
diff --git a/include/asm-ia64/sn/xtalk/xtalk.h b/include/asm-ia64/sn/xtalk/xtalk.h
index 55ca3c3a3d6c..19dea8872e8f 100644
--- a/include/asm-ia64/sn/xtalk/xtalk.h
+++ b/include/asm-ia64/sn/xtalk/xtalk.h
@@ -5,11 +5,13 @@
*
* Copyright (C) 1992-1997, 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
*/
-#ifndef _ASM_SN_XTALK_XTALK_H
-#define _ASM_SN_XTALK_XTALK_H
+#ifndef _ASM_IA64_SN_XTALK_XTALK_H
+#define _ASM_IA64_SN_XTALK_XTALK_H
#include <linux/config.h>
+#ifdef __KERNEL__
#include "asm/sn/sgi.h"
+#endif
/*
@@ -18,7 +20,7 @@
/*
* User-level device driver visible types
*/
-typedef int xwidgetnum_t; /* xtalk widget number (0..15) */
+typedef char xwidgetnum_t; /* xtalk widget number (0..15) */
#define XWIDGET_NONE (-1)
@@ -396,4 +398,4 @@ typedef void xtalk_iter_f(vertex_hdl_t vhdl);
extern void xtalk_iterate(char *prefix, xtalk_iter_f *func);
#endif /* __KERNEL__ */
-#endif /* _ASM_SN_XTALK_XTALK_H */
+#endif /* _ASM_IA64_SN_XTALK_XTALK_H */
diff --git a/include/asm-ia64/sn/xtalk/xtalk_private.h b/include/asm-ia64/sn/xtalk/xtalk_private.h
index 30593fe9a1b4..34224e3bff2c 100644
--- a/include/asm-ia64/sn/xtalk/xtalk_private.h
+++ b/include/asm-ia64/sn/xtalk/xtalk_private.h
@@ -5,8 +5,8 @@
*
* Copyright (C) 1992-1997, 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
*/
-#ifndef _ASM_SN_XTALK_XTALK_PRIVATE_H
-#define _ASM_SN_XTALK_XTALK_PRIVATE_H
+#ifndef _ASM_IA64_SN_XTALK_XTALK_PRIVATE_H
+#define _ASM_IA64_SN_XTALK_XTALK_PRIVATE_H
#include <asm/sn/ioerror.h> /* for error function and arg types */
#include <asm/sn/xtalk/xwidget.h>
@@ -82,4 +82,4 @@ struct xwidget_info_s {
extern char widget_info_fingerprint[];
-#endif /* _ASM_SN_XTALK_XTALK_PRIVATE_H */
+#endif /* _ASM_IA64_SN_XTALK_XTALK_PRIVATE_H */
diff --git a/include/asm-ia64/sn/xtalk/xtalkaddrs.h b/include/asm-ia64/sn/xtalk/xtalkaddrs.h
index 4b7b9fb0a15f..afedfc0f3e6b 100644
--- a/include/asm-ia64/sn/xtalk/xtalkaddrs.h
+++ b/include/asm-ia64/sn/xtalk/xtalkaddrs.h
@@ -5,8 +5,8 @@
*
* Copyright (C) 1992-1997,2000-2003 Silicon Graphics, Inc. All Rights Reserved.
*/
-#ifndef _ASM_SN_XTALK_XTALKADDRS_H
-#define _ASM_SN_XTALK_XTALKADDRS_H
+#ifndef _ASM_IA64_SN_XTALK_XTALKADDRS_H
+#define _ASM_IA64_SN_XTALK_XTALKADDRS_H
/*
@@ -103,4 +103,4 @@
(widgetreg_t)(*(volatile uint32_t *)(NODE_SWIN_BASE(nasid, widget) + WIDGET_ID))
-#endif /* _ASM_SN_XTALK_XTALKADDRS_H */
+#endif /* _ASM_IA64_SN_XTALK_XTALKADDRS_H */
diff --git a/include/asm-ia64/sn/xtalk/xwidget.h b/include/asm-ia64/sn/xtalk/xwidget.h
index a1e606d76e10..28e453fc52af 100644
--- a/include/asm-ia64/sn/xtalk/xwidget.h
+++ b/include/asm-ia64/sn/xtalk/xwidget.h
@@ -5,17 +5,21 @@
*
* Copyright (C) 1992-1997,2000-2003 Silicon Graphics, Inc. All Rights Reserved.
*/
-#ifndef __ASM_SN_XTALK_XWIDGET_H__
-#define __ASM_SN_XTALK_XWIDGET_H__
+#ifndef _ASM_IA64_SN_XTALK_XWIDGET_H
+#define _ASM_IA64_SN_XTALK_XWIDGET_H
/*
* xwidget.h - generic crosstalk widget header file
*/
+#ifdef __KERNEL__
#include <asm/sn/xtalk/xtalk.h>
#ifndef __ASSEMBLY__
#include <asm/sn/cdl.h>
#endif /* __ASSEMBLY__ */
+#else
+#include <xtalk/xtalk.h>
+#endif
#define WIDGET_ID 0x00
#define WIDGET_STATUS 0x08
@@ -233,4 +237,4 @@ typedef struct v_widget_s {
#endif /* __ASSEMBLY__ */
-#endif /* __ASM_SN_XTALK_XWIDGET_H__ */
+#endif /* _ASM_IA64_SN_XTALK_XWIDGET_H */