aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-ia64
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-ia64')
-rw-r--r--include/asm-ia64/acpi.h2
-rw-r--r--include/asm-ia64/atomic.h2
-rw-r--r--include/asm-ia64/bug.h6
-rw-r--r--include/asm-ia64/cache.h2
-rw-r--r--include/asm-ia64/compat.h2
-rw-r--r--include/asm-ia64/futex.h49
-rw-r--r--include/asm-ia64/ide.h8
-rw-r--r--include/asm-ia64/io.h1
-rw-r--r--include/asm-ia64/ioctl.h78
-rw-r--r--include/asm-ia64/kprobes.h20
-rw-r--r--include/asm-ia64/machvec_sn2.h7
-rw-r--r--include/asm-ia64/mman.h28
-rw-r--r--include/asm-ia64/mutex.h9
-rw-r--r--include/asm-ia64/pal.h2
-rw-r--r--include/asm-ia64/processor.h23
-rw-r--r--include/asm-ia64/ptrace.h4
-rw-r--r--include/asm-ia64/sal.h10
-rw-r--r--include/asm-ia64/semaphore.h8
-rw-r--r--include/asm-ia64/sn/arch.h5
-rw-r--r--include/asm-ia64/sn/bte.h29
-rw-r--r--include/asm-ia64/sn/intr.h40
-rw-r--r--include/asm-ia64/sn/ioc3.h241
-rw-r--r--include/asm-ia64/sn/pcibr_provider.h62
-rw-r--r--include/asm-ia64/sn/pcibus_provider_defs.h14
-rw-r--r--include/asm-ia64/sn/pcidev.h4
-rw-r--r--include/asm-ia64/sn/pic.h204
-rw-r--r--include/asm-ia64/sn/shubio.h1620
-rw-r--r--include/asm-ia64/sn/sn_feature_sets.h17
-rw-r--r--include/asm-ia64/sn/sn_sal.h17
-rw-r--r--include/asm-ia64/sn/tioca.h82
-rw-r--r--include/asm-ia64/sn/tioca_provider.h56
-rw-r--r--include/asm-ia64/sn/tioce.h662
-rw-r--r--include/asm-ia64/sn/tioce_provider.h30
-rw-r--r--include/asm-ia64/sn/tiocp.h254
-rw-r--r--include/asm-ia64/sn/tiocx.h14
-rw-r--r--include/asm-ia64/sn/xp.h7
-rw-r--r--include/asm-ia64/sn/xpc.h1280
-rw-r--r--include/asm-ia64/spinlock.h2
-rw-r--r--include/asm-ia64/system.h34
-rw-r--r--include/asm-ia64/thread_info.h13
-rw-r--r--include/asm-ia64/timex.h2
-rw-r--r--include/asm-ia64/topology.h13
-rw-r--r--include/asm-ia64/unistd.h20
43 files changed, 3185 insertions, 1798 deletions
diff --git a/include/asm-ia64/acpi.h b/include/asm-ia64/acpi.h
index 3a544ffc5008..f7a517654308 100644
--- a/include/asm-ia64/acpi.h
+++ b/include/asm-ia64/acpi.h
@@ -106,6 +106,8 @@ extern unsigned int can_cpei_retarget(void);
106extern unsigned int is_cpu_cpei_target(unsigned int cpu); 106extern unsigned int is_cpu_cpei_target(unsigned int cpu);
107extern void set_cpei_target_cpu(unsigned int cpu); 107extern void set_cpei_target_cpu(unsigned int cpu);
108extern unsigned int get_cpei_target_cpu(void); 108extern unsigned int get_cpei_target_cpu(void);
109extern void prefill_possible_map(void);
110extern int additional_cpus;
109 111
110#ifdef CONFIG_ACPI_NUMA 112#ifdef CONFIG_ACPI_NUMA
111/* Proximity bitmap length; _PXM is at most 255 (8 bit)*/ 113/* Proximity bitmap length; _PXM is at most 255 (8 bit)*/
diff --git a/include/asm-ia64/atomic.h b/include/asm-ia64/atomic.h
index 2fbebf85c31d..d3e0dfa99e1f 100644
--- a/include/asm-ia64/atomic.h
+++ b/include/asm-ia64/atomic.h
@@ -89,6 +89,7 @@ ia64_atomic64_sub (__s64 i, atomic64_t *v)
89} 89}
90 90
91#define atomic_cmpxchg(v, old, new) ((int)cmpxchg(&((v)->counter), old, new)) 91#define atomic_cmpxchg(v, old, new) ((int)cmpxchg(&((v)->counter), old, new))
92#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
92 93
93#define atomic_add_unless(v, a, u) \ 94#define atomic_add_unless(v, a, u) \
94({ \ 95({ \
@@ -192,4 +193,5 @@ atomic64_add_negative (__s64 i, atomic64_t *v)
192#define smp_mb__before_atomic_inc() barrier() 193#define smp_mb__before_atomic_inc() barrier()
193#define smp_mb__after_atomic_inc() barrier() 194#define smp_mb__after_atomic_inc() barrier()
194 195
196#include <asm-generic/atomic.h>
195#endif /* _ASM_IA64_ATOMIC_H */ 197#endif /* _ASM_IA64_ATOMIC_H */
diff --git a/include/asm-ia64/bug.h b/include/asm-ia64/bug.h
index 3aa0a0a5474b..823616b5020b 100644
--- a/include/asm-ia64/bug.h
+++ b/include/asm-ia64/bug.h
@@ -2,11 +2,7 @@
2#define _ASM_IA64_BUG_H 2#define _ASM_IA64_BUG_H
3 3
4#ifdef CONFIG_BUG 4#ifdef CONFIG_BUG
5#if (__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) 5#define ia64_abort() __builtin_trap()
6# define ia64_abort() __builtin_trap()
7#else
8# define ia64_abort() (*(volatile int *) 0 = 0)
9#endif
10#define BUG() do { printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); ia64_abort(); } while (0) 6#define BUG() do { printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); ia64_abort(); } while (0)
11 7
12/* should this BUG be made generic? */ 8/* should this BUG be made generic? */
diff --git a/include/asm-ia64/cache.h b/include/asm-ia64/cache.h
index 666d8f175cb3..40dd25195d65 100644
--- a/include/asm-ia64/cache.h
+++ b/include/asm-ia64/cache.h
@@ -12,8 +12,6 @@
12#define L1_CACHE_SHIFT CONFIG_IA64_L1_CACHE_SHIFT 12#define L1_CACHE_SHIFT CONFIG_IA64_L1_CACHE_SHIFT
13#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) 13#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
14 14
15#define L1_CACHE_SHIFT_MAX 7 /* largest L1 which this arch supports */
16
17#ifdef CONFIG_SMP 15#ifdef CONFIG_SMP
18# define SMP_CACHE_SHIFT L1_CACHE_SHIFT 16# define SMP_CACHE_SHIFT L1_CACHE_SHIFT
19# define SMP_CACHE_BYTES L1_CACHE_BYTES 17# define SMP_CACHE_BYTES L1_CACHE_BYTES
diff --git a/include/asm-ia64/compat.h b/include/asm-ia64/compat.h
index aaf11f4e9169..c0b19106665c 100644
--- a/include/asm-ia64/compat.h
+++ b/include/asm-ia64/compat.h
@@ -192,7 +192,7 @@ compat_ptr (compat_uptr_t uptr)
192static __inline__ void __user * 192static __inline__ void __user *
193compat_alloc_user_space (long len) 193compat_alloc_user_space (long len)
194{ 194{
195 struct pt_regs *regs = ia64_task_regs(current); 195 struct pt_regs *regs = task_pt_regs(current);
196 return (void __user *) (((regs->r12 & 0xffffffff) & -16) - len); 196 return (void __user *) (((regs->r12 & 0xffffffff) & -16) - len);
197} 197}
198 198
diff --git a/include/asm-ia64/futex.h b/include/asm-ia64/futex.h
index 9feff4ce1424..6a332a9f099c 100644
--- a/include/asm-ia64/futex.h
+++ b/include/asm-ia64/futex.h
@@ -1,53 +1,6 @@
1#ifndef _ASM_FUTEX_H 1#ifndef _ASM_FUTEX_H
2#define _ASM_FUTEX_H 2#define _ASM_FUTEX_H
3 3
4#ifdef __KERNEL__ 4#include <asm-generic/futex.h>
5 5
6#include <linux/futex.h>
7#include <asm/errno.h>
8#include <asm/uaccess.h>
9
10static inline int
11futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
12{
13 int op = (encoded_op >> 28) & 7;
14 int cmp = (encoded_op >> 24) & 15;
15 int oparg = (encoded_op << 8) >> 20;
16 int cmparg = (encoded_op << 20) >> 20;
17 int oldval = 0, ret;
18 if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28))
19 oparg = 1 << oparg;
20
21 if (! access_ok (VERIFY_WRITE, uaddr, sizeof(int)))
22 return -EFAULT;
23
24 inc_preempt_count();
25
26 switch (op) {
27 case FUTEX_OP_SET:
28 case FUTEX_OP_ADD:
29 case FUTEX_OP_OR:
30 case FUTEX_OP_ANDN:
31 case FUTEX_OP_XOR:
32 default:
33 ret = -ENOSYS;
34 }
35
36 dec_preempt_count();
37
38 if (!ret) {
39 switch (cmp) {
40 case FUTEX_OP_CMP_EQ: ret = (oldval == cmparg); break;
41 case FUTEX_OP_CMP_NE: ret = (oldval != cmparg); break;
42 case FUTEX_OP_CMP_LT: ret = (oldval < cmparg); break;
43 case FUTEX_OP_CMP_GE: ret = (oldval >= cmparg); break;
44 case FUTEX_OP_CMP_LE: ret = (oldval <= cmparg); break;
45 case FUTEX_OP_CMP_GT: ret = (oldval > cmparg); break;
46 default: ret = -ENOSYS;
47 }
48 }
49 return ret;
50}
51
52#endif
53#endif 6#endif
diff --git a/include/asm-ia64/ide.h b/include/asm-ia64/ide.h
index e62b95301d51..93f45c5f189f 100644
--- a/include/asm-ia64/ide.h
+++ b/include/asm-ia64/ide.h
@@ -17,14 +17,6 @@
17 17
18#include <linux/irq.h> 18#include <linux/irq.h>
19 19
20#ifndef MAX_HWIFS
21# ifdef CONFIG_PCI
22#define MAX_HWIFS 10
23# else
24#define MAX_HWIFS 6
25# endif
26#endif
27
28#define IDE_ARCH_OBSOLETE_DEFAULTS 20#define IDE_ARCH_OBSOLETE_DEFAULTS
29 21
30static inline int ide_default_irq(unsigned long base) 22static inline int ide_default_irq(unsigned long base)
diff --git a/include/asm-ia64/io.h b/include/asm-ia64/io.h
index cf772a67f858..b64fdb985494 100644
--- a/include/asm-ia64/io.h
+++ b/include/asm-ia64/io.h
@@ -89,6 +89,7 @@ phys_to_virt (unsigned long address)
89 89
90#define ARCH_HAS_VALID_PHYS_ADDR_RANGE 90#define ARCH_HAS_VALID_PHYS_ADDR_RANGE
91extern int valid_phys_addr_range (unsigned long addr, size_t *count); /* efi.c */ 91extern int valid_phys_addr_range (unsigned long addr, size_t *count); /* efi.c */
92extern int valid_mmap_phys_addr_range (unsigned long addr, size_t *count);
92 93
93/* 94/*
94 * The following two macros are deprecated and scheduled for removal. 95 * The following two macros are deprecated and scheduled for removal.
diff --git a/include/asm-ia64/ioctl.h b/include/asm-ia64/ioctl.h
index be9cc2403d2a..b279fe06dfe5 100644
--- a/include/asm-ia64/ioctl.h
+++ b/include/asm-ia64/ioctl.h
@@ -1,77 +1 @@
1#ifndef _ASM_IA64_IOCTL_H #include <asm-generic/ioctl.h>
2#define _ASM_IA64_IOCTL_H
3
4/*
5 * Based on <asm-i386/ioctl.h>.
6 *
7 * Modified 1998, 1999
8 * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co
9 */
10
11/* ioctl command encoding: 32 bits total, command in lower 16 bits,
12 * size of the parameter structure in the lower 14 bits of the
13 * upper 16 bits.
14 * Encoding the size of the parameter structure in the ioctl request
15 * is useful for catching programs compiled with old versions
16 * and to avoid overwriting user space outside the user buffer area.
17 * The highest 2 bits are reserved for indicating the ``access mode''.
18 * NOTE: This limits the max parameter size to 16kB -1 !
19 */
20
21/*
22 * The following is for compatibility across the various Linux
23 * platforms. The ia64 ioctl numbering scheme doesn't really enforce
24 * a type field. De facto, however, the top 8 bits of the lower 16
25 * bits are indeed used as a type field, so we might just as well make
26 * this explicit here. Please be sure to use the decoding macros
27 * below from now on.
28 */
29#define _IOC_NRBITS 8
30#define _IOC_TYPEBITS 8
31#define _IOC_SIZEBITS 14
32#define _IOC_DIRBITS 2
33
34#define _IOC_NRMASK ((1 << _IOC_NRBITS)-1)
35#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS)-1)
36#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS)-1)
37#define _IOC_DIRMASK ((1 << _IOC_DIRBITS)-1)
38
39#define _IOC_NRSHIFT 0
40#define _IOC_TYPESHIFT (_IOC_NRSHIFT+_IOC_NRBITS)
41#define _IOC_SIZESHIFT (_IOC_TYPESHIFT+_IOC_TYPEBITS)
42#define _IOC_DIRSHIFT (_IOC_SIZESHIFT+_IOC_SIZEBITS)
43
44/*
45 * Direction bits.
46 */
47#define _IOC_NONE 0U
48#define _IOC_WRITE 1U
49#define _IOC_READ 2U
50
51#define _IOC(dir,type,nr,size) \
52 (((dir) << _IOC_DIRSHIFT) | \
53 ((type) << _IOC_TYPESHIFT) | \
54 ((nr) << _IOC_NRSHIFT) | \
55 ((size) << _IOC_SIZESHIFT))
56
57/* used to create numbers */
58#define _IO(type,nr) _IOC(_IOC_NONE,(type),(nr),0)
59#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size))
60#define _IOW(type,nr,size) _IOC(_IOC_WRITE,(type),(nr),sizeof(size))
61#define _IOWR(type,nr,size) _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size))
62
63/* used to decode ioctl numbers.. */
64#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK)
65#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK)
66#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK)
67#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK)
68
69/* ...and for the drivers/sound files... */
70
71#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT)
72#define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT)
73#define IOC_INOUT ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT)
74#define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT)
75#define IOCSIZE_SHIFT (_IOC_SIZESHIFT)
76
77#endif /* _ASM_IA64_IOCTL_H */
diff --git a/include/asm-ia64/kprobes.h b/include/asm-ia64/kprobes.h
index 592abb000e29..8c0fc227f0fb 100644
--- a/include/asm-ia64/kprobes.h
+++ b/include/asm-ia64/kprobes.h
@@ -68,10 +68,14 @@ struct prev_kprobe {
68 unsigned long status; 68 unsigned long status;
69}; 69};
70 70
71#define MAX_PARAM_RSE_SIZE (0x60+0x60/0x3f)
71/* per-cpu kprobe control block */ 72/* per-cpu kprobe control block */
72struct kprobe_ctlblk { 73struct kprobe_ctlblk {
73 unsigned long kprobe_status; 74 unsigned long kprobe_status;
74 struct pt_regs jprobe_saved_regs; 75 struct pt_regs jprobe_saved_regs;
76 unsigned long jprobes_saved_stacked_regs[MAX_PARAM_RSE_SIZE];
77 unsigned long *bsp;
78 unsigned long cfm;
75 struct prev_kprobe prev_kprobe; 79 struct prev_kprobe prev_kprobe;
76}; 80};
77 81
@@ -89,6 +93,7 @@ struct kprobe_ctlblk {
89#define IP_RELATIVE_PREDICT_OPCODE (7) 93#define IP_RELATIVE_PREDICT_OPCODE (7)
90#define LONG_BRANCH_OPCODE (0xC) 94#define LONG_BRANCH_OPCODE (0xC)
91#define LONG_CALL_OPCODE (0xD) 95#define LONG_CALL_OPCODE (0xD)
96#define arch_remove_kprobe(p) do {} while (0)
92 97
93typedef struct kprobe_opcode { 98typedef struct kprobe_opcode {
94 bundle_t bundle; 99 bundle_t bundle;
@@ -110,12 +115,6 @@ struct arch_specific_insn {
110 unsigned short target_br_reg; 115 unsigned short target_br_reg;
111}; 116};
112 117
113/* ia64 does not need this */
114static inline void arch_copy_kprobe(struct kprobe *p)
115{
116}
117
118#ifdef CONFIG_KPROBES
119extern int kprobe_exceptions_notify(struct notifier_block *self, 118extern int kprobe_exceptions_notify(struct notifier_block *self,
120 unsigned long val, void *data); 119 unsigned long val, void *data);
121 120
@@ -123,12 +122,7 @@ extern int kprobe_exceptions_notify(struct notifier_block *self,
123static inline void jprobe_return(void) 122static inline void jprobe_return(void)
124{ 123{
125} 124}
125extern void invalidate_stacked_regs(void);
126extern void flush_register_stack(void);
126 127
127#else /* !CONFIG_KPROBES */
128static inline int kprobe_exceptions_notify(struct notifier_block *self,
129 unsigned long val, void *data)
130{
131 return 0;
132}
133#endif
134#endif /* _ASM_KPROBES_H */ 128#endif /* _ASM_KPROBES_H */
diff --git a/include/asm-ia64/machvec_sn2.h b/include/asm-ia64/machvec_sn2.h
index e1b6cd63f49e..03d00faf03b5 100644
--- a/include/asm-ia64/machvec_sn2.h
+++ b/include/asm-ia64/machvec_sn2.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2002-2003 Silicon Graphics, Inc. All Rights Reserved. 2 * Copyright (c) 2002-2003, 2006 Silicon Graphics, Inc. All Rights Reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify it 4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms of version 2 of the GNU General Public License 5 * under the terms of version 2 of the GNU General Public License
@@ -20,11 +20,6 @@
20 * License along with this program; if not, write the Free Software 20 * License along with this program; if not, write the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. 21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
22 * 22 *
23 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
24 * Mountain View, CA 94043, or:
25 *
26 * http://www.sgi.com
27 *
28 * For further information regarding this notice, see: 23 * For further information regarding this notice, see:
29 * 24 *
30 * http://oss.sgi.com/projects/GenInfo/NoticeExplan 25 * http://oss.sgi.com/projects/GenInfo/NoticeExplan
diff --git a/include/asm-ia64/mman.h b/include/asm-ia64/mman.h
index 1c0a73af1461..6ba179f12718 100644
--- a/include/asm-ia64/mman.h
+++ b/include/asm-ia64/mman.h
@@ -8,19 +8,7 @@
8 * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co 8 * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co
9 */ 9 */
10 10
11#define PROT_READ 0x1 /* page can be read */ 11#include <asm-generic/mman.h>
12#define PROT_WRITE 0x2 /* page can be written */
13#define PROT_EXEC 0x4 /* page can be executed */
14#define PROT_SEM 0x8 /* page may be used for atomic ops */
15#define PROT_NONE 0x0 /* page can not be accessed */
16#define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */
17#define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */
18
19#define MAP_SHARED 0x01 /* Share changes */
20#define MAP_PRIVATE 0x02 /* Changes are private */
21#define MAP_TYPE 0x0f /* Mask for type of mapping */
22#define MAP_FIXED 0x10 /* Interpret addr exactly */
23#define MAP_ANONYMOUS 0x20 /* don't use a file */
24 12
25#define MAP_GROWSDOWN 0x00100 /* stack-like segment */ 13#define MAP_GROWSDOWN 0x00100 /* stack-like segment */
26#define MAP_GROWSUP 0x00200 /* register stack-like segment */ 14#define MAP_GROWSUP 0x00200 /* register stack-like segment */
@@ -31,21 +19,7 @@
31#define MAP_POPULATE 0x08000 /* populate (prefault) pagetables */ 19#define MAP_POPULATE 0x08000 /* populate (prefault) pagetables */
32#define MAP_NONBLOCK 0x10000 /* do not block on IO */ 20#define MAP_NONBLOCK 0x10000 /* do not block on IO */
33 21
34#define MS_ASYNC 1 /* sync memory asynchronously */
35#define MS_INVALIDATE 2 /* invalidate the caches */
36#define MS_SYNC 4 /* synchronous memory sync */
37
38#define MCL_CURRENT 1 /* lock all current mappings */ 22#define MCL_CURRENT 1 /* lock all current mappings */
39#define MCL_FUTURE 2 /* lock all future mappings */ 23#define MCL_FUTURE 2 /* lock all future mappings */
40 24
41#define MADV_NORMAL 0x0 /* default page-in behavior */
42#define MADV_RANDOM 0x1 /* page-in minimum required */
43#define MADV_SEQUENTIAL 0x2 /* read-ahead aggressively */
44#define MADV_WILLNEED 0x3 /* pre-fault pages */
45#define MADV_DONTNEED 0x4 /* discard these pages */
46
47/* compatibility flags */
48#define MAP_ANON MAP_ANONYMOUS
49#define MAP_FILE 0
50
51#endif /* _ASM_IA64_MMAN_H */ 25#endif /* _ASM_IA64_MMAN_H */
diff --git a/include/asm-ia64/mutex.h b/include/asm-ia64/mutex.h
new file mode 100644
index 000000000000..458c1f7fbc18
--- /dev/null
+++ b/include/asm-ia64/mutex.h
@@ -0,0 +1,9 @@
1/*
2 * Pull in the generic implementation for the mutex fastpath.
3 *
4 * TODO: implement optimized primitives instead, or leave the generic
5 * implementation in place, or pick the atomic_xchg() based generic
6 * implementation. (see asm-generic/mutex-xchg.h for details)
7 */
8
9#include <asm-generic/mutex-dec.h>
diff --git a/include/asm-ia64/pal.h b/include/asm-ia64/pal.h
index e828377ad295..7708ec669a33 100644
--- a/include/asm-ia64/pal.h
+++ b/include/asm-ia64/pal.h
@@ -927,7 +927,7 @@ static inline s64
927ia64_pal_cache_flush (u64 cache_type, u64 invalidate, u64 *progress, u64 *vector) 927ia64_pal_cache_flush (u64 cache_type, u64 invalidate, u64 *progress, u64 *vector)
928{ 928{
929 struct ia64_pal_retval iprv; 929 struct ia64_pal_retval iprv;
930 PAL_CALL_IC_OFF(iprv, PAL_CACHE_FLUSH, cache_type, invalidate, *progress); 930 PAL_CALL(iprv, PAL_CACHE_FLUSH, cache_type, invalidate, *progress);
931 if (vector) 931 if (vector)
932 *vector = iprv.v0; 932 *vector = iprv.v0;
933 *progress = iprv.v1; 933 *progress = iprv.v1;
diff --git a/include/asm-ia64/processor.h b/include/asm-ia64/processor.h
index 94e07e727395..23c8e1be1911 100644
--- a/include/asm-ia64/processor.h
+++ b/include/asm-ia64/processor.h
@@ -25,8 +25,8 @@
25 * Limits for PMC and PMD are set to less than maximum architected values 25 * Limits for PMC and PMD are set to less than maximum architected values
26 * but should be sufficient for a while 26 * but should be sufficient for a while
27 */ 27 */
28#define IA64_NUM_PMC_REGS 32 28#define IA64_NUM_PMC_REGS 64
29#define IA64_NUM_PMD_REGS 32 29#define IA64_NUM_PMD_REGS 64
30 30
31#define DEFAULT_MAP_BASE __IA64_UL_CONST(0x2000000000000000) 31#define DEFAULT_MAP_BASE __IA64_UL_CONST(0x2000000000000000)
32#define DEFAULT_TASK_SIZE __IA64_UL_CONST(0xa000000000000000) 32#define DEFAULT_TASK_SIZE __IA64_UL_CONST(0xa000000000000000)
@@ -352,7 +352,7 @@ extern unsigned long get_wchan (struct task_struct *p);
352/* Return instruction pointer of blocked task TSK. */ 352/* Return instruction pointer of blocked task TSK. */
353#define KSTK_EIP(tsk) \ 353#define KSTK_EIP(tsk) \
354 ({ \ 354 ({ \
355 struct pt_regs *_regs = ia64_task_regs(tsk); \ 355 struct pt_regs *_regs = task_pt_regs(tsk); \
356 _regs->cr_iip + ia64_psr(_regs)->ri; \ 356 _regs->cr_iip + ia64_psr(_regs)->ri; \
357 }) 357 })
358 358
@@ -559,6 +559,23 @@ ia64_eoi (void)
559 559
560#define cpu_relax() ia64_hint(ia64_hint_pause) 560#define cpu_relax() ia64_hint(ia64_hint_pause)
561 561
562static inline int
563ia64_get_irr(unsigned int vector)
564{
565 unsigned int reg = vector / 64;
566 unsigned int bit = vector % 64;
567 u64 irr;
568
569 switch (reg) {
570 case 0: irr = ia64_getreg(_IA64_REG_CR_IRR0); break;
571 case 1: irr = ia64_getreg(_IA64_REG_CR_IRR1); break;
572 case 2: irr = ia64_getreg(_IA64_REG_CR_IRR2); break;
573 case 3: irr = ia64_getreg(_IA64_REG_CR_IRR3); break;
574 }
575
576 return test_bit(bit, &irr);
577}
578
562static inline void 579static inline void
563ia64_set_lrr0 (unsigned long val) 580ia64_set_lrr0 (unsigned long val)
564{ 581{
diff --git a/include/asm-ia64/ptrace.h b/include/asm-ia64/ptrace.h
index 2c703d6e0c86..9471cdc3f4c0 100644
--- a/include/asm-ia64/ptrace.h
+++ b/include/asm-ia64/ptrace.h
@@ -248,7 +248,7 @@ struct switch_stack {
248}) 248})
249 249
250 /* given a pointer to a task_struct, return the user's pt_regs */ 250 /* given a pointer to a task_struct, return the user's pt_regs */
251# define ia64_task_regs(t) (((struct pt_regs *) ((char *) (t) + IA64_STK_OFFSET)) - 1) 251# define task_pt_regs(t) (((struct pt_regs *) ((char *) (t) + IA64_STK_OFFSET)) - 1)
252# define ia64_psr(regs) ((struct ia64_psr *) &(regs)->cr_ipsr) 252# define ia64_psr(regs) ((struct ia64_psr *) &(regs)->cr_ipsr)
253# define user_mode(regs) (((struct ia64_psr *) &(regs)->cr_ipsr)->cpl != 0) 253# define user_mode(regs) (((struct ia64_psr *) &(regs)->cr_ipsr)->cpl != 0)
254# define user_stack(task,regs) ((long) regs - (long) task == IA64_STK_OFFSET - sizeof(*regs)) 254# define user_stack(task,regs) ((long) regs - (long) task == IA64_STK_OFFSET - sizeof(*regs))
@@ -271,7 +271,7 @@ struct switch_stack {
271 * 271 *
272 * On ia64, we can clear the user's pt_regs->r8 to force a successful syscall. 272 * On ia64, we can clear the user's pt_regs->r8 to force a successful syscall.
273 */ 273 */
274# define force_successful_syscall_return() (ia64_task_regs(current)->r8 = 0) 274# define force_successful_syscall_return() (task_pt_regs(current)->r8 = 0)
275 275
276 struct task_struct; /* forward decl */ 276 struct task_struct; /* forward decl */
277 struct unw_frame_info; /* forward decl */ 277 struct unw_frame_info; /* forward decl */
diff --git a/include/asm-ia64/sal.h b/include/asm-ia64/sal.h
index 313cad0628d0..0b210abbe003 100644
--- a/include/asm-ia64/sal.h
+++ b/include/asm-ia64/sal.h
@@ -658,15 +658,7 @@ ia64_sal_freq_base (unsigned long which, unsigned long *ticks_per_second,
658 return isrv.status; 658 return isrv.status;
659} 659}
660 660
661/* Flush all the processor and platform level instruction and/or data caches */ 661extern s64 ia64_sal_cache_flush (u64 cache_type);
662static inline s64
663ia64_sal_cache_flush (u64 cache_type)
664{
665 struct ia64_sal_retval isrv;
666 SAL_CALL(isrv, SAL_CACHE_FLUSH, cache_type, 0, 0, 0, 0, 0, 0);
667 return isrv.status;
668}
669
670 662
671/* Initialize all the processor and platform level instruction and data caches */ 663/* Initialize all the processor and platform level instruction and data caches */
672static inline s64 664static inline s64
diff --git a/include/asm-ia64/semaphore.h b/include/asm-ia64/semaphore.h
index bb8906285fab..f483eeb95dd1 100644
--- a/include/asm-ia64/semaphore.h
+++ b/include/asm-ia64/semaphore.h
@@ -61,7 +61,7 @@ static inline void
61down (struct semaphore *sem) 61down (struct semaphore *sem)
62{ 62{
63 might_sleep(); 63 might_sleep();
64 if (atomic_dec_return(&sem->count) < 0) 64 if (ia64_fetchadd(-1, &sem->count.counter, acq) < 1)
65 __down(sem); 65 __down(sem);
66} 66}
67 67
@@ -75,7 +75,7 @@ down_interruptible (struct semaphore * sem)
75 int ret = 0; 75 int ret = 0;
76 76
77 might_sleep(); 77 might_sleep();
78 if (atomic_dec_return(&sem->count) < 0) 78 if (ia64_fetchadd(-1, &sem->count.counter, acq) < 1)
79 ret = __down_interruptible(sem); 79 ret = __down_interruptible(sem);
80 return ret; 80 return ret;
81} 81}
@@ -85,7 +85,7 @@ down_trylock (struct semaphore *sem)
85{ 85{
86 int ret = 0; 86 int ret = 0;
87 87
88 if (atomic_dec_return(&sem->count) < 0) 88 if (ia64_fetchadd(-1, &sem->count.counter, acq) < 1)
89 ret = __down_trylock(sem); 89 ret = __down_trylock(sem);
90 return ret; 90 return ret;
91} 91}
@@ -93,7 +93,7 @@ down_trylock (struct semaphore *sem)
93static inline void 93static inline void
94up (struct semaphore * sem) 94up (struct semaphore * sem)
95{ 95{
96 if (atomic_inc_return(&sem->count) <= 0) 96 if (ia64_fetchadd(1, &sem->count.counter, rel) <= -1)
97 __up(sem); 97 __up(sem);
98} 98}
99 99
diff --git a/include/asm-ia64/sn/arch.h b/include/asm-ia64/sn/arch.h
index 1a3831c04af6..16adc93d7a72 100644
--- a/include/asm-ia64/sn/arch.h
+++ b/include/asm-ia64/sn/arch.h
@@ -31,7 +31,8 @@
31 * to ACPI3.0, this limit will be removed. The notion of "compact nodes" 31 * to ACPI3.0, this limit will be removed. The notion of "compact nodes"
32 * should be deleted and TIOs should be included in MAX_NUMNODES. 32 * should be deleted and TIOs should be included in MAX_NUMNODES.
33 */ 33 */
34#define MAX_COMPACT_NODES 512 34#define MAX_TIO_NODES MAX_NUMNODES
35#define MAX_COMPACT_NODES (MAX_NUMNODES + MAX_TIO_NODES)
35 36
36/* 37/*
37 * Maximum number of nodes in all partitions and in all coherency domains. 38 * Maximum number of nodes in all partitions and in all coherency domains.
@@ -70,7 +71,7 @@ DECLARE_PER_CPU(struct sn_hub_info_s, __sn_hub_info);
70 * Compact node ID to nasid mappings kept in the per-cpu data areas of each 71 * Compact node ID to nasid mappings kept in the per-cpu data areas of each
71 * cpu. 72 * cpu.
72 */ 73 */
73DECLARE_PER_CPU(short, __sn_cnodeid_to_nasid[MAX_NUMNODES]); 74DECLARE_PER_CPU(short, __sn_cnodeid_to_nasid[MAX_COMPACT_NODES]);
74#define sn_cnodeid_to_nasid (&__get_cpu_var(__sn_cnodeid_to_nasid[0])) 75#define sn_cnodeid_to_nasid (&__get_cpu_var(__sn_cnodeid_to_nasid[0]))
75 76
76 77
diff --git a/include/asm-ia64/sn/bte.h b/include/asm-ia64/sn/bte.h
index f50da3d91d07..5335d87ca5f8 100644
--- a/include/asm-ia64/sn/bte.h
+++ b/include/asm-ia64/sn/bte.h
@@ -3,7 +3,7 @@
3 * License. See the file "COPYING" in the main directory of this archive 3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details. 4 * for more details.
5 * 5 *
6 * Copyright (c) 2000-2005 Silicon Graphics, Inc. All Rights Reserved. 6 * Copyright (c) 2000-2006 Silicon Graphics, Inc. All Rights Reserved.
7 */ 7 */
8 8
9 9
@@ -46,7 +46,7 @@
46#define BTES_PER_NODE (is_shub2() ? 4 : 2) 46#define BTES_PER_NODE (is_shub2() ? 4 : 2)
47#define MAX_BTES_PER_NODE 4 47#define MAX_BTES_PER_NODE 4
48 48
49#define BTE2OFF_CTRL (0) 49#define BTE2OFF_CTRL 0
50#define BTE2OFF_SRC (SH2_BT_ENG_SRC_ADDR_0 - SH2_BT_ENG_CSR_0) 50#define BTE2OFF_SRC (SH2_BT_ENG_SRC_ADDR_0 - SH2_BT_ENG_CSR_0)
51#define BTE2OFF_DEST (SH2_BT_ENG_DEST_ADDR_0 - SH2_BT_ENG_CSR_0) 51#define BTE2OFF_DEST (SH2_BT_ENG_DEST_ADDR_0 - SH2_BT_ENG_CSR_0)
52#define BTE2OFF_NOTIFY (SH2_BT_ENG_NOTIF_ADDR_0 - SH2_BT_ENG_CSR_0) 52#define BTE2OFF_NOTIFY (SH2_BT_ENG_NOTIF_ADDR_0 - SH2_BT_ENG_CSR_0)
@@ -75,11 +75,11 @@
75 : base + (BTEOFF_NOTIFY/8)) 75 : base + (BTEOFF_NOTIFY/8))
76 76
77/* Define hardware modes */ 77/* Define hardware modes */
78#define BTE_NOTIFY (IBCT_NOTIFY) 78#define BTE_NOTIFY IBCT_NOTIFY
79#define BTE_NORMAL BTE_NOTIFY 79#define BTE_NORMAL BTE_NOTIFY
80#define BTE_ZERO_FILL (BTE_NOTIFY | IBCT_ZFIL_MODE) 80#define BTE_ZERO_FILL (BTE_NOTIFY | IBCT_ZFIL_MODE)
81/* Use a reserved bit to let the caller specify a wait for any BTE */ 81/* Use a reserved bit to let the caller specify a wait for any BTE */
82#define BTE_WACQUIRE (0x4000) 82#define BTE_WACQUIRE 0x4000
83/* Use the BTE on the node with the destination memory */ 83/* Use the BTE on the node with the destination memory */
84#define BTE_USE_DEST (BTE_WACQUIRE << 1) 84#define BTE_USE_DEST (BTE_WACQUIRE << 1)
85/* Use any available BTE interface on any node for the transfer */ 85/* Use any available BTE interface on any node for the transfer */
@@ -100,13 +100,28 @@
100#define BTE_LNSTAT_STORE(_bte, _x) \ 100#define BTE_LNSTAT_STORE(_bte, _x) \
101 HUB_S(_bte->bte_base_addr, (_x)) 101 HUB_S(_bte->bte_base_addr, (_x))
102#define BTE_SRC_STORE(_bte, _x) \ 102#define BTE_SRC_STORE(_bte, _x) \
103 HUB_S(_bte->bte_source_addr, (_x)) 103({ \
104 u64 __addr = ((_x) & ~AS_MASK); \
105 if (is_shub2()) \
106 __addr = SH2_TIO_PHYS_TO_DMA(__addr); \
107 HUB_S(_bte->bte_source_addr, __addr); \
108})
104#define BTE_DEST_STORE(_bte, _x) \ 109#define BTE_DEST_STORE(_bte, _x) \
105 HUB_S(_bte->bte_destination_addr, (_x)) 110({ \
111 u64 __addr = ((_x) & ~AS_MASK); \
112 if (is_shub2()) \
113 __addr = SH2_TIO_PHYS_TO_DMA(__addr); \
114 HUB_S(_bte->bte_destination_addr, __addr); \
115})
106#define BTE_CTRL_STORE(_bte, _x) \ 116#define BTE_CTRL_STORE(_bte, _x) \
107 HUB_S(_bte->bte_control_addr, (_x)) 117 HUB_S(_bte->bte_control_addr, (_x))
108#define BTE_NOTIF_STORE(_bte, _x) \ 118#define BTE_NOTIF_STORE(_bte, _x) \
109 HUB_S(_bte->bte_notify_addr, (_x)) 119({ \
120 u64 __addr = ia64_tpa((_x) & ~AS_MASK); \
121 if (is_shub2()) \
122 __addr = SH2_TIO_PHYS_TO_DMA(__addr); \
123 HUB_S(_bte->bte_notify_addr, __addr); \
124})
110 125
111#define BTE_START_TRANSFER(_bte, _len, _mode) \ 126#define BTE_START_TRANSFER(_bte, _len, _mode) \
112 is_shub2() ? BTE_CTRL_STORE(_bte, IBLS_BUSY | (_mode << 24) | _len) \ 127 is_shub2() ? BTE_CTRL_STORE(_bte, IBLS_BUSY | (_mode << 24) | _len) \
diff --git a/include/asm-ia64/sn/intr.h b/include/asm-ia64/sn/intr.h
index e35074f526d9..60a51a406eec 100644
--- a/include/asm-ia64/sn/intr.h
+++ b/include/asm-ia64/sn/intr.h
@@ -3,7 +3,7 @@
3 * License. See the file "COPYING" in the main directory of this archive 3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details. 4 * for more details.
5 * 5 *
6 * Copyright (C) 1992 - 1997, 2000-2004 Silicon Graphics, Inc. All rights reserved. 6 * Copyright (C) 1992 - 1997, 2000-2006 Silicon Graphics, Inc. All rights reserved.
7 */ 7 */
8 8
9#ifndef _ASM_IA64_SN_INTR_H 9#ifndef _ASM_IA64_SN_INTR_H
@@ -11,26 +11,26 @@
11 11
12#include <linux/rcupdate.h> 12#include <linux/rcupdate.h>
13 13
14#define SGI_UART_VECTOR (0xe9) 14#define SGI_UART_VECTOR 0xe9
15 15
16/* Reserved IRQs : Note, not to exceed IA64_SN2_FIRST_DEVICE_VECTOR */ 16/* Reserved IRQs : Note, not to exceed IA64_SN2_FIRST_DEVICE_VECTOR */
17#define SGI_XPC_ACTIVATE (0x30) 17#define SGI_XPC_ACTIVATE 0x30
18#define SGI_II_ERROR (0x31) 18#define SGI_II_ERROR 0x31
19#define SGI_XBOW_ERROR (0x32) 19#define SGI_XBOW_ERROR 0x32
20#define SGI_PCIASIC_ERROR (0x33) 20#define SGI_PCIASIC_ERROR 0x33
21#define SGI_ACPI_SCI_INT (0x34) 21#define SGI_ACPI_SCI_INT 0x34
22#define SGI_TIOCA_ERROR (0x35) 22#define SGI_TIOCA_ERROR 0x35
23#define SGI_TIO_ERROR (0x36) 23#define SGI_TIO_ERROR 0x36
24#define SGI_TIOCX_ERROR (0x37) 24#define SGI_TIOCX_ERROR 0x37
25#define SGI_MMTIMER_VECTOR (0x38) 25#define SGI_MMTIMER_VECTOR 0x38
26#define SGI_XPC_NOTIFY (0xe7) 26#define SGI_XPC_NOTIFY 0xe7
27 27
28#define IA64_SN2_FIRST_DEVICE_VECTOR (0x3c) 28#define IA64_SN2_FIRST_DEVICE_VECTOR 0x3c
29#define IA64_SN2_LAST_DEVICE_VECTOR (0xe6) 29#define IA64_SN2_LAST_DEVICE_VECTOR 0xe6
30 30
31#define SN2_IRQ_RESERVED (0x1) 31#define SN2_IRQ_RESERVED 0x1
32#define SN2_IRQ_CONNECTED (0x2) 32#define SN2_IRQ_CONNECTED 0x2
33#define SN2_IRQ_SHARED (0x4) 33#define SN2_IRQ_SHARED 0x4
34 34
35// The SN PROM irq struct 35// The SN PROM irq struct
36struct sn_irq_info { 36struct sn_irq_info {
@@ -40,7 +40,7 @@ struct sn_irq_info {
40 int irq_cpuid; /* kernel logical cpuid */ 40 int irq_cpuid; /* kernel logical cpuid */
41 int irq_irq; /* the IRQ number */ 41 int irq_irq; /* the IRQ number */
42 int irq_int_bit; /* Bridge interrupt pin */ 42 int irq_int_bit; /* Bridge interrupt pin */
43 uint64_t irq_xtalkaddr; /* xtalkaddr IRQ is sent to */ 43 u64 irq_xtalkaddr; /* xtalkaddr IRQ is sent to */
44 int irq_bridge_type;/* pciio asic type (pciio.h) */ 44 int irq_bridge_type;/* pciio asic type (pciio.h) */
45 void *irq_bridge; /* bridge generating irq */ 45 void *irq_bridge; /* bridge generating irq */
46 void *irq_pciioinfo; /* associated pciio_info_t */ 46 void *irq_pciioinfo; /* associated pciio_info_t */
diff --git a/include/asm-ia64/sn/ioc3.h b/include/asm-ia64/sn/ioc3.h
new file mode 100644
index 000000000000..95ed6cc83cf1
--- /dev/null
+++ b/include/asm-ia64/sn/ioc3.h
@@ -0,0 +1,241 @@
1/*
2 * Copyright (C) 2005 Silicon Graphics, Inc.
3 */
4#ifndef IA64_SN_IOC3_H
5#define IA64_SN_IOC3_H
6
7/* serial port register map */
8struct ioc3_serialregs {
9 uint32_t sscr;
10 uint32_t stpir;
11 uint32_t stcir;
12 uint32_t srpir;
13 uint32_t srcir;
14 uint32_t srtr;
15 uint32_t shadow;
16};
17
18/* SUPERIO uart register map */
19struct ioc3_uartregs {
20 char iu_lcr;
21 union {
22 char iir; /* read only */
23 char fcr; /* write only */
24 } u3;
25 union {
26 char ier; /* DLAB == 0 */
27 char dlm; /* DLAB == 1 */
28 } u2;
29 union {
30 char rbr; /* read only, DLAB == 0 */
31 char thr; /* write only, DLAB == 0 */
32 char dll; /* DLAB == 1 */
33 } u1;
34 char iu_scr;
35 char iu_msr;
36 char iu_lsr;
37 char iu_mcr;
38};
39
40#define iu_rbr u1.rbr
41#define iu_thr u1.thr
42#define iu_dll u1.dll
43#define iu_ier u2.ier
44#define iu_dlm u2.dlm
45#define iu_iir u3.iir
46#define iu_fcr u3.fcr
47
48struct ioc3_sioregs {
49 char fill[0x170];
50 struct ioc3_uartregs uartb;
51 struct ioc3_uartregs uarta;
52};
53
54/* PCI IO/mem space register map */
55struct ioc3 {
56 uint32_t pci_id;
57 uint32_t pci_scr;
58 uint32_t pci_rev;
59 uint32_t pci_lat;
60 uint32_t pci_addr;
61 uint32_t pci_err_addr_l;
62 uint32_t pci_err_addr_h;
63
64 uint32_t sio_ir;
65 /* these registers are read-only for general kernel code. To
66 * modify them use the functions in ioc3.c
67 */
68 uint32_t sio_ies;
69 uint32_t sio_iec;
70 uint32_t sio_cr;
71 uint32_t int_out;
72 uint32_t mcr;
73 uint32_t gpcr_s;
74 uint32_t gpcr_c;
75 uint32_t gpdr;
76 uint32_t gppr[9];
77 char fill[0x4c];
78
79 /* serial port registers */
80 uint32_t sbbr_h;
81 uint32_t sbbr_l;
82
83 struct ioc3_serialregs port_a;
84 struct ioc3_serialregs port_b;
85 char fill1[0x1ff10];
86 /* superio registers */
87 struct ioc3_sioregs sregs;
88};
89
90/* These don't exist on the ioc3 serial card... */
91#define eier fill1[8]
92#define eisr fill1[4]
93
94#define PCI_LAT 0xc /* Latency Timer */
95#define PCI_SCR_DROP_MODE_EN 0x00008000 /* drop pios on parity err */
96#define UARTA_BASE 0x178
97#define UARTB_BASE 0x170
98
99
100/* bitmasks for serial RX status byte */
101#define RXSB_OVERRUN 0x01 /* char(s) lost */
102#define RXSB_PAR_ERR 0x02 /* parity error */
103#define RXSB_FRAME_ERR 0x04 /* framing error */
104#define RXSB_BREAK 0x08 /* break character */
105#define RXSB_CTS 0x10 /* state of CTS */
106#define RXSB_DCD 0x20 /* state of DCD */
107#define RXSB_MODEM_VALID 0x40 /* DCD, CTS and OVERRUN are valid */
108#define RXSB_DATA_VALID 0x80 /* FRAME_ERR PAR_ERR & BREAK valid */
109
110/* bitmasks for serial TX control byte */
111#define TXCB_INT_WHEN_DONE 0x20 /* interrupt after this byte is sent */
112#define TXCB_INVALID 0x00 /* byte is invalid */
113#define TXCB_VALID 0x40 /* byte is valid */
114#define TXCB_MCR 0x80 /* data<7:0> to modem cntrl register */
115#define TXCB_DELAY 0xc0 /* delay data<7:0> mSec */
116
117/* bitmasks for SBBR_L */
118#define SBBR_L_SIZE 0x00000001 /* 0 1KB rings, 1 4KB rings */
119
120/* bitmasks for SSCR_<A:B> */
121#define SSCR_RX_THRESHOLD 0x000001ff /* hiwater mark */
122#define SSCR_TX_TIMER_BUSY 0x00010000 /* TX timer in progress */
123#define SSCR_HFC_EN 0x00020000 /* h/w flow cntrl enabled */
124#define SSCR_RX_RING_DCD 0x00040000 /* postRX record on delta-DCD */
125#define SSCR_RX_RING_CTS 0x00080000 /* postRX record on delta-CTS */
126#define SSCR_HIGH_SPD 0x00100000 /* 4X speed */
127#define SSCR_DIAG 0x00200000 /* bypass clock divider */
128#define SSCR_RX_DRAIN 0x08000000 /* drain RX buffer to memory */
129#define SSCR_DMA_EN 0x10000000 /* enable ring buffer DMA */
130#define SSCR_DMA_PAUSE 0x20000000 /* pause DMA */
131#define SSCR_PAUSE_STATE 0x40000000 /* set when PAUSE takes effect*/
132#define SSCR_RESET 0x80000000 /* reset DMA channels */
133
134/* all producer/comsumer pointers are the same bitfield */
135#define PROD_CONS_PTR_4K 0x00000ff8 /* for 4K buffers */
136#define PROD_CONS_PTR_1K 0x000003f8 /* for 1K buffers */
137#define PROD_CONS_PTR_OFF 3
138
139/* bitmasks for SRCIR_<A:B> */
140#define SRCIR_ARM 0x80000000 /* arm RX timer */
141
142/* bitmasks for SHADOW_<A:B> */
143#define SHADOW_DR 0x00000001 /* data ready */
144#define SHADOW_OE 0x00000002 /* overrun error */
145#define SHADOW_PE 0x00000004 /* parity error */
146#define SHADOW_FE 0x00000008 /* framing error */
147#define SHADOW_BI 0x00000010 /* break interrupt */
148#define SHADOW_THRE 0x00000020 /* transmit holding reg empty */
149#define SHADOW_TEMT 0x00000040 /* transmit shift reg empty */
150#define SHADOW_RFCE 0x00000080 /* char in RX fifo has error */
151#define SHADOW_DCTS 0x00010000 /* delta clear to send */
152#define SHADOW_DDCD 0x00080000 /* delta data carrier detect */
153#define SHADOW_CTS 0x00100000 /* clear to send */
154#define SHADOW_DCD 0x00800000 /* data carrier detect */
155#define SHADOW_DTR 0x01000000 /* data terminal ready */
156#define SHADOW_RTS 0x02000000 /* request to send */
157#define SHADOW_OUT1 0x04000000 /* 16550 OUT1 bit */
158#define SHADOW_OUT2 0x08000000 /* 16550 OUT2 bit */
159#define SHADOW_LOOP 0x10000000 /* loopback enabled */
160
161/* bitmasks for SRTR_<A:B> */
162#define SRTR_CNT 0x00000fff /* reload value for RX timer */
163#define SRTR_CNT_VAL 0x0fff0000 /* current value of RX timer */
164#define SRTR_CNT_VAL_SHIFT 16
165#define SRTR_HZ 16000 /* SRTR clock frequency */
166
167/* bitmasks for SIO_IR, SIO_IEC and SIO_IES */
168#define SIO_IR_SA_TX_MT 0x00000001 /* Serial port A TX empty */
169#define SIO_IR_SA_RX_FULL 0x00000002 /* port A RX buf full */
170#define SIO_IR_SA_RX_HIGH 0x00000004 /* port A RX hiwat */
171#define SIO_IR_SA_RX_TIMER 0x00000008 /* port A RX timeout */
172#define SIO_IR_SA_DELTA_DCD 0x00000010 /* port A delta DCD */
173#define SIO_IR_SA_DELTA_CTS 0x00000020 /* port A delta CTS */
174#define SIO_IR_SA_INT 0x00000040 /* port A pass-thru intr */
175#define SIO_IR_SA_TX_EXPLICIT 0x00000080 /* port A explicit TX thru */
176#define SIO_IR_SA_MEMERR 0x00000100 /* port A PCI error */
177#define SIO_IR_SB_TX_MT 0x00000200
178#define SIO_IR_SB_RX_FULL 0x00000400
179#define SIO_IR_SB_RX_HIGH 0x00000800
180#define SIO_IR_SB_RX_TIMER 0x00001000
181#define SIO_IR_SB_DELTA_DCD 0x00002000
182#define SIO_IR_SB_DELTA_CTS 0x00004000
183#define SIO_IR_SB_INT 0x00008000
184#define SIO_IR_SB_TX_EXPLICIT 0x00010000
185#define SIO_IR_SB_MEMERR 0x00020000
186#define SIO_IR_PP_INT 0x00040000 /* P port pass-thru intr */
187#define SIO_IR_PP_INTA 0x00080000 /* PP context A thru */
188#define SIO_IR_PP_INTB 0x00100000 /* PP context B thru */
189#define SIO_IR_PP_MEMERR 0x00200000 /* PP PCI error */
190#define SIO_IR_KBD_INT 0x00400000 /* kbd/mouse intr */
191#define SIO_IR_RT_INT 0x08000000 /* RT output pulse */
192#define SIO_IR_GEN_INT1 0x10000000 /* RT input pulse */
193#define SIO_IR_GEN_INT_SHIFT 28
194
195/* per device interrupt masks */
196#define SIO_IR_SA (SIO_IR_SA_TX_MT | \
197 SIO_IR_SA_RX_FULL | \
198 SIO_IR_SA_RX_HIGH | \
199 SIO_IR_SA_RX_TIMER | \
200 SIO_IR_SA_DELTA_DCD | \
201 SIO_IR_SA_DELTA_CTS | \
202 SIO_IR_SA_INT | \
203 SIO_IR_SA_TX_EXPLICIT | \
204 SIO_IR_SA_MEMERR)
205
206#define SIO_IR_SB (SIO_IR_SB_TX_MT | \
207 SIO_IR_SB_RX_FULL | \
208 SIO_IR_SB_RX_HIGH | \
209 SIO_IR_SB_RX_TIMER | \
210 SIO_IR_SB_DELTA_DCD | \
211 SIO_IR_SB_DELTA_CTS | \
212 SIO_IR_SB_INT | \
213 SIO_IR_SB_TX_EXPLICIT | \
214 SIO_IR_SB_MEMERR)
215
216#define SIO_IR_PP (SIO_IR_PP_INT | SIO_IR_PP_INTA | \
217 SIO_IR_PP_INTB | SIO_IR_PP_MEMERR)
218#define SIO_IR_RT (SIO_IR_RT_INT | SIO_IR_GEN_INT1)
219
220/* bitmasks for SIO_CR */
221#define SIO_CR_CMD_PULSE_SHIFT 15
222#define SIO_CR_SER_A_BASE_SHIFT 1
223#define SIO_CR_SER_B_BASE_SHIFT 8
224#define SIO_CR_ARB_DIAG 0x00380000 /* cur !enet PCI requet (ro) */
225#define SIO_CR_ARB_DIAG_TXA 0x00000000
226#define SIO_CR_ARB_DIAG_RXA 0x00080000
227#define SIO_CR_ARB_DIAG_TXB 0x00100000
228#define SIO_CR_ARB_DIAG_RXB 0x00180000
229#define SIO_CR_ARB_DIAG_PP 0x00200000
230#define SIO_CR_ARB_DIAG_IDLE 0x00400000 /* 0 -> active request (ro) */
231
232/* defs for some of the generic I/O pins */
233#define GPCR_PHY_RESET 0x20 /* pin is output to PHY reset */
234#define GPCR_UARTB_MODESEL 0x40 /* pin is output to port B mode sel */
235#define GPCR_UARTA_MODESEL 0x80 /* pin is output to port A mode sel */
236
237#define GPPR_PHY_RESET_PIN 5 /* GIO pin controlling phy reset */
238#define GPPR_UARTB_MODESEL_PIN 6 /* GIO pin cntrling uartb modeselect */
239#define GPPR_UARTA_MODESEL_PIN 7 /* GIO pin cntrling uarta modeselect */
240
241#endif /* IA64_SN_IOC3_H */
diff --git a/include/asm-ia64/sn/pcibr_provider.h b/include/asm-ia64/sn/pcibr_provider.h
index 2b42d9ece26b..a601d3af39b6 100644
--- a/include/asm-ia64/sn/pcibr_provider.h
+++ b/include/asm-ia64/sn/pcibr_provider.h
@@ -3,7 +3,7 @@
3 * License. See the file "COPYING" in the main directory of this archive 3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details. 4 * for more details.
5 * 5 *
6 * Copyright (C) 1992-1997,2000-2004 Silicon Graphics, Inc. All rights reserved. 6 * Copyright (C) 1992-1997,2000-2006 Silicon Graphics, Inc. All rights reserved.
7 */ 7 */
8#ifndef _ASM_IA64_SN_PCI_PCIBR_PROVIDER_H 8#ifndef _ASM_IA64_SN_PCI_PCIBR_PROVIDER_H
9#define _ASM_IA64_SN_PCI_PCIBR_PROVIDER_H 9#define _ASM_IA64_SN_PCI_PCIBR_PROVIDER_H
@@ -44,9 +44,9 @@
44#define PCI32_MAPPED_BASE 0x40000000 44#define PCI32_MAPPED_BASE 0x40000000
45#define PCI32_DIRECT_BASE 0x80000000 45#define PCI32_DIRECT_BASE 0x80000000
46 46
47#define IS_PCI32_MAPPED(x) ((uint64_t)(x) < PCI32_DIRECT_BASE && \ 47#define IS_PCI32_MAPPED(x) ((u64)(x) < PCI32_DIRECT_BASE && \
48 (uint64_t)(x) >= PCI32_MAPPED_BASE) 48 (u64)(x) >= PCI32_MAPPED_BASE)
49#define IS_PCI32_DIRECT(x) ((uint64_t)(x) >= PCI32_MAPPED_BASE) 49#define IS_PCI32_DIRECT(x) ((u64)(x) >= PCI32_MAPPED_BASE)
50 50
51 51
52/* 52/*
@@ -63,7 +63,7 @@
63 (IOPG(IOPGOFF(addr) + (size) - 1) == IOPG((size) - 1)) 63 (IOPG(IOPGOFF(addr) + (size) - 1) == IOPG((size) - 1))
64 64
65#define MINIMAL_ATE_FLAG(addr, size) \ 65#define MINIMAL_ATE_FLAG(addr, size) \
66 (MINIMAL_ATES_REQUIRED((uint64_t)addr, size) ? 1 : 0) 66 (MINIMAL_ATES_REQUIRED((u64)addr, size) ? 1 : 0)
67 67
68/* bit 29 of the pci address is the SWAP bit */ 68/* bit 29 of the pci address is the SWAP bit */
69#define ATE_SWAPSHIFT 29 69#define ATE_SWAPSHIFT 29
@@ -90,43 +90,31 @@
90 * PMU resources. 90 * PMU resources.
91 */ 91 */
92struct ate_resource{ 92struct ate_resource{
93 uint64_t *ate; 93 u64 *ate;
94 uint64_t num_ate; 94 u64 num_ate;
95 uint64_t lowest_free_index; 95 u64 lowest_free_index;
96}; 96};
97 97
98struct pcibus_info { 98struct pcibus_info {
99 struct pcibus_bussoft pbi_buscommon; /* common header */ 99 struct pcibus_bussoft pbi_buscommon; /* common header */
100 uint32_t pbi_moduleid; 100 u32 pbi_moduleid;
101 short pbi_bridge_type; 101 short pbi_bridge_type;
102 short pbi_bridge_mode; 102 short pbi_bridge_mode;
103 103
104 struct ate_resource pbi_int_ate_resource; 104 struct ate_resource pbi_int_ate_resource;
105 uint64_t pbi_int_ate_size; 105 u64 pbi_int_ate_size;
106 106
107 uint64_t pbi_dir_xbase; 107 u64 pbi_dir_xbase;
108 char pbi_hub_xid; 108 char pbi_hub_xid;
109 109
110 uint64_t pbi_devreg[8]; 110 u64 pbi_devreg[8];
111 111
112 uint32_t pbi_valid_devices; 112 u32 pbi_valid_devices;
113 uint32_t pbi_enabled_devices; 113 u32 pbi_enabled_devices;
114 114
115 spinlock_t pbi_lock; 115 spinlock_t pbi_lock;
116}; 116};
117 117
118/*
119 * pcibus_info structure locking macros
120 */
121inline static unsigned long
122pcibr_lock(struct pcibus_info *pcibus_info)
123{
124 unsigned long flag;
125 spin_lock_irqsave(&pcibus_info->pbi_lock, flag);
126 return(flag);
127}
128#define pcibr_unlock(pcibus_info, flag) spin_unlock_irqrestore(&pcibus_info->pbi_lock, flag)
129
130extern int pcibr_init_provider(void); 118extern int pcibr_init_provider(void);
131extern void *pcibr_bus_fixup(struct pcibus_bussoft *, struct pci_controller *); 119extern void *pcibr_bus_fixup(struct pcibus_bussoft *, struct pci_controller *);
132extern dma_addr_t pcibr_dma_map(struct pci_dev *, unsigned long, size_t); 120extern dma_addr_t pcibr_dma_map(struct pci_dev *, unsigned long, size_t);
@@ -136,22 +124,22 @@ extern void pcibr_dma_unmap(struct pci_dev *, dma_addr_t, int);
136/* 124/*
137 * prototypes for the bridge asic register access routines in pcibr_reg.c 125 * prototypes for the bridge asic register access routines in pcibr_reg.c
138 */ 126 */
139extern void pcireg_control_bit_clr(struct pcibus_info *, uint64_t); 127extern void pcireg_control_bit_clr(struct pcibus_info *, u64);
140extern void pcireg_control_bit_set(struct pcibus_info *, uint64_t); 128extern void pcireg_control_bit_set(struct pcibus_info *, u64);
141extern uint64_t pcireg_tflush_get(struct pcibus_info *); 129extern u64 pcireg_tflush_get(struct pcibus_info *);
142extern uint64_t pcireg_intr_status_get(struct pcibus_info *); 130extern u64 pcireg_intr_status_get(struct pcibus_info *);
143extern void pcireg_intr_enable_bit_clr(struct pcibus_info *, uint64_t); 131extern void pcireg_intr_enable_bit_clr(struct pcibus_info *, u64);
144extern void pcireg_intr_enable_bit_set(struct pcibus_info *, uint64_t); 132extern void pcireg_intr_enable_bit_set(struct pcibus_info *, u64);
145extern void pcireg_intr_addr_addr_set(struct pcibus_info *, int, uint64_t); 133extern void pcireg_intr_addr_addr_set(struct pcibus_info *, int, u64);
146extern void pcireg_force_intr_set(struct pcibus_info *, int); 134extern void pcireg_force_intr_set(struct pcibus_info *, int);
147extern uint64_t pcireg_wrb_flush_get(struct pcibus_info *, int); 135extern u64 pcireg_wrb_flush_get(struct pcibus_info *, int);
148extern void pcireg_int_ate_set(struct pcibus_info *, int, uint64_t); 136extern void pcireg_int_ate_set(struct pcibus_info *, int, u64);
149extern uint64_t * pcireg_int_ate_addr(struct pcibus_info *, int); 137extern u64 * pcireg_int_ate_addr(struct pcibus_info *, int);
150extern void pcibr_force_interrupt(struct sn_irq_info *sn_irq_info); 138extern void pcibr_force_interrupt(struct sn_irq_info *sn_irq_info);
151extern void pcibr_change_devices_irq(struct sn_irq_info *sn_irq_info); 139extern void pcibr_change_devices_irq(struct sn_irq_info *sn_irq_info);
152extern int pcibr_ate_alloc(struct pcibus_info *, int); 140extern int pcibr_ate_alloc(struct pcibus_info *, int);
153extern void pcibr_ate_free(struct pcibus_info *, int); 141extern void pcibr_ate_free(struct pcibus_info *, int);
154extern void ate_write(struct pcibus_info *, int, int, uint64_t); 142extern void ate_write(struct pcibus_info *, int, int, u64);
155extern int sal_pcibr_slot_enable(struct pcibus_info *soft, int device, 143extern int sal_pcibr_slot_enable(struct pcibus_info *soft, int device,
156 void *resp); 144 void *resp);
157extern int sal_pcibr_slot_disable(struct pcibus_info *soft, int device, 145extern int sal_pcibr_slot_disable(struct pcibus_info *soft, int device,
diff --git a/include/asm-ia64/sn/pcibus_provider_defs.h b/include/asm-ia64/sn/pcibus_provider_defs.h
index ad0e8e8ae53f..ce3f6c328241 100644
--- a/include/asm-ia64/sn/pcibus_provider_defs.h
+++ b/include/asm-ia64/sn/pcibus_provider_defs.h
@@ -29,13 +29,13 @@
29 */ 29 */
30 30
31struct pcibus_bussoft { 31struct pcibus_bussoft {
32 uint32_t bs_asic_type; /* chipset type */ 32 u32 bs_asic_type; /* chipset type */
33 uint32_t bs_xid; /* xwidget id */ 33 u32 bs_xid; /* xwidget id */
34 uint32_t bs_persist_busnum; /* Persistent Bus Number */ 34 u32 bs_persist_busnum; /* Persistent Bus Number */
35 uint32_t bs_persist_segment; /* Segment Number */ 35 u32 bs_persist_segment; /* Segment Number */
36 uint64_t bs_legacy_io; /* legacy io pio addr */ 36 u64 bs_legacy_io; /* legacy io pio addr */
37 uint64_t bs_legacy_mem; /* legacy mem pio addr */ 37 u64 bs_legacy_mem; /* legacy mem pio addr */
38 uint64_t bs_base; /* widget base */ 38 u64 bs_base; /* widget base */
39 struct xwidget_info *bs_xwidget_info; 39 struct xwidget_info *bs_xwidget_info;
40}; 40};
41 41
diff --git a/include/asm-ia64/sn/pcidev.h b/include/asm-ia64/sn/pcidev.h
index f65d222ca5e8..38cdffbc4c7b 100644
--- a/include/asm-ia64/sn/pcidev.h
+++ b/include/asm-ia64/sn/pcidev.h
@@ -55,8 +55,8 @@ struct sn_pci_controller {
55#define PCIIO_VENDOR_ID_NONE (-1) 55#define PCIIO_VENDOR_ID_NONE (-1)
56 56
57struct pcidev_info { 57struct pcidev_info {
58 uint64_t pdi_pio_mapped_addr[7]; /* 6 BARs PLUS 1 ROM */ 58 u64 pdi_pio_mapped_addr[7]; /* 6 BARs PLUS 1 ROM */
59 uint64_t pdi_slot_host_handle; /* Bus and devfn Host pci_dev */ 59 u64 pdi_slot_host_handle; /* Bus and devfn Host pci_dev */
60 60
61 struct pcibus_bussoft *pdi_pcibus_info; /* Kernel common bus soft */ 61 struct pcibus_bussoft *pdi_pcibus_info; /* Kernel common bus soft */
62 struct pcidev_info *pdi_host_pcidev_info; /* Kernel Host pci_dev */ 62 struct pcidev_info *pdi_host_pcidev_info; /* Kernel Host pci_dev */
diff --git a/include/asm-ia64/sn/pic.h b/include/asm-ia64/sn/pic.h
index 0de82e6b0893..5f9da5fd6e56 100644
--- a/include/asm-ia64/sn/pic.h
+++ b/include/asm-ia64/sn/pic.h
@@ -74,120 +74,120 @@ struct pic {
74 /* 0x000000-0x00FFFF -- Local Registers */ 74 /* 0x000000-0x00FFFF -- Local Registers */
75 75
76 /* 0x000000-0x000057 -- Standard Widget Configuration */ 76 /* 0x000000-0x000057 -- Standard Widget Configuration */
77 uint64_t p_wid_id; /* 0x000000 */ 77 u64 p_wid_id; /* 0x000000 */
78 uint64_t p_wid_stat; /* 0x000008 */ 78 u64 p_wid_stat; /* 0x000008 */
79 uint64_t p_wid_err_upper; /* 0x000010 */ 79 u64 p_wid_err_upper; /* 0x000010 */
80 uint64_t p_wid_err_lower; /* 0x000018 */ 80 u64 p_wid_err_lower; /* 0x000018 */
81 #define p_wid_err p_wid_err_lower 81 #define p_wid_err p_wid_err_lower
82 uint64_t p_wid_control; /* 0x000020 */ 82 u64 p_wid_control; /* 0x000020 */
83 uint64_t p_wid_req_timeout; /* 0x000028 */ 83 u64 p_wid_req_timeout; /* 0x000028 */
84 uint64_t p_wid_int_upper; /* 0x000030 */ 84 u64 p_wid_int_upper; /* 0x000030 */
85 uint64_t p_wid_int_lower; /* 0x000038 */ 85 u64 p_wid_int_lower; /* 0x000038 */
86 #define p_wid_int p_wid_int_lower 86 #define p_wid_int p_wid_int_lower
87 uint64_t p_wid_err_cmdword; /* 0x000040 */ 87 u64 p_wid_err_cmdword; /* 0x000040 */
88 uint64_t p_wid_llp; /* 0x000048 */ 88 u64 p_wid_llp; /* 0x000048 */
89 uint64_t p_wid_tflush; /* 0x000050 */ 89 u64 p_wid_tflush; /* 0x000050 */
90 90
91 /* 0x000058-0x00007F -- Bridge-specific Widget Configuration */ 91 /* 0x000058-0x00007F -- Bridge-specific Widget Configuration */
92 uint64_t p_wid_aux_err; /* 0x000058 */ 92 u64 p_wid_aux_err; /* 0x000058 */
93 uint64_t p_wid_resp_upper; /* 0x000060 */ 93 u64 p_wid_resp_upper; /* 0x000060 */
94 uint64_t p_wid_resp_lower; /* 0x000068 */ 94 u64 p_wid_resp_lower; /* 0x000068 */
95 #define p_wid_resp p_wid_resp_lower 95 #define p_wid_resp p_wid_resp_lower
96 uint64_t p_wid_tst_pin_ctrl; /* 0x000070 */ 96 u64 p_wid_tst_pin_ctrl; /* 0x000070 */
97 uint64_t p_wid_addr_lkerr; /* 0x000078 */ 97 u64 p_wid_addr_lkerr; /* 0x000078 */
98 98
99 /* 0x000080-0x00008F -- PMU & MAP */ 99 /* 0x000080-0x00008F -- PMU & MAP */
100 uint64_t p_dir_map; /* 0x000080 */ 100 u64 p_dir_map; /* 0x000080 */
101 uint64_t _pad_000088; /* 0x000088 */ 101 u64 _pad_000088; /* 0x000088 */
102 102
103 /* 0x000090-0x00009F -- SSRAM */ 103 /* 0x000090-0x00009F -- SSRAM */
104 uint64_t p_map_fault; /* 0x000090 */ 104 u64 p_map_fault; /* 0x000090 */
105 uint64_t _pad_000098; /* 0x000098 */ 105 u64 _pad_000098; /* 0x000098 */
106 106
107 /* 0x0000A0-0x0000AF -- Arbitration */ 107 /* 0x0000A0-0x0000AF -- Arbitration */
108 uint64_t p_arb; /* 0x0000A0 */ 108 u64 p_arb; /* 0x0000A0 */
109 uint64_t _pad_0000A8; /* 0x0000A8 */ 109 u64 _pad_0000A8; /* 0x0000A8 */
110 110
111 /* 0x0000B0-0x0000BF -- Number In A Can or ATE Parity Error */ 111 /* 0x0000B0-0x0000BF -- Number In A Can or ATE Parity Error */
112 uint64_t p_ate_parity_err; /* 0x0000B0 */ 112 u64 p_ate_parity_err; /* 0x0000B0 */
113 uint64_t _pad_0000B8; /* 0x0000B8 */ 113 u64 _pad_0000B8; /* 0x0000B8 */
114 114
115 /* 0x0000C0-0x0000FF -- PCI/GIO */ 115 /* 0x0000C0-0x0000FF -- PCI/GIO */
116 uint64_t p_bus_timeout; /* 0x0000C0 */ 116 u64 p_bus_timeout; /* 0x0000C0 */
117 uint64_t p_pci_cfg; /* 0x0000C8 */ 117 u64 p_pci_cfg; /* 0x0000C8 */
118 uint64_t p_pci_err_upper; /* 0x0000D0 */ 118 u64 p_pci_err_upper; /* 0x0000D0 */
119 uint64_t p_pci_err_lower; /* 0x0000D8 */ 119 u64 p_pci_err_lower; /* 0x0000D8 */
120 #define p_pci_err p_pci_err_lower 120 #define p_pci_err p_pci_err_lower
121 uint64_t _pad_0000E0[4]; /* 0x0000{E0..F8} */ 121 u64 _pad_0000E0[4]; /* 0x0000{E0..F8} */
122 122
123 /* 0x000100-0x0001FF -- Interrupt */ 123 /* 0x000100-0x0001FF -- Interrupt */
124 uint64_t p_int_status; /* 0x000100 */ 124 u64 p_int_status; /* 0x000100 */
125 uint64_t p_int_enable; /* 0x000108 */ 125 u64 p_int_enable; /* 0x000108 */
126 uint64_t p_int_rst_stat; /* 0x000110 */ 126 u64 p_int_rst_stat; /* 0x000110 */
127 uint64_t p_int_mode; /* 0x000118 */ 127 u64 p_int_mode; /* 0x000118 */
128 uint64_t p_int_device; /* 0x000120 */ 128 u64 p_int_device; /* 0x000120 */
129 uint64_t p_int_host_err; /* 0x000128 */ 129 u64 p_int_host_err; /* 0x000128 */
130 uint64_t p_int_addr[8]; /* 0x0001{30,,,68} */ 130 u64 p_int_addr[8]; /* 0x0001{30,,,68} */
131 uint64_t p_err_int_view; /* 0x000170 */ 131 u64 p_err_int_view; /* 0x000170 */
132 uint64_t p_mult_int; /* 0x000178 */ 132 u64 p_mult_int; /* 0x000178 */
133 uint64_t p_force_always[8]; /* 0x0001{80,,,B8} */ 133 u64 p_force_always[8]; /* 0x0001{80,,,B8} */
134 uint64_t p_force_pin[8]; /* 0x0001{C0,,,F8} */ 134 u64 p_force_pin[8]; /* 0x0001{C0,,,F8} */
135 135
136 /* 0x000200-0x000298 -- Device */ 136 /* 0x000200-0x000298 -- Device */
137 uint64_t p_device[4]; /* 0x0002{00,,,18} */ 137 u64 p_device[4]; /* 0x0002{00,,,18} */
138 uint64_t _pad_000220[4]; /* 0x0002{20,,,38} */ 138 u64 _pad_000220[4]; /* 0x0002{20,,,38} */
139 uint64_t p_wr_req_buf[4]; /* 0x0002{40,,,58} */ 139 u64 p_wr_req_buf[4]; /* 0x0002{40,,,58} */
140 uint64_t _pad_000260[4]; /* 0x0002{60,,,78} */ 140 u64 _pad_000260[4]; /* 0x0002{60,,,78} */
141 uint64_t p_rrb_map[2]; /* 0x0002{80,,,88} */ 141 u64 p_rrb_map[2]; /* 0x0002{80,,,88} */
142 #define p_even_resp p_rrb_map[0] /* 0x000280 */ 142 #define p_even_resp p_rrb_map[0] /* 0x000280 */
143 #define p_odd_resp p_rrb_map[1] /* 0x000288 */ 143 #define p_odd_resp p_rrb_map[1] /* 0x000288 */
144 uint64_t p_resp_status; /* 0x000290 */ 144 u64 p_resp_status; /* 0x000290 */
145 uint64_t p_resp_clear; /* 0x000298 */ 145 u64 p_resp_clear; /* 0x000298 */
146 146
147 uint64_t _pad_0002A0[12]; /* 0x0002{A0..F8} */ 147 u64 _pad_0002A0[12]; /* 0x0002{A0..F8} */
148 148
149 /* 0x000300-0x0003F8 -- Buffer Address Match Registers */ 149 /* 0x000300-0x0003F8 -- Buffer Address Match Registers */
150 struct { 150 struct {
151 uint64_t upper; /* 0x0003{00,,,F0} */ 151 u64 upper; /* 0x0003{00,,,F0} */
152 uint64_t lower; /* 0x0003{08,,,F8} */ 152 u64 lower; /* 0x0003{08,,,F8} */
153 } p_buf_addr_match[16]; 153 } p_buf_addr_match[16];
154 154
155 /* 0x000400-0x0005FF -- Performance Monitor Registers (even only) */ 155 /* 0x000400-0x0005FF -- Performance Monitor Registers (even only) */
156 struct { 156 struct {
157 uint64_t flush_w_touch; /* 0x000{400,,,5C0} */ 157 u64 flush_w_touch; /* 0x000{400,,,5C0} */
158 uint64_t flush_wo_touch; /* 0x000{408,,,5C8} */ 158 u64 flush_wo_touch; /* 0x000{408,,,5C8} */
159 uint64_t inflight; /* 0x000{410,,,5D0} */ 159 u64 inflight; /* 0x000{410,,,5D0} */
160 uint64_t prefetch; /* 0x000{418,,,5D8} */ 160 u64 prefetch; /* 0x000{418,,,5D8} */
161 uint64_t total_pci_retry; /* 0x000{420,,,5E0} */ 161 u64 total_pci_retry; /* 0x000{420,,,5E0} */
162 uint64_t max_pci_retry; /* 0x000{428,,,5E8} */ 162 u64 max_pci_retry; /* 0x000{428,,,5E8} */
163 uint64_t max_latency; /* 0x000{430,,,5F0} */ 163 u64 max_latency; /* 0x000{430,,,5F0} */
164 uint64_t clear_all; /* 0x000{438,,,5F8} */ 164 u64 clear_all; /* 0x000{438,,,5F8} */
165 } p_buf_count[8]; 165 } p_buf_count[8];
166 166
167 167
168 /* 0x000600-0x0009FF -- PCI/X registers */ 168 /* 0x000600-0x0009FF -- PCI/X registers */
169 uint64_t p_pcix_bus_err_addr; /* 0x000600 */ 169 u64 p_pcix_bus_err_addr; /* 0x000600 */
170 uint64_t p_pcix_bus_err_attr; /* 0x000608 */ 170 u64 p_pcix_bus_err_attr; /* 0x000608 */
171 uint64_t p_pcix_bus_err_data; /* 0x000610 */ 171 u64 p_pcix_bus_err_data; /* 0x000610 */
172 uint64_t p_pcix_pio_split_addr; /* 0x000618 */ 172 u64 p_pcix_pio_split_addr; /* 0x000618 */
173 uint64_t p_pcix_pio_split_attr; /* 0x000620 */ 173 u64 p_pcix_pio_split_attr; /* 0x000620 */
174 uint64_t p_pcix_dma_req_err_attr; /* 0x000628 */ 174 u64 p_pcix_dma_req_err_attr; /* 0x000628 */
175 uint64_t p_pcix_dma_req_err_addr; /* 0x000630 */ 175 u64 p_pcix_dma_req_err_addr; /* 0x000630 */
176 uint64_t p_pcix_timeout; /* 0x000638 */ 176 u64 p_pcix_timeout; /* 0x000638 */
177 177
178 uint64_t _pad_000640[120]; /* 0x000{640,,,9F8} */ 178 u64 _pad_000640[120]; /* 0x000{640,,,9F8} */
179 179
180 /* 0x000A00-0x000BFF -- PCI/X Read&Write Buffer */ 180 /* 0x000A00-0x000BFF -- PCI/X Read&Write Buffer */
181 struct { 181 struct {
182 uint64_t p_buf_addr; /* 0x000{A00,,,AF0} */ 182 u64 p_buf_addr; /* 0x000{A00,,,AF0} */
183 uint64_t p_buf_attr; /* 0X000{A08,,,AF8} */ 183 u64 p_buf_attr; /* 0X000{A08,,,AF8} */
184 } p_pcix_read_buf_64[16]; 184 } p_pcix_read_buf_64[16];
185 185
186 struct { 186 struct {
187 uint64_t p_buf_addr; /* 0x000{B00,,,BE0} */ 187 u64 p_buf_addr; /* 0x000{B00,,,BE0} */
188 uint64_t p_buf_attr; /* 0x000{B08,,,BE8} */ 188 u64 p_buf_attr; /* 0x000{B08,,,BE8} */
189 uint64_t p_buf_valid; /* 0x000{B10,,,BF0} */ 189 u64 p_buf_valid; /* 0x000{B10,,,BF0} */
190 uint64_t __pad1; /* 0x000{B18,,,BF8} */ 190 u64 __pad1; /* 0x000{B18,,,BF8} */
191 } p_pcix_write_buf_64[8]; 191 } p_pcix_write_buf_64[8];
192 192
193 /* End of Local Registers -- Start of Address Map space */ 193 /* End of Local Registers -- Start of Address Map space */
@@ -195,45 +195,45 @@ struct pic {
195 char _pad_000c00[0x010000 - 0x000c00]; 195 char _pad_000c00[0x010000 - 0x000c00];
196 196
197 /* 0x010000-0x011fff -- Internal ATE RAM (Auto Parity Generation) */ 197 /* 0x010000-0x011fff -- Internal ATE RAM (Auto Parity Generation) */
198 uint64_t p_int_ate_ram[1024]; /* 0x010000-0x011fff */ 198 u64 p_int_ate_ram[1024]; /* 0x010000-0x011fff */
199 199
200 /* 0x012000-0x013fff -- Internal ATE RAM (Manual Parity Generation) */ 200 /* 0x012000-0x013fff -- Internal ATE RAM (Manual Parity Generation) */
201 uint64_t p_int_ate_ram_mp[1024]; /* 0x012000-0x013fff */ 201 u64 p_int_ate_ram_mp[1024]; /* 0x012000-0x013fff */
202 202
203 char _pad_014000[0x18000 - 0x014000]; 203 char _pad_014000[0x18000 - 0x014000];
204 204
205 /* 0x18000-0x197F8 -- PIC Write Request Ram */ 205 /* 0x18000-0x197F8 -- PIC Write Request Ram */
206 uint64_t p_wr_req_lower[256]; /* 0x18000 - 0x187F8 */ 206 u64 p_wr_req_lower[256]; /* 0x18000 - 0x187F8 */
207 uint64_t p_wr_req_upper[256]; /* 0x18800 - 0x18FF8 */ 207 u64 p_wr_req_upper[256]; /* 0x18800 - 0x18FF8 */
208 uint64_t p_wr_req_parity[256]; /* 0x19000 - 0x197F8 */ 208 u64 p_wr_req_parity[256]; /* 0x19000 - 0x197F8 */
209 209
210 char _pad_019800[0x20000 - 0x019800]; 210 char _pad_019800[0x20000 - 0x019800];
211 211
212 /* 0x020000-0x027FFF -- PCI Device Configuration Spaces */ 212 /* 0x020000-0x027FFF -- PCI Device Configuration Spaces */
213 union { 213 union {
214 uint8_t c[0x1000 / 1]; /* 0x02{0000,,,7FFF} */ 214 u8 c[0x1000 / 1]; /* 0x02{0000,,,7FFF} */
215 uint16_t s[0x1000 / 2]; /* 0x02{0000,,,7FFF} */ 215 u16 s[0x1000 / 2]; /* 0x02{0000,,,7FFF} */
216 uint32_t l[0x1000 / 4]; /* 0x02{0000,,,7FFF} */ 216 u32 l[0x1000 / 4]; /* 0x02{0000,,,7FFF} */
217 uint64_t d[0x1000 / 8]; /* 0x02{0000,,,7FFF} */ 217 u64 d[0x1000 / 8]; /* 0x02{0000,,,7FFF} */
218 union { 218 union {
219 uint8_t c[0x100 / 1]; 219 u8 c[0x100 / 1];
220 uint16_t s[0x100 / 2]; 220 u16 s[0x100 / 2];
221 uint32_t l[0x100 / 4]; 221 u32 l[0x100 / 4];
222 uint64_t d[0x100 / 8]; 222 u64 d[0x100 / 8];
223 } f[8]; 223 } f[8];
224 } p_type0_cfg_dev[8]; /* 0x02{0000,,,7FFF} */ 224 } p_type0_cfg_dev[8]; /* 0x02{0000,,,7FFF} */
225 225
226 /* 0x028000-0x028FFF -- PCI Type 1 Configuration Space */ 226 /* 0x028000-0x028FFF -- PCI Type 1 Configuration Space */
227 union { 227 union {
228 uint8_t c[0x1000 / 1]; /* 0x028000-0x029000 */ 228 u8 c[0x1000 / 1]; /* 0x028000-0x029000 */
229 uint16_t s[0x1000 / 2]; /* 0x028000-0x029000 */ 229 u16 s[0x1000 / 2]; /* 0x028000-0x029000 */
230 uint32_t l[0x1000 / 4]; /* 0x028000-0x029000 */ 230 u32 l[0x1000 / 4]; /* 0x028000-0x029000 */
231 uint64_t d[0x1000 / 8]; /* 0x028000-0x029000 */ 231 u64 d[0x1000 / 8]; /* 0x028000-0x029000 */
232 union { 232 union {
233 uint8_t c[0x100 / 1]; 233 u8 c[0x100 / 1];
234 uint16_t s[0x100 / 2]; 234 u16 s[0x100 / 2];
235 uint32_t l[0x100 / 4]; 235 u32 l[0x100 / 4];
236 uint64_t d[0x100 / 8]; 236 u64 d[0x100 / 8];
237 } f[8]; 237 } f[8];
238 } p_type1_cfg; /* 0x028000-0x029000 */ 238 } p_type1_cfg; /* 0x028000-0x029000 */
239 239
@@ -241,20 +241,20 @@ struct pic {
241 241
242 /* 0x030000-0x030007 -- PCI Interrupt Acknowledge Cycle */ 242 /* 0x030000-0x030007 -- PCI Interrupt Acknowledge Cycle */
243 union { 243 union {
244 uint8_t c[8 / 1]; 244 u8 c[8 / 1];
245 uint16_t s[8 / 2]; 245 u16 s[8 / 2];
246 uint32_t l[8 / 4]; 246 u32 l[8 / 4];
247 uint64_t d[8 / 8]; 247 u64 d[8 / 8];
248 } p_pci_iack; /* 0x030000-0x030007 */ 248 } p_pci_iack; /* 0x030000-0x030007 */
249 249
250 char _pad_030007[0x040000-0x030008]; 250 char _pad_030007[0x040000-0x030008];
251 251
252 /* 0x040000-0x030007 -- PCIX Special Cycle */ 252 /* 0x040000-0x030007 -- PCIX Special Cycle */
253 union { 253 union {
254 uint8_t c[8 / 1]; 254 u8 c[8 / 1];
255 uint16_t s[8 / 2]; 255 u16 s[8 / 2];
256 uint32_t l[8 / 4]; 256 u32 l[8 / 4];
257 uint64_t d[8 / 8]; 257 u64 d[8 / 8];
258 } p_pcix_cycle; /* 0x040000-0x040007 */ 258 } p_pcix_cycle; /* 0x040000-0x040007 */
259}; 259};
260 260
diff --git a/include/asm-ia64/sn/shubio.h b/include/asm-ia64/sn/shubio.h
index 831b72111fdc..22a6f18a5313 100644
--- a/include/asm-ia64/sn/shubio.h
+++ b/include/asm-ia64/sn/shubio.h
@@ -227,13 +227,13 @@
227 ************************************************************************/ 227 ************************************************************************/
228 228
229typedef union ii_wid_u { 229typedef union ii_wid_u {
230 uint64_t ii_wid_regval; 230 u64 ii_wid_regval;
231 struct { 231 struct {
232 uint64_t w_rsvd_1:1; 232 u64 w_rsvd_1:1;
233 uint64_t w_mfg_num:11; 233 u64 w_mfg_num:11;
234 uint64_t w_part_num:16; 234 u64 w_part_num:16;
235 uint64_t w_rev_num:4; 235 u64 w_rev_num:4;
236 uint64_t w_rsvd:32; 236 u64 w_rsvd:32;
237 } ii_wid_fld_s; 237 } ii_wid_fld_s;
238} ii_wid_u_t; 238} ii_wid_u_t;
239 239
@@ -246,18 +246,18 @@ typedef union ii_wid_u {
246 ************************************************************************/ 246 ************************************************************************/
247 247
248typedef union ii_wstat_u { 248typedef union ii_wstat_u {
249 uint64_t ii_wstat_regval; 249 u64 ii_wstat_regval;
250 struct { 250 struct {
251 uint64_t w_pending:4; 251 u64 w_pending:4;
252 uint64_t w_xt_crd_to:1; 252 u64 w_xt_crd_to:1;
253 uint64_t w_xt_tail_to:1; 253 u64 w_xt_tail_to:1;
254 uint64_t w_rsvd_3:3; 254 u64 w_rsvd_3:3;
255 uint64_t w_tx_mx_rty:1; 255 u64 w_tx_mx_rty:1;
256 uint64_t w_rsvd_2:6; 256 u64 w_rsvd_2:6;
257 uint64_t w_llp_tx_cnt:8; 257 u64 w_llp_tx_cnt:8;
258 uint64_t w_rsvd_1:8; 258 u64 w_rsvd_1:8;
259 uint64_t w_crazy:1; 259 u64 w_crazy:1;
260 uint64_t w_rsvd:31; 260 u64 w_rsvd:31;
261 } ii_wstat_fld_s; 261 } ii_wstat_fld_s;
262} ii_wstat_u_t; 262} ii_wstat_u_t;
263 263
@@ -269,16 +269,16 @@ typedef union ii_wstat_u {
269 ************************************************************************/ 269 ************************************************************************/
270 270
271typedef union ii_wcr_u { 271typedef union ii_wcr_u {
272 uint64_t ii_wcr_regval; 272 u64 ii_wcr_regval;
273 struct { 273 struct {
274 uint64_t w_wid:4; 274 u64 w_wid:4;
275 uint64_t w_tag:1; 275 u64 w_tag:1;
276 uint64_t w_rsvd_1:8; 276 u64 w_rsvd_1:8;
277 uint64_t w_dst_crd:3; 277 u64 w_dst_crd:3;
278 uint64_t w_f_bad_pkt:1; 278 u64 w_f_bad_pkt:1;
279 uint64_t w_dir_con:1; 279 u64 w_dir_con:1;
280 uint64_t w_e_thresh:5; 280 u64 w_e_thresh:5;
281 uint64_t w_rsvd:41; 281 u64 w_rsvd:41;
282 } ii_wcr_fld_s; 282 } ii_wcr_fld_s;
283} ii_wcr_u_t; 283} ii_wcr_u_t;
284 284
@@ -310,9 +310,9 @@ typedef union ii_wcr_u {
310 ************************************************************************/ 310 ************************************************************************/
311 311
312typedef union ii_ilapr_u { 312typedef union ii_ilapr_u {
313 uint64_t ii_ilapr_regval; 313 u64 ii_ilapr_regval;
314 struct { 314 struct {
315 uint64_t i_region:64; 315 u64 i_region:64;
316 } ii_ilapr_fld_s; 316 } ii_ilapr_fld_s;
317} ii_ilapr_u_t; 317} ii_ilapr_u_t;
318 318
@@ -330,9 +330,9 @@ typedef union ii_ilapr_u {
330 ************************************************************************/ 330 ************************************************************************/
331 331
332typedef union ii_ilapo_u { 332typedef union ii_ilapo_u {
333 uint64_t ii_ilapo_regval; 333 u64 ii_ilapo_regval;
334 struct { 334 struct {
335 uint64_t i_io_ovrride:64; 335 u64 i_io_ovrride:64;
336 } ii_ilapo_fld_s; 336 } ii_ilapo_fld_s;
337} ii_ilapo_u_t; 337} ii_ilapo_u_t;
338 338
@@ -344,12 +344,12 @@ typedef union ii_ilapo_u {
344 ************************************************************************/ 344 ************************************************************************/
345 345
346typedef union ii_iowa_u { 346typedef union ii_iowa_u {
347 uint64_t ii_iowa_regval; 347 u64 ii_iowa_regval;
348 struct { 348 struct {
349 uint64_t i_w0_oac:1; 349 u64 i_w0_oac:1;
350 uint64_t i_rsvd_1:7; 350 u64 i_rsvd_1:7;
351 uint64_t i_wx_oac:8; 351 u64 i_wx_oac:8;
352 uint64_t i_rsvd:48; 352 u64 i_rsvd:48;
353 } ii_iowa_fld_s; 353 } ii_iowa_fld_s;
354} ii_iowa_u_t; 354} ii_iowa_u_t;
355 355
@@ -363,12 +363,12 @@ typedef union ii_iowa_u {
363 ************************************************************************/ 363 ************************************************************************/
364 364
365typedef union ii_iiwa_u { 365typedef union ii_iiwa_u {
366 uint64_t ii_iiwa_regval; 366 u64 ii_iiwa_regval;
367 struct { 367 struct {
368 uint64_t i_w0_iac:1; 368 u64 i_w0_iac:1;
369 uint64_t i_rsvd_1:7; 369 u64 i_rsvd_1:7;
370 uint64_t i_wx_iac:8; 370 u64 i_wx_iac:8;
371 uint64_t i_rsvd:48; 371 u64 i_rsvd:48;
372 } ii_iiwa_fld_s; 372 } ii_iiwa_fld_s;
373} ii_iiwa_u_t; 373} ii_iiwa_u_t;
374 374
@@ -392,16 +392,16 @@ typedef union ii_iiwa_u {
392 ************************************************************************/ 392 ************************************************************************/
393 393
394typedef union ii_iidem_u { 394typedef union ii_iidem_u {
395 uint64_t ii_iidem_regval; 395 u64 ii_iidem_regval;
396 struct { 396 struct {
397 uint64_t i_w8_dxs:8; 397 u64 i_w8_dxs:8;
398 uint64_t i_w9_dxs:8; 398 u64 i_w9_dxs:8;
399 uint64_t i_wa_dxs:8; 399 u64 i_wa_dxs:8;
400 uint64_t i_wb_dxs:8; 400 u64 i_wb_dxs:8;
401 uint64_t i_wc_dxs:8; 401 u64 i_wc_dxs:8;
402 uint64_t i_wd_dxs:8; 402 u64 i_wd_dxs:8;
403 uint64_t i_we_dxs:8; 403 u64 i_we_dxs:8;
404 uint64_t i_wf_dxs:8; 404 u64 i_wf_dxs:8;
405 } ii_iidem_fld_s; 405 } ii_iidem_fld_s;
406} ii_iidem_u_t; 406} ii_iidem_u_t;
407 407
@@ -413,22 +413,22 @@ typedef union ii_iidem_u {
413 ************************************************************************/ 413 ************************************************************************/
414 414
415typedef union ii_ilcsr_u { 415typedef union ii_ilcsr_u {
416 uint64_t ii_ilcsr_regval; 416 u64 ii_ilcsr_regval;
417 struct { 417 struct {
418 uint64_t i_nullto:6; 418 u64 i_nullto:6;
419 uint64_t i_rsvd_4:2; 419 u64 i_rsvd_4:2;
420 uint64_t i_wrmrst:1; 420 u64 i_wrmrst:1;
421 uint64_t i_rsvd_3:1; 421 u64 i_rsvd_3:1;
422 uint64_t i_llp_en:1; 422 u64 i_llp_en:1;
423 uint64_t i_bm8:1; 423 u64 i_bm8:1;
424 uint64_t i_llp_stat:2; 424 u64 i_llp_stat:2;
425 uint64_t i_remote_power:1; 425 u64 i_remote_power:1;
426 uint64_t i_rsvd_2:1; 426 u64 i_rsvd_2:1;
427 uint64_t i_maxrtry:10; 427 u64 i_maxrtry:10;
428 uint64_t i_d_avail_sel:2; 428 u64 i_d_avail_sel:2;
429 uint64_t i_rsvd_1:4; 429 u64 i_rsvd_1:4;
430 uint64_t i_maxbrst:10; 430 u64 i_maxbrst:10;
431 uint64_t i_rsvd:22; 431 u64 i_rsvd:22;
432 432
433 } ii_ilcsr_fld_s; 433 } ii_ilcsr_fld_s;
434} ii_ilcsr_u_t; 434} ii_ilcsr_u_t;
@@ -441,11 +441,11 @@ typedef union ii_ilcsr_u {
441 ************************************************************************/ 441 ************************************************************************/
442 442
443typedef union ii_illr_u { 443typedef union ii_illr_u {
444 uint64_t ii_illr_regval; 444 u64 ii_illr_regval;
445 struct { 445 struct {
446 uint64_t i_sn_cnt:16; 446 u64 i_sn_cnt:16;
447 uint64_t i_cb_cnt:16; 447 u64 i_cb_cnt:16;
448 uint64_t i_rsvd:32; 448 u64 i_rsvd:32;
449 } ii_illr_fld_s; 449 } ii_illr_fld_s;
450} ii_illr_u_t; 450} ii_illr_u_t;
451 451
@@ -464,19 +464,19 @@ typedef union ii_illr_u {
464 ************************************************************************/ 464 ************************************************************************/
465 465
466typedef union ii_iidsr_u { 466typedef union ii_iidsr_u {
467 uint64_t ii_iidsr_regval; 467 u64 ii_iidsr_regval;
468 struct { 468 struct {
469 uint64_t i_level:8; 469 u64 i_level:8;
470 uint64_t i_pi_id:1; 470 u64 i_pi_id:1;
471 uint64_t i_node:11; 471 u64 i_node:11;
472 uint64_t i_rsvd_3:4; 472 u64 i_rsvd_3:4;
473 uint64_t i_enable:1; 473 u64 i_enable:1;
474 uint64_t i_rsvd_2:3; 474 u64 i_rsvd_2:3;
475 uint64_t i_int_sent:2; 475 u64 i_int_sent:2;
476 uint64_t i_rsvd_1:2; 476 u64 i_rsvd_1:2;
477 uint64_t i_pi0_forward_int:1; 477 u64 i_pi0_forward_int:1;
478 uint64_t i_pi1_forward_int:1; 478 u64 i_pi1_forward_int:1;
479 uint64_t i_rsvd:30; 479 u64 i_rsvd:30;
480 } ii_iidsr_fld_s; 480 } ii_iidsr_fld_s;
481} ii_iidsr_u_t; 481} ii_iidsr_u_t;
482 482
@@ -492,13 +492,13 @@ typedef union ii_iidsr_u {
492 ************************************************************************/ 492 ************************************************************************/
493 493
494typedef union ii_igfx0_u { 494typedef union ii_igfx0_u {
495 uint64_t ii_igfx0_regval; 495 u64 ii_igfx0_regval;
496 struct { 496 struct {
497 uint64_t i_w_num:4; 497 u64 i_w_num:4;
498 uint64_t i_pi_id:1; 498 u64 i_pi_id:1;
499 uint64_t i_n_num:12; 499 u64 i_n_num:12;
500 uint64_t i_p_num:1; 500 u64 i_p_num:1;
501 uint64_t i_rsvd:46; 501 u64 i_rsvd:46;
502 } ii_igfx0_fld_s; 502 } ii_igfx0_fld_s;
503} ii_igfx0_u_t; 503} ii_igfx0_u_t;
504 504
@@ -514,13 +514,13 @@ typedef union ii_igfx0_u {
514 ************************************************************************/ 514 ************************************************************************/
515 515
516typedef union ii_igfx1_u { 516typedef union ii_igfx1_u {
517 uint64_t ii_igfx1_regval; 517 u64 ii_igfx1_regval;
518 struct { 518 struct {
519 uint64_t i_w_num:4; 519 u64 i_w_num:4;
520 uint64_t i_pi_id:1; 520 u64 i_pi_id:1;
521 uint64_t i_n_num:12; 521 u64 i_n_num:12;
522 uint64_t i_p_num:1; 522 u64 i_p_num:1;
523 uint64_t i_rsvd:46; 523 u64 i_rsvd:46;
524 } ii_igfx1_fld_s; 524 } ii_igfx1_fld_s;
525} ii_igfx1_u_t; 525} ii_igfx1_u_t;
526 526
@@ -532,9 +532,9 @@ typedef union ii_igfx1_u {
532 ************************************************************************/ 532 ************************************************************************/
533 533
534typedef union ii_iscr0_u { 534typedef union ii_iscr0_u {
535 uint64_t ii_iscr0_regval; 535 u64 ii_iscr0_regval;
536 struct { 536 struct {
537 uint64_t i_scratch:64; 537 u64 i_scratch:64;
538 } ii_iscr0_fld_s; 538 } ii_iscr0_fld_s;
539} ii_iscr0_u_t; 539} ii_iscr0_u_t;
540 540
@@ -546,9 +546,9 @@ typedef union ii_iscr0_u {
546 ************************************************************************/ 546 ************************************************************************/
547 547
548typedef union ii_iscr1_u { 548typedef union ii_iscr1_u {
549 uint64_t ii_iscr1_regval; 549 u64 ii_iscr1_regval;
550 struct { 550 struct {
551 uint64_t i_scratch:64; 551 u64 i_scratch:64;
552 } ii_iscr1_fld_s; 552 } ii_iscr1_fld_s;
553} ii_iscr1_u_t; 553} ii_iscr1_u_t;
554 554
@@ -580,13 +580,13 @@ typedef union ii_iscr1_u {
580 ************************************************************************/ 580 ************************************************************************/
581 581
582typedef union ii_itte1_u { 582typedef union ii_itte1_u {
583 uint64_t ii_itte1_regval; 583 u64 ii_itte1_regval;
584 struct { 584 struct {
585 uint64_t i_offset:5; 585 u64 i_offset:5;
586 uint64_t i_rsvd_1:3; 586 u64 i_rsvd_1:3;
587 uint64_t i_w_num:4; 587 u64 i_w_num:4;
588 uint64_t i_iosp:1; 588 u64 i_iosp:1;
589 uint64_t i_rsvd:51; 589 u64 i_rsvd:51;
590 } ii_itte1_fld_s; 590 } ii_itte1_fld_s;
591} ii_itte1_u_t; 591} ii_itte1_u_t;
592 592
@@ -618,13 +618,13 @@ typedef union ii_itte1_u {
618 ************************************************************************/ 618 ************************************************************************/
619 619
620typedef union ii_itte2_u { 620typedef union ii_itte2_u {
621 uint64_t ii_itte2_regval; 621 u64 ii_itte2_regval;
622 struct { 622 struct {
623 uint64_t i_offset:5; 623 u64 i_offset:5;
624 uint64_t i_rsvd_1:3; 624 u64 i_rsvd_1:3;
625 uint64_t i_w_num:4; 625 u64 i_w_num:4;
626 uint64_t i_iosp:1; 626 u64 i_iosp:1;
627 uint64_t i_rsvd:51; 627 u64 i_rsvd:51;
628 } ii_itte2_fld_s; 628 } ii_itte2_fld_s;
629} ii_itte2_u_t; 629} ii_itte2_u_t;
630 630
@@ -656,13 +656,13 @@ typedef union ii_itte2_u {
656 ************************************************************************/ 656 ************************************************************************/
657 657
658typedef union ii_itte3_u { 658typedef union ii_itte3_u {
659 uint64_t ii_itte3_regval; 659 u64 ii_itte3_regval;
660 struct { 660 struct {
661 uint64_t i_offset:5; 661 u64 i_offset:5;
662 uint64_t i_rsvd_1:3; 662 u64 i_rsvd_1:3;
663 uint64_t i_w_num:4; 663 u64 i_w_num:4;
664 uint64_t i_iosp:1; 664 u64 i_iosp:1;
665 uint64_t i_rsvd:51; 665 u64 i_rsvd:51;
666 } ii_itte3_fld_s; 666 } ii_itte3_fld_s;
667} ii_itte3_u_t; 667} ii_itte3_u_t;
668 668
@@ -694,13 +694,13 @@ typedef union ii_itte3_u {
694 ************************************************************************/ 694 ************************************************************************/
695 695
696typedef union ii_itte4_u { 696typedef union ii_itte4_u {
697 uint64_t ii_itte4_regval; 697 u64 ii_itte4_regval;
698 struct { 698 struct {
699 uint64_t i_offset:5; 699 u64 i_offset:5;
700 uint64_t i_rsvd_1:3; 700 u64 i_rsvd_1:3;
701 uint64_t i_w_num:4; 701 u64 i_w_num:4;
702 uint64_t i_iosp:1; 702 u64 i_iosp:1;
703 uint64_t i_rsvd:51; 703 u64 i_rsvd:51;
704 } ii_itte4_fld_s; 704 } ii_itte4_fld_s;
705} ii_itte4_u_t; 705} ii_itte4_u_t;
706 706
@@ -732,13 +732,13 @@ typedef union ii_itte4_u {
732 ************************************************************************/ 732 ************************************************************************/
733 733
734typedef union ii_itte5_u { 734typedef union ii_itte5_u {
735 uint64_t ii_itte5_regval; 735 u64 ii_itte5_regval;
736 struct { 736 struct {
737 uint64_t i_offset:5; 737 u64 i_offset:5;
738 uint64_t i_rsvd_1:3; 738 u64 i_rsvd_1:3;
739 uint64_t i_w_num:4; 739 u64 i_w_num:4;
740 uint64_t i_iosp:1; 740 u64 i_iosp:1;
741 uint64_t i_rsvd:51; 741 u64 i_rsvd:51;
742 } ii_itte5_fld_s; 742 } ii_itte5_fld_s;
743} ii_itte5_u_t; 743} ii_itte5_u_t;
744 744
@@ -770,13 +770,13 @@ typedef union ii_itte5_u {
770 ************************************************************************/ 770 ************************************************************************/
771 771
772typedef union ii_itte6_u { 772typedef union ii_itte6_u {
773 uint64_t ii_itte6_regval; 773 u64 ii_itte6_regval;
774 struct { 774 struct {
775 uint64_t i_offset:5; 775 u64 i_offset:5;
776 uint64_t i_rsvd_1:3; 776 u64 i_rsvd_1:3;
777 uint64_t i_w_num:4; 777 u64 i_w_num:4;
778 uint64_t i_iosp:1; 778 u64 i_iosp:1;
779 uint64_t i_rsvd:51; 779 u64 i_rsvd:51;
780 } ii_itte6_fld_s; 780 } ii_itte6_fld_s;
781} ii_itte6_u_t; 781} ii_itte6_u_t;
782 782
@@ -808,13 +808,13 @@ typedef union ii_itte6_u {
808 ************************************************************************/ 808 ************************************************************************/
809 809
810typedef union ii_itte7_u { 810typedef union ii_itte7_u {
811 uint64_t ii_itte7_regval; 811 u64 ii_itte7_regval;
812 struct { 812 struct {
813 uint64_t i_offset:5; 813 u64 i_offset:5;
814 uint64_t i_rsvd_1:3; 814 u64 i_rsvd_1:3;
815 uint64_t i_w_num:4; 815 u64 i_w_num:4;
816 uint64_t i_iosp:1; 816 u64 i_iosp:1;
817 uint64_t i_rsvd:51; 817 u64 i_rsvd:51;
818 } ii_itte7_fld_s; 818 } ii_itte7_fld_s;
819} ii_itte7_u_t; 819} ii_itte7_u_t;
820 820
@@ -843,22 +843,22 @@ typedef union ii_itte7_u {
843 ************************************************************************/ 843 ************************************************************************/
844 844
845typedef union ii_iprb0_u { 845typedef union ii_iprb0_u {
846 uint64_t ii_iprb0_regval; 846 u64 ii_iprb0_regval;
847 struct { 847 struct {
848 uint64_t i_c:8; 848 u64 i_c:8;
849 uint64_t i_na:14; 849 u64 i_na:14;
850 uint64_t i_rsvd_2:2; 850 u64 i_rsvd_2:2;
851 uint64_t i_nb:14; 851 u64 i_nb:14;
852 uint64_t i_rsvd_1:2; 852 u64 i_rsvd_1:2;
853 uint64_t i_m:2; 853 u64 i_m:2;
854 uint64_t i_f:1; 854 u64 i_f:1;
855 uint64_t i_of_cnt:5; 855 u64 i_of_cnt:5;
856 uint64_t i_error:1; 856 u64 i_error:1;
857 uint64_t i_rd_to:1; 857 u64 i_rd_to:1;
858 uint64_t i_spur_wr:1; 858 u64 i_spur_wr:1;
859 uint64_t i_spur_rd:1; 859 u64 i_spur_rd:1;
860 uint64_t i_rsvd:11; 860 u64 i_rsvd:11;
861 uint64_t i_mult_err:1; 861 u64 i_mult_err:1;
862 } ii_iprb0_fld_s; 862 } ii_iprb0_fld_s;
863} ii_iprb0_u_t; 863} ii_iprb0_u_t;
864 864
@@ -887,22 +887,22 @@ typedef union ii_iprb0_u {
887 ************************************************************************/ 887 ************************************************************************/
888 888
889typedef union ii_iprb8_u { 889typedef union ii_iprb8_u {
890 uint64_t ii_iprb8_regval; 890 u64 ii_iprb8_regval;
891 struct { 891 struct {
892 uint64_t i_c:8; 892 u64 i_c:8;
893 uint64_t i_na:14; 893 u64 i_na:14;
894 uint64_t i_rsvd_2:2; 894 u64 i_rsvd_2:2;
895 uint64_t i_nb:14; 895 u64 i_nb:14;
896 uint64_t i_rsvd_1:2; 896 u64 i_rsvd_1:2;
897 uint64_t i_m:2; 897 u64 i_m:2;
898 uint64_t i_f:1; 898 u64 i_f:1;
899 uint64_t i_of_cnt:5; 899 u64 i_of_cnt:5;
900 uint64_t i_error:1; 900 u64 i_error:1;
901 uint64_t i_rd_to:1; 901 u64 i_rd_to:1;
902 uint64_t i_spur_wr:1; 902 u64 i_spur_wr:1;
903 uint64_t i_spur_rd:1; 903 u64 i_spur_rd:1;
904 uint64_t i_rsvd:11; 904 u64 i_rsvd:11;
905 uint64_t i_mult_err:1; 905 u64 i_mult_err:1;
906 } ii_iprb8_fld_s; 906 } ii_iprb8_fld_s;
907} ii_iprb8_u_t; 907} ii_iprb8_u_t;
908 908
@@ -931,22 +931,22 @@ typedef union ii_iprb8_u {
931 ************************************************************************/ 931 ************************************************************************/
932 932
933typedef union ii_iprb9_u { 933typedef union ii_iprb9_u {
934 uint64_t ii_iprb9_regval; 934 u64 ii_iprb9_regval;
935 struct { 935 struct {
936 uint64_t i_c:8; 936 u64 i_c:8;
937 uint64_t i_na:14; 937 u64 i_na:14;
938 uint64_t i_rsvd_2:2; 938 u64 i_rsvd_2:2;
939 uint64_t i_nb:14; 939 u64 i_nb:14;
940 uint64_t i_rsvd_1:2; 940 u64 i_rsvd_1:2;
941 uint64_t i_m:2; 941 u64 i_m:2;
942 uint64_t i_f:1; 942 u64 i_f:1;
943 uint64_t i_of_cnt:5; 943 u64 i_of_cnt:5;
944 uint64_t i_error:1; 944 u64 i_error:1;
945 uint64_t i_rd_to:1; 945 u64 i_rd_to:1;
946 uint64_t i_spur_wr:1; 946 u64 i_spur_wr:1;
947 uint64_t i_spur_rd:1; 947 u64 i_spur_rd:1;
948 uint64_t i_rsvd:11; 948 u64 i_rsvd:11;
949 uint64_t i_mult_err:1; 949 u64 i_mult_err:1;
950 } ii_iprb9_fld_s; 950 } ii_iprb9_fld_s;
951} ii_iprb9_u_t; 951} ii_iprb9_u_t;
952 952
@@ -975,22 +975,22 @@ typedef union ii_iprb9_u {
975 ************************************************************************/ 975 ************************************************************************/
976 976
977typedef union ii_iprba_u { 977typedef union ii_iprba_u {
978 uint64_t ii_iprba_regval; 978 u64 ii_iprba_regval;
979 struct { 979 struct {
980 uint64_t i_c:8; 980 u64 i_c:8;
981 uint64_t i_na:14; 981 u64 i_na:14;
982 uint64_t i_rsvd_2:2; 982 u64 i_rsvd_2:2;
983 uint64_t i_nb:14; 983 u64 i_nb:14;
984 uint64_t i_rsvd_1:2; 984 u64 i_rsvd_1:2;
985 uint64_t i_m:2; 985 u64 i_m:2;
986 uint64_t i_f:1; 986 u64 i_f:1;
987 uint64_t i_of_cnt:5; 987 u64 i_of_cnt:5;
988 uint64_t i_error:1; 988 u64 i_error:1;
989 uint64_t i_rd_to:1; 989 u64 i_rd_to:1;
990 uint64_t i_spur_wr:1; 990 u64 i_spur_wr:1;
991 uint64_t i_spur_rd:1; 991 u64 i_spur_rd:1;
992 uint64_t i_rsvd:11; 992 u64 i_rsvd:11;
993 uint64_t i_mult_err:1; 993 u64 i_mult_err:1;
994 } ii_iprba_fld_s; 994 } ii_iprba_fld_s;
995} ii_iprba_u_t; 995} ii_iprba_u_t;
996 996
@@ -1019,22 +1019,22 @@ typedef union ii_iprba_u {
1019 ************************************************************************/ 1019 ************************************************************************/
1020 1020
1021typedef union ii_iprbb_u { 1021typedef union ii_iprbb_u {
1022 uint64_t ii_iprbb_regval; 1022 u64 ii_iprbb_regval;
1023 struct { 1023 struct {
1024 uint64_t i_c:8; 1024 u64 i_c:8;
1025 uint64_t i_na:14; 1025 u64 i_na:14;
1026 uint64_t i_rsvd_2:2; 1026 u64 i_rsvd_2:2;
1027 uint64_t i_nb:14; 1027 u64 i_nb:14;
1028 uint64_t i_rsvd_1:2; 1028 u64 i_rsvd_1:2;
1029 uint64_t i_m:2; 1029 u64 i_m:2;
1030 uint64_t i_f:1; 1030 u64 i_f:1;
1031 uint64_t i_of_cnt:5; 1031 u64 i_of_cnt:5;
1032 uint64_t i_error:1; 1032 u64 i_error:1;
1033 uint64_t i_rd_to:1; 1033 u64 i_rd_to:1;
1034 uint64_t i_spur_wr:1; 1034 u64 i_spur_wr:1;
1035 uint64_t i_spur_rd:1; 1035 u64 i_spur_rd:1;
1036 uint64_t i_rsvd:11; 1036 u64 i_rsvd:11;
1037 uint64_t i_mult_err:1; 1037 u64 i_mult_err:1;
1038 } ii_iprbb_fld_s; 1038 } ii_iprbb_fld_s;
1039} ii_iprbb_u_t; 1039} ii_iprbb_u_t;
1040 1040
@@ -1063,22 +1063,22 @@ typedef union ii_iprbb_u {
1063 ************************************************************************/ 1063 ************************************************************************/
1064 1064
1065typedef union ii_iprbc_u { 1065typedef union ii_iprbc_u {
1066 uint64_t ii_iprbc_regval; 1066 u64 ii_iprbc_regval;
1067 struct { 1067 struct {
1068 uint64_t i_c:8; 1068 u64 i_c:8;
1069 uint64_t i_na:14; 1069 u64 i_na:14;
1070 uint64_t i_rsvd_2:2; 1070 u64 i_rsvd_2:2;
1071 uint64_t i_nb:14; 1071 u64 i_nb:14;
1072 uint64_t i_rsvd_1:2; 1072 u64 i_rsvd_1:2;
1073 uint64_t i_m:2; 1073 u64 i_m:2;
1074 uint64_t i_f:1; 1074 u64 i_f:1;
1075 uint64_t i_of_cnt:5; 1075 u64 i_of_cnt:5;
1076 uint64_t i_error:1; 1076 u64 i_error:1;
1077 uint64_t i_rd_to:1; 1077 u64 i_rd_to:1;
1078 uint64_t i_spur_wr:1; 1078 u64 i_spur_wr:1;
1079 uint64_t i_spur_rd:1; 1079 u64 i_spur_rd:1;
1080 uint64_t i_rsvd:11; 1080 u64 i_rsvd:11;
1081 uint64_t i_mult_err:1; 1081 u64 i_mult_err:1;
1082 } ii_iprbc_fld_s; 1082 } ii_iprbc_fld_s;
1083} ii_iprbc_u_t; 1083} ii_iprbc_u_t;
1084 1084
@@ -1107,22 +1107,22 @@ typedef union ii_iprbc_u {
1107 ************************************************************************/ 1107 ************************************************************************/
1108 1108
1109typedef union ii_iprbd_u { 1109typedef union ii_iprbd_u {
1110 uint64_t ii_iprbd_regval; 1110 u64 ii_iprbd_regval;
1111 struct { 1111 struct {
1112 uint64_t i_c:8; 1112 u64 i_c:8;
1113 uint64_t i_na:14; 1113 u64 i_na:14;
1114 uint64_t i_rsvd_2:2; 1114 u64 i_rsvd_2:2;
1115 uint64_t i_nb:14; 1115 u64 i_nb:14;
1116 uint64_t i_rsvd_1:2; 1116 u64 i_rsvd_1:2;
1117 uint64_t i_m:2; 1117 u64 i_m:2;
1118 uint64_t i_f:1; 1118 u64 i_f:1;
1119 uint64_t i_of_cnt:5; 1119 u64 i_of_cnt:5;
1120 uint64_t i_error:1; 1120 u64 i_error:1;
1121 uint64_t i_rd_to:1; 1121 u64 i_rd_to:1;
1122 uint64_t i_spur_wr:1; 1122 u64 i_spur_wr:1;
1123 uint64_t i_spur_rd:1; 1123 u64 i_spur_rd:1;
1124 uint64_t i_rsvd:11; 1124 u64 i_rsvd:11;
1125 uint64_t i_mult_err:1; 1125 u64 i_mult_err:1;
1126 } ii_iprbd_fld_s; 1126 } ii_iprbd_fld_s;
1127} ii_iprbd_u_t; 1127} ii_iprbd_u_t;
1128 1128
@@ -1151,22 +1151,22 @@ typedef union ii_iprbd_u {
1151 ************************************************************************/ 1151 ************************************************************************/
1152 1152
1153typedef union ii_iprbe_u { 1153typedef union ii_iprbe_u {
1154 uint64_t ii_iprbe_regval; 1154 u64 ii_iprbe_regval;
1155 struct { 1155 struct {
1156 uint64_t i_c:8; 1156 u64 i_c:8;
1157 uint64_t i_na:14; 1157 u64 i_na:14;
1158 uint64_t i_rsvd_2:2; 1158 u64 i_rsvd_2:2;
1159 uint64_t i_nb:14; 1159 u64 i_nb:14;
1160 uint64_t i_rsvd_1:2; 1160 u64 i_rsvd_1:2;
1161 uint64_t i_m:2; 1161 u64 i_m:2;
1162 uint64_t i_f:1; 1162 u64 i_f:1;
1163 uint64_t i_of_cnt:5; 1163 u64 i_of_cnt:5;
1164 uint64_t i_error:1; 1164 u64 i_error:1;
1165 uint64_t i_rd_to:1; 1165 u64 i_rd_to:1;
1166 uint64_t i_spur_wr:1; 1166 u64 i_spur_wr:1;
1167 uint64_t i_spur_rd:1; 1167 u64 i_spur_rd:1;
1168 uint64_t i_rsvd:11; 1168 u64 i_rsvd:11;
1169 uint64_t i_mult_err:1; 1169 u64 i_mult_err:1;
1170 } ii_iprbe_fld_s; 1170 } ii_iprbe_fld_s;
1171} ii_iprbe_u_t; 1171} ii_iprbe_u_t;
1172 1172
@@ -1195,22 +1195,22 @@ typedef union ii_iprbe_u {
1195 ************************************************************************/ 1195 ************************************************************************/
1196 1196
1197typedef union ii_iprbf_u { 1197typedef union ii_iprbf_u {
1198 uint64_t ii_iprbf_regval; 1198 u64 ii_iprbf_regval;
1199 struct { 1199 struct {
1200 uint64_t i_c:8; 1200 u64 i_c:8;
1201 uint64_t i_na:14; 1201 u64 i_na:14;
1202 uint64_t i_rsvd_2:2; 1202 u64 i_rsvd_2:2;
1203 uint64_t i_nb:14; 1203 u64 i_nb:14;
1204 uint64_t i_rsvd_1:2; 1204 u64 i_rsvd_1:2;
1205 uint64_t i_m:2; 1205 u64 i_m:2;
1206 uint64_t i_f:1; 1206 u64 i_f:1;
1207 uint64_t i_of_cnt:5; 1207 u64 i_of_cnt:5;
1208 uint64_t i_error:1; 1208 u64 i_error:1;
1209 uint64_t i_rd_to:1; 1209 u64 i_rd_to:1;
1210 uint64_t i_spur_wr:1; 1210 u64 i_spur_wr:1;
1211 uint64_t i_spur_rd:1; 1211 u64 i_spur_rd:1;
1212 uint64_t i_rsvd:11; 1212 u64 i_rsvd:11;
1213 uint64_t i_mult_err:1; 1213 u64 i_mult_err:1;
1214 } ii_iprbe_fld_s; 1214 } ii_iprbe_fld_s;
1215} ii_iprbf_u_t; 1215} ii_iprbf_u_t;
1216 1216
@@ -1232,10 +1232,10 @@ typedef union ii_iprbf_u {
1232 ************************************************************************/ 1232 ************************************************************************/
1233 1233
1234typedef union ii_ixcc_u { 1234typedef union ii_ixcc_u {
1235 uint64_t ii_ixcc_regval; 1235 u64 ii_ixcc_regval;
1236 struct { 1236 struct {
1237 uint64_t i_time_out:26; 1237 u64 i_time_out:26;
1238 uint64_t i_rsvd:38; 1238 u64 i_rsvd:38;
1239 } ii_ixcc_fld_s; 1239 } ii_ixcc_fld_s;
1240} ii_ixcc_u_t; 1240} ii_ixcc_u_t;
1241 1241
@@ -1256,16 +1256,16 @@ typedef union ii_ixcc_u {
1256 ************************************************************************/ 1256 ************************************************************************/
1257 1257
1258typedef union ii_imem_u { 1258typedef union ii_imem_u {
1259 uint64_t ii_imem_regval; 1259 u64 ii_imem_regval;
1260 struct { 1260 struct {
1261 uint64_t i_w0_esd:1; 1261 u64 i_w0_esd:1;
1262 uint64_t i_rsvd_3:3; 1262 u64 i_rsvd_3:3;
1263 uint64_t i_b0_esd:1; 1263 u64 i_b0_esd:1;
1264 uint64_t i_rsvd_2:3; 1264 u64 i_rsvd_2:3;
1265 uint64_t i_b1_esd:1; 1265 u64 i_b1_esd:1;
1266 uint64_t i_rsvd_1:3; 1266 u64 i_rsvd_1:3;
1267 uint64_t i_clr_precise:1; 1267 u64 i_clr_precise:1;
1268 uint64_t i_rsvd:51; 1268 u64 i_rsvd:51;
1269 } ii_imem_fld_s; 1269 } ii_imem_fld_s;
1270} ii_imem_u_t; 1270} ii_imem_u_t;
1271 1271
@@ -1294,13 +1294,13 @@ typedef union ii_imem_u {
1294 ************************************************************************/ 1294 ************************************************************************/
1295 1295
1296typedef union ii_ixtt_u { 1296typedef union ii_ixtt_u {
1297 uint64_t ii_ixtt_regval; 1297 u64 ii_ixtt_regval;
1298 struct { 1298 struct {
1299 uint64_t i_tail_to:26; 1299 u64 i_tail_to:26;
1300 uint64_t i_rsvd_1:6; 1300 u64 i_rsvd_1:6;
1301 uint64_t i_rrsp_ps:23; 1301 u64 i_rrsp_ps:23;
1302 uint64_t i_rrsp_to:5; 1302 u64 i_rrsp_to:5;
1303 uint64_t i_rsvd:4; 1303 u64 i_rsvd:4;
1304 } ii_ixtt_fld_s; 1304 } ii_ixtt_fld_s;
1305} ii_ixtt_u_t; 1305} ii_ixtt_u_t;
1306 1306
@@ -1316,37 +1316,37 @@ typedef union ii_ixtt_u {
1316 ************************************************************************/ 1316 ************************************************************************/
1317 1317
1318typedef union ii_ieclr_u { 1318typedef union ii_ieclr_u {
1319 uint64_t ii_ieclr_regval; 1319 u64 ii_ieclr_regval;
1320 struct { 1320 struct {
1321 uint64_t i_e_prb_0:1; 1321 u64 i_e_prb_0:1;
1322 uint64_t i_rsvd:7; 1322 u64 i_rsvd:7;
1323 uint64_t i_e_prb_8:1; 1323 u64 i_e_prb_8:1;
1324 uint64_t i_e_prb_9:1; 1324 u64 i_e_prb_9:1;
1325 uint64_t i_e_prb_a:1; 1325 u64 i_e_prb_a:1;
1326 uint64_t i_e_prb_b:1; 1326 u64 i_e_prb_b:1;
1327 uint64_t i_e_prb_c:1; 1327 u64 i_e_prb_c:1;
1328 uint64_t i_e_prb_d:1; 1328 u64 i_e_prb_d:1;
1329 uint64_t i_e_prb_e:1; 1329 u64 i_e_prb_e:1;
1330 uint64_t i_e_prb_f:1; 1330 u64 i_e_prb_f:1;
1331 uint64_t i_e_crazy:1; 1331 u64 i_e_crazy:1;
1332 uint64_t i_e_bte_0:1; 1332 u64 i_e_bte_0:1;
1333 uint64_t i_e_bte_1:1; 1333 u64 i_e_bte_1:1;
1334 uint64_t i_reserved_1:10; 1334 u64 i_reserved_1:10;
1335 uint64_t i_spur_rd_hdr:1; 1335 u64 i_spur_rd_hdr:1;
1336 uint64_t i_cam_intr_to:1; 1336 u64 i_cam_intr_to:1;
1337 uint64_t i_cam_overflow:1; 1337 u64 i_cam_overflow:1;
1338 uint64_t i_cam_read_miss:1; 1338 u64 i_cam_read_miss:1;
1339 uint64_t i_ioq_rep_underflow:1; 1339 u64 i_ioq_rep_underflow:1;
1340 uint64_t i_ioq_req_underflow:1; 1340 u64 i_ioq_req_underflow:1;
1341 uint64_t i_ioq_rep_overflow:1; 1341 u64 i_ioq_rep_overflow:1;
1342 uint64_t i_ioq_req_overflow:1; 1342 u64 i_ioq_req_overflow:1;
1343 uint64_t i_iiq_rep_overflow:1; 1343 u64 i_iiq_rep_overflow:1;
1344 uint64_t i_iiq_req_overflow:1; 1344 u64 i_iiq_req_overflow:1;
1345 uint64_t i_ii_xn_rep_cred_overflow:1; 1345 u64 i_ii_xn_rep_cred_overflow:1;
1346 uint64_t i_ii_xn_req_cred_overflow:1; 1346 u64 i_ii_xn_req_cred_overflow:1;
1347 uint64_t i_ii_xn_invalid_cmd:1; 1347 u64 i_ii_xn_invalid_cmd:1;
1348 uint64_t i_xn_ii_invalid_cmd:1; 1348 u64 i_xn_ii_invalid_cmd:1;
1349 uint64_t i_reserved_2:21; 1349 u64 i_reserved_2:21;
1350 } ii_ieclr_fld_s; 1350 } ii_ieclr_fld_s;
1351} ii_ieclr_u_t; 1351} ii_ieclr_u_t;
1352 1352
@@ -1360,12 +1360,12 @@ typedef union ii_ieclr_u {
1360 ************************************************************************/ 1360 ************************************************************************/
1361 1361
1362typedef union ii_ibcr_u { 1362typedef union ii_ibcr_u {
1363 uint64_t ii_ibcr_regval; 1363 u64 ii_ibcr_regval;
1364 struct { 1364 struct {
1365 uint64_t i_count:4; 1365 u64 i_count:4;
1366 uint64_t i_rsvd_1:4; 1366 u64 i_rsvd_1:4;
1367 uint64_t i_soft_reset:1; 1367 u64 i_soft_reset:1;
1368 uint64_t i_rsvd:55; 1368 u64 i_rsvd:55;
1369 } ii_ibcr_fld_s; 1369 } ii_ibcr_fld_s;
1370} ii_ibcr_u_t; 1370} ii_ibcr_u_t;
1371 1371
@@ -1399,22 +1399,22 @@ typedef union ii_ibcr_u {
1399 ************************************************************************/ 1399 ************************************************************************/
1400 1400
1401typedef union ii_ixsm_u { 1401typedef union ii_ixsm_u {
1402 uint64_t ii_ixsm_regval; 1402 u64 ii_ixsm_regval;
1403 struct { 1403 struct {
1404 uint64_t i_byte_en:32; 1404 u64 i_byte_en:32;
1405 uint64_t i_reserved:1; 1405 u64 i_reserved:1;
1406 uint64_t i_tag:3; 1406 u64 i_tag:3;
1407 uint64_t i_alt_pactyp:4; 1407 u64 i_alt_pactyp:4;
1408 uint64_t i_bo:1; 1408 u64 i_bo:1;
1409 uint64_t i_error:1; 1409 u64 i_error:1;
1410 uint64_t i_vbpm:1; 1410 u64 i_vbpm:1;
1411 uint64_t i_gbr:1; 1411 u64 i_gbr:1;
1412 uint64_t i_ds:2; 1412 u64 i_ds:2;
1413 uint64_t i_ct:1; 1413 u64 i_ct:1;
1414 uint64_t i_tnum:5; 1414 u64 i_tnum:5;
1415 uint64_t i_pactyp:4; 1415 u64 i_pactyp:4;
1416 uint64_t i_sidn:4; 1416 u64 i_sidn:4;
1417 uint64_t i_didn:4; 1417 u64 i_didn:4;
1418 } ii_ixsm_fld_s; 1418 } ii_ixsm_fld_s;
1419} ii_ixsm_u_t; 1419} ii_ixsm_u_t;
1420 1420
@@ -1426,11 +1426,11 @@ typedef union ii_ixsm_u {
1426 ************************************************************************/ 1426 ************************************************************************/
1427 1427
1428typedef union ii_ixss_u { 1428typedef union ii_ixss_u {
1429 uint64_t ii_ixss_regval; 1429 u64 ii_ixss_regval;
1430 struct { 1430 struct {
1431 uint64_t i_sideband:8; 1431 u64 i_sideband:8;
1432 uint64_t i_rsvd:55; 1432 u64 i_rsvd:55;
1433 uint64_t i_valid:1; 1433 u64 i_valid:1;
1434 } ii_ixss_fld_s; 1434 } ii_ixss_fld_s;
1435} ii_ixss_u_t; 1435} ii_ixss_u_t;
1436 1436
@@ -1447,17 +1447,17 @@ typedef union ii_ixss_u {
1447 ************************************************************************/ 1447 ************************************************************************/
1448 1448
1449typedef union ii_ilct_u { 1449typedef union ii_ilct_u {
1450 uint64_t ii_ilct_regval; 1450 u64 ii_ilct_regval;
1451 struct { 1451 struct {
1452 uint64_t i_test_seed:20; 1452 u64 i_test_seed:20;
1453 uint64_t i_test_mask:8; 1453 u64 i_test_mask:8;
1454 uint64_t i_test_data:20; 1454 u64 i_test_data:20;
1455 uint64_t i_test_valid:1; 1455 u64 i_test_valid:1;
1456 uint64_t i_test_cberr:1; 1456 u64 i_test_cberr:1;
1457 uint64_t i_test_flit:3; 1457 u64 i_test_flit:3;
1458 uint64_t i_test_clear:1; 1458 u64 i_test_clear:1;
1459 uint64_t i_test_err_capture:1; 1459 u64 i_test_err_capture:1;
1460 uint64_t i_rsvd:9; 1460 u64 i_rsvd:9;
1461 } ii_ilct_fld_s; 1461 } ii_ilct_fld_s;
1462} ii_ilct_u_t; 1462} ii_ilct_u_t;
1463 1463
@@ -1482,20 +1482,20 @@ typedef union ii_ilct_u {
1482 ************************************************************************/ 1482 ************************************************************************/
1483 1483
1484typedef union ii_iieph1_u { 1484typedef union ii_iieph1_u {
1485 uint64_t ii_iieph1_regval; 1485 u64 ii_iieph1_regval;
1486 struct { 1486 struct {
1487 uint64_t i_command:7; 1487 u64 i_command:7;
1488 uint64_t i_rsvd_5:1; 1488 u64 i_rsvd_5:1;
1489 uint64_t i_suppl:14; 1489 u64 i_suppl:14;
1490 uint64_t i_rsvd_4:1; 1490 u64 i_rsvd_4:1;
1491 uint64_t i_source:14; 1491 u64 i_source:14;
1492 uint64_t i_rsvd_3:1; 1492 u64 i_rsvd_3:1;
1493 uint64_t i_err_type:4; 1493 u64 i_err_type:4;
1494 uint64_t i_rsvd_2:4; 1494 u64 i_rsvd_2:4;
1495 uint64_t i_overrun:1; 1495 u64 i_overrun:1;
1496 uint64_t i_rsvd_1:3; 1496 u64 i_rsvd_1:3;
1497 uint64_t i_valid:1; 1497 u64 i_valid:1;
1498 uint64_t i_rsvd:13; 1498 u64 i_rsvd:13;
1499 } ii_iieph1_fld_s; 1499 } ii_iieph1_fld_s;
1500} ii_iieph1_u_t; 1500} ii_iieph1_u_t;
1501 1501
@@ -1511,13 +1511,13 @@ typedef union ii_iieph1_u {
1511 ************************************************************************/ 1511 ************************************************************************/
1512 1512
1513typedef union ii_iieph2_u { 1513typedef union ii_iieph2_u {
1514 uint64_t ii_iieph2_regval; 1514 u64 ii_iieph2_regval;
1515 struct { 1515 struct {
1516 uint64_t i_rsvd_0:3; 1516 u64 i_rsvd_0:3;
1517 uint64_t i_address:47; 1517 u64 i_address:47;
1518 uint64_t i_rsvd_1:10; 1518 u64 i_rsvd_1:10;
1519 uint64_t i_tail:1; 1519 u64 i_tail:1;
1520 uint64_t i_rsvd:3; 1520 u64 i_rsvd:3;
1521 } ii_iieph2_fld_s; 1521 } ii_iieph2_fld_s;
1522} ii_iieph2_u_t; 1522} ii_iieph2_u_t;
1523 1523
@@ -1532,9 +1532,9 @@ typedef union ii_iieph2_u {
1532 ************************************************************************/ 1532 ************************************************************************/
1533 1533
1534typedef union ii_islapr_u { 1534typedef union ii_islapr_u {
1535 uint64_t ii_islapr_regval; 1535 u64 ii_islapr_regval;
1536 struct { 1536 struct {
1537 uint64_t i_region:64; 1537 u64 i_region:64;
1538 } ii_islapr_fld_s; 1538 } ii_islapr_fld_s;
1539} ii_islapr_u_t; 1539} ii_islapr_u_t;
1540 1540
@@ -1547,10 +1547,10 @@ typedef union ii_islapr_u {
1547 ************************************************************************/ 1547 ************************************************************************/
1548 1548
1549typedef union ii_islapo_u { 1549typedef union ii_islapo_u {
1550 uint64_t ii_islapo_regval; 1550 u64 ii_islapo_regval;
1551 struct { 1551 struct {
1552 uint64_t i_io_sbx_ovrride:56; 1552 u64 i_io_sbx_ovrride:56;
1553 uint64_t i_rsvd:8; 1553 u64 i_rsvd:8;
1554 } ii_islapo_fld_s; 1554 } ii_islapo_fld_s;
1555} ii_islapo_u_t; 1555} ii_islapo_u_t;
1556 1556
@@ -1563,14 +1563,14 @@ typedef union ii_islapo_u {
1563 ************************************************************************/ 1563 ************************************************************************/
1564 1564
1565typedef union ii_iwi_u { 1565typedef union ii_iwi_u {
1566 uint64_t ii_iwi_regval; 1566 u64 ii_iwi_regval;
1567 struct { 1567 struct {
1568 uint64_t i_prescale:24; 1568 u64 i_prescale:24;
1569 uint64_t i_rsvd:8; 1569 u64 i_rsvd:8;
1570 uint64_t i_timeout:8; 1570 u64 i_timeout:8;
1571 uint64_t i_rsvd1:8; 1571 u64 i_rsvd1:8;
1572 uint64_t i_intrpt_retry_period:8; 1572 u64 i_intrpt_retry_period:8;
1573 uint64_t i_rsvd2:8; 1573 u64 i_rsvd2:8;
1574 } ii_iwi_fld_s; 1574 } ii_iwi_fld_s;
1575} ii_iwi_u_t; 1575} ii_iwi_u_t;
1576 1576
@@ -1582,26 +1582,26 @@ typedef union ii_iwi_u {
1582 ************************************************************************/ 1582 ************************************************************************/
1583 1583
1584typedef union ii_iwel_u { 1584typedef union ii_iwel_u {
1585 uint64_t ii_iwel_regval; 1585 u64 ii_iwel_regval;
1586 struct { 1586 struct {
1587 uint64_t i_intr_timed_out:1; 1587 u64 i_intr_timed_out:1;
1588 uint64_t i_rsvd:7; 1588 u64 i_rsvd:7;
1589 uint64_t i_cam_overflow:1; 1589 u64 i_cam_overflow:1;
1590 uint64_t i_cam_read_miss:1; 1590 u64 i_cam_read_miss:1;
1591 uint64_t i_rsvd1:2; 1591 u64 i_rsvd1:2;
1592 uint64_t i_ioq_rep_underflow:1; 1592 u64 i_ioq_rep_underflow:1;
1593 uint64_t i_ioq_req_underflow:1; 1593 u64 i_ioq_req_underflow:1;
1594 uint64_t i_ioq_rep_overflow:1; 1594 u64 i_ioq_rep_overflow:1;
1595 uint64_t i_ioq_req_overflow:1; 1595 u64 i_ioq_req_overflow:1;
1596 uint64_t i_iiq_rep_overflow:1; 1596 u64 i_iiq_rep_overflow:1;
1597 uint64_t i_iiq_req_overflow:1; 1597 u64 i_iiq_req_overflow:1;
1598 uint64_t i_rsvd2:6; 1598 u64 i_rsvd2:6;
1599 uint64_t i_ii_xn_rep_cred_over_under:1; 1599 u64 i_ii_xn_rep_cred_over_under:1;
1600 uint64_t i_ii_xn_req_cred_over_under:1; 1600 u64 i_ii_xn_req_cred_over_under:1;
1601 uint64_t i_rsvd3:6; 1601 u64 i_rsvd3:6;
1602 uint64_t i_ii_xn_invalid_cmd:1; 1602 u64 i_ii_xn_invalid_cmd:1;
1603 uint64_t i_xn_ii_invalid_cmd:1; 1603 u64 i_xn_ii_invalid_cmd:1;
1604 uint64_t i_rsvd4:30; 1604 u64 i_rsvd4:30;
1605 } ii_iwel_fld_s; 1605 } ii_iwel_fld_s;
1606} ii_iwel_u_t; 1606} ii_iwel_u_t;
1607 1607
@@ -1612,22 +1612,22 @@ typedef union ii_iwel_u {
1612 ************************************************************************/ 1612 ************************************************************************/
1613 1613
1614typedef union ii_iwc_u { 1614typedef union ii_iwc_u {
1615 uint64_t ii_iwc_regval; 1615 u64 ii_iwc_regval;
1616 struct { 1616 struct {
1617 uint64_t i_dma_byte_swap:1; 1617 u64 i_dma_byte_swap:1;
1618 uint64_t i_rsvd:3; 1618 u64 i_rsvd:3;
1619 uint64_t i_cam_read_lines_reset:1; 1619 u64 i_cam_read_lines_reset:1;
1620 uint64_t i_rsvd1:3; 1620 u64 i_rsvd1:3;
1621 uint64_t i_ii_xn_cred_over_under_log:1; 1621 u64 i_ii_xn_cred_over_under_log:1;
1622 uint64_t i_rsvd2:19; 1622 u64 i_rsvd2:19;
1623 uint64_t i_xn_rep_iq_depth:5; 1623 u64 i_xn_rep_iq_depth:5;
1624 uint64_t i_rsvd3:3; 1624 u64 i_rsvd3:3;
1625 uint64_t i_xn_req_iq_depth:5; 1625 u64 i_xn_req_iq_depth:5;
1626 uint64_t i_rsvd4:3; 1626 u64 i_rsvd4:3;
1627 uint64_t i_iiq_depth:6; 1627 u64 i_iiq_depth:6;
1628 uint64_t i_rsvd5:12; 1628 u64 i_rsvd5:12;
1629 uint64_t i_force_rep_cred:1; 1629 u64 i_force_rep_cred:1;
1630 uint64_t i_force_req_cred:1; 1630 u64 i_force_req_cred:1;
1631 } ii_iwc_fld_s; 1631 } ii_iwc_fld_s;
1632} ii_iwc_u_t; 1632} ii_iwc_u_t;
1633 1633
@@ -1638,12 +1638,12 @@ typedef union ii_iwc_u {
1638 ************************************************************************/ 1638 ************************************************************************/
1639 1639
1640typedef union ii_iws_u { 1640typedef union ii_iws_u {
1641 uint64_t ii_iws_regval; 1641 u64 ii_iws_regval;
1642 struct { 1642 struct {
1643 uint64_t i_xn_rep_iq_credits:5; 1643 u64 i_xn_rep_iq_credits:5;
1644 uint64_t i_rsvd:3; 1644 u64 i_rsvd:3;
1645 uint64_t i_xn_req_iq_credits:5; 1645 u64 i_xn_req_iq_credits:5;
1646 uint64_t i_rsvd1:51; 1646 u64 i_rsvd1:51;
1647 } ii_iws_fld_s; 1647 } ii_iws_fld_s;
1648} ii_iws_u_t; 1648} ii_iws_u_t;
1649 1649
@@ -1654,26 +1654,26 @@ typedef union ii_iws_u {
1654 ************************************************************************/ 1654 ************************************************************************/
1655 1655
1656typedef union ii_iweim_u { 1656typedef union ii_iweim_u {
1657 uint64_t ii_iweim_regval; 1657 u64 ii_iweim_regval;
1658 struct { 1658 struct {
1659 uint64_t i_intr_timed_out:1; 1659 u64 i_intr_timed_out:1;
1660 uint64_t i_rsvd:7; 1660 u64 i_rsvd:7;
1661 uint64_t i_cam_overflow:1; 1661 u64 i_cam_overflow:1;
1662 uint64_t i_cam_read_miss:1; 1662 u64 i_cam_read_miss:1;
1663 uint64_t i_rsvd1:2; 1663 u64 i_rsvd1:2;
1664 uint64_t i_ioq_rep_underflow:1; 1664 u64 i_ioq_rep_underflow:1;
1665 uint64_t i_ioq_req_underflow:1; 1665 u64 i_ioq_req_underflow:1;
1666 uint64_t i_ioq_rep_overflow:1; 1666 u64 i_ioq_rep_overflow:1;
1667 uint64_t i_ioq_req_overflow:1; 1667 u64 i_ioq_req_overflow:1;
1668 uint64_t i_iiq_rep_overflow:1; 1668 u64 i_iiq_rep_overflow:1;
1669 uint64_t i_iiq_req_overflow:1; 1669 u64 i_iiq_req_overflow:1;
1670 uint64_t i_rsvd2:6; 1670 u64 i_rsvd2:6;
1671 uint64_t i_ii_xn_rep_cred_overflow:1; 1671 u64 i_ii_xn_rep_cred_overflow:1;
1672 uint64_t i_ii_xn_req_cred_overflow:1; 1672 u64 i_ii_xn_req_cred_overflow:1;
1673 uint64_t i_rsvd3:6; 1673 u64 i_rsvd3:6;
1674 uint64_t i_ii_xn_invalid_cmd:1; 1674 u64 i_ii_xn_invalid_cmd:1;
1675 uint64_t i_xn_ii_invalid_cmd:1; 1675 u64 i_xn_ii_invalid_cmd:1;
1676 uint64_t i_rsvd4:30; 1676 u64 i_rsvd4:30;
1677 } ii_iweim_fld_s; 1677 } ii_iweim_fld_s;
1678} ii_iweim_u_t; 1678} ii_iweim_u_t;
1679 1679
@@ -1688,13 +1688,13 @@ typedef union ii_iweim_u {
1688 ************************************************************************/ 1688 ************************************************************************/
1689 1689
1690typedef union ii_ipca_u { 1690typedef union ii_ipca_u {
1691 uint64_t ii_ipca_regval; 1691 u64 ii_ipca_regval;
1692 struct { 1692 struct {
1693 uint64_t i_wid:4; 1693 u64 i_wid:4;
1694 uint64_t i_adjust:1; 1694 u64 i_adjust:1;
1695 uint64_t i_rsvd_1:3; 1695 u64 i_rsvd_1:3;
1696 uint64_t i_field:2; 1696 u64 i_field:2;
1697 uint64_t i_rsvd:54; 1697 u64 i_rsvd:54;
1698 } ii_ipca_fld_s; 1698 } ii_ipca_fld_s;
1699} ii_ipca_u_t; 1699} ii_ipca_u_t;
1700 1700
@@ -1709,12 +1709,12 @@ typedef union ii_ipca_u {
1709 ************************************************************************/ 1709 ************************************************************************/
1710 1710
1711typedef union ii_iprte0a_u { 1711typedef union ii_iprte0a_u {
1712 uint64_t ii_iprte0a_regval; 1712 u64 ii_iprte0a_regval;
1713 struct { 1713 struct {
1714 uint64_t i_rsvd_1:54; 1714 u64 i_rsvd_1:54;
1715 uint64_t i_widget:4; 1715 u64 i_widget:4;
1716 uint64_t i_to_cnt:5; 1716 u64 i_to_cnt:5;
1717 uint64_t i_vld:1; 1717 u64 i_vld:1;
1718 } ii_iprte0a_fld_s; 1718 } ii_iprte0a_fld_s;
1719} ii_iprte0a_u_t; 1719} ii_iprte0a_u_t;
1720 1720
@@ -1729,12 +1729,12 @@ typedef union ii_iprte0a_u {
1729 ************************************************************************/ 1729 ************************************************************************/
1730 1730
1731typedef union ii_iprte1a_u { 1731typedef union ii_iprte1a_u {
1732 uint64_t ii_iprte1a_regval; 1732 u64 ii_iprte1a_regval;
1733 struct { 1733 struct {
1734 uint64_t i_rsvd_1:54; 1734 u64 i_rsvd_1:54;
1735 uint64_t i_widget:4; 1735 u64 i_widget:4;
1736 uint64_t i_to_cnt:5; 1736 u64 i_to_cnt:5;
1737 uint64_t i_vld:1; 1737 u64 i_vld:1;
1738 } ii_iprte1a_fld_s; 1738 } ii_iprte1a_fld_s;
1739} ii_iprte1a_u_t; 1739} ii_iprte1a_u_t;
1740 1740
@@ -1749,12 +1749,12 @@ typedef union ii_iprte1a_u {
1749 ************************************************************************/ 1749 ************************************************************************/
1750 1750
1751typedef union ii_iprte2a_u { 1751typedef union ii_iprte2a_u {
1752 uint64_t ii_iprte2a_regval; 1752 u64 ii_iprte2a_regval;
1753 struct { 1753 struct {
1754 uint64_t i_rsvd_1:54; 1754 u64 i_rsvd_1:54;
1755 uint64_t i_widget:4; 1755 u64 i_widget:4;
1756 uint64_t i_to_cnt:5; 1756 u64 i_to_cnt:5;
1757 uint64_t i_vld:1; 1757 u64 i_vld:1;
1758 } ii_iprte2a_fld_s; 1758 } ii_iprte2a_fld_s;
1759} ii_iprte2a_u_t; 1759} ii_iprte2a_u_t;
1760 1760
@@ -1769,12 +1769,12 @@ typedef union ii_iprte2a_u {
1769 ************************************************************************/ 1769 ************************************************************************/
1770 1770
1771typedef union ii_iprte3a_u { 1771typedef union ii_iprte3a_u {
1772 uint64_t ii_iprte3a_regval; 1772 u64 ii_iprte3a_regval;
1773 struct { 1773 struct {
1774 uint64_t i_rsvd_1:54; 1774 u64 i_rsvd_1:54;
1775 uint64_t i_widget:4; 1775 u64 i_widget:4;
1776 uint64_t i_to_cnt:5; 1776 u64 i_to_cnt:5;
1777 uint64_t i_vld:1; 1777 u64 i_vld:1;
1778 } ii_iprte3a_fld_s; 1778 } ii_iprte3a_fld_s;
1779} ii_iprte3a_u_t; 1779} ii_iprte3a_u_t;
1780 1780
@@ -1789,12 +1789,12 @@ typedef union ii_iprte3a_u {
1789 ************************************************************************/ 1789 ************************************************************************/
1790 1790
1791typedef union ii_iprte4a_u { 1791typedef union ii_iprte4a_u {
1792 uint64_t ii_iprte4a_regval; 1792 u64 ii_iprte4a_regval;
1793 struct { 1793 struct {
1794 uint64_t i_rsvd_1:54; 1794 u64 i_rsvd_1:54;
1795 uint64_t i_widget:4; 1795 u64 i_widget:4;
1796 uint64_t i_to_cnt:5; 1796 u64 i_to_cnt:5;
1797 uint64_t i_vld:1; 1797 u64 i_vld:1;
1798 } ii_iprte4a_fld_s; 1798 } ii_iprte4a_fld_s;
1799} ii_iprte4a_u_t; 1799} ii_iprte4a_u_t;
1800 1800
@@ -1809,12 +1809,12 @@ typedef union ii_iprte4a_u {
1809 ************************************************************************/ 1809 ************************************************************************/
1810 1810
1811typedef union ii_iprte5a_u { 1811typedef union ii_iprte5a_u {
1812 uint64_t ii_iprte5a_regval; 1812 u64 ii_iprte5a_regval;
1813 struct { 1813 struct {
1814 uint64_t i_rsvd_1:54; 1814 u64 i_rsvd_1:54;
1815 uint64_t i_widget:4; 1815 u64 i_widget:4;
1816 uint64_t i_to_cnt:5; 1816 u64 i_to_cnt:5;
1817 uint64_t i_vld:1; 1817 u64 i_vld:1;
1818 } ii_iprte5a_fld_s; 1818 } ii_iprte5a_fld_s;
1819} ii_iprte5a_u_t; 1819} ii_iprte5a_u_t;
1820 1820
@@ -1829,12 +1829,12 @@ typedef union ii_iprte5a_u {
1829 ************************************************************************/ 1829 ************************************************************************/
1830 1830
1831typedef union ii_iprte6a_u { 1831typedef union ii_iprte6a_u {
1832 uint64_t ii_iprte6a_regval; 1832 u64 ii_iprte6a_regval;
1833 struct { 1833 struct {
1834 uint64_t i_rsvd_1:54; 1834 u64 i_rsvd_1:54;
1835 uint64_t i_widget:4; 1835 u64 i_widget:4;
1836 uint64_t i_to_cnt:5; 1836 u64 i_to_cnt:5;
1837 uint64_t i_vld:1; 1837 u64 i_vld:1;
1838 } ii_iprte6a_fld_s; 1838 } ii_iprte6a_fld_s;
1839} ii_iprte6a_u_t; 1839} ii_iprte6a_u_t;
1840 1840
@@ -1849,12 +1849,12 @@ typedef union ii_iprte6a_u {
1849 ************************************************************************/ 1849 ************************************************************************/
1850 1850
1851typedef union ii_iprte7a_u { 1851typedef union ii_iprte7a_u {
1852 uint64_t ii_iprte7a_regval; 1852 u64 ii_iprte7a_regval;
1853 struct { 1853 struct {
1854 uint64_t i_rsvd_1:54; 1854 u64 i_rsvd_1:54;
1855 uint64_t i_widget:4; 1855 u64 i_widget:4;
1856 uint64_t i_to_cnt:5; 1856 u64 i_to_cnt:5;
1857 uint64_t i_vld:1; 1857 u64 i_vld:1;
1858 } ii_iprtea7_fld_s; 1858 } ii_iprtea7_fld_s;
1859} ii_iprte7a_u_t; 1859} ii_iprte7a_u_t;
1860 1860
@@ -1869,12 +1869,12 @@ typedef union ii_iprte7a_u {
1869 ************************************************************************/ 1869 ************************************************************************/
1870 1870
1871typedef union ii_iprte0b_u { 1871typedef union ii_iprte0b_u {
1872 uint64_t ii_iprte0b_regval; 1872 u64 ii_iprte0b_regval;
1873 struct { 1873 struct {
1874 uint64_t i_rsvd_1:3; 1874 u64 i_rsvd_1:3;
1875 uint64_t i_address:47; 1875 u64 i_address:47;
1876 uint64_t i_init:3; 1876 u64 i_init:3;
1877 uint64_t i_source:11; 1877 u64 i_source:11;
1878 } ii_iprte0b_fld_s; 1878 } ii_iprte0b_fld_s;
1879} ii_iprte0b_u_t; 1879} ii_iprte0b_u_t;
1880 1880
@@ -1889,12 +1889,12 @@ typedef union ii_iprte0b_u {
1889 ************************************************************************/ 1889 ************************************************************************/
1890 1890
1891typedef union ii_iprte1b_u { 1891typedef union ii_iprte1b_u {
1892 uint64_t ii_iprte1b_regval; 1892 u64 ii_iprte1b_regval;
1893 struct { 1893 struct {
1894 uint64_t i_rsvd_1:3; 1894 u64 i_rsvd_1:3;
1895 uint64_t i_address:47; 1895 u64 i_address:47;
1896 uint64_t i_init:3; 1896 u64 i_init:3;
1897 uint64_t i_source:11; 1897 u64 i_source:11;
1898 } ii_iprte1b_fld_s; 1898 } ii_iprte1b_fld_s;
1899} ii_iprte1b_u_t; 1899} ii_iprte1b_u_t;
1900 1900
@@ -1909,12 +1909,12 @@ typedef union ii_iprte1b_u {
1909 ************************************************************************/ 1909 ************************************************************************/
1910 1910
1911typedef union ii_iprte2b_u { 1911typedef union ii_iprte2b_u {
1912 uint64_t ii_iprte2b_regval; 1912 u64 ii_iprte2b_regval;
1913 struct { 1913 struct {
1914 uint64_t i_rsvd_1:3; 1914 u64 i_rsvd_1:3;
1915 uint64_t i_address:47; 1915 u64 i_address:47;
1916 uint64_t i_init:3; 1916 u64 i_init:3;
1917 uint64_t i_source:11; 1917 u64 i_source:11;
1918 } ii_iprte2b_fld_s; 1918 } ii_iprte2b_fld_s;
1919} ii_iprte2b_u_t; 1919} ii_iprte2b_u_t;
1920 1920
@@ -1929,12 +1929,12 @@ typedef union ii_iprte2b_u {
1929 ************************************************************************/ 1929 ************************************************************************/
1930 1930
1931typedef union ii_iprte3b_u { 1931typedef union ii_iprte3b_u {
1932 uint64_t ii_iprte3b_regval; 1932 u64 ii_iprte3b_regval;
1933 struct { 1933 struct {
1934 uint64_t i_rsvd_1:3; 1934 u64 i_rsvd_1:3;
1935 uint64_t i_address:47; 1935 u64 i_address:47;
1936 uint64_t i_init:3; 1936 u64 i_init:3;
1937 uint64_t i_source:11; 1937 u64 i_source:11;
1938 } ii_iprte3b_fld_s; 1938 } ii_iprte3b_fld_s;
1939} ii_iprte3b_u_t; 1939} ii_iprte3b_u_t;
1940 1940
@@ -1949,12 +1949,12 @@ typedef union ii_iprte3b_u {
1949 ************************************************************************/ 1949 ************************************************************************/
1950 1950
1951typedef union ii_iprte4b_u { 1951typedef union ii_iprte4b_u {
1952 uint64_t ii_iprte4b_regval; 1952 u64 ii_iprte4b_regval;
1953 struct { 1953 struct {
1954 uint64_t i_rsvd_1:3; 1954 u64 i_rsvd_1:3;
1955 uint64_t i_address:47; 1955 u64 i_address:47;
1956 uint64_t i_init:3; 1956 u64 i_init:3;
1957 uint64_t i_source:11; 1957 u64 i_source:11;
1958 } ii_iprte4b_fld_s; 1958 } ii_iprte4b_fld_s;
1959} ii_iprte4b_u_t; 1959} ii_iprte4b_u_t;
1960 1960
@@ -1969,12 +1969,12 @@ typedef union ii_iprte4b_u {
1969 ************************************************************************/ 1969 ************************************************************************/
1970 1970
1971typedef union ii_iprte5b_u { 1971typedef union ii_iprte5b_u {
1972 uint64_t ii_iprte5b_regval; 1972 u64 ii_iprte5b_regval;
1973 struct { 1973 struct {
1974 uint64_t i_rsvd_1:3; 1974 u64 i_rsvd_1:3;
1975 uint64_t i_address:47; 1975 u64 i_address:47;
1976 uint64_t i_init:3; 1976 u64 i_init:3;
1977 uint64_t i_source:11; 1977 u64 i_source:11;
1978 } ii_iprte5b_fld_s; 1978 } ii_iprte5b_fld_s;
1979} ii_iprte5b_u_t; 1979} ii_iprte5b_u_t;
1980 1980
@@ -1989,12 +1989,12 @@ typedef union ii_iprte5b_u {
1989 ************************************************************************/ 1989 ************************************************************************/
1990 1990
1991typedef union ii_iprte6b_u { 1991typedef union ii_iprte6b_u {
1992 uint64_t ii_iprte6b_regval; 1992 u64 ii_iprte6b_regval;
1993 struct { 1993 struct {
1994 uint64_t i_rsvd_1:3; 1994 u64 i_rsvd_1:3;
1995 uint64_t i_address:47; 1995 u64 i_address:47;
1996 uint64_t i_init:3; 1996 u64 i_init:3;
1997 uint64_t i_source:11; 1997 u64 i_source:11;
1998 1998
1999 } ii_iprte6b_fld_s; 1999 } ii_iprte6b_fld_s;
2000} ii_iprte6b_u_t; 2000} ii_iprte6b_u_t;
@@ -2010,12 +2010,12 @@ typedef union ii_iprte6b_u {
2010 ************************************************************************/ 2010 ************************************************************************/
2011 2011
2012typedef union ii_iprte7b_u { 2012typedef union ii_iprte7b_u {
2013 uint64_t ii_iprte7b_regval; 2013 u64 ii_iprte7b_regval;
2014 struct { 2014 struct {
2015 uint64_t i_rsvd_1:3; 2015 u64 i_rsvd_1:3;
2016 uint64_t i_address:47; 2016 u64 i_address:47;
2017 uint64_t i_init:3; 2017 u64 i_init:3;
2018 uint64_t i_source:11; 2018 u64 i_source:11;
2019 } ii_iprte7b_fld_s; 2019 } ii_iprte7b_fld_s;
2020} ii_iprte7b_u_t; 2020} ii_iprte7b_u_t;
2021 2021
@@ -2038,13 +2038,13 @@ typedef union ii_iprte7b_u {
2038 ************************************************************************/ 2038 ************************************************************************/
2039 2039
2040typedef union ii_ipdr_u { 2040typedef union ii_ipdr_u {
2041 uint64_t ii_ipdr_regval; 2041 u64 ii_ipdr_regval;
2042 struct { 2042 struct {
2043 uint64_t i_te:3; 2043 u64 i_te:3;
2044 uint64_t i_rsvd_1:1; 2044 u64 i_rsvd_1:1;
2045 uint64_t i_pnd:1; 2045 u64 i_pnd:1;
2046 uint64_t i_init_rpcnt:1; 2046 u64 i_init_rpcnt:1;
2047 uint64_t i_rsvd:58; 2047 u64 i_rsvd:58;
2048 } ii_ipdr_fld_s; 2048 } ii_ipdr_fld_s;
2049} ii_ipdr_u_t; 2049} ii_ipdr_u_t;
2050 2050
@@ -2066,11 +2066,11 @@ typedef union ii_ipdr_u {
2066 ************************************************************************/ 2066 ************************************************************************/
2067 2067
2068typedef union ii_icdr_u { 2068typedef union ii_icdr_u {
2069 uint64_t ii_icdr_regval; 2069 u64 ii_icdr_regval;
2070 struct { 2070 struct {
2071 uint64_t i_crb_num:4; 2071 u64 i_crb_num:4;
2072 uint64_t i_pnd:1; 2072 u64 i_pnd:1;
2073 uint64_t i_rsvd:59; 2073 u64 i_rsvd:59;
2074 } ii_icdr_fld_s; 2074 } ii_icdr_fld_s;
2075} ii_icdr_u_t; 2075} ii_icdr_u_t;
2076 2076
@@ -2092,13 +2092,13 @@ typedef union ii_icdr_u {
2092 ************************************************************************/ 2092 ************************************************************************/
2093 2093
2094typedef union ii_ifdr_u { 2094typedef union ii_ifdr_u {
2095 uint64_t ii_ifdr_regval; 2095 u64 ii_ifdr_regval;
2096 struct { 2096 struct {
2097 uint64_t i_ioq_max_rq:7; 2097 u64 i_ioq_max_rq:7;
2098 uint64_t i_set_ioq_rq:1; 2098 u64 i_set_ioq_rq:1;
2099 uint64_t i_ioq_max_rp:7; 2099 u64 i_ioq_max_rp:7;
2100 uint64_t i_set_ioq_rp:1; 2100 u64 i_set_ioq_rp:1;
2101 uint64_t i_rsvd:48; 2101 u64 i_rsvd:48;
2102 } ii_ifdr_fld_s; 2102 } ii_ifdr_fld_s;
2103} ii_ifdr_u_t; 2103} ii_ifdr_u_t;
2104 2104
@@ -2114,12 +2114,12 @@ typedef union ii_ifdr_u {
2114 ************************************************************************/ 2114 ************************************************************************/
2115 2115
2116typedef union ii_iiap_u { 2116typedef union ii_iiap_u {
2117 uint64_t ii_iiap_regval; 2117 u64 ii_iiap_regval;
2118 struct { 2118 struct {
2119 uint64_t i_rq_mls:6; 2119 u64 i_rq_mls:6;
2120 uint64_t i_rsvd_1:2; 2120 u64 i_rsvd_1:2;
2121 uint64_t i_rp_mls:6; 2121 u64 i_rp_mls:6;
2122 uint64_t i_rsvd:50; 2122 u64 i_rsvd:50;
2123 } ii_iiap_fld_s; 2123 } ii_iiap_fld_s;
2124} ii_iiap_u_t; 2124} ii_iiap_u_t;
2125 2125
@@ -2133,22 +2133,22 @@ typedef union ii_iiap_u {
2133 ************************************************************************/ 2133 ************************************************************************/
2134 2134
2135typedef union ii_icmr_u { 2135typedef union ii_icmr_u {
2136 uint64_t ii_icmr_regval; 2136 u64 ii_icmr_regval;
2137 struct { 2137 struct {
2138 uint64_t i_sp_msg:1; 2138 u64 i_sp_msg:1;
2139 uint64_t i_rd_hdr:1; 2139 u64 i_rd_hdr:1;
2140 uint64_t i_rsvd_4:2; 2140 u64 i_rsvd_4:2;
2141 uint64_t i_c_cnt:4; 2141 u64 i_c_cnt:4;
2142 uint64_t i_rsvd_3:4; 2142 u64 i_rsvd_3:4;
2143 uint64_t i_clr_rqpd:1; 2143 u64 i_clr_rqpd:1;
2144 uint64_t i_clr_rppd:1; 2144 u64 i_clr_rppd:1;
2145 uint64_t i_rsvd_2:2; 2145 u64 i_rsvd_2:2;
2146 uint64_t i_fc_cnt:4; 2146 u64 i_fc_cnt:4;
2147 uint64_t i_crb_vld:15; 2147 u64 i_crb_vld:15;
2148 uint64_t i_crb_mark:15; 2148 u64 i_crb_mark:15;
2149 uint64_t i_rsvd_1:2; 2149 u64 i_rsvd_1:2;
2150 uint64_t i_precise:1; 2150 u64 i_precise:1;
2151 uint64_t i_rsvd:11; 2151 u64 i_rsvd:11;
2152 } ii_icmr_fld_s; 2152 } ii_icmr_fld_s;
2153} ii_icmr_u_t; 2153} ii_icmr_u_t;
2154 2154
@@ -2161,13 +2161,13 @@ typedef union ii_icmr_u {
2161 ************************************************************************/ 2161 ************************************************************************/
2162 2162
2163typedef union ii_iccr_u { 2163typedef union ii_iccr_u {
2164 uint64_t ii_iccr_regval; 2164 u64 ii_iccr_regval;
2165 struct { 2165 struct {
2166 uint64_t i_crb_num:4; 2166 u64 i_crb_num:4;
2167 uint64_t i_rsvd_1:4; 2167 u64 i_rsvd_1:4;
2168 uint64_t i_cmd:8; 2168 u64 i_cmd:8;
2169 uint64_t i_pending:1; 2169 u64 i_pending:1;
2170 uint64_t i_rsvd:47; 2170 u64 i_rsvd:47;
2171 } ii_iccr_fld_s; 2171 } ii_iccr_fld_s;
2172} ii_iccr_u_t; 2172} ii_iccr_u_t;
2173 2173
@@ -2178,10 +2178,10 @@ typedef union ii_iccr_u {
2178 ************************************************************************/ 2178 ************************************************************************/
2179 2179
2180typedef union ii_icto_u { 2180typedef union ii_icto_u {
2181 uint64_t ii_icto_regval; 2181 u64 ii_icto_regval;
2182 struct { 2182 struct {
2183 uint64_t i_timeout:8; 2183 u64 i_timeout:8;
2184 uint64_t i_rsvd:56; 2184 u64 i_rsvd:56;
2185 } ii_icto_fld_s; 2185 } ii_icto_fld_s;
2186} ii_icto_u_t; 2186} ii_icto_u_t;
2187 2187
@@ -2197,10 +2197,10 @@ typedef union ii_icto_u {
2197 ************************************************************************/ 2197 ************************************************************************/
2198 2198
2199typedef union ii_ictp_u { 2199typedef union ii_ictp_u {
2200 uint64_t ii_ictp_regval; 2200 u64 ii_ictp_regval;
2201 struct { 2201 struct {
2202 uint64_t i_prescale:24; 2202 u64 i_prescale:24;
2203 uint64_t i_rsvd:40; 2203 u64 i_rsvd:40;
2204 } ii_ictp_fld_s; 2204 } ii_ictp_fld_s;
2205} ii_ictp_u_t; 2205} ii_ictp_u_t;
2206 2206
@@ -2228,14 +2228,14 @@ typedef union ii_ictp_u {
2228 ************************************************************************/ 2228 ************************************************************************/
2229 2229
2230typedef union ii_icrb0_a_u { 2230typedef union ii_icrb0_a_u {
2231 uint64_t ii_icrb0_a_regval; 2231 u64 ii_icrb0_a_regval;
2232 struct { 2232 struct {
2233 uint64_t ia_iow:1; 2233 u64 ia_iow:1;
2234 uint64_t ia_vld:1; 2234 u64 ia_vld:1;
2235 uint64_t ia_addr:47; 2235 u64 ia_addr:47;
2236 uint64_t ia_tnum:5; 2236 u64 ia_tnum:5;
2237 uint64_t ia_sidn:4; 2237 u64 ia_sidn:4;
2238 uint64_t ia_rsvd:6; 2238 u64 ia_rsvd:6;
2239 } ii_icrb0_a_fld_s; 2239 } ii_icrb0_a_fld_s;
2240} ii_icrb0_a_u_t; 2240} ii_icrb0_a_u_t;
2241 2241
@@ -2249,30 +2249,30 @@ typedef union ii_icrb0_a_u {
2249 ************************************************************************/ 2249 ************************************************************************/
2250 2250
2251typedef union ii_icrb0_b_u { 2251typedef union ii_icrb0_b_u {
2252 uint64_t ii_icrb0_b_regval; 2252 u64 ii_icrb0_b_regval;
2253 struct { 2253 struct {
2254 uint64_t ib_xt_err:1; 2254 u64 ib_xt_err:1;
2255 uint64_t ib_mark:1; 2255 u64 ib_mark:1;
2256 uint64_t ib_ln_uce:1; 2256 u64 ib_ln_uce:1;
2257 uint64_t ib_errcode:3; 2257 u64 ib_errcode:3;
2258 uint64_t ib_error:1; 2258 u64 ib_error:1;
2259 uint64_t ib_stall__bte_1:1; 2259 u64 ib_stall__bte_1:1;
2260 uint64_t ib_stall__bte_0:1; 2260 u64 ib_stall__bte_0:1;
2261 uint64_t ib_stall__intr:1; 2261 u64 ib_stall__intr:1;
2262 uint64_t ib_stall_ib:1; 2262 u64 ib_stall_ib:1;
2263 uint64_t ib_intvn:1; 2263 u64 ib_intvn:1;
2264 uint64_t ib_wb:1; 2264 u64 ib_wb:1;
2265 uint64_t ib_hold:1; 2265 u64 ib_hold:1;
2266 uint64_t ib_ack:1; 2266 u64 ib_ack:1;
2267 uint64_t ib_resp:1; 2267 u64 ib_resp:1;
2268 uint64_t ib_ack_cnt:11; 2268 u64 ib_ack_cnt:11;
2269 uint64_t ib_rsvd:7; 2269 u64 ib_rsvd:7;
2270 uint64_t ib_exc:5; 2270 u64 ib_exc:5;
2271 uint64_t ib_init:3; 2271 u64 ib_init:3;
2272 uint64_t ib_imsg:8; 2272 u64 ib_imsg:8;
2273 uint64_t ib_imsgtype:2; 2273 u64 ib_imsgtype:2;
2274 uint64_t ib_use_old:1; 2274 u64 ib_use_old:1;
2275 uint64_t ib_rsvd_1:11; 2275 u64 ib_rsvd_1:11;
2276 } ii_icrb0_b_fld_s; 2276 } ii_icrb0_b_fld_s;
2277} ii_icrb0_b_u_t; 2277} ii_icrb0_b_u_t;
2278 2278
@@ -2286,17 +2286,17 @@ typedef union ii_icrb0_b_u {
2286 ************************************************************************/ 2286 ************************************************************************/
2287 2287
2288typedef union ii_icrb0_c_u { 2288typedef union ii_icrb0_c_u {
2289 uint64_t ii_icrb0_c_regval; 2289 u64 ii_icrb0_c_regval;
2290 struct { 2290 struct {
2291 uint64_t ic_source:15; 2291 u64 ic_source:15;
2292 uint64_t ic_size:2; 2292 u64 ic_size:2;
2293 uint64_t ic_ct:1; 2293 u64 ic_ct:1;
2294 uint64_t ic_bte_num:1; 2294 u64 ic_bte_num:1;
2295 uint64_t ic_gbr:1; 2295 u64 ic_gbr:1;
2296 uint64_t ic_resprqd:1; 2296 u64 ic_resprqd:1;
2297 uint64_t ic_bo:1; 2297 u64 ic_bo:1;
2298 uint64_t ic_suppl:15; 2298 u64 ic_suppl:15;
2299 uint64_t ic_rsvd:27; 2299 u64 ic_rsvd:27;
2300 } ii_icrb0_c_fld_s; 2300 } ii_icrb0_c_fld_s;
2301} ii_icrb0_c_u_t; 2301} ii_icrb0_c_u_t;
2302 2302
@@ -2310,14 +2310,14 @@ typedef union ii_icrb0_c_u {
2310 ************************************************************************/ 2310 ************************************************************************/
2311 2311
2312typedef union ii_icrb0_d_u { 2312typedef union ii_icrb0_d_u {
2313 uint64_t ii_icrb0_d_regval; 2313 u64 ii_icrb0_d_regval;
2314 struct { 2314 struct {
2315 uint64_t id_pa_be:43; 2315 u64 id_pa_be:43;
2316 uint64_t id_bte_op:1; 2316 u64 id_bte_op:1;
2317 uint64_t id_pr_psc:4; 2317 u64 id_pr_psc:4;
2318 uint64_t id_pr_cnt:4; 2318 u64 id_pr_cnt:4;
2319 uint64_t id_sleep:1; 2319 u64 id_sleep:1;
2320 uint64_t id_rsvd:11; 2320 u64 id_rsvd:11;
2321 } ii_icrb0_d_fld_s; 2321 } ii_icrb0_d_fld_s;
2322} ii_icrb0_d_u_t; 2322} ii_icrb0_d_u_t;
2323 2323
@@ -2331,14 +2331,14 @@ typedef union ii_icrb0_d_u {
2331 ************************************************************************/ 2331 ************************************************************************/
2332 2332
2333typedef union ii_icrb0_e_u { 2333typedef union ii_icrb0_e_u {
2334 uint64_t ii_icrb0_e_regval; 2334 u64 ii_icrb0_e_regval;
2335 struct { 2335 struct {
2336 uint64_t ie_timeout:8; 2336 u64 ie_timeout:8;
2337 uint64_t ie_context:15; 2337 u64 ie_context:15;
2338 uint64_t ie_rsvd:1; 2338 u64 ie_rsvd:1;
2339 uint64_t ie_tvld:1; 2339 u64 ie_tvld:1;
2340 uint64_t ie_cvld:1; 2340 u64 ie_cvld:1;
2341 uint64_t ie_rsvd_0:38; 2341 u64 ie_rsvd_0:38;
2342 } ii_icrb0_e_fld_s; 2342 } ii_icrb0_e_fld_s;
2343} ii_icrb0_e_u_t; 2343} ii_icrb0_e_u_t;
2344 2344
@@ -2351,12 +2351,12 @@ typedef union ii_icrb0_e_u {
2351 ************************************************************************/ 2351 ************************************************************************/
2352 2352
2353typedef union ii_icsml_u { 2353typedef union ii_icsml_u {
2354 uint64_t ii_icsml_regval; 2354 u64 ii_icsml_regval;
2355 struct { 2355 struct {
2356 uint64_t i_tt_addr:47; 2356 u64 i_tt_addr:47;
2357 uint64_t i_newsuppl_ex:14; 2357 u64 i_newsuppl_ex:14;
2358 uint64_t i_reserved:2; 2358 u64 i_reserved:2;
2359 uint64_t i_overflow:1; 2359 u64 i_overflow:1;
2360 } ii_icsml_fld_s; 2360 } ii_icsml_fld_s;
2361} ii_icsml_u_t; 2361} ii_icsml_u_t;
2362 2362
@@ -2369,10 +2369,10 @@ typedef union ii_icsml_u {
2369 ************************************************************************/ 2369 ************************************************************************/
2370 2370
2371typedef union ii_icsmm_u { 2371typedef union ii_icsmm_u {
2372 uint64_t ii_icsmm_regval; 2372 u64 ii_icsmm_regval;
2373 struct { 2373 struct {
2374 uint64_t i_tt_ack_cnt:11; 2374 u64 i_tt_ack_cnt:11;
2375 uint64_t i_reserved:53; 2375 u64 i_reserved:53;
2376 } ii_icsmm_fld_s; 2376 } ii_icsmm_fld_s;
2377} ii_icsmm_u_t; 2377} ii_icsmm_u_t;
2378 2378
@@ -2385,48 +2385,48 @@ typedef union ii_icsmm_u {
2385 ************************************************************************/ 2385 ************************************************************************/
2386 2386
2387typedef union ii_icsmh_u { 2387typedef union ii_icsmh_u {
2388 uint64_t ii_icsmh_regval; 2388 u64 ii_icsmh_regval;
2389 struct { 2389 struct {
2390 uint64_t i_tt_vld:1; 2390 u64 i_tt_vld:1;
2391 uint64_t i_xerr:1; 2391 u64 i_xerr:1;
2392 uint64_t i_ft_cwact_o:1; 2392 u64 i_ft_cwact_o:1;
2393 uint64_t i_ft_wact_o:1; 2393 u64 i_ft_wact_o:1;
2394 uint64_t i_ft_active_o:1; 2394 u64 i_ft_active_o:1;
2395 uint64_t i_sync:1; 2395 u64 i_sync:1;
2396 uint64_t i_mnusg:1; 2396 u64 i_mnusg:1;
2397 uint64_t i_mnusz:1; 2397 u64 i_mnusz:1;
2398 uint64_t i_plusz:1; 2398 u64 i_plusz:1;
2399 uint64_t i_plusg:1; 2399 u64 i_plusg:1;
2400 uint64_t i_tt_exc:5; 2400 u64 i_tt_exc:5;
2401 uint64_t i_tt_wb:1; 2401 u64 i_tt_wb:1;
2402 uint64_t i_tt_hold:1; 2402 u64 i_tt_hold:1;
2403 uint64_t i_tt_ack:1; 2403 u64 i_tt_ack:1;
2404 uint64_t i_tt_resp:1; 2404 u64 i_tt_resp:1;
2405 uint64_t i_tt_intvn:1; 2405 u64 i_tt_intvn:1;
2406 uint64_t i_g_stall_bte1:1; 2406 u64 i_g_stall_bte1:1;
2407 uint64_t i_g_stall_bte0:1; 2407 u64 i_g_stall_bte0:1;
2408 uint64_t i_g_stall_il:1; 2408 u64 i_g_stall_il:1;
2409 uint64_t i_g_stall_ib:1; 2409 u64 i_g_stall_ib:1;
2410 uint64_t i_tt_imsg:8; 2410 u64 i_tt_imsg:8;
2411 uint64_t i_tt_imsgtype:2; 2411 u64 i_tt_imsgtype:2;
2412 uint64_t i_tt_use_old:1; 2412 u64 i_tt_use_old:1;
2413 uint64_t i_tt_respreqd:1; 2413 u64 i_tt_respreqd:1;
2414 uint64_t i_tt_bte_num:1; 2414 u64 i_tt_bte_num:1;
2415 uint64_t i_cbn:1; 2415 u64 i_cbn:1;
2416 uint64_t i_match:1; 2416 u64 i_match:1;
2417 uint64_t i_rpcnt_lt_34:1; 2417 u64 i_rpcnt_lt_34:1;
2418 uint64_t i_rpcnt_ge_34:1; 2418 u64 i_rpcnt_ge_34:1;
2419 uint64_t i_rpcnt_lt_18:1; 2419 u64 i_rpcnt_lt_18:1;
2420 uint64_t i_rpcnt_ge_18:1; 2420 u64 i_rpcnt_ge_18:1;
2421 uint64_t i_rpcnt_lt_2:1; 2421 u64 i_rpcnt_lt_2:1;
2422 uint64_t i_rpcnt_ge_2:1; 2422 u64 i_rpcnt_ge_2:1;
2423 uint64_t i_rqcnt_lt_18:1; 2423 u64 i_rqcnt_lt_18:1;
2424 uint64_t i_rqcnt_ge_18:1; 2424 u64 i_rqcnt_ge_18:1;
2425 uint64_t i_rqcnt_lt_2:1; 2425 u64 i_rqcnt_lt_2:1;
2426 uint64_t i_rqcnt_ge_2:1; 2426 u64 i_rqcnt_ge_2:1;
2427 uint64_t i_tt_device:7; 2427 u64 i_tt_device:7;
2428 uint64_t i_tt_init:3; 2428 u64 i_tt_init:3;
2429 uint64_t i_reserved:5; 2429 u64 i_reserved:5;
2430 } ii_icsmh_fld_s; 2430 } ii_icsmh_fld_s;
2431} ii_icsmh_u_t; 2431} ii_icsmh_u_t;
2432 2432
@@ -2439,14 +2439,14 @@ typedef union ii_icsmh_u {
2439 ************************************************************************/ 2439 ************************************************************************/
2440 2440
2441typedef union ii_idbss_u { 2441typedef union ii_idbss_u {
2442 uint64_t ii_idbss_regval; 2442 u64 ii_idbss_regval;
2443 struct { 2443 struct {
2444 uint64_t i_iioclk_core_submenu:3; 2444 u64 i_iioclk_core_submenu:3;
2445 uint64_t i_rsvd:5; 2445 u64 i_rsvd:5;
2446 uint64_t i_fsbclk_wrapper_submenu:3; 2446 u64 i_fsbclk_wrapper_submenu:3;
2447 uint64_t i_rsvd_1:5; 2447 u64 i_rsvd_1:5;
2448 uint64_t i_iioclk_menu:5; 2448 u64 i_iioclk_menu:5;
2449 uint64_t i_rsvd_2:43; 2449 u64 i_rsvd_2:43;
2450 } ii_idbss_fld_s; 2450 } ii_idbss_fld_s;
2451} ii_idbss_u_t; 2451} ii_idbss_u_t;
2452 2452
@@ -2466,13 +2466,13 @@ typedef union ii_idbss_u {
2466 ************************************************************************/ 2466 ************************************************************************/
2467 2467
2468typedef union ii_ibls0_u { 2468typedef union ii_ibls0_u {
2469 uint64_t ii_ibls0_regval; 2469 u64 ii_ibls0_regval;
2470 struct { 2470 struct {
2471 uint64_t i_length:16; 2471 u64 i_length:16;
2472 uint64_t i_error:1; 2472 u64 i_error:1;
2473 uint64_t i_rsvd_1:3; 2473 u64 i_rsvd_1:3;
2474 uint64_t i_busy:1; 2474 u64 i_busy:1;
2475 uint64_t i_rsvd:43; 2475 u64 i_rsvd:43;
2476 } ii_ibls0_fld_s; 2476 } ii_ibls0_fld_s;
2477} ii_ibls0_u_t; 2477} ii_ibls0_u_t;
2478 2478
@@ -2487,11 +2487,11 @@ typedef union ii_ibls0_u {
2487 ************************************************************************/ 2487 ************************************************************************/
2488 2488
2489typedef union ii_ibsa0_u { 2489typedef union ii_ibsa0_u {
2490 uint64_t ii_ibsa0_regval; 2490 u64 ii_ibsa0_regval;
2491 struct { 2491 struct {
2492 uint64_t i_rsvd_1:7; 2492 u64 i_rsvd_1:7;
2493 uint64_t i_addr:42; 2493 u64 i_addr:42;
2494 uint64_t i_rsvd:15; 2494 u64 i_rsvd:15;
2495 } ii_ibsa0_fld_s; 2495 } ii_ibsa0_fld_s;
2496} ii_ibsa0_u_t; 2496} ii_ibsa0_u_t;
2497 2497
@@ -2506,11 +2506,11 @@ typedef union ii_ibsa0_u {
2506 ************************************************************************/ 2506 ************************************************************************/
2507 2507
2508typedef union ii_ibda0_u { 2508typedef union ii_ibda0_u {
2509 uint64_t ii_ibda0_regval; 2509 u64 ii_ibda0_regval;
2510 struct { 2510 struct {
2511 uint64_t i_rsvd_1:7; 2511 u64 i_rsvd_1:7;
2512 uint64_t i_addr:42; 2512 u64 i_addr:42;
2513 uint64_t i_rsvd:15; 2513 u64 i_rsvd:15;
2514 } ii_ibda0_fld_s; 2514 } ii_ibda0_fld_s;
2515} ii_ibda0_u_t; 2515} ii_ibda0_u_t;
2516 2516
@@ -2527,14 +2527,14 @@ typedef union ii_ibda0_u {
2527 ************************************************************************/ 2527 ************************************************************************/
2528 2528
2529typedef union ii_ibct0_u { 2529typedef union ii_ibct0_u {
2530 uint64_t ii_ibct0_regval; 2530 u64 ii_ibct0_regval;
2531 struct { 2531 struct {
2532 uint64_t i_zerofill:1; 2532 u64 i_zerofill:1;
2533 uint64_t i_rsvd_2:3; 2533 u64 i_rsvd_2:3;
2534 uint64_t i_notify:1; 2534 u64 i_notify:1;
2535 uint64_t i_rsvd_1:3; 2535 u64 i_rsvd_1:3;
2536 uint64_t i_poison:1; 2536 u64 i_poison:1;
2537 uint64_t i_rsvd:55; 2537 u64 i_rsvd:55;
2538 } ii_ibct0_fld_s; 2538 } ii_ibct0_fld_s;
2539} ii_ibct0_u_t; 2539} ii_ibct0_u_t;
2540 2540
@@ -2546,11 +2546,11 @@ typedef union ii_ibct0_u {
2546 ************************************************************************/ 2546 ************************************************************************/
2547 2547
2548typedef union ii_ibna0_u { 2548typedef union ii_ibna0_u {
2549 uint64_t ii_ibna0_regval; 2549 u64 ii_ibna0_regval;
2550 struct { 2550 struct {
2551 uint64_t i_rsvd_1:7; 2551 u64 i_rsvd_1:7;
2552 uint64_t i_addr:42; 2552 u64 i_addr:42;
2553 uint64_t i_rsvd:15; 2553 u64 i_rsvd:15;
2554 } ii_ibna0_fld_s; 2554 } ii_ibna0_fld_s;
2555} ii_ibna0_u_t; 2555} ii_ibna0_u_t;
2556 2556
@@ -2563,13 +2563,13 @@ typedef union ii_ibna0_u {
2563 ************************************************************************/ 2563 ************************************************************************/
2564 2564
2565typedef union ii_ibia0_u { 2565typedef union ii_ibia0_u {
2566 uint64_t ii_ibia0_regval; 2566 u64 ii_ibia0_regval;
2567 struct { 2567 struct {
2568 uint64_t i_rsvd_2:1; 2568 u64 i_rsvd_2:1;
2569 uint64_t i_node_id:11; 2569 u64 i_node_id:11;
2570 uint64_t i_rsvd_1:4; 2570 u64 i_rsvd_1:4;
2571 uint64_t i_level:7; 2571 u64 i_level:7;
2572 uint64_t i_rsvd:41; 2572 u64 i_rsvd:41;
2573 } ii_ibia0_fld_s; 2573 } ii_ibia0_fld_s;
2574} ii_ibia0_u_t; 2574} ii_ibia0_u_t;
2575 2575
@@ -2589,13 +2589,13 @@ typedef union ii_ibia0_u {
2589 ************************************************************************/ 2589 ************************************************************************/
2590 2590
2591typedef union ii_ibls1_u { 2591typedef union ii_ibls1_u {
2592 uint64_t ii_ibls1_regval; 2592 u64 ii_ibls1_regval;
2593 struct { 2593 struct {
2594 uint64_t i_length:16; 2594 u64 i_length:16;
2595 uint64_t i_error:1; 2595 u64 i_error:1;
2596 uint64_t i_rsvd_1:3; 2596 u64 i_rsvd_1:3;
2597 uint64_t i_busy:1; 2597 u64 i_busy:1;
2598 uint64_t i_rsvd:43; 2598 u64 i_rsvd:43;
2599 } ii_ibls1_fld_s; 2599 } ii_ibls1_fld_s;
2600} ii_ibls1_u_t; 2600} ii_ibls1_u_t;
2601 2601
@@ -2610,11 +2610,11 @@ typedef union ii_ibls1_u {
2610 ************************************************************************/ 2610 ************************************************************************/
2611 2611
2612typedef union ii_ibsa1_u { 2612typedef union ii_ibsa1_u {
2613 uint64_t ii_ibsa1_regval; 2613 u64 ii_ibsa1_regval;
2614 struct { 2614 struct {
2615 uint64_t i_rsvd_1:7; 2615 u64 i_rsvd_1:7;
2616 uint64_t i_addr:33; 2616 u64 i_addr:33;
2617 uint64_t i_rsvd:24; 2617 u64 i_rsvd:24;
2618 } ii_ibsa1_fld_s; 2618 } ii_ibsa1_fld_s;
2619} ii_ibsa1_u_t; 2619} ii_ibsa1_u_t;
2620 2620
@@ -2629,11 +2629,11 @@ typedef union ii_ibsa1_u {
2629 ************************************************************************/ 2629 ************************************************************************/
2630 2630
2631typedef union ii_ibda1_u { 2631typedef union ii_ibda1_u {
2632 uint64_t ii_ibda1_regval; 2632 u64 ii_ibda1_regval;
2633 struct { 2633 struct {
2634 uint64_t i_rsvd_1:7; 2634 u64 i_rsvd_1:7;
2635 uint64_t i_addr:33; 2635 u64 i_addr:33;
2636 uint64_t i_rsvd:24; 2636 u64 i_rsvd:24;
2637 } ii_ibda1_fld_s; 2637 } ii_ibda1_fld_s;
2638} ii_ibda1_u_t; 2638} ii_ibda1_u_t;
2639 2639
@@ -2650,14 +2650,14 @@ typedef union ii_ibda1_u {
2650 ************************************************************************/ 2650 ************************************************************************/
2651 2651
2652typedef union ii_ibct1_u { 2652typedef union ii_ibct1_u {
2653 uint64_t ii_ibct1_regval; 2653 u64 ii_ibct1_regval;
2654 struct { 2654 struct {
2655 uint64_t i_zerofill:1; 2655 u64 i_zerofill:1;
2656 uint64_t i_rsvd_2:3; 2656 u64 i_rsvd_2:3;
2657 uint64_t i_notify:1; 2657 u64 i_notify:1;
2658 uint64_t i_rsvd_1:3; 2658 u64 i_rsvd_1:3;
2659 uint64_t i_poison:1; 2659 u64 i_poison:1;
2660 uint64_t i_rsvd:55; 2660 u64 i_rsvd:55;
2661 } ii_ibct1_fld_s; 2661 } ii_ibct1_fld_s;
2662} ii_ibct1_u_t; 2662} ii_ibct1_u_t;
2663 2663
@@ -2669,11 +2669,11 @@ typedef union ii_ibct1_u {
2669 ************************************************************************/ 2669 ************************************************************************/
2670 2670
2671typedef union ii_ibna1_u { 2671typedef union ii_ibna1_u {
2672 uint64_t ii_ibna1_regval; 2672 u64 ii_ibna1_regval;
2673 struct { 2673 struct {
2674 uint64_t i_rsvd_1:7; 2674 u64 i_rsvd_1:7;
2675 uint64_t i_addr:33; 2675 u64 i_addr:33;
2676 uint64_t i_rsvd:24; 2676 u64 i_rsvd:24;
2677 } ii_ibna1_fld_s; 2677 } ii_ibna1_fld_s;
2678} ii_ibna1_u_t; 2678} ii_ibna1_u_t;
2679 2679
@@ -2686,13 +2686,13 @@ typedef union ii_ibna1_u {
2686 ************************************************************************/ 2686 ************************************************************************/
2687 2687
2688typedef union ii_ibia1_u { 2688typedef union ii_ibia1_u {
2689 uint64_t ii_ibia1_regval; 2689 u64 ii_ibia1_regval;
2690 struct { 2690 struct {
2691 uint64_t i_pi_id:1; 2691 u64 i_pi_id:1;
2692 uint64_t i_node_id:8; 2692 u64 i_node_id:8;
2693 uint64_t i_rsvd_1:7; 2693 u64 i_rsvd_1:7;
2694 uint64_t i_level:7; 2694 u64 i_level:7;
2695 uint64_t i_rsvd:41; 2695 u64 i_rsvd:41;
2696 } ii_ibia1_fld_s; 2696 } ii_ibia1_fld_s;
2697} ii_ibia1_u_t; 2697} ii_ibia1_u_t;
2698 2698
@@ -2712,12 +2712,12 @@ typedef union ii_ibia1_u {
2712 ************************************************************************/ 2712 ************************************************************************/
2713 2713
2714typedef union ii_ipcr_u { 2714typedef union ii_ipcr_u {
2715 uint64_t ii_ipcr_regval; 2715 u64 ii_ipcr_regval;
2716 struct { 2716 struct {
2717 uint64_t i_ippr0_c:4; 2717 u64 i_ippr0_c:4;
2718 uint64_t i_ippr1_c:4; 2718 u64 i_ippr1_c:4;
2719 uint64_t i_icct:8; 2719 u64 i_icct:8;
2720 uint64_t i_rsvd:48; 2720 u64 i_rsvd:48;
2721 } ii_ipcr_fld_s; 2721 } ii_ipcr_fld_s;
2722} ii_ipcr_u_t; 2722} ii_ipcr_u_t;
2723 2723
@@ -2728,10 +2728,10 @@ typedef union ii_ipcr_u {
2728 ************************************************************************/ 2728 ************************************************************************/
2729 2729
2730typedef union ii_ippr_u { 2730typedef union ii_ippr_u {
2731 uint64_t ii_ippr_regval; 2731 u64 ii_ippr_regval;
2732 struct { 2732 struct {
2733 uint64_t i_ippr0:32; 2733 u64 i_ippr0:32;
2734 uint64_t i_ippr1:32; 2734 u64 i_ippr1:32;
2735 } ii_ippr_fld_s; 2735 } ii_ippr_fld_s;
2736} ii_ippr_u_t; 2736} ii_ippr_u_t;
2737 2737
@@ -3267,15 +3267,15 @@ typedef ii_icrb0_e_u_t icrbe_t;
3267#define IO_PERF_SETS 32 3267#define IO_PERF_SETS 32
3268 3268
3269/* Bit for the widget in inbound access register */ 3269/* Bit for the widget in inbound access register */
3270#define IIO_IIWA_WIDGET(_w) ((uint64_t)(1ULL << _w)) 3270#define IIO_IIWA_WIDGET(_w) ((u64)(1ULL << _w))
3271/* Bit for the widget in outbound access register */ 3271/* Bit for the widget in outbound access register */
3272#define IIO_IOWA_WIDGET(_w) ((uint64_t)(1ULL << _w)) 3272#define IIO_IOWA_WIDGET(_w) ((u64)(1ULL << _w))
3273 3273
3274/* NOTE: The following define assumes that we are going to get 3274/* NOTE: The following define assumes that we are going to get
3275 * widget numbers from 8 thru F and the device numbers within 3275 * widget numbers from 8 thru F and the device numbers within
3276 * widget from 0 thru 7. 3276 * widget from 0 thru 7.
3277 */ 3277 */
3278#define IIO_IIDEM_WIDGETDEV_MASK(w, d) ((uint64_t)(1ULL << (8 * ((w) - 8) + (d)))) 3278#define IIO_IIDEM_WIDGETDEV_MASK(w, d) ((u64)(1ULL << (8 * ((w) - 8) + (d))))
3279 3279
3280/* IO Interrupt Destination Register */ 3280/* IO Interrupt Destination Register */
3281#define IIO_IIDSR_SENT_SHIFT 28 3281#define IIO_IIDSR_SENT_SHIFT 28
@@ -3302,9 +3302,9 @@ typedef ii_icrb0_e_u_t icrbe_t;
3302 */ 3302 */
3303 3303
3304typedef union hubii_wcr_u { 3304typedef union hubii_wcr_u {
3305 uint64_t wcr_reg_value; 3305 u64 wcr_reg_value;
3306 struct { 3306 struct {
3307 uint64_t wcr_widget_id:4, /* LLP crossbar credit */ 3307 u64 wcr_widget_id:4, /* LLP crossbar credit */
3308 wcr_tag_mode:1, /* Tag mode */ 3308 wcr_tag_mode:1, /* Tag mode */
3309 wcr_rsvd1:8, /* Reserved */ 3309 wcr_rsvd1:8, /* Reserved */
3310 wcr_xbar_crd:3, /* LLP crossbar credit */ 3310 wcr_xbar_crd:3, /* LLP crossbar credit */
@@ -3324,9 +3324,9 @@ performance registers */
3324 performed */ 3324 performed */
3325 3325
3326typedef union io_perf_sel { 3326typedef union io_perf_sel {
3327 uint64_t perf_sel_reg; 3327 u64 perf_sel_reg;
3328 struct { 3328 struct {
3329 uint64_t perf_ippr0:4, perf_ippr1:4, perf_icct:8, perf_rsvd:48; 3329 u64 perf_ippr0:4, perf_ippr1:4, perf_icct:8, perf_rsvd:48;
3330 } perf_sel_bits; 3330 } perf_sel_bits;
3331} io_perf_sel_t; 3331} io_perf_sel_t;
3332 3332
@@ -3334,24 +3334,24 @@ typedef union io_perf_sel {
3334 hardware problems there is only one counter, not two. */ 3334 hardware problems there is only one counter, not two. */
3335 3335
3336typedef union io_perf_cnt { 3336typedef union io_perf_cnt {
3337 uint64_t perf_cnt; 3337 u64 perf_cnt;
3338 struct { 3338 struct {
3339 uint64_t perf_cnt:20, perf_rsvd2:12, perf_rsvd1:32; 3339 u64 perf_cnt:20, perf_rsvd2:12, perf_rsvd1:32;
3340 } perf_cnt_bits; 3340 } perf_cnt_bits;
3341 3341
3342} io_perf_cnt_t; 3342} io_perf_cnt_t;
3343 3343
3344typedef union iprte_a { 3344typedef union iprte_a {
3345 uint64_t entry; 3345 u64 entry;
3346 struct { 3346 struct {
3347 uint64_t i_rsvd_1:3; 3347 u64 i_rsvd_1:3;
3348 uint64_t i_addr:38; 3348 u64 i_addr:38;
3349 uint64_t i_init:3; 3349 u64 i_init:3;
3350 uint64_t i_source:8; 3350 u64 i_source:8;
3351 uint64_t i_rsvd:2; 3351 u64 i_rsvd:2;
3352 uint64_t i_widget:4; 3352 u64 i_widget:4;
3353 uint64_t i_to_cnt:5; 3353 u64 i_to_cnt:5;
3354 uint64_t i_vld:1; 3354 u64 i_vld:1;
3355 } iprte_fields; 3355 } iprte_fields;
3356} iprte_a_t; 3356} iprte_a_t;
3357 3357
diff --git a/include/asm-ia64/sn/sn_feature_sets.h b/include/asm-ia64/sn/sn_feature_sets.h
index e68a80853d5d..ff33e3bd3f8e 100644
--- a/include/asm-ia64/sn/sn_feature_sets.h
+++ b/include/asm-ia64/sn/sn_feature_sets.h
@@ -8,13 +8,10 @@
8 * License. See the file "COPYING" in the main directory of this archive 8 * License. See the file "COPYING" in the main directory of this archive
9 * for more details. 9 * for more details.
10 * 10 *
11 * Copyright (c) 2005 Silicon Graphics, Inc. All rights reserved. 11 * Copyright (c) 2005-2006 Silicon Graphics, Inc. All rights reserved.
12 */ 12 */
13 13
14 14
15#include <asm/types.h>
16#include <asm/bitops.h>
17
18/* --------------------- PROM Features -----------------------------*/ 15/* --------------------- PROM Features -----------------------------*/
19extern int sn_prom_feature_available(int id); 16extern int sn_prom_feature_available(int id);
20 17
@@ -27,14 +24,12 @@ extern int sn_prom_feature_available(int id);
27 * "false" for new features. 24 * "false" for new features.
28 * 25 *
29 * Use: 26 * Use:
30 * if (sn_prom_feature_available(PRF_FEATURE_XXX)) 27 * if (sn_prom_feature_available(PRF_XXX))
31 * ... 28 * ...
32 */ 29 */
33 30
34/* 31#define PRF_PAL_CACHE_FLUSH_SAFE 0
35 * Example: feature XXX 32#define PRF_DEVICE_FLUSH_LIST 1
36 */
37#define PRF_FEATURE_XXX 0
38 33
39 34
40 35
@@ -51,7 +46,7 @@ extern int sn_prom_feature_available(int id);
51 * 46 *
52 * By default, features are disabled unless explicitly enabled. 47 * By default, features are disabled unless explicitly enabled.
53 */ 48 */
54#define OSF_MCA_SLV_TO_OS_INIT_SLV 0 49#define OSF_MCA_SLV_TO_OS_INIT_SLV 0
55#define OSF_FEAT_LOG_SBES 1 50#define OSF_FEAT_LOG_SBES 1
56 51
57#endif /* _ASM_IA64_SN_FEATURE_SETS_H */ 52#endif /* _ASM_IA64_SN_FEATURE_SETS_H */
diff --git a/include/asm-ia64/sn/sn_sal.h b/include/asm-ia64/sn/sn_sal.h
index 2a8b0d92a5d6..e77f0c9b7d3d 100644
--- a/include/asm-ia64/sn/sn_sal.h
+++ b/include/asm-ia64/sn/sn_sal.h
@@ -75,7 +75,8 @@
75#define SN_SAL_IOIF_GET_HUBDEV_INFO 0x02000055 75#define SN_SAL_IOIF_GET_HUBDEV_INFO 0x02000055
76#define SN_SAL_IOIF_GET_PCIBUS_INFO 0x02000056 76#define SN_SAL_IOIF_GET_PCIBUS_INFO 0x02000056
77#define SN_SAL_IOIF_GET_PCIDEV_INFO 0x02000057 77#define SN_SAL_IOIF_GET_PCIDEV_INFO 0x02000057
78#define SN_SAL_IOIF_GET_WIDGET_DMAFLUSH_LIST 0x02000058 78#define SN_SAL_IOIF_GET_WIDGET_DMAFLUSH_LIST 0x02000058 // deprecated
79#define SN_SAL_IOIF_GET_DEVICE_DMAFLUSH_LIST 0x0200005a
79 80
80#define SN_SAL_HUB_ERROR_INTERRUPT 0x02000060 81#define SN_SAL_HUB_ERROR_INTERRUPT 0x02000060
81#define SN_SAL_BTE_RECOVER 0x02000061 82#define SN_SAL_BTE_RECOVER 0x02000061
@@ -272,7 +273,7 @@ ia64_sn_console_putc(char ch)
272 ret_stuff.v0 = 0; 273 ret_stuff.v0 = 0;
273 ret_stuff.v1 = 0; 274 ret_stuff.v1 = 0;
274 ret_stuff.v2 = 0; 275 ret_stuff.v2 = 0;
275 SAL_CALL_NOLOCK(ret_stuff, SN_SAL_CONSOLE_PUTC, (uint64_t)ch, 0, 0, 0, 0, 0, 0); 276 SAL_CALL_NOLOCK(ret_stuff, SN_SAL_CONSOLE_PUTC, (u64)ch, 0, 0, 0, 0, 0, 0);
276 277
277 return ret_stuff.status; 278 return ret_stuff.status;
278} 279}
@@ -289,7 +290,7 @@ ia64_sn_console_putb(const char *buf, int len)
289 ret_stuff.v0 = 0; 290 ret_stuff.v0 = 0;
290 ret_stuff.v1 = 0; 291 ret_stuff.v1 = 0;
291 ret_stuff.v2 = 0; 292 ret_stuff.v2 = 0;
292 SAL_CALL_NOLOCK(ret_stuff, SN_SAL_CONSOLE_PUTB, (uint64_t)buf, (uint64_t)len, 0, 0, 0, 0, 0); 293 SAL_CALL_NOLOCK(ret_stuff, SN_SAL_CONSOLE_PUTB, (u64)buf, (u64)len, 0, 0, 0, 0, 0);
293 294
294 if ( ret_stuff.status == 0 ) { 295 if ( ret_stuff.status == 0 ) {
295 return ret_stuff.v0; 296 return ret_stuff.v0;
@@ -309,7 +310,7 @@ ia64_sn_plat_specific_err_print(int (*hook)(const char*, ...), char *rec)
309 ret_stuff.v0 = 0; 310 ret_stuff.v0 = 0;
310 ret_stuff.v1 = 0; 311 ret_stuff.v1 = 0;
311 ret_stuff.v2 = 0; 312 ret_stuff.v2 = 0;
312 SAL_CALL_REENTRANT(ret_stuff, SN_SAL_PRINT_ERROR, (uint64_t)hook, (uint64_t)rec, 0, 0, 0, 0, 0); 313 SAL_CALL_REENTRANT(ret_stuff, SN_SAL_PRINT_ERROR, (u64)hook, (u64)rec, 0, 0, 0, 0, 0);
313 314
314 return ret_stuff.status; 315 return ret_stuff.status;
315} 316}
@@ -397,7 +398,7 @@ ia64_sn_console_intr_status(void)
397 * Enable an interrupt on the SAL console device. 398 * Enable an interrupt on the SAL console device.
398 */ 399 */
399static inline void 400static inline void
400ia64_sn_console_intr_enable(uint64_t intr) 401ia64_sn_console_intr_enable(u64 intr)
401{ 402{
402 struct ia64_sal_retval ret_stuff; 403 struct ia64_sal_retval ret_stuff;
403 404
@@ -414,7 +415,7 @@ ia64_sn_console_intr_enable(uint64_t intr)
414 * Disable an interrupt on the SAL console device. 415 * Disable an interrupt on the SAL console device.
415 */ 416 */
416static inline void 417static inline void
417ia64_sn_console_intr_disable(uint64_t intr) 418ia64_sn_console_intr_disable(u64 intr)
418{ 419{
419 struct ia64_sal_retval ret_stuff; 420 struct ia64_sal_retval ret_stuff;
420 421
@@ -440,7 +441,7 @@ ia64_sn_console_xmit_chars(char *buf, int len)
440 ret_stuff.v1 = 0; 441 ret_stuff.v1 = 0;
441 ret_stuff.v2 = 0; 442 ret_stuff.v2 = 0;
442 SAL_CALL_NOLOCK(ret_stuff, SN_SAL_CONSOLE_XMIT_CHARS, 443 SAL_CALL_NOLOCK(ret_stuff, SN_SAL_CONSOLE_XMIT_CHARS,
443 (uint64_t)buf, (uint64_t)len, 444 (u64)buf, (u64)len,
444 0, 0, 0, 0, 0); 445 0, 0, 0, 0, 0);
445 446
446 if (ret_stuff.status == 0) { 447 if (ret_stuff.status == 0) {
@@ -1100,7 +1101,7 @@ ia64_sn_bte_recovery(nasid_t nasid)
1100 struct ia64_sal_retval rv; 1101 struct ia64_sal_retval rv;
1101 1102
1102 rv.status = 0; 1103 rv.status = 0;
1103 SAL_CALL_NOLOCK(rv, SN_SAL_BTE_RECOVER, 0, 0, 0, 0, 0, 0, 0); 1104 SAL_CALL_NOLOCK(rv, SN_SAL_BTE_RECOVER, (u64)nasid, 0, 0, 0, 0, 0, 0);
1104 if (rv.status == SALRET_NOT_IMPLEMENTED) 1105 if (rv.status == SALRET_NOT_IMPLEMENTED)
1105 return 0; 1106 return 0;
1106 return (int) rv.status; 1107 return (int) rv.status;
diff --git a/include/asm-ia64/sn/tioca.h b/include/asm-ia64/sn/tioca.h
index bc1aacfb9483..666222d7f0f6 100644
--- a/include/asm-ia64/sn/tioca.h
+++ b/include/asm-ia64/sn/tioca.h
@@ -19,47 +19,47 @@
19 */ 19 */
20 20
21struct tioca { 21struct tioca {
22 uint64_t ca_id; /* 0x000000 */ 22 u64 ca_id; /* 0x000000 */
23 uint64_t ca_control1; /* 0x000008 */ 23 u64 ca_control1; /* 0x000008 */
24 uint64_t ca_control2; /* 0x000010 */ 24 u64 ca_control2; /* 0x000010 */
25 uint64_t ca_status1; /* 0x000018 */ 25 u64 ca_status1; /* 0x000018 */
26 uint64_t ca_status2; /* 0x000020 */ 26 u64 ca_status2; /* 0x000020 */
27 uint64_t ca_gart_aperature; /* 0x000028 */ 27 u64 ca_gart_aperature; /* 0x000028 */
28 uint64_t ca_gfx_detach; /* 0x000030 */ 28 u64 ca_gfx_detach; /* 0x000030 */
29 uint64_t ca_inta_dest_addr; /* 0x000038 */ 29 u64 ca_inta_dest_addr; /* 0x000038 */
30 uint64_t ca_intb_dest_addr; /* 0x000040 */ 30 u64 ca_intb_dest_addr; /* 0x000040 */
31 uint64_t ca_err_int_dest_addr; /* 0x000048 */ 31 u64 ca_err_int_dest_addr; /* 0x000048 */
32 uint64_t ca_int_status; /* 0x000050 */ 32 u64 ca_int_status; /* 0x000050 */
33 uint64_t ca_int_status_alias; /* 0x000058 */ 33 u64 ca_int_status_alias; /* 0x000058 */
34 uint64_t ca_mult_error; /* 0x000060 */ 34 u64 ca_mult_error; /* 0x000060 */
35 uint64_t ca_mult_error_alias; /* 0x000068 */ 35 u64 ca_mult_error_alias; /* 0x000068 */
36 uint64_t ca_first_error; /* 0x000070 */ 36 u64 ca_first_error; /* 0x000070 */
37 uint64_t ca_int_mask; /* 0x000078 */ 37 u64 ca_int_mask; /* 0x000078 */
38 uint64_t ca_crm_pkterr_type; /* 0x000080 */ 38 u64 ca_crm_pkterr_type; /* 0x000080 */
39 uint64_t ca_crm_pkterr_type_alias; /* 0x000088 */ 39 u64 ca_crm_pkterr_type_alias; /* 0x000088 */
40 uint64_t ca_crm_ct_error_detail_1; /* 0x000090 */ 40 u64 ca_crm_ct_error_detail_1; /* 0x000090 */
41 uint64_t ca_crm_ct_error_detail_2; /* 0x000098 */ 41 u64 ca_crm_ct_error_detail_2; /* 0x000098 */
42 uint64_t ca_crm_tnumto; /* 0x0000A0 */ 42 u64 ca_crm_tnumto; /* 0x0000A0 */
43 uint64_t ca_gart_err; /* 0x0000A8 */ 43 u64 ca_gart_err; /* 0x0000A8 */
44 uint64_t ca_pcierr_type; /* 0x0000B0 */ 44 u64 ca_pcierr_type; /* 0x0000B0 */
45 uint64_t ca_pcierr_addr; /* 0x0000B8 */ 45 u64 ca_pcierr_addr; /* 0x0000B8 */
46 46
47 uint64_t ca_pad_0000C0[3]; /* 0x0000{C0..D0} */ 47 u64 ca_pad_0000C0[3]; /* 0x0000{C0..D0} */
48 48
49 uint64_t ca_pci_rd_buf_flush; /* 0x0000D8 */ 49 u64 ca_pci_rd_buf_flush; /* 0x0000D8 */
50 uint64_t ca_pci_dma_addr_extn; /* 0x0000E0 */ 50 u64 ca_pci_dma_addr_extn; /* 0x0000E0 */
51 uint64_t ca_agp_dma_addr_extn; /* 0x0000E8 */ 51 u64 ca_agp_dma_addr_extn; /* 0x0000E8 */
52 uint64_t ca_force_inta; /* 0x0000F0 */ 52 u64 ca_force_inta; /* 0x0000F0 */
53 uint64_t ca_force_intb; /* 0x0000F8 */ 53 u64 ca_force_intb; /* 0x0000F8 */
54 uint64_t ca_debug_vector_sel; /* 0x000100 */ 54 u64 ca_debug_vector_sel; /* 0x000100 */
55 uint64_t ca_debug_mux_core_sel; /* 0x000108 */ 55 u64 ca_debug_mux_core_sel; /* 0x000108 */
56 uint64_t ca_debug_mux_pci_sel; /* 0x000110 */ 56 u64 ca_debug_mux_pci_sel; /* 0x000110 */
57 uint64_t ca_debug_domain_sel; /* 0x000118 */ 57 u64 ca_debug_domain_sel; /* 0x000118 */
58 58
59 uint64_t ca_pad_000120[28]; /* 0x0001{20..F8} */ 59 u64 ca_pad_000120[28]; /* 0x0001{20..F8} */
60 60
61 uint64_t ca_gart_ptr_table; /* 0x200 */ 61 u64 ca_gart_ptr_table; /* 0x200 */
62 uint64_t ca_gart_tlb_addr[8]; /* 0x2{08..40} */ 62 u64 ca_gart_tlb_addr[8]; /* 0x2{08..40} */
63}; 63};
64 64
65/* 65/*
diff --git a/include/asm-ia64/sn/tioca_provider.h b/include/asm-ia64/sn/tioca_provider.h
index b532ef6148ed..ab7fe2463468 100644
--- a/include/asm-ia64/sn/tioca_provider.h
+++ b/include/asm-ia64/sn/tioca_provider.h
@@ -56,31 +56,31 @@ struct tioca_kernel {
56 /* 56 /*
57 * General GART stuff 57 * General GART stuff
58 */ 58 */
59 uint64_t ca_ap_size; /* size of aperature in bytes */ 59 u64 ca_ap_size; /* size of aperature in bytes */
60 uint32_t ca_gart_entries; /* # uint64_t entries in gart */ 60 u32 ca_gart_entries; /* # u64 entries in gart */
61 uint32_t ca_ap_pagesize; /* aperature page size in bytes */ 61 u32 ca_ap_pagesize; /* aperature page size in bytes */
62 uint64_t ca_ap_bus_base; /* bus address of CA aperature */ 62 u64 ca_ap_bus_base; /* bus address of CA aperature */
63 uint64_t ca_gart_size; /* gart size in bytes */ 63 u64 ca_gart_size; /* gart size in bytes */
64 uint64_t *ca_gart; /* gart table vaddr */ 64 u64 *ca_gart; /* gart table vaddr */
65 uint64_t ca_gart_coretalk_addr; /* gart coretalk addr */ 65 u64 ca_gart_coretalk_addr; /* gart coretalk addr */
66 uint8_t ca_gart_iscoherent; /* used in tioca_tlbflush */ 66 u8 ca_gart_iscoherent; /* used in tioca_tlbflush */
67 67
68 /* PCI GART convenience values */ 68 /* PCI GART convenience values */
69 uint64_t ca_pciap_base; /* pci aperature bus base address */ 69 u64 ca_pciap_base; /* pci aperature bus base address */
70 uint64_t ca_pciap_size; /* pci aperature size (bytes) */ 70 u64 ca_pciap_size; /* pci aperature size (bytes) */
71 uint64_t ca_pcigart_base; /* gfx GART bus base address */ 71 u64 ca_pcigart_base; /* gfx GART bus base address */
72 uint64_t *ca_pcigart; /* gfx GART vm address */ 72 u64 *ca_pcigart; /* gfx GART vm address */
73 uint32_t ca_pcigart_entries; 73 u32 ca_pcigart_entries;
74 uint32_t ca_pcigart_start; /* PCI start index in ca_gart */ 74 u32 ca_pcigart_start; /* PCI start index in ca_gart */
75 void *ca_pcigart_pagemap; 75 void *ca_pcigart_pagemap;
76 76
77 /* AGP GART convenience values */ 77 /* AGP GART convenience values */
78 uint64_t ca_gfxap_base; /* gfx aperature bus base address */ 78 u64 ca_gfxap_base; /* gfx aperature bus base address */
79 uint64_t ca_gfxap_size; /* gfx aperature size (bytes) */ 79 u64 ca_gfxap_size; /* gfx aperature size (bytes) */
80 uint64_t ca_gfxgart_base; /* gfx GART bus base address */ 80 u64 ca_gfxgart_base; /* gfx GART bus base address */
81 uint64_t *ca_gfxgart; /* gfx GART vm address */ 81 u64 *ca_gfxgart; /* gfx GART vm address */
82 uint32_t ca_gfxgart_entries; 82 u32 ca_gfxgart_entries;
83 uint32_t ca_gfxgart_start; /* agpgart start index in ca_gart */ 83 u32 ca_gfxgart_start; /* agpgart start index in ca_gart */
84}; 84};
85 85
86/* 86/*
@@ -93,11 +93,11 @@ struct tioca_kernel {
93struct tioca_common { 93struct tioca_common {
94 struct pcibus_bussoft ca_common; /* common pciio header */ 94 struct pcibus_bussoft ca_common; /* common pciio header */
95 95
96 uint32_t ca_rev; 96 u32 ca_rev;
97 uint32_t ca_closest_nasid; 97 u32 ca_closest_nasid;
98 98
99 uint64_t ca_prom_private; 99 u64 ca_prom_private;
100 uint64_t ca_kernel_private; 100 u64 ca_kernel_private;
101}; 101};
102 102
103/** 103/**
@@ -139,9 +139,9 @@ tioca_paddr_to_gart(unsigned long paddr)
139 */ 139 */
140 140
141static inline unsigned long 141static inline unsigned long
142tioca_physpage_to_gart(uint64_t page_addr) 142tioca_physpage_to_gart(u64 page_addr)
143{ 143{
144 uint64_t coretalk_addr; 144 u64 coretalk_addr;
145 145
146 coretalk_addr = PHYS_TO_TIODMA(page_addr); 146 coretalk_addr = PHYS_TO_TIODMA(page_addr);
147 if (!coretalk_addr) { 147 if (!coretalk_addr) {
@@ -161,7 +161,7 @@ tioca_physpage_to_gart(uint64_t page_addr)
161static inline void 161static inline void
162tioca_tlbflush(struct tioca_kernel *tioca_kernel) 162tioca_tlbflush(struct tioca_kernel *tioca_kernel)
163{ 163{
164 volatile uint64_t tmp; 164 volatile u64 tmp;
165 volatile struct tioca *ca_base; 165 volatile struct tioca *ca_base;
166 struct tioca_common *tioca_common; 166 struct tioca_common *tioca_common;
167 167
@@ -200,7 +200,7 @@ tioca_tlbflush(struct tioca_kernel *tioca_kernel)
200 tmp = __sn_readq_relaxed(&ca_base->ca_control2); 200 tmp = __sn_readq_relaxed(&ca_base->ca_control2);
201} 201}
202 202
203extern uint32_t tioca_gart_found; 203extern u32 tioca_gart_found;
204extern struct list_head tioca_list; 204extern struct list_head tioca_list;
205extern int tioca_init_provider(void); 205extern int tioca_init_provider(void);
206extern void tioca_fastwrite_enable(struct tioca_kernel *tioca_kern); 206extern void tioca_fastwrite_enable(struct tioca_kernel *tioca_kern);
diff --git a/include/asm-ia64/sn/tioce.h b/include/asm-ia64/sn/tioce.h
index ecaddf960086..d4c990712eac 100644
--- a/include/asm-ia64/sn/tioce.h
+++ b/include/asm-ia64/sn/tioce.h
@@ -35,72 +35,72 @@ typedef volatile struct tioce {
35 /* 35 /*
36 * ADMIN : Administration Registers 36 * ADMIN : Administration Registers
37 */ 37 */
38 uint64_t ce_adm_id; /* 0x000000 */ 38 u64 ce_adm_id; /* 0x000000 */
39 uint64_t ce_pad_000008; /* 0x000008 */ 39 u64 ce_pad_000008; /* 0x000008 */
40 uint64_t ce_adm_dyn_credit_status; /* 0x000010 */ 40 u64 ce_adm_dyn_credit_status; /* 0x000010 */
41 uint64_t ce_adm_last_credit_status; /* 0x000018 */ 41 u64 ce_adm_last_credit_status; /* 0x000018 */
42 uint64_t ce_adm_credit_limit; /* 0x000020 */ 42 u64 ce_adm_credit_limit; /* 0x000020 */
43 uint64_t ce_adm_force_credit; /* 0x000028 */ 43 u64 ce_adm_force_credit; /* 0x000028 */
44 uint64_t ce_adm_control; /* 0x000030 */ 44 u64 ce_adm_control; /* 0x000030 */
45 uint64_t ce_adm_mmr_chn_timeout; /* 0x000038 */ 45 u64 ce_adm_mmr_chn_timeout; /* 0x000038 */
46 uint64_t ce_adm_ssp_ure_timeout; /* 0x000040 */ 46 u64 ce_adm_ssp_ure_timeout; /* 0x000040 */
47 uint64_t ce_adm_ssp_dre_timeout; /* 0x000048 */ 47 u64 ce_adm_ssp_dre_timeout; /* 0x000048 */
48 uint64_t ce_adm_ssp_debug_sel; /* 0x000050 */ 48 u64 ce_adm_ssp_debug_sel; /* 0x000050 */
49 uint64_t ce_adm_int_status; /* 0x000058 */ 49 u64 ce_adm_int_status; /* 0x000058 */
50 uint64_t ce_adm_int_status_alias; /* 0x000060 */ 50 u64 ce_adm_int_status_alias; /* 0x000060 */
51 uint64_t ce_adm_int_mask; /* 0x000068 */ 51 u64 ce_adm_int_mask; /* 0x000068 */
52 uint64_t ce_adm_int_pending; /* 0x000070 */ 52 u64 ce_adm_int_pending; /* 0x000070 */
53 uint64_t ce_adm_force_int; /* 0x000078 */ 53 u64 ce_adm_force_int; /* 0x000078 */
54 uint64_t ce_adm_ure_ups_buf_barrier_flush; /* 0x000080 */ 54 u64 ce_adm_ure_ups_buf_barrier_flush; /* 0x000080 */
55 uint64_t ce_adm_int_dest[15]; /* 0x000088 -- 0x0000F8 */ 55 u64 ce_adm_int_dest[15]; /* 0x000088 -- 0x0000F8 */
56 uint64_t ce_adm_error_summary; /* 0x000100 */ 56 u64 ce_adm_error_summary; /* 0x000100 */
57 uint64_t ce_adm_error_summary_alias; /* 0x000108 */ 57 u64 ce_adm_error_summary_alias; /* 0x000108 */
58 uint64_t ce_adm_error_mask; /* 0x000110 */ 58 u64 ce_adm_error_mask; /* 0x000110 */
59 uint64_t ce_adm_first_error; /* 0x000118 */ 59 u64 ce_adm_first_error; /* 0x000118 */
60 uint64_t ce_adm_error_overflow; /* 0x000120 */ 60 u64 ce_adm_error_overflow; /* 0x000120 */
61 uint64_t ce_adm_error_overflow_alias; /* 0x000128 */ 61 u64 ce_adm_error_overflow_alias; /* 0x000128 */
62 uint64_t ce_pad_000130[2]; /* 0x000130 -- 0x000138 */ 62 u64 ce_pad_000130[2]; /* 0x000130 -- 0x000138 */
63 uint64_t ce_adm_tnum_error; /* 0x000140 */ 63 u64 ce_adm_tnum_error; /* 0x000140 */
64 uint64_t ce_adm_mmr_err_detail; /* 0x000148 */ 64 u64 ce_adm_mmr_err_detail; /* 0x000148 */
65 uint64_t ce_adm_msg_sram_perr_detail; /* 0x000150 */ 65 u64 ce_adm_msg_sram_perr_detail; /* 0x000150 */
66 uint64_t ce_adm_bap_sram_perr_detail; /* 0x000158 */ 66 u64 ce_adm_bap_sram_perr_detail; /* 0x000158 */
67 uint64_t ce_adm_ce_sram_perr_detail; /* 0x000160 */ 67 u64 ce_adm_ce_sram_perr_detail; /* 0x000160 */
68 uint64_t ce_adm_ce_credit_oflow_detail; /* 0x000168 */ 68 u64 ce_adm_ce_credit_oflow_detail; /* 0x000168 */
69 uint64_t ce_adm_tx_link_idle_max_timer; /* 0x000170 */ 69 u64 ce_adm_tx_link_idle_max_timer; /* 0x000170 */
70 uint64_t ce_adm_pcie_debug_sel; /* 0x000178 */ 70 u64 ce_adm_pcie_debug_sel; /* 0x000178 */
71 uint64_t ce_pad_000180[16]; /* 0x000180 -- 0x0001F8 */ 71 u64 ce_pad_000180[16]; /* 0x000180 -- 0x0001F8 */
72 72
73 uint64_t ce_adm_pcie_debug_sel_top; /* 0x000200 */ 73 u64 ce_adm_pcie_debug_sel_top; /* 0x000200 */
74 uint64_t ce_adm_pcie_debug_lat_sel_lo_top; /* 0x000208 */ 74 u64 ce_adm_pcie_debug_lat_sel_lo_top; /* 0x000208 */
75 uint64_t ce_adm_pcie_debug_lat_sel_hi_top; /* 0x000210 */ 75 u64 ce_adm_pcie_debug_lat_sel_hi_top; /* 0x000210 */
76 uint64_t ce_adm_pcie_debug_trig_sel_top; /* 0x000218 */ 76 u64 ce_adm_pcie_debug_trig_sel_top; /* 0x000218 */
77 uint64_t ce_adm_pcie_debug_trig_lat_sel_lo_top; /* 0x000220 */ 77 u64 ce_adm_pcie_debug_trig_lat_sel_lo_top; /* 0x000220 */
78 uint64_t ce_adm_pcie_debug_trig_lat_sel_hi_top; /* 0x000228 */ 78 u64 ce_adm_pcie_debug_trig_lat_sel_hi_top; /* 0x000228 */
79 uint64_t ce_adm_pcie_trig_compare_top; /* 0x000230 */ 79 u64 ce_adm_pcie_trig_compare_top; /* 0x000230 */
80 uint64_t ce_adm_pcie_trig_compare_en_top; /* 0x000238 */ 80 u64 ce_adm_pcie_trig_compare_en_top; /* 0x000238 */
81 uint64_t ce_adm_ssp_debug_sel_top; /* 0x000240 */ 81 u64 ce_adm_ssp_debug_sel_top; /* 0x000240 */
82 uint64_t ce_adm_ssp_debug_lat_sel_lo_top; /* 0x000248 */ 82 u64 ce_adm_ssp_debug_lat_sel_lo_top; /* 0x000248 */
83 uint64_t ce_adm_ssp_debug_lat_sel_hi_top; /* 0x000250 */ 83 u64 ce_adm_ssp_debug_lat_sel_hi_top; /* 0x000250 */
84 uint64_t ce_adm_ssp_debug_trig_sel_top; /* 0x000258 */ 84 u64 ce_adm_ssp_debug_trig_sel_top; /* 0x000258 */
85 uint64_t ce_adm_ssp_debug_trig_lat_sel_lo_top; /* 0x000260 */ 85 u64 ce_adm_ssp_debug_trig_lat_sel_lo_top; /* 0x000260 */
86 uint64_t ce_adm_ssp_debug_trig_lat_sel_hi_top; /* 0x000268 */ 86 u64 ce_adm_ssp_debug_trig_lat_sel_hi_top; /* 0x000268 */
87 uint64_t ce_adm_ssp_trig_compare_top; /* 0x000270 */ 87 u64 ce_adm_ssp_trig_compare_top; /* 0x000270 */
88 uint64_t ce_adm_ssp_trig_compare_en_top; /* 0x000278 */ 88 u64 ce_adm_ssp_trig_compare_en_top; /* 0x000278 */
89 uint64_t ce_pad_000280[48]; /* 0x000280 -- 0x0003F8 */ 89 u64 ce_pad_000280[48]; /* 0x000280 -- 0x0003F8 */
90 90
91 uint64_t ce_adm_bap_ctrl; /* 0x000400 */ 91 u64 ce_adm_bap_ctrl; /* 0x000400 */
92 uint64_t ce_pad_000408[127]; /* 0x000408 -- 0x0007F8 */ 92 u64 ce_pad_000408[127]; /* 0x000408 -- 0x0007F8 */
93 93
94 uint64_t ce_msg_buf_data63_0[35]; /* 0x000800 -- 0x000918 */ 94 u64 ce_msg_buf_data63_0[35]; /* 0x000800 -- 0x000918 */
95 uint64_t ce_pad_000920[29]; /* 0x000920 -- 0x0009F8 */ 95 u64 ce_pad_000920[29]; /* 0x000920 -- 0x0009F8 */
96 96
97 uint64_t ce_msg_buf_data127_64[35]; /* 0x000A00 -- 0x000B18 */ 97 u64 ce_msg_buf_data127_64[35]; /* 0x000A00 -- 0x000B18 */
98 uint64_t ce_pad_000B20[29]; /* 0x000B20 -- 0x000BF8 */ 98 u64 ce_pad_000B20[29]; /* 0x000B20 -- 0x000BF8 */
99 99
100 uint64_t ce_msg_buf_parity[35]; /* 0x000C00 -- 0x000D18 */ 100 u64 ce_msg_buf_parity[35]; /* 0x000C00 -- 0x000D18 */
101 uint64_t ce_pad_000D20[29]; /* 0x000D20 -- 0x000DF8 */ 101 u64 ce_pad_000D20[29]; /* 0x000D20 -- 0x000DF8 */
102 102
103 uint64_t ce_pad_000E00[576]; /* 0x000E00 -- 0x001FF8 */ 103 u64 ce_pad_000E00[576]; /* 0x000E00 -- 0x001FF8 */
104 104
105 /* 105 /*
106 * LSI : LSI's PCI Express Link Registers (Link#1 and Link#2) 106 * LSI : LSI's PCI Express Link Registers (Link#1 and Link#2)
@@ -109,141 +109,141 @@ typedef volatile struct tioce {
109 */ 109 */
110 #define ce_lsi(link_num) ce_lsi[link_num-1] 110 #define ce_lsi(link_num) ce_lsi[link_num-1]
111 struct ce_lsi_reg { 111 struct ce_lsi_reg {
112 uint64_t ce_lsi_lpu_id; /* 0x00z000 */ 112 u64 ce_lsi_lpu_id; /* 0x00z000 */
113 uint64_t ce_lsi_rst; /* 0x00z008 */ 113 u64 ce_lsi_rst; /* 0x00z008 */
114 uint64_t ce_lsi_dbg_stat; /* 0x00z010 */ 114 u64 ce_lsi_dbg_stat; /* 0x00z010 */
115 uint64_t ce_lsi_dbg_cfg; /* 0x00z018 */ 115 u64 ce_lsi_dbg_cfg; /* 0x00z018 */
116 uint64_t ce_lsi_ltssm_ctrl; /* 0x00z020 */ 116 u64 ce_lsi_ltssm_ctrl; /* 0x00z020 */
117 uint64_t ce_lsi_lk_stat; /* 0x00z028 */ 117 u64 ce_lsi_lk_stat; /* 0x00z028 */
118 uint64_t ce_pad_00z030[2]; /* 0x00z030 -- 0x00z038 */ 118 u64 ce_pad_00z030[2]; /* 0x00z030 -- 0x00z038 */
119 uint64_t ce_lsi_int_and_stat; /* 0x00z040 */ 119 u64 ce_lsi_int_and_stat; /* 0x00z040 */
120 uint64_t ce_lsi_int_mask; /* 0x00z048 */ 120 u64 ce_lsi_int_mask; /* 0x00z048 */
121 uint64_t ce_pad_00z050[22]; /* 0x00z050 -- 0x00z0F8 */ 121 u64 ce_pad_00z050[22]; /* 0x00z050 -- 0x00z0F8 */
122 uint64_t ce_lsi_lk_perf_cnt_sel; /* 0x00z100 */ 122 u64 ce_lsi_lk_perf_cnt_sel; /* 0x00z100 */
123 uint64_t ce_pad_00z108; /* 0x00z108 */ 123 u64 ce_pad_00z108; /* 0x00z108 */
124 uint64_t ce_lsi_lk_perf_cnt_ctrl; /* 0x00z110 */ 124 u64 ce_lsi_lk_perf_cnt_ctrl; /* 0x00z110 */
125 uint64_t ce_pad_00z118; /* 0x00z118 */ 125 u64 ce_pad_00z118; /* 0x00z118 */
126 uint64_t ce_lsi_lk_perf_cnt1; /* 0x00z120 */ 126 u64 ce_lsi_lk_perf_cnt1; /* 0x00z120 */
127 uint64_t ce_lsi_lk_perf_cnt1_test; /* 0x00z128 */ 127 u64 ce_lsi_lk_perf_cnt1_test; /* 0x00z128 */
128 uint64_t ce_lsi_lk_perf_cnt2; /* 0x00z130 */ 128 u64 ce_lsi_lk_perf_cnt2; /* 0x00z130 */
129 uint64_t ce_lsi_lk_perf_cnt2_test; /* 0x00z138 */ 129 u64 ce_lsi_lk_perf_cnt2_test; /* 0x00z138 */
130 uint64_t ce_pad_00z140[24]; /* 0x00z140 -- 0x00z1F8 */ 130 u64 ce_pad_00z140[24]; /* 0x00z140 -- 0x00z1F8 */
131 uint64_t ce_lsi_lk_lyr_cfg; /* 0x00z200 */ 131 u64 ce_lsi_lk_lyr_cfg; /* 0x00z200 */
132 uint64_t ce_lsi_lk_lyr_status; /* 0x00z208 */ 132 u64 ce_lsi_lk_lyr_status; /* 0x00z208 */
133 uint64_t ce_lsi_lk_lyr_int_stat; /* 0x00z210 */ 133 u64 ce_lsi_lk_lyr_int_stat; /* 0x00z210 */
134 uint64_t ce_lsi_lk_ly_int_stat_test; /* 0x00z218 */ 134 u64 ce_lsi_lk_ly_int_stat_test; /* 0x00z218 */
135 uint64_t ce_lsi_lk_ly_int_stat_mask; /* 0x00z220 */ 135 u64 ce_lsi_lk_ly_int_stat_mask; /* 0x00z220 */
136 uint64_t ce_pad_00z228[3]; /* 0x00z228 -- 0x00z238 */ 136 u64 ce_pad_00z228[3]; /* 0x00z228 -- 0x00z238 */
137 uint64_t ce_lsi_fc_upd_ctl; /* 0x00z240 */ 137 u64 ce_lsi_fc_upd_ctl; /* 0x00z240 */
138 uint64_t ce_pad_00z248[3]; /* 0x00z248 -- 0x00z258 */ 138 u64 ce_pad_00z248[3]; /* 0x00z248 -- 0x00z258 */
139 uint64_t ce_lsi_flw_ctl_upd_to_timer; /* 0x00z260 */ 139 u64 ce_lsi_flw_ctl_upd_to_timer; /* 0x00z260 */
140 uint64_t ce_lsi_flw_ctl_upd_timer0; /* 0x00z268 */ 140 u64 ce_lsi_flw_ctl_upd_timer0; /* 0x00z268 */
141 uint64_t ce_lsi_flw_ctl_upd_timer1; /* 0x00z270 */ 141 u64 ce_lsi_flw_ctl_upd_timer1; /* 0x00z270 */
142 uint64_t ce_pad_00z278[49]; /* 0x00z278 -- 0x00z3F8 */ 142 u64 ce_pad_00z278[49]; /* 0x00z278 -- 0x00z3F8 */
143 uint64_t ce_lsi_freq_nak_lat_thrsh; /* 0x00z400 */ 143 u64 ce_lsi_freq_nak_lat_thrsh; /* 0x00z400 */
144 uint64_t ce_lsi_ack_nak_lat_tmr; /* 0x00z408 */ 144 u64 ce_lsi_ack_nak_lat_tmr; /* 0x00z408 */
145 uint64_t ce_lsi_rply_tmr_thr; /* 0x00z410 */ 145 u64 ce_lsi_rply_tmr_thr; /* 0x00z410 */
146 uint64_t ce_lsi_rply_tmr; /* 0x00z418 */ 146 u64 ce_lsi_rply_tmr; /* 0x00z418 */
147 uint64_t ce_lsi_rply_num_stat; /* 0x00z420 */ 147 u64 ce_lsi_rply_num_stat; /* 0x00z420 */
148 uint64_t ce_lsi_rty_buf_max_addr; /* 0x00z428 */ 148 u64 ce_lsi_rty_buf_max_addr; /* 0x00z428 */
149 uint64_t ce_lsi_rty_fifo_ptr; /* 0x00z430 */ 149 u64 ce_lsi_rty_fifo_ptr; /* 0x00z430 */
150 uint64_t ce_lsi_rty_fifo_rd_wr_ptr; /* 0x00z438 */ 150 u64 ce_lsi_rty_fifo_rd_wr_ptr; /* 0x00z438 */
151 uint64_t ce_lsi_rty_fifo_cred; /* 0x00z440 */ 151 u64 ce_lsi_rty_fifo_cred; /* 0x00z440 */
152 uint64_t ce_lsi_seq_cnt; /* 0x00z448 */ 152 u64 ce_lsi_seq_cnt; /* 0x00z448 */
153 uint64_t ce_lsi_ack_sent_seq_num; /* 0x00z450 */ 153 u64 ce_lsi_ack_sent_seq_num; /* 0x00z450 */
154 uint64_t ce_lsi_seq_cnt_fifo_max_addr; /* 0x00z458 */ 154 u64 ce_lsi_seq_cnt_fifo_max_addr; /* 0x00z458 */
155 uint64_t ce_lsi_seq_cnt_fifo_ptr; /* 0x00z460 */ 155 u64 ce_lsi_seq_cnt_fifo_ptr; /* 0x00z460 */
156 uint64_t ce_lsi_seq_cnt_rd_wr_ptr; /* 0x00z468 */ 156 u64 ce_lsi_seq_cnt_rd_wr_ptr; /* 0x00z468 */
157 uint64_t ce_lsi_tx_lk_ts_ctl; /* 0x00z470 */ 157 u64 ce_lsi_tx_lk_ts_ctl; /* 0x00z470 */
158 uint64_t ce_pad_00z478; /* 0x00z478 */ 158 u64 ce_pad_00z478; /* 0x00z478 */
159 uint64_t ce_lsi_mem_addr_ctl; /* 0x00z480 */ 159 u64 ce_lsi_mem_addr_ctl; /* 0x00z480 */
160 uint64_t ce_lsi_mem_d_ld0; /* 0x00z488 */ 160 u64 ce_lsi_mem_d_ld0; /* 0x00z488 */
161 uint64_t ce_lsi_mem_d_ld1; /* 0x00z490 */ 161 u64 ce_lsi_mem_d_ld1; /* 0x00z490 */
162 uint64_t ce_lsi_mem_d_ld2; /* 0x00z498 */ 162 u64 ce_lsi_mem_d_ld2; /* 0x00z498 */
163 uint64_t ce_lsi_mem_d_ld3; /* 0x00z4A0 */ 163 u64 ce_lsi_mem_d_ld3; /* 0x00z4A0 */
164 uint64_t ce_lsi_mem_d_ld4; /* 0x00z4A8 */ 164 u64 ce_lsi_mem_d_ld4; /* 0x00z4A8 */
165 uint64_t ce_pad_00z4B0[2]; /* 0x00z4B0 -- 0x00z4B8 */ 165 u64 ce_pad_00z4B0[2]; /* 0x00z4B0 -- 0x00z4B8 */
166 uint64_t ce_lsi_rty_d_cnt; /* 0x00z4C0 */ 166 u64 ce_lsi_rty_d_cnt; /* 0x00z4C0 */
167 uint64_t ce_lsi_seq_buf_cnt; /* 0x00z4C8 */ 167 u64 ce_lsi_seq_buf_cnt; /* 0x00z4C8 */
168 uint64_t ce_lsi_seq_buf_bt_d; /* 0x00z4D0 */ 168 u64 ce_lsi_seq_buf_bt_d; /* 0x00z4D0 */
169 uint64_t ce_pad_00z4D8; /* 0x00z4D8 */ 169 u64 ce_pad_00z4D8; /* 0x00z4D8 */
170 uint64_t ce_lsi_ack_lat_thr; /* 0x00z4E0 */ 170 u64 ce_lsi_ack_lat_thr; /* 0x00z4E0 */
171 uint64_t ce_pad_00z4E8[3]; /* 0x00z4E8 -- 0x00z4F8 */ 171 u64 ce_pad_00z4E8[3]; /* 0x00z4E8 -- 0x00z4F8 */
172 uint64_t ce_lsi_nxt_rcv_seq_1_cntr; /* 0x00z500 */ 172 u64 ce_lsi_nxt_rcv_seq_1_cntr; /* 0x00z500 */
173 uint64_t ce_lsi_unsp_dllp_rcvd; /* 0x00z508 */ 173 u64 ce_lsi_unsp_dllp_rcvd; /* 0x00z508 */
174 uint64_t ce_lsi_rcv_lk_ts_ctl; /* 0x00z510 */ 174 u64 ce_lsi_rcv_lk_ts_ctl; /* 0x00z510 */
175 uint64_t ce_pad_00z518[29]; /* 0x00z518 -- 0x00z5F8 */ 175 u64 ce_pad_00z518[29]; /* 0x00z518 -- 0x00z5F8 */
176 uint64_t ce_lsi_phy_lyr_cfg; /* 0x00z600 */ 176 u64 ce_lsi_phy_lyr_cfg; /* 0x00z600 */
177 uint64_t ce_pad_00z608; /* 0x00z608 */ 177 u64 ce_pad_00z608; /* 0x00z608 */
178 uint64_t ce_lsi_phy_lyr_int_stat; /* 0x00z610 */ 178 u64 ce_lsi_phy_lyr_int_stat; /* 0x00z610 */
179 uint64_t ce_lsi_phy_lyr_int_stat_test; /* 0x00z618 */ 179 u64 ce_lsi_phy_lyr_int_stat_test; /* 0x00z618 */
180 uint64_t ce_lsi_phy_lyr_int_mask; /* 0x00z620 */ 180 u64 ce_lsi_phy_lyr_int_mask; /* 0x00z620 */
181 uint64_t ce_pad_00z628[11]; /* 0x00z628 -- 0x00z678 */ 181 u64 ce_pad_00z628[11]; /* 0x00z628 -- 0x00z678 */
182 uint64_t ce_lsi_rcv_phy_cfg; /* 0x00z680 */ 182 u64 ce_lsi_rcv_phy_cfg; /* 0x00z680 */
183 uint64_t ce_lsi_rcv_phy_stat1; /* 0x00z688 */ 183 u64 ce_lsi_rcv_phy_stat1; /* 0x00z688 */
184 uint64_t ce_lsi_rcv_phy_stat2; /* 0x00z690 */ 184 u64 ce_lsi_rcv_phy_stat2; /* 0x00z690 */
185 uint64_t ce_lsi_rcv_phy_stat3; /* 0x00z698 */ 185 u64 ce_lsi_rcv_phy_stat3; /* 0x00z698 */
186 uint64_t ce_lsi_rcv_phy_int_stat; /* 0x00z6A0 */ 186 u64 ce_lsi_rcv_phy_int_stat; /* 0x00z6A0 */
187 uint64_t ce_lsi_rcv_phy_int_stat_test; /* 0x00z6A8 */ 187 u64 ce_lsi_rcv_phy_int_stat_test; /* 0x00z6A8 */
188 uint64_t ce_lsi_rcv_phy_int_mask; /* 0x00z6B0 */ 188 u64 ce_lsi_rcv_phy_int_mask; /* 0x00z6B0 */
189 uint64_t ce_pad_00z6B8[9]; /* 0x00z6B8 -- 0x00z6F8 */ 189 u64 ce_pad_00z6B8[9]; /* 0x00z6B8 -- 0x00z6F8 */
190 uint64_t ce_lsi_tx_phy_cfg; /* 0x00z700 */ 190 u64 ce_lsi_tx_phy_cfg; /* 0x00z700 */
191 uint64_t ce_lsi_tx_phy_stat; /* 0x00z708 */ 191 u64 ce_lsi_tx_phy_stat; /* 0x00z708 */
192 uint64_t ce_lsi_tx_phy_int_stat; /* 0x00z710 */ 192 u64 ce_lsi_tx_phy_int_stat; /* 0x00z710 */
193 uint64_t ce_lsi_tx_phy_int_stat_test; /* 0x00z718 */ 193 u64 ce_lsi_tx_phy_int_stat_test; /* 0x00z718 */
194 uint64_t ce_lsi_tx_phy_int_mask; /* 0x00z720 */ 194 u64 ce_lsi_tx_phy_int_mask; /* 0x00z720 */
195 uint64_t ce_lsi_tx_phy_stat2; /* 0x00z728 */ 195 u64 ce_lsi_tx_phy_stat2; /* 0x00z728 */
196 uint64_t ce_pad_00z730[10]; /* 0x00z730 -- 0x00z77F */ 196 u64 ce_pad_00z730[10]; /* 0x00z730 -- 0x00z77F */
197 uint64_t ce_lsi_ltssm_cfg1; /* 0x00z780 */ 197 u64 ce_lsi_ltssm_cfg1; /* 0x00z780 */
198 uint64_t ce_lsi_ltssm_cfg2; /* 0x00z788 */ 198 u64 ce_lsi_ltssm_cfg2; /* 0x00z788 */
199 uint64_t ce_lsi_ltssm_cfg3; /* 0x00z790 */ 199 u64 ce_lsi_ltssm_cfg3; /* 0x00z790 */
200 uint64_t ce_lsi_ltssm_cfg4; /* 0x00z798 */ 200 u64 ce_lsi_ltssm_cfg4; /* 0x00z798 */
201 uint64_t ce_lsi_ltssm_cfg5; /* 0x00z7A0 */ 201 u64 ce_lsi_ltssm_cfg5; /* 0x00z7A0 */
202 uint64_t ce_lsi_ltssm_stat1; /* 0x00z7A8 */ 202 u64 ce_lsi_ltssm_stat1; /* 0x00z7A8 */
203 uint64_t ce_lsi_ltssm_stat2; /* 0x00z7B0 */ 203 u64 ce_lsi_ltssm_stat2; /* 0x00z7B0 */
204 uint64_t ce_lsi_ltssm_int_stat; /* 0x00z7B8 */ 204 u64 ce_lsi_ltssm_int_stat; /* 0x00z7B8 */
205 uint64_t ce_lsi_ltssm_int_stat_test; /* 0x00z7C0 */ 205 u64 ce_lsi_ltssm_int_stat_test; /* 0x00z7C0 */
206 uint64_t ce_lsi_ltssm_int_mask; /* 0x00z7C8 */ 206 u64 ce_lsi_ltssm_int_mask; /* 0x00z7C8 */
207 uint64_t ce_lsi_ltssm_stat_wr_en; /* 0x00z7D0 */ 207 u64 ce_lsi_ltssm_stat_wr_en; /* 0x00z7D0 */
208 uint64_t ce_pad_00z7D8[5]; /* 0x00z7D8 -- 0x00z7F8 */ 208 u64 ce_pad_00z7D8[5]; /* 0x00z7D8 -- 0x00z7F8 */
209 uint64_t ce_lsi_gb_cfg1; /* 0x00z800 */ 209 u64 ce_lsi_gb_cfg1; /* 0x00z800 */
210 uint64_t ce_lsi_gb_cfg2; /* 0x00z808 */ 210 u64 ce_lsi_gb_cfg2; /* 0x00z808 */
211 uint64_t ce_lsi_gb_cfg3; /* 0x00z810 */ 211 u64 ce_lsi_gb_cfg3; /* 0x00z810 */
212 uint64_t ce_lsi_gb_cfg4; /* 0x00z818 */ 212 u64 ce_lsi_gb_cfg4; /* 0x00z818 */
213 uint64_t ce_lsi_gb_stat; /* 0x00z820 */ 213 u64 ce_lsi_gb_stat; /* 0x00z820 */
214 uint64_t ce_lsi_gb_int_stat; /* 0x00z828 */ 214 u64 ce_lsi_gb_int_stat; /* 0x00z828 */
215 uint64_t ce_lsi_gb_int_stat_test; /* 0x00z830 */ 215 u64 ce_lsi_gb_int_stat_test; /* 0x00z830 */
216 uint64_t ce_lsi_gb_int_mask; /* 0x00z838 */ 216 u64 ce_lsi_gb_int_mask; /* 0x00z838 */
217 uint64_t ce_lsi_gb_pwr_dn1; /* 0x00z840 */ 217 u64 ce_lsi_gb_pwr_dn1; /* 0x00z840 */
218 uint64_t ce_lsi_gb_pwr_dn2; /* 0x00z848 */ 218 u64 ce_lsi_gb_pwr_dn2; /* 0x00z848 */
219 uint64_t ce_pad_00z850[246]; /* 0x00z850 -- 0x00zFF8 */ 219 u64 ce_pad_00z850[246]; /* 0x00z850 -- 0x00zFF8 */
220 } ce_lsi[2]; 220 } ce_lsi[2];
221 221
222 uint64_t ce_pad_004000[10]; /* 0x004000 -- 0x004048 */ 222 u64 ce_pad_004000[10]; /* 0x004000 -- 0x004048 */
223 223
224 /* 224 /*
225 * CRM: Coretalk Receive Module Registers 225 * CRM: Coretalk Receive Module Registers
226 */ 226 */
227 uint64_t ce_crm_debug_mux; /* 0x004050 */ 227 u64 ce_crm_debug_mux; /* 0x004050 */
228 uint64_t ce_pad_004058; /* 0x004058 */ 228 u64 ce_pad_004058; /* 0x004058 */
229 uint64_t ce_crm_ssp_err_cmd_wrd; /* 0x004060 */ 229 u64 ce_crm_ssp_err_cmd_wrd; /* 0x004060 */
230 uint64_t ce_crm_ssp_err_addr; /* 0x004068 */ 230 u64 ce_crm_ssp_err_addr; /* 0x004068 */
231 uint64_t ce_crm_ssp_err_syn; /* 0x004070 */ 231 u64 ce_crm_ssp_err_syn; /* 0x004070 */
232 232
233 uint64_t ce_pad_004078[499]; /* 0x004078 -- 0x005008 */ 233 u64 ce_pad_004078[499]; /* 0x004078 -- 0x005008 */
234 234
235 /* 235 /*
236 * CXM: Coretalk Xmit Module Registers 236 * CXM: Coretalk Xmit Module Registers
237 */ 237 */
238 uint64_t ce_cxm_dyn_credit_status; /* 0x005010 */ 238 u64 ce_cxm_dyn_credit_status; /* 0x005010 */
239 uint64_t ce_cxm_last_credit_status; /* 0x005018 */ 239 u64 ce_cxm_last_credit_status; /* 0x005018 */
240 uint64_t ce_cxm_credit_limit; /* 0x005020 */ 240 u64 ce_cxm_credit_limit; /* 0x005020 */
241 uint64_t ce_cxm_force_credit; /* 0x005028 */ 241 u64 ce_cxm_force_credit; /* 0x005028 */
242 uint64_t ce_cxm_disable_bypass; /* 0x005030 */ 242 u64 ce_cxm_disable_bypass; /* 0x005030 */
243 uint64_t ce_pad_005038[3]; /* 0x005038 -- 0x005048 */ 243 u64 ce_pad_005038[3]; /* 0x005038 -- 0x005048 */
244 uint64_t ce_cxm_debug_mux; /* 0x005050 */ 244 u64 ce_cxm_debug_mux; /* 0x005050 */
245 245
246 uint64_t ce_pad_005058[501]; /* 0x005058 -- 0x005FF8 */ 246 u64 ce_pad_005058[501]; /* 0x005058 -- 0x005FF8 */
247 247
248 /* 248 /*
249 * DTL: Downstream Transaction Layer Regs (Link#1 and Link#2) 249 * DTL: Downstream Transaction Layer Regs (Link#1 and Link#2)
@@ -258,209 +258,209 @@ typedef volatile struct tioce {
258 #define ce_utl(link_num) ce_dtl_utl[link_num-1] 258 #define ce_utl(link_num) ce_dtl_utl[link_num-1]
259 struct ce_dtl_utl_reg { 259 struct ce_dtl_utl_reg {
260 /* DTL */ 260 /* DTL */
261 uint64_t ce_dtl_dtdr_credit_limit; /* 0x00y000 */ 261 u64 ce_dtl_dtdr_credit_limit; /* 0x00y000 */
262 uint64_t ce_dtl_dtdr_credit_force; /* 0x00y008 */ 262 u64 ce_dtl_dtdr_credit_force; /* 0x00y008 */
263 uint64_t ce_dtl_dyn_credit_status; /* 0x00y010 */ 263 u64 ce_dtl_dyn_credit_status; /* 0x00y010 */
264 uint64_t ce_dtl_dtl_last_credit_stat; /* 0x00y018 */ 264 u64 ce_dtl_dtl_last_credit_stat; /* 0x00y018 */
265 uint64_t ce_dtl_dtl_ctrl; /* 0x00y020 */ 265 u64 ce_dtl_dtl_ctrl; /* 0x00y020 */
266 uint64_t ce_pad_00y028[5]; /* 0x00y028 -- 0x00y048 */ 266 u64 ce_pad_00y028[5]; /* 0x00y028 -- 0x00y048 */
267 uint64_t ce_dtl_debug_sel; /* 0x00y050 */ 267 u64 ce_dtl_debug_sel; /* 0x00y050 */
268 uint64_t ce_pad_00y058[501]; /* 0x00y058 -- 0x00yFF8 */ 268 u64 ce_pad_00y058[501]; /* 0x00y058 -- 0x00yFF8 */
269 269
270 /* UTL */ 270 /* UTL */
271 uint64_t ce_utl_utl_ctrl; /* 0x00z000 */ 271 u64 ce_utl_utl_ctrl; /* 0x00z000 */
272 uint64_t ce_utl_debug_sel; /* 0x00z008 */ 272 u64 ce_utl_debug_sel; /* 0x00z008 */
273 uint64_t ce_pad_00z010[510]; /* 0x00z010 -- 0x00zFF8 */ 273 u64 ce_pad_00z010[510]; /* 0x00z010 -- 0x00zFF8 */
274 } ce_dtl_utl[2]; 274 } ce_dtl_utl[2];
275 275
276 uint64_t ce_pad_00A000[514]; /* 0x00A000 -- 0x00B008 */ 276 u64 ce_pad_00A000[514]; /* 0x00A000 -- 0x00B008 */
277 277
278 /* 278 /*
279 * URE: Upstream Request Engine 279 * URE: Upstream Request Engine
280 */ 280 */
281 uint64_t ce_ure_dyn_credit_status; /* 0x00B010 */ 281 u64 ce_ure_dyn_credit_status; /* 0x00B010 */
282 uint64_t ce_ure_last_credit_status; /* 0x00B018 */ 282 u64 ce_ure_last_credit_status; /* 0x00B018 */
283 uint64_t ce_ure_credit_limit; /* 0x00B020 */ 283 u64 ce_ure_credit_limit; /* 0x00B020 */
284 uint64_t ce_pad_00B028; /* 0x00B028 */ 284 u64 ce_pad_00B028; /* 0x00B028 */
285 uint64_t ce_ure_control; /* 0x00B030 */ 285 u64 ce_ure_control; /* 0x00B030 */
286 uint64_t ce_ure_status; /* 0x00B038 */ 286 u64 ce_ure_status; /* 0x00B038 */
287 uint64_t ce_pad_00B040[2]; /* 0x00B040 -- 0x00B048 */ 287 u64 ce_pad_00B040[2]; /* 0x00B040 -- 0x00B048 */
288 uint64_t ce_ure_debug_sel; /* 0x00B050 */ 288 u64 ce_ure_debug_sel; /* 0x00B050 */
289 uint64_t ce_ure_pcie_debug_sel; /* 0x00B058 */ 289 u64 ce_ure_pcie_debug_sel; /* 0x00B058 */
290 uint64_t ce_ure_ssp_err_cmd_wrd; /* 0x00B060 */ 290 u64 ce_ure_ssp_err_cmd_wrd; /* 0x00B060 */
291 uint64_t ce_ure_ssp_err_addr; /* 0x00B068 */ 291 u64 ce_ure_ssp_err_addr; /* 0x00B068 */
292 uint64_t ce_ure_page_map; /* 0x00B070 */ 292 u64 ce_ure_page_map; /* 0x00B070 */
293 uint64_t ce_ure_dir_map[TIOCE_NUM_PORTS]; /* 0x00B078 */ 293 u64 ce_ure_dir_map[TIOCE_NUM_PORTS]; /* 0x00B078 */
294 uint64_t ce_ure_pipe_sel1; /* 0x00B088 */ 294 u64 ce_ure_pipe_sel1; /* 0x00B088 */
295 uint64_t ce_ure_pipe_mask1; /* 0x00B090 */ 295 u64 ce_ure_pipe_mask1; /* 0x00B090 */
296 uint64_t ce_ure_pipe_sel2; /* 0x00B098 */ 296 u64 ce_ure_pipe_sel2; /* 0x00B098 */
297 uint64_t ce_ure_pipe_mask2; /* 0x00B0A0 */ 297 u64 ce_ure_pipe_mask2; /* 0x00B0A0 */
298 uint64_t ce_ure_pcie1_credits_sent; /* 0x00B0A8 */ 298 u64 ce_ure_pcie1_credits_sent; /* 0x00B0A8 */
299 uint64_t ce_ure_pcie1_credits_used; /* 0x00B0B0 */ 299 u64 ce_ure_pcie1_credits_used; /* 0x00B0B0 */
300 uint64_t ce_ure_pcie1_credit_limit; /* 0x00B0B8 */ 300 u64 ce_ure_pcie1_credit_limit; /* 0x00B0B8 */
301 uint64_t ce_ure_pcie2_credits_sent; /* 0x00B0C0 */ 301 u64 ce_ure_pcie2_credits_sent; /* 0x00B0C0 */
302 uint64_t ce_ure_pcie2_credits_used; /* 0x00B0C8 */ 302 u64 ce_ure_pcie2_credits_used; /* 0x00B0C8 */
303 uint64_t ce_ure_pcie2_credit_limit; /* 0x00B0D0 */ 303 u64 ce_ure_pcie2_credit_limit; /* 0x00B0D0 */
304 uint64_t ce_ure_pcie_force_credit; /* 0x00B0D8 */ 304 u64 ce_ure_pcie_force_credit; /* 0x00B0D8 */
305 uint64_t ce_ure_rd_tnum_val; /* 0x00B0E0 */ 305 u64 ce_ure_rd_tnum_val; /* 0x00B0E0 */
306 uint64_t ce_ure_rd_tnum_rsp_rcvd; /* 0x00B0E8 */ 306 u64 ce_ure_rd_tnum_rsp_rcvd; /* 0x00B0E8 */
307 uint64_t ce_ure_rd_tnum_esent_timer; /* 0x00B0F0 */ 307 u64 ce_ure_rd_tnum_esent_timer; /* 0x00B0F0 */
308 uint64_t ce_ure_rd_tnum_error; /* 0x00B0F8 */ 308 u64 ce_ure_rd_tnum_error; /* 0x00B0F8 */
309 uint64_t ce_ure_rd_tnum_first_cl; /* 0x00B100 */ 309 u64 ce_ure_rd_tnum_first_cl; /* 0x00B100 */
310 uint64_t ce_ure_rd_tnum_link_buf; /* 0x00B108 */ 310 u64 ce_ure_rd_tnum_link_buf; /* 0x00B108 */
311 uint64_t ce_ure_wr_tnum_val; /* 0x00B110 */ 311 u64 ce_ure_wr_tnum_val; /* 0x00B110 */
312 uint64_t ce_ure_sram_err_addr0; /* 0x00B118 */ 312 u64 ce_ure_sram_err_addr0; /* 0x00B118 */
313 uint64_t ce_ure_sram_err_addr1; /* 0x00B120 */ 313 u64 ce_ure_sram_err_addr1; /* 0x00B120 */
314 uint64_t ce_ure_sram_err_addr2; /* 0x00B128 */ 314 u64 ce_ure_sram_err_addr2; /* 0x00B128 */
315 uint64_t ce_ure_sram_rd_addr0; /* 0x00B130 */ 315 u64 ce_ure_sram_rd_addr0; /* 0x00B130 */
316 uint64_t ce_ure_sram_rd_addr1; /* 0x00B138 */ 316 u64 ce_ure_sram_rd_addr1; /* 0x00B138 */
317 uint64_t ce_ure_sram_rd_addr2; /* 0x00B140 */ 317 u64 ce_ure_sram_rd_addr2; /* 0x00B140 */
318 uint64_t ce_ure_sram_wr_addr0; /* 0x00B148 */ 318 u64 ce_ure_sram_wr_addr0; /* 0x00B148 */
319 uint64_t ce_ure_sram_wr_addr1; /* 0x00B150 */ 319 u64 ce_ure_sram_wr_addr1; /* 0x00B150 */
320 uint64_t ce_ure_sram_wr_addr2; /* 0x00B158 */ 320 u64 ce_ure_sram_wr_addr2; /* 0x00B158 */
321 uint64_t ce_ure_buf_flush10; /* 0x00B160 */ 321 u64 ce_ure_buf_flush10; /* 0x00B160 */
322 uint64_t ce_ure_buf_flush11; /* 0x00B168 */ 322 u64 ce_ure_buf_flush11; /* 0x00B168 */
323 uint64_t ce_ure_buf_flush12; /* 0x00B170 */ 323 u64 ce_ure_buf_flush12; /* 0x00B170 */
324 uint64_t ce_ure_buf_flush13; /* 0x00B178 */ 324 u64 ce_ure_buf_flush13; /* 0x00B178 */
325 uint64_t ce_ure_buf_flush20; /* 0x00B180 */ 325 u64 ce_ure_buf_flush20; /* 0x00B180 */
326 uint64_t ce_ure_buf_flush21; /* 0x00B188 */ 326 u64 ce_ure_buf_flush21; /* 0x00B188 */
327 uint64_t ce_ure_buf_flush22; /* 0x00B190 */ 327 u64 ce_ure_buf_flush22; /* 0x00B190 */
328 uint64_t ce_ure_buf_flush23; /* 0x00B198 */ 328 u64 ce_ure_buf_flush23; /* 0x00B198 */
329 uint64_t ce_ure_pcie_control1; /* 0x00B1A0 */ 329 u64 ce_ure_pcie_control1; /* 0x00B1A0 */
330 uint64_t ce_ure_pcie_control2; /* 0x00B1A8 */ 330 u64 ce_ure_pcie_control2; /* 0x00B1A8 */
331 331
332 uint64_t ce_pad_00B1B0[458]; /* 0x00B1B0 -- 0x00BFF8 */ 332 u64 ce_pad_00B1B0[458]; /* 0x00B1B0 -- 0x00BFF8 */
333 333
334 /* Upstream Data Buffer, Port1 */ 334 /* Upstream Data Buffer, Port1 */
335 struct ce_ure_maint_ups_dat1_data { 335 struct ce_ure_maint_ups_dat1_data {
336 uint64_t data63_0[512]; /* 0x00C000 -- 0x00CFF8 */ 336 u64 data63_0[512]; /* 0x00C000 -- 0x00CFF8 */
337 uint64_t data127_64[512]; /* 0x00D000 -- 0x00DFF8 */ 337 u64 data127_64[512]; /* 0x00D000 -- 0x00DFF8 */
338 uint64_t parity[512]; /* 0x00E000 -- 0x00EFF8 */ 338 u64 parity[512]; /* 0x00E000 -- 0x00EFF8 */
339 } ce_ure_maint_ups_dat1; 339 } ce_ure_maint_ups_dat1;
340 340
341 /* Upstream Header Buffer, Port1 */ 341 /* Upstream Header Buffer, Port1 */
342 struct ce_ure_maint_ups_hdr1_data { 342 struct ce_ure_maint_ups_hdr1_data {
343 uint64_t data63_0[512]; /* 0x00F000 -- 0x00FFF8 */ 343 u64 data63_0[512]; /* 0x00F000 -- 0x00FFF8 */
344 uint64_t data127_64[512]; /* 0x010000 -- 0x010FF8 */ 344 u64 data127_64[512]; /* 0x010000 -- 0x010FF8 */
345 uint64_t parity[512]; /* 0x011000 -- 0x011FF8 */ 345 u64 parity[512]; /* 0x011000 -- 0x011FF8 */
346 } ce_ure_maint_ups_hdr1; 346 } ce_ure_maint_ups_hdr1;
347 347
348 /* Upstream Data Buffer, Port2 */ 348 /* Upstream Data Buffer, Port2 */
349 struct ce_ure_maint_ups_dat2_data { 349 struct ce_ure_maint_ups_dat2_data {
350 uint64_t data63_0[512]; /* 0x012000 -- 0x012FF8 */ 350 u64 data63_0[512]; /* 0x012000 -- 0x012FF8 */
351 uint64_t data127_64[512]; /* 0x013000 -- 0x013FF8 */ 351 u64 data127_64[512]; /* 0x013000 -- 0x013FF8 */
352 uint64_t parity[512]; /* 0x014000 -- 0x014FF8 */ 352 u64 parity[512]; /* 0x014000 -- 0x014FF8 */
353 } ce_ure_maint_ups_dat2; 353 } ce_ure_maint_ups_dat2;
354 354
355 /* Upstream Header Buffer, Port2 */ 355 /* Upstream Header Buffer, Port2 */
356 struct ce_ure_maint_ups_hdr2_data { 356 struct ce_ure_maint_ups_hdr2_data {
357 uint64_t data63_0[512]; /* 0x015000 -- 0x015FF8 */ 357 u64 data63_0[512]; /* 0x015000 -- 0x015FF8 */
358 uint64_t data127_64[512]; /* 0x016000 -- 0x016FF8 */ 358 u64 data127_64[512]; /* 0x016000 -- 0x016FF8 */
359 uint64_t parity[512]; /* 0x017000 -- 0x017FF8 */ 359 u64 parity[512]; /* 0x017000 -- 0x017FF8 */
360 } ce_ure_maint_ups_hdr2; 360 } ce_ure_maint_ups_hdr2;
361 361
362 /* Downstream Data Buffer */ 362 /* Downstream Data Buffer */
363 struct ce_ure_maint_dns_dat_data { 363 struct ce_ure_maint_dns_dat_data {
364 uint64_t data63_0[512]; /* 0x018000 -- 0x018FF8 */ 364 u64 data63_0[512]; /* 0x018000 -- 0x018FF8 */
365 uint64_t data127_64[512]; /* 0x019000 -- 0x019FF8 */ 365 u64 data127_64[512]; /* 0x019000 -- 0x019FF8 */
366 uint64_t parity[512]; /* 0x01A000 -- 0x01AFF8 */ 366 u64 parity[512]; /* 0x01A000 -- 0x01AFF8 */
367 } ce_ure_maint_dns_dat; 367 } ce_ure_maint_dns_dat;
368 368
369 /* Downstream Header Buffer */ 369 /* Downstream Header Buffer */
370 struct ce_ure_maint_dns_hdr_data { 370 struct ce_ure_maint_dns_hdr_data {
371 uint64_t data31_0[64]; /* 0x01B000 -- 0x01B1F8 */ 371 u64 data31_0[64]; /* 0x01B000 -- 0x01B1F8 */
372 uint64_t data95_32[64]; /* 0x01B200 -- 0x01B3F8 */ 372 u64 data95_32[64]; /* 0x01B200 -- 0x01B3F8 */
373 uint64_t parity[64]; /* 0x01B400 -- 0x01B5F8 */ 373 u64 parity[64]; /* 0x01B400 -- 0x01B5F8 */
374 } ce_ure_maint_dns_hdr; 374 } ce_ure_maint_dns_hdr;
375 375
376 /* RCI Buffer Data */ 376 /* RCI Buffer Data */
377 struct ce_ure_maint_rci_data { 377 struct ce_ure_maint_rci_data {
378 uint64_t data41_0[64]; /* 0x01B600 -- 0x01B7F8 */ 378 u64 data41_0[64]; /* 0x01B600 -- 0x01B7F8 */
379 uint64_t data69_42[64]; /* 0x01B800 -- 0x01B9F8 */ 379 u64 data69_42[64]; /* 0x01B800 -- 0x01B9F8 */
380 } ce_ure_maint_rci; 380 } ce_ure_maint_rci;
381 381
382 /* Response Queue */ 382 /* Response Queue */
383 uint64_t ce_ure_maint_rspq[64]; /* 0x01BA00 -- 0x01BBF8 */ 383 u64 ce_ure_maint_rspq[64]; /* 0x01BA00 -- 0x01BBF8 */
384 384
385 uint64_t ce_pad_01C000[4224]; /* 0x01BC00 -- 0x023FF8 */ 385 u64 ce_pad_01C000[4224]; /* 0x01BC00 -- 0x023FF8 */
386 386
387 /* Admin Build-a-Packet Buffer */ 387 /* Admin Build-a-Packet Buffer */
388 struct ce_adm_maint_bap_buf_data { 388 struct ce_adm_maint_bap_buf_data {
389 uint64_t data63_0[258]; /* 0x024000 -- 0x024808 */ 389 u64 data63_0[258]; /* 0x024000 -- 0x024808 */
390 uint64_t data127_64[258]; /* 0x024810 -- 0x025018 */ 390 u64 data127_64[258]; /* 0x024810 -- 0x025018 */
391 uint64_t parity[258]; /* 0x025020 -- 0x025828 */ 391 u64 parity[258]; /* 0x025020 -- 0x025828 */
392 } ce_adm_maint_bap_buf; 392 } ce_adm_maint_bap_buf;
393 393
394 uint64_t ce_pad_025830[5370]; /* 0x025830 -- 0x02FFF8 */ 394 u64 ce_pad_025830[5370]; /* 0x025830 -- 0x02FFF8 */
395 395
396 /* URE: 40bit PMU ATE Buffer */ /* 0x030000 -- 0x037FF8 */ 396 /* URE: 40bit PMU ATE Buffer */ /* 0x030000 -- 0x037FF8 */
397 uint64_t ce_ure_ate40[TIOCE_NUM_M40_ATES]; 397 u64 ce_ure_ate40[TIOCE_NUM_M40_ATES];
398 398
399 /* URE: 32/40bit PMU ATE Buffer */ /* 0x038000 -- 0x03BFF8 */ 399 /* URE: 32/40bit PMU ATE Buffer */ /* 0x038000 -- 0x03BFF8 */
400 uint64_t ce_ure_ate3240[TIOCE_NUM_M3240_ATES]; 400 u64 ce_ure_ate3240[TIOCE_NUM_M3240_ATES];
401 401
402 uint64_t ce_pad_03C000[2050]; /* 0x03C000 -- 0x040008 */ 402 u64 ce_pad_03C000[2050]; /* 0x03C000 -- 0x040008 */
403 403
404 /* 404 /*
405 * DRE: Down Stream Request Engine 405 * DRE: Down Stream Request Engine
406 */ 406 */
407 uint64_t ce_dre_dyn_credit_status1; /* 0x040010 */ 407 u64 ce_dre_dyn_credit_status1; /* 0x040010 */
408 uint64_t ce_dre_dyn_credit_status2; /* 0x040018 */ 408 u64 ce_dre_dyn_credit_status2; /* 0x040018 */
409 uint64_t ce_dre_last_credit_status1; /* 0x040020 */ 409 u64 ce_dre_last_credit_status1; /* 0x040020 */
410 uint64_t ce_dre_last_credit_status2; /* 0x040028 */ 410 u64 ce_dre_last_credit_status2; /* 0x040028 */
411 uint64_t ce_dre_credit_limit1; /* 0x040030 */ 411 u64 ce_dre_credit_limit1; /* 0x040030 */
412 uint64_t ce_dre_credit_limit2; /* 0x040038 */ 412 u64 ce_dre_credit_limit2; /* 0x040038 */
413 uint64_t ce_dre_force_credit1; /* 0x040040 */ 413 u64 ce_dre_force_credit1; /* 0x040040 */
414 uint64_t ce_dre_force_credit2; /* 0x040048 */ 414 u64 ce_dre_force_credit2; /* 0x040048 */
415 uint64_t ce_dre_debug_mux1; /* 0x040050 */ 415 u64 ce_dre_debug_mux1; /* 0x040050 */
416 uint64_t ce_dre_debug_mux2; /* 0x040058 */ 416 u64 ce_dre_debug_mux2; /* 0x040058 */
417 uint64_t ce_dre_ssp_err_cmd_wrd; /* 0x040060 */ 417 u64 ce_dre_ssp_err_cmd_wrd; /* 0x040060 */
418 uint64_t ce_dre_ssp_err_addr; /* 0x040068 */ 418 u64 ce_dre_ssp_err_addr; /* 0x040068 */
419 uint64_t ce_dre_comp_err_cmd_wrd; /* 0x040070 */ 419 u64 ce_dre_comp_err_cmd_wrd; /* 0x040070 */
420 uint64_t ce_dre_comp_err_addr; /* 0x040078 */ 420 u64 ce_dre_comp_err_addr; /* 0x040078 */
421 uint64_t ce_dre_req_status; /* 0x040080 */ 421 u64 ce_dre_req_status; /* 0x040080 */
422 uint64_t ce_dre_config1; /* 0x040088 */ 422 u64 ce_dre_config1; /* 0x040088 */
423 uint64_t ce_dre_config2; /* 0x040090 */ 423 u64 ce_dre_config2; /* 0x040090 */
424 uint64_t ce_dre_config_req_status; /* 0x040098 */ 424 u64 ce_dre_config_req_status; /* 0x040098 */
425 uint64_t ce_pad_0400A0[12]; /* 0x0400A0 -- 0x0400F8 */ 425 u64 ce_pad_0400A0[12]; /* 0x0400A0 -- 0x0400F8 */
426 uint64_t ce_dre_dyn_fifo; /* 0x040100 */ 426 u64 ce_dre_dyn_fifo; /* 0x040100 */
427 uint64_t ce_pad_040108[3]; /* 0x040108 -- 0x040118 */ 427 u64 ce_pad_040108[3]; /* 0x040108 -- 0x040118 */
428 uint64_t ce_dre_last_fifo; /* 0x040120 */ 428 u64 ce_dre_last_fifo; /* 0x040120 */
429 429
430 uint64_t ce_pad_040128[27]; /* 0x040128 -- 0x0401F8 */ 430 u64 ce_pad_040128[27]; /* 0x040128 -- 0x0401F8 */
431 431
432 /* DRE Downstream Head Queue */ 432 /* DRE Downstream Head Queue */
433 struct ce_dre_maint_ds_head_queue { 433 struct ce_dre_maint_ds_head_queue {
434 uint64_t data63_0[32]; /* 0x040200 -- 0x0402F8 */ 434 u64 data63_0[32]; /* 0x040200 -- 0x0402F8 */
435 uint64_t data127_64[32]; /* 0x040300 -- 0x0403F8 */ 435 u64 data127_64[32]; /* 0x040300 -- 0x0403F8 */
436 uint64_t parity[32]; /* 0x040400 -- 0x0404F8 */ 436 u64 parity[32]; /* 0x040400 -- 0x0404F8 */
437 } ce_dre_maint_ds_head_q; 437 } ce_dre_maint_ds_head_q;
438 438
439 uint64_t ce_pad_040500[352]; /* 0x040500 -- 0x040FF8 */ 439 u64 ce_pad_040500[352]; /* 0x040500 -- 0x040FF8 */
440 440
441 /* DRE Downstream Data Queue */ 441 /* DRE Downstream Data Queue */
442 struct ce_dre_maint_ds_data_queue { 442 struct ce_dre_maint_ds_data_queue {
443 uint64_t data63_0[256]; /* 0x041000 -- 0x0417F8 */ 443 u64 data63_0[256]; /* 0x041000 -- 0x0417F8 */
444 uint64_t ce_pad_041800[256]; /* 0x041800 -- 0x041FF8 */ 444 u64 ce_pad_041800[256]; /* 0x041800 -- 0x041FF8 */
445 uint64_t data127_64[256]; /* 0x042000 -- 0x0427F8 */ 445 u64 data127_64[256]; /* 0x042000 -- 0x0427F8 */
446 uint64_t ce_pad_042800[256]; /* 0x042800 -- 0x042FF8 */ 446 u64 ce_pad_042800[256]; /* 0x042800 -- 0x042FF8 */
447 uint64_t parity[256]; /* 0x043000 -- 0x0437F8 */ 447 u64 parity[256]; /* 0x043000 -- 0x0437F8 */
448 uint64_t ce_pad_043800[256]; /* 0x043800 -- 0x043FF8 */ 448 u64 ce_pad_043800[256]; /* 0x043800 -- 0x043FF8 */
449 } ce_dre_maint_ds_data_q; 449 } ce_dre_maint_ds_data_q;
450 450
451 /* DRE URE Upstream Response Queue */ 451 /* DRE URE Upstream Response Queue */
452 struct ce_dre_maint_ure_us_rsp_queue { 452 struct ce_dre_maint_ure_us_rsp_queue {
453 uint64_t data63_0[8]; /* 0x044000 -- 0x044038 */ 453 u64 data63_0[8]; /* 0x044000 -- 0x044038 */
454 uint64_t ce_pad_044040[24]; /* 0x044040 -- 0x0440F8 */ 454 u64 ce_pad_044040[24]; /* 0x044040 -- 0x0440F8 */
455 uint64_t data127_64[8]; /* 0x044100 -- 0x044138 */ 455 u64 data127_64[8]; /* 0x044100 -- 0x044138 */
456 uint64_t ce_pad_044140[24]; /* 0x044140 -- 0x0441F8 */ 456 u64 ce_pad_044140[24]; /* 0x044140 -- 0x0441F8 */
457 uint64_t parity[8]; /* 0x044200 -- 0x044238 */ 457 u64 parity[8]; /* 0x044200 -- 0x044238 */
458 uint64_t ce_pad_044240[24]; /* 0x044240 -- 0x0442F8 */ 458 u64 ce_pad_044240[24]; /* 0x044240 -- 0x0442F8 */
459 } ce_dre_maint_ure_us_rsp_q; 459 } ce_dre_maint_ure_us_rsp_q;
460 460
461 uint64_t ce_dre_maint_us_wrt_rsp[32];/* 0x044300 -- 0x0443F8 */ 461 u64 ce_dre_maint_us_wrt_rsp[32];/* 0x044300 -- 0x0443F8 */
462 462
463 uint64_t ce_end_of_struct; /* 0x044400 */ 463 u64 ce_end_of_struct; /* 0x044400 */
464} tioce_t; 464} tioce_t;
465 465
466 466
@@ -625,11 +625,11 @@ typedef volatile struct tioce {
625#define CE_URE_BUS_MASK (0xFFULL << BUS_SRC_ID_SHFT) 625#define CE_URE_BUS_MASK (0xFFULL << BUS_SRC_ID_SHFT)
626#define CE_URE_DEV_MASK (0x1FULL << DEV_SRC_ID_SHFT) 626#define CE_URE_DEV_MASK (0x1FULL << DEV_SRC_ID_SHFT)
627#define CE_URE_FNC_MASK (0x07ULL << FNC_SRC_ID_SHFT) 627#define CE_URE_FNC_MASK (0x07ULL << FNC_SRC_ID_SHFT)
628#define CE_URE_PIPE_BUS(b) (((uint64_t)(b) << BUS_SRC_ID_SHFT) & \ 628#define CE_URE_PIPE_BUS(b) (((u64)(b) << BUS_SRC_ID_SHFT) & \
629 CE_URE_BUS_MASK) 629 CE_URE_BUS_MASK)
630#define CE_URE_PIPE_DEV(d) (((uint64_t)(d) << DEV_SRC_ID_SHFT) & \ 630#define CE_URE_PIPE_DEV(d) (((u64)(d) << DEV_SRC_ID_SHFT) & \
631 CE_URE_DEV_MASK) 631 CE_URE_DEV_MASK)
632#define CE_URE_PIPE_FNC(f) (((uint64_t)(f) << FNC_SRC_ID_SHFT) & \ 632#define CE_URE_PIPE_FNC(f) (((u64)(f) << FNC_SRC_ID_SHFT) & \
633 CE_URE_FNC_MASK) 633 CE_URE_FNC_MASK)
634 634
635#define CE_URE_SEL1_SHFT 0 635#define CE_URE_SEL1_SHFT 0
@@ -660,9 +660,9 @@ typedef volatile struct tioce {
660#define CE_URE_PN1_MASK (0xFFULL << CE_URE_PN1_SHFT) 660#define CE_URE_PN1_MASK (0xFFULL << CE_URE_PN1_SHFT)
661#define CE_URE_PN2_SHFT 24 661#define CE_URE_PN2_SHFT 24
662#define CE_URE_PN2_MASK (0xFFULL << CE_URE_PN2_SHFT) 662#define CE_URE_PN2_MASK (0xFFULL << CE_URE_PN2_SHFT)
663#define CE_URE_PN1_SET(n) (((uint64_t)(n) << CE_URE_PN1_SHFT) & \ 663#define CE_URE_PN1_SET(n) (((u64)(n) << CE_URE_PN1_SHFT) & \
664 CE_URE_PN1_MASK) 664 CE_URE_PN1_MASK)
665#define CE_URE_PN2_SET(n) (((uint64_t)(n) << CE_URE_PN2_SHFT) & \ 665#define CE_URE_PN2_SET(n) (((u64)(n) << CE_URE_PN2_SHFT) & \
666 CE_URE_PN2_MASK) 666 CE_URE_PN2_MASK)
667 667
668/* ce_ure_pcie_control2 register bit masks & shifts */ 668/* ce_ure_pcie_control2 register bit masks & shifts */
@@ -681,9 +681,9 @@ typedef volatile struct tioce {
681#define CE_URE_PSN1_MASK (0x1FFFULL << CE_URE_PSN1_SHFT) 681#define CE_URE_PSN1_MASK (0x1FFFULL << CE_URE_PSN1_SHFT)
682#define CE_URE_PSN2_SHFT 32 682#define CE_URE_PSN2_SHFT 32
683#define CE_URE_PSN2_MASK (0x1FFFULL << CE_URE_PSN2_SHFT) 683#define CE_URE_PSN2_MASK (0x1FFFULL << CE_URE_PSN2_SHFT)
684#define CE_URE_PSN1_SET(n) (((uint64_t)(n) << CE_URE_PSN1_SHFT) & \ 684#define CE_URE_PSN1_SET(n) (((u64)(n) << CE_URE_PSN1_SHFT) & \
685 CE_URE_PSN1_MASK) 685 CE_URE_PSN1_MASK)
686#define CE_URE_PSN2_SET(n) (((uint64_t)(n) << CE_URE_PSN2_SHFT) & \ 686#define CE_URE_PSN2_SET(n) (((u64)(n) << CE_URE_PSN2_SHFT) & \
687 CE_URE_PSN2_MASK) 687 CE_URE_PSN2_MASK)
688 688
689/* 689/*
diff --git a/include/asm-ia64/sn/tioce_provider.h b/include/asm-ia64/sn/tioce_provider.h
index cb414908671d..6d62b13f7ae7 100644
--- a/include/asm-ia64/sn/tioce_provider.h
+++ b/include/asm-ia64/sn/tioce_provider.h
@@ -21,9 +21,9 @@
21struct tioce_common { 21struct tioce_common {
22 struct pcibus_bussoft ce_pcibus; /* common pciio header */ 22 struct pcibus_bussoft ce_pcibus; /* common pciio header */
23 23
24 uint32_t ce_rev; 24 u32 ce_rev;
25 uint64_t ce_kernel_private; 25 u64 ce_kernel_private;
26 uint64_t ce_prom_private; 26 u64 ce_prom_private;
27}; 27};
28 28
29struct tioce_kernel { 29struct tioce_kernel {
@@ -31,31 +31,31 @@ struct tioce_kernel {
31 spinlock_t ce_lock; 31 spinlock_t ce_lock;
32 struct list_head ce_dmamap_list; 32 struct list_head ce_dmamap_list;
33 33
34 uint64_t ce_ate40_shadow[TIOCE_NUM_M40_ATES]; 34 u64 ce_ate40_shadow[TIOCE_NUM_M40_ATES];
35 uint64_t ce_ate3240_shadow[TIOCE_NUM_M3240_ATES]; 35 u64 ce_ate3240_shadow[TIOCE_NUM_M3240_ATES];
36 uint32_t ce_ate3240_pagesize; 36 u32 ce_ate3240_pagesize;
37 37
38 uint8_t ce_port1_secondary; 38 u8 ce_port1_secondary;
39 39
40 /* per-port resources */ 40 /* per-port resources */
41 struct { 41 struct {
42 int dirmap_refcnt; 42 int dirmap_refcnt;
43 uint64_t dirmap_shadow; 43 u64 dirmap_shadow;
44 } ce_port[TIOCE_NUM_PORTS]; 44 } ce_port[TIOCE_NUM_PORTS];
45}; 45};
46 46
47struct tioce_dmamap { 47struct tioce_dmamap {
48 struct list_head ce_dmamap_list; /* headed by tioce_kernel */ 48 struct list_head ce_dmamap_list; /* headed by tioce_kernel */
49 uint32_t refcnt; 49 u32 refcnt;
50 50
51 uint64_t nbytes; /* # bytes mapped */ 51 u64 nbytes; /* # bytes mapped */
52 52
53 uint64_t ct_start; /* coretalk start address */ 53 u64 ct_start; /* coretalk start address */
54 uint64_t pci_start; /* bus start address */ 54 u64 pci_start; /* bus start address */
55 55
56 uint64_t *ate_hw; /* hw ptr of first ate in map */ 56 u64 *ate_hw; /* hw ptr of first ate in map */
57 uint64_t *ate_shadow; /* shadow ptr of firat ate */ 57 u64 *ate_shadow; /* shadow ptr of firat ate */
58 uint16_t ate_count; /* # ate's in the map */ 58 u16 ate_count; /* # ate's in the map */
59}; 59};
60 60
61extern int tioce_init_provider(void); 61extern int tioce_init_provider(void);
diff --git a/include/asm-ia64/sn/tiocp.h b/include/asm-ia64/sn/tiocp.h
index 5f2489c9d2dd..f47c08ab483c 100644
--- a/include/asm-ia64/sn/tiocp.h
+++ b/include/asm-ia64/sn/tiocp.h
@@ -21,189 +21,189 @@ struct tiocp{
21 /* 0x000000-0x00FFFF -- Local Registers */ 21 /* 0x000000-0x00FFFF -- Local Registers */
22 22
23 /* 0x000000-0x000057 -- (Legacy Widget Space) Configuration */ 23 /* 0x000000-0x000057 -- (Legacy Widget Space) Configuration */
24 uint64_t cp_id; /* 0x000000 */ 24 u64 cp_id; /* 0x000000 */
25 uint64_t cp_stat; /* 0x000008 */ 25 u64 cp_stat; /* 0x000008 */
26 uint64_t cp_err_upper; /* 0x000010 */ 26 u64 cp_err_upper; /* 0x000010 */
27 uint64_t cp_err_lower; /* 0x000018 */ 27 u64 cp_err_lower; /* 0x000018 */
28 #define cp_err cp_err_lower 28 #define cp_err cp_err_lower
29 uint64_t cp_control; /* 0x000020 */ 29 u64 cp_control; /* 0x000020 */
30 uint64_t cp_req_timeout; /* 0x000028 */ 30 u64 cp_req_timeout; /* 0x000028 */
31 uint64_t cp_intr_upper; /* 0x000030 */ 31 u64 cp_intr_upper; /* 0x000030 */
32 uint64_t cp_intr_lower; /* 0x000038 */ 32 u64 cp_intr_lower; /* 0x000038 */
33 #define cp_intr cp_intr_lower 33 #define cp_intr cp_intr_lower
34 uint64_t cp_err_cmdword; /* 0x000040 */ 34 u64 cp_err_cmdword; /* 0x000040 */
35 uint64_t _pad_000048; /* 0x000048 */ 35 u64 _pad_000048; /* 0x000048 */
36 uint64_t cp_tflush; /* 0x000050 */ 36 u64 cp_tflush; /* 0x000050 */
37 37
38 /* 0x000058-0x00007F -- Bridge-specific Configuration */ 38 /* 0x000058-0x00007F -- Bridge-specific Configuration */
39 uint64_t cp_aux_err; /* 0x000058 */ 39 u64 cp_aux_err; /* 0x000058 */
40 uint64_t cp_resp_upper; /* 0x000060 */ 40 u64 cp_resp_upper; /* 0x000060 */
41 uint64_t cp_resp_lower; /* 0x000068 */ 41 u64 cp_resp_lower; /* 0x000068 */
42 #define cp_resp cp_resp_lower 42 #define cp_resp cp_resp_lower
43 uint64_t cp_tst_pin_ctrl; /* 0x000070 */ 43 u64 cp_tst_pin_ctrl; /* 0x000070 */
44 uint64_t cp_addr_lkerr; /* 0x000078 */ 44 u64 cp_addr_lkerr; /* 0x000078 */
45 45
46 /* 0x000080-0x00008F -- PMU & MAP */ 46 /* 0x000080-0x00008F -- PMU & MAP */
47 uint64_t cp_dir_map; /* 0x000080 */ 47 u64 cp_dir_map; /* 0x000080 */
48 uint64_t _pad_000088; /* 0x000088 */ 48 u64 _pad_000088; /* 0x000088 */
49 49
50 /* 0x000090-0x00009F -- SSRAM */ 50 /* 0x000090-0x00009F -- SSRAM */
51 uint64_t cp_map_fault; /* 0x000090 */ 51 u64 cp_map_fault; /* 0x000090 */
52 uint64_t _pad_000098; /* 0x000098 */ 52 u64 _pad_000098; /* 0x000098 */
53 53
54 /* 0x0000A0-0x0000AF -- Arbitration */ 54 /* 0x0000A0-0x0000AF -- Arbitration */
55 uint64_t cp_arb; /* 0x0000A0 */ 55 u64 cp_arb; /* 0x0000A0 */
56 uint64_t _pad_0000A8; /* 0x0000A8 */ 56 u64 _pad_0000A8; /* 0x0000A8 */
57 57
58 /* 0x0000B0-0x0000BF -- Number In A Can or ATE Parity Error */ 58 /* 0x0000B0-0x0000BF -- Number In A Can or ATE Parity Error */
59 uint64_t cp_ate_parity_err; /* 0x0000B0 */ 59 u64 cp_ate_parity_err; /* 0x0000B0 */
60 uint64_t _pad_0000B8; /* 0x0000B8 */ 60 u64 _pad_0000B8; /* 0x0000B8 */
61 61
62 /* 0x0000C0-0x0000FF -- PCI/GIO */ 62 /* 0x0000C0-0x0000FF -- PCI/GIO */
63 uint64_t cp_bus_timeout; /* 0x0000C0 */ 63 u64 cp_bus_timeout; /* 0x0000C0 */
64 uint64_t cp_pci_cfg; /* 0x0000C8 */ 64 u64 cp_pci_cfg; /* 0x0000C8 */
65 uint64_t cp_pci_err_upper; /* 0x0000D0 */ 65 u64 cp_pci_err_upper; /* 0x0000D0 */
66 uint64_t cp_pci_err_lower; /* 0x0000D8 */ 66 u64 cp_pci_err_lower; /* 0x0000D8 */
67 #define cp_pci_err cp_pci_err_lower 67 #define cp_pci_err cp_pci_err_lower
68 uint64_t _pad_0000E0[4]; /* 0x0000{E0..F8} */ 68 u64 _pad_0000E0[4]; /* 0x0000{E0..F8} */
69 69
70 /* 0x000100-0x0001FF -- Interrupt */ 70 /* 0x000100-0x0001FF -- Interrupt */
71 uint64_t cp_int_status; /* 0x000100 */ 71 u64 cp_int_status; /* 0x000100 */
72 uint64_t cp_int_enable; /* 0x000108 */ 72 u64 cp_int_enable; /* 0x000108 */
73 uint64_t cp_int_rst_stat; /* 0x000110 */ 73 u64 cp_int_rst_stat; /* 0x000110 */
74 uint64_t cp_int_mode; /* 0x000118 */ 74 u64 cp_int_mode; /* 0x000118 */
75 uint64_t cp_int_device; /* 0x000120 */ 75 u64 cp_int_device; /* 0x000120 */
76 uint64_t cp_int_host_err; /* 0x000128 */ 76 u64 cp_int_host_err; /* 0x000128 */
77 uint64_t cp_int_addr[8]; /* 0x0001{30,,,68} */ 77 u64 cp_int_addr[8]; /* 0x0001{30,,,68} */
78 uint64_t cp_err_int_view; /* 0x000170 */ 78 u64 cp_err_int_view; /* 0x000170 */
79 uint64_t cp_mult_int; /* 0x000178 */ 79 u64 cp_mult_int; /* 0x000178 */
80 uint64_t cp_force_always[8]; /* 0x0001{80,,,B8} */ 80 u64 cp_force_always[8]; /* 0x0001{80,,,B8} */
81 uint64_t cp_force_pin[8]; /* 0x0001{C0,,,F8} */ 81 u64 cp_force_pin[8]; /* 0x0001{C0,,,F8} */
82 82
83 /* 0x000200-0x000298 -- Device */ 83 /* 0x000200-0x000298 -- Device */
84 uint64_t cp_device[4]; /* 0x0002{00,,,18} */ 84 u64 cp_device[4]; /* 0x0002{00,,,18} */
85 uint64_t _pad_000220[4]; /* 0x0002{20,,,38} */ 85 u64 _pad_000220[4]; /* 0x0002{20,,,38} */
86 uint64_t cp_wr_req_buf[4]; /* 0x0002{40,,,58} */ 86 u64 cp_wr_req_buf[4]; /* 0x0002{40,,,58} */
87 uint64_t _pad_000260[4]; /* 0x0002{60,,,78} */ 87 u64 _pad_000260[4]; /* 0x0002{60,,,78} */
88 uint64_t cp_rrb_map[2]; /* 0x0002{80,,,88} */ 88 u64 cp_rrb_map[2]; /* 0x0002{80,,,88} */
89 #define cp_even_resp cp_rrb_map[0] /* 0x000280 */ 89 #define cp_even_resp cp_rrb_map[0] /* 0x000280 */
90 #define cp_odd_resp cp_rrb_map[1] /* 0x000288 */ 90 #define cp_odd_resp cp_rrb_map[1] /* 0x000288 */
91 uint64_t cp_resp_status; /* 0x000290 */ 91 u64 cp_resp_status; /* 0x000290 */
92 uint64_t cp_resp_clear; /* 0x000298 */ 92 u64 cp_resp_clear; /* 0x000298 */
93 93
94 uint64_t _pad_0002A0[12]; /* 0x0002{A0..F8} */ 94 u64 _pad_0002A0[12]; /* 0x0002{A0..F8} */
95 95
96 /* 0x000300-0x0003F8 -- Buffer Address Match Registers */ 96 /* 0x000300-0x0003F8 -- Buffer Address Match Registers */
97 struct { 97 struct {
98 uint64_t upper; /* 0x0003{00,,,F0} */ 98 u64 upper; /* 0x0003{00,,,F0} */
99 uint64_t lower; /* 0x0003{08,,,F8} */ 99 u64 lower; /* 0x0003{08,,,F8} */
100 } cp_buf_addr_match[16]; 100 } cp_buf_addr_match[16];
101 101
102 /* 0x000400-0x0005FF -- Performance Monitor Registers (even only) */ 102 /* 0x000400-0x0005FF -- Performance Monitor Registers (even only) */
103 struct { 103 struct {
104 uint64_t flush_w_touch; /* 0x000{400,,,5C0} */ 104 u64 flush_w_touch; /* 0x000{400,,,5C0} */
105 uint64_t flush_wo_touch; /* 0x000{408,,,5C8} */ 105 u64 flush_wo_touch; /* 0x000{408,,,5C8} */
106 uint64_t inflight; /* 0x000{410,,,5D0} */ 106 u64 inflight; /* 0x000{410,,,5D0} */
107 uint64_t prefetch; /* 0x000{418,,,5D8} */ 107 u64 prefetch; /* 0x000{418,,,5D8} */
108 uint64_t total_pci_retry; /* 0x000{420,,,5E0} */ 108 u64 total_pci_retry; /* 0x000{420,,,5E0} */
109 uint64_t max_pci_retry; /* 0x000{428,,,5E8} */ 109 u64 max_pci_retry; /* 0x000{428,,,5E8} */
110 uint64_t max_latency; /* 0x000{430,,,5F0} */ 110 u64 max_latency; /* 0x000{430,,,5F0} */
111 uint64_t clear_all; /* 0x000{438,,,5F8} */ 111 u64 clear_all; /* 0x000{438,,,5F8} */
112 } cp_buf_count[8]; 112 } cp_buf_count[8];
113 113
114 114
115 /* 0x000600-0x0009FF -- PCI/X registers */ 115 /* 0x000600-0x0009FF -- PCI/X registers */
116 uint64_t cp_pcix_bus_err_addr; /* 0x000600 */ 116 u64 cp_pcix_bus_err_addr; /* 0x000600 */
117 uint64_t cp_pcix_bus_err_attr; /* 0x000608 */ 117 u64 cp_pcix_bus_err_attr; /* 0x000608 */
118 uint64_t cp_pcix_bus_err_data; /* 0x000610 */ 118 u64 cp_pcix_bus_err_data; /* 0x000610 */
119 uint64_t cp_pcix_pio_split_addr; /* 0x000618 */ 119 u64 cp_pcix_pio_split_addr; /* 0x000618 */
120 uint64_t cp_pcix_pio_split_attr; /* 0x000620 */ 120 u64 cp_pcix_pio_split_attr; /* 0x000620 */
121 uint64_t cp_pcix_dma_req_err_attr; /* 0x000628 */ 121 u64 cp_pcix_dma_req_err_attr; /* 0x000628 */
122 uint64_t cp_pcix_dma_req_err_addr; /* 0x000630 */ 122 u64 cp_pcix_dma_req_err_addr; /* 0x000630 */
123 uint64_t cp_pcix_timeout; /* 0x000638 */ 123 u64 cp_pcix_timeout; /* 0x000638 */
124 124
125 uint64_t _pad_000640[24]; /* 0x000{640,,,6F8} */ 125 u64 _pad_000640[24]; /* 0x000{640,,,6F8} */
126 126
127 /* 0x000700-0x000737 -- Debug Registers */ 127 /* 0x000700-0x000737 -- Debug Registers */
128 uint64_t cp_ct_debug_ctl; /* 0x000700 */ 128 u64 cp_ct_debug_ctl; /* 0x000700 */
129 uint64_t cp_br_debug_ctl; /* 0x000708 */ 129 u64 cp_br_debug_ctl; /* 0x000708 */
130 uint64_t cp_mux3_debug_ctl; /* 0x000710 */ 130 u64 cp_mux3_debug_ctl; /* 0x000710 */
131 uint64_t cp_mux4_debug_ctl; /* 0x000718 */ 131 u64 cp_mux4_debug_ctl; /* 0x000718 */
132 uint64_t cp_mux5_debug_ctl; /* 0x000720 */ 132 u64 cp_mux5_debug_ctl; /* 0x000720 */
133 uint64_t cp_mux6_debug_ctl; /* 0x000728 */ 133 u64 cp_mux6_debug_ctl; /* 0x000728 */
134 uint64_t cp_mux7_debug_ctl; /* 0x000730 */ 134 u64 cp_mux7_debug_ctl; /* 0x000730 */
135 135
136 uint64_t _pad_000738[89]; /* 0x000{738,,,9F8} */ 136 u64 _pad_000738[89]; /* 0x000{738,,,9F8} */
137 137
138 /* 0x000A00-0x000BFF -- PCI/X Read&Write Buffer */ 138 /* 0x000A00-0x000BFF -- PCI/X Read&Write Buffer */
139 struct { 139 struct {
140 uint64_t cp_buf_addr; /* 0x000{A00,,,AF0} */ 140 u64 cp_buf_addr; /* 0x000{A00,,,AF0} */
141 uint64_t cp_buf_attr; /* 0X000{A08,,,AF8} */ 141 u64 cp_buf_attr; /* 0X000{A08,,,AF8} */
142 } cp_pcix_read_buf_64[16]; 142 } cp_pcix_read_buf_64[16];
143 143
144 struct { 144 struct {
145 uint64_t cp_buf_addr; /* 0x000{B00,,,BE0} */ 145 u64 cp_buf_addr; /* 0x000{B00,,,BE0} */
146 uint64_t cp_buf_attr; /* 0x000{B08,,,BE8} */ 146 u64 cp_buf_attr; /* 0x000{B08,,,BE8} */
147 uint64_t cp_buf_valid; /* 0x000{B10,,,BF0} */ 147 u64 cp_buf_valid; /* 0x000{B10,,,BF0} */
148 uint64_t __pad1; /* 0x000{B18,,,BF8} */ 148 u64 __pad1; /* 0x000{B18,,,BF8} */
149 } cp_pcix_write_buf_64[8]; 149 } cp_pcix_write_buf_64[8];
150 150
151 /* End of Local Registers -- Start of Address Map space */ 151 /* End of Local Registers -- Start of Address Map space */
152 152
153 char _pad_000c00[0x010000 - 0x000c00]; 153 char _pad_000c00[0x010000 - 0x000c00];
154 154
155 /* 0x010000-0x011FF8 -- Internal ATE RAM (Auto Parity Generation) */ 155 /* 0x010000-0x011FF8 -- Internal ATE RAM (Auto Parity Generation) */
156 uint64_t cp_int_ate_ram[1024]; /* 0x010000-0x011FF8 */ 156 u64 cp_int_ate_ram[1024]; /* 0x010000-0x011FF8 */
157 157
158 char _pad_012000[0x14000 - 0x012000]; 158 char _pad_012000[0x14000 - 0x012000];
159 159
160 /* 0x014000-0x015FF8 -- Internal ATE RAM (Manual Parity Generation) */ 160 /* 0x014000-0x015FF8 -- Internal ATE RAM (Manual Parity Generation) */
161 uint64_t cp_int_ate_ram_mp[1024]; /* 0x014000-0x015FF8 */ 161 u64 cp_int_ate_ram_mp[1024]; /* 0x014000-0x015FF8 */
162 162
163 char _pad_016000[0x18000 - 0x016000]; 163 char _pad_016000[0x18000 - 0x016000];
164 164
165 /* 0x18000-0x197F8 -- TIOCP Write Request Ram */ 165 /* 0x18000-0x197F8 -- TIOCP Write Request Ram */
166 uint64_t cp_wr_req_lower[256]; /* 0x18000 - 0x187F8 */ 166 u64 cp_wr_req_lower[256]; /* 0x18000 - 0x187F8 */
167 uint64_t cp_wr_req_upper[256]; /* 0x18800 - 0x18FF8 */ 167 u64 cp_wr_req_upper[256]; /* 0x18800 - 0x18FF8 */
168 uint64_t cp_wr_req_parity[256]; /* 0x19000 - 0x197F8 */ 168 u64 cp_wr_req_parity[256]; /* 0x19000 - 0x197F8 */
169 169
170 char _pad_019800[0x1C000 - 0x019800]; 170 char _pad_019800[0x1C000 - 0x019800];
171 171
172 /* 0x1C000-0x1EFF8 -- TIOCP Read Response Ram */ 172 /* 0x1C000-0x1EFF8 -- TIOCP Read Response Ram */
173 uint64_t cp_rd_resp_lower[512]; /* 0x1C000 - 0x1CFF8 */ 173 u64 cp_rd_resp_lower[512]; /* 0x1C000 - 0x1CFF8 */
174 uint64_t cp_rd_resp_upper[512]; /* 0x1D000 - 0x1DFF8 */ 174 u64 cp_rd_resp_upper[512]; /* 0x1D000 - 0x1DFF8 */
175 uint64_t cp_rd_resp_parity[512]; /* 0x1E000 - 0x1EFF8 */ 175 u64 cp_rd_resp_parity[512]; /* 0x1E000 - 0x1EFF8 */
176 176
177 char _pad_01F000[0x20000 - 0x01F000]; 177 char _pad_01F000[0x20000 - 0x01F000];
178 178
179 /* 0x020000-0x021FFF -- Host Device (CP) Configuration Space (not used) */ 179 /* 0x020000-0x021FFF -- Host Device (CP) Configuration Space (not used) */
180 char _pad_020000[0x021000 - 0x20000]; 180 char _pad_020000[0x021000 - 0x20000];
181 181
182 /* 0x021000-0x027FFF -- PCI Device Configuration Spaces */ 182 /* 0x021000-0x027FFF -- PCI Device Configuration Spaces */
183 union { 183 union {
184 uint8_t c[0x1000 / 1]; /* 0x02{0000,,,7FFF} */ 184 u8 c[0x1000 / 1]; /* 0x02{0000,,,7FFF} */
185 uint16_t s[0x1000 / 2]; /* 0x02{0000,,,7FFF} */ 185 u16 s[0x1000 / 2]; /* 0x02{0000,,,7FFF} */
186 uint32_t l[0x1000 / 4]; /* 0x02{0000,,,7FFF} */ 186 u32 l[0x1000 / 4]; /* 0x02{0000,,,7FFF} */
187 uint64_t d[0x1000 / 8]; /* 0x02{0000,,,7FFF} */ 187 u64 d[0x1000 / 8]; /* 0x02{0000,,,7FFF} */
188 union { 188 union {
189 uint8_t c[0x100 / 1]; 189 u8 c[0x100 / 1];
190 uint16_t s[0x100 / 2]; 190 u16 s[0x100 / 2];
191 uint32_t l[0x100 / 4]; 191 u32 l[0x100 / 4];
192 uint64_t d[0x100 / 8]; 192 u64 d[0x100 / 8];
193 } f[8]; 193 } f[8];
194 } cp_type0_cfg_dev[7]; /* 0x02{1000,,,7FFF} */ 194 } cp_type0_cfg_dev[7]; /* 0x02{1000,,,7FFF} */
195 195
196 /* 0x028000-0x028FFF -- PCI Type 1 Configuration Space */ 196 /* 0x028000-0x028FFF -- PCI Type 1 Configuration Space */
197 union { 197 union {
198 uint8_t c[0x1000 / 1]; /* 0x028000-0x029000 */ 198 u8 c[0x1000 / 1]; /* 0x028000-0x029000 */
199 uint16_t s[0x1000 / 2]; /* 0x028000-0x029000 */ 199 u16 s[0x1000 / 2]; /* 0x028000-0x029000 */
200 uint32_t l[0x1000 / 4]; /* 0x028000-0x029000 */ 200 u32 l[0x1000 / 4]; /* 0x028000-0x029000 */
201 uint64_t d[0x1000 / 8]; /* 0x028000-0x029000 */ 201 u64 d[0x1000 / 8]; /* 0x028000-0x029000 */
202 union { 202 union {
203 uint8_t c[0x100 / 1]; 203 u8 c[0x100 / 1];
204 uint16_t s[0x100 / 2]; 204 u16 s[0x100 / 2];
205 uint32_t l[0x100 / 4]; 205 u32 l[0x100 / 4];
206 uint64_t d[0x100 / 8]; 206 u64 d[0x100 / 8];
207 } f[8]; 207 } f[8];
208 } cp_type1_cfg; /* 0x028000-0x029000 */ 208 } cp_type1_cfg; /* 0x028000-0x029000 */
209 209
@@ -211,30 +211,30 @@ struct tiocp{
211 211
212 /* 0x030000-0x030007 -- PCI Interrupt Acknowledge Cycle */ 212 /* 0x030000-0x030007 -- PCI Interrupt Acknowledge Cycle */
213 union { 213 union {
214 uint8_t c[8 / 1]; 214 u8 c[8 / 1];
215 uint16_t s[8 / 2]; 215 u16 s[8 / 2];
216 uint32_t l[8 / 4]; 216 u32 l[8 / 4];
217 uint64_t d[8 / 8]; 217 u64 d[8 / 8];
218 } cp_pci_iack; /* 0x030000-0x030007 */ 218 } cp_pci_iack; /* 0x030000-0x030007 */
219 219
220 char _pad_030007[0x040000-0x030008]; 220 char _pad_030007[0x040000-0x030008];
221 221
222 /* 0x040000-0x040007 -- PCIX Special Cycle */ 222 /* 0x040000-0x040007 -- PCIX Special Cycle */
223 union { 223 union {
224 uint8_t c[8 / 1]; 224 u8 c[8 / 1];
225 uint16_t s[8 / 2]; 225 u16 s[8 / 2];
226 uint32_t l[8 / 4]; 226 u32 l[8 / 4];
227 uint64_t d[8 / 8]; 227 u64 d[8 / 8];
228 } cp_pcix_cycle; /* 0x040000-0x040007 */ 228 } cp_pcix_cycle; /* 0x040000-0x040007 */
229 229
230 char _pad_040007[0x200000-0x040008]; 230 char _pad_040007[0x200000-0x040008];
231 231
232 /* 0x200000-0x7FFFFF -- PCI/GIO Device Spaces */ 232 /* 0x200000-0x7FFFFF -- PCI/GIO Device Spaces */
233 union { 233 union {
234 uint8_t c[0x100000 / 1]; 234 u8 c[0x100000 / 1];
235 uint16_t s[0x100000 / 2]; 235 u16 s[0x100000 / 2];
236 uint32_t l[0x100000 / 4]; 236 u32 l[0x100000 / 4];
237 uint64_t d[0x100000 / 8]; 237 u64 d[0x100000 / 8];
238 } cp_devio_raw[6]; /* 0x200000-0x7FFFFF */ 238 } cp_devio_raw[6]; /* 0x200000-0x7FFFFF */
239 239
240 #define cp_devio(n) cp_devio_raw[((n)<2)?(n*2):(n+2)] 240 #define cp_devio(n) cp_devio_raw[((n)<2)?(n*2):(n+2)]
@@ -243,10 +243,10 @@ struct tiocp{
243 243
244 /* 0xA00000-0xBFFFFF -- PCI/GIO Device Spaces w/flush */ 244 /* 0xA00000-0xBFFFFF -- PCI/GIO Device Spaces w/flush */
245 union { 245 union {
246 uint8_t c[0x100000 / 1]; 246 u8 c[0x100000 / 1];
247 uint16_t s[0x100000 / 2]; 247 u16 s[0x100000 / 2];
248 uint32_t l[0x100000 / 4]; 248 u32 l[0x100000 / 4];
249 uint64_t d[0x100000 / 8]; 249 u64 d[0x100000 / 8];
250 } cp_devio_raw_flush[6]; /* 0xA00000-0xBFFFFF */ 250 } cp_devio_raw_flush[6]; /* 0xA00000-0xBFFFFF */
251 251
252 #define cp_devio_flush(n) cp_devio_raw_flush[((n)<2)?(n*2):(n+2)] 252 #define cp_devio_flush(n) cp_devio_raw_flush[((n)<2)?(n*2):(n+2)]
diff --git a/include/asm-ia64/sn/tiocx.h b/include/asm-ia64/sn/tiocx.h
index 5699e75e5024..d29728492f36 100644
--- a/include/asm-ia64/sn/tiocx.h
+++ b/include/asm-ia64/sn/tiocx.h
@@ -40,10 +40,10 @@ struct cx_drv {
40}; 40};
41 41
42/* create DMA address by stripping AS bits */ 42/* create DMA address by stripping AS bits */
43#define TIOCX_DMA_ADDR(a) (uint64_t)((uint64_t)(a) & 0xffffcfffffffffUL) 43#define TIOCX_DMA_ADDR(a) (u64)((u64)(a) & 0xffffcfffffffffUL)
44 44
45#define TIOCX_TO_TIOCX_DMA_ADDR(a) (uint64_t)(((uint64_t)(a) & 0xfffffffff) | \ 45#define TIOCX_TO_TIOCX_DMA_ADDR(a) (u64)(((u64)(a) & 0xfffffffff) | \
46 ((((uint64_t)(a)) & 0xffffc000000000UL) <<2)) 46 ((((u64)(a)) & 0xffffc000000000UL) <<2))
47 47
48#define TIO_CE_ASIC_PARTNUM 0xce00 48#define TIO_CE_ASIC_PARTNUM 0xce00
49#define TIOCX_CORELET 3 49#define TIOCX_CORELET 3
@@ -63,10 +63,10 @@ extern int cx_device_unregister(struct cx_dev *);
63extern int cx_device_register(nasid_t, int, int, struct hubdev_info *, int); 63extern int cx_device_register(nasid_t, int, int, struct hubdev_info *, int);
64extern int cx_driver_unregister(struct cx_drv *); 64extern int cx_driver_unregister(struct cx_drv *);
65extern int cx_driver_register(struct cx_drv *); 65extern int cx_driver_register(struct cx_drv *);
66extern uint64_t tiocx_dma_addr(uint64_t addr); 66extern u64 tiocx_dma_addr(u64 addr);
67extern uint64_t tiocx_swin_base(int nasid); 67extern u64 tiocx_swin_base(int nasid);
68extern void tiocx_mmr_store(int nasid, uint64_t offset, uint64_t value); 68extern void tiocx_mmr_store(int nasid, u64 offset, u64 value);
69extern uint64_t tiocx_mmr_load(int nasid, uint64_t offset); 69extern u64 tiocx_mmr_load(int nasid, u64 offset);
70 70
71#endif // __KERNEL__ 71#endif // __KERNEL__
72#endif // _ASM_IA64_SN_TIO_TIOCX__ 72#endif // _ASM_IA64_SN_TIO_TIOCX__
diff --git a/include/asm-ia64/sn/xp.h b/include/asm-ia64/sn/xp.h
index 49faf8f26430..9bd2f9bf329b 100644
--- a/include/asm-ia64/sn/xp.h
+++ b/include/asm-ia64/sn/xp.h
@@ -18,6 +18,7 @@
18 18
19#include <linux/cache.h> 19#include <linux/cache.h>
20#include <linux/hardirq.h> 20#include <linux/hardirq.h>
21#include <linux/mutex.h>
21#include <asm/sn/types.h> 22#include <asm/sn/types.h>
22#include <asm/sn/bte.h> 23#include <asm/sn/bte.h>
23 24
@@ -227,7 +228,9 @@ enum xpc_retval {
227 228
228 xpcOpenCloseError, /* 50: channel open/close protocol error */ 229 xpcOpenCloseError, /* 50: channel open/close protocol error */
229 230
230 xpcUnknownReason /* 51: unknown reason -- must be last in list */ 231 xpcDisconnected, /* 51: channel disconnected (closed) */
232
233 xpcUnknownReason /* 52: unknown reason -- must be last in list */
231}; 234};
232 235
233 236
@@ -357,7 +360,7 @@ typedef void (*xpc_notify_func)(enum xpc_retval reason, partid_t partid,
357 * the channel. 360 * the channel.
358 */ 361 */
359struct xpc_registration { 362struct xpc_registration {
360 struct semaphore sema; 363 struct mutex mutex;
361 xpc_channel_func func; /* function to call */ 364 xpc_channel_func func; /* function to call */
362 void *key; /* pointer to user's key */ 365 void *key; /* pointer to user's key */
363 u16 nentries; /* #of msg entries in local msg queue */ 366 u16 nentries; /* #of msg entries in local msg queue */
diff --git a/include/asm-ia64/sn/xpc.h b/include/asm-ia64/sn/xpc.h
new file mode 100644
index 000000000000..df7f5f4f3cde
--- /dev/null
+++ b/include/asm-ia64/sn/xpc.h
@@ -0,0 +1,1280 @@
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (c) 2004-2006 Silicon Graphics, Inc. All Rights Reserved.
7 */
8
9
10/*
11 * Cross Partition Communication (XPC) structures and macros.
12 */
13
14#ifndef _ASM_IA64_SN_XPC_H
15#define _ASM_IA64_SN_XPC_H
16
17
18#include <linux/config.h>
19#include <linux/interrupt.h>
20#include <linux/sysctl.h>
21#include <linux/device.h>
22#include <linux/mutex.h>
23#include <linux/completion.h>
24#include <asm/pgtable.h>
25#include <asm/processor.h>
26#include <asm/sn/bte.h>
27#include <asm/sn/clksupport.h>
28#include <asm/sn/addrs.h>
29#include <asm/sn/mspec.h>
30#include <asm/sn/shub_mmr.h>
31#include <asm/sn/xp.h>
32
33
34/*
35 * XPC Version numbers consist of a major and minor number. XPC can always
36 * talk to versions with same major #, and never talk to versions with a
37 * different major #.
38 */
39#define _XPC_VERSION(_maj, _min) (((_maj) << 4) | ((_min) & 0xf))
40#define XPC_VERSION_MAJOR(_v) ((_v) >> 4)
41#define XPC_VERSION_MINOR(_v) ((_v) & 0xf)
42
43
44/*
45 * The next macros define word or bit representations for given
46 * C-brick nasid in either the SAL provided bit array representing
47 * nasids in the partition/machine or the AMO_t array used for
48 * inter-partition initiation communications.
49 *
50 * For SN2 machines, C-Bricks are alway even numbered NASIDs. As
51 * such, some space will be saved by insisting that nasid information
52 * passed from SAL always be packed for C-Bricks and the
53 * cross-partition interrupts use the same packing scheme.
54 */
55#define XPC_NASID_W_INDEX(_n) (((_n) / 64) / 2)
56#define XPC_NASID_B_INDEX(_n) (((_n) / 2) & (64 - 1))
57#define XPC_NASID_IN_ARRAY(_n, _p) ((_p)[XPC_NASID_W_INDEX(_n)] & \
58 (1UL << XPC_NASID_B_INDEX(_n)))
59#define XPC_NASID_FROM_W_B(_w, _b) (((_w) * 64 + (_b)) * 2)
60
61#define XPC_HB_DEFAULT_INTERVAL 5 /* incr HB every x secs */
62#define XPC_HB_CHECK_DEFAULT_INTERVAL 20 /* check HB every x secs */
63
64/* define the process name of HB checker and the CPU it is pinned to */
65#define XPC_HB_CHECK_THREAD_NAME "xpc_hb"
66#define XPC_HB_CHECK_CPU 0
67
68/* define the process name of the discovery thread */
69#define XPC_DISCOVERY_THREAD_NAME "xpc_discovery"
70
71
72/*
73 * the reserved page
74 *
75 * SAL reserves one page of memory per partition for XPC. Though a full page
76 * in length (16384 bytes), its starting address is not page aligned, but it
77 * is cacheline aligned. The reserved page consists of the following:
78 *
79 * reserved page header
80 *
81 * The first cacheline of the reserved page contains the header
82 * (struct xpc_rsvd_page). Before SAL initialization has completed,
83 * SAL has set up the following fields of the reserved page header:
84 * SAL_signature, SAL_version, partid, and nasids_size. The other
85 * fields are set up by XPC. (xpc_rsvd_page points to the local
86 * partition's reserved page.)
87 *
88 * part_nasids mask
89 * mach_nasids mask
90 *
91 * SAL also sets up two bitmaps (or masks), one that reflects the actual
92 * nasids in this partition (part_nasids), and the other that reflects
93 * the actual nasids in the entire machine (mach_nasids). We're only
94 * interested in the even numbered nasids (which contain the processors
95 * and/or memory), so we only need half as many bits to represent the
96 * nasids. The part_nasids mask is located starting at the first cacheline
97 * following the reserved page header. The mach_nasids mask follows right
98 * after the part_nasids mask. The size in bytes of each mask is reflected
99 * by the reserved page header field 'nasids_size'. (Local partition's
100 * mask pointers are xpc_part_nasids and xpc_mach_nasids.)
101 *
102 * vars
103 * vars part
104 *
105 * Immediately following the mach_nasids mask are the XPC variables
106 * required by other partitions. First are those that are generic to all
107 * partitions (vars), followed on the next available cacheline by those
108 * which are partition specific (vars part). These are setup by XPC.
109 * (Local partition's vars pointers are xpc_vars and xpc_vars_part.)
110 *
111 * Note: Until vars_pa is set, the partition XPC code has not been initialized.
112 */
113struct xpc_rsvd_page {
114 u64 SAL_signature; /* SAL: unique signature */
115 u64 SAL_version; /* SAL: version */
116 u8 partid; /* SAL: partition ID */
117 u8 version;
118 u8 pad1[6]; /* align to next u64 in cacheline */
119 volatile u64 vars_pa;
120 struct timespec stamp; /* time when reserved page was setup by XPC */
121 u64 pad2[9]; /* align to last u64 in cacheline */
122 u64 nasids_size; /* SAL: size of each nasid mask in bytes */
123};
124
125#define XPC_RP_VERSION _XPC_VERSION(1,1) /* version 1.1 of the reserved page */
126
127#define XPC_SUPPORTS_RP_STAMP(_version) \
128 (_version >= _XPC_VERSION(1,1))
129
130/*
131 * compare stamps - the return value is:
132 *
133 * < 0, if stamp1 < stamp2
134 * = 0, if stamp1 == stamp2
135 * > 0, if stamp1 > stamp2
136 */
137static inline int
138xpc_compare_stamps(struct timespec *stamp1, struct timespec *stamp2)
139{
140 int ret;
141
142
143 if ((ret = stamp1->tv_sec - stamp2->tv_sec) == 0) {
144 ret = stamp1->tv_nsec - stamp2->tv_nsec;
145 }
146 return ret;
147}
148
149
150/*
151 * Define the structures by which XPC variables can be exported to other
152 * partitions. (There are two: struct xpc_vars and struct xpc_vars_part)
153 */
154
155/*
156 * The following structure describes the partition generic variables
157 * needed by other partitions in order to properly initialize.
158 *
159 * struct xpc_vars version number also applies to struct xpc_vars_part.
160 * Changes to either structure and/or related functionality should be
161 * reflected by incrementing either the major or minor version numbers
162 * of struct xpc_vars.
163 */
164struct xpc_vars {
165 u8 version;
166 u64 heartbeat;
167 u64 heartbeating_to_mask;
168 u64 heartbeat_offline; /* if 0, heartbeat should be changing */
169 int act_nasid;
170 int act_phys_cpuid;
171 u64 vars_part_pa;
172 u64 amos_page_pa; /* paddr of page of AMOs from MSPEC driver */
173 AMO_t *amos_page; /* vaddr of page of AMOs from MSPEC driver */
174};
175
176#define XPC_V_VERSION _XPC_VERSION(3,1) /* version 3.1 of the cross vars */
177
178#define XPC_SUPPORTS_DISENGAGE_REQUEST(_version) \
179 (_version >= _XPC_VERSION(3,1))
180
181
182static inline int
183xpc_hb_allowed(partid_t partid, struct xpc_vars *vars)
184{
185 return ((vars->heartbeating_to_mask & (1UL << partid)) != 0);
186}
187
188static inline void
189xpc_allow_hb(partid_t partid, struct xpc_vars *vars)
190{
191 u64 old_mask, new_mask;
192
193 do {
194 old_mask = vars->heartbeating_to_mask;
195 new_mask = (old_mask | (1UL << partid));
196 } while (cmpxchg(&vars->heartbeating_to_mask, old_mask, new_mask) !=
197 old_mask);
198}
199
200static inline void
201xpc_disallow_hb(partid_t partid, struct xpc_vars *vars)
202{
203 u64 old_mask, new_mask;
204
205 do {
206 old_mask = vars->heartbeating_to_mask;
207 new_mask = (old_mask & ~(1UL << partid));
208 } while (cmpxchg(&vars->heartbeating_to_mask, old_mask, new_mask) !=
209 old_mask);
210}
211
212
213/*
214 * The AMOs page consists of a number of AMO variables which are divided into
215 * four groups, The first two groups are used to identify an IRQ's sender.
216 * These two groups consist of 64 and 128 AMO variables respectively. The last
217 * two groups, consisting of just one AMO variable each, are used to identify
218 * the remote partitions that are currently engaged (from the viewpoint of
219 * the XPC running on the remote partition).
220 */
221#define XPC_NOTIFY_IRQ_AMOS 0
222#define XPC_ACTIVATE_IRQ_AMOS (XPC_NOTIFY_IRQ_AMOS + XP_MAX_PARTITIONS)
223#define XPC_ENGAGED_PARTITIONS_AMO (XPC_ACTIVATE_IRQ_AMOS + XP_NASID_MASK_WORDS)
224#define XPC_DISENGAGE_REQUEST_AMO (XPC_ENGAGED_PARTITIONS_AMO + 1)
225
226
227/*
228 * The following structure describes the per partition specific variables.
229 *
230 * An array of these structures, one per partition, will be defined. As a
231 * partition becomes active XPC will copy the array entry corresponding to
232 * itself from that partition. It is desirable that the size of this
233 * structure evenly divide into a cacheline, such that none of the entries
234 * in this array crosses a cacheline boundary. As it is now, each entry
235 * occupies half a cacheline.
236 */
237struct xpc_vars_part {
238 volatile u64 magic;
239
240 u64 openclose_args_pa; /* physical address of open and close args */
241 u64 GPs_pa; /* physical address of Get/Put values */
242
243 u64 IPI_amo_pa; /* physical address of IPI AMO_t structure */
244 int IPI_nasid; /* nasid of where to send IPIs */
245 int IPI_phys_cpuid; /* physical CPU ID of where to send IPIs */
246
247 u8 nchannels; /* #of defined channels supported */
248
249 u8 reserved[23]; /* pad to a full 64 bytes */
250};
251
252/*
253 * The vars_part MAGIC numbers play a part in the first contact protocol.
254 *
255 * MAGIC1 indicates that the per partition specific variables for a remote
256 * partition have been initialized by this partition.
257 *
258 * MAGIC2 indicates that this partition has pulled the remote partititions
259 * per partition variables that pertain to this partition.
260 */
261#define XPC_VP_MAGIC1 0x0053524156435058L /* 'XPCVARS\0'L (little endian) */
262#define XPC_VP_MAGIC2 0x0073726176435058L /* 'XPCvars\0'L (little endian) */
263
264
265/* the reserved page sizes and offsets */
266
267#define XPC_RP_HEADER_SIZE L1_CACHE_ALIGN(sizeof(struct xpc_rsvd_page))
268#define XPC_RP_VARS_SIZE L1_CACHE_ALIGN(sizeof(struct xpc_vars))
269
270#define XPC_RP_PART_NASIDS(_rp) (u64 *) ((u8 *) _rp + XPC_RP_HEADER_SIZE)
271#define XPC_RP_MACH_NASIDS(_rp) (XPC_RP_PART_NASIDS(_rp) + xp_nasid_mask_words)
272#define XPC_RP_VARS(_rp) ((struct xpc_vars *) XPC_RP_MACH_NASIDS(_rp) + xp_nasid_mask_words)
273#define XPC_RP_VARS_PART(_rp) (struct xpc_vars_part *) ((u8 *) XPC_RP_VARS(rp) + XPC_RP_VARS_SIZE)
274
275
276/*
277 * Functions registered by add_timer() or called by kernel_thread() only
278 * allow for a single 64-bit argument. The following macros can be used to
279 * pack and unpack two (32-bit, 16-bit or 8-bit) arguments into or out from
280 * the passed argument.
281 */
282#define XPC_PACK_ARGS(_arg1, _arg2) \
283 ((((u64) _arg1) & 0xffffffff) | \
284 ((((u64) _arg2) & 0xffffffff) << 32))
285
286#define XPC_UNPACK_ARG1(_args) (((u64) _args) & 0xffffffff)
287#define XPC_UNPACK_ARG2(_args) ((((u64) _args) >> 32) & 0xffffffff)
288
289
290
291/*
292 * Define a Get/Put value pair (pointers) used with a message queue.
293 */
294struct xpc_gp {
295 volatile s64 get; /* Get value */
296 volatile s64 put; /* Put value */
297};
298
299#define XPC_GP_SIZE \
300 L1_CACHE_ALIGN(sizeof(struct xpc_gp) * XPC_NCHANNELS)
301
302
303
304/*
305 * Define a structure that contains arguments associated with opening and
306 * closing a channel.
307 */
308struct xpc_openclose_args {
309 u16 reason; /* reason why channel is closing */
310 u16 msg_size; /* sizeof each message entry */
311 u16 remote_nentries; /* #of message entries in remote msg queue */
312 u16 local_nentries; /* #of message entries in local msg queue */
313 u64 local_msgqueue_pa; /* physical address of local message queue */
314};
315
316#define XPC_OPENCLOSE_ARGS_SIZE \
317 L1_CACHE_ALIGN(sizeof(struct xpc_openclose_args) * XPC_NCHANNELS)
318
319
320
321/* struct xpc_msg flags */
322
323#define XPC_M_DONE 0x01 /* msg has been received/consumed */
324#define XPC_M_READY 0x02 /* msg is ready to be sent */
325#define XPC_M_INTERRUPT 0x04 /* send interrupt when msg consumed */
326
327
328#define XPC_MSG_ADDRESS(_payload) \
329 ((struct xpc_msg *)((u8 *)(_payload) - XPC_MSG_PAYLOAD_OFFSET))
330
331
332
333/*
334 * Defines notify entry.
335 *
336 * This is used to notify a message's sender that their message was received
337 * and consumed by the intended recipient.
338 */
339struct xpc_notify {
340 volatile u8 type; /* type of notification */
341
342 /* the following two fields are only used if type == XPC_N_CALL */
343 xpc_notify_func func; /* user's notify function */
344 void *key; /* pointer to user's key */
345};
346
347/* struct xpc_notify type of notification */
348
349#define XPC_N_CALL 0x01 /* notify function provided by user */
350
351
352
353/*
354 * Define the structure that manages all the stuff required by a channel. In
355 * particular, they are used to manage the messages sent across the channel.
356 *
357 * This structure is private to a partition, and is NOT shared across the
358 * partition boundary.
359 *
360 * There is an array of these structures for each remote partition. It is
361 * allocated at the time a partition becomes active. The array contains one
362 * of these structures for each potential channel connection to that partition.
363 *
364 * Each of these structures manages two message queues (circular buffers).
365 * They are allocated at the time a channel connection is made. One of
366 * these message queues (local_msgqueue) holds the locally created messages
367 * that are destined for the remote partition. The other of these message
368 * queues (remote_msgqueue) is a locally cached copy of the remote partition's
369 * own local_msgqueue.
370 *
371 * The following is a description of the Get/Put pointers used to manage these
372 * two message queues. Consider the local_msgqueue to be on one partition
373 * and the remote_msgqueue to be its cached copy on another partition. A
374 * description of what each of the lettered areas contains is included.
375 *
376 *
377 * local_msgqueue remote_msgqueue
378 *
379 * |/////////| |/////////|
380 * w_remote_GP.get --> +---------+ |/////////|
381 * | F | |/////////|
382 * remote_GP.get --> +---------+ +---------+ <-- local_GP->get
383 * | | | |
384 * | | | E |
385 * | | | |
386 * | | +---------+ <-- w_local_GP.get
387 * | B | |/////////|
388 * | | |////D////|
389 * | | |/////////|
390 * | | +---------+ <-- w_remote_GP.put
391 * | | |////C////|
392 * local_GP->put --> +---------+ +---------+ <-- remote_GP.put
393 * | | |/////////|
394 * | A | |/////////|
395 * | | |/////////|
396 * w_local_GP.put --> +---------+ |/////////|
397 * |/////////| |/////////|
398 *
399 *
400 * ( remote_GP.[get|put] are cached copies of the remote
401 * partition's local_GP->[get|put], and thus their values can
402 * lag behind their counterparts on the remote partition. )
403 *
404 *
405 * A - Messages that have been allocated, but have not yet been sent to the
406 * remote partition.
407 *
408 * B - Messages that have been sent, but have not yet been acknowledged by the
409 * remote partition as having been received.
410 *
411 * C - Area that needs to be prepared for the copying of sent messages, by
412 * the clearing of the message flags of any previously received messages.
413 *
414 * D - Area into which sent messages are to be copied from the remote
415 * partition's local_msgqueue and then delivered to their intended
416 * recipients. [ To allow for a multi-message copy, another pointer
417 * (next_msg_to_pull) has been added to keep track of the next message
418 * number needing to be copied (pulled). It chases after w_remote_GP.put.
419 * Any messages lying between w_local_GP.get and next_msg_to_pull have
420 * been copied and are ready to be delivered. ]
421 *
422 * E - Messages that have been copied and delivered, but have not yet been
423 * acknowledged by the recipient as having been received.
424 *
425 * F - Messages that have been acknowledged, but XPC has not yet notified the
426 * sender that the message was received by its intended recipient.
427 * This is also an area that needs to be prepared for the allocating of
428 * new messages, by the clearing of the message flags of the acknowledged
429 * messages.
430 */
431struct xpc_channel {
432 partid_t partid; /* ID of remote partition connected */
433 spinlock_t lock; /* lock for updating this structure */
434 u32 flags; /* general flags */
435
436 enum xpc_retval reason; /* reason why channel is disconnect'g */
437 int reason_line; /* line# disconnect initiated from */
438
439 u16 number; /* channel # */
440
441 u16 msg_size; /* sizeof each msg entry */
442 u16 local_nentries; /* #of msg entries in local msg queue */
443 u16 remote_nentries; /* #of msg entries in remote msg queue*/
444
445 void *local_msgqueue_base; /* base address of kmalloc'd space */
446 struct xpc_msg *local_msgqueue; /* local message queue */
447 void *remote_msgqueue_base; /* base address of kmalloc'd space */
448 struct xpc_msg *remote_msgqueue;/* cached copy of remote partition's */
449 /* local message queue */
450 u64 remote_msgqueue_pa; /* phys addr of remote partition's */
451 /* local message queue */
452
453 atomic_t references; /* #of external references to queues */
454
455 atomic_t n_on_msg_allocate_wq; /* #on msg allocation wait queue */
456 wait_queue_head_t msg_allocate_wq; /* msg allocation wait queue */
457
458 u8 delayed_IPI_flags; /* IPI flags received, but delayed */
459 /* action until channel disconnected */
460
461 /* queue of msg senders who want to be notified when msg received */
462
463 atomic_t n_to_notify; /* #of msg senders to notify */
464 struct xpc_notify *notify_queue;/* notify queue for messages sent */
465
466 xpc_channel_func func; /* user's channel function */
467 void *key; /* pointer to user's key */
468
469 struct mutex msg_to_pull_mutex; /* next msg to pull serialization */
470 struct completion wdisconnect_wait; /* wait for channel disconnect */
471
472 struct xpc_openclose_args *local_openclose_args; /* args passed on */
473 /* opening or closing of channel */
474
475 /* various flavors of local and remote Get/Put values */
476
477 struct xpc_gp *local_GP; /* local Get/Put values */
478 struct xpc_gp remote_GP; /* remote Get/Put values */
479 struct xpc_gp w_local_GP; /* working local Get/Put values */
480 struct xpc_gp w_remote_GP; /* working remote Get/Put values */
481 s64 next_msg_to_pull; /* Put value of next msg to pull */
482
483 /* kthread management related fields */
484
485// >>> rethink having kthreads_assigned_limit and kthreads_idle_limit; perhaps
486// >>> allow the assigned limit be unbounded and let the idle limit be dynamic
487// >>> dependent on activity over the last interval of time
488 atomic_t kthreads_assigned; /* #of kthreads assigned to channel */
489 u32 kthreads_assigned_limit; /* limit on #of kthreads assigned */
490 atomic_t kthreads_idle; /* #of kthreads idle waiting for work */
491 u32 kthreads_idle_limit; /* limit on #of kthreads idle */
492 atomic_t kthreads_active; /* #of kthreads actively working */
493 // >>> following field is temporary
494 u32 kthreads_created; /* total #of kthreads created */
495
496 wait_queue_head_t idle_wq; /* idle kthread wait queue */
497
498} ____cacheline_aligned;
499
500
501/* struct xpc_channel flags */
502
503#define XPC_C_WASCONNECTED 0x00000001 /* channel was connected */
504
505#define XPC_C_ROPENREPLY 0x00000002 /* remote open channel reply */
506#define XPC_C_OPENREPLY 0x00000004 /* local open channel reply */
507#define XPC_C_ROPENREQUEST 0x00000008 /* remote open channel request */
508#define XPC_C_OPENREQUEST 0x00000010 /* local open channel request */
509
510#define XPC_C_SETUP 0x00000020 /* channel's msgqueues are alloc'd */
511#define XPC_C_CONNECTEDCALLOUT 0x00000040 /* connected callout initiated */
512#define XPC_C_CONNECTEDCALLOUT_MADE \
513 0x00000080 /* connected callout completed */
514#define XPC_C_CONNECTED 0x00000100 /* local channel is connected */
515#define XPC_C_CONNECTING 0x00000200 /* channel is being connected */
516
517#define XPC_C_RCLOSEREPLY 0x00000400 /* remote close channel reply */
518#define XPC_C_CLOSEREPLY 0x00000800 /* local close channel reply */
519#define XPC_C_RCLOSEREQUEST 0x00001000 /* remote close channel request */
520#define XPC_C_CLOSEREQUEST 0x00002000 /* local close channel request */
521
522#define XPC_C_DISCONNECTED 0x00004000 /* channel is disconnected */
523#define XPC_C_DISCONNECTING 0x00008000 /* channel is being disconnected */
524#define XPC_C_DISCONNECTINGCALLOUT \
525 0x00010000 /* disconnecting callout initiated */
526#define XPC_C_DISCONNECTINGCALLOUT_MADE \
527 0x00020000 /* disconnecting callout completed */
528#define XPC_C_WDISCONNECT 0x00040000 /* waiting for channel disconnect */
529
530
531
532/*
533 * Manages channels on a partition basis. There is one of these structures
534 * for each partition (a partition will never utilize the structure that
535 * represents itself).
536 */
537struct xpc_partition {
538
539 /* XPC HB infrastructure */
540
541 u8 remote_rp_version; /* version# of partition's rsvd pg */
542 struct timespec remote_rp_stamp;/* time when rsvd pg was initialized */
543 u64 remote_rp_pa; /* phys addr of partition's rsvd pg */
544 u64 remote_vars_pa; /* phys addr of partition's vars */
545 u64 remote_vars_part_pa; /* phys addr of partition's vars part */
546 u64 last_heartbeat; /* HB at last read */
547 u64 remote_amos_page_pa; /* phys addr of partition's amos page */
548 int remote_act_nasid; /* active part's act/deact nasid */
549 int remote_act_phys_cpuid; /* active part's act/deact phys cpuid */
550 u32 act_IRQ_rcvd; /* IRQs since activation */
551 spinlock_t act_lock; /* protect updating of act_state */
552 u8 act_state; /* from XPC HB viewpoint */
553 u8 remote_vars_version; /* version# of partition's vars */
554 enum xpc_retval reason; /* reason partition is deactivating */
555 int reason_line; /* line# deactivation initiated from */
556 int reactivate_nasid; /* nasid in partition to reactivate */
557
558 unsigned long disengage_request_timeout; /* timeout in jiffies */
559 struct timer_list disengage_request_timer;
560
561
562 /* XPC infrastructure referencing and teardown control */
563
564 volatile u8 setup_state; /* infrastructure setup state */
565 wait_queue_head_t teardown_wq; /* kthread waiting to teardown infra */
566 atomic_t references; /* #of references to infrastructure */
567
568
569 /*
570 * NONE OF THE PRECEDING FIELDS OF THIS STRUCTURE WILL BE CLEARED WHEN
571 * XPC SETS UP THE NECESSARY INFRASTRUCTURE TO SUPPORT CROSS PARTITION
572 * COMMUNICATION. ALL OF THE FOLLOWING FIELDS WILL BE CLEARED. (THE
573 * 'nchannels' FIELD MUST BE THE FIRST OF THE FIELDS TO BE CLEARED.)
574 */
575
576
577 u8 nchannels; /* #of defined channels supported */
578 atomic_t nchannels_active; /* #of channels that are not DISCONNECTED */
579 atomic_t nchannels_engaged;/* #of channels engaged with remote part */
580 struct xpc_channel *channels;/* array of channel structures */
581
582 void *local_GPs_base; /* base address of kmalloc'd space */
583 struct xpc_gp *local_GPs; /* local Get/Put values */
584 void *remote_GPs_base; /* base address of kmalloc'd space */
585 struct xpc_gp *remote_GPs;/* copy of remote partition's local Get/Put */
586 /* values */
587 u64 remote_GPs_pa; /* phys address of remote partition's local */
588 /* Get/Put values */
589
590
591 /* fields used to pass args when opening or closing a channel */
592
593 void *local_openclose_args_base; /* base address of kmalloc'd space */
594 struct xpc_openclose_args *local_openclose_args; /* local's args */
595 void *remote_openclose_args_base; /* base address of kmalloc'd space */
596 struct xpc_openclose_args *remote_openclose_args; /* copy of remote's */
597 /* args */
598 u64 remote_openclose_args_pa; /* phys addr of remote's args */
599
600
601 /* IPI sending, receiving and handling related fields */
602
603 int remote_IPI_nasid; /* nasid of where to send IPIs */
604 int remote_IPI_phys_cpuid; /* phys CPU ID of where to send IPIs */
605 AMO_t *remote_IPI_amo_va; /* address of remote IPI AMO_t structure */
606
607 AMO_t *local_IPI_amo_va; /* address of IPI AMO_t structure */
608 u64 local_IPI_amo; /* IPI amo flags yet to be handled */
609 char IPI_owner[8]; /* IPI owner's name */
610 struct timer_list dropped_IPI_timer; /* dropped IPI timer */
611
612 spinlock_t IPI_lock; /* IPI handler lock */
613
614
615 /* channel manager related fields */
616
617 atomic_t channel_mgr_requests; /* #of requests to activate chan mgr */
618 wait_queue_head_t channel_mgr_wq; /* channel mgr's wait queue */
619
620} ____cacheline_aligned;
621
622
623/* struct xpc_partition act_state values (for XPC HB) */
624
625#define XPC_P_INACTIVE 0x00 /* partition is not active */
626#define XPC_P_ACTIVATION_REQ 0x01 /* created thread to activate */
627#define XPC_P_ACTIVATING 0x02 /* activation thread started */
628#define XPC_P_ACTIVE 0x03 /* xpc_partition_up() was called */
629#define XPC_P_DEACTIVATING 0x04 /* partition deactivation initiated */
630
631
632#define XPC_DEACTIVATE_PARTITION(_p, _reason) \
633 xpc_deactivate_partition(__LINE__, (_p), (_reason))
634
635
636/* struct xpc_partition setup_state values */
637
638#define XPC_P_UNSET 0x00 /* infrastructure was never setup */
639#define XPC_P_SETUP 0x01 /* infrastructure is setup */
640#define XPC_P_WTEARDOWN 0x02 /* waiting to teardown infrastructure */
641#define XPC_P_TORNDOWN 0x03 /* infrastructure is torndown */
642
643
644
645/*
646 * struct xpc_partition IPI_timer #of seconds to wait before checking for
647 * dropped IPIs. These occur whenever an IPI amo write doesn't complete until
648 * after the IPI was received.
649 */
650#define XPC_P_DROPPED_IPI_WAIT (0.25 * HZ)
651
652
653/* number of seconds to wait for other partitions to disengage */
654#define XPC_DISENGAGE_REQUEST_DEFAULT_TIMELIMIT 90
655
656/* interval in seconds to print 'waiting disengagement' messages */
657#define XPC_DISENGAGE_PRINTMSG_INTERVAL 10
658
659
660#define XPC_PARTID(_p) ((partid_t) ((_p) - &xpc_partitions[0]))
661
662
663
664/* found in xp_main.c */
665extern struct xpc_registration xpc_registrations[];
666
667
668/* found in xpc_main.c */
669extern struct device *xpc_part;
670extern struct device *xpc_chan;
671extern int xpc_disengage_request_timelimit;
672extern int xpc_disengage_request_timedout;
673extern irqreturn_t xpc_notify_IRQ_handler(int, void *, struct pt_regs *);
674extern void xpc_dropped_IPI_check(struct xpc_partition *);
675extern void xpc_activate_partition(struct xpc_partition *);
676extern void xpc_activate_kthreads(struct xpc_channel *, int);
677extern void xpc_create_kthreads(struct xpc_channel *, int);
678extern void xpc_disconnect_wait(int);
679
680
681/* found in xpc_partition.c */
682extern int xpc_exiting;
683extern struct xpc_vars *xpc_vars;
684extern struct xpc_rsvd_page *xpc_rsvd_page;
685extern struct xpc_vars_part *xpc_vars_part;
686extern struct xpc_partition xpc_partitions[XP_MAX_PARTITIONS + 1];
687extern char xpc_remote_copy_buffer[];
688extern struct xpc_rsvd_page *xpc_rsvd_page_init(void);
689extern void xpc_allow_IPI_ops(void);
690extern void xpc_restrict_IPI_ops(void);
691extern int xpc_identify_act_IRQ_sender(void);
692extern int xpc_partition_disengaged(struct xpc_partition *);
693extern enum xpc_retval xpc_mark_partition_active(struct xpc_partition *);
694extern void xpc_mark_partition_inactive(struct xpc_partition *);
695extern void xpc_discovery(void);
696extern void xpc_check_remote_hb(void);
697extern void xpc_deactivate_partition(const int, struct xpc_partition *,
698 enum xpc_retval);
699extern enum xpc_retval xpc_initiate_partid_to_nasids(partid_t, void *);
700
701
702/* found in xpc_channel.c */
703extern void xpc_initiate_connect(int);
704extern void xpc_initiate_disconnect(int);
705extern enum xpc_retval xpc_initiate_allocate(partid_t, int, u32, void **);
706extern enum xpc_retval xpc_initiate_send(partid_t, int, void *);
707extern enum xpc_retval xpc_initiate_send_notify(partid_t, int, void *,
708 xpc_notify_func, void *);
709extern void xpc_initiate_received(partid_t, int, void *);
710extern enum xpc_retval xpc_setup_infrastructure(struct xpc_partition *);
711extern enum xpc_retval xpc_pull_remote_vars_part(struct xpc_partition *);
712extern void xpc_process_channel_activity(struct xpc_partition *);
713extern void xpc_connected_callout(struct xpc_channel *);
714extern void xpc_deliver_msg(struct xpc_channel *);
715extern void xpc_disconnect_channel(const int, struct xpc_channel *,
716 enum xpc_retval, unsigned long *);
717extern void xpc_disconnect_callout(struct xpc_channel *, enum xpc_retval);
718extern void xpc_partition_going_down(struct xpc_partition *, enum xpc_retval);
719extern void xpc_teardown_infrastructure(struct xpc_partition *);
720
721
722
723static inline void
724xpc_wakeup_channel_mgr(struct xpc_partition *part)
725{
726 if (atomic_inc_return(&part->channel_mgr_requests) == 1) {
727 wake_up(&part->channel_mgr_wq);
728 }
729}
730
731
732
733/*
734 * These next two inlines are used to keep us from tearing down a channel's
735 * msg queues while a thread may be referencing them.
736 */
737static inline void
738xpc_msgqueue_ref(struct xpc_channel *ch)
739{
740 atomic_inc(&ch->references);
741}
742
743static inline void
744xpc_msgqueue_deref(struct xpc_channel *ch)
745{
746 s32 refs = atomic_dec_return(&ch->references);
747
748 DBUG_ON(refs < 0);
749 if (refs == 0) {
750 xpc_wakeup_channel_mgr(&xpc_partitions[ch->partid]);
751 }
752}
753
754
755
756#define XPC_DISCONNECT_CHANNEL(_ch, _reason, _irqflgs) \
757 xpc_disconnect_channel(__LINE__, _ch, _reason, _irqflgs)
758
759
760/*
761 * These two inlines are used to keep us from tearing down a partition's
762 * setup infrastructure while a thread may be referencing it.
763 */
764static inline void
765xpc_part_deref(struct xpc_partition *part)
766{
767 s32 refs = atomic_dec_return(&part->references);
768
769
770 DBUG_ON(refs < 0);
771 if (refs == 0 && part->setup_state == XPC_P_WTEARDOWN) {
772 wake_up(&part->teardown_wq);
773 }
774}
775
776static inline int
777xpc_part_ref(struct xpc_partition *part)
778{
779 int setup;
780
781
782 atomic_inc(&part->references);
783 setup = (part->setup_state == XPC_P_SETUP);
784 if (!setup) {
785 xpc_part_deref(part);
786 }
787 return setup;
788}
789
790
791
792/*
793 * The following macro is to be used for the setting of the reason and
794 * reason_line fields in both the struct xpc_channel and struct xpc_partition
795 * structures.
796 */
797#define XPC_SET_REASON(_p, _reason, _line) \
798 { \
799 (_p)->reason = _reason; \
800 (_p)->reason_line = _line; \
801 }
802
803
804
805/*
806 * This next set of inlines are used to keep track of when a partition is
807 * potentially engaged in accessing memory belonging to another partition.
808 */
809
810static inline void
811xpc_mark_partition_engaged(struct xpc_partition *part)
812{
813 unsigned long irq_flags;
814 AMO_t *amo = (AMO_t *) __va(part->remote_amos_page_pa +
815 (XPC_ENGAGED_PARTITIONS_AMO * sizeof(AMO_t)));
816
817
818 local_irq_save(irq_flags);
819
820 /* set bit corresponding to our partid in remote partition's AMO */
821 FETCHOP_STORE_OP(TO_AMO((u64) &amo->variable), FETCHOP_OR,
822 (1UL << sn_partition_id));
823 /*
824 * We must always use the nofault function regardless of whether we
825 * are on a Shub 1.1 system or a Shub 1.2 slice 0xc processor. If we
826 * didn't, we'd never know that the other partition is down and would
827 * keep sending IPIs and AMOs to it until the heartbeat times out.
828 */
829 (void) xp_nofault_PIOR((u64 *) GLOBAL_MMR_ADDR(NASID_GET(&amo->
830 variable), xp_nofault_PIOR_target));
831
832 local_irq_restore(irq_flags);
833}
834
835static inline void
836xpc_mark_partition_disengaged(struct xpc_partition *part)
837{
838 unsigned long irq_flags;
839 AMO_t *amo = (AMO_t *) __va(part->remote_amos_page_pa +
840 (XPC_ENGAGED_PARTITIONS_AMO * sizeof(AMO_t)));
841
842
843 local_irq_save(irq_flags);
844
845 /* clear bit corresponding to our partid in remote partition's AMO */
846 FETCHOP_STORE_OP(TO_AMO((u64) &amo->variable), FETCHOP_AND,
847 ~(1UL << sn_partition_id));
848 /*
849 * We must always use the nofault function regardless of whether we
850 * are on a Shub 1.1 system or a Shub 1.2 slice 0xc processor. If we
851 * didn't, we'd never know that the other partition is down and would
852 * keep sending IPIs and AMOs to it until the heartbeat times out.
853 */
854 (void) xp_nofault_PIOR((u64 *) GLOBAL_MMR_ADDR(NASID_GET(&amo->
855 variable), xp_nofault_PIOR_target));
856
857 local_irq_restore(irq_flags);
858}
859
860static inline void
861xpc_request_partition_disengage(struct xpc_partition *part)
862{
863 unsigned long irq_flags;
864 AMO_t *amo = (AMO_t *) __va(part->remote_amos_page_pa +
865 (XPC_DISENGAGE_REQUEST_AMO * sizeof(AMO_t)));
866
867
868 local_irq_save(irq_flags);
869
870 /* set bit corresponding to our partid in remote partition's AMO */
871 FETCHOP_STORE_OP(TO_AMO((u64) &amo->variable), FETCHOP_OR,
872 (1UL << sn_partition_id));
873 /*
874 * We must always use the nofault function regardless of whether we
875 * are on a Shub 1.1 system or a Shub 1.2 slice 0xc processor. If we
876 * didn't, we'd never know that the other partition is down and would
877 * keep sending IPIs and AMOs to it until the heartbeat times out.
878 */
879 (void) xp_nofault_PIOR((u64 *) GLOBAL_MMR_ADDR(NASID_GET(&amo->
880 variable), xp_nofault_PIOR_target));
881
882 local_irq_restore(irq_flags);
883}
884
885static inline void
886xpc_cancel_partition_disengage_request(struct xpc_partition *part)
887{
888 unsigned long irq_flags;
889 AMO_t *amo = (AMO_t *) __va(part->remote_amos_page_pa +
890 (XPC_DISENGAGE_REQUEST_AMO * sizeof(AMO_t)));
891
892
893 local_irq_save(irq_flags);
894
895 /* clear bit corresponding to our partid in remote partition's AMO */
896 FETCHOP_STORE_OP(TO_AMO((u64) &amo->variable), FETCHOP_AND,
897 ~(1UL << sn_partition_id));
898 /*
899 * We must always use the nofault function regardless of whether we
900 * are on a Shub 1.1 system or a Shub 1.2 slice 0xc processor. If we
901 * didn't, we'd never know that the other partition is down and would
902 * keep sending IPIs and AMOs to it until the heartbeat times out.
903 */
904 (void) xp_nofault_PIOR((u64 *) GLOBAL_MMR_ADDR(NASID_GET(&amo->
905 variable), xp_nofault_PIOR_target));
906
907 local_irq_restore(irq_flags);
908}
909
910static inline u64
911xpc_partition_engaged(u64 partid_mask)
912{
913 AMO_t *amo = xpc_vars->amos_page + XPC_ENGAGED_PARTITIONS_AMO;
914
915
916 /* return our partition's AMO variable ANDed with partid_mask */
917 return (FETCHOP_LOAD_OP(TO_AMO((u64) &amo->variable), FETCHOP_LOAD) &
918 partid_mask);
919}
920
921static inline u64
922xpc_partition_disengage_requested(u64 partid_mask)
923{
924 AMO_t *amo = xpc_vars->amos_page + XPC_DISENGAGE_REQUEST_AMO;
925
926
927 /* return our partition's AMO variable ANDed with partid_mask */
928 return (FETCHOP_LOAD_OP(TO_AMO((u64) &amo->variable), FETCHOP_LOAD) &
929 partid_mask);
930}
931
932static inline void
933xpc_clear_partition_engaged(u64 partid_mask)
934{
935 AMO_t *amo = xpc_vars->amos_page + XPC_ENGAGED_PARTITIONS_AMO;
936
937
938 /* clear bit(s) based on partid_mask in our partition's AMO */
939 FETCHOP_STORE_OP(TO_AMO((u64) &amo->variable), FETCHOP_AND,
940 ~partid_mask);
941}
942
943static inline void
944xpc_clear_partition_disengage_request(u64 partid_mask)
945{
946 AMO_t *amo = xpc_vars->amos_page + XPC_DISENGAGE_REQUEST_AMO;
947
948
949 /* clear bit(s) based on partid_mask in our partition's AMO */
950 FETCHOP_STORE_OP(TO_AMO((u64) &amo->variable), FETCHOP_AND,
951 ~partid_mask);
952}
953
954
955
956/*
957 * The following set of macros and inlines are used for the sending and
958 * receiving of IPIs (also known as IRQs). There are two flavors of IPIs,
959 * one that is associated with partition activity (SGI_XPC_ACTIVATE) and
960 * the other that is associated with channel activity (SGI_XPC_NOTIFY).
961 */
962
963static inline u64
964xpc_IPI_receive(AMO_t *amo)
965{
966 return FETCHOP_LOAD_OP(TO_AMO((u64) &amo->variable), FETCHOP_CLEAR);
967}
968
969
970static inline enum xpc_retval
971xpc_IPI_send(AMO_t *amo, u64 flag, int nasid, int phys_cpuid, int vector)
972{
973 int ret = 0;
974 unsigned long irq_flags;
975
976
977 local_irq_save(irq_flags);
978
979 FETCHOP_STORE_OP(TO_AMO((u64) &amo->variable), FETCHOP_OR, flag);
980 sn_send_IPI_phys(nasid, phys_cpuid, vector, 0);
981
982 /*
983 * We must always use the nofault function regardless of whether we
984 * are on a Shub 1.1 system or a Shub 1.2 slice 0xc processor. If we
985 * didn't, we'd never know that the other partition is down and would
986 * keep sending IPIs and AMOs to it until the heartbeat times out.
987 */
988 ret = xp_nofault_PIOR((u64 *) GLOBAL_MMR_ADDR(NASID_GET(&amo->variable),
989 xp_nofault_PIOR_target));
990
991 local_irq_restore(irq_flags);
992
993 return ((ret == 0) ? xpcSuccess : xpcPioReadError);
994}
995
996
997/*
998 * IPIs associated with SGI_XPC_ACTIVATE IRQ.
999 */
1000
1001/*
1002 * Flag the appropriate AMO variable and send an IPI to the specified node.
1003 */
1004static inline void
1005xpc_activate_IRQ_send(u64 amos_page_pa, int from_nasid, int to_nasid,
1006 int to_phys_cpuid)
1007{
1008 int w_index = XPC_NASID_W_INDEX(from_nasid);
1009 int b_index = XPC_NASID_B_INDEX(from_nasid);
1010 AMO_t *amos = (AMO_t *) __va(amos_page_pa +
1011 (XPC_ACTIVATE_IRQ_AMOS * sizeof(AMO_t)));
1012
1013
1014 (void) xpc_IPI_send(&amos[w_index], (1UL << b_index), to_nasid,
1015 to_phys_cpuid, SGI_XPC_ACTIVATE);
1016}
1017
1018static inline void
1019xpc_IPI_send_activate(struct xpc_vars *vars)
1020{
1021 xpc_activate_IRQ_send(vars->amos_page_pa, cnodeid_to_nasid(0),
1022 vars->act_nasid, vars->act_phys_cpuid);
1023}
1024
1025static inline void
1026xpc_IPI_send_activated(struct xpc_partition *part)
1027{
1028 xpc_activate_IRQ_send(part->remote_amos_page_pa, cnodeid_to_nasid(0),
1029 part->remote_act_nasid, part->remote_act_phys_cpuid);
1030}
1031
1032static inline void
1033xpc_IPI_send_reactivate(struct xpc_partition *part)
1034{
1035 xpc_activate_IRQ_send(xpc_vars->amos_page_pa, part->reactivate_nasid,
1036 xpc_vars->act_nasid, xpc_vars->act_phys_cpuid);
1037}
1038
1039static inline void
1040xpc_IPI_send_disengage(struct xpc_partition *part)
1041{
1042 xpc_activate_IRQ_send(part->remote_amos_page_pa, cnodeid_to_nasid(0),
1043 part->remote_act_nasid, part->remote_act_phys_cpuid);
1044}
1045
1046
1047/*
1048 * IPIs associated with SGI_XPC_NOTIFY IRQ.
1049 */
1050
1051/*
1052 * Send an IPI to the remote partition that is associated with the
1053 * specified channel.
1054 */
1055#define XPC_NOTIFY_IRQ_SEND(_ch, _ipi_f, _irq_f) \
1056 xpc_notify_IRQ_send(_ch, _ipi_f, #_ipi_f, _irq_f)
1057
1058static inline void
1059xpc_notify_IRQ_send(struct xpc_channel *ch, u8 ipi_flag, char *ipi_flag_string,
1060 unsigned long *irq_flags)
1061{
1062 struct xpc_partition *part = &xpc_partitions[ch->partid];
1063 enum xpc_retval ret;
1064
1065
1066 if (likely(part->act_state != XPC_P_DEACTIVATING)) {
1067 ret = xpc_IPI_send(part->remote_IPI_amo_va,
1068 (u64) ipi_flag << (ch->number * 8),
1069 part->remote_IPI_nasid,
1070 part->remote_IPI_phys_cpuid,
1071 SGI_XPC_NOTIFY);
1072 dev_dbg(xpc_chan, "%s sent to partid=%d, channel=%d, ret=%d\n",
1073 ipi_flag_string, ch->partid, ch->number, ret);
1074 if (unlikely(ret != xpcSuccess)) {
1075 if (irq_flags != NULL) {
1076 spin_unlock_irqrestore(&ch->lock, *irq_flags);
1077 }
1078 XPC_DEACTIVATE_PARTITION(part, ret);
1079 if (irq_flags != NULL) {
1080 spin_lock_irqsave(&ch->lock, *irq_flags);
1081 }
1082 }
1083 }
1084}
1085
1086
1087/*
1088 * Make it look like the remote partition, which is associated with the
1089 * specified channel, sent us an IPI. This faked IPI will be handled
1090 * by xpc_dropped_IPI_check().
1091 */
1092#define XPC_NOTIFY_IRQ_SEND_LOCAL(_ch, _ipi_f) \
1093 xpc_notify_IRQ_send_local(_ch, _ipi_f, #_ipi_f)
1094
1095static inline void
1096xpc_notify_IRQ_send_local(struct xpc_channel *ch, u8 ipi_flag,
1097 char *ipi_flag_string)
1098{
1099 struct xpc_partition *part = &xpc_partitions[ch->partid];
1100
1101
1102 FETCHOP_STORE_OP(TO_AMO((u64) &part->local_IPI_amo_va->variable),
1103 FETCHOP_OR, ((u64) ipi_flag << (ch->number * 8)));
1104 dev_dbg(xpc_chan, "%s sent local from partid=%d, channel=%d\n",
1105 ipi_flag_string, ch->partid, ch->number);
1106}
1107
1108
1109/*
1110 * The sending and receiving of IPIs includes the setting of an AMO variable
1111 * to indicate the reason the IPI was sent. The 64-bit variable is divided
1112 * up into eight bytes, ordered from right to left. Byte zero pertains to
1113 * channel 0, byte one to channel 1, and so on. Each byte is described by
1114 * the following IPI flags.
1115 */
1116
1117#define XPC_IPI_CLOSEREQUEST 0x01
1118#define XPC_IPI_CLOSEREPLY 0x02
1119#define XPC_IPI_OPENREQUEST 0x04
1120#define XPC_IPI_OPENREPLY 0x08
1121#define XPC_IPI_MSGREQUEST 0x10
1122
1123
1124/* given an AMO variable and a channel#, get its associated IPI flags */
1125#define XPC_GET_IPI_FLAGS(_amo, _c) ((u8) (((_amo) >> ((_c) * 8)) & 0xff))
1126#define XPC_SET_IPI_FLAGS(_amo, _c, _f) (_amo) |= ((u64) (_f) << ((_c) * 8))
1127
1128#define XPC_ANY_OPENCLOSE_IPI_FLAGS_SET(_amo) ((_amo) & 0x0f0f0f0f0f0f0f0f)
1129#define XPC_ANY_MSG_IPI_FLAGS_SET(_amo) ((_amo) & 0x1010101010101010)
1130
1131
1132static inline void
1133xpc_IPI_send_closerequest(struct xpc_channel *ch, unsigned long *irq_flags)
1134{
1135 struct xpc_openclose_args *args = ch->local_openclose_args;
1136
1137
1138 args->reason = ch->reason;
1139
1140 XPC_NOTIFY_IRQ_SEND(ch, XPC_IPI_CLOSEREQUEST, irq_flags);
1141}
1142
1143static inline void
1144xpc_IPI_send_closereply(struct xpc_channel *ch, unsigned long *irq_flags)
1145{
1146 XPC_NOTIFY_IRQ_SEND(ch, XPC_IPI_CLOSEREPLY, irq_flags);
1147}
1148
1149static inline void
1150xpc_IPI_send_openrequest(struct xpc_channel *ch, unsigned long *irq_flags)
1151{
1152 struct xpc_openclose_args *args = ch->local_openclose_args;
1153
1154
1155 args->msg_size = ch->msg_size;
1156 args->local_nentries = ch->local_nentries;
1157
1158 XPC_NOTIFY_IRQ_SEND(ch, XPC_IPI_OPENREQUEST, irq_flags);
1159}
1160
1161static inline void
1162xpc_IPI_send_openreply(struct xpc_channel *ch, unsigned long *irq_flags)
1163{
1164 struct xpc_openclose_args *args = ch->local_openclose_args;
1165
1166
1167 args->remote_nentries = ch->remote_nentries;
1168 args->local_nentries = ch->local_nentries;
1169 args->local_msgqueue_pa = __pa(ch->local_msgqueue);
1170
1171 XPC_NOTIFY_IRQ_SEND(ch, XPC_IPI_OPENREPLY, irq_flags);
1172}
1173
1174static inline void
1175xpc_IPI_send_msgrequest(struct xpc_channel *ch)
1176{
1177 XPC_NOTIFY_IRQ_SEND(ch, XPC_IPI_MSGREQUEST, NULL);
1178}
1179
1180static inline void
1181xpc_IPI_send_local_msgrequest(struct xpc_channel *ch)
1182{
1183 XPC_NOTIFY_IRQ_SEND_LOCAL(ch, XPC_IPI_MSGREQUEST);
1184}
1185
1186
1187/*
1188 * Memory for XPC's AMO variables is allocated by the MSPEC driver. These
1189 * pages are located in the lowest granule. The lowest granule uses 4k pages
1190 * for cached references and an alternate TLB handler to never provide a
1191 * cacheable mapping for the entire region. This will prevent speculative
1192 * reading of cached copies of our lines from being issued which will cause
1193 * a PI FSB Protocol error to be generated by the SHUB. For XPC, we need 64
1194 * AMO variables (based on XP_MAX_PARTITIONS) for message notification and an
1195 * additional 128 AMO variables (based on XP_NASID_MASK_WORDS) for partition
1196 * activation and 2 AMO variables for partition deactivation.
1197 */
1198static inline AMO_t *
1199xpc_IPI_init(int index)
1200{
1201 AMO_t *amo = xpc_vars->amos_page + index;
1202
1203
1204 (void) xpc_IPI_receive(amo); /* clear AMO variable */
1205 return amo;
1206}
1207
1208
1209
1210static inline enum xpc_retval
1211xpc_map_bte_errors(bte_result_t error)
1212{
1213 switch (error) {
1214 case BTE_SUCCESS: return xpcSuccess;
1215 case BTEFAIL_DIR: return xpcBteDirectoryError;
1216 case BTEFAIL_POISON: return xpcBtePoisonError;
1217 case BTEFAIL_WERR: return xpcBteWriteError;
1218 case BTEFAIL_ACCESS: return xpcBteAccessError;
1219 case BTEFAIL_PWERR: return xpcBtePWriteError;
1220 case BTEFAIL_PRERR: return xpcBtePReadError;
1221 case BTEFAIL_TOUT: return xpcBteTimeOutError;
1222 case BTEFAIL_XTERR: return xpcBteXtalkError;
1223 case BTEFAIL_NOTAVAIL: return xpcBteNotAvailable;
1224 default: return xpcBteUnmappedError;
1225 }
1226}
1227
1228
1229
1230static inline void *
1231xpc_kmalloc_cacheline_aligned(size_t size, gfp_t flags, void **base)
1232{
1233 /* see if kmalloc will give us cachline aligned memory by default */
1234 *base = kmalloc(size, flags);
1235 if (*base == NULL) {
1236 return NULL;
1237 }
1238 if ((u64) *base == L1_CACHE_ALIGN((u64) *base)) {
1239 return *base;
1240 }
1241 kfree(*base);
1242
1243 /* nope, we'll have to do it ourselves */
1244 *base = kmalloc(size + L1_CACHE_BYTES, flags);
1245 if (*base == NULL) {
1246 return NULL;
1247 }
1248 return (void *) L1_CACHE_ALIGN((u64) *base);
1249}
1250
1251
1252/*
1253 * Check to see if there is any channel activity to/from the specified
1254 * partition.
1255 */
1256static inline void
1257xpc_check_for_channel_activity(struct xpc_partition *part)
1258{
1259 u64 IPI_amo;
1260 unsigned long irq_flags;
1261
1262
1263 IPI_amo = xpc_IPI_receive(part->local_IPI_amo_va);
1264 if (IPI_amo == 0) {
1265 return;
1266 }
1267
1268 spin_lock_irqsave(&part->IPI_lock, irq_flags);
1269 part->local_IPI_amo |= IPI_amo;
1270 spin_unlock_irqrestore(&part->IPI_lock, irq_flags);
1271
1272 dev_dbg(xpc_chan, "received IPI from partid=%d, IPI_amo=0x%lx\n",
1273 XPC_PARTID(part), IPI_amo);
1274
1275 xpc_wakeup_channel_mgr(part);
1276}
1277
1278
1279#endif /* _ASM_IA64_SN_XPC_H */
1280
diff --git a/include/asm-ia64/spinlock.h b/include/asm-ia64/spinlock.h
index 0c91a76c5ea3..9e83210dc312 100644
--- a/include/asm-ia64/spinlock.h
+++ b/include/asm-ia64/spinlock.h
@@ -34,7 +34,7 @@ __raw_spin_lock_flags (raw_spinlock_t *lock, unsigned long flags)
34{ 34{
35 register volatile unsigned int *ptr asm ("r31") = &lock->lock; 35 register volatile unsigned int *ptr asm ("r31") = &lock->lock;
36 36
37#if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 3) 37#if (__GNUC__ == 3 && __GNUC_MINOR__ < 3)
38# ifdef CONFIG_ITANIUM 38# ifdef CONFIG_ITANIUM
39 /* don't use brl on Itanium... */ 39 /* don't use brl on Itanium... */
40 asm volatile ("{\n\t" 40 asm volatile ("{\n\t"
diff --git a/include/asm-ia64/system.h b/include/asm-ia64/system.h
index 635235fa1e32..062538715623 100644
--- a/include/asm-ia64/system.h
+++ b/include/asm-ia64/system.h
@@ -219,14 +219,14 @@ extern void ia64_load_extra (struct task_struct *task);
219 219
220#define IA64_HAS_EXTRA_STATE(t) \ 220#define IA64_HAS_EXTRA_STATE(t) \
221 ((t)->thread.flags & (IA64_THREAD_DBG_VALID|IA64_THREAD_PM_VALID) \ 221 ((t)->thread.flags & (IA64_THREAD_DBG_VALID|IA64_THREAD_PM_VALID) \
222 || IS_IA32_PROCESS(ia64_task_regs(t)) || PERFMON_IS_SYSWIDE()) 222 || IS_IA32_PROCESS(task_pt_regs(t)) || PERFMON_IS_SYSWIDE())
223 223
224#define __switch_to(prev,next,last) do { \ 224#define __switch_to(prev,next,last) do { \
225 if (IA64_HAS_EXTRA_STATE(prev)) \ 225 if (IA64_HAS_EXTRA_STATE(prev)) \
226 ia64_save_extra(prev); \ 226 ia64_save_extra(prev); \
227 if (IA64_HAS_EXTRA_STATE(next)) \ 227 if (IA64_HAS_EXTRA_STATE(next)) \
228 ia64_load_extra(next); \ 228 ia64_load_extra(next); \
229 ia64_psr(ia64_task_regs(next))->dfh = !ia64_is_local_fpu_owner(next); \ 229 ia64_psr(task_pt_regs(next))->dfh = !ia64_is_local_fpu_owner(next); \
230 (last) = ia64_switch_to((next)); \ 230 (last) = ia64_switch_to((next)); \
231} while (0) 231} while (0)
232 232
@@ -238,8 +238,8 @@ extern void ia64_load_extra (struct task_struct *task);
238 * the latest fph state from another CPU. In other words: eager save, lazy restore. 238 * the latest fph state from another CPU. In other words: eager save, lazy restore.
239 */ 239 */
240# define switch_to(prev,next,last) do { \ 240# define switch_to(prev,next,last) do { \
241 if (ia64_psr(ia64_task_regs(prev))->mfh && ia64_is_local_fpu_owner(prev)) { \ 241 if (ia64_psr(task_pt_regs(prev))->mfh && ia64_is_local_fpu_owner(prev)) { \
242 ia64_psr(ia64_task_regs(prev))->mfh = 0; \ 242 ia64_psr(task_pt_regs(prev))->mfh = 0; \
243 (prev)->thread.flags |= IA64_THREAD_FPH_VALID; \ 243 (prev)->thread.flags |= IA64_THREAD_FPH_VALID; \
244 __ia64_save_fpu((prev)->thread.fph); \ 244 __ia64_save_fpu((prev)->thread.fph); \
245 } \ 245 } \
@@ -249,36 +249,12 @@ extern void ia64_load_extra (struct task_struct *task);
249# define switch_to(prev,next,last) __switch_to(prev, next, last) 249# define switch_to(prev,next,last) __switch_to(prev, next, last)
250#endif 250#endif
251 251
252/*
253 * On IA-64, we don't want to hold the runqueue's lock during the low-level context-switch,
254 * because that could cause a deadlock. Here is an example by Erich Focht:
255 *
256 * Example:
257 * CPU#0:
258 * schedule()
259 * -> spin_lock_irq(&rq->lock)
260 * -> context_switch()
261 * -> wrap_mmu_context()
262 * -> read_lock(&tasklist_lock)
263 *
264 * CPU#1:
265 * sys_wait4() or release_task() or forget_original_parent()
266 * -> write_lock(&tasklist_lock)
267 * -> do_notify_parent()
268 * -> wake_up_parent()
269 * -> try_to_wake_up()
270 * -> spin_lock_irq(&parent_rq->lock)
271 *
272 * If the parent's rq happens to be on CPU#0, we'll wait for the rq->lock
273 * of that CPU which will not be released, because there we wait for the
274 * tasklist_lock to become available.
275 */
276#define __ARCH_WANT_UNLOCKED_CTXSW 252#define __ARCH_WANT_UNLOCKED_CTXSW
277
278#define ARCH_HAS_PREFETCH_SWITCH_STACK 253#define ARCH_HAS_PREFETCH_SWITCH_STACK
279#define ia64_platform_is(x) (strcmp(x, platform_name) == 0) 254#define ia64_platform_is(x) (strcmp(x, platform_name) == 0)
280 255
281void cpu_idle_wait(void); 256void cpu_idle_wait(void);
257void sched_cacheflush(void);
282 258
283#define arch_align_stack(x) (x) 259#define arch_align_stack(x) (x)
284 260
diff --git a/include/asm-ia64/thread_info.h b/include/asm-ia64/thread_info.h
index 171b2207bde4..1d6518fe1f02 100644
--- a/include/asm-ia64/thread_info.h
+++ b/include/asm-ia64/thread_info.h
@@ -57,11 +57,20 @@ struct thread_info {
57/* how to get the thread information struct from C */ 57/* how to get the thread information struct from C */
58#define current_thread_info() ((struct thread_info *) ((char *) current + IA64_TASK_SIZE)) 58#define current_thread_info() ((struct thread_info *) ((char *) current + IA64_TASK_SIZE))
59#define alloc_thread_info(tsk) ((struct thread_info *) ((char *) (tsk) + IA64_TASK_SIZE)) 59#define alloc_thread_info(tsk) ((struct thread_info *) ((char *) (tsk) + IA64_TASK_SIZE))
60#define task_thread_info(tsk) ((struct thread_info *) ((char *) (tsk) + IA64_TASK_SIZE))
60#else 61#else
61#define current_thread_info() ((struct thread_info *) 0) 62#define current_thread_info() ((struct thread_info *) 0)
62#define alloc_thread_info(tsk) ((struct thread_info *) 0) 63#define alloc_thread_info(tsk) ((struct thread_info *) 0)
64#define task_thread_info(tsk) ((struct thread_info *) 0)
63#endif 65#endif
64#define free_thread_info(ti) /* nothing */ 66#define free_thread_info(ti) /* nothing */
67#define task_stack_page(tsk) ((void *)(tsk))
68
69#define __HAVE_THREAD_FUNCTIONS
70#define setup_thread_stack(p, org) \
71 *task_thread_info(p) = *task_thread_info(org); \
72 task_thread_info(p)->task = (p);
73#define end_of_stack(p) (unsigned long *)((void *)(p) + IA64_RBS_OFFSET)
65 74
66#define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR 75#define __HAVE_ARCH_TASK_STRUCT_ALLOCATOR
67#define alloc_task_struct() ((task_t *)__get_free_pages(GFP_KERNEL, KERNEL_STACK_SIZE_ORDER)) 76#define alloc_task_struct() ((task_t *)__get_free_pages(GFP_KERNEL, KERNEL_STACK_SIZE_ORDER))
@@ -84,6 +93,7 @@ struct thread_info {
84#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ 93#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */
85#define TIF_MEMDIE 17 94#define TIF_MEMDIE 17
86#define TIF_MCA_INIT 18 /* this task is processing MCA or INIT */ 95#define TIF_MCA_INIT 18 /* this task is processing MCA or INIT */
96#define TIF_DB_DISABLED 19 /* debug trap disabled for fsyscall */
87 97
88#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) 98#define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE)
89#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) 99#define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT)
@@ -91,9 +101,10 @@ struct thread_info {
91#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) 101#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)
92#define _TIF_SIGPENDING (1 << TIF_SIGPENDING) 102#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
93#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) 103#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
94#define _TIF_SIGDELAYED (1 << TIF_SIGDELAYED) 104#define _TIF_SIGDELAYED (1 << TIF_SIGDELAYED)
95#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) 105#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
96#define _TIF_MCA_INIT (1 << TIF_MCA_INIT) 106#define _TIF_MCA_INIT (1 << TIF_MCA_INIT)
107#define _TIF_DB_DISABLED (1 << TIF_DB_DISABLED)
97 108
98/* "work to do on user-return" bits */ 109/* "work to do on user-return" bits */
99#define TIF_ALLWORK_MASK (_TIF_NOTIFY_RESUME|_TIF_SIGPENDING|_TIF_NEED_RESCHED|_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SIGDELAYED) 110#define TIF_ALLWORK_MASK (_TIF_NOTIFY_RESUME|_TIF_SIGPENDING|_TIF_NEED_RESCHED|_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SIGDELAYED)
diff --git a/include/asm-ia64/timex.h b/include/asm-ia64/timex.h
index 414aae060440..05a6baf8a472 100644
--- a/include/asm-ia64/timex.h
+++ b/include/asm-ia64/timex.h
@@ -15,6 +15,8 @@
15 15
16typedef unsigned long cycles_t; 16typedef unsigned long cycles_t;
17 17
18extern void (*ia64_udelay)(unsigned long usecs);
19
18/* 20/*
19 * For performance reasons, we don't want to define CLOCK_TICK_TRATE as 21 * For performance reasons, we don't want to define CLOCK_TICK_TRATE as
20 * local_cpu_data->itc_rate. Fortunately, we don't have to, either: according to George 22 * local_cpu_data->itc_rate. Fortunately, we don't have to, either: according to George
diff --git a/include/asm-ia64/topology.h b/include/asm-ia64/topology.h
index f7c330467e7e..3ee19dfa46df 100644
--- a/include/asm-ia64/topology.h
+++ b/include/asm-ia64/topology.h
@@ -18,6 +18,10 @@
18#include <asm/smp.h> 18#include <asm/smp.h>
19 19
20#ifdef CONFIG_NUMA 20#ifdef CONFIG_NUMA
21
22/* Nodes w/o CPUs are preferred for memory allocations, see build_zonelists */
23#define PENALTY_FOR_NODE_WITH_CPUS 255
24
21/* 25/*
22 * Returns the number of the node containing CPU 'cpu' 26 * Returns the number of the node containing CPU 'cpu'
23 */ 27 */
@@ -55,7 +59,6 @@ void build_cpu_to_node_map(void);
55 .max_interval = 4, \ 59 .max_interval = 4, \
56 .busy_factor = 64, \ 60 .busy_factor = 64, \
57 .imbalance_pct = 125, \ 61 .imbalance_pct = 125, \
58 .cache_hot_time = (10*1000000), \
59 .per_cpu_gain = 100, \ 62 .per_cpu_gain = 100, \
60 .cache_nice_tries = 2, \ 63 .cache_nice_tries = 2, \
61 .busy_idx = 2, \ 64 .busy_idx = 2, \
@@ -81,7 +84,6 @@ void build_cpu_to_node_map(void);
81 .max_interval = 8*(min(num_online_cpus(), 32)), \ 84 .max_interval = 8*(min(num_online_cpus(), 32)), \
82 .busy_factor = 64, \ 85 .busy_factor = 64, \
83 .imbalance_pct = 125, \ 86 .imbalance_pct = 125, \
84 .cache_hot_time = (10*1000000), \
85 .cache_nice_tries = 2, \ 87 .cache_nice_tries = 2, \
86 .busy_idx = 3, \ 88 .busy_idx = 3, \
87 .idle_idx = 2, \ 89 .idle_idx = 2, \
@@ -100,6 +102,13 @@ void build_cpu_to_node_map(void);
100 102
101#endif /* CONFIG_NUMA */ 103#endif /* CONFIG_NUMA */
102 104
105#ifdef CONFIG_SMP
106#define topology_physical_package_id(cpu) (cpu_data(cpu)->socket_id)
107#define topology_core_id(cpu) (cpu_data(cpu)->core_id)
108#define topology_core_siblings(cpu) (cpu_core_map[cpu])
109#define topology_thread_siblings(cpu) (cpu_sibling_map[cpu])
110#endif
111
103#include <asm-generic/topology.h> 112#include <asm-generic/topology.h>
104 113
105#endif /* _ASM_IA64_TOPOLOGY_H */ 114#endif /* _ASM_IA64_TOPOLOGY_H */
diff --git a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h
index 6d96a67439be..019956c613e4 100644
--- a/include/asm-ia64/unistd.h
+++ b/include/asm-ia64/unistd.h
@@ -265,16 +265,32 @@
265#define __NR_keyctl 1273 265#define __NR_keyctl 1273
266#define __NR_ioprio_set 1274 266#define __NR_ioprio_set 1274
267#define __NR_ioprio_get 1275 267#define __NR_ioprio_get 1275
268#define __NR_set_zone_reclaim 1276 268/* 1276 is available for reuse (was briefly sys_set_zone_reclaim) */
269#define __NR_inotify_init 1277 269#define __NR_inotify_init 1277
270#define __NR_inotify_add_watch 1278 270#define __NR_inotify_add_watch 1278
271#define __NR_inotify_rm_watch 1279 271#define __NR_inotify_rm_watch 1279
272#define __NR_migrate_pages 1280
273#define __NR_openat 1281
274#define __NR_mkdirat 1282
275#define __NR_mknodat 1283
276#define __NR_fchownat 1284
277#define __NR_futimesat 1285
278#define __NR_newfstatat 1286
279#define __NR_unlinkat 1287
280#define __NR_renameat 1288
281#define __NR_linkat 1289
282#define __NR_symlinkat 1290
283#define __NR_readlinkat 1291
284#define __NR_fchmodat 1292
285#define __NR_faccessat 1293
286/* 1294, 1295 reserved for pselect/ppoll */
287#define __NR_unshare 1296
272 288
273#ifdef __KERNEL__ 289#ifdef __KERNEL__
274 290
275#include <linux/config.h> 291#include <linux/config.h>
276 292
277#define NR_syscalls 256 /* length of syscall table */ 293#define NR_syscalls 273 /* length of syscall table */
278 294
279#define __ARCH_WANT_SYS_RT_SIGACTION 295#define __ARCH_WANT_SYS_RT_SIGACTION
280 296