diff options
author | Tony Luck <tony.luck@intel.com> | 2005-06-15 17:06:48 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-06-15 17:06:48 -0400 |
commit | f2cbb4f01936a3e4225692e03b084b78c56d386d (patch) | |
tree | f89f3d8baa250589a38a4dd2df56f84cddae3c76 /include | |
parent | 325a479c4c110db278ef3361460a48c4093252cc (diff) | |
parent | 1016888fb69662936b32ab767c7419a3be9a69d3 (diff) |
Auto merge with /home/aegl/GIT/linus
Diffstat (limited to 'include')
180 files changed, 3457 insertions, 2963 deletions
diff --git a/include/asm-alpha/agp.h b/include/asm-alpha/agp.h index c99dbbb5bcb5..ef855a3bc0f5 100644 --- a/include/asm-alpha/agp.h +++ b/include/asm-alpha/agp.h | |||
@@ -10,4 +10,14 @@ | |||
10 | #define flush_agp_mappings() | 10 | #define flush_agp_mappings() |
11 | #define flush_agp_cache() mb() | 11 | #define flush_agp_cache() mb() |
12 | 12 | ||
13 | /* Convert a physical address to an address suitable for the GART. */ | ||
14 | #define phys_to_gart(x) (x) | ||
15 | #define gart_to_phys(x) (x) | ||
16 | |||
17 | /* GATT allocation. Returns/accepts GATT kernel virtual address. */ | ||
18 | #define alloc_gatt_pages(order) \ | ||
19 | ((char *)__get_free_pages(GFP_KERNEL, (order))) | ||
20 | #define free_gatt_pages(table, order) \ | ||
21 | free_pages((unsigned long)(table), (order)) | ||
22 | |||
13 | #endif | 23 | #endif |
diff --git a/include/asm-alpha/signal.h b/include/asm-alpha/signal.h index 4e0842b415aa..1a2c52a056fb 100644 --- a/include/asm-alpha/signal.h +++ b/include/asm-alpha/signal.h | |||
@@ -113,16 +113,7 @@ typedef unsigned long sigset_t; | |||
113 | #define SIG_UNBLOCK 2 /* for unblocking signals */ | 113 | #define SIG_UNBLOCK 2 /* for unblocking signals */ |
114 | #define SIG_SETMASK 3 /* for setting the signal mask */ | 114 | #define SIG_SETMASK 3 /* for setting the signal mask */ |
115 | 115 | ||
116 | /* Type of a signal handler. */ | 116 | #include <asm-generic/signal.h> |
117 | typedef void __signalfn_t(int); | ||
118 | typedef __signalfn_t __user *__sighandler_t; | ||
119 | |||
120 | typedef void __restorefn_t(void); | ||
121 | typedef __restorefn_t __user *__sigrestore_t; | ||
122 | |||
123 | #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ | ||
124 | #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ | ||
125 | #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ | ||
126 | 117 | ||
127 | #ifdef __KERNEL__ | 118 | #ifdef __KERNEL__ |
128 | struct osf_sigaction { | 119 | struct osf_sigaction { |
diff --git a/include/asm-arm/arch-imx/imx-regs.h b/include/asm-arm/arch-imx/imx-regs.h index f32c203952cf..93b840e8fa60 100644 --- a/include/asm-arm/arch-imx/imx-regs.h +++ b/include/asm-arm/arch-imx/imx-regs.h | |||
@@ -228,6 +228,30 @@ | |||
228 | #define PD31_BIN_SPI2_TXD ( GPIO_PORTD | GPIO_BIN | 31 ) | 228 | #define PD31_BIN_SPI2_TXD ( GPIO_PORTD | GPIO_BIN | 31 ) |
229 | 229 | ||
230 | /* | 230 | /* |
231 | * PWM controller | ||
232 | */ | ||
233 | #define PWMC __REG(IMX_PWM_BASE + 0x00) /* PWM Control Register */ | ||
234 | #define PWMS __REG(IMX_PWM_BASE + 0x04) /* PWM Sample Register */ | ||
235 | #define PWMP __REG(IMX_PWM_BASE + 0x08) /* PWM Period Register */ | ||
236 | #define PWMCNT __REG(IMX_PWM_BASE + 0x0C) /* PWM Counter Register */ | ||
237 | |||
238 | #define PWMC_HCTR (0x01<<18) /* Halfword FIFO Data Swapping */ | ||
239 | #define PWMC_BCTR (0x01<<17) /* Byte FIFO Data Swapping */ | ||
240 | #define PWMC_SWR (0x01<<16) /* Software Reset */ | ||
241 | #define PWMC_CLKSRC (0x01<<15) /* Clock Source */ | ||
242 | #define PWMC_PRESCALER(x) (((x-1) & 0x7F) << 8) /* PRESCALER */ | ||
243 | #define PWMC_IRQ (0x01<< 7) /* Interrupt Request */ | ||
244 | #define PWMC_IRQEN (0x01<< 6) /* Interrupt Request Enable */ | ||
245 | #define PWMC_FIFOAV (0x01<< 5) /* FIFO Available */ | ||
246 | #define PWMC_EN (0x01<< 4) /* Enables/Disables the PWM */ | ||
247 | #define PWMC_REPEAT(x) (((x) & 0x03) << 2) /* Sample Repeats */ | ||
248 | #define PWMC_CLKSEL(x) (((x) & 0x03) << 0) /* Clock Selection */ | ||
249 | |||
250 | #define PWMS_SAMPLE(x) ((x) & 0xFFFF) /* Contains a two-sample word */ | ||
251 | #define PWMP_PERIOD(x) ((x) & 0xFFFF) /* Represents the PWM's period */ | ||
252 | #define PWMC_COUNTER(x) ((x) & 0xFFFF) /* Represents the current count value */ | ||
253 | |||
254 | /* | ||
231 | * DMA Controller | 255 | * DMA Controller |
232 | */ | 256 | */ |
233 | #define DCR __REG(IMX_DMAC_BASE +0x00) /* DMA Control Register */ | 257 | #define DCR __REG(IMX_DMAC_BASE +0x00) /* DMA Control Register */ |
diff --git a/include/asm-arm/arch-imx/imxfb.h b/include/asm-arm/arch-imx/imxfb.h new file mode 100644 index 000000000000..2346d454ab9c --- /dev/null +++ b/include/asm-arm/arch-imx/imxfb.h | |||
@@ -0,0 +1,35 @@ | |||
1 | /* | ||
2 | * This structure describes the machine which we are running on. | ||
3 | */ | ||
4 | struct imxfb_mach_info { | ||
5 | u_long pixclock; | ||
6 | |||
7 | u_short xres; | ||
8 | u_short yres; | ||
9 | |||
10 | u_char bpp; | ||
11 | u_char hsync_len; | ||
12 | u_char left_margin; | ||
13 | u_char right_margin; | ||
14 | |||
15 | u_char vsync_len; | ||
16 | u_char upper_margin; | ||
17 | u_char lower_margin; | ||
18 | u_char sync; | ||
19 | |||
20 | u_int cmap_greyscale:1, | ||
21 | cmap_inverse:1, | ||
22 | cmap_static:1, | ||
23 | unused:29; | ||
24 | |||
25 | u_int pcr; | ||
26 | u_int pwmr; | ||
27 | u_int lscr1; | ||
28 | |||
29 | u_char * fixed_screen_cpu; | ||
30 | dma_addr_t fixed_screen_dma; | ||
31 | |||
32 | void (*lcd_power)(int); | ||
33 | void (*backlight_power)(int); | ||
34 | }; | ||
35 | void set_imx_fb_info(struct imxfb_mach_info *hard_imx_fb_info); | ||
diff --git a/include/asm-arm/arch-ixp2000/io.h b/include/asm-arm/arch-ixp2000/io.h index a8e3c2daefd6..083462668e18 100644 --- a/include/asm-arm/arch-ixp2000/io.h +++ b/include/asm-arm/arch-ixp2000/io.h | |||
@@ -75,8 +75,8 @@ static inline void insw(u32 ptr, void *buf, int length) | |||
75 | * Is this cycle meant for the CS8900? | 75 | * Is this cycle meant for the CS8900? |
76 | */ | 76 | */ |
77 | if ((machine_is_ixdp2401() || machine_is_ixdp2801()) && | 77 | if ((machine_is_ixdp2401() || machine_is_ixdp2801()) && |
78 | ((port >= IXDP2X01_CS8900_VIRT_BASE) && | 78 | (((u32)port >= (u32)IXDP2X01_CS8900_VIRT_BASE) && |
79 | (port <= IXDP2X01_CS8900_VIRT_END))) { | 79 | ((u32)port <= (u32)IXDP2X01_CS8900_VIRT_END))) { |
80 | u8 *buf8 = (u8*)buf; | 80 | u8 *buf8 = (u8*)buf; |
81 | register u32 tmp32; | 81 | register u32 tmp32; |
82 | 82 | ||
@@ -100,8 +100,8 @@ static inline void outsw(u32 ptr, void *buf, int length) | |||
100 | * Is this cycle meant for the CS8900? | 100 | * Is this cycle meant for the CS8900? |
101 | */ | 101 | */ |
102 | if ((machine_is_ixdp2401() || machine_is_ixdp2801()) && | 102 | if ((machine_is_ixdp2401() || machine_is_ixdp2801()) && |
103 | ((port >= IXDP2X01_CS8900_VIRT_BASE) && | 103 | (((u32)port >= (u32)IXDP2X01_CS8900_VIRT_BASE) && |
104 | (port <= IXDP2X01_CS8900_VIRT_END))) { | 104 | ((u32)port <= (u32)IXDP2X01_CS8900_VIRT_END))) { |
105 | register u32 tmp32; | 105 | register u32 tmp32; |
106 | u8 *buf8 = (u8*)buf; | 106 | u8 *buf8 = (u8*)buf; |
107 | do { | 107 | do { |
@@ -124,8 +124,8 @@ static inline u16 inw(u32 ptr) | |||
124 | * Is this cycle meant for the CS8900? | 124 | * Is this cycle meant for the CS8900? |
125 | */ | 125 | */ |
126 | if ((machine_is_ixdp2401() || machine_is_ixdp2801()) && | 126 | if ((machine_is_ixdp2401() || machine_is_ixdp2801()) && |
127 | ((port >= IXDP2X01_CS8900_VIRT_BASE) && | 127 | (((u32)port >= (u32)IXDP2X01_CS8900_VIRT_BASE) && |
128 | (port <= IXDP2X01_CS8900_VIRT_END))) { | 128 | ((u32)port <= (u32)IXDP2X01_CS8900_VIRT_END))) { |
129 | return (u16)(*port); | 129 | return (u16)(*port); |
130 | } | 130 | } |
131 | 131 | ||
@@ -137,8 +137,8 @@ static inline void outw(u16 value, u32 ptr) | |||
137 | register volatile u32 *port = (volatile u32 *)ptr; | 137 | register volatile u32 *port = (volatile u32 *)ptr; |
138 | 138 | ||
139 | if ((machine_is_ixdp2401() || machine_is_ixdp2801()) && | 139 | if ((machine_is_ixdp2401() || machine_is_ixdp2801()) && |
140 | ((port >= IXDP2X01_CS8900_VIRT_BASE) && | 140 | (((u32)port >= (u32)IXDP2X01_CS8900_VIRT_BASE) && |
141 | (port <= IXDP2X01_CS8900_VIRT_END))) { | 141 | ((u32)port <= (u32)IXDP2X01_CS8900_VIRT_END))) { |
142 | *port = value; | 142 | *port = value; |
143 | return; | 143 | return; |
144 | } | 144 | } |
diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h index 39741d3c9a34..b5e54a9e9fa7 100644 --- a/include/asm-arm/arch-pxa/pxa-regs.h +++ b/include/asm-arm/arch-pxa/pxa-regs.h | |||
@@ -1296,6 +1296,7 @@ | |||
1296 | #define GPIO111_MMCDAT3 111 /* MMC DAT3 (PXA27x) */ | 1296 | #define GPIO111_MMCDAT3 111 /* MMC DAT3 (PXA27x) */ |
1297 | #define GPIO111_MMCCS1 111 /* MMC Chip Select 1 (PXA27x) */ | 1297 | #define GPIO111_MMCCS1 111 /* MMC Chip Select 1 (PXA27x) */ |
1298 | #define GPIO112_MMCCMD 112 /* MMC CMD (PXA27x) */ | 1298 | #define GPIO112_MMCCMD 112 /* MMC CMD (PXA27x) */ |
1299 | #define GPIO113_I2S_SYSCLK 113 /* I2S System Clock (PXA27x) */ | ||
1299 | #define GPIO113_AC97_RESET_N 113 /* AC97 NRESET on (PXA27x) */ | 1300 | #define GPIO113_AC97_RESET_N 113 /* AC97 NRESET on (PXA27x) */ |
1300 | 1301 | ||
1301 | /* GPIO alternate function mode & direction */ | 1302 | /* GPIO alternate function mode & direction */ |
@@ -1428,6 +1429,7 @@ | |||
1428 | #define GPIO111_MMCDAT3_MD (111 | GPIO_ALT_FN_1_OUT) | 1429 | #define GPIO111_MMCDAT3_MD (111 | GPIO_ALT_FN_1_OUT) |
1429 | #define GPIO110_MMCCS1_MD (111 | GPIO_ALT_FN_1_OUT) | 1430 | #define GPIO110_MMCCS1_MD (111 | GPIO_ALT_FN_1_OUT) |
1430 | #define GPIO112_MMCCMD_MD (112 | GPIO_ALT_FN_1_OUT) | 1431 | #define GPIO112_MMCCMD_MD (112 | GPIO_ALT_FN_1_OUT) |
1432 | #define GPIO113_I2S_SYSCLK_MD (113 | GPIO_ALT_FN_1_OUT) | ||
1431 | #define GPIO113_AC97_RESET_N_MD (113 | GPIO_ALT_FN_2_OUT) | 1433 | #define GPIO113_AC97_RESET_N_MD (113 | GPIO_ALT_FN_2_OUT) |
1432 | #define GPIO117_I2CSCL_MD (117 | GPIO_ALT_FN_1_OUT) | 1434 | #define GPIO117_I2CSCL_MD (117 | GPIO_ALT_FN_1_OUT) |
1433 | #define GPIO118_I2CSDA_MD (118 | GPIO_ALT_FN_1_IN) | 1435 | #define GPIO118_I2CSDA_MD (118 | GPIO_ALT_FN_1_IN) |
diff --git a/include/asm-arm/arch-s3c2410/regs-nand.h b/include/asm-arm/arch-s3c2410/regs-nand.h index c443ac834698..7cff235e667a 100644 --- a/include/asm-arm/arch-s3c2410/regs-nand.h +++ b/include/asm-arm/arch-s3c2410/regs-nand.h | |||
@@ -1,16 +1,17 @@ | |||
1 | /* linux/include/asm-arm/arch-s3c2410/regs-nand.h | 1 | /* linux/include/asm-arm/arch-s3c2410/regs-nand.h |
2 | * | 2 | * |
3 | * Copyright (c) 2004 Simtec Electronics <linux@simtec.co.uk> | 3 | * Copyright (c) 2004,2005 Simtec Electronics <linux@simtec.co.uk> |
4 | * http://www.simtec.co.uk/products/SWLINUX/ | 4 | * http://www.simtec.co.uk/products/SWLINUX/ |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. | 8 | * published by the Free Software Foundation. |
9 | * | 9 | * |
10 | * S3C2410 clock register definitions | 10 | * S3C2410 NAND register definitions |
11 | * | 11 | * |
12 | * Changelog: | 12 | * Changelog: |
13 | * 18-Aug-2004 BJD Copied file from 2.4 and updated | 13 | * 18-Aug-2004 BJD Copied file from 2.4 and updated |
14 | * 01-May-2005 BJD Added definitions for s3c2440 controller | ||
14 | */ | 15 | */ |
15 | 16 | ||
16 | #ifndef __ASM_ARM_REGS_NAND | 17 | #ifndef __ASM_ARM_REGS_NAND |
@@ -26,6 +27,22 @@ | |||
26 | #define S3C2410_NFSTAT S3C2410_NFREG(0x10) | 27 | #define S3C2410_NFSTAT S3C2410_NFREG(0x10) |
27 | #define S3C2410_NFECC S3C2410_NFREG(0x14) | 28 | #define S3C2410_NFECC S3C2410_NFREG(0x14) |
28 | 29 | ||
30 | #define S3C2440_NFCONT S3C2410_NFREG(0x04) | ||
31 | #define S3C2440_NFCMD S3C2410_NFREG(0x08) | ||
32 | #define S3C2440_NFADDR S3C2410_NFREG(0x0C) | ||
33 | #define S3C2440_NFDATA S3C2410_NFREG(0x10) | ||
34 | #define S3C2440_NFECCD0 S3C2410_NFREG(0x14) | ||
35 | #define S3C2440_NFECCD1 S3C2410_NFREG(0x18) | ||
36 | #define S3C2440_NFECCD S3C2410_NFREG(0x1C) | ||
37 | #define S3C2440_NFSTAT S3C2410_NFREG(0x20) | ||
38 | #define S3C2440_NFESTAT0 S3C2410_NFREG(0x24) | ||
39 | #define S3C2440_NFESTAT1 S3C2410_NFREG(0x28) | ||
40 | #define S3C2440_NFMECC0 S3C2410_NFREG(0x2C) | ||
41 | #define S3C2440_NFMECC1 S3C2410_NFREG(0x30) | ||
42 | #define S3C2440_NFSECC S3C2410_NFREG(0x34) | ||
43 | #define S3C2440_NFSBLK S3C2410_NFREG(0x38) | ||
44 | #define S3C2440_NFEBLK S3C2410_NFREG(0x3C) | ||
45 | |||
29 | #define S3C2410_NFCONF_EN (1<<15) | 46 | #define S3C2410_NFCONF_EN (1<<15) |
30 | #define S3C2410_NFCONF_512BYTE (1<<14) | 47 | #define S3C2410_NFCONF_512BYTE (1<<14) |
31 | #define S3C2410_NFCONF_4STEP (1<<13) | 48 | #define S3C2410_NFCONF_4STEP (1<<13) |
@@ -37,7 +54,28 @@ | |||
37 | 54 | ||
38 | #define S3C2410_NFSTAT_BUSY (1<<0) | 55 | #define S3C2410_NFSTAT_BUSY (1<<0) |
39 | 56 | ||
40 | /* think ECC can only be 8bit read? */ | 57 | #define S3C2440_NFCONF_BUSWIDTH_8 (0<<0) |
58 | #define S3C2440_NFCONF_BUSWIDTH_16 (1<<0) | ||
59 | #define S3C2440_NFCONF_ADVFLASH (1<<3) | ||
60 | #define S3C2440_NFCONF_TACLS(x) ((x)<<12) | ||
61 | #define S3C2440_NFCONF_TWRPH0(x) ((x)<<8) | ||
62 | #define S3C2440_NFCONF_TWRPH1(x) ((x)<<4) | ||
63 | |||
64 | #define S3C2440_NFCONT_LOCKTIGHT (1<<13) | ||
65 | #define S3C2440_NFCONT_SOFTLOCK (1<<12) | ||
66 | #define S3C2440_NFCONT_ILLEGALACC_EN (1<<10) | ||
67 | #define S3C2440_NFCONT_RNBINT_EN (1<<9) | ||
68 | #define S3C2440_NFCONT_RN_FALLING (1<<8) | ||
69 | #define S3C2440_NFCONT_SPARE_ECCLOCK (1<<6) | ||
70 | #define S3C2440_NFCONT_MAIN_ECCLOCK (1<<5) | ||
71 | #define S3C2440_NFCONT_INITECC (1<<4) | ||
72 | #define S3C2440_NFCONT_nFCE (1<<1) | ||
73 | #define S3C2440_NFCONT_ENABLE (1<<0) | ||
74 | |||
75 | #define S3C2440_NFSTAT_READY (1<<0) | ||
76 | #define S3C2440_NFSTAT_nCE (1<<1) | ||
77 | #define S3C2440_NFSTAT_RnB_CHANGE (1<<2) | ||
78 | #define S3C2440_NFSTAT_ILLEGAL_ACCESS (1<<3) | ||
41 | 79 | ||
42 | #endif /* __ASM_ARM_REGS_NAND */ | 80 | #endif /* __ASM_ARM_REGS_NAND */ |
43 | 81 | ||
diff --git a/include/asm-arm/elf.h b/include/asm-arm/elf.h index cbceacbe5afa..a1696ba238d3 100644 --- a/include/asm-arm/elf.h +++ b/include/asm-arm/elf.h | |||
@@ -38,9 +38,9 @@ typedef struct user_fp elf_fpregset_t; | |||
38 | */ | 38 | */ |
39 | #define ELF_CLASS ELFCLASS32 | 39 | #define ELF_CLASS ELFCLASS32 |
40 | #ifdef __ARMEB__ | 40 | #ifdef __ARMEB__ |
41 | #define ELF_DATA ELFDATA2MSB; | 41 | #define ELF_DATA ELFDATA2MSB |
42 | #else | 42 | #else |
43 | #define ELF_DATA ELFDATA2LSB; | 43 | #define ELF_DATA ELFDATA2LSB |
44 | #endif | 44 | #endif |
45 | #define ELF_ARCH EM_ARM | 45 | #define ELF_ARCH EM_ARM |
46 | 46 | ||
diff --git a/include/asm-arm/page.h b/include/asm-arm/page.h index 4ca3a8e9348f..019c45d75730 100644 --- a/include/asm-arm/page.h +++ b/include/asm-arm/page.h | |||
@@ -114,19 +114,8 @@ extern void __cpu_copy_user_page(void *to, const void *from, | |||
114 | unsigned long user); | 114 | unsigned long user); |
115 | #endif | 115 | #endif |
116 | 116 | ||
117 | #define clear_user_page(addr,vaddr,pg) \ | 117 | #define clear_user_page(addr,vaddr,pg) __cpu_clear_user_page(addr, vaddr) |
118 | do { \ | 118 | #define copy_user_page(to,from,vaddr,pg) __cpu_copy_user_page(to, from, vaddr) |
119 | preempt_disable(); \ | ||
120 | __cpu_clear_user_page(addr, vaddr); \ | ||
121 | preempt_enable(); \ | ||
122 | } while (0) | ||
123 | |||
124 | #define copy_user_page(to,from,vaddr,pg) \ | ||
125 | do { \ | ||
126 | preempt_disable(); \ | ||
127 | __cpu_copy_user_page(to, from, vaddr); \ | ||
128 | preempt_enable(); \ | ||
129 | } while (0) | ||
130 | 119 | ||
131 | #define clear_page(page) memzero((void *)(page), PAGE_SIZE) | 120 | #define clear_page(page) memzero((void *)(page), PAGE_SIZE) |
132 | extern void copy_page(void *to, const void *from); | 121 | extern void copy_page(void *to, const void *from); |
@@ -171,6 +160,9 @@ typedef unsigned long pgprot_t; | |||
171 | 160 | ||
172 | #endif /* STRICT_MM_TYPECHECKS */ | 161 | #endif /* STRICT_MM_TYPECHECKS */ |
173 | 162 | ||
163 | /* the upper-most page table pointer */ | ||
164 | extern pmd_t *top_pmd; | ||
165 | |||
174 | /* Pure 2^n version of get_order */ | 166 | /* Pure 2^n version of get_order */ |
175 | static inline int get_order(unsigned long size) | 167 | static inline int get_order(unsigned long size) |
176 | { | 168 | { |
diff --git a/include/asm-arm/processor.h b/include/asm-arm/processor.h index 4a9845997a75..7d4118e09054 100644 --- a/include/asm-arm/processor.h +++ b/include/asm-arm/processor.h | |||
@@ -23,8 +23,6 @@ | |||
23 | #include <asm/procinfo.h> | 23 | #include <asm/procinfo.h> |
24 | #include <asm/types.h> | 24 | #include <asm/types.h> |
25 | 25 | ||
26 | #define KERNEL_STACK_SIZE PAGE_SIZE | ||
27 | |||
28 | union debug_insn { | 26 | union debug_insn { |
29 | u32 arm; | 27 | u32 arm; |
30 | u16 thumb; | 28 | u16 thumb; |
@@ -87,8 +85,9 @@ unsigned long get_wchan(struct task_struct *p); | |||
87 | */ | 85 | */ |
88 | extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); | 86 | extern int kernel_thread(int (*fn)(void *), void *arg, unsigned long flags); |
89 | 87 | ||
90 | #define KSTK_EIP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)->thread_info))[1019]) | 88 | #define KSTK_REGS(tsk) (((struct pt_regs *)(THREAD_START_SP + (unsigned long)(tsk)->thread_info)) - 1) |
91 | #define KSTK_ESP(tsk) (((unsigned long *)(4096+(unsigned long)(tsk)->thread_info))[1017]) | 89 | #define KSTK_EIP(tsk) KSTK_REGS(tsk)->ARM_pc |
90 | #define KSTK_ESP(tsk) KSTK_REGS(tsk)->ARM_sp | ||
92 | 91 | ||
93 | /* | 92 | /* |
94 | * Prefetching support - only ARMv5. | 93 | * Prefetching support - only ARMv5. |
diff --git a/include/asm-arm/signal.h b/include/asm-arm/signal.h index b860dc3c5dc7..46e69ae395af 100644 --- a/include/asm-arm/signal.h +++ b/include/asm-arm/signal.h | |||
@@ -117,20 +117,7 @@ typedef unsigned long sigset_t; | |||
117 | #define SA_IRQNOMASK 0x08000000 | 117 | #define SA_IRQNOMASK 0x08000000 |
118 | #endif | 118 | #endif |
119 | 119 | ||
120 | #define SIG_BLOCK 0 /* for blocking signals */ | 120 | #include <asm-generic/signal.h> |
121 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | ||
122 | #define SIG_SETMASK 2 /* for setting the signal mask */ | ||
123 | |||
124 | /* Type of a signal handler. */ | ||
125 | typedef void __signalfn_t(int); | ||
126 | typedef __signalfn_t __user *__sighandler_t; | ||
127 | |||
128 | typedef void __restorefn_t(void); | ||
129 | typedef __restorefn_t __user *__sigrestore_t; | ||
130 | |||
131 | #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ | ||
132 | #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ | ||
133 | #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ | ||
134 | 121 | ||
135 | #ifdef __KERNEL__ | 122 | #ifdef __KERNEL__ |
136 | struct old_sigaction { | 123 | struct old_sigaction { |
diff --git a/include/asm-arm/thread_info.h b/include/asm-arm/thread_info.h index a61618fb433c..66c585c50cf9 100644 --- a/include/asm-arm/thread_info.h +++ b/include/asm-arm/thread_info.h | |||
@@ -14,6 +14,10 @@ | |||
14 | 14 | ||
15 | #include <asm/fpstate.h> | 15 | #include <asm/fpstate.h> |
16 | 16 | ||
17 | #define THREAD_SIZE_ORDER 1 | ||
18 | #define THREAD_SIZE 8192 | ||
19 | #define THREAD_START_SP (THREAD_SIZE - 8) | ||
20 | |||
17 | #ifndef __ASSEMBLY__ | 21 | #ifndef __ASSEMBLY__ |
18 | 22 | ||
19 | struct task_struct; | 23 | struct task_struct; |
@@ -77,8 +81,6 @@ struct thread_info { | |||
77 | #define init_thread_info (init_thread_union.thread_info) | 81 | #define init_thread_info (init_thread_union.thread_info) |
78 | #define init_stack (init_thread_union.stack) | 82 | #define init_stack (init_thread_union.stack) |
79 | 83 | ||
80 | #define THREAD_SIZE 8192 | ||
81 | |||
82 | /* | 84 | /* |
83 | * how to get the thread information struct from C | 85 | * how to get the thread information struct from C |
84 | */ | 86 | */ |
diff --git a/include/asm-arm26/elf.h b/include/asm-arm26/elf.h index 8b149474db24..5a47fdb3015d 100644 --- a/include/asm-arm26/elf.h +++ b/include/asm-arm26/elf.h | |||
@@ -36,7 +36,7 @@ typedef struct { void *null; } elf_fpregset_t; | |||
36 | * These are used to set parameters in the core dumps. | 36 | * These are used to set parameters in the core dumps. |
37 | */ | 37 | */ |
38 | #define ELF_CLASS ELFCLASS32 | 38 | #define ELF_CLASS ELFCLASS32 |
39 | #define ELF_DATA ELFDATA2LSB; | 39 | #define ELF_DATA ELFDATA2LSB |
40 | #define ELF_ARCH EM_ARM | 40 | #define ELF_ARCH EM_ARM |
41 | 41 | ||
42 | #define USE_ELF_CORE_DUMP | 42 | #define USE_ELF_CORE_DUMP |
diff --git a/include/asm-arm26/signal.h b/include/asm-arm26/signal.h index a1aacefa6562..37ad25355591 100644 --- a/include/asm-arm26/signal.h +++ b/include/asm-arm26/signal.h | |||
@@ -117,16 +117,7 @@ typedef unsigned long sigset_t; | |||
117 | #define SA_IRQNOMASK 0x08000000 | 117 | #define SA_IRQNOMASK 0x08000000 |
118 | #endif | 118 | #endif |
119 | 119 | ||
120 | #define SIG_BLOCK 0 /* for blocking signals */ | 120 | #include <asm-generic/signal.h> |
121 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | ||
122 | #define SIG_SETMASK 2 /* for setting the signal mask */ | ||
123 | |||
124 | /* Type of a signal handler. */ | ||
125 | typedef void (*__sighandler_t)(int); | ||
126 | |||
127 | #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ | ||
128 | #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ | ||
129 | #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ | ||
130 | 121 | ||
131 | #ifdef __KERNEL__ | 122 | #ifdef __KERNEL__ |
132 | struct old_sigaction { | 123 | struct old_sigaction { |
@@ -175,9 +166,6 @@ typedef struct sigaltstack { | |||
175 | #include <asm/sigcontext.h> | 166 | #include <asm/sigcontext.h> |
176 | 167 | ||
177 | #define sigmask(sig) (1UL << ((sig) - 1)) | 168 | #define sigmask(sig) (1UL << ((sig) - 1)) |
178 | //FIXME!!! | ||
179 | //#define HAVE_ARCH_GET_SIGNAL_TO_DELIVER | ||
180 | |||
181 | #endif | 169 | #endif |
182 | 170 | ||
183 | 171 | ||
diff --git a/include/asm-cris/signal.h b/include/asm-cris/signal.h index 2330769ba55d..dfe039593a78 100644 --- a/include/asm-cris/signal.h +++ b/include/asm-cris/signal.h | |||
@@ -108,16 +108,7 @@ typedef unsigned long sigset_t; | |||
108 | #define MINSIGSTKSZ 2048 | 108 | #define MINSIGSTKSZ 2048 |
109 | #define SIGSTKSZ 8192 | 109 | #define SIGSTKSZ 8192 |
110 | 110 | ||
111 | #define SIG_BLOCK 0 /* for blocking signals */ | 111 | #include <asm-generic/signal.h> |
112 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | ||
113 | #define SIG_SETMASK 2 /* for setting the signal mask */ | ||
114 | |||
115 | /* Type of a signal handler. */ | ||
116 | typedef void (*__sighandler_t)(int); | ||
117 | |||
118 | #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ | ||
119 | #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ | ||
120 | #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ | ||
121 | 112 | ||
122 | #ifdef __KERNEL__ | 113 | #ifdef __KERNEL__ |
123 | struct old_sigaction { | 114 | struct old_sigaction { |
diff --git a/include/asm-frv/signal.h b/include/asm-frv/signal.h index c930bb176875..d407bde57eca 100644 --- a/include/asm-frv/signal.h +++ b/include/asm-frv/signal.h | |||
@@ -107,16 +107,7 @@ typedef unsigned long sigset_t; | |||
107 | #define MINSIGSTKSZ 2048 | 107 | #define MINSIGSTKSZ 2048 |
108 | #define SIGSTKSZ 8192 | 108 | #define SIGSTKSZ 8192 |
109 | 109 | ||
110 | #define SIG_BLOCK 0 /* for blocking signals */ | 110 | #include <asm-generic/signal.h> |
111 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | ||
112 | #define SIG_SETMASK 2 /* for setting the signal mask */ | ||
113 | |||
114 | /* Type of a signal handler. */ | ||
115 | typedef void (*__sighandler_t)(int); | ||
116 | |||
117 | #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ | ||
118 | #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ | ||
119 | #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ | ||
120 | 111 | ||
121 | #ifdef __KERNEL__ | 112 | #ifdef __KERNEL__ |
122 | struct old_sigaction { | 113 | struct old_sigaction { |
diff --git a/include/asm-generic/sections.h b/include/asm-generic/sections.h index 976ac29598b7..195ccdc069e6 100644 --- a/include/asm-generic/sections.h +++ b/include/asm-generic/sections.h | |||
@@ -8,6 +8,8 @@ extern char _data[], _sdata[], _edata[]; | |||
8 | extern char __bss_start[], __bss_stop[]; | 8 | extern char __bss_start[], __bss_stop[]; |
9 | extern char __init_begin[], __init_end[]; | 9 | extern char __init_begin[], __init_end[]; |
10 | extern char _sinittext[], _einittext[]; | 10 | extern char _sinittext[], _einittext[]; |
11 | extern char _sextratext[] __attribute__((weak)); | ||
12 | extern char _eextratext[] __attribute__((weak)); | ||
11 | extern char _end[]; | 13 | extern char _end[]; |
12 | 14 | ||
13 | #endif /* _ASM_GENERIC_SECTIONS_H_ */ | 15 | #endif /* _ASM_GENERIC_SECTIONS_H_ */ |
diff --git a/include/asm-generic/signal.h b/include/asm-generic/signal.h new file mode 100644 index 000000000000..9418d6e9b8cd --- /dev/null +++ b/include/asm-generic/signal.h | |||
@@ -0,0 +1,21 @@ | |||
1 | #ifndef SIG_BLOCK | ||
2 | #define SIG_BLOCK 0 /* for blocking signals */ | ||
3 | #endif | ||
4 | #ifndef SIG_UNBLOCK | ||
5 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | ||
6 | #endif | ||
7 | #ifndef SIG_SETMASK | ||
8 | #define SIG_SETMASK 2 /* for setting the signal mask */ | ||
9 | #endif | ||
10 | |||
11 | #ifndef __ASSEMBLY__ | ||
12 | typedef void __signalfn_t(int); | ||
13 | typedef __signalfn_t __user *__sighandler_t; | ||
14 | |||
15 | typedef void __restorefn_t(void); | ||
16 | typedef __restorefn_t __user *__sigrestore_t; | ||
17 | |||
18 | #define SIG_DFL ((__force __sighandler_t)0) /* default signal handling */ | ||
19 | #define SIG_IGN ((__force __sighandler_t)1) /* ignore signal */ | ||
20 | #define SIG_ERR ((__force __sighandler_t)-1) /* error return from signal */ | ||
21 | #endif | ||
diff --git a/include/asm-h8300/kmap_types.h b/include/asm-h8300/kmap_types.h index 82431edeb2a1..1ec8a3427120 100644 --- a/include/asm-h8300/kmap_types.h +++ b/include/asm-h8300/kmap_types.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef _ASM_KMAP_TYPES_H | 1 | #ifndef _ASM_H8300_KMAP_TYPES_H |
2 | #define _ASM_KMAP_TYPES_H | 2 | #define _ASM_H8300_KMAP_TYPES_H |
3 | 3 | ||
4 | enum km_type { | 4 | enum km_type { |
5 | KM_BOUNCE_READ, | 5 | KM_BOUNCE_READ, |
@@ -13,6 +13,8 @@ enum km_type { | |||
13 | KM_PTE1, | 13 | KM_PTE1, |
14 | KM_IRQ0, | 14 | KM_IRQ0, |
15 | KM_IRQ1, | 15 | KM_IRQ1, |
16 | KM_SOFTIRQ0, | ||
17 | KM_SOFTIRQ1, | ||
16 | KM_TYPE_NR | 18 | KM_TYPE_NR |
17 | }; | 19 | }; |
18 | 20 | ||
diff --git a/include/asm-h8300/mman.h b/include/asm-h8300/mman.h index abe08856c84f..63f727a59850 100644 --- a/include/asm-h8300/mman.h +++ b/include/asm-h8300/mman.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #define PROT_READ 0x1 /* page can be read */ | 4 | #define PROT_READ 0x1 /* page can be read */ |
5 | #define PROT_WRITE 0x2 /* page can be written */ | 5 | #define PROT_WRITE 0x2 /* page can be written */ |
6 | #define PROT_EXEC 0x4 /* page can be executed */ | 6 | #define PROT_EXEC 0x4 /* page can be executed */ |
7 | #define PROT_SEM 0x8 /* page may be used for atomic ops */ | ||
7 | #define PROT_NONE 0x0 /* page can not be accessed */ | 8 | #define PROT_NONE 0x0 /* page can not be accessed */ |
8 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ | 9 | #define PROT_GROWSDOWN 0x01000000 /* mprotect flag: extend change to start of growsdown vma */ |
9 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ | 10 | #define PROT_GROWSUP 0x02000000 /* mprotect flag: extend change to end of growsup vma */ |
@@ -19,6 +20,8 @@ | |||
19 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ | 20 | #define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ |
20 | #define MAP_LOCKED 0x2000 /* pages are locked */ | 21 | #define MAP_LOCKED 0x2000 /* pages are locked */ |
21 | #define MAP_NORESERVE 0x4000 /* don't check for reservations */ | 22 | #define MAP_NORESERVE 0x4000 /* don't check for reservations */ |
23 | #define MAP_POPULATE 0x8000 /* populate (prefault) pagetables */ | ||
24 | #define MAP_NONBLOCK 0x10000 /* do not block on IO */ | ||
22 | 25 | ||
23 | #define MS_ASYNC 1 /* sync memory asynchronously */ | 26 | #define MS_ASYNC 1 /* sync memory asynchronously */ |
24 | #define MS_INVALIDATE 2 /* invalidate the caches */ | 27 | #define MS_INVALIDATE 2 /* invalidate the caches */ |
diff --git a/include/asm-h8300/signal.h b/include/asm-h8300/signal.h index ac3e01bd6396..8eccdc176163 100644 --- a/include/asm-h8300/signal.h +++ b/include/asm-h8300/signal.h | |||
@@ -107,16 +107,7 @@ typedef unsigned long sigset_t; | |||
107 | #define MINSIGSTKSZ 2048 | 107 | #define MINSIGSTKSZ 2048 |
108 | #define SIGSTKSZ 8192 | 108 | #define SIGSTKSZ 8192 |
109 | 109 | ||
110 | #define SIG_BLOCK 0 /* for blocking signals */ | 110 | #include <asm-generic/signal.h> |
111 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | ||
112 | #define SIG_SETMASK 2 /* for setting the signal mask */ | ||
113 | |||
114 | /* Type of a signal handler. */ | ||
115 | typedef void (*__sighandler_t)(int); | ||
116 | |||
117 | #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ | ||
118 | #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ | ||
119 | #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ | ||
120 | 111 | ||
121 | #ifdef __KERNEL__ | 112 | #ifdef __KERNEL__ |
122 | struct old_sigaction { | 113 | struct old_sigaction { |
diff --git a/include/asm-i386/agp.h b/include/asm-i386/agp.h index a917ff50354f..b82f5f3ab887 100644 --- a/include/asm-i386/agp.h +++ b/include/asm-i386/agp.h | |||
@@ -21,4 +21,14 @@ int unmap_page_from_agp(struct page *page); | |||
21 | worth it. Would need a page for it. */ | 21 | worth it. Would need a page for it. */ |
22 | #define flush_agp_cache() asm volatile("wbinvd":::"memory") | 22 | #define flush_agp_cache() asm volatile("wbinvd":::"memory") |
23 | 23 | ||
24 | /* Convert a physical address to an address suitable for the GART. */ | ||
25 | #define phys_to_gart(x) (x) | ||
26 | #define gart_to_phys(x) (x) | ||
27 | |||
28 | /* GATT allocation. Returns/accepts GATT kernel virtual address. */ | ||
29 | #define alloc_gatt_pages(order) \ | ||
30 | ((char *)__get_free_pages(GFP_KERNEL, (order))) | ||
31 | #define free_gatt_pages(table, order) \ | ||
32 | free_pages((unsigned long)(table), (order)) | ||
33 | |||
24 | #endif | 34 | #endif |
diff --git a/include/asm-i386/floppy.h b/include/asm-i386/floppy.h index f4782284807a..79727afb94c9 100644 --- a/include/asm-i386/floppy.h +++ b/include/asm-i386/floppy.h | |||
@@ -257,7 +257,7 @@ static int hard_dma_setup(char *addr, unsigned long size, int mode, int io) | |||
257 | return 0; | 257 | return 0; |
258 | } | 258 | } |
259 | 259 | ||
260 | struct fd_routine_l { | 260 | static struct fd_routine_l { |
261 | int (*_request_dma)(unsigned int dmanr, const char * device_id); | 261 | int (*_request_dma)(unsigned int dmanr, const char * device_id); |
262 | void (*_free_dma)(unsigned int dmanr); | 262 | void (*_free_dma)(unsigned int dmanr); |
263 | int (*_get_dma_residue)(unsigned int dummy); | 263 | int (*_get_dma_residue)(unsigned int dummy); |
diff --git a/include/asm-i386/linkage.h b/include/asm-i386/linkage.h index af3d8571c5c7..f4a6ebac0247 100644 --- a/include/asm-i386/linkage.h +++ b/include/asm-i386/linkage.h | |||
@@ -5,9 +5,7 @@ | |||
5 | #define FASTCALL(x) x __attribute__((regparm(3))) | 5 | #define FASTCALL(x) x __attribute__((regparm(3))) |
6 | #define fastcall __attribute__((regparm(3))) | 6 | #define fastcall __attribute__((regparm(3))) |
7 | 7 | ||
8 | #ifdef CONFIG_REGPARM | 8 | #define prevent_tail_call(ret) __asm__ ("" : "=r" (ret) : "0" (ret)) |
9 | # define prevent_tail_call(ret) __asm__ ("" : "=r" (ret) : "0" (ret)) | ||
10 | #endif | ||
11 | 9 | ||
12 | #ifdef CONFIG_X86_ALIGNMENT_16 | 10 | #ifdef CONFIG_X86_ALIGNMENT_16 |
13 | #define __ALIGN .align 16,0x90 | 11 | #define __ALIGN .align 16,0x90 |
diff --git a/include/asm-i386/mach-numaq/mach_ipi.h b/include/asm-i386/mach-numaq/mach_ipi.h index 1b46fd3f2ae3..c6044488e9e6 100644 --- a/include/asm-i386/mach-numaq/mach_ipi.h +++ b/include/asm-i386/mach-numaq/mach_ipi.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef __ASM_MACH_IPI_H | 1 | #ifndef __ASM_MACH_IPI_H |
2 | #define __ASM_MACH_IPI_H | 2 | #define __ASM_MACH_IPI_H |
3 | 3 | ||
4 | inline void send_IPI_mask_sequence(cpumask_t, int vector); | 4 | void send_IPI_mask_sequence(cpumask_t, int vector); |
5 | 5 | ||
6 | static inline void send_IPI_mask(cpumask_t mask, int vector) | 6 | static inline void send_IPI_mask(cpumask_t mask, int vector) |
7 | { | 7 | { |
diff --git a/include/asm-i386/module.h b/include/asm-i386/module.h index 508865e26308..eb7f2b4234aa 100644 --- a/include/asm-i386/module.h +++ b/include/asm-i386/module.h | |||
@@ -52,8 +52,8 @@ struct mod_arch_specific | |||
52 | #define MODULE_PROC_FAMILY "CYRIXIII " | 52 | #define MODULE_PROC_FAMILY "CYRIXIII " |
53 | #elif defined CONFIG_MVIAC3_2 | 53 | #elif defined CONFIG_MVIAC3_2 |
54 | #define MODULE_PROC_FAMILY "VIAC3-2 " | 54 | #define MODULE_PROC_FAMILY "VIAC3-2 " |
55 | #elif CONFIG_MGEODE | 55 | #elif CONFIG_MGEODEGX1 |
56 | #define MODULE_PROC_FAMILY "GEODE " | 56 | #define MODULE_PROC_FAMILY "GEODEGX1 " |
57 | #else | 57 | #else |
58 | #error unknown processor family | 58 | #error unknown processor family |
59 | #endif | 59 | #endif |
diff --git a/include/asm-i386/signal.h b/include/asm-i386/signal.h index 0f082bd1c455..cbb47d34aa31 100644 --- a/include/asm-i386/signal.h +++ b/include/asm-i386/signal.h | |||
@@ -110,20 +110,7 @@ typedef unsigned long sigset_t; | |||
110 | #define MINSIGSTKSZ 2048 | 110 | #define MINSIGSTKSZ 2048 |
111 | #define SIGSTKSZ 8192 | 111 | #define SIGSTKSZ 8192 |
112 | 112 | ||
113 | #define SIG_BLOCK 0 /* for blocking signals */ | 113 | #include <asm-generic/signal.h> |
114 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | ||
115 | #define SIG_SETMASK 2 /* for setting the signal mask */ | ||
116 | |||
117 | /* Type of a signal handler. */ | ||
118 | typedef void __signalfn_t(int); | ||
119 | typedef __signalfn_t __user *__sighandler_t; | ||
120 | |||
121 | typedef void __restorefn_t(void); | ||
122 | typedef __restorefn_t __user *__sigrestore_t; | ||
123 | |||
124 | #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ | ||
125 | #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ | ||
126 | #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ | ||
127 | 114 | ||
128 | #ifdef __KERNEL__ | 115 | #ifdef __KERNEL__ |
129 | struct old_sigaction { | 116 | struct old_sigaction { |
diff --git a/include/asm-i386/timer.h b/include/asm-i386/timer.h index 40c54f69780e..c34709849839 100644 --- a/include/asm-i386/timer.h +++ b/include/asm-i386/timer.h | |||
@@ -53,6 +53,7 @@ extern struct init_timer_opts timer_cyclone_init; | |||
53 | 53 | ||
54 | extern unsigned long calibrate_tsc(void); | 54 | extern unsigned long calibrate_tsc(void); |
55 | extern void init_cpu_khz(void); | 55 | extern void init_cpu_khz(void); |
56 | extern int recalibrate_cpu_khz(void); | ||
56 | #ifdef CONFIG_HPET_TIMER | 57 | #ifdef CONFIG_HPET_TIMER |
57 | extern struct init_timer_opts timer_hpet_init; | 58 | extern struct init_timer_opts timer_hpet_init; |
58 | extern unsigned long calibrate_tsc_hpet(unsigned long *tsc_hpet_quotient_ptr); | 59 | extern unsigned long calibrate_tsc_hpet(unsigned long *tsc_hpet_quotient_ptr); |
diff --git a/include/asm-ia64/agp.h b/include/asm-ia64/agp.h index d1316f1e6ee1..4e517f0e6afa 100644 --- a/include/asm-ia64/agp.h +++ b/include/asm-ia64/agp.h | |||
@@ -18,4 +18,14 @@ | |||
18 | #define flush_agp_mappings() /* nothing */ | 18 | #define flush_agp_mappings() /* nothing */ |
19 | #define flush_agp_cache() mb() | 19 | #define flush_agp_cache() mb() |
20 | 20 | ||
21 | /* Convert a physical address to an address suitable for the GART. */ | ||
22 | #define phys_to_gart(x) (x) | ||
23 | #define gart_to_phys(x) (x) | ||
24 | |||
25 | /* GATT allocation. Returns/accepts GATT kernel virtual address. */ | ||
26 | #define alloc_gatt_pages(order) \ | ||
27 | ((char *)__get_free_pages(GFP_KERNEL, (order))) | ||
28 | #define free_gatt_pages(table, order) \ | ||
29 | free_pages((unsigned long)(table), (order)) | ||
30 | |||
21 | #endif /* _ASM_IA64_AGP_H */ | 31 | #endif /* _ASM_IA64_AGP_H */ |
diff --git a/include/asm-ia64/ioctl32.h b/include/asm-ia64/ioctl32.h deleted file mode 100644 index d0d227f45e05..000000000000 --- a/include/asm-ia64/ioctl32.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <linux/ioctl32.h> | ||
diff --git a/include/asm-ia64/perfmon.h b/include/asm-ia64/perfmon.h index ed5416c5b1ac..7f3333dd00e4 100644 --- a/include/asm-ia64/perfmon.h +++ b/include/asm-ia64/perfmon.h | |||
@@ -177,6 +177,10 @@ typedef union { | |||
177 | 177 | ||
178 | extern long perfmonctl(int fd, int cmd, void *arg, int narg); | 178 | extern long perfmonctl(int fd, int cmd, void *arg, int narg); |
179 | 179 | ||
180 | typedef struct { | ||
181 | void (*handler)(int irq, void *arg, struct pt_regs *regs); | ||
182 | } pfm_intr_handler_desc_t; | ||
183 | |||
180 | extern void pfm_save_regs (struct task_struct *); | 184 | extern void pfm_save_regs (struct task_struct *); |
181 | extern void pfm_load_regs (struct task_struct *); | 185 | extern void pfm_load_regs (struct task_struct *); |
182 | 186 | ||
@@ -187,6 +191,10 @@ extern void pfm_syst_wide_update_task(struct task_struct *, unsigned long info, | |||
187 | extern void pfm_inherit(struct task_struct *task, struct pt_regs *regs); | 191 | extern void pfm_inherit(struct task_struct *task, struct pt_regs *regs); |
188 | extern void pfm_init_percpu(void); | 192 | extern void pfm_init_percpu(void); |
189 | extern void pfm_handle_work(void); | 193 | extern void pfm_handle_work(void); |
194 | extern int pfm_install_alt_pmu_interrupt(pfm_intr_handler_desc_t *h); | ||
195 | extern int pfm_remove_alt_pmu_interrupt(pfm_intr_handler_desc_t *h); | ||
196 | |||
197 | |||
190 | 198 | ||
191 | /* | 199 | /* |
192 | * Reset PMD register flags | 200 | * Reset PMD register flags |
diff --git a/include/asm-ia64/pgtable.h b/include/asm-ia64/pgtable.h index ea121a002309..fcc9c3344ab4 100644 --- a/include/asm-ia64/pgtable.h +++ b/include/asm-ia64/pgtable.h | |||
@@ -8,7 +8,7 @@ | |||
8 | * This hopefully works with any (fixed) IA-64 page-size, as defined | 8 | * This hopefully works with any (fixed) IA-64 page-size, as defined |
9 | * in <asm/page.h>. | 9 | * in <asm/page.h>. |
10 | * | 10 | * |
11 | * Copyright (C) 1998-2004 Hewlett-Packard Co | 11 | * Copyright (C) 1998-2005 Hewlett-Packard Co |
12 | * David Mosberger-Tang <davidm@hpl.hp.com> | 12 | * David Mosberger-Tang <davidm@hpl.hp.com> |
13 | */ | 13 | */ |
14 | 14 | ||
@@ -551,7 +551,11 @@ do { \ | |||
551 | 551 | ||
552 | /* These tell get_user_pages() that the first gate page is accessible from user-level. */ | 552 | /* These tell get_user_pages() that the first gate page is accessible from user-level. */ |
553 | #define FIXADDR_USER_START GATE_ADDR | 553 | #define FIXADDR_USER_START GATE_ADDR |
554 | #define FIXADDR_USER_END (GATE_ADDR + 2*PERCPU_PAGE_SIZE) | 554 | #ifdef HAVE_BUGGY_SEGREL |
555 | # define FIXADDR_USER_END (GATE_ADDR + 2*PAGE_SIZE) | ||
556 | #else | ||
557 | # define FIXADDR_USER_END (GATE_ADDR + 2*PERCPU_PAGE_SIZE) | ||
558 | #endif | ||
555 | 559 | ||
556 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG | 560 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG |
557 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY | 561 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY |
diff --git a/include/asm-ia64/processor.h b/include/asm-ia64/processor.h index 9e1ba8b7fb68..91bbd1f22461 100644 --- a/include/asm-ia64/processor.h +++ b/include/asm-ia64/processor.h | |||
@@ -403,7 +403,10 @@ extern void ia64_setreg_unknown_kr (void); | |||
403 | * task_struct at this point. | 403 | * task_struct at this point. |
404 | */ | 404 | */ |
405 | 405 | ||
406 | /* Return TRUE if task T owns the fph partition of the CPU we're running on. */ | 406 | /* |
407 | * Return TRUE if task T owns the fph partition of the CPU we're running on. | ||
408 | * Must be called from code that has preemption disabled. | ||
409 | */ | ||
407 | #define ia64_is_local_fpu_owner(t) \ | 410 | #define ia64_is_local_fpu_owner(t) \ |
408 | ({ \ | 411 | ({ \ |
409 | struct task_struct *__ia64_islfo_task = (t); \ | 412 | struct task_struct *__ia64_islfo_task = (t); \ |
@@ -411,7 +414,10 @@ extern void ia64_setreg_unknown_kr (void); | |||
411 | && __ia64_islfo_task == (struct task_struct *) ia64_get_kr(IA64_KR_FPU_OWNER)); \ | 414 | && __ia64_islfo_task == (struct task_struct *) ia64_get_kr(IA64_KR_FPU_OWNER)); \ |
412 | }) | 415 | }) |
413 | 416 | ||
414 | /* Mark task T as owning the fph partition of the CPU we're running on. */ | 417 | /* |
418 | * Mark task T as owning the fph partition of the CPU we're running on. | ||
419 | * Must be called from code that has preemption disabled. | ||
420 | */ | ||
415 | #define ia64_set_local_fpu_owner(t) do { \ | 421 | #define ia64_set_local_fpu_owner(t) do { \ |
416 | struct task_struct *__ia64_slfo_task = (t); \ | 422 | struct task_struct *__ia64_slfo_task = (t); \ |
417 | __ia64_slfo_task->thread.last_fph_cpu = smp_processor_id(); \ | 423 | __ia64_slfo_task->thread.last_fph_cpu = smp_processor_id(); \ |
diff --git a/include/asm-ia64/signal.h b/include/asm-ia64/signal.h index 85a577ae9146..608168d713d3 100644 --- a/include/asm-ia64/signal.h +++ b/include/asm-ia64/signal.h | |||
@@ -118,13 +118,7 @@ | |||
118 | 118 | ||
119 | #endif /* __KERNEL__ */ | 119 | #endif /* __KERNEL__ */ |
120 | 120 | ||
121 | #define SIG_BLOCK 0 /* for blocking signals */ | 121 | #include <asm-generic/signal.h> |
122 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | ||
123 | #define SIG_SETMASK 2 /* for setting the signal mask */ | ||
124 | |||
125 | #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ | ||
126 | #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ | ||
127 | #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ | ||
128 | 122 | ||
129 | # ifndef __ASSEMBLY__ | 123 | # ifndef __ASSEMBLY__ |
130 | 124 | ||
@@ -133,9 +127,6 @@ | |||
133 | /* Avoid too many header ordering problems. */ | 127 | /* Avoid too many header ordering problems. */ |
134 | struct siginfo; | 128 | struct siginfo; |
135 | 129 | ||
136 | /* Type of a signal handler. */ | ||
137 | typedef void __user (*__sighandler_t)(int); | ||
138 | |||
139 | typedef struct sigaltstack { | 130 | typedef struct sigaltstack { |
140 | void __user *ss_sp; | 131 | void __user *ss_sp; |
141 | int ss_flags; | 132 | int ss_flags; |
diff --git a/include/asm-ia64/sn/addrs.h b/include/asm-ia64/sn/addrs.h index 960d626ee589..1bfdfb4d7b01 100644 --- a/include/asm-ia64/sn/addrs.h +++ b/include/asm-ia64/sn/addrs.h | |||
@@ -136,6 +136,7 @@ | |||
136 | */ | 136 | */ |
137 | #define CAC_BASE (CACHED | AS_CAC_SPACE) | 137 | #define CAC_BASE (CACHED | AS_CAC_SPACE) |
138 | #define AMO_BASE (UNCACHED | AS_AMO_SPACE) | 138 | #define AMO_BASE (UNCACHED | AS_AMO_SPACE) |
139 | #define AMO_PHYS_BASE (UNCACHED_PHYS | AS_AMO_SPACE) | ||
139 | #define GET_BASE (CACHED | AS_GET_SPACE) | 140 | #define GET_BASE (CACHED | AS_GET_SPACE) |
140 | 141 | ||
141 | /* | 142 | /* |
@@ -161,6 +162,13 @@ | |||
161 | 162 | ||
162 | 163 | ||
163 | /* | 164 | /* |
165 | * Macros to test for address type. | ||
166 | */ | ||
167 | #define IS_AMO_ADDRESS(x) (((u64)(x) & (REGION_BITS | AS_MASK)) == AMO_BASE) | ||
168 | #define IS_AMO_PHYS_ADDRESS(x) (((u64)(x) & (REGION_BITS | AS_MASK)) == AMO_PHYS_BASE) | ||
169 | |||
170 | |||
171 | /* | ||
164 | * The following definitions pertain to the IO special address | 172 | * The following definitions pertain to the IO special address |
165 | * space. They define the location of the big and little windows | 173 | * space. They define the location of the big and little windows |
166 | * of any given node. | 174 | * of any given node. |
diff --git a/include/asm-ia64/sn/arch.h b/include/asm-ia64/sn/arch.h index 7c349f07916a..635fdce854a8 100644 --- a/include/asm-ia64/sn/arch.h +++ b/include/asm-ia64/sn/arch.h | |||
@@ -5,7 +5,7 @@ | |||
5 | * | 5 | * |
6 | * SGI specific setup. | 6 | * SGI specific setup. |
7 | * | 7 | * |
8 | * Copyright (C) 1995-1997,1999,2001-2004 Silicon Graphics, Inc. All rights reserved. | 8 | * Copyright (C) 1995-1997,1999,2001-2005 Silicon Graphics, Inc. All rights reserved. |
9 | * Copyright (C) 1999 Ralf Baechle (ralf@gnu.org) | 9 | * Copyright (C) 1999 Ralf Baechle (ralf@gnu.org) |
10 | */ | 10 | */ |
11 | #ifndef _ASM_IA64_SN_ARCH_H | 11 | #ifndef _ASM_IA64_SN_ARCH_H |
@@ -47,6 +47,21 @@ DECLARE_PER_CPU(struct sn_hub_info_s, __sn_hub_info); | |||
47 | #define MAX_COMPACT_NODES 2048 | 47 | #define MAX_COMPACT_NODES 2048 |
48 | #define CPUS_PER_NODE 4 | 48 | #define CPUS_PER_NODE 4 |
49 | 49 | ||
50 | |||
51 | /* | ||
52 | * Compact node ID to nasid mappings kept in the per-cpu data areas of each | ||
53 | * cpu. | ||
54 | */ | ||
55 | DECLARE_PER_CPU(short, __sn_cnodeid_to_nasid[MAX_NUMNODES]); | ||
56 | #define sn_cnodeid_to_nasid (&__get_cpu_var(__sn_cnodeid_to_nasid[0])) | ||
57 | |||
58 | |||
59 | |||
60 | extern u8 sn_partition_id; | ||
61 | extern u8 sn_system_size; | ||
62 | extern u8 sn_sharing_domain_size; | ||
63 | extern u8 sn_region_size; | ||
64 | |||
50 | extern void sn_flush_all_caches(long addr, long bytes); | 65 | extern void sn_flush_all_caches(long addr, long bytes); |
51 | 66 | ||
52 | #endif /* _ASM_IA64_SN_ARCH_H */ | 67 | #endif /* _ASM_IA64_SN_ARCH_H */ |
diff --git a/include/asm-ia64/sn/fetchop.h b/include/asm-ia64/sn/fetchop.h deleted file mode 100644 index 5f4ad8f4b5d2..000000000000 --- a/include/asm-ia64/sn/fetchop.h +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * This file is subject to the terms and conditions of the GNU General Public | ||
4 | * License. See the file "COPYING" in the main directory of this archive | ||
5 | * for more details. | ||
6 | * | ||
7 | * Copyright (c) 2001-2004 Silicon Graphics, Inc. All rights reserved. | ||
8 | */ | ||
9 | |||
10 | #ifndef _ASM_IA64_SN_FETCHOP_H | ||
11 | #define _ASM_IA64_SN_FETCHOP_H | ||
12 | |||
13 | #include <linux/config.h> | ||
14 | |||
15 | #define FETCHOP_BASENAME "sgi_fetchop" | ||
16 | #define FETCHOP_FULLNAME "/dev/sgi_fetchop" | ||
17 | |||
18 | |||
19 | |||
20 | #define FETCHOP_VAR_SIZE 64 /* 64 byte per fetchop variable */ | ||
21 | |||
22 | #define FETCHOP_LOAD 0 | ||
23 | #define FETCHOP_INCREMENT 8 | ||
24 | #define FETCHOP_DECREMENT 16 | ||
25 | #define FETCHOP_CLEAR 24 | ||
26 | |||
27 | #define FETCHOP_STORE 0 | ||
28 | #define FETCHOP_AND 24 | ||
29 | #define FETCHOP_OR 32 | ||
30 | |||
31 | #define FETCHOP_CLEAR_CACHE 56 | ||
32 | |||
33 | #define FETCHOP_LOAD_OP(addr, op) ( \ | ||
34 | *(volatile long *)((char*) (addr) + (op))) | ||
35 | |||
36 | #define FETCHOP_STORE_OP(addr, op, x) ( \ | ||
37 | *(volatile long *)((char*) (addr) + (op)) = (long) (x)) | ||
38 | |||
39 | #ifdef __KERNEL__ | ||
40 | |||
41 | /* | ||
42 | * Convert a region 6 (kaddr) address to the address of the fetchop variable | ||
43 | */ | ||
44 | #define FETCHOP_KADDR_TO_MSPEC_ADDR(kaddr) TO_MSPEC(kaddr) | ||
45 | |||
46 | |||
47 | /* | ||
48 | * Each Atomic Memory Operation (AMO formerly known as fetchop) | ||
49 | * variable is 64 bytes long. The first 8 bytes are used. The | ||
50 | * remaining 56 bytes are unaddressable due to the operation taking | ||
51 | * that portion of the address. | ||
52 | * | ||
53 | * NOTE: The AMO_t _MUST_ be placed in either the first or second half | ||
54 | * of the cache line. The cache line _MUST NOT_ be used for anything | ||
55 | * other than additional AMO_t entries. This is because there are two | ||
56 | * addresses which reference the same physical cache line. One will | ||
57 | * be a cached entry with the memory type bits all set. This address | ||
58 | * may be loaded into processor cache. The AMO_t will be referenced | ||
59 | * uncached via the memory special memory type. If any portion of the | ||
60 | * cached cache-line is modified, when that line is flushed, it will | ||
61 | * overwrite the uncached value in physical memory and lead to | ||
62 | * inconsistency. | ||
63 | */ | ||
64 | typedef struct { | ||
65 | u64 variable; | ||
66 | u64 unused[7]; | ||
67 | } AMO_t; | ||
68 | |||
69 | |||
70 | /* | ||
71 | * The following APIs are externalized to the kernel to allocate/free pages of | ||
72 | * fetchop variables. | ||
73 | * fetchop_kalloc_page - Allocate/initialize 1 fetchop page on the | ||
74 | * specified cnode. | ||
75 | * fetchop_kfree_page - Free a previously allocated fetchop page | ||
76 | */ | ||
77 | |||
78 | unsigned long fetchop_kalloc_page(int nid); | ||
79 | void fetchop_kfree_page(unsigned long maddr); | ||
80 | |||
81 | |||
82 | #endif /* __KERNEL__ */ | ||
83 | |||
84 | #endif /* _ASM_IA64_SN_FETCHOP_H */ | ||
85 | |||
diff --git a/include/asm-ia64/sn/l1.h b/include/asm-ia64/sn/l1.h index d5dbd55e44b5..08050d37b662 100644 --- a/include/asm-ia64/sn/l1.h +++ b/include/asm-ia64/sn/l1.h | |||
@@ -29,8 +29,9 @@ | |||
29 | #define L1_BRICKTYPE_CHI_CG 0x76 /* v */ | 29 | #define L1_BRICKTYPE_CHI_CG 0x76 /* v */ |
30 | #define L1_BRICKTYPE_X 0x78 /* x */ | 30 | #define L1_BRICKTYPE_X 0x78 /* x */ |
31 | #define L1_BRICKTYPE_X2 0x79 /* y */ | 31 | #define L1_BRICKTYPE_X2 0x79 /* y */ |
32 | #define L1_BRICKTYPE_SA 0x5e /* ^ */ /* TIO bringup brick */ | 32 | #define L1_BRICKTYPE_SA 0x5e /* ^ */ |
33 | #define L1_BRICKTYPE_PA 0x6a /* j */ | 33 | #define L1_BRICKTYPE_PA 0x6a /* j */ |
34 | #define L1_BRICKTYPE_IA 0x6b /* k */ | 34 | #define L1_BRICKTYPE_IA 0x6b /* k */ |
35 | #define L1_BRICKTYPE_ATHENA 0x2b /* + */ | ||
35 | 36 | ||
36 | #endif /* _ASM_IA64_SN_L1_H */ | 37 | #endif /* _ASM_IA64_SN_L1_H */ |
diff --git a/include/asm-ia64/sn/nodepda.h b/include/asm-ia64/sn/nodepda.h index 13cc1002b294..7138b1eafd6b 100644 --- a/include/asm-ia64/sn/nodepda.h +++ b/include/asm-ia64/sn/nodepda.h | |||
@@ -13,7 +13,6 @@ | |||
13 | #include <asm/irq.h> | 13 | #include <asm/irq.h> |
14 | #include <asm/sn/arch.h> | 14 | #include <asm/sn/arch.h> |
15 | #include <asm/sn/intr.h> | 15 | #include <asm/sn/intr.h> |
16 | #include <asm/sn/pda.h> | ||
17 | #include <asm/sn/bte.h> | 16 | #include <asm/sn/bte.h> |
18 | 17 | ||
19 | /* | 18 | /* |
@@ -67,20 +66,18 @@ typedef struct nodepda_s nodepda_t; | |||
67 | * The next set of definitions provides this. | 66 | * The next set of definitions provides this. |
68 | * Routines are expected to use | 67 | * Routines are expected to use |
69 | * | 68 | * |
70 | * nodepda -> to access node PDA for the node on which code is running | 69 | * sn_nodepda - to access node PDA for the node on which code is running |
71 | * subnodepda -> to access subnode PDA for the subnode on which code is running | 70 | * NODEPDA(cnodeid) - to access node PDA for cnodeid |
72 | * | ||
73 | * NODEPDA(cnode) -> to access node PDA for cnodeid | ||
74 | * SUBNODEPDA(cnode,sn) -> to access subnode PDA for cnodeid/subnode | ||
75 | */ | 71 | */ |
76 | 72 | ||
77 | #define nodepda pda->p_nodepda /* Ptr to this node's PDA */ | 73 | DECLARE_PER_CPU(struct nodepda_s *, __sn_nodepda); |
78 | #define NODEPDA(cnode) (nodepda->pernode_pdaindr[cnode]) | 74 | #define sn_nodepda (__get_cpu_var(__sn_nodepda)) |
75 | #define NODEPDA(cnodeid) (sn_nodepda->pernode_pdaindr[cnodeid]) | ||
79 | 76 | ||
80 | /* | 77 | /* |
81 | * Check if given a compact node id the corresponding node has all the | 78 | * Check if given a compact node id the corresponding node has all the |
82 | * cpus disabled. | 79 | * cpus disabled. |
83 | */ | 80 | */ |
84 | #define is_headless_node(cnode) (nr_cpus_node(cnode) == 0) | 81 | #define is_headless_node(cnodeid) (nr_cpus_node(cnodeid) == 0) |
85 | 82 | ||
86 | #endif /* _ASM_IA64_SN_NODEPDA_H */ | 83 | #endif /* _ASM_IA64_SN_NODEPDA_H */ |
diff --git a/include/asm-ia64/sn/pda.h b/include/asm-ia64/sn/pda.h index cd19f17bf91a..ea5590c76ca4 100644 --- a/include/asm-ia64/sn/pda.h +++ b/include/asm-ia64/sn/pda.h | |||
@@ -24,14 +24,6 @@ | |||
24 | 24 | ||
25 | typedef struct pda_s { | 25 | typedef struct pda_s { |
26 | 26 | ||
27 | /* Having a pointer in the begining of PDA tends to increase | ||
28 | * the chance of having this pointer in cache. (Yes something | ||
29 | * else gets pushed out). Doing this reduces the number of memory | ||
30 | * access to all nodepda variables to be one | ||
31 | */ | ||
32 | struct nodepda_s *p_nodepda; /* Pointer to Per node PDA */ | ||
33 | struct subnodepda_s *p_subnodepda; /* Pointer to CPU subnode PDA */ | ||
34 | |||
35 | /* | 27 | /* |
36 | * Support for SN LEDs | 28 | * Support for SN LEDs |
37 | */ | 29 | */ |
@@ -49,7 +41,6 @@ typedef struct pda_s { | |||
49 | 41 | ||
50 | unsigned long sn_soft_irr[4]; | 42 | unsigned long sn_soft_irr[4]; |
51 | unsigned long sn_in_service_ivecs[4]; | 43 | unsigned long sn_in_service_ivecs[4]; |
52 | short cnodeid_to_nasid_table[MAX_NUMNODES]; | ||
53 | int sn_lb_int_war_ticks; | 44 | int sn_lb_int_war_ticks; |
54 | int sn_last_irq; | 45 | int sn_last_irq; |
55 | int sn_first_irq; | 46 | int sn_first_irq; |
diff --git a/include/asm-ia64/sn/shub_mmr.h b/include/asm-ia64/sn/shub_mmr.h index 2f885088e095..323fa0cd8d83 100644 --- a/include/asm-ia64/sn/shub_mmr.h +++ b/include/asm-ia64/sn/shub_mmr.h | |||
@@ -385,6 +385,17 @@ | |||
385 | #define SH_EVENT_OCCURRED_RTC3_INT_MASK 0x0000000004000000 | 385 | #define SH_EVENT_OCCURRED_RTC3_INT_MASK 0x0000000004000000 |
386 | 386 | ||
387 | /* ==================================================================== */ | 387 | /* ==================================================================== */ |
388 | /* Register "SH_IPI_ACCESS" */ | ||
389 | /* CPU interrupt Access Permission Bits */ | ||
390 | /* ==================================================================== */ | ||
391 | |||
392 | #define SH1_IPI_ACCESS 0x0000000110060480 | ||
393 | #define SH2_IPI_ACCESS0 0x0000000010060c00 | ||
394 | #define SH2_IPI_ACCESS1 0x0000000010060c80 | ||
395 | #define SH2_IPI_ACCESS2 0x0000000010060d00 | ||
396 | #define SH2_IPI_ACCESS3 0x0000000010060d80 | ||
397 | |||
398 | /* ==================================================================== */ | ||
388 | /* Register "SH_INT_CMPB" */ | 399 | /* Register "SH_INT_CMPB" */ |
389 | /* RTC Compare Value for Processor B */ | 400 | /* RTC Compare Value for Processor B */ |
390 | /* ==================================================================== */ | 401 | /* ==================================================================== */ |
@@ -429,6 +440,19 @@ | |||
429 | #define SH_INT_CMPD_REAL_TIME_CMPD_SHFT 0 | 440 | #define SH_INT_CMPD_REAL_TIME_CMPD_SHFT 0 |
430 | #define SH_INT_CMPD_REAL_TIME_CMPD_MASK 0x007fffffffffffff | 441 | #define SH_INT_CMPD_REAL_TIME_CMPD_MASK 0x007fffffffffffff |
431 | 442 | ||
443 | /* ==================================================================== */ | ||
444 | /* Register "SH_MD_DQLP_MMR_DIR_PRIVEC0" */ | ||
445 | /* privilege vector for acc=0 */ | ||
446 | /* ==================================================================== */ | ||
447 | |||
448 | #define SH1_MD_DQLP_MMR_DIR_PRIVEC0 0x0000000100030300 | ||
449 | |||
450 | /* ==================================================================== */ | ||
451 | /* Register "SH_MD_DQRP_MMR_DIR_PRIVEC0" */ | ||
452 | /* privilege vector for acc=0 */ | ||
453 | /* ==================================================================== */ | ||
454 | |||
455 | #define SH1_MD_DQRP_MMR_DIR_PRIVEC0 0x0000000100050300 | ||
432 | 456 | ||
433 | /* ==================================================================== */ | 457 | /* ==================================================================== */ |
434 | /* Some MMRs are functionally identical (or close enough) on both SHUB1 */ | 458 | /* Some MMRs are functionally identical (or close enough) on both SHUB1 */ |
diff --git a/include/asm-ia64/sn/shubio.h b/include/asm-ia64/sn/shubio.h index fbd880e6bb96..831b72111fdc 100644 --- a/include/asm-ia64/sn/shubio.h +++ b/include/asm-ia64/sn/shubio.h | |||
@@ -3,292 +3,287 @@ | |||
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-2005 Silicon Graphics, Inc. All rights reserved. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #ifndef _ASM_IA64_SN_SHUBIO_H | 9 | #ifndef _ASM_IA64_SN_SHUBIO_H |
10 | #define _ASM_IA64_SN_SHUBIO_H | 10 | #define _ASM_IA64_SN_SHUBIO_H |
11 | 11 | ||
12 | #define HUB_WIDGET_ID_MAX 0xf | 12 | #define HUB_WIDGET_ID_MAX 0xf |
13 | #define IIO_NUM_ITTES 7 | 13 | #define IIO_NUM_ITTES 7 |
14 | #define HUB_NUM_BIG_WINDOW (IIO_NUM_ITTES - 1) | 14 | #define HUB_NUM_BIG_WINDOW (IIO_NUM_ITTES - 1) |
15 | 15 | ||
16 | #define IIO_WID 0x00400000 /* Crosstalk Widget Identification */ | 16 | #define IIO_WID 0x00400000 /* Crosstalk Widget Identification */ |
17 | /* This register is also accessible from | 17 | /* This register is also accessible from |
18 | * Crosstalk at address 0x0. */ | 18 | * Crosstalk at address 0x0. */ |
19 | #define IIO_WSTAT 0x00400008 /* Crosstalk Widget Status */ | 19 | #define IIO_WSTAT 0x00400008 /* Crosstalk Widget Status */ |
20 | #define IIO_WCR 0x00400020 /* Crosstalk Widget Control Register */ | 20 | #define IIO_WCR 0x00400020 /* Crosstalk Widget Control Register */ |
21 | #define IIO_ILAPR 0x00400100 /* IO Local Access Protection Register */ | 21 | #define IIO_ILAPR 0x00400100 /* IO Local Access Protection Register */ |
22 | #define IIO_ILAPO 0x00400108 /* IO Local Access Protection Override */ | 22 | #define IIO_ILAPO 0x00400108 /* IO Local Access Protection Override */ |
23 | #define IIO_IOWA 0x00400110 /* IO Outbound Widget Access */ | 23 | #define IIO_IOWA 0x00400110 /* IO Outbound Widget Access */ |
24 | #define IIO_IIWA 0x00400118 /* IO Inbound Widget Access */ | 24 | #define IIO_IIWA 0x00400118 /* IO Inbound Widget Access */ |
25 | #define IIO_IIDEM 0x00400120 /* IO Inbound Device Error Mask */ | 25 | #define IIO_IIDEM 0x00400120 /* IO Inbound Device Error Mask */ |
26 | #define IIO_ILCSR 0x00400128 /* IO LLP Control and Status Register */ | 26 | #define IIO_ILCSR 0x00400128 /* IO LLP Control and Status Register */ |
27 | #define IIO_ILLR 0x00400130 /* IO LLP Log Register */ | 27 | #define IIO_ILLR 0x00400130 /* IO LLP Log Register */ |
28 | #define IIO_IIDSR 0x00400138 /* IO Interrupt Destination */ | 28 | #define IIO_IIDSR 0x00400138 /* IO Interrupt Destination */ |
29 | 29 | ||
30 | #define IIO_IGFX0 0x00400140 /* IO Graphics Node-Widget Map 0 */ | 30 | #define IIO_IGFX0 0x00400140 /* IO Graphics Node-Widget Map 0 */ |
31 | #define IIO_IGFX1 0x00400148 /* IO Graphics Node-Widget Map 1 */ | 31 | #define IIO_IGFX1 0x00400148 /* IO Graphics Node-Widget Map 1 */ |
32 | 32 | ||
33 | #define IIO_ISCR0 0x00400150 /* IO Scratch Register 0 */ | 33 | #define IIO_ISCR0 0x00400150 /* IO Scratch Register 0 */ |
34 | #define IIO_ISCR1 0x00400158 /* IO Scratch Register 1 */ | 34 | #define IIO_ISCR1 0x00400158 /* IO Scratch Register 1 */ |
35 | 35 | ||
36 | #define IIO_ITTE1 0x00400160 /* IO Translation Table Entry 1 */ | 36 | #define IIO_ITTE1 0x00400160 /* IO Translation Table Entry 1 */ |
37 | #define IIO_ITTE2 0x00400168 /* IO Translation Table Entry 2 */ | 37 | #define IIO_ITTE2 0x00400168 /* IO Translation Table Entry 2 */ |
38 | #define IIO_ITTE3 0x00400170 /* IO Translation Table Entry 3 */ | 38 | #define IIO_ITTE3 0x00400170 /* IO Translation Table Entry 3 */ |
39 | #define IIO_ITTE4 0x00400178 /* IO Translation Table Entry 4 */ | 39 | #define IIO_ITTE4 0x00400178 /* IO Translation Table Entry 4 */ |
40 | #define IIO_ITTE5 0x00400180 /* IO Translation Table Entry 5 */ | 40 | #define IIO_ITTE5 0x00400180 /* IO Translation Table Entry 5 */ |
41 | #define IIO_ITTE6 0x00400188 /* IO Translation Table Entry 6 */ | 41 | #define IIO_ITTE6 0x00400188 /* IO Translation Table Entry 6 */ |
42 | #define IIO_ITTE7 0x00400190 /* IO Translation Table Entry 7 */ | 42 | #define IIO_ITTE7 0x00400190 /* IO Translation Table Entry 7 */ |
43 | 43 | ||
44 | #define IIO_IPRB0 0x00400198 /* IO PRB Entry 0 */ | 44 | #define IIO_IPRB0 0x00400198 /* IO PRB Entry 0 */ |
45 | #define IIO_IPRB8 0x004001A0 /* IO PRB Entry 8 */ | 45 | #define IIO_IPRB8 0x004001A0 /* IO PRB Entry 8 */ |
46 | #define IIO_IPRB9 0x004001A8 /* IO PRB Entry 9 */ | 46 | #define IIO_IPRB9 0x004001A8 /* IO PRB Entry 9 */ |
47 | #define IIO_IPRBA 0x004001B0 /* IO PRB Entry A */ | 47 | #define IIO_IPRBA 0x004001B0 /* IO PRB Entry A */ |
48 | #define IIO_IPRBB 0x004001B8 /* IO PRB Entry B */ | 48 | #define IIO_IPRBB 0x004001B8 /* IO PRB Entry B */ |
49 | #define IIO_IPRBC 0x004001C0 /* IO PRB Entry C */ | 49 | #define IIO_IPRBC 0x004001C0 /* IO PRB Entry C */ |
50 | #define IIO_IPRBD 0x004001C8 /* IO PRB Entry D */ | 50 | #define IIO_IPRBD 0x004001C8 /* IO PRB Entry D */ |
51 | #define IIO_IPRBE 0x004001D0 /* IO PRB Entry E */ | 51 | #define IIO_IPRBE 0x004001D0 /* IO PRB Entry E */ |
52 | #define IIO_IPRBF 0x004001D8 /* IO PRB Entry F */ | 52 | #define IIO_IPRBF 0x004001D8 /* IO PRB Entry F */ |
53 | 53 | ||
54 | #define IIO_IXCC 0x004001E0 /* IO Crosstalk Credit Count Timeout */ | 54 | #define IIO_IXCC 0x004001E0 /* IO Crosstalk Credit Count Timeout */ |
55 | #define IIO_IMEM 0x004001E8 /* IO Miscellaneous Error Mask */ | 55 | #define IIO_IMEM 0x004001E8 /* IO Miscellaneous Error Mask */ |
56 | #define IIO_IXTT 0x004001F0 /* IO Crosstalk Timeout Threshold */ | 56 | #define IIO_IXTT 0x004001F0 /* IO Crosstalk Timeout Threshold */ |
57 | #define IIO_IECLR 0x004001F8 /* IO Error Clear Register */ | 57 | #define IIO_IECLR 0x004001F8 /* IO Error Clear Register */ |
58 | #define IIO_IBCR 0x00400200 /* IO BTE Control Register */ | 58 | #define IIO_IBCR 0x00400200 /* IO BTE Control Register */ |
59 | 59 | ||
60 | #define IIO_IXSM 0x00400208 /* IO Crosstalk Spurious Message */ | 60 | #define IIO_IXSM 0x00400208 /* IO Crosstalk Spurious Message */ |
61 | #define IIO_IXSS 0x00400210 /* IO Crosstalk Spurious Sideband */ | 61 | #define IIO_IXSS 0x00400210 /* IO Crosstalk Spurious Sideband */ |
62 | 62 | ||
63 | #define IIO_ILCT 0x00400218 /* IO LLP Channel Test */ | 63 | #define IIO_ILCT 0x00400218 /* IO LLP Channel Test */ |
64 | 64 | ||
65 | #define IIO_IIEPH1 0x00400220 /* IO Incoming Error Packet Header, Part 1 */ | 65 | #define IIO_IIEPH1 0x00400220 /* IO Incoming Error Packet Header, Part 1 */ |
66 | #define IIO_IIEPH2 0x00400228 /* IO Incoming Error Packet Header, Part 2 */ | 66 | #define IIO_IIEPH2 0x00400228 /* IO Incoming Error Packet Header, Part 2 */ |
67 | 67 | ||
68 | 68 | #define IIO_ISLAPR 0x00400230 /* IO SXB Local Access Protection Regster */ | |
69 | #define IIO_ISLAPR 0x00400230 /* IO SXB Local Access Protection Regster */ | 69 | #define IIO_ISLAPO 0x00400238 /* IO SXB Local Access Protection Override */ |
70 | #define IIO_ISLAPO 0x00400238 /* IO SXB Local Access Protection Override */ | 70 | |
71 | 71 | #define IIO_IWI 0x00400240 /* IO Wrapper Interrupt Register */ | |
72 | #define IIO_IWI 0x00400240 /* IO Wrapper Interrupt Register */ | 72 | #define IIO_IWEL 0x00400248 /* IO Wrapper Error Log Register */ |
73 | #define IIO_IWEL 0x00400248 /* IO Wrapper Error Log Register */ | 73 | #define IIO_IWC 0x00400250 /* IO Wrapper Control Register */ |
74 | #define IIO_IWC 0x00400250 /* IO Wrapper Control Register */ | 74 | #define IIO_IWS 0x00400258 /* IO Wrapper Status Register */ |
75 | #define IIO_IWS 0x00400258 /* IO Wrapper Status Register */ | 75 | #define IIO_IWEIM 0x00400260 /* IO Wrapper Error Interrupt Masking Register */ |
76 | #define IIO_IWEIM 0x00400260 /* IO Wrapper Error Interrupt Masking Register */ | 76 | |
77 | 77 | #define IIO_IPCA 0x00400300 /* IO PRB Counter Adjust */ | |
78 | #define IIO_IPCA 0x00400300 /* IO PRB Counter Adjust */ | 78 | |
79 | 79 | #define IIO_IPRTE0_A 0x00400308 /* IO PIO Read Address Table Entry 0, Part A */ | |
80 | #define IIO_IPRTE0_A 0x00400308 /* IO PIO Read Address Table Entry 0, Part A */ | 80 | #define IIO_IPRTE1_A 0x00400310 /* IO PIO Read Address Table Entry 1, Part A */ |
81 | #define IIO_IPRTE1_A 0x00400310 /* IO PIO Read Address Table Entry 1, Part A */ | 81 | #define IIO_IPRTE2_A 0x00400318 /* IO PIO Read Address Table Entry 2, Part A */ |
82 | #define IIO_IPRTE2_A 0x00400318 /* IO PIO Read Address Table Entry 2, Part A */ | 82 | #define IIO_IPRTE3_A 0x00400320 /* IO PIO Read Address Table Entry 3, Part A */ |
83 | #define IIO_IPRTE3_A 0x00400320 /* IO PIO Read Address Table Entry 3, Part A */ | 83 | #define IIO_IPRTE4_A 0x00400328 /* IO PIO Read Address Table Entry 4, Part A */ |
84 | #define IIO_IPRTE4_A 0x00400328 /* IO PIO Read Address Table Entry 4, Part A */ | 84 | #define IIO_IPRTE5_A 0x00400330 /* IO PIO Read Address Table Entry 5, Part A */ |
85 | #define IIO_IPRTE5_A 0x00400330 /* IO PIO Read Address Table Entry 5, Part A */ | 85 | #define IIO_IPRTE6_A 0x00400338 /* IO PIO Read Address Table Entry 6, Part A */ |
86 | #define IIO_IPRTE6_A 0x00400338 /* IO PIO Read Address Table Entry 6, Part A */ | 86 | #define IIO_IPRTE7_A 0x00400340 /* IO PIO Read Address Table Entry 7, Part A */ |
87 | #define IIO_IPRTE7_A 0x00400340 /* IO PIO Read Address Table Entry 7, Part A */ | 87 | |
88 | 88 | #define IIO_IPRTE0_B 0x00400348 /* IO PIO Read Address Table Entry 0, Part B */ | |
89 | #define IIO_IPRTE0_B 0x00400348 /* IO PIO Read Address Table Entry 0, Part B */ | 89 | #define IIO_IPRTE1_B 0x00400350 /* IO PIO Read Address Table Entry 1, Part B */ |
90 | #define IIO_IPRTE1_B 0x00400350 /* IO PIO Read Address Table Entry 1, Part B */ | 90 | #define IIO_IPRTE2_B 0x00400358 /* IO PIO Read Address Table Entry 2, Part B */ |
91 | #define IIO_IPRTE2_B 0x00400358 /* IO PIO Read Address Table Entry 2, Part B */ | 91 | #define IIO_IPRTE3_B 0x00400360 /* IO PIO Read Address Table Entry 3, Part B */ |
92 | #define IIO_IPRTE3_B 0x00400360 /* IO PIO Read Address Table Entry 3, Part B */ | 92 | #define IIO_IPRTE4_B 0x00400368 /* IO PIO Read Address Table Entry 4, Part B */ |
93 | #define IIO_IPRTE4_B 0x00400368 /* IO PIO Read Address Table Entry 4, Part B */ | 93 | #define IIO_IPRTE5_B 0x00400370 /* IO PIO Read Address Table Entry 5, Part B */ |
94 | #define IIO_IPRTE5_B 0x00400370 /* IO PIO Read Address Table Entry 5, Part B */ | 94 | #define IIO_IPRTE6_B 0x00400378 /* IO PIO Read Address Table Entry 6, Part B */ |
95 | #define IIO_IPRTE6_B 0x00400378 /* IO PIO Read Address Table Entry 6, Part B */ | 95 | #define IIO_IPRTE7_B 0x00400380 /* IO PIO Read Address Table Entry 7, Part B */ |
96 | #define IIO_IPRTE7_B 0x00400380 /* IO PIO Read Address Table Entry 7, Part B */ | 96 | |
97 | 97 | #define IIO_IPDR 0x00400388 /* IO PIO Deallocation Register */ | |
98 | #define IIO_IPDR 0x00400388 /* IO PIO Deallocation Register */ | 98 | #define IIO_ICDR 0x00400390 /* IO CRB Entry Deallocation Register */ |
99 | #define IIO_ICDR 0x00400390 /* IO CRB Entry Deallocation Register */ | 99 | #define IIO_IFDR 0x00400398 /* IO IOQ FIFO Depth Register */ |
100 | #define IIO_IFDR 0x00400398 /* IO IOQ FIFO Depth Register */ | 100 | #define IIO_IIAP 0x004003A0 /* IO IIQ Arbitration Parameters */ |
101 | #define IIO_IIAP 0x004003A0 /* IO IIQ Arbitration Parameters */ | 101 | #define IIO_ICMR 0x004003A8 /* IO CRB Management Register */ |
102 | #define IIO_ICMR 0x004003A8 /* IO CRB Management Register */ | 102 | #define IIO_ICCR 0x004003B0 /* IO CRB Control Register */ |
103 | #define IIO_ICCR 0x004003B0 /* IO CRB Control Register */ | 103 | #define IIO_ICTO 0x004003B8 /* IO CRB Timeout */ |
104 | #define IIO_ICTO 0x004003B8 /* IO CRB Timeout */ | 104 | #define IIO_ICTP 0x004003C0 /* IO CRB Timeout Prescalar */ |
105 | #define IIO_ICTP 0x004003C0 /* IO CRB Timeout Prescalar */ | 105 | |
106 | 106 | #define IIO_ICRB0_A 0x00400400 /* IO CRB Entry 0_A */ | |
107 | #define IIO_ICRB0_A 0x00400400 /* IO CRB Entry 0_A */ | 107 | #define IIO_ICRB0_B 0x00400408 /* IO CRB Entry 0_B */ |
108 | #define IIO_ICRB0_B 0x00400408 /* IO CRB Entry 0_B */ | 108 | #define IIO_ICRB0_C 0x00400410 /* IO CRB Entry 0_C */ |
109 | #define IIO_ICRB0_C 0x00400410 /* IO CRB Entry 0_C */ | 109 | #define IIO_ICRB0_D 0x00400418 /* IO CRB Entry 0_D */ |
110 | #define IIO_ICRB0_D 0x00400418 /* IO CRB Entry 0_D */ | 110 | #define IIO_ICRB0_E 0x00400420 /* IO CRB Entry 0_E */ |
111 | #define IIO_ICRB0_E 0x00400420 /* IO CRB Entry 0_E */ | 111 | |
112 | 112 | #define IIO_ICRB1_A 0x00400430 /* IO CRB Entry 1_A */ | |
113 | #define IIO_ICRB1_A 0x00400430 /* IO CRB Entry 1_A */ | 113 | #define IIO_ICRB1_B 0x00400438 /* IO CRB Entry 1_B */ |
114 | #define IIO_ICRB1_B 0x00400438 /* IO CRB Entry 1_B */ | 114 | #define IIO_ICRB1_C 0x00400440 /* IO CRB Entry 1_C */ |
115 | #define IIO_ICRB1_C 0x00400440 /* IO CRB Entry 1_C */ | 115 | #define IIO_ICRB1_D 0x00400448 /* IO CRB Entry 1_D */ |
116 | #define IIO_ICRB1_D 0x00400448 /* IO CRB Entry 1_D */ | 116 | #define IIO_ICRB1_E 0x00400450 /* IO CRB Entry 1_E */ |
117 | #define IIO_ICRB1_E 0x00400450 /* IO CRB Entry 1_E */ | 117 | |
118 | 118 | #define IIO_ICRB2_A 0x00400460 /* IO CRB Entry 2_A */ | |
119 | #define IIO_ICRB2_A 0x00400460 /* IO CRB Entry 2_A */ | 119 | #define IIO_ICRB2_B 0x00400468 /* IO CRB Entry 2_B */ |
120 | #define IIO_ICRB2_B 0x00400468 /* IO CRB Entry 2_B */ | 120 | #define IIO_ICRB2_C 0x00400470 /* IO CRB Entry 2_C */ |
121 | #define IIO_ICRB2_C 0x00400470 /* IO CRB Entry 2_C */ | 121 | #define IIO_ICRB2_D 0x00400478 /* IO CRB Entry 2_D */ |
122 | #define IIO_ICRB2_D 0x00400478 /* IO CRB Entry 2_D */ | 122 | #define IIO_ICRB2_E 0x00400480 /* IO CRB Entry 2_E */ |
123 | #define IIO_ICRB2_E 0x00400480 /* IO CRB Entry 2_E */ | 123 | |
124 | 124 | #define IIO_ICRB3_A 0x00400490 /* IO CRB Entry 3_A */ | |
125 | #define IIO_ICRB3_A 0x00400490 /* IO CRB Entry 3_A */ | 125 | #define IIO_ICRB3_B 0x00400498 /* IO CRB Entry 3_B */ |
126 | #define IIO_ICRB3_B 0x00400498 /* IO CRB Entry 3_B */ | 126 | #define IIO_ICRB3_C 0x004004a0 /* IO CRB Entry 3_C */ |
127 | #define IIO_ICRB3_C 0x004004a0 /* IO CRB Entry 3_C */ | 127 | #define IIO_ICRB3_D 0x004004a8 /* IO CRB Entry 3_D */ |
128 | #define IIO_ICRB3_D 0x004004a8 /* IO CRB Entry 3_D */ | 128 | #define IIO_ICRB3_E 0x004004b0 /* IO CRB Entry 3_E */ |
129 | #define IIO_ICRB3_E 0x004004b0 /* IO CRB Entry 3_E */ | 129 | |
130 | 130 | #define IIO_ICRB4_A 0x004004c0 /* IO CRB Entry 4_A */ | |
131 | #define IIO_ICRB4_A 0x004004c0 /* IO CRB Entry 4_A */ | 131 | #define IIO_ICRB4_B 0x004004c8 /* IO CRB Entry 4_B */ |
132 | #define IIO_ICRB4_B 0x004004c8 /* IO CRB Entry 4_B */ | 132 | #define IIO_ICRB4_C 0x004004d0 /* IO CRB Entry 4_C */ |
133 | #define IIO_ICRB4_C 0x004004d0 /* IO CRB Entry 4_C */ | 133 | #define IIO_ICRB4_D 0x004004d8 /* IO CRB Entry 4_D */ |
134 | #define IIO_ICRB4_D 0x004004d8 /* IO CRB Entry 4_D */ | 134 | #define IIO_ICRB4_E 0x004004e0 /* IO CRB Entry 4_E */ |
135 | #define IIO_ICRB4_E 0x004004e0 /* IO CRB Entry 4_E */ | 135 | |
136 | 136 | #define IIO_ICRB5_A 0x004004f0 /* IO CRB Entry 5_A */ | |
137 | #define IIO_ICRB5_A 0x004004f0 /* IO CRB Entry 5_A */ | 137 | #define IIO_ICRB5_B 0x004004f8 /* IO CRB Entry 5_B */ |
138 | #define IIO_ICRB5_B 0x004004f8 /* IO CRB Entry 5_B */ | 138 | #define IIO_ICRB5_C 0x00400500 /* IO CRB Entry 5_C */ |
139 | #define IIO_ICRB5_C 0x00400500 /* IO CRB Entry 5_C */ | 139 | #define IIO_ICRB5_D 0x00400508 /* IO CRB Entry 5_D */ |
140 | #define IIO_ICRB5_D 0x00400508 /* IO CRB Entry 5_D */ | 140 | #define IIO_ICRB5_E 0x00400510 /* IO CRB Entry 5_E */ |
141 | #define IIO_ICRB5_E 0x00400510 /* IO CRB Entry 5_E */ | 141 | |
142 | 142 | #define IIO_ICRB6_A 0x00400520 /* IO CRB Entry 6_A */ | |
143 | #define IIO_ICRB6_A 0x00400520 /* IO CRB Entry 6_A */ | 143 | #define IIO_ICRB6_B 0x00400528 /* IO CRB Entry 6_B */ |
144 | #define IIO_ICRB6_B 0x00400528 /* IO CRB Entry 6_B */ | 144 | #define IIO_ICRB6_C 0x00400530 /* IO CRB Entry 6_C */ |
145 | #define IIO_ICRB6_C 0x00400530 /* IO CRB Entry 6_C */ | 145 | #define IIO_ICRB6_D 0x00400538 /* IO CRB Entry 6_D */ |
146 | #define IIO_ICRB6_D 0x00400538 /* IO CRB Entry 6_D */ | 146 | #define IIO_ICRB6_E 0x00400540 /* IO CRB Entry 6_E */ |
147 | #define IIO_ICRB6_E 0x00400540 /* IO CRB Entry 6_E */ | 147 | |
148 | 148 | #define IIO_ICRB7_A 0x00400550 /* IO CRB Entry 7_A */ | |
149 | #define IIO_ICRB7_A 0x00400550 /* IO CRB Entry 7_A */ | 149 | #define IIO_ICRB7_B 0x00400558 /* IO CRB Entry 7_B */ |
150 | #define IIO_ICRB7_B 0x00400558 /* IO CRB Entry 7_B */ | 150 | #define IIO_ICRB7_C 0x00400560 /* IO CRB Entry 7_C */ |
151 | #define IIO_ICRB7_C 0x00400560 /* IO CRB Entry 7_C */ | 151 | #define IIO_ICRB7_D 0x00400568 /* IO CRB Entry 7_D */ |
152 | #define IIO_ICRB7_D 0x00400568 /* IO CRB Entry 7_D */ | 152 | #define IIO_ICRB7_E 0x00400570 /* IO CRB Entry 7_E */ |
153 | #define IIO_ICRB7_E 0x00400570 /* IO CRB Entry 7_E */ | 153 | |
154 | 154 | #define IIO_ICRB8_A 0x00400580 /* IO CRB Entry 8_A */ | |
155 | #define IIO_ICRB8_A 0x00400580 /* IO CRB Entry 8_A */ | 155 | #define IIO_ICRB8_B 0x00400588 /* IO CRB Entry 8_B */ |
156 | #define IIO_ICRB8_B 0x00400588 /* IO CRB Entry 8_B */ | 156 | #define IIO_ICRB8_C 0x00400590 /* IO CRB Entry 8_C */ |
157 | #define IIO_ICRB8_C 0x00400590 /* IO CRB Entry 8_C */ | 157 | #define IIO_ICRB8_D 0x00400598 /* IO CRB Entry 8_D */ |
158 | #define IIO_ICRB8_D 0x00400598 /* IO CRB Entry 8_D */ | 158 | #define IIO_ICRB8_E 0x004005a0 /* IO CRB Entry 8_E */ |
159 | #define IIO_ICRB8_E 0x004005a0 /* IO CRB Entry 8_E */ | 159 | |
160 | 160 | #define IIO_ICRB9_A 0x004005b0 /* IO CRB Entry 9_A */ | |
161 | #define IIO_ICRB9_A 0x004005b0 /* IO CRB Entry 9_A */ | 161 | #define IIO_ICRB9_B 0x004005b8 /* IO CRB Entry 9_B */ |
162 | #define IIO_ICRB9_B 0x004005b8 /* IO CRB Entry 9_B */ | 162 | #define IIO_ICRB9_C 0x004005c0 /* IO CRB Entry 9_C */ |
163 | #define IIO_ICRB9_C 0x004005c0 /* IO CRB Entry 9_C */ | 163 | #define IIO_ICRB9_D 0x004005c8 /* IO CRB Entry 9_D */ |
164 | #define IIO_ICRB9_D 0x004005c8 /* IO CRB Entry 9_D */ | 164 | #define IIO_ICRB9_E 0x004005d0 /* IO CRB Entry 9_E */ |
165 | #define IIO_ICRB9_E 0x004005d0 /* IO CRB Entry 9_E */ | 165 | |
166 | 166 | #define IIO_ICRBA_A 0x004005e0 /* IO CRB Entry A_A */ | |
167 | #define IIO_ICRBA_A 0x004005e0 /* IO CRB Entry A_A */ | 167 | #define IIO_ICRBA_B 0x004005e8 /* IO CRB Entry A_B */ |
168 | #define IIO_ICRBA_B 0x004005e8 /* IO CRB Entry A_B */ | 168 | #define IIO_ICRBA_C 0x004005f0 /* IO CRB Entry A_C */ |
169 | #define IIO_ICRBA_C 0x004005f0 /* IO CRB Entry A_C */ | 169 | #define IIO_ICRBA_D 0x004005f8 /* IO CRB Entry A_D */ |
170 | #define IIO_ICRBA_D 0x004005f8 /* IO CRB Entry A_D */ | 170 | #define IIO_ICRBA_E 0x00400600 /* IO CRB Entry A_E */ |
171 | #define IIO_ICRBA_E 0x00400600 /* IO CRB Entry A_E */ | 171 | |
172 | 172 | #define IIO_ICRBB_A 0x00400610 /* IO CRB Entry B_A */ | |
173 | #define IIO_ICRBB_A 0x00400610 /* IO CRB Entry B_A */ | 173 | #define IIO_ICRBB_B 0x00400618 /* IO CRB Entry B_B */ |
174 | #define IIO_ICRBB_B 0x00400618 /* IO CRB Entry B_B */ | 174 | #define IIO_ICRBB_C 0x00400620 /* IO CRB Entry B_C */ |
175 | #define IIO_ICRBB_C 0x00400620 /* IO CRB Entry B_C */ | 175 | #define IIO_ICRBB_D 0x00400628 /* IO CRB Entry B_D */ |
176 | #define IIO_ICRBB_D 0x00400628 /* IO CRB Entry B_D */ | 176 | #define IIO_ICRBB_E 0x00400630 /* IO CRB Entry B_E */ |
177 | #define IIO_ICRBB_E 0x00400630 /* IO CRB Entry B_E */ | 177 | |
178 | 178 | #define IIO_ICRBC_A 0x00400640 /* IO CRB Entry C_A */ | |
179 | #define IIO_ICRBC_A 0x00400640 /* IO CRB Entry C_A */ | 179 | #define IIO_ICRBC_B 0x00400648 /* IO CRB Entry C_B */ |
180 | #define IIO_ICRBC_B 0x00400648 /* IO CRB Entry C_B */ | 180 | #define IIO_ICRBC_C 0x00400650 /* IO CRB Entry C_C */ |
181 | #define IIO_ICRBC_C 0x00400650 /* IO CRB Entry C_C */ | 181 | #define IIO_ICRBC_D 0x00400658 /* IO CRB Entry C_D */ |
182 | #define IIO_ICRBC_D 0x00400658 /* IO CRB Entry C_D */ | 182 | #define IIO_ICRBC_E 0x00400660 /* IO CRB Entry C_E */ |
183 | #define IIO_ICRBC_E 0x00400660 /* IO CRB Entry C_E */ | 183 | |
184 | 184 | #define IIO_ICRBD_A 0x00400670 /* IO CRB Entry D_A */ | |
185 | #define IIO_ICRBD_A 0x00400670 /* IO CRB Entry D_A */ | 185 | #define IIO_ICRBD_B 0x00400678 /* IO CRB Entry D_B */ |
186 | #define IIO_ICRBD_B 0x00400678 /* IO CRB Entry D_B */ | 186 | #define IIO_ICRBD_C 0x00400680 /* IO CRB Entry D_C */ |
187 | #define IIO_ICRBD_C 0x00400680 /* IO CRB Entry D_C */ | 187 | #define IIO_ICRBD_D 0x00400688 /* IO CRB Entry D_D */ |
188 | #define IIO_ICRBD_D 0x00400688 /* IO CRB Entry D_D */ | 188 | #define IIO_ICRBD_E 0x00400690 /* IO CRB Entry D_E */ |
189 | #define IIO_ICRBD_E 0x00400690 /* IO CRB Entry D_E */ | 189 | |
190 | 190 | #define IIO_ICRBE_A 0x004006a0 /* IO CRB Entry E_A */ | |
191 | #define IIO_ICRBE_A 0x004006a0 /* IO CRB Entry E_A */ | 191 | #define IIO_ICRBE_B 0x004006a8 /* IO CRB Entry E_B */ |
192 | #define IIO_ICRBE_B 0x004006a8 /* IO CRB Entry E_B */ | 192 | #define IIO_ICRBE_C 0x004006b0 /* IO CRB Entry E_C */ |
193 | #define IIO_ICRBE_C 0x004006b0 /* IO CRB Entry E_C */ | 193 | #define IIO_ICRBE_D 0x004006b8 /* IO CRB Entry E_D */ |
194 | #define IIO_ICRBE_D 0x004006b8 /* IO CRB Entry E_D */ | 194 | #define IIO_ICRBE_E 0x004006c0 /* IO CRB Entry E_E */ |
195 | #define IIO_ICRBE_E 0x004006c0 /* IO CRB Entry E_E */ | 195 | |
196 | 196 | #define IIO_ICSML 0x00400700 /* IO CRB Spurious Message Low */ | |
197 | #define IIO_ICSML 0x00400700 /* IO CRB Spurious Message Low */ | 197 | #define IIO_ICSMM 0x00400708 /* IO CRB Spurious Message Middle */ |
198 | #define IIO_ICSMM 0x00400708 /* IO CRB Spurious Message Middle */ | 198 | #define IIO_ICSMH 0x00400710 /* IO CRB Spurious Message High */ |
199 | #define IIO_ICSMH 0x00400710 /* IO CRB Spurious Message High */ | 199 | |
200 | 200 | #define IIO_IDBSS 0x00400718 /* IO Debug Submenu Select */ | |
201 | #define IIO_IDBSS 0x00400718 /* IO Debug Submenu Select */ | 201 | |
202 | 202 | #define IIO_IBLS0 0x00410000 /* IO BTE Length Status 0 */ | |
203 | #define IIO_IBLS0 0x00410000 /* IO BTE Length Status 0 */ | 203 | #define IIO_IBSA0 0x00410008 /* IO BTE Source Address 0 */ |
204 | #define IIO_IBSA0 0x00410008 /* IO BTE Source Address 0 */ | 204 | #define IIO_IBDA0 0x00410010 /* IO BTE Destination Address 0 */ |
205 | #define IIO_IBDA0 0x00410010 /* IO BTE Destination Address 0 */ | 205 | #define IIO_IBCT0 0x00410018 /* IO BTE Control Terminate 0 */ |
206 | #define IIO_IBCT0 0x00410018 /* IO BTE Control Terminate 0 */ | 206 | #define IIO_IBNA0 0x00410020 /* IO BTE Notification Address 0 */ |
207 | #define IIO_IBNA0 0x00410020 /* IO BTE Notification Address 0 */ | 207 | #define IIO_IBIA0 0x00410028 /* IO BTE Interrupt Address 0 */ |
208 | #define IIO_IBIA0 0x00410028 /* IO BTE Interrupt Address 0 */ | 208 | #define IIO_IBLS1 0x00420000 /* IO BTE Length Status 1 */ |
209 | #define IIO_IBLS1 0x00420000 /* IO BTE Length Status 1 */ | 209 | #define IIO_IBSA1 0x00420008 /* IO BTE Source Address 1 */ |
210 | #define IIO_IBSA1 0x00420008 /* IO BTE Source Address 1 */ | 210 | #define IIO_IBDA1 0x00420010 /* IO BTE Destination Address 1 */ |
211 | #define IIO_IBDA1 0x00420010 /* IO BTE Destination Address 1 */ | 211 | #define IIO_IBCT1 0x00420018 /* IO BTE Control Terminate 1 */ |
212 | #define IIO_IBCT1 0x00420018 /* IO BTE Control Terminate 1 */ | 212 | #define IIO_IBNA1 0x00420020 /* IO BTE Notification Address 1 */ |
213 | #define IIO_IBNA1 0x00420020 /* IO BTE Notification Address 1 */ | 213 | #define IIO_IBIA1 0x00420028 /* IO BTE Interrupt Address 1 */ |
214 | #define IIO_IBIA1 0x00420028 /* IO BTE Interrupt Address 1 */ | 214 | |
215 | 215 | #define IIO_IPCR 0x00430000 /* IO Performance Control */ | |
216 | #define IIO_IPCR 0x00430000 /* IO Performance Control */ | 216 | #define IIO_IPPR 0x00430008 /* IO Performance Profiling */ |
217 | #define IIO_IPPR 0x00430008 /* IO Performance Profiling */ | 217 | |
218 | 218 | /************************************************************************ | |
219 | 219 | * * | |
220 | /************************************************************************ | ||
221 | * * | ||
222 | * Description: This register echoes some information from the * | 220 | * Description: This register echoes some information from the * |
223 | * LB_REV_ID register. It is available through Crosstalk as described * | 221 | * LB_REV_ID register. It is available through Crosstalk as described * |
224 | * above. The REV_NUM and MFG_NUM fields receive their values from * | 222 | * above. The REV_NUM and MFG_NUM fields receive their values from * |
225 | * the REVISION and MANUFACTURER fields in the LB_REV_ID register. * | 223 | * the REVISION and MANUFACTURER fields in the LB_REV_ID register. * |
226 | * The PART_NUM field's value is the Crosstalk device ID number that * | 224 | * The PART_NUM field's value is the Crosstalk device ID number that * |
227 | * Steve Miller assigned to the SHub chip. * | 225 | * Steve Miller assigned to the SHub chip. * |
228 | * * | 226 | * * |
229 | ************************************************************************/ | 227 | ************************************************************************/ |
230 | 228 | ||
231 | typedef union ii_wid_u { | 229 | typedef union ii_wid_u { |
232 | uint64_t ii_wid_regval; | 230 | uint64_t ii_wid_regval; |
233 | struct { | 231 | struct { |
234 | uint64_t w_rsvd_1 : 1; | 232 | uint64_t w_rsvd_1:1; |
235 | uint64_t w_mfg_num : 11; | 233 | uint64_t w_mfg_num:11; |
236 | uint64_t w_part_num : 16; | 234 | uint64_t w_part_num:16; |
237 | uint64_t w_rev_num : 4; | 235 | uint64_t w_rev_num:4; |
238 | uint64_t w_rsvd : 32; | 236 | uint64_t w_rsvd:32; |
239 | } ii_wid_fld_s; | 237 | } ii_wid_fld_s; |
240 | } ii_wid_u_t; | 238 | } ii_wid_u_t; |
241 | 239 | ||
242 | |||
243 | /************************************************************************ | 240 | /************************************************************************ |
244 | * * | 241 | * * |
245 | * The fields in this register are set upon detection of an error * | 242 | * The fields in this register are set upon detection of an error * |
246 | * and cleared by various mechanisms, as explained in the * | 243 | * and cleared by various mechanisms, as explained in the * |
247 | * description. * | 244 | * description. * |
248 | * * | 245 | * * |
249 | ************************************************************************/ | 246 | ************************************************************************/ |
250 | 247 | ||
251 | typedef union ii_wstat_u { | 248 | typedef union ii_wstat_u { |
252 | uint64_t ii_wstat_regval; | 249 | uint64_t ii_wstat_regval; |
253 | struct { | 250 | struct { |
254 | uint64_t w_pending : 4; | 251 | uint64_t w_pending:4; |
255 | uint64_t w_xt_crd_to : 1; | 252 | uint64_t w_xt_crd_to:1; |
256 | uint64_t w_xt_tail_to : 1; | 253 | uint64_t w_xt_tail_to:1; |
257 | uint64_t w_rsvd_3 : 3; | 254 | uint64_t w_rsvd_3:3; |
258 | uint64_t w_tx_mx_rty : 1; | 255 | uint64_t w_tx_mx_rty:1; |
259 | uint64_t w_rsvd_2 : 6; | 256 | uint64_t w_rsvd_2:6; |
260 | uint64_t w_llp_tx_cnt : 8; | 257 | uint64_t w_llp_tx_cnt:8; |
261 | uint64_t w_rsvd_1 : 8; | 258 | uint64_t w_rsvd_1:8; |
262 | uint64_t w_crazy : 1; | 259 | uint64_t w_crazy:1; |
263 | uint64_t w_rsvd : 31; | 260 | uint64_t w_rsvd:31; |
264 | } ii_wstat_fld_s; | 261 | } ii_wstat_fld_s; |
265 | } ii_wstat_u_t; | 262 | } ii_wstat_u_t; |
266 | 263 | ||
267 | |||
268 | /************************************************************************ | 264 | /************************************************************************ |
269 | * * | 265 | * * |
270 | * Description: This is a read-write enabled register. It controls * | 266 | * Description: This is a read-write enabled register. It controls * |
271 | * various aspects of the Crosstalk flow control. * | 267 | * various aspects of the Crosstalk flow control. * |
272 | * * | 268 | * * |
273 | ************************************************************************/ | 269 | ************************************************************************/ |
274 | 270 | ||
275 | typedef union ii_wcr_u { | 271 | typedef union ii_wcr_u { |
276 | uint64_t ii_wcr_regval; | 272 | uint64_t ii_wcr_regval; |
277 | struct { | 273 | struct { |
278 | uint64_t w_wid : 4; | 274 | uint64_t w_wid:4; |
279 | uint64_t w_tag : 1; | 275 | uint64_t w_tag:1; |
280 | uint64_t w_rsvd_1 : 8; | 276 | uint64_t w_rsvd_1:8; |
281 | uint64_t w_dst_crd : 3; | 277 | uint64_t w_dst_crd:3; |
282 | uint64_t w_f_bad_pkt : 1; | 278 | uint64_t w_f_bad_pkt:1; |
283 | uint64_t w_dir_con : 1; | 279 | uint64_t w_dir_con:1; |
284 | uint64_t w_e_thresh : 5; | 280 | uint64_t w_e_thresh:5; |
285 | uint64_t w_rsvd : 41; | 281 | uint64_t w_rsvd:41; |
286 | } ii_wcr_fld_s; | 282 | } ii_wcr_fld_s; |
287 | } ii_wcr_u_t; | 283 | } ii_wcr_u_t; |
288 | 284 | ||
289 | |||
290 | /************************************************************************ | 285 | /************************************************************************ |
291 | * * | 286 | * * |
292 | * Description: This register's value is a bit vector that guards * | 287 | * Description: This register's value is a bit vector that guards * |
293 | * access to local registers within the II as well as to external * | 288 | * access to local registers within the II as well as to external * |
294 | * Crosstalk widgets. Each bit in the register corresponds to a * | 289 | * Crosstalk widgets. Each bit in the register corresponds to a * |
@@ -311,21 +306,18 @@ typedef union ii_wcr_u { | |||
311 | * region ID bits are enabled in this same register. It can also be * | 306 | * region ID bits are enabled in this same register. It can also be * |
312 | * accessed through the IAlias space by the local processors. * | 307 | * accessed through the IAlias space by the local processors. * |
313 | * The reset value of this register allows access by all nodes. * | 308 | * The reset value of this register allows access by all nodes. * |
314 | * * | 309 | * * |
315 | ************************************************************************/ | 310 | ************************************************************************/ |
316 | 311 | ||
317 | typedef union ii_ilapr_u { | 312 | typedef union ii_ilapr_u { |
318 | uint64_t ii_ilapr_regval; | 313 | uint64_t ii_ilapr_regval; |
319 | struct { | 314 | struct { |
320 | uint64_t i_region : 64; | 315 | uint64_t i_region:64; |
321 | } ii_ilapr_fld_s; | 316 | } ii_ilapr_fld_s; |
322 | } ii_ilapr_u_t; | 317 | } ii_ilapr_u_t; |
323 | 318 | ||
324 | |||
325 | |||
326 | |||
327 | /************************************************************************ | 319 | /************************************************************************ |
328 | * * | 320 | * * |
329 | * Description: A write to this register of the 64-bit value * | 321 | * Description: A write to this register of the 64-bit value * |
330 | * "SGIrules" in ASCII, will cause the bit in the ILAPR register * | 322 | * "SGIrules" in ASCII, will cause the bit in the ILAPR register * |
331 | * corresponding to the region of the requestor to be set (allow * | 323 | * corresponding to the region of the requestor to be set (allow * |
@@ -334,59 +326,54 @@ typedef union ii_ilapr_u { | |||
334 | * This register can also be accessed through the IAlias space. * | 326 | * This register can also be accessed through the IAlias space. * |
335 | * However, this access will not change the access permissions in the * | 327 | * However, this access will not change the access permissions in the * |
336 | * ILAPR. * | 328 | * ILAPR. * |
337 | * * | 329 | * * |
338 | ************************************************************************/ | 330 | ************************************************************************/ |
339 | 331 | ||
340 | typedef union ii_ilapo_u { | 332 | typedef union ii_ilapo_u { |
341 | uint64_t ii_ilapo_regval; | 333 | uint64_t ii_ilapo_regval; |
342 | struct { | 334 | struct { |
343 | uint64_t i_io_ovrride : 64; | 335 | uint64_t i_io_ovrride:64; |
344 | } ii_ilapo_fld_s; | 336 | } ii_ilapo_fld_s; |
345 | } ii_ilapo_u_t; | 337 | } ii_ilapo_u_t; |
346 | 338 | ||
347 | |||
348 | |||
349 | /************************************************************************ | 339 | /************************************************************************ |
350 | * * | 340 | * * |
351 | * This register qualifies all the PIO and Graphics writes launched * | 341 | * This register qualifies all the PIO and Graphics writes launched * |
352 | * from the SHUB towards a widget. * | 342 | * from the SHUB towards a widget. * |
353 | * * | 343 | * * |
354 | ************************************************************************/ | 344 | ************************************************************************/ |
355 | 345 | ||
356 | typedef union ii_iowa_u { | 346 | typedef union ii_iowa_u { |
357 | uint64_t ii_iowa_regval; | 347 | uint64_t ii_iowa_regval; |
358 | struct { | 348 | struct { |
359 | uint64_t i_w0_oac : 1; | 349 | uint64_t i_w0_oac:1; |
360 | uint64_t i_rsvd_1 : 7; | 350 | uint64_t i_rsvd_1:7; |
361 | uint64_t i_wx_oac : 8; | 351 | uint64_t i_wx_oac:8; |
362 | uint64_t i_rsvd : 48; | 352 | uint64_t i_rsvd:48; |
363 | } ii_iowa_fld_s; | 353 | } ii_iowa_fld_s; |
364 | } ii_iowa_u_t; | 354 | } ii_iowa_u_t; |
365 | 355 | ||
366 | |||
367 | /************************************************************************ | 356 | /************************************************************************ |
368 | * * | 357 | * * |
369 | * Description: This register qualifies all the requests launched * | 358 | * Description: This register qualifies all the requests launched * |
370 | * from a widget towards the Shub. This register is intended to be * | 359 | * from a widget towards the Shub. This register is intended to be * |
371 | * used by software in case of misbehaving widgets. * | 360 | * used by software in case of misbehaving widgets. * |
372 | * * | 361 | * * |
373 | * * | 362 | * * |
374 | ************************************************************************/ | 363 | ************************************************************************/ |
375 | 364 | ||
376 | typedef union ii_iiwa_u { | 365 | typedef union ii_iiwa_u { |
377 | uint64_t ii_iiwa_regval; | 366 | uint64_t ii_iiwa_regval; |
378 | struct { | 367 | struct { |
379 | uint64_t i_w0_iac : 1; | 368 | uint64_t i_w0_iac:1; |
380 | uint64_t i_rsvd_1 : 7; | 369 | uint64_t i_rsvd_1:7; |
381 | uint64_t i_wx_iac : 8; | 370 | uint64_t i_wx_iac:8; |
382 | uint64_t i_rsvd : 48; | 371 | uint64_t i_rsvd:48; |
383 | } ii_iiwa_fld_s; | 372 | } ii_iiwa_fld_s; |
384 | } ii_iiwa_u_t; | 373 | } ii_iiwa_u_t; |
385 | 374 | ||
386 | |||
387 | |||
388 | /************************************************************************ | 375 | /************************************************************************ |
389 | * * | 376 | * * |
390 | * Description: This register qualifies all the operations launched * | 377 | * Description: This register qualifies all the operations launched * |
391 | * from a widget towards the SHub. It allows individual access * | 378 | * from a widget towards the SHub. It allows individual access * |
392 | * control for up to 8 devices per widget. A device refers to * | 379 | * control for up to 8 devices per widget. A device refers to * |
@@ -401,72 +388,69 @@ typedef union ii_iiwa_u { | |||
401 | * The bits in this field are set by writing a 1 to them. Incoming * | 388 | * The bits in this field are set by writing a 1 to them. Incoming * |
402 | * replies from Crosstalk are not subject to this access control * | 389 | * replies from Crosstalk are not subject to this access control * |
403 | * mechanism. * | 390 | * mechanism. * |
404 | * * | 391 | * * |
405 | ************************************************************************/ | 392 | ************************************************************************/ |
406 | 393 | ||
407 | typedef union ii_iidem_u { | 394 | typedef union ii_iidem_u { |
408 | uint64_t ii_iidem_regval; | 395 | uint64_t ii_iidem_regval; |
409 | struct { | 396 | struct { |
410 | uint64_t i_w8_dxs : 8; | 397 | uint64_t i_w8_dxs:8; |
411 | uint64_t i_w9_dxs : 8; | 398 | uint64_t i_w9_dxs:8; |
412 | uint64_t i_wa_dxs : 8; | 399 | uint64_t i_wa_dxs:8; |
413 | uint64_t i_wb_dxs : 8; | 400 | uint64_t i_wb_dxs:8; |
414 | uint64_t i_wc_dxs : 8; | 401 | uint64_t i_wc_dxs:8; |
415 | uint64_t i_wd_dxs : 8; | 402 | uint64_t i_wd_dxs:8; |
416 | uint64_t i_we_dxs : 8; | 403 | uint64_t i_we_dxs:8; |
417 | uint64_t i_wf_dxs : 8; | 404 | uint64_t i_wf_dxs:8; |
418 | } ii_iidem_fld_s; | 405 | } ii_iidem_fld_s; |
419 | } ii_iidem_u_t; | 406 | } ii_iidem_u_t; |
420 | 407 | ||
421 | |||
422 | /************************************************************************ | 408 | /************************************************************************ |
423 | * * | 409 | * * |
424 | * This register contains the various programmable fields necessary * | 410 | * This register contains the various programmable fields necessary * |
425 | * for controlling and observing the LLP signals. * | 411 | * for controlling and observing the LLP signals. * |
426 | * * | 412 | * * |
427 | ************************************************************************/ | 413 | ************************************************************************/ |
428 | 414 | ||
429 | typedef union ii_ilcsr_u { | 415 | typedef union ii_ilcsr_u { |
430 | uint64_t ii_ilcsr_regval; | 416 | uint64_t ii_ilcsr_regval; |
431 | struct { | 417 | struct { |
432 | uint64_t i_nullto : 6; | 418 | uint64_t i_nullto:6; |
433 | uint64_t i_rsvd_4 : 2; | 419 | uint64_t i_rsvd_4:2; |
434 | uint64_t i_wrmrst : 1; | 420 | uint64_t i_wrmrst:1; |
435 | uint64_t i_rsvd_3 : 1; | 421 | uint64_t i_rsvd_3:1; |
436 | uint64_t i_llp_en : 1; | 422 | uint64_t i_llp_en:1; |
437 | uint64_t i_bm8 : 1; | 423 | uint64_t i_bm8:1; |
438 | uint64_t i_llp_stat : 2; | 424 | uint64_t i_llp_stat:2; |
439 | uint64_t i_remote_power : 1; | 425 | uint64_t i_remote_power:1; |
440 | uint64_t i_rsvd_2 : 1; | 426 | uint64_t i_rsvd_2:1; |
441 | uint64_t i_maxrtry : 10; | 427 | uint64_t i_maxrtry:10; |
442 | uint64_t i_d_avail_sel : 2; | 428 | uint64_t i_d_avail_sel:2; |
443 | uint64_t i_rsvd_1 : 4; | 429 | uint64_t i_rsvd_1:4; |
444 | uint64_t i_maxbrst : 10; | 430 | uint64_t i_maxbrst:10; |
445 | uint64_t i_rsvd : 22; | 431 | uint64_t i_rsvd:22; |
446 | 432 | ||
447 | } ii_ilcsr_fld_s; | 433 | } ii_ilcsr_fld_s; |
448 | } ii_ilcsr_u_t; | 434 | } ii_ilcsr_u_t; |
449 | 435 | ||
450 | |||
451 | /************************************************************************ | 436 | /************************************************************************ |
452 | * * | 437 | * * |
453 | * This is simply a status registers that monitors the LLP error * | 438 | * This is simply a status registers that monitors the LLP error * |
454 | * rate. * | 439 | * rate. * |
455 | * * | 440 | * * |
456 | ************************************************************************/ | 441 | ************************************************************************/ |
457 | 442 | ||
458 | typedef union ii_illr_u { | 443 | typedef union ii_illr_u { |
459 | uint64_t ii_illr_regval; | 444 | uint64_t ii_illr_regval; |
460 | struct { | 445 | struct { |
461 | uint64_t i_sn_cnt : 16; | 446 | uint64_t i_sn_cnt:16; |
462 | uint64_t i_cb_cnt : 16; | 447 | uint64_t i_cb_cnt:16; |
463 | uint64_t i_rsvd : 32; | 448 | uint64_t i_rsvd:32; |
464 | } ii_illr_fld_s; | 449 | } ii_illr_fld_s; |
465 | } ii_illr_u_t; | 450 | } ii_illr_u_t; |
466 | 451 | ||
467 | |||
468 | /************************************************************************ | 452 | /************************************************************************ |
469 | * * | 453 | * * |
470 | * Description: All II-detected non-BTE error interrupts are * | 454 | * Description: All II-detected non-BTE error interrupts are * |
471 | * specified via this register. * | 455 | * specified via this register. * |
472 | * NOTE: The PI interrupt register address is hardcoded in the II. If * | 456 | * NOTE: The PI interrupt register address is hardcoded in the II. If * |
@@ -476,107 +460,100 @@ typedef union ii_illr_u { | |||
476 | * PI_ID==1, then the II sends the interrupt request to address * | 460 | * PI_ID==1, then the II sends the interrupt request to address * |
477 | * offset 0x01A0_0090 within the local register address space of PI1 * | 461 | * offset 0x01A0_0090 within the local register address space of PI1 * |
478 | * on the node specified by the NODE field. * | 462 | * on the node specified by the NODE field. * |
479 | * * | 463 | * * |
480 | ************************************************************************/ | 464 | ************************************************************************/ |
481 | 465 | ||
482 | typedef union ii_iidsr_u { | 466 | typedef union ii_iidsr_u { |
483 | uint64_t ii_iidsr_regval; | 467 | uint64_t ii_iidsr_regval; |
484 | struct { | 468 | struct { |
485 | uint64_t i_level : 8; | 469 | uint64_t i_level:8; |
486 | uint64_t i_pi_id : 1; | 470 | uint64_t i_pi_id:1; |
487 | uint64_t i_node : 11; | 471 | uint64_t i_node:11; |
488 | uint64_t i_rsvd_3 : 4; | 472 | uint64_t i_rsvd_3:4; |
489 | uint64_t i_enable : 1; | 473 | uint64_t i_enable:1; |
490 | uint64_t i_rsvd_2 : 3; | 474 | uint64_t i_rsvd_2:3; |
491 | uint64_t i_int_sent : 2; | 475 | uint64_t i_int_sent:2; |
492 | uint64_t i_rsvd_1 : 2; | 476 | uint64_t i_rsvd_1:2; |
493 | uint64_t i_pi0_forward_int : 1; | 477 | uint64_t i_pi0_forward_int:1; |
494 | uint64_t i_pi1_forward_int : 1; | 478 | uint64_t i_pi1_forward_int:1; |
495 | uint64_t i_rsvd : 30; | 479 | uint64_t i_rsvd:30; |
496 | } ii_iidsr_fld_s; | 480 | } ii_iidsr_fld_s; |
497 | } ii_iidsr_u_t; | 481 | } ii_iidsr_u_t; |
498 | 482 | ||
499 | |||
500 | |||
501 | /************************************************************************ | 483 | /************************************************************************ |
502 | * * | 484 | * * |
503 | * There are two instances of this register. This register is used * | 485 | * There are two instances of this register. This register is used * |
504 | * for matching up the incoming responses from the graphics widget to * | 486 | * for matching up the incoming responses from the graphics widget to * |
505 | * the processor that initiated the graphics operation. The * | 487 | * the processor that initiated the graphics operation. The * |
506 | * write-responses are converted to graphics credits and returned to * | 488 | * write-responses are converted to graphics credits and returned to * |
507 | * the processor so that the processor interface can manage the flow * | 489 | * the processor so that the processor interface can manage the flow * |
508 | * control. * | 490 | * control. * |
509 | * * | 491 | * * |
510 | ************************************************************************/ | 492 | ************************************************************************/ |
511 | 493 | ||
512 | typedef union ii_igfx0_u { | 494 | typedef union ii_igfx0_u { |
513 | uint64_t ii_igfx0_regval; | 495 | uint64_t ii_igfx0_regval; |
514 | struct { | 496 | struct { |
515 | uint64_t i_w_num : 4; | 497 | uint64_t i_w_num:4; |
516 | uint64_t i_pi_id : 1; | 498 | uint64_t i_pi_id:1; |
517 | uint64_t i_n_num : 12; | 499 | uint64_t i_n_num:12; |
518 | uint64_t i_p_num : 1; | 500 | uint64_t i_p_num:1; |
519 | uint64_t i_rsvd : 46; | 501 | uint64_t i_rsvd:46; |
520 | } ii_igfx0_fld_s; | 502 | } ii_igfx0_fld_s; |
521 | } ii_igfx0_u_t; | 503 | } ii_igfx0_u_t; |
522 | 504 | ||
523 | |||
524 | /************************************************************************ | 505 | /************************************************************************ |
525 | * * | 506 | * * |
526 | * There are two instances of this register. This register is used * | 507 | * There are two instances of this register. This register is used * |
527 | * for matching up the incoming responses from the graphics widget to * | 508 | * for matching up the incoming responses from the graphics widget to * |
528 | * the processor that initiated the graphics operation. The * | 509 | * the processor that initiated the graphics operation. The * |
529 | * write-responses are converted to graphics credits and returned to * | 510 | * write-responses are converted to graphics credits and returned to * |
530 | * the processor so that the processor interface can manage the flow * | 511 | * the processor so that the processor interface can manage the flow * |
531 | * control. * | 512 | * control. * |
532 | * * | 513 | * * |
533 | ************************************************************************/ | 514 | ************************************************************************/ |
534 | 515 | ||
535 | typedef union ii_igfx1_u { | 516 | typedef union ii_igfx1_u { |
536 | uint64_t ii_igfx1_regval; | 517 | uint64_t ii_igfx1_regval; |
537 | struct { | 518 | struct { |
538 | uint64_t i_w_num : 4; | 519 | uint64_t i_w_num:4; |
539 | uint64_t i_pi_id : 1; | 520 | uint64_t i_pi_id:1; |
540 | uint64_t i_n_num : 12; | 521 | uint64_t i_n_num:12; |
541 | uint64_t i_p_num : 1; | 522 | uint64_t i_p_num:1; |
542 | uint64_t i_rsvd : 46; | 523 | uint64_t i_rsvd:46; |
543 | } ii_igfx1_fld_s; | 524 | } ii_igfx1_fld_s; |
544 | } ii_igfx1_u_t; | 525 | } ii_igfx1_u_t; |
545 | 526 | ||
546 | |||
547 | /************************************************************************ | 527 | /************************************************************************ |
548 | * * | 528 | * * |
549 | * There are two instances of this registers. These registers are * | 529 | * There are two instances of this registers. These registers are * |
550 | * used as scratch registers for software use. * | 530 | * used as scratch registers for software use. * |
551 | * * | 531 | * * |
552 | ************************************************************************/ | 532 | ************************************************************************/ |
553 | 533 | ||
554 | typedef union ii_iscr0_u { | 534 | typedef union ii_iscr0_u { |
555 | uint64_t ii_iscr0_regval; | 535 | uint64_t ii_iscr0_regval; |
556 | struct { | 536 | struct { |
557 | uint64_t i_scratch : 64; | 537 | uint64_t i_scratch:64; |
558 | } ii_iscr0_fld_s; | 538 | } ii_iscr0_fld_s; |
559 | } ii_iscr0_u_t; | 539 | } ii_iscr0_u_t; |
560 | 540 | ||
561 | |||
562 | |||
563 | /************************************************************************ | 541 | /************************************************************************ |
564 | * * | 542 | * * |
565 | * There are two instances of this registers. These registers are * | 543 | * There are two instances of this registers. These registers are * |
566 | * used as scratch registers for software use. * | 544 | * used as scratch registers for software use. * |
567 | * * | 545 | * * |
568 | ************************************************************************/ | 546 | ************************************************************************/ |
569 | 547 | ||
570 | typedef union ii_iscr1_u { | 548 | typedef union ii_iscr1_u { |
571 | uint64_t ii_iscr1_regval; | 549 | uint64_t ii_iscr1_regval; |
572 | struct { | 550 | struct { |
573 | uint64_t i_scratch : 64; | 551 | uint64_t i_scratch:64; |
574 | } ii_iscr1_fld_s; | 552 | } ii_iscr1_fld_s; |
575 | } ii_iscr1_u_t; | 553 | } ii_iscr1_u_t; |
576 | 554 | ||
577 | |||
578 | /************************************************************************ | 555 | /************************************************************************ |
579 | * * | 556 | * * |
580 | * Description: There are seven instances of translation table entry * | 557 | * Description: There are seven instances of translation table entry * |
581 | * registers. Each register maps a Shub Big Window to a 48-bit * | 558 | * registers. Each register maps a Shub Big Window to a 48-bit * |
582 | * address on Crosstalk. * | 559 | * address on Crosstalk. * |
@@ -599,23 +576,22 @@ typedef union ii_iscr1_u { | |||
599 | * Crosstalk space addressable by the Shub is thus the lower * | 576 | * Crosstalk space addressable by the Shub is thus the lower * |
600 | * 8-GBytes per widget (N-mode), only <SUP >7</SUP>/<SUB >32nds</SUB> * | 577 | * 8-GBytes per widget (N-mode), only <SUP >7</SUP>/<SUB >32nds</SUB> * |
601 | * of this space can be accessed. * | 578 | * of this space can be accessed. * |
602 | * * | 579 | * * |
603 | ************************************************************************/ | 580 | ************************************************************************/ |
604 | 581 | ||
605 | typedef union ii_itte1_u { | 582 | typedef union ii_itte1_u { |
606 | uint64_t ii_itte1_regval; | 583 | uint64_t ii_itte1_regval; |
607 | struct { | 584 | struct { |
608 | uint64_t i_offset : 5; | 585 | uint64_t i_offset:5; |
609 | uint64_t i_rsvd_1 : 3; | 586 | uint64_t i_rsvd_1:3; |
610 | uint64_t i_w_num : 4; | 587 | uint64_t i_w_num:4; |
611 | uint64_t i_iosp : 1; | 588 | uint64_t i_iosp:1; |
612 | uint64_t i_rsvd : 51; | 589 | uint64_t i_rsvd:51; |
613 | } ii_itte1_fld_s; | 590 | } ii_itte1_fld_s; |
614 | } ii_itte1_u_t; | 591 | } ii_itte1_u_t; |
615 | 592 | ||
616 | |||
617 | /************************************************************************ | 593 | /************************************************************************ |
618 | * * | 594 | * * |
619 | * Description: There are seven instances of translation table entry * | 595 | * Description: There are seven instances of translation table entry * |
620 | * registers. Each register maps a Shub Big Window to a 48-bit * | 596 | * registers. Each register maps a Shub Big Window to a 48-bit * |
621 | * address on Crosstalk. * | 597 | * address on Crosstalk. * |
@@ -638,23 +614,22 @@ typedef union ii_itte1_u { | |||
638 | * Crosstalk space addressable by the Shub is thus the lower * | 614 | * Crosstalk space addressable by the Shub is thus the lower * |
639 | * 8-GBytes per widget (N-mode), only <SUP >7</SUP>/<SUB >32nds</SUB> * | 615 | * 8-GBytes per widget (N-mode), only <SUP >7</SUP>/<SUB >32nds</SUB> * |
640 | * of this space can be accessed. * | 616 | * of this space can be accessed. * |
641 | * * | 617 | * * |
642 | ************************************************************************/ | 618 | ************************************************************************/ |
643 | 619 | ||
644 | typedef union ii_itte2_u { | 620 | typedef union ii_itte2_u { |
645 | uint64_t ii_itte2_regval; | 621 | uint64_t ii_itte2_regval; |
646 | struct { | 622 | struct { |
647 | uint64_t i_offset : 5; | 623 | uint64_t i_offset:5; |
648 | uint64_t i_rsvd_1 : 3; | 624 | uint64_t i_rsvd_1:3; |
649 | uint64_t i_w_num : 4; | 625 | uint64_t i_w_num:4; |
650 | uint64_t i_iosp : 1; | 626 | uint64_t i_iosp:1; |
651 | uint64_t i_rsvd : 51; | 627 | uint64_t i_rsvd:51; |
652 | } ii_itte2_fld_s; | 628 | } ii_itte2_fld_s; |
653 | } ii_itte2_u_t; | 629 | } ii_itte2_u_t; |
654 | 630 | ||
655 | |||
656 | /************************************************************************ | 631 | /************************************************************************ |
657 | * * | 632 | * * |
658 | * Description: There are seven instances of translation table entry * | 633 | * Description: There are seven instances of translation table entry * |
659 | * registers. Each register maps a Shub Big Window to a 48-bit * | 634 | * registers. Each register maps a Shub Big Window to a 48-bit * |
660 | * address on Crosstalk. * | 635 | * address on Crosstalk. * |
@@ -677,23 +652,22 @@ typedef union ii_itte2_u { | |||
677 | * Crosstalk space addressable by the SHub is thus the lower * | 652 | * Crosstalk space addressable by the SHub is thus the lower * |
678 | * 8-GBytes per widget (N-mode), only <SUP >7</SUP>/<SUB >32nds</SUB> * | 653 | * 8-GBytes per widget (N-mode), only <SUP >7</SUP>/<SUB >32nds</SUB> * |
679 | * of this space can be accessed. * | 654 | * of this space can be accessed. * |
680 | * * | 655 | * * |
681 | ************************************************************************/ | 656 | ************************************************************************/ |
682 | 657 | ||
683 | typedef union ii_itte3_u { | 658 | typedef union ii_itte3_u { |
684 | uint64_t ii_itte3_regval; | 659 | uint64_t ii_itte3_regval; |
685 | struct { | 660 | struct { |
686 | uint64_t i_offset : 5; | 661 | uint64_t i_offset:5; |
687 | uint64_t i_rsvd_1 : 3; | 662 | uint64_t i_rsvd_1:3; |
688 | uint64_t i_w_num : 4; | 663 | uint64_t i_w_num:4; |
689 | uint64_t i_iosp : 1; | 664 | uint64_t i_iosp:1; |
690 | uint64_t i_rsvd : 51; | 665 | uint64_t i_rsvd:51; |
691 | } ii_itte3_fld_s; | 666 | } ii_itte3_fld_s; |
692 | } ii_itte3_u_t; | 667 | } ii_itte3_u_t; |
693 | 668 | ||
694 | |||
695 | /************************************************************************ | 669 | /************************************************************************ |
696 | * * | 670 | * * |
697 | * Description: There are seven instances of translation table entry * | 671 | * Description: There are seven instances of translation table entry * |
698 | * registers. Each register maps a SHub Big Window to a 48-bit * | 672 | * registers. Each register maps a SHub Big Window to a 48-bit * |
699 | * address on Crosstalk. * | 673 | * address on Crosstalk. * |
@@ -716,23 +690,22 @@ typedef union ii_itte3_u { | |||
716 | * Crosstalk space addressable by the SHub is thus the lower * | 690 | * Crosstalk space addressable by the SHub is thus the lower * |
717 | * 8-GBytes per widget (N-mode), only <SUP >7</SUP>/<SUB >32nds</SUB> * | 691 | * 8-GBytes per widget (N-mode), only <SUP >7</SUP>/<SUB >32nds</SUB> * |
718 | * of this space can be accessed. * | 692 | * of this space can be accessed. * |
719 | * * | 693 | * * |
720 | ************************************************************************/ | 694 | ************************************************************************/ |
721 | 695 | ||
722 | typedef union ii_itte4_u { | 696 | typedef union ii_itte4_u { |
723 | uint64_t ii_itte4_regval; | 697 | uint64_t ii_itte4_regval; |
724 | struct { | 698 | struct { |
725 | uint64_t i_offset : 5; | 699 | uint64_t i_offset:5; |
726 | uint64_t i_rsvd_1 : 3; | 700 | uint64_t i_rsvd_1:3; |
727 | uint64_t i_w_num : 4; | 701 | uint64_t i_w_num:4; |
728 | uint64_t i_iosp : 1; | 702 | uint64_t i_iosp:1; |
729 | uint64_t i_rsvd : 51; | 703 | uint64_t i_rsvd:51; |
730 | } ii_itte4_fld_s; | 704 | } ii_itte4_fld_s; |
731 | } ii_itte4_u_t; | 705 | } ii_itte4_u_t; |
732 | 706 | ||
733 | |||
734 | /************************************************************************ | 707 | /************************************************************************ |
735 | * * | 708 | * * |
736 | * Description: There are seven instances of translation table entry * | 709 | * Description: There are seven instances of translation table entry * |
737 | * registers. Each register maps a SHub Big Window to a 48-bit * | 710 | * registers. Each register maps a SHub Big Window to a 48-bit * |
738 | * address on Crosstalk. * | 711 | * address on Crosstalk. * |
@@ -755,23 +728,22 @@ typedef union ii_itte4_u { | |||
755 | * Crosstalk space addressable by the Shub is thus the lower * | 728 | * Crosstalk space addressable by the Shub is thus the lower * |
756 | * 8-GBytes per widget (N-mode), only <SUP >7</SUP>/<SUB >32nds</SUB> * | 729 | * 8-GBytes per widget (N-mode), only <SUP >7</SUP>/<SUB >32nds</SUB> * |
757 | * of this space can be accessed. * | 730 | * of this space can be accessed. * |
758 | * * | 731 | * * |
759 | ************************************************************************/ | 732 | ************************************************************************/ |
760 | 733 | ||
761 | typedef union ii_itte5_u { | 734 | typedef union ii_itte5_u { |
762 | uint64_t ii_itte5_regval; | 735 | uint64_t ii_itte5_regval; |
763 | struct { | 736 | struct { |
764 | uint64_t i_offset : 5; | 737 | uint64_t i_offset:5; |
765 | uint64_t i_rsvd_1 : 3; | 738 | uint64_t i_rsvd_1:3; |
766 | uint64_t i_w_num : 4; | 739 | uint64_t i_w_num:4; |
767 | uint64_t i_iosp : 1; | 740 | uint64_t i_iosp:1; |
768 | uint64_t i_rsvd : 51; | 741 | uint64_t i_rsvd:51; |
769 | } ii_itte5_fld_s; | 742 | } ii_itte5_fld_s; |
770 | } ii_itte5_u_t; | 743 | } ii_itte5_u_t; |
771 | 744 | ||
772 | |||
773 | /************************************************************************ | 745 | /************************************************************************ |
774 | * * | 746 | * * |
775 | * Description: There are seven instances of translation table entry * | 747 | * Description: There are seven instances of translation table entry * |
776 | * registers. Each register maps a Shub Big Window to a 48-bit * | 748 | * registers. Each register maps a Shub Big Window to a 48-bit * |
777 | * address on Crosstalk. * | 749 | * address on Crosstalk. * |
@@ -794,23 +766,22 @@ typedef union ii_itte5_u { | |||
794 | * Crosstalk space addressable by the Shub is thus the lower * | 766 | * Crosstalk space addressable by the Shub is thus the lower * |
795 | * 8-GBytes per widget (N-mode), only <SUP >7</SUP>/<SUB >32nds</SUB> * | 767 | * 8-GBytes per widget (N-mode), only <SUP >7</SUP>/<SUB >32nds</SUB> * |
796 | * of this space can be accessed. * | 768 | * of this space can be accessed. * |
797 | * * | 769 | * * |
798 | ************************************************************************/ | 770 | ************************************************************************/ |
799 | 771 | ||
800 | typedef union ii_itte6_u { | 772 | typedef union ii_itte6_u { |
801 | uint64_t ii_itte6_regval; | 773 | uint64_t ii_itte6_regval; |
802 | struct { | 774 | struct { |
803 | uint64_t i_offset : 5; | 775 | uint64_t i_offset:5; |
804 | uint64_t i_rsvd_1 : 3; | 776 | uint64_t i_rsvd_1:3; |
805 | uint64_t i_w_num : 4; | 777 | uint64_t i_w_num:4; |
806 | uint64_t i_iosp : 1; | 778 | uint64_t i_iosp:1; |
807 | uint64_t i_rsvd : 51; | 779 | uint64_t i_rsvd:51; |
808 | } ii_itte6_fld_s; | 780 | } ii_itte6_fld_s; |
809 | } ii_itte6_u_t; | 781 | } ii_itte6_u_t; |
810 | 782 | ||
811 | |||
812 | /************************************************************************ | 783 | /************************************************************************ |
813 | * * | 784 | * * |
814 | * Description: There are seven instances of translation table entry * | 785 | * Description: There are seven instances of translation table entry * |
815 | * registers. Each register maps a Shub Big Window to a 48-bit * | 786 | * registers. Each register maps a Shub Big Window to a 48-bit * |
816 | * address on Crosstalk. * | 787 | * address on Crosstalk. * |
@@ -833,23 +804,22 @@ typedef union ii_itte6_u { | |||
833 | * Crosstalk space addressable by the SHub is thus the lower * | 804 | * Crosstalk space addressable by the SHub is thus the lower * |
834 | * 8-GBytes per widget (N-mode), only <SUP >7</SUP>/<SUB >32nds</SUB> * | 805 | * 8-GBytes per widget (N-mode), only <SUP >7</SUP>/<SUB >32nds</SUB> * |
835 | * of this space can be accessed. * | 806 | * of this space can be accessed. * |
836 | * * | 807 | * * |
837 | ************************************************************************/ | 808 | ************************************************************************/ |
838 | 809 | ||
839 | typedef union ii_itte7_u { | 810 | typedef union ii_itte7_u { |
840 | uint64_t ii_itte7_regval; | 811 | uint64_t ii_itte7_regval; |
841 | struct { | 812 | struct { |
842 | uint64_t i_offset : 5; | 813 | uint64_t i_offset:5; |
843 | uint64_t i_rsvd_1 : 3; | 814 | uint64_t i_rsvd_1:3; |
844 | uint64_t i_w_num : 4; | 815 | uint64_t i_w_num:4; |
845 | uint64_t i_iosp : 1; | 816 | uint64_t i_iosp:1; |
846 | uint64_t i_rsvd : 51; | 817 | uint64_t i_rsvd:51; |
847 | } ii_itte7_fld_s; | 818 | } ii_itte7_fld_s; |
848 | } ii_itte7_u_t; | 819 | } ii_itte7_u_t; |
849 | 820 | ||
850 | |||
851 | /************************************************************************ | 821 | /************************************************************************ |
852 | * * | 822 | * * |
853 | * Description: There are 9 instances of this register, one per * | 823 | * Description: There are 9 instances of this register, one per * |
854 | * actual widget in this implementation of SHub and Crossbow. * | 824 | * actual widget in this implementation of SHub and Crossbow. * |
855 | * Note: Crossbow only has ports for Widgets 8 through F, widget 0 * | 825 | * Note: Crossbow only has ports for Widgets 8 through F, widget 0 * |
@@ -868,33 +838,32 @@ typedef union ii_itte7_u { | |||
868 | * register; the write will correct the C field and capture its new * | 838 | * register; the write will correct the C field and capture its new * |
869 | * value in the internal register. Even if IECLR[E_PRB_x] is set, the * | 839 | * value in the internal register. Even if IECLR[E_PRB_x] is set, the * |
870 | * SPUR_WR bit will persist if IPRBx hasn't yet been written. * | 840 | * SPUR_WR bit will persist if IPRBx hasn't yet been written. * |
871 | * . * | 841 | * . * |
872 | * * | 842 | * * |
873 | ************************************************************************/ | 843 | ************************************************************************/ |
874 | 844 | ||
875 | typedef union ii_iprb0_u { | 845 | typedef union ii_iprb0_u { |
876 | uint64_t ii_iprb0_regval; | 846 | uint64_t ii_iprb0_regval; |
877 | struct { | 847 | struct { |
878 | uint64_t i_c : 8; | 848 | uint64_t i_c:8; |
879 | uint64_t i_na : 14; | 849 | uint64_t i_na:14; |
880 | uint64_t i_rsvd_2 : 2; | 850 | uint64_t i_rsvd_2:2; |
881 | uint64_t i_nb : 14; | 851 | uint64_t i_nb:14; |
882 | uint64_t i_rsvd_1 : 2; | 852 | uint64_t i_rsvd_1:2; |
883 | uint64_t i_m : 2; | 853 | uint64_t i_m:2; |
884 | uint64_t i_f : 1; | 854 | uint64_t i_f:1; |
885 | uint64_t i_of_cnt : 5; | 855 | uint64_t i_of_cnt:5; |
886 | uint64_t i_error : 1; | 856 | uint64_t i_error:1; |
887 | uint64_t i_rd_to : 1; | 857 | uint64_t i_rd_to:1; |
888 | uint64_t i_spur_wr : 1; | 858 | uint64_t i_spur_wr:1; |
889 | uint64_t i_spur_rd : 1; | 859 | uint64_t i_spur_rd:1; |
890 | uint64_t i_rsvd : 11; | 860 | uint64_t i_rsvd:11; |
891 | uint64_t i_mult_err : 1; | 861 | uint64_t i_mult_err:1; |
892 | } ii_iprb0_fld_s; | 862 | } ii_iprb0_fld_s; |
893 | } ii_iprb0_u_t; | 863 | } ii_iprb0_u_t; |
894 | 864 | ||
895 | |||
896 | /************************************************************************ | 865 | /************************************************************************ |
897 | * * | 866 | * * |
898 | * Description: There are 9 instances of this register, one per * | 867 | * Description: There are 9 instances of this register, one per * |
899 | * actual widget in this implementation of SHub and Crossbow. * | 868 | * actual widget in this implementation of SHub and Crossbow. * |
900 | * Note: Crossbow only has ports for Widgets 8 through F, widget 0 * | 869 | * Note: Crossbow only has ports for Widgets 8 through F, widget 0 * |
@@ -913,33 +882,32 @@ typedef union ii_iprb0_u { | |||
913 | * register; the write will correct the C field and capture its new * | 882 | * register; the write will correct the C field and capture its new * |
914 | * value in the internal register. Even if IECLR[E_PRB_x] is set, the * | 883 | * value in the internal register. Even if IECLR[E_PRB_x] is set, the * |
915 | * SPUR_WR bit will persist if IPRBx hasn't yet been written. * | 884 | * SPUR_WR bit will persist if IPRBx hasn't yet been written. * |
916 | * . * | 885 | * . * |
917 | * * | 886 | * * |
918 | ************************************************************************/ | 887 | ************************************************************************/ |
919 | 888 | ||
920 | typedef union ii_iprb8_u { | 889 | typedef union ii_iprb8_u { |
921 | uint64_t ii_iprb8_regval; | 890 | uint64_t ii_iprb8_regval; |
922 | struct { | 891 | struct { |
923 | uint64_t i_c : 8; | 892 | uint64_t i_c:8; |
924 | uint64_t i_na : 14; | 893 | uint64_t i_na:14; |
925 | uint64_t i_rsvd_2 : 2; | 894 | uint64_t i_rsvd_2:2; |
926 | uint64_t i_nb : 14; | 895 | uint64_t i_nb:14; |
927 | uint64_t i_rsvd_1 : 2; | 896 | uint64_t i_rsvd_1:2; |
928 | uint64_t i_m : 2; | 897 | uint64_t i_m:2; |
929 | uint64_t i_f : 1; | 898 | uint64_t i_f:1; |
930 | uint64_t i_of_cnt : 5; | 899 | uint64_t i_of_cnt:5; |
931 | uint64_t i_error : 1; | 900 | uint64_t i_error:1; |
932 | uint64_t i_rd_to : 1; | 901 | uint64_t i_rd_to:1; |
933 | uint64_t i_spur_wr : 1; | 902 | uint64_t i_spur_wr:1; |
934 | uint64_t i_spur_rd : 1; | 903 | uint64_t i_spur_rd:1; |
935 | uint64_t i_rsvd : 11; | 904 | uint64_t i_rsvd:11; |
936 | uint64_t i_mult_err : 1; | 905 | uint64_t i_mult_err:1; |
937 | } ii_iprb8_fld_s; | 906 | } ii_iprb8_fld_s; |
938 | } ii_iprb8_u_t; | 907 | } ii_iprb8_u_t; |
939 | 908 | ||
940 | |||
941 | /************************************************************************ | 909 | /************************************************************************ |
942 | * * | 910 | * * |
943 | * Description: There are 9 instances of this register, one per * | 911 | * Description: There are 9 instances of this register, one per * |
944 | * actual widget in this implementation of SHub and Crossbow. * | 912 | * actual widget in this implementation of SHub and Crossbow. * |
945 | * Note: Crossbow only has ports for Widgets 8 through F, widget 0 * | 913 | * Note: Crossbow only has ports for Widgets 8 through F, widget 0 * |
@@ -958,33 +926,32 @@ typedef union ii_iprb8_u { | |||
958 | * register; the write will correct the C field and capture its new * | 926 | * register; the write will correct the C field and capture its new * |
959 | * value in the internal register. Even if IECLR[E_PRB_x] is set, the * | 927 | * value in the internal register. Even if IECLR[E_PRB_x] is set, the * |
960 | * SPUR_WR bit will persist if IPRBx hasn't yet been written. * | 928 | * SPUR_WR bit will persist if IPRBx hasn't yet been written. * |
961 | * . * | 929 | * . * |
962 | * * | 930 | * * |
963 | ************************************************************************/ | 931 | ************************************************************************/ |
964 | 932 | ||
965 | typedef union ii_iprb9_u { | 933 | typedef union ii_iprb9_u { |
966 | uint64_t ii_iprb9_regval; | 934 | uint64_t ii_iprb9_regval; |
967 | struct { | 935 | struct { |
968 | uint64_t i_c : 8; | 936 | uint64_t i_c:8; |
969 | uint64_t i_na : 14; | 937 | uint64_t i_na:14; |
970 | uint64_t i_rsvd_2 : 2; | 938 | uint64_t i_rsvd_2:2; |
971 | uint64_t i_nb : 14; | 939 | uint64_t i_nb:14; |
972 | uint64_t i_rsvd_1 : 2; | 940 | uint64_t i_rsvd_1:2; |
973 | uint64_t i_m : 2; | 941 | uint64_t i_m:2; |
974 | uint64_t i_f : 1; | 942 | uint64_t i_f:1; |
975 | uint64_t i_of_cnt : 5; | 943 | uint64_t i_of_cnt:5; |
976 | uint64_t i_error : 1; | 944 | uint64_t i_error:1; |
977 | uint64_t i_rd_to : 1; | 945 | uint64_t i_rd_to:1; |
978 | uint64_t i_spur_wr : 1; | 946 | uint64_t i_spur_wr:1; |
979 | uint64_t i_spur_rd : 1; | 947 | uint64_t i_spur_rd:1; |
980 | uint64_t i_rsvd : 11; | 948 | uint64_t i_rsvd:11; |
981 | uint64_t i_mult_err : 1; | 949 | uint64_t i_mult_err:1; |
982 | } ii_iprb9_fld_s; | 950 | } ii_iprb9_fld_s; |
983 | } ii_iprb9_u_t; | 951 | } ii_iprb9_u_t; |
984 | 952 | ||
985 | |||
986 | /************************************************************************ | 953 | /************************************************************************ |
987 | * * | 954 | * * |
988 | * Description: There are 9 instances of this register, one per * | 955 | * Description: There are 9 instances of this register, one per * |
989 | * actual widget in this implementation of SHub and Crossbow. * | 956 | * actual widget in this implementation of SHub and Crossbow. * |
990 | * Note: Crossbow only has ports for Widgets 8 through F, widget 0 * | 957 | * Note: Crossbow only has ports for Widgets 8 through F, widget 0 * |
@@ -1003,33 +970,32 @@ typedef union ii_iprb9_u { | |||
1003 | * register; the write will correct the C field and capture its new * | 970 | * register; the write will correct the C field and capture its new * |
1004 | * value in the internal register. Even if IECLR[E_PRB_x] is set, the * | 971 | * value in the internal register. Even if IECLR[E_PRB_x] is set, the * |
1005 | * SPUR_WR bit will persist if IPRBx hasn't yet been written. * | 972 | * SPUR_WR bit will persist if IPRBx hasn't yet been written. * |
1006 | * * | 973 | * * |
1007 | * * | 974 | * * |
1008 | ************************************************************************/ | 975 | ************************************************************************/ |
1009 | 976 | ||
1010 | typedef union ii_iprba_u { | 977 | typedef union ii_iprba_u { |
1011 | uint64_t ii_iprba_regval; | 978 | uint64_t ii_iprba_regval; |
1012 | struct { | 979 | struct { |
1013 | uint64_t i_c : 8; | 980 | uint64_t i_c:8; |
1014 | uint64_t i_na : 14; | 981 | uint64_t i_na:14; |
1015 | uint64_t i_rsvd_2 : 2; | 982 | uint64_t i_rsvd_2:2; |
1016 | uint64_t i_nb : 14; | 983 | uint64_t i_nb:14; |
1017 | uint64_t i_rsvd_1 : 2; | 984 | uint64_t i_rsvd_1:2; |
1018 | uint64_t i_m : 2; | 985 | uint64_t i_m:2; |
1019 | uint64_t i_f : 1; | 986 | uint64_t i_f:1; |
1020 | uint64_t i_of_cnt : 5; | 987 | uint64_t i_of_cnt:5; |
1021 | uint64_t i_error : 1; | 988 | uint64_t i_error:1; |
1022 | uint64_t i_rd_to : 1; | 989 | uint64_t i_rd_to:1; |
1023 | uint64_t i_spur_wr : 1; | 990 | uint64_t i_spur_wr:1; |
1024 | uint64_t i_spur_rd : 1; | 991 | uint64_t i_spur_rd:1; |
1025 | uint64_t i_rsvd : 11; | 992 | uint64_t i_rsvd:11; |
1026 | uint64_t i_mult_err : 1; | 993 | uint64_t i_mult_err:1; |
1027 | } ii_iprba_fld_s; | 994 | } ii_iprba_fld_s; |
1028 | } ii_iprba_u_t; | 995 | } ii_iprba_u_t; |
1029 | 996 | ||
1030 | |||
1031 | /************************************************************************ | 997 | /************************************************************************ |
1032 | * * | 998 | * * |
1033 | * Description: There are 9 instances of this register, one per * | 999 | * Description: There are 9 instances of this register, one per * |
1034 | * actual widget in this implementation of SHub and Crossbow. * | 1000 | * actual widget in this implementation of SHub and Crossbow. * |
1035 | * Note: Crossbow only has ports for Widgets 8 through F, widget 0 * | 1001 | * Note: Crossbow only has ports for Widgets 8 through F, widget 0 * |
@@ -1048,33 +1014,32 @@ typedef union ii_iprba_u { | |||
1048 | * register; the write will correct the C field and capture its new * | 1014 | * register; the write will correct the C field and capture its new * |
1049 | * value in the internal register. Even if IECLR[E_PRB_x] is set, the * | 1015 | * value in the internal register. Even if IECLR[E_PRB_x] is set, the * |
1050 | * SPUR_WR bit will persist if IPRBx hasn't yet been written. * | 1016 | * SPUR_WR bit will persist if IPRBx hasn't yet been written. * |
1051 | * . * | 1017 | * . * |
1052 | * * | 1018 | * * |
1053 | ************************************************************************/ | 1019 | ************************************************************************/ |
1054 | 1020 | ||
1055 | typedef union ii_iprbb_u { | 1021 | typedef union ii_iprbb_u { |
1056 | uint64_t ii_iprbb_regval; | 1022 | uint64_t ii_iprbb_regval; |
1057 | struct { | 1023 | struct { |
1058 | uint64_t i_c : 8; | 1024 | uint64_t i_c:8; |
1059 | uint64_t i_na : 14; | 1025 | uint64_t i_na:14; |
1060 | uint64_t i_rsvd_2 : 2; | 1026 | uint64_t i_rsvd_2:2; |
1061 | uint64_t i_nb : 14; | 1027 | uint64_t i_nb:14; |
1062 | uint64_t i_rsvd_1 : 2; | 1028 | uint64_t i_rsvd_1:2; |
1063 | uint64_t i_m : 2; | 1029 | uint64_t i_m:2; |
1064 | uint64_t i_f : 1; | 1030 | uint64_t i_f:1; |
1065 | uint64_t i_of_cnt : 5; | 1031 | uint64_t i_of_cnt:5; |
1066 | uint64_t i_error : 1; | 1032 | uint64_t i_error:1; |
1067 | uint64_t i_rd_to : 1; | 1033 | uint64_t i_rd_to:1; |
1068 | uint64_t i_spur_wr : 1; | 1034 | uint64_t i_spur_wr:1; |
1069 | uint64_t i_spur_rd : 1; | 1035 | uint64_t i_spur_rd:1; |
1070 | uint64_t i_rsvd : 11; | 1036 | uint64_t i_rsvd:11; |
1071 | uint64_t i_mult_err : 1; | 1037 | uint64_t i_mult_err:1; |
1072 | } ii_iprbb_fld_s; | 1038 | } ii_iprbb_fld_s; |
1073 | } ii_iprbb_u_t; | 1039 | } ii_iprbb_u_t; |
1074 | 1040 | ||
1075 | |||
1076 | /************************************************************************ | 1041 | /************************************************************************ |
1077 | * * | 1042 | * * |
1078 | * Description: There are 9 instances of this register, one per * | 1043 | * Description: There are 9 instances of this register, one per * |
1079 | * actual widget in this implementation of SHub and Crossbow. * | 1044 | * actual widget in this implementation of SHub and Crossbow. * |
1080 | * Note: Crossbow only has ports for Widgets 8 through F, widget 0 * | 1045 | * Note: Crossbow only has ports for Widgets 8 through F, widget 0 * |
@@ -1093,33 +1058,32 @@ typedef union ii_iprbb_u { | |||
1093 | * register; the write will correct the C field and capture its new * | 1058 | * register; the write will correct the C field and capture its new * |
1094 | * value in the internal register. Even if IECLR[E_PRB_x] is set, the * | 1059 | * value in the internal register. Even if IECLR[E_PRB_x] is set, the * |
1095 | * SPUR_WR bit will persist if IPRBx hasn't yet been written. * | 1060 | * SPUR_WR bit will persist if IPRBx hasn't yet been written. * |
1096 | * . * | 1061 | * . * |
1097 | * * | 1062 | * * |
1098 | ************************************************************************/ | 1063 | ************************************************************************/ |
1099 | 1064 | ||
1100 | typedef union ii_iprbc_u { | 1065 | typedef union ii_iprbc_u { |
1101 | uint64_t ii_iprbc_regval; | 1066 | uint64_t ii_iprbc_regval; |
1102 | struct { | 1067 | struct { |
1103 | uint64_t i_c : 8; | 1068 | uint64_t i_c:8; |
1104 | uint64_t i_na : 14; | 1069 | uint64_t i_na:14; |
1105 | uint64_t i_rsvd_2 : 2; | 1070 | uint64_t i_rsvd_2:2; |
1106 | uint64_t i_nb : 14; | 1071 | uint64_t i_nb:14; |
1107 | uint64_t i_rsvd_1 : 2; | 1072 | uint64_t i_rsvd_1:2; |
1108 | uint64_t i_m : 2; | 1073 | uint64_t i_m:2; |
1109 | uint64_t i_f : 1; | 1074 | uint64_t i_f:1; |
1110 | uint64_t i_of_cnt : 5; | 1075 | uint64_t i_of_cnt:5; |
1111 | uint64_t i_error : 1; | 1076 | uint64_t i_error:1; |
1112 | uint64_t i_rd_to : 1; | 1077 | uint64_t i_rd_to:1; |
1113 | uint64_t i_spur_wr : 1; | 1078 | uint64_t i_spur_wr:1; |
1114 | uint64_t i_spur_rd : 1; | 1079 | uint64_t i_spur_rd:1; |
1115 | uint64_t i_rsvd : 11; | 1080 | uint64_t i_rsvd:11; |
1116 | uint64_t i_mult_err : 1; | 1081 | uint64_t i_mult_err:1; |
1117 | } ii_iprbc_fld_s; | 1082 | } ii_iprbc_fld_s; |
1118 | } ii_iprbc_u_t; | 1083 | } ii_iprbc_u_t; |
1119 | 1084 | ||
1120 | |||
1121 | /************************************************************************ | 1085 | /************************************************************************ |
1122 | * * | 1086 | * * |
1123 | * Description: There are 9 instances of this register, one per * | 1087 | * Description: There are 9 instances of this register, one per * |
1124 | * actual widget in this implementation of SHub and Crossbow. * | 1088 | * actual widget in this implementation of SHub and Crossbow. * |
1125 | * Note: Crossbow only has ports for Widgets 8 through F, widget 0 * | 1089 | * Note: Crossbow only has ports for Widgets 8 through F, widget 0 * |
@@ -1138,33 +1102,32 @@ typedef union ii_iprbc_u { | |||
1138 | * register; the write will correct the C field and capture its new * | 1102 | * register; the write will correct the C field and capture its new * |
1139 | * value in the internal register. Even if IECLR[E_PRB_x] is set, the * | 1103 | * value in the internal register. Even if IECLR[E_PRB_x] is set, the * |
1140 | * SPUR_WR bit will persist if IPRBx hasn't yet been written. * | 1104 | * SPUR_WR bit will persist if IPRBx hasn't yet been written. * |
1141 | * . * | 1105 | * . * |
1142 | * * | 1106 | * * |
1143 | ************************************************************************/ | 1107 | ************************************************************************/ |
1144 | 1108 | ||
1145 | typedef union ii_iprbd_u { | 1109 | typedef union ii_iprbd_u { |
1146 | uint64_t ii_iprbd_regval; | 1110 | uint64_t ii_iprbd_regval; |
1147 | struct { | 1111 | struct { |
1148 | uint64_t i_c : 8; | 1112 | uint64_t i_c:8; |
1149 | uint64_t i_na : 14; | 1113 | uint64_t i_na:14; |
1150 | uint64_t i_rsvd_2 : 2; | 1114 | uint64_t i_rsvd_2:2; |
1151 | uint64_t i_nb : 14; | 1115 | uint64_t i_nb:14; |
1152 | uint64_t i_rsvd_1 : 2; | 1116 | uint64_t i_rsvd_1:2; |
1153 | uint64_t i_m : 2; | 1117 | uint64_t i_m:2; |
1154 | uint64_t i_f : 1; | 1118 | uint64_t i_f:1; |
1155 | uint64_t i_of_cnt : 5; | 1119 | uint64_t i_of_cnt:5; |
1156 | uint64_t i_error : 1; | 1120 | uint64_t i_error:1; |
1157 | uint64_t i_rd_to : 1; | 1121 | uint64_t i_rd_to:1; |
1158 | uint64_t i_spur_wr : 1; | 1122 | uint64_t i_spur_wr:1; |
1159 | uint64_t i_spur_rd : 1; | 1123 | uint64_t i_spur_rd:1; |
1160 | uint64_t i_rsvd : 11; | 1124 | uint64_t i_rsvd:11; |
1161 | uint64_t i_mult_err : 1; | 1125 | uint64_t i_mult_err:1; |
1162 | } ii_iprbd_fld_s; | 1126 | } ii_iprbd_fld_s; |
1163 | } ii_iprbd_u_t; | 1127 | } ii_iprbd_u_t; |
1164 | 1128 | ||
1165 | |||
1166 | /************************************************************************ | 1129 | /************************************************************************ |
1167 | * * | 1130 | * * |
1168 | * Description: There are 9 instances of this register, one per * | 1131 | * Description: There are 9 instances of this register, one per * |
1169 | * actual widget in this implementation of SHub and Crossbow. * | 1132 | * actual widget in this implementation of SHub and Crossbow. * |
1170 | * Note: Crossbow only has ports for Widgets 8 through F, widget 0 * | 1133 | * Note: Crossbow only has ports for Widgets 8 through F, widget 0 * |
@@ -1183,33 +1146,32 @@ typedef union ii_iprbd_u { | |||
1183 | * register; the write will correct the C field and capture its new * | 1146 | * register; the write will correct the C field and capture its new * |
1184 | * value in the internal register. Even if IECLR[E_PRB_x] is set, the * | 1147 | * value in the internal register. Even if IECLR[E_PRB_x] is set, the * |
1185 | * SPUR_WR bit will persist if IPRBx hasn't yet been written. * | 1148 | * SPUR_WR bit will persist if IPRBx hasn't yet been written. * |
1186 | * . * | 1149 | * . * |
1187 | * * | 1150 | * * |
1188 | ************************************************************************/ | 1151 | ************************************************************************/ |
1189 | 1152 | ||
1190 | typedef union ii_iprbe_u { | 1153 | typedef union ii_iprbe_u { |
1191 | uint64_t ii_iprbe_regval; | 1154 | uint64_t ii_iprbe_regval; |
1192 | struct { | 1155 | struct { |
1193 | uint64_t i_c : 8; | 1156 | uint64_t i_c:8; |
1194 | uint64_t i_na : 14; | 1157 | uint64_t i_na:14; |
1195 | uint64_t i_rsvd_2 : 2; | 1158 | uint64_t i_rsvd_2:2; |
1196 | uint64_t i_nb : 14; | 1159 | uint64_t i_nb:14; |
1197 | uint64_t i_rsvd_1 : 2; | 1160 | uint64_t i_rsvd_1:2; |
1198 | uint64_t i_m : 2; | 1161 | uint64_t i_m:2; |
1199 | uint64_t i_f : 1; | 1162 | uint64_t i_f:1; |
1200 | uint64_t i_of_cnt : 5; | 1163 | uint64_t i_of_cnt:5; |
1201 | uint64_t i_error : 1; | 1164 | uint64_t i_error:1; |
1202 | uint64_t i_rd_to : 1; | 1165 | uint64_t i_rd_to:1; |
1203 | uint64_t i_spur_wr : 1; | 1166 | uint64_t i_spur_wr:1; |
1204 | uint64_t i_spur_rd : 1; | 1167 | uint64_t i_spur_rd:1; |
1205 | uint64_t i_rsvd : 11; | 1168 | uint64_t i_rsvd:11; |
1206 | uint64_t i_mult_err : 1; | 1169 | uint64_t i_mult_err:1; |
1207 | } ii_iprbe_fld_s; | 1170 | } ii_iprbe_fld_s; |
1208 | } ii_iprbe_u_t; | 1171 | } ii_iprbe_u_t; |
1209 | 1172 | ||
1210 | |||
1211 | /************************************************************************ | 1173 | /************************************************************************ |
1212 | * * | 1174 | * * |
1213 | * Description: There are 9 instances of this register, one per * | 1175 | * Description: There are 9 instances of this register, one per * |
1214 | * actual widget in this implementation of Shub and Crossbow. * | 1176 | * actual widget in this implementation of Shub and Crossbow. * |
1215 | * Note: Crossbow only has ports for Widgets 8 through F, widget 0 * | 1177 | * Note: Crossbow only has ports for Widgets 8 through F, widget 0 * |
@@ -1228,33 +1190,32 @@ typedef union ii_iprbe_u { | |||
1228 | * register; the write will correct the C field and capture its new * | 1190 | * register; the write will correct the C field and capture its new * |
1229 | * value in the internal register. Even if IECLR[E_PRB_x] is set, the * | 1191 | * value in the internal register. Even if IECLR[E_PRB_x] is set, the * |
1230 | * SPUR_WR bit will persist if IPRBx hasn't yet been written. * | 1192 | * SPUR_WR bit will persist if IPRBx hasn't yet been written. * |
1231 | * . * | 1193 | * . * |
1232 | * * | 1194 | * * |
1233 | ************************************************************************/ | 1195 | ************************************************************************/ |
1234 | 1196 | ||
1235 | typedef union ii_iprbf_u { | 1197 | typedef union ii_iprbf_u { |
1236 | uint64_t ii_iprbf_regval; | 1198 | uint64_t ii_iprbf_regval; |
1237 | struct { | 1199 | struct { |
1238 | uint64_t i_c : 8; | 1200 | uint64_t i_c:8; |
1239 | uint64_t i_na : 14; | 1201 | uint64_t i_na:14; |
1240 | uint64_t i_rsvd_2 : 2; | 1202 | uint64_t i_rsvd_2:2; |
1241 | uint64_t i_nb : 14; | 1203 | uint64_t i_nb:14; |
1242 | uint64_t i_rsvd_1 : 2; | 1204 | uint64_t i_rsvd_1:2; |
1243 | uint64_t i_m : 2; | 1205 | uint64_t i_m:2; |
1244 | uint64_t i_f : 1; | 1206 | uint64_t i_f:1; |
1245 | uint64_t i_of_cnt : 5; | 1207 | uint64_t i_of_cnt:5; |
1246 | uint64_t i_error : 1; | 1208 | uint64_t i_error:1; |
1247 | uint64_t i_rd_to : 1; | 1209 | uint64_t i_rd_to:1; |
1248 | uint64_t i_spur_wr : 1; | 1210 | uint64_t i_spur_wr:1; |
1249 | uint64_t i_spur_rd : 1; | 1211 | uint64_t i_spur_rd:1; |
1250 | uint64_t i_rsvd : 11; | 1212 | uint64_t i_rsvd:11; |
1251 | uint64_t i_mult_err : 1; | 1213 | uint64_t i_mult_err:1; |
1252 | } ii_iprbe_fld_s; | 1214 | } ii_iprbe_fld_s; |
1253 | } ii_iprbf_u_t; | 1215 | } ii_iprbf_u_t; |
1254 | 1216 | ||
1255 | |||
1256 | /************************************************************************ | 1217 | /************************************************************************ |
1257 | * * | 1218 | * * |
1258 | * This register specifies the timeout value to use for monitoring * | 1219 | * This register specifies the timeout value to use for monitoring * |
1259 | * Crosstalk credits which are used outbound to Crosstalk. An * | 1220 | * Crosstalk credits which are used outbound to Crosstalk. An * |
1260 | * internal counter called the Crosstalk Credit Timeout Counter * | 1221 | * internal counter called the Crosstalk Credit Timeout Counter * |
@@ -1267,20 +1228,19 @@ typedef union ii_iprbf_u { | |||
1267 | * Crosstalk Credit Timeout has occurred. The internal counter is not * | 1228 | * Crosstalk Credit Timeout has occurred. The internal counter is not * |
1268 | * readable from software, and stops counting at its maximum value, * | 1229 | * readable from software, and stops counting at its maximum value, * |
1269 | * so it cannot cause more than one interrupt. * | 1230 | * so it cannot cause more than one interrupt. * |
1270 | * * | 1231 | * * |
1271 | ************************************************************************/ | 1232 | ************************************************************************/ |
1272 | 1233 | ||
1273 | typedef union ii_ixcc_u { | 1234 | typedef union ii_ixcc_u { |
1274 | uint64_t ii_ixcc_regval; | 1235 | uint64_t ii_ixcc_regval; |
1275 | struct { | 1236 | struct { |
1276 | uint64_t i_time_out : 26; | 1237 | uint64_t i_time_out:26; |
1277 | uint64_t i_rsvd : 38; | 1238 | uint64_t i_rsvd:38; |
1278 | } ii_ixcc_fld_s; | 1239 | } ii_ixcc_fld_s; |
1279 | } ii_ixcc_u_t; | 1240 | } ii_ixcc_u_t; |
1280 | 1241 | ||
1281 | |||
1282 | /************************************************************************ | 1242 | /************************************************************************ |
1283 | * * | 1243 | * * |
1284 | * Description: This register qualifies all the PIO and DMA * | 1244 | * Description: This register qualifies all the PIO and DMA * |
1285 | * operations launched from widget 0 towards the SHub. In * | 1245 | * operations launched from widget 0 towards the SHub. In * |
1286 | * addition, it also qualifies accesses by the BTE streams. * | 1246 | * addition, it also qualifies accesses by the BTE streams. * |
@@ -1292,27 +1252,25 @@ typedef union ii_ixcc_u { | |||
1292 | * the Wx_IAC field. The bits in this field are set by writing a 1 to * | 1252 | * the Wx_IAC field. The bits in this field are set by writing a 1 to * |
1293 | * them. Incoming replies from Crosstalk are not subject to this * | 1253 | * them. Incoming replies from Crosstalk are not subject to this * |
1294 | * access control mechanism. * | 1254 | * access control mechanism. * |
1295 | * * | 1255 | * * |
1296 | ************************************************************************/ | 1256 | ************************************************************************/ |
1297 | 1257 | ||
1298 | typedef union ii_imem_u { | 1258 | typedef union ii_imem_u { |
1299 | uint64_t ii_imem_regval; | 1259 | uint64_t ii_imem_regval; |
1300 | struct { | 1260 | struct { |
1301 | uint64_t i_w0_esd : 1; | 1261 | uint64_t i_w0_esd:1; |
1302 | uint64_t i_rsvd_3 : 3; | 1262 | uint64_t i_rsvd_3:3; |
1303 | uint64_t i_b0_esd : 1; | 1263 | uint64_t i_b0_esd:1; |
1304 | uint64_t i_rsvd_2 : 3; | 1264 | uint64_t i_rsvd_2:3; |
1305 | uint64_t i_b1_esd : 1; | 1265 | uint64_t i_b1_esd:1; |
1306 | uint64_t i_rsvd_1 : 3; | 1266 | uint64_t i_rsvd_1:3; |
1307 | uint64_t i_clr_precise : 1; | 1267 | uint64_t i_clr_precise:1; |
1308 | uint64_t i_rsvd : 51; | 1268 | uint64_t i_rsvd:51; |
1309 | } ii_imem_fld_s; | 1269 | } ii_imem_fld_s; |
1310 | } ii_imem_u_t; | 1270 | } ii_imem_u_t; |
1311 | 1271 | ||
1312 | |||
1313 | |||
1314 | /************************************************************************ | 1272 | /************************************************************************ |
1315 | * * | 1273 | * * |
1316 | * Description: This register specifies the timeout value to use for * | 1274 | * Description: This register specifies the timeout value to use for * |
1317 | * monitoring Crosstalk tail flits coming into the Shub in the * | 1275 | * monitoring Crosstalk tail flits coming into the Shub in the * |
1318 | * TAIL_TO field. An internal counter associated with this register * | 1276 | * TAIL_TO field. An internal counter associated with this register * |
@@ -1332,90 +1290,87 @@ typedef union ii_imem_u { | |||
1332 | * the value in the RRSP_TO field, a Read Response Timeout has * | 1290 | * the value in the RRSP_TO field, a Read Response Timeout has * |
1333 | * occurred, and error handling occurs as described in the Error * | 1291 | * occurred, and error handling occurs as described in the Error * |
1334 | * Handling section of this document. * | 1292 | * Handling section of this document. * |
1335 | * * | 1293 | * * |
1336 | ************************************************************************/ | 1294 | ************************************************************************/ |
1337 | 1295 | ||
1338 | typedef union ii_ixtt_u { | 1296 | typedef union ii_ixtt_u { |
1339 | uint64_t ii_ixtt_regval; | 1297 | uint64_t ii_ixtt_regval; |
1340 | struct { | 1298 | struct { |
1341 | uint64_t i_tail_to : 26; | 1299 | uint64_t i_tail_to:26; |
1342 | uint64_t i_rsvd_1 : 6; | 1300 | uint64_t i_rsvd_1:6; |
1343 | uint64_t i_rrsp_ps : 23; | 1301 | uint64_t i_rrsp_ps:23; |
1344 | uint64_t i_rrsp_to : 5; | 1302 | uint64_t i_rrsp_to:5; |
1345 | uint64_t i_rsvd : 4; | 1303 | uint64_t i_rsvd:4; |
1346 | } ii_ixtt_fld_s; | 1304 | } ii_ixtt_fld_s; |
1347 | } ii_ixtt_u_t; | 1305 | } ii_ixtt_u_t; |
1348 | 1306 | ||
1349 | |||
1350 | /************************************************************************ | 1307 | /************************************************************************ |
1351 | * * | 1308 | * * |
1352 | * Writing a 1 to the fields of this register clears the appropriate * | 1309 | * Writing a 1 to the fields of this register clears the appropriate * |
1353 | * error bits in other areas of SHub. Note that when the * | 1310 | * error bits in other areas of SHub. Note that when the * |
1354 | * E_PRB_x bits are used to clear error bits in PRB registers, * | 1311 | * E_PRB_x bits are used to clear error bits in PRB registers, * |
1355 | * SPUR_RD and SPUR_WR may persist, because they require additional * | 1312 | * SPUR_RD and SPUR_WR may persist, because they require additional * |
1356 | * action to clear them. See the IPRBx and IXSS Register * | 1313 | * action to clear them. See the IPRBx and IXSS Register * |
1357 | * specifications. * | 1314 | * specifications. * |
1358 | * * | 1315 | * * |
1359 | ************************************************************************/ | 1316 | ************************************************************************/ |
1360 | 1317 | ||
1361 | typedef union ii_ieclr_u { | 1318 | typedef union ii_ieclr_u { |
1362 | uint64_t ii_ieclr_regval; | 1319 | uint64_t ii_ieclr_regval; |
1363 | struct { | 1320 | struct { |
1364 | uint64_t i_e_prb_0 : 1; | 1321 | uint64_t i_e_prb_0:1; |
1365 | uint64_t i_rsvd : 7; | 1322 | uint64_t i_rsvd:7; |
1366 | uint64_t i_e_prb_8 : 1; | 1323 | uint64_t i_e_prb_8:1; |
1367 | uint64_t i_e_prb_9 : 1; | 1324 | uint64_t i_e_prb_9:1; |
1368 | uint64_t i_e_prb_a : 1; | 1325 | uint64_t i_e_prb_a:1; |
1369 | uint64_t i_e_prb_b : 1; | 1326 | uint64_t i_e_prb_b:1; |
1370 | uint64_t i_e_prb_c : 1; | 1327 | uint64_t i_e_prb_c:1; |
1371 | uint64_t i_e_prb_d : 1; | 1328 | uint64_t i_e_prb_d:1; |
1372 | uint64_t i_e_prb_e : 1; | 1329 | uint64_t i_e_prb_e:1; |
1373 | uint64_t i_e_prb_f : 1; | 1330 | uint64_t i_e_prb_f:1; |
1374 | uint64_t i_e_crazy : 1; | 1331 | uint64_t i_e_crazy:1; |
1375 | uint64_t i_e_bte_0 : 1; | 1332 | uint64_t i_e_bte_0:1; |
1376 | uint64_t i_e_bte_1 : 1; | 1333 | uint64_t i_e_bte_1:1; |
1377 | uint64_t i_reserved_1 : 10; | 1334 | uint64_t i_reserved_1:10; |
1378 | uint64_t i_spur_rd_hdr : 1; | 1335 | uint64_t i_spur_rd_hdr:1; |
1379 | uint64_t i_cam_intr_to : 1; | 1336 | uint64_t i_cam_intr_to:1; |
1380 | uint64_t i_cam_overflow : 1; | 1337 | uint64_t i_cam_overflow:1; |
1381 | uint64_t i_cam_read_miss : 1; | 1338 | uint64_t i_cam_read_miss:1; |
1382 | uint64_t i_ioq_rep_underflow : 1; | 1339 | uint64_t i_ioq_rep_underflow:1; |
1383 | uint64_t i_ioq_req_underflow : 1; | 1340 | uint64_t i_ioq_req_underflow:1; |
1384 | uint64_t i_ioq_rep_overflow : 1; | 1341 | uint64_t i_ioq_rep_overflow:1; |
1385 | uint64_t i_ioq_req_overflow : 1; | 1342 | uint64_t i_ioq_req_overflow:1; |
1386 | uint64_t i_iiq_rep_overflow : 1; | 1343 | uint64_t i_iiq_rep_overflow:1; |
1387 | uint64_t i_iiq_req_overflow : 1; | 1344 | uint64_t i_iiq_req_overflow:1; |
1388 | uint64_t i_ii_xn_rep_cred_overflow : 1; | 1345 | uint64_t i_ii_xn_rep_cred_overflow:1; |
1389 | uint64_t i_ii_xn_req_cred_overflow : 1; | 1346 | uint64_t i_ii_xn_req_cred_overflow:1; |
1390 | uint64_t i_ii_xn_invalid_cmd : 1; | 1347 | uint64_t i_ii_xn_invalid_cmd:1; |
1391 | uint64_t i_xn_ii_invalid_cmd : 1; | 1348 | uint64_t i_xn_ii_invalid_cmd:1; |
1392 | uint64_t i_reserved_2 : 21; | 1349 | uint64_t i_reserved_2:21; |
1393 | } ii_ieclr_fld_s; | 1350 | } ii_ieclr_fld_s; |
1394 | } ii_ieclr_u_t; | 1351 | } ii_ieclr_u_t; |
1395 | 1352 | ||
1396 | |||
1397 | /************************************************************************ | 1353 | /************************************************************************ |
1398 | * * | 1354 | * * |
1399 | * This register controls both BTEs. SOFT_RESET is intended for * | 1355 | * This register controls both BTEs. SOFT_RESET is intended for * |
1400 | * recovery after an error. COUNT controls the total number of CRBs * | 1356 | * recovery after an error. COUNT controls the total number of CRBs * |
1401 | * that both BTEs (combined) can use, which affects total BTE * | 1357 | * that both BTEs (combined) can use, which affects total BTE * |
1402 | * bandwidth. * | 1358 | * bandwidth. * |
1403 | * * | 1359 | * * |
1404 | ************************************************************************/ | 1360 | ************************************************************************/ |
1405 | 1361 | ||
1406 | typedef union ii_ibcr_u { | 1362 | typedef union ii_ibcr_u { |
1407 | uint64_t ii_ibcr_regval; | 1363 | uint64_t ii_ibcr_regval; |
1408 | struct { | 1364 | struct { |
1409 | uint64_t i_count : 4; | 1365 | uint64_t i_count:4; |
1410 | uint64_t i_rsvd_1 : 4; | 1366 | uint64_t i_rsvd_1:4; |
1411 | uint64_t i_soft_reset : 1; | 1367 | uint64_t i_soft_reset:1; |
1412 | uint64_t i_rsvd : 55; | 1368 | uint64_t i_rsvd:55; |
1413 | } ii_ibcr_fld_s; | 1369 | } ii_ibcr_fld_s; |
1414 | } ii_ibcr_u_t; | 1370 | } ii_ibcr_u_t; |
1415 | 1371 | ||
1416 | |||
1417 | /************************************************************************ | 1372 | /************************************************************************ |
1418 | * * | 1373 | * * |
1419 | * This register contains the header of a spurious read response * | 1374 | * This register contains the header of a spurious read response * |
1420 | * received from Crosstalk. A spurious read response is defined as a * | 1375 | * received from Crosstalk. A spurious read response is defined as a * |
1421 | * read response received by II from a widget for which (1) the SIDN * | 1376 | * read response received by II from a widget for which (1) the SIDN * |
@@ -1440,49 +1395,47 @@ typedef union ii_ibcr_u { | |||
1440 | * will be set. Any SPUR_RD bits in any other PRB registers indicate * | 1395 | * will be set. Any SPUR_RD bits in any other PRB registers indicate * |
1441 | * spurious messages from other widets which were detected after the * | 1396 | * spurious messages from other widets which were detected after the * |
1442 | * header was captured.. * | 1397 | * header was captured.. * |
1443 | * * | 1398 | * * |
1444 | ************************************************************************/ | 1399 | ************************************************************************/ |
1445 | 1400 | ||
1446 | typedef union ii_ixsm_u { | 1401 | typedef union ii_ixsm_u { |
1447 | uint64_t ii_ixsm_regval; | 1402 | uint64_t ii_ixsm_regval; |
1448 | struct { | 1403 | struct { |
1449 | uint64_t i_byte_en : 32; | 1404 | uint64_t i_byte_en:32; |
1450 | uint64_t i_reserved : 1; | 1405 | uint64_t i_reserved:1; |
1451 | uint64_t i_tag : 3; | 1406 | uint64_t i_tag:3; |
1452 | uint64_t i_alt_pactyp : 4; | 1407 | uint64_t i_alt_pactyp:4; |
1453 | uint64_t i_bo : 1; | 1408 | uint64_t i_bo:1; |
1454 | uint64_t i_error : 1; | 1409 | uint64_t i_error:1; |
1455 | uint64_t i_vbpm : 1; | 1410 | uint64_t i_vbpm:1; |
1456 | uint64_t i_gbr : 1; | 1411 | uint64_t i_gbr:1; |
1457 | uint64_t i_ds : 2; | 1412 | uint64_t i_ds:2; |
1458 | uint64_t i_ct : 1; | 1413 | uint64_t i_ct:1; |
1459 | uint64_t i_tnum : 5; | 1414 | uint64_t i_tnum:5; |
1460 | uint64_t i_pactyp : 4; | 1415 | uint64_t i_pactyp:4; |
1461 | uint64_t i_sidn : 4; | 1416 | uint64_t i_sidn:4; |
1462 | uint64_t i_didn : 4; | 1417 | uint64_t i_didn:4; |
1463 | } ii_ixsm_fld_s; | 1418 | } ii_ixsm_fld_s; |
1464 | } ii_ixsm_u_t; | 1419 | } ii_ixsm_u_t; |
1465 | 1420 | ||
1466 | |||
1467 | /************************************************************************ | 1421 | /************************************************************************ |
1468 | * * | 1422 | * * |
1469 | * This register contains the sideband bits of a spurious read * | 1423 | * This register contains the sideband bits of a spurious read * |
1470 | * response received from Crosstalk. * | 1424 | * response received from Crosstalk. * |
1471 | * * | 1425 | * * |
1472 | ************************************************************************/ | 1426 | ************************************************************************/ |
1473 | 1427 | ||
1474 | typedef union ii_ixss_u { | 1428 | typedef union ii_ixss_u { |
1475 | uint64_t ii_ixss_regval; | 1429 | uint64_t ii_ixss_regval; |
1476 | struct { | 1430 | struct { |
1477 | uint64_t i_sideband : 8; | 1431 | uint64_t i_sideband:8; |
1478 | uint64_t i_rsvd : 55; | 1432 | uint64_t i_rsvd:55; |
1479 | uint64_t i_valid : 1; | 1433 | uint64_t i_valid:1; |
1480 | } ii_ixss_fld_s; | 1434 | } ii_ixss_fld_s; |
1481 | } ii_ixss_u_t; | 1435 | } ii_ixss_u_t; |
1482 | 1436 | ||
1483 | |||
1484 | /************************************************************************ | 1437 | /************************************************************************ |
1485 | * * | 1438 | * * |
1486 | * This register enables software to access the II LLP's test port. * | 1439 | * This register enables software to access the II LLP's test port. * |
1487 | * Refer to the LLP 2.5 documentation for an explanation of the test * | 1440 | * Refer to the LLP 2.5 documentation for an explanation of the test * |
1488 | * port. Software can write to this register to program the values * | 1441 | * port. Software can write to this register to program the values * |
@@ -1490,27 +1443,26 @@ typedef union ii_ixss_u { | |||
1490 | * TestMask and TestSeed). Similarly, software can read from this * | 1443 | * TestMask and TestSeed). Similarly, software can read from this * |
1491 | * register to obtain the values of the test port's status outputs * | 1444 | * register to obtain the values of the test port's status outputs * |
1492 | * (TestCBerr, TestValid and TestData). * | 1445 | * (TestCBerr, TestValid and TestData). * |
1493 | * * | 1446 | * * |
1494 | ************************************************************************/ | 1447 | ************************************************************************/ |
1495 | 1448 | ||
1496 | typedef union ii_ilct_u { | 1449 | typedef union ii_ilct_u { |
1497 | uint64_t ii_ilct_regval; | 1450 | uint64_t ii_ilct_regval; |
1498 | struct { | 1451 | struct { |
1499 | uint64_t i_test_seed : 20; | 1452 | uint64_t i_test_seed:20; |
1500 | uint64_t i_test_mask : 8; | 1453 | uint64_t i_test_mask:8; |
1501 | uint64_t i_test_data : 20; | 1454 | uint64_t i_test_data:20; |
1502 | uint64_t i_test_valid : 1; | 1455 | uint64_t i_test_valid:1; |
1503 | uint64_t i_test_cberr : 1; | 1456 | uint64_t i_test_cberr:1; |
1504 | uint64_t i_test_flit : 3; | 1457 | uint64_t i_test_flit:3; |
1505 | uint64_t i_test_clear : 1; | 1458 | uint64_t i_test_clear:1; |
1506 | uint64_t i_test_err_capture : 1; | 1459 | uint64_t i_test_err_capture:1; |
1507 | uint64_t i_rsvd : 9; | 1460 | uint64_t i_rsvd:9; |
1508 | } ii_ilct_fld_s; | 1461 | } ii_ilct_fld_s; |
1509 | } ii_ilct_u_t; | 1462 | } ii_ilct_u_t; |
1510 | 1463 | ||
1511 | |||
1512 | /************************************************************************ | 1464 | /************************************************************************ |
1513 | * * | 1465 | * * |
1514 | * If the II detects an illegal incoming Duplonet packet (request or * | 1466 | * If the II detects an illegal incoming Duplonet packet (request or * |
1515 | * reply) when VALID==0 in the IIEPH1 register, then it saves the * | 1467 | * reply) when VALID==0 in the IIEPH1 register, then it saves the * |
1516 | * contents of the packet's header flit in the IIEPH1 and IIEPH2 * | 1468 | * contents of the packet's header flit in the IIEPH1 and IIEPH2 * |
@@ -1526,575 +1478,549 @@ typedef union ii_ilct_u { | |||
1526 | * packet when VALID==1 in the IIEPH1 register, then it merely sets * | 1478 | * packet when VALID==1 in the IIEPH1 register, then it merely sets * |
1527 | * the OVERRUN bit to indicate that a subsequent error has happened, * | 1479 | * the OVERRUN bit to indicate that a subsequent error has happened, * |
1528 | * and does nothing further. * | 1480 | * and does nothing further. * |
1529 | * * | 1481 | * * |
1530 | ************************************************************************/ | 1482 | ************************************************************************/ |
1531 | 1483 | ||
1532 | typedef union ii_iieph1_u { | 1484 | typedef union ii_iieph1_u { |
1533 | uint64_t ii_iieph1_regval; | 1485 | uint64_t ii_iieph1_regval; |
1534 | struct { | 1486 | struct { |
1535 | uint64_t i_command : 7; | 1487 | uint64_t i_command:7; |
1536 | uint64_t i_rsvd_5 : 1; | 1488 | uint64_t i_rsvd_5:1; |
1537 | uint64_t i_suppl : 14; | 1489 | uint64_t i_suppl:14; |
1538 | uint64_t i_rsvd_4 : 1; | 1490 | uint64_t i_rsvd_4:1; |
1539 | uint64_t i_source : 14; | 1491 | uint64_t i_source:14; |
1540 | uint64_t i_rsvd_3 : 1; | 1492 | uint64_t i_rsvd_3:1; |
1541 | uint64_t i_err_type : 4; | 1493 | uint64_t i_err_type:4; |
1542 | uint64_t i_rsvd_2 : 4; | 1494 | uint64_t i_rsvd_2:4; |
1543 | uint64_t i_overrun : 1; | 1495 | uint64_t i_overrun:1; |
1544 | uint64_t i_rsvd_1 : 3; | 1496 | uint64_t i_rsvd_1:3; |
1545 | uint64_t i_valid : 1; | 1497 | uint64_t i_valid:1; |
1546 | uint64_t i_rsvd : 13; | 1498 | uint64_t i_rsvd:13; |
1547 | } ii_iieph1_fld_s; | 1499 | } ii_iieph1_fld_s; |
1548 | } ii_iieph1_u_t; | 1500 | } ii_iieph1_u_t; |
1549 | 1501 | ||
1550 | |||
1551 | /************************************************************************ | 1502 | /************************************************************************ |
1552 | * * | 1503 | * * |
1553 | * This register holds the Address field from the header flit of an * | 1504 | * This register holds the Address field from the header flit of an * |
1554 | * incoming erroneous Duplonet packet, along with the tail bit which * | 1505 | * incoming erroneous Duplonet packet, along with the tail bit which * |
1555 | * accompanied this header flit. This register is essentially an * | 1506 | * accompanied this header flit. This register is essentially an * |
1556 | * extension of IIEPH1. Two registers were necessary because the 64 * | 1507 | * extension of IIEPH1. Two registers were necessary because the 64 * |
1557 | * bits available in only a single register were insufficient to * | 1508 | * bits available in only a single register were insufficient to * |
1558 | * capture the entire header flit of an erroneous packet. * | 1509 | * capture the entire header flit of an erroneous packet. * |
1559 | * * | 1510 | * * |
1560 | ************************************************************************/ | 1511 | ************************************************************************/ |
1561 | 1512 | ||
1562 | typedef union ii_iieph2_u { | 1513 | typedef union ii_iieph2_u { |
1563 | uint64_t ii_iieph2_regval; | 1514 | uint64_t ii_iieph2_regval; |
1564 | struct { | 1515 | struct { |
1565 | uint64_t i_rsvd_0 : 3; | 1516 | uint64_t i_rsvd_0:3; |
1566 | uint64_t i_address : 47; | 1517 | uint64_t i_address:47; |
1567 | uint64_t i_rsvd_1 : 10; | 1518 | uint64_t i_rsvd_1:10; |
1568 | uint64_t i_tail : 1; | 1519 | uint64_t i_tail:1; |
1569 | uint64_t i_rsvd : 3; | 1520 | uint64_t i_rsvd:3; |
1570 | } ii_iieph2_fld_s; | 1521 | } ii_iieph2_fld_s; |
1571 | } ii_iieph2_u_t; | 1522 | } ii_iieph2_u_t; |
1572 | 1523 | ||
1573 | |||
1574 | /******************************/ | 1524 | /******************************/ |
1575 | 1525 | ||
1576 | |||
1577 | |||
1578 | /************************************************************************ | 1526 | /************************************************************************ |
1579 | * * | 1527 | * * |
1580 | * This register's value is a bit vector that guards access from SXBs * | 1528 | * This register's value is a bit vector that guards access from SXBs * |
1581 | * to local registers within the II as well as to external Crosstalk * | 1529 | * to local registers within the II as well as to external Crosstalk * |
1582 | * widgets * | 1530 | * widgets * |
1583 | * * | 1531 | * * |
1584 | ************************************************************************/ | 1532 | ************************************************************************/ |
1585 | 1533 | ||
1586 | typedef union ii_islapr_u { | 1534 | typedef union ii_islapr_u { |
1587 | uint64_t ii_islapr_regval; | 1535 | uint64_t ii_islapr_regval; |
1588 | struct { | 1536 | struct { |
1589 | uint64_t i_region : 64; | 1537 | uint64_t i_region:64; |
1590 | } ii_islapr_fld_s; | 1538 | } ii_islapr_fld_s; |
1591 | } ii_islapr_u_t; | 1539 | } ii_islapr_u_t; |
1592 | 1540 | ||
1593 | |||
1594 | /************************************************************************ | 1541 | /************************************************************************ |
1595 | * * | 1542 | * * |
1596 | * A write to this register of the 56-bit value "Pup+Bun" will cause * | 1543 | * A write to this register of the 56-bit value "Pup+Bun" will cause * |
1597 | * the bit in the ISLAPR register corresponding to the region of the * | 1544 | * the bit in the ISLAPR register corresponding to the region of the * |
1598 | * requestor to be set (access allowed). ( | 1545 | * requestor to be set (access allowed). ( |
1599 | * * | 1546 | * * |
1600 | ************************************************************************/ | 1547 | ************************************************************************/ |
1601 | 1548 | ||
1602 | typedef union ii_islapo_u { | 1549 | typedef union ii_islapo_u { |
1603 | uint64_t ii_islapo_regval; | 1550 | uint64_t ii_islapo_regval; |
1604 | struct { | 1551 | struct { |
1605 | uint64_t i_io_sbx_ovrride : 56; | 1552 | uint64_t i_io_sbx_ovrride:56; |
1606 | uint64_t i_rsvd : 8; | 1553 | uint64_t i_rsvd:8; |
1607 | } ii_islapo_fld_s; | 1554 | } ii_islapo_fld_s; |
1608 | } ii_islapo_u_t; | 1555 | } ii_islapo_u_t; |
1609 | 1556 | ||
1610 | /************************************************************************ | 1557 | /************************************************************************ |
1611 | * * | 1558 | * * |
1612 | * Determines how long the wrapper will wait aftr an interrupt is * | 1559 | * Determines how long the wrapper will wait aftr an interrupt is * |
1613 | * initially issued from the II before it times out the outstanding * | 1560 | * initially issued from the II before it times out the outstanding * |
1614 | * interrupt and drops it from the interrupt queue. * | 1561 | * interrupt and drops it from the interrupt queue. * |
1615 | * * | 1562 | * * |
1616 | ************************************************************************/ | 1563 | ************************************************************************/ |
1617 | 1564 | ||
1618 | typedef union ii_iwi_u { | 1565 | typedef union ii_iwi_u { |
1619 | uint64_t ii_iwi_regval; | 1566 | uint64_t ii_iwi_regval; |
1620 | struct { | 1567 | struct { |
1621 | uint64_t i_prescale : 24; | 1568 | uint64_t i_prescale:24; |
1622 | uint64_t i_rsvd : 8; | 1569 | uint64_t i_rsvd:8; |
1623 | uint64_t i_timeout : 8; | 1570 | uint64_t i_timeout:8; |
1624 | uint64_t i_rsvd1 : 8; | 1571 | uint64_t i_rsvd1:8; |
1625 | uint64_t i_intrpt_retry_period : 8; | 1572 | uint64_t i_intrpt_retry_period:8; |
1626 | uint64_t i_rsvd2 : 8; | 1573 | uint64_t i_rsvd2:8; |
1627 | } ii_iwi_fld_s; | 1574 | } ii_iwi_fld_s; |
1628 | } ii_iwi_u_t; | 1575 | } ii_iwi_u_t; |
1629 | 1576 | ||
1630 | /************************************************************************ | 1577 | /************************************************************************ |
1631 | * * | 1578 | * * |
1632 | * Log errors which have occurred in the II wrapper. The errors are * | 1579 | * Log errors which have occurred in the II wrapper. The errors are * |
1633 | * cleared by writing to the IECLR register. * | 1580 | * cleared by writing to the IECLR register. * |
1634 | * * | 1581 | * * |
1635 | ************************************************************************/ | 1582 | ************************************************************************/ |
1636 | 1583 | ||
1637 | typedef union ii_iwel_u { | 1584 | typedef union ii_iwel_u { |
1638 | uint64_t ii_iwel_regval; | 1585 | uint64_t ii_iwel_regval; |
1639 | struct { | 1586 | struct { |
1640 | uint64_t i_intr_timed_out : 1; | 1587 | uint64_t i_intr_timed_out:1; |
1641 | uint64_t i_rsvd : 7; | 1588 | uint64_t i_rsvd:7; |
1642 | uint64_t i_cam_overflow : 1; | 1589 | uint64_t i_cam_overflow:1; |
1643 | uint64_t i_cam_read_miss : 1; | 1590 | uint64_t i_cam_read_miss:1; |
1644 | uint64_t i_rsvd1 : 2; | 1591 | uint64_t i_rsvd1:2; |
1645 | uint64_t i_ioq_rep_underflow : 1; | 1592 | uint64_t i_ioq_rep_underflow:1; |
1646 | uint64_t i_ioq_req_underflow : 1; | 1593 | uint64_t i_ioq_req_underflow:1; |
1647 | uint64_t i_ioq_rep_overflow : 1; | 1594 | uint64_t i_ioq_rep_overflow:1; |
1648 | uint64_t i_ioq_req_overflow : 1; | 1595 | uint64_t i_ioq_req_overflow:1; |
1649 | uint64_t i_iiq_rep_overflow : 1; | 1596 | uint64_t i_iiq_rep_overflow:1; |
1650 | uint64_t i_iiq_req_overflow : 1; | 1597 | uint64_t i_iiq_req_overflow:1; |
1651 | uint64_t i_rsvd2 : 6; | 1598 | uint64_t i_rsvd2:6; |
1652 | uint64_t i_ii_xn_rep_cred_over_under: 1; | 1599 | uint64_t i_ii_xn_rep_cred_over_under:1; |
1653 | uint64_t i_ii_xn_req_cred_over_under: 1; | 1600 | uint64_t i_ii_xn_req_cred_over_under:1; |
1654 | uint64_t i_rsvd3 : 6; | 1601 | uint64_t i_rsvd3:6; |
1655 | uint64_t i_ii_xn_invalid_cmd : 1; | 1602 | uint64_t i_ii_xn_invalid_cmd:1; |
1656 | uint64_t i_xn_ii_invalid_cmd : 1; | 1603 | uint64_t i_xn_ii_invalid_cmd:1; |
1657 | uint64_t i_rsvd4 : 30; | 1604 | uint64_t i_rsvd4:30; |
1658 | } ii_iwel_fld_s; | 1605 | } ii_iwel_fld_s; |
1659 | } ii_iwel_u_t; | 1606 | } ii_iwel_u_t; |
1660 | 1607 | ||
1661 | /************************************************************************ | 1608 | /************************************************************************ |
1662 | * * | 1609 | * * |
1663 | * Controls the II wrapper. * | 1610 | * Controls the II wrapper. * |
1664 | * * | 1611 | * * |
1665 | ************************************************************************/ | 1612 | ************************************************************************/ |
1666 | 1613 | ||
1667 | typedef union ii_iwc_u { | 1614 | typedef union ii_iwc_u { |
1668 | uint64_t ii_iwc_regval; | 1615 | uint64_t ii_iwc_regval; |
1669 | struct { | 1616 | struct { |
1670 | uint64_t i_dma_byte_swap : 1; | 1617 | uint64_t i_dma_byte_swap:1; |
1671 | uint64_t i_rsvd : 3; | 1618 | uint64_t i_rsvd:3; |
1672 | uint64_t i_cam_read_lines_reset : 1; | 1619 | uint64_t i_cam_read_lines_reset:1; |
1673 | uint64_t i_rsvd1 : 3; | 1620 | uint64_t i_rsvd1:3; |
1674 | uint64_t i_ii_xn_cred_over_under_log: 1; | 1621 | uint64_t i_ii_xn_cred_over_under_log:1; |
1675 | uint64_t i_rsvd2 : 19; | 1622 | uint64_t i_rsvd2:19; |
1676 | uint64_t i_xn_rep_iq_depth : 5; | 1623 | uint64_t i_xn_rep_iq_depth:5; |
1677 | uint64_t i_rsvd3 : 3; | 1624 | uint64_t i_rsvd3:3; |
1678 | uint64_t i_xn_req_iq_depth : 5; | 1625 | uint64_t i_xn_req_iq_depth:5; |
1679 | uint64_t i_rsvd4 : 3; | 1626 | uint64_t i_rsvd4:3; |
1680 | uint64_t i_iiq_depth : 6; | 1627 | uint64_t i_iiq_depth:6; |
1681 | uint64_t i_rsvd5 : 12; | 1628 | uint64_t i_rsvd5:12; |
1682 | uint64_t i_force_rep_cred : 1; | 1629 | uint64_t i_force_rep_cred:1; |
1683 | uint64_t i_force_req_cred : 1; | 1630 | uint64_t i_force_req_cred:1; |
1684 | } ii_iwc_fld_s; | 1631 | } ii_iwc_fld_s; |
1685 | } ii_iwc_u_t; | 1632 | } ii_iwc_u_t; |
1686 | 1633 | ||
1687 | /************************************************************************ | 1634 | /************************************************************************ |
1688 | * * | 1635 | * * |
1689 | * Status in the II wrapper. * | 1636 | * Status in the II wrapper. * |
1690 | * * | 1637 | * * |
1691 | ************************************************************************/ | 1638 | ************************************************************************/ |
1692 | 1639 | ||
1693 | typedef union ii_iws_u { | 1640 | typedef union ii_iws_u { |
1694 | uint64_t ii_iws_regval; | 1641 | uint64_t ii_iws_regval; |
1695 | struct { | 1642 | struct { |
1696 | uint64_t i_xn_rep_iq_credits : 5; | 1643 | uint64_t i_xn_rep_iq_credits:5; |
1697 | uint64_t i_rsvd : 3; | 1644 | uint64_t i_rsvd:3; |
1698 | uint64_t i_xn_req_iq_credits : 5; | 1645 | uint64_t i_xn_req_iq_credits:5; |
1699 | uint64_t i_rsvd1 : 51; | 1646 | uint64_t i_rsvd1:51; |
1700 | } ii_iws_fld_s; | 1647 | } ii_iws_fld_s; |
1701 | } ii_iws_u_t; | 1648 | } ii_iws_u_t; |
1702 | 1649 | ||
1703 | /************************************************************************ | 1650 | /************************************************************************ |
1704 | * * | 1651 | * * |
1705 | * Masks errors in the IWEL register. * | 1652 | * Masks errors in the IWEL register. * |
1706 | * * | 1653 | * * |
1707 | ************************************************************************/ | 1654 | ************************************************************************/ |
1708 | 1655 | ||
1709 | typedef union ii_iweim_u { | 1656 | typedef union ii_iweim_u { |
1710 | uint64_t ii_iweim_regval; | 1657 | uint64_t ii_iweim_regval; |
1711 | struct { | 1658 | struct { |
1712 | uint64_t i_intr_timed_out : 1; | 1659 | uint64_t i_intr_timed_out:1; |
1713 | uint64_t i_rsvd : 7; | 1660 | uint64_t i_rsvd:7; |
1714 | uint64_t i_cam_overflow : 1; | 1661 | uint64_t i_cam_overflow:1; |
1715 | uint64_t i_cam_read_miss : 1; | 1662 | uint64_t i_cam_read_miss:1; |
1716 | uint64_t i_rsvd1 : 2; | 1663 | uint64_t i_rsvd1:2; |
1717 | uint64_t i_ioq_rep_underflow : 1; | 1664 | uint64_t i_ioq_rep_underflow:1; |
1718 | uint64_t i_ioq_req_underflow : 1; | 1665 | uint64_t i_ioq_req_underflow:1; |
1719 | uint64_t i_ioq_rep_overflow : 1; | 1666 | uint64_t i_ioq_rep_overflow:1; |
1720 | uint64_t i_ioq_req_overflow : 1; | 1667 | uint64_t i_ioq_req_overflow:1; |
1721 | uint64_t i_iiq_rep_overflow : 1; | 1668 | uint64_t i_iiq_rep_overflow:1; |
1722 | uint64_t i_iiq_req_overflow : 1; | 1669 | uint64_t i_iiq_req_overflow:1; |
1723 | uint64_t i_rsvd2 : 6; | 1670 | uint64_t i_rsvd2:6; |
1724 | uint64_t i_ii_xn_rep_cred_overflow : 1; | 1671 | uint64_t i_ii_xn_rep_cred_overflow:1; |
1725 | uint64_t i_ii_xn_req_cred_overflow : 1; | 1672 | uint64_t i_ii_xn_req_cred_overflow:1; |
1726 | uint64_t i_rsvd3 : 6; | 1673 | uint64_t i_rsvd3:6; |
1727 | uint64_t i_ii_xn_invalid_cmd : 1; | 1674 | uint64_t i_ii_xn_invalid_cmd:1; |
1728 | uint64_t i_xn_ii_invalid_cmd : 1; | 1675 | uint64_t i_xn_ii_invalid_cmd:1; |
1729 | uint64_t i_rsvd4 : 30; | 1676 | uint64_t i_rsvd4:30; |
1730 | } ii_iweim_fld_s; | 1677 | } ii_iweim_fld_s; |
1731 | } ii_iweim_u_t; | 1678 | } ii_iweim_u_t; |
1732 | 1679 | ||
1733 | |||
1734 | /************************************************************************ | 1680 | /************************************************************************ |
1735 | * * | 1681 | * * |
1736 | * A write to this register causes a particular field in the * | 1682 | * A write to this register causes a particular field in the * |
1737 | * corresponding widget's PRB entry to be adjusted up or down by 1. * | 1683 | * corresponding widget's PRB entry to be adjusted up or down by 1. * |
1738 | * This counter should be used when recovering from error and reset * | 1684 | * This counter should be used when recovering from error and reset * |
1739 | * conditions. Note that software would be capable of causing * | 1685 | * conditions. Note that software would be capable of causing * |
1740 | * inadvertent overflow or underflow of these counters. * | 1686 | * inadvertent overflow or underflow of these counters. * |
1741 | * * | 1687 | * * |
1742 | ************************************************************************/ | 1688 | ************************************************************************/ |
1743 | 1689 | ||
1744 | typedef union ii_ipca_u { | 1690 | typedef union ii_ipca_u { |
1745 | uint64_t ii_ipca_regval; | 1691 | uint64_t ii_ipca_regval; |
1746 | struct { | 1692 | struct { |
1747 | uint64_t i_wid : 4; | 1693 | uint64_t i_wid:4; |
1748 | uint64_t i_adjust : 1; | 1694 | uint64_t i_adjust:1; |
1749 | uint64_t i_rsvd_1 : 3; | 1695 | uint64_t i_rsvd_1:3; |
1750 | uint64_t i_field : 2; | 1696 | uint64_t i_field:2; |
1751 | uint64_t i_rsvd : 54; | 1697 | uint64_t i_rsvd:54; |
1752 | } ii_ipca_fld_s; | 1698 | } ii_ipca_fld_s; |
1753 | } ii_ipca_u_t; | 1699 | } ii_ipca_u_t; |
1754 | 1700 | ||
1755 | |||
1756 | /************************************************************************ | 1701 | /************************************************************************ |
1757 | * * | 1702 | * * |
1758 | * There are 8 instances of this register. This register contains * | 1703 | * There are 8 instances of this register. This register contains * |
1759 | * the information that the II has to remember once it has launched a * | 1704 | * the information that the II has to remember once it has launched a * |
1760 | * PIO Read operation. The contents are used to form the correct * | 1705 | * PIO Read operation. The contents are used to form the correct * |
1761 | * Router Network packet and direct the Crosstalk reply to the * | 1706 | * Router Network packet and direct the Crosstalk reply to the * |
1762 | * appropriate processor. * | 1707 | * appropriate processor. * |
1763 | * * | 1708 | * * |
1764 | ************************************************************************/ | 1709 | ************************************************************************/ |
1765 | 1710 | ||
1766 | |||
1767 | typedef union ii_iprte0a_u { | 1711 | typedef union ii_iprte0a_u { |
1768 | uint64_t ii_iprte0a_regval; | 1712 | uint64_t ii_iprte0a_regval; |
1769 | struct { | 1713 | struct { |
1770 | uint64_t i_rsvd_1 : 54; | 1714 | uint64_t i_rsvd_1:54; |
1771 | uint64_t i_widget : 4; | 1715 | uint64_t i_widget:4; |
1772 | uint64_t i_to_cnt : 5; | 1716 | uint64_t i_to_cnt:5; |
1773 | uint64_t i_vld : 1; | 1717 | uint64_t i_vld:1; |
1774 | } ii_iprte0a_fld_s; | 1718 | } ii_iprte0a_fld_s; |
1775 | } ii_iprte0a_u_t; | 1719 | } ii_iprte0a_u_t; |
1776 | 1720 | ||
1777 | |||
1778 | /************************************************************************ | 1721 | /************************************************************************ |
1779 | * * | 1722 | * * |
1780 | * There are 8 instances of this register. This register contains * | 1723 | * There are 8 instances of this register. This register contains * |
1781 | * the information that the II has to remember once it has launched a * | 1724 | * the information that the II has to remember once it has launched a * |
1782 | * PIO Read operation. The contents are used to form the correct * | 1725 | * PIO Read operation. The contents are used to form the correct * |
1783 | * Router Network packet and direct the Crosstalk reply to the * | 1726 | * Router Network packet and direct the Crosstalk reply to the * |
1784 | * appropriate processor. * | 1727 | * appropriate processor. * |
1785 | * * | 1728 | * * |
1786 | ************************************************************************/ | 1729 | ************************************************************************/ |
1787 | 1730 | ||
1788 | typedef union ii_iprte1a_u { | 1731 | typedef union ii_iprte1a_u { |
1789 | uint64_t ii_iprte1a_regval; | 1732 | uint64_t ii_iprte1a_regval; |
1790 | struct { | 1733 | struct { |
1791 | uint64_t i_rsvd_1 : 54; | 1734 | uint64_t i_rsvd_1:54; |
1792 | uint64_t i_widget : 4; | 1735 | uint64_t i_widget:4; |
1793 | uint64_t i_to_cnt : 5; | 1736 | uint64_t i_to_cnt:5; |
1794 | uint64_t i_vld : 1; | 1737 | uint64_t i_vld:1; |
1795 | } ii_iprte1a_fld_s; | 1738 | } ii_iprte1a_fld_s; |
1796 | } ii_iprte1a_u_t; | 1739 | } ii_iprte1a_u_t; |
1797 | 1740 | ||
1798 | |||
1799 | /************************************************************************ | 1741 | /************************************************************************ |
1800 | * * | 1742 | * * |
1801 | * There are 8 instances of this register. This register contains * | 1743 | * There are 8 instances of this register. This register contains * |
1802 | * the information that the II has to remember once it has launched a * | 1744 | * the information that the II has to remember once it has launched a * |
1803 | * PIO Read operation. The contents are used to form the correct * | 1745 | * PIO Read operation. The contents are used to form the correct * |
1804 | * Router Network packet and direct the Crosstalk reply to the * | 1746 | * Router Network packet and direct the Crosstalk reply to the * |
1805 | * appropriate processor. * | 1747 | * appropriate processor. * |
1806 | * * | 1748 | * * |
1807 | ************************************************************************/ | 1749 | ************************************************************************/ |
1808 | 1750 | ||
1809 | typedef union ii_iprte2a_u { | 1751 | typedef union ii_iprte2a_u { |
1810 | uint64_t ii_iprte2a_regval; | 1752 | uint64_t ii_iprte2a_regval; |
1811 | struct { | 1753 | struct { |
1812 | uint64_t i_rsvd_1 : 54; | 1754 | uint64_t i_rsvd_1:54; |
1813 | uint64_t i_widget : 4; | 1755 | uint64_t i_widget:4; |
1814 | uint64_t i_to_cnt : 5; | 1756 | uint64_t i_to_cnt:5; |
1815 | uint64_t i_vld : 1; | 1757 | uint64_t i_vld:1; |
1816 | } ii_iprte2a_fld_s; | 1758 | } ii_iprte2a_fld_s; |
1817 | } ii_iprte2a_u_t; | 1759 | } ii_iprte2a_u_t; |
1818 | 1760 | ||
1819 | |||
1820 | /************************************************************************ | 1761 | /************************************************************************ |
1821 | * * | 1762 | * * |
1822 | * There are 8 instances of this register. This register contains * | 1763 | * There are 8 instances of this register. This register contains * |
1823 | * the information that the II has to remember once it has launched a * | 1764 | * the information that the II has to remember once it has launched a * |
1824 | * PIO Read operation. The contents are used to form the correct * | 1765 | * PIO Read operation. The contents are used to form the correct * |
1825 | * Router Network packet and direct the Crosstalk reply to the * | 1766 | * Router Network packet and direct the Crosstalk reply to the * |
1826 | * appropriate processor. * | 1767 | * appropriate processor. * |
1827 | * * | 1768 | * * |
1828 | ************************************************************************/ | 1769 | ************************************************************************/ |
1829 | 1770 | ||
1830 | typedef union ii_iprte3a_u { | 1771 | typedef union ii_iprte3a_u { |
1831 | uint64_t ii_iprte3a_regval; | 1772 | uint64_t ii_iprte3a_regval; |
1832 | struct { | 1773 | struct { |
1833 | uint64_t i_rsvd_1 : 54; | 1774 | uint64_t i_rsvd_1:54; |
1834 | uint64_t i_widget : 4; | 1775 | uint64_t i_widget:4; |
1835 | uint64_t i_to_cnt : 5; | 1776 | uint64_t i_to_cnt:5; |
1836 | uint64_t i_vld : 1; | 1777 | uint64_t i_vld:1; |
1837 | } ii_iprte3a_fld_s; | 1778 | } ii_iprte3a_fld_s; |
1838 | } ii_iprte3a_u_t; | 1779 | } ii_iprte3a_u_t; |
1839 | 1780 | ||
1840 | |||
1841 | /************************************************************************ | 1781 | /************************************************************************ |
1842 | * * | 1782 | * * |
1843 | * There are 8 instances of this register. This register contains * | 1783 | * There are 8 instances of this register. This register contains * |
1844 | * the information that the II has to remember once it has launched a * | 1784 | * the information that the II has to remember once it has launched a * |
1845 | * PIO Read operation. The contents are used to form the correct * | 1785 | * PIO Read operation. The contents are used to form the correct * |
1846 | * Router Network packet and direct the Crosstalk reply to the * | 1786 | * Router Network packet and direct the Crosstalk reply to the * |
1847 | * appropriate processor. * | 1787 | * appropriate processor. * |
1848 | * * | 1788 | * * |
1849 | ************************************************************************/ | 1789 | ************************************************************************/ |
1850 | 1790 | ||
1851 | typedef union ii_iprte4a_u { | 1791 | typedef union ii_iprte4a_u { |
1852 | uint64_t ii_iprte4a_regval; | 1792 | uint64_t ii_iprte4a_regval; |
1853 | struct { | 1793 | struct { |
1854 | uint64_t i_rsvd_1 : 54; | 1794 | uint64_t i_rsvd_1:54; |
1855 | uint64_t i_widget : 4; | 1795 | uint64_t i_widget:4; |
1856 | uint64_t i_to_cnt : 5; | 1796 | uint64_t i_to_cnt:5; |
1857 | uint64_t i_vld : 1; | 1797 | uint64_t i_vld:1; |
1858 | } ii_iprte4a_fld_s; | 1798 | } ii_iprte4a_fld_s; |
1859 | } ii_iprte4a_u_t; | 1799 | } ii_iprte4a_u_t; |
1860 | 1800 | ||
1861 | |||
1862 | /************************************************************************ | 1801 | /************************************************************************ |
1863 | * * | 1802 | * * |
1864 | * There are 8 instances of this register. This register contains * | 1803 | * There are 8 instances of this register. This register contains * |
1865 | * the information that the II has to remember once it has launched a * | 1804 | * the information that the II has to remember once it has launched a * |
1866 | * PIO Read operation. The contents are used to form the correct * | 1805 | * PIO Read operation. The contents are used to form the correct * |
1867 | * Router Network packet and direct the Crosstalk reply to the * | 1806 | * Router Network packet and direct the Crosstalk reply to the * |
1868 | * appropriate processor. * | 1807 | * appropriate processor. * |
1869 | * * | 1808 | * * |
1870 | ************************************************************************/ | 1809 | ************************************************************************/ |
1871 | 1810 | ||
1872 | typedef union ii_iprte5a_u { | 1811 | typedef union ii_iprte5a_u { |
1873 | uint64_t ii_iprte5a_regval; | 1812 | uint64_t ii_iprte5a_regval; |
1874 | struct { | 1813 | struct { |
1875 | uint64_t i_rsvd_1 : 54; | 1814 | uint64_t i_rsvd_1:54; |
1876 | uint64_t i_widget : 4; | 1815 | uint64_t i_widget:4; |
1877 | uint64_t i_to_cnt : 5; | 1816 | uint64_t i_to_cnt:5; |
1878 | uint64_t i_vld : 1; | 1817 | uint64_t i_vld:1; |
1879 | } ii_iprte5a_fld_s; | 1818 | } ii_iprte5a_fld_s; |
1880 | } ii_iprte5a_u_t; | 1819 | } ii_iprte5a_u_t; |
1881 | 1820 | ||
1882 | |||
1883 | /************************************************************************ | 1821 | /************************************************************************ |
1884 | * * | 1822 | * * |
1885 | * There are 8 instances of this register. This register contains * | 1823 | * There are 8 instances of this register. This register contains * |
1886 | * the information that the II has to remember once it has launched a * | 1824 | * the information that the II has to remember once it has launched a * |
1887 | * PIO Read operation. The contents are used to form the correct * | 1825 | * PIO Read operation. The contents are used to form the correct * |
1888 | * Router Network packet and direct the Crosstalk reply to the * | 1826 | * Router Network packet and direct the Crosstalk reply to the * |
1889 | * appropriate processor. * | 1827 | * appropriate processor. * |
1890 | * * | 1828 | * * |
1891 | ************************************************************************/ | 1829 | ************************************************************************/ |
1892 | 1830 | ||
1893 | typedef union ii_iprte6a_u { | 1831 | typedef union ii_iprte6a_u { |
1894 | uint64_t ii_iprte6a_regval; | 1832 | uint64_t ii_iprte6a_regval; |
1895 | struct { | 1833 | struct { |
1896 | uint64_t i_rsvd_1 : 54; | 1834 | uint64_t i_rsvd_1:54; |
1897 | uint64_t i_widget : 4; | 1835 | uint64_t i_widget:4; |
1898 | uint64_t i_to_cnt : 5; | 1836 | uint64_t i_to_cnt:5; |
1899 | uint64_t i_vld : 1; | 1837 | uint64_t i_vld:1; |
1900 | } ii_iprte6a_fld_s; | 1838 | } ii_iprte6a_fld_s; |
1901 | } ii_iprte6a_u_t; | 1839 | } ii_iprte6a_u_t; |
1902 | 1840 | ||
1903 | |||
1904 | /************************************************************************ | 1841 | /************************************************************************ |
1905 | * * | 1842 | * * |
1906 | * There are 8 instances of this register. This register contains * | 1843 | * There are 8 instances of this register. This register contains * |
1907 | * the information that the II has to remember once it has launched a * | 1844 | * the information that the II has to remember once it has launched a * |
1908 | * PIO Read operation. The contents are used to form the correct * | 1845 | * PIO Read operation. The contents are used to form the correct * |
1909 | * Router Network packet and direct the Crosstalk reply to the * | 1846 | * Router Network packet and direct the Crosstalk reply to the * |
1910 | * appropriate processor. * | 1847 | * appropriate processor. * |
1911 | * * | 1848 | * * |
1912 | ************************************************************************/ | 1849 | ************************************************************************/ |
1913 | 1850 | ||
1914 | typedef union ii_iprte7a_u { | 1851 | typedef union ii_iprte7a_u { |
1915 | uint64_t ii_iprte7a_regval; | 1852 | uint64_t ii_iprte7a_regval; |
1916 | struct { | 1853 | struct { |
1917 | uint64_t i_rsvd_1 : 54; | 1854 | uint64_t i_rsvd_1:54; |
1918 | uint64_t i_widget : 4; | 1855 | uint64_t i_widget:4; |
1919 | uint64_t i_to_cnt : 5; | 1856 | uint64_t i_to_cnt:5; |
1920 | uint64_t i_vld : 1; | 1857 | uint64_t i_vld:1; |
1921 | } ii_iprtea7_fld_s; | 1858 | } ii_iprtea7_fld_s; |
1922 | } ii_iprte7a_u_t; | 1859 | } ii_iprte7a_u_t; |
1923 | 1860 | ||
1924 | |||
1925 | |||
1926 | /************************************************************************ | 1861 | /************************************************************************ |
1927 | * * | 1862 | * * |
1928 | * There are 8 instances of this register. This register contains * | 1863 | * There are 8 instances of this register. This register contains * |
1929 | * the information that the II has to remember once it has launched a * | 1864 | * the information that the II has to remember once it has launched a * |
1930 | * PIO Read operation. The contents are used to form the correct * | 1865 | * PIO Read operation. The contents are used to form the correct * |
1931 | * Router Network packet and direct the Crosstalk reply to the * | 1866 | * Router Network packet and direct the Crosstalk reply to the * |
1932 | * appropriate processor. * | 1867 | * appropriate processor. * |
1933 | * * | 1868 | * * |
1934 | ************************************************************************/ | 1869 | ************************************************************************/ |
1935 | 1870 | ||
1936 | |||
1937 | typedef union ii_iprte0b_u { | 1871 | typedef union ii_iprte0b_u { |
1938 | uint64_t ii_iprte0b_regval; | 1872 | uint64_t ii_iprte0b_regval; |
1939 | struct { | 1873 | struct { |
1940 | uint64_t i_rsvd_1 : 3; | 1874 | uint64_t i_rsvd_1:3; |
1941 | uint64_t i_address : 47; | 1875 | uint64_t i_address:47; |
1942 | uint64_t i_init : 3; | 1876 | uint64_t i_init:3; |
1943 | uint64_t i_source : 11; | 1877 | uint64_t i_source:11; |
1944 | } ii_iprte0b_fld_s; | 1878 | } ii_iprte0b_fld_s; |
1945 | } ii_iprte0b_u_t; | 1879 | } ii_iprte0b_u_t; |
1946 | 1880 | ||
1947 | |||
1948 | /************************************************************************ | 1881 | /************************************************************************ |
1949 | * * | 1882 | * * |
1950 | * There are 8 instances of this register. This register contains * | 1883 | * There are 8 instances of this register. This register contains * |
1951 | * the information that the II has to remember once it has launched a * | 1884 | * the information that the II has to remember once it has launched a * |
1952 | * PIO Read operation. The contents are used to form the correct * | 1885 | * PIO Read operation. The contents are used to form the correct * |
1953 | * Router Network packet and direct the Crosstalk reply to the * | 1886 | * Router Network packet and direct the Crosstalk reply to the * |
1954 | * appropriate processor. * | 1887 | * appropriate processor. * |
1955 | * * | 1888 | * * |
1956 | ************************************************************************/ | 1889 | ************************************************************************/ |
1957 | 1890 | ||
1958 | typedef union ii_iprte1b_u { | 1891 | typedef union ii_iprte1b_u { |
1959 | uint64_t ii_iprte1b_regval; | 1892 | uint64_t ii_iprte1b_regval; |
1960 | struct { | 1893 | struct { |
1961 | uint64_t i_rsvd_1 : 3; | 1894 | uint64_t i_rsvd_1:3; |
1962 | uint64_t i_address : 47; | 1895 | uint64_t i_address:47; |
1963 | uint64_t i_init : 3; | 1896 | uint64_t i_init:3; |
1964 | uint64_t i_source : 11; | 1897 | uint64_t i_source:11; |
1965 | } ii_iprte1b_fld_s; | 1898 | } ii_iprte1b_fld_s; |
1966 | } ii_iprte1b_u_t; | 1899 | } ii_iprte1b_u_t; |
1967 | 1900 | ||
1968 | |||
1969 | /************************************************************************ | 1901 | /************************************************************************ |
1970 | * * | 1902 | * * |
1971 | * There are 8 instances of this register. This register contains * | 1903 | * There are 8 instances of this register. This register contains * |
1972 | * the information that the II has to remember once it has launched a * | 1904 | * the information that the II has to remember once it has launched a * |
1973 | * PIO Read operation. The contents are used to form the correct * | 1905 | * PIO Read operation. The contents are used to form the correct * |
1974 | * Router Network packet and direct the Crosstalk reply to the * | 1906 | * Router Network packet and direct the Crosstalk reply to the * |
1975 | * appropriate processor. * | 1907 | * appropriate processor. * |
1976 | * * | 1908 | * * |
1977 | ************************************************************************/ | 1909 | ************************************************************************/ |
1978 | 1910 | ||
1979 | typedef union ii_iprte2b_u { | 1911 | typedef union ii_iprte2b_u { |
1980 | uint64_t ii_iprte2b_regval; | 1912 | uint64_t ii_iprte2b_regval; |
1981 | struct { | 1913 | struct { |
1982 | uint64_t i_rsvd_1 : 3; | 1914 | uint64_t i_rsvd_1:3; |
1983 | uint64_t i_address : 47; | 1915 | uint64_t i_address:47; |
1984 | uint64_t i_init : 3; | 1916 | uint64_t i_init:3; |
1985 | uint64_t i_source : 11; | 1917 | uint64_t i_source:11; |
1986 | } ii_iprte2b_fld_s; | 1918 | } ii_iprte2b_fld_s; |
1987 | } ii_iprte2b_u_t; | 1919 | } ii_iprte2b_u_t; |
1988 | 1920 | ||
1989 | |||
1990 | /************************************************************************ | 1921 | /************************************************************************ |
1991 | * * | 1922 | * * |
1992 | * There are 8 instances of this register. This register contains * | 1923 | * There are 8 instances of this register. This register contains * |
1993 | * the information that the II has to remember once it has launched a * | 1924 | * the information that the II has to remember once it has launched a * |
1994 | * PIO Read operation. The contents are used to form the correct * | 1925 | * PIO Read operation. The contents are used to form the correct * |
1995 | * Router Network packet and direct the Crosstalk reply to the * | 1926 | * Router Network packet and direct the Crosstalk reply to the * |
1996 | * appropriate processor. * | 1927 | * appropriate processor. * |
1997 | * * | 1928 | * * |
1998 | ************************************************************************/ | 1929 | ************************************************************************/ |
1999 | 1930 | ||
2000 | typedef union ii_iprte3b_u { | 1931 | typedef union ii_iprte3b_u { |
2001 | uint64_t ii_iprte3b_regval; | 1932 | uint64_t ii_iprte3b_regval; |
2002 | struct { | 1933 | struct { |
2003 | uint64_t i_rsvd_1 : 3; | 1934 | uint64_t i_rsvd_1:3; |
2004 | uint64_t i_address : 47; | 1935 | uint64_t i_address:47; |
2005 | uint64_t i_init : 3; | 1936 | uint64_t i_init:3; |
2006 | uint64_t i_source : 11; | 1937 | uint64_t i_source:11; |
2007 | } ii_iprte3b_fld_s; | 1938 | } ii_iprte3b_fld_s; |
2008 | } ii_iprte3b_u_t; | 1939 | } ii_iprte3b_u_t; |
2009 | 1940 | ||
2010 | |||
2011 | /************************************************************************ | 1941 | /************************************************************************ |
2012 | * * | 1942 | * * |
2013 | * There are 8 instances of this register. This register contains * | 1943 | * There are 8 instances of this register. This register contains * |
2014 | * the information that the II has to remember once it has launched a * | 1944 | * the information that the II has to remember once it has launched a * |
2015 | * PIO Read operation. The contents are used to form the correct * | 1945 | * PIO Read operation. The contents are used to form the correct * |
2016 | * Router Network packet and direct the Crosstalk reply to the * | 1946 | * Router Network packet and direct the Crosstalk reply to the * |
2017 | * appropriate processor. * | 1947 | * appropriate processor. * |
2018 | * * | 1948 | * * |
2019 | ************************************************************************/ | 1949 | ************************************************************************/ |
2020 | 1950 | ||
2021 | typedef union ii_iprte4b_u { | 1951 | typedef union ii_iprte4b_u { |
2022 | uint64_t ii_iprte4b_regval; | 1952 | uint64_t ii_iprte4b_regval; |
2023 | struct { | 1953 | struct { |
2024 | uint64_t i_rsvd_1 : 3; | 1954 | uint64_t i_rsvd_1:3; |
2025 | uint64_t i_address : 47; | 1955 | uint64_t i_address:47; |
2026 | uint64_t i_init : 3; | 1956 | uint64_t i_init:3; |
2027 | uint64_t i_source : 11; | 1957 | uint64_t i_source:11; |
2028 | } ii_iprte4b_fld_s; | 1958 | } ii_iprte4b_fld_s; |
2029 | } ii_iprte4b_u_t; | 1959 | } ii_iprte4b_u_t; |
2030 | 1960 | ||
2031 | |||
2032 | /************************************************************************ | 1961 | /************************************************************************ |
2033 | * * | 1962 | * * |
2034 | * There are 8 instances of this register. This register contains * | 1963 | * There are 8 instances of this register. This register contains * |
2035 | * the information that the II has to remember once it has launched a * | 1964 | * the information that the II has to remember once it has launched a * |
2036 | * PIO Read operation. The contents are used to form the correct * | 1965 | * PIO Read operation. The contents are used to form the correct * |
2037 | * Router Network packet and direct the Crosstalk reply to the * | 1966 | * Router Network packet and direct the Crosstalk reply to the * |
2038 | * appropriate processor. * | 1967 | * appropriate processor. * |
2039 | * * | 1968 | * * |
2040 | ************************************************************************/ | 1969 | ************************************************************************/ |
2041 | 1970 | ||
2042 | typedef union ii_iprte5b_u { | 1971 | typedef union ii_iprte5b_u { |
2043 | uint64_t ii_iprte5b_regval; | 1972 | uint64_t ii_iprte5b_regval; |
2044 | struct { | 1973 | struct { |
2045 | uint64_t i_rsvd_1 : 3; | 1974 | uint64_t i_rsvd_1:3; |
2046 | uint64_t i_address : 47; | 1975 | uint64_t i_address:47; |
2047 | uint64_t i_init : 3; | 1976 | uint64_t i_init:3; |
2048 | uint64_t i_source : 11; | 1977 | uint64_t i_source:11; |
2049 | } ii_iprte5b_fld_s; | 1978 | } ii_iprte5b_fld_s; |
2050 | } ii_iprte5b_u_t; | 1979 | } ii_iprte5b_u_t; |
2051 | 1980 | ||
2052 | |||
2053 | /************************************************************************ | 1981 | /************************************************************************ |
2054 | * * | 1982 | * * |
2055 | * There are 8 instances of this register. This register contains * | 1983 | * There are 8 instances of this register. This register contains * |
2056 | * the information that the II has to remember once it has launched a * | 1984 | * the information that the II has to remember once it has launched a * |
2057 | * PIO Read operation. The contents are used to form the correct * | 1985 | * PIO Read operation. The contents are used to form the correct * |
2058 | * Router Network packet and direct the Crosstalk reply to the * | 1986 | * Router Network packet and direct the Crosstalk reply to the * |
2059 | * appropriate processor. * | 1987 | * appropriate processor. * |
2060 | * * | 1988 | * * |
2061 | ************************************************************************/ | 1989 | ************************************************************************/ |
2062 | 1990 | ||
2063 | typedef union ii_iprte6b_u { | 1991 | typedef union ii_iprte6b_u { |
2064 | uint64_t ii_iprte6b_regval; | 1992 | uint64_t ii_iprte6b_regval; |
2065 | struct { | 1993 | struct { |
2066 | uint64_t i_rsvd_1 : 3; | 1994 | uint64_t i_rsvd_1:3; |
2067 | uint64_t i_address : 47; | 1995 | uint64_t i_address:47; |
2068 | uint64_t i_init : 3; | 1996 | uint64_t i_init:3; |
2069 | uint64_t i_source : 11; | 1997 | uint64_t i_source:11; |
2070 | 1998 | ||
2071 | } ii_iprte6b_fld_s; | 1999 | } ii_iprte6b_fld_s; |
2072 | } ii_iprte6b_u_t; | 2000 | } ii_iprte6b_u_t; |
2073 | 2001 | ||
2074 | |||
2075 | /************************************************************************ | 2002 | /************************************************************************ |
2076 | * * | 2003 | * * |
2077 | * There are 8 instances of this register. This register contains * | 2004 | * There are 8 instances of this register. This register contains * |
2078 | * the information that the II has to remember once it has launched a * | 2005 | * the information that the II has to remember once it has launched a * |
2079 | * PIO Read operation. The contents are used to form the correct * | 2006 | * PIO Read operation. The contents are used to form the correct * |
2080 | * Router Network packet and direct the Crosstalk reply to the * | 2007 | * Router Network packet and direct the Crosstalk reply to the * |
2081 | * appropriate processor. * | 2008 | * appropriate processor. * |
2082 | * * | 2009 | * * |
2083 | ************************************************************************/ | 2010 | ************************************************************************/ |
2084 | 2011 | ||
2085 | typedef union ii_iprte7b_u { | 2012 | typedef union ii_iprte7b_u { |
2086 | uint64_t ii_iprte7b_regval; | 2013 | uint64_t ii_iprte7b_regval; |
2087 | struct { | 2014 | struct { |
2088 | uint64_t i_rsvd_1 : 3; | 2015 | uint64_t i_rsvd_1:3; |
2089 | uint64_t i_address : 47; | 2016 | uint64_t i_address:47; |
2090 | uint64_t i_init : 3; | 2017 | uint64_t i_init:3; |
2091 | uint64_t i_source : 11; | 2018 | uint64_t i_source:11; |
2092 | } ii_iprte7b_fld_s; | 2019 | } ii_iprte7b_fld_s; |
2093 | } ii_iprte7b_u_t; | 2020 | } ii_iprte7b_u_t; |
2094 | 2021 | ||
2095 | |||
2096 | /************************************************************************ | 2022 | /************************************************************************ |
2097 | * * | 2023 | * * |
2098 | * Description: SHub II contains a feature which did not exist in * | 2024 | * Description: SHub II contains a feature which did not exist in * |
2099 | * the Hub which automatically cleans up after a Read Response * | 2025 | * the Hub which automatically cleans up after a Read Response * |
2100 | * timeout, including deallocation of the IPRTE and recovery of IBuf * | 2026 | * timeout, including deallocation of the IPRTE and recovery of IBuf * |
@@ -2108,23 +2034,22 @@ typedef union ii_iprte7b_u { | |||
2108 | * Note that this register does not affect the contents of the IPRTE * | 2034 | * Note that this register does not affect the contents of the IPRTE * |
2109 | * registers. The Valid bits in those registers have to be * | 2035 | * registers. The Valid bits in those registers have to be * |
2110 | * specifically turned off by software. * | 2036 | * specifically turned off by software. * |
2111 | * * | 2037 | * * |
2112 | ************************************************************************/ | 2038 | ************************************************************************/ |
2113 | 2039 | ||
2114 | typedef union ii_ipdr_u { | 2040 | typedef union ii_ipdr_u { |
2115 | uint64_t ii_ipdr_regval; | 2041 | uint64_t ii_ipdr_regval; |
2116 | struct { | 2042 | struct { |
2117 | uint64_t i_te : 3; | 2043 | uint64_t i_te:3; |
2118 | uint64_t i_rsvd_1 : 1; | 2044 | uint64_t i_rsvd_1:1; |
2119 | uint64_t i_pnd : 1; | 2045 | uint64_t i_pnd:1; |
2120 | uint64_t i_init_rpcnt : 1; | 2046 | uint64_t i_init_rpcnt:1; |
2121 | uint64_t i_rsvd : 58; | 2047 | uint64_t i_rsvd:58; |
2122 | } ii_ipdr_fld_s; | 2048 | } ii_ipdr_fld_s; |
2123 | } ii_ipdr_u_t; | 2049 | } ii_ipdr_u_t; |
2124 | 2050 | ||
2125 | |||
2126 | /************************************************************************ | 2051 | /************************************************************************ |
2127 | * * | 2052 | * * |
2128 | * A write to this register causes a CRB entry to be returned to the * | 2053 | * A write to this register causes a CRB entry to be returned to the * |
2129 | * queue of free CRBs. The entry should have previously been cleared * | 2054 | * queue of free CRBs. The entry should have previously been cleared * |
2130 | * (mark bit) via backdoor access to the pertinent CRB entry. This * | 2055 | * (mark bit) via backdoor access to the pertinent CRB entry. This * |
@@ -2137,21 +2062,20 @@ typedef union ii_ipdr_u { | |||
2137 | * software clears the mark bit, and finally 4) software writes to * | 2062 | * software clears the mark bit, and finally 4) software writes to * |
2138 | * the ICDR register to return the CRB entry to the list of free CRB * | 2063 | * the ICDR register to return the CRB entry to the list of free CRB * |
2139 | * entries. * | 2064 | * entries. * |
2140 | * * | 2065 | * * |
2141 | ************************************************************************/ | 2066 | ************************************************************************/ |
2142 | 2067 | ||
2143 | typedef union ii_icdr_u { | 2068 | typedef union ii_icdr_u { |
2144 | uint64_t ii_icdr_regval; | 2069 | uint64_t ii_icdr_regval; |
2145 | struct { | 2070 | struct { |
2146 | uint64_t i_crb_num : 4; | 2071 | uint64_t i_crb_num:4; |
2147 | uint64_t i_pnd : 1; | 2072 | uint64_t i_pnd:1; |
2148 | uint64_t i_rsvd : 59; | 2073 | uint64_t i_rsvd:59; |
2149 | } ii_icdr_fld_s; | 2074 | } ii_icdr_fld_s; |
2150 | } ii_icdr_u_t; | 2075 | } ii_icdr_u_t; |
2151 | 2076 | ||
2152 | |||
2153 | /************************************************************************ | 2077 | /************************************************************************ |
2154 | * * | 2078 | * * |
2155 | * This register provides debug access to two FIFOs inside of II. * | 2079 | * This register provides debug access to two FIFOs inside of II. * |
2156 | * Both IOQ_MAX* fields of this register contain the instantaneous * | 2080 | * Both IOQ_MAX* fields of this register contain the instantaneous * |
2157 | * depth (in units of the number of available entries) of the * | 2081 | * depth (in units of the number of available entries) of the * |
@@ -2164,130 +2088,124 @@ typedef union ii_icdr_u { | |||
2164 | * this register is written. If there are any active entries in any * | 2088 | * this register is written. If there are any active entries in any * |
2165 | * of these FIFOs when this register is written, the results are * | 2089 | * of these FIFOs when this register is written, the results are * |
2166 | * undefined. * | 2090 | * undefined. * |
2167 | * * | 2091 | * * |
2168 | ************************************************************************/ | 2092 | ************************************************************************/ |
2169 | 2093 | ||
2170 | typedef union ii_ifdr_u { | 2094 | typedef union ii_ifdr_u { |
2171 | uint64_t ii_ifdr_regval; | 2095 | uint64_t ii_ifdr_regval; |
2172 | struct { | 2096 | struct { |
2173 | uint64_t i_ioq_max_rq : 7; | 2097 | uint64_t i_ioq_max_rq:7; |
2174 | uint64_t i_set_ioq_rq : 1; | 2098 | uint64_t i_set_ioq_rq:1; |
2175 | uint64_t i_ioq_max_rp : 7; | 2099 | uint64_t i_ioq_max_rp:7; |
2176 | uint64_t i_set_ioq_rp : 1; | 2100 | uint64_t i_set_ioq_rp:1; |
2177 | uint64_t i_rsvd : 48; | 2101 | uint64_t i_rsvd:48; |
2178 | } ii_ifdr_fld_s; | 2102 | } ii_ifdr_fld_s; |
2179 | } ii_ifdr_u_t; | 2103 | } ii_ifdr_u_t; |
2180 | 2104 | ||
2181 | |||
2182 | /************************************************************************ | 2105 | /************************************************************************ |
2183 | * * | 2106 | * * |
2184 | * This register allows the II to become sluggish in removing * | 2107 | * This register allows the II to become sluggish in removing * |
2185 | * messages from its inbound queue (IIQ). This will cause messages to * | 2108 | * messages from its inbound queue (IIQ). This will cause messages to * |
2186 | * back up in either virtual channel. Disabling the "molasses" mode * | 2109 | * back up in either virtual channel. Disabling the "molasses" mode * |
2187 | * subsequently allows the II to be tested under stress. In the * | 2110 | * subsequently allows the II to be tested under stress. In the * |
2188 | * sluggish ("Molasses") mode, the localized effects of congestion * | 2111 | * sluggish ("Molasses") mode, the localized effects of congestion * |
2189 | * can be observed. * | 2112 | * can be observed. * |
2190 | * * | 2113 | * * |
2191 | ************************************************************************/ | 2114 | ************************************************************************/ |
2192 | 2115 | ||
2193 | typedef union ii_iiap_u { | 2116 | typedef union ii_iiap_u { |
2194 | uint64_t ii_iiap_regval; | 2117 | uint64_t ii_iiap_regval; |
2195 | struct { | 2118 | struct { |
2196 | uint64_t i_rq_mls : 6; | 2119 | uint64_t i_rq_mls:6; |
2197 | uint64_t i_rsvd_1 : 2; | 2120 | uint64_t i_rsvd_1:2; |
2198 | uint64_t i_rp_mls : 6; | 2121 | uint64_t i_rp_mls:6; |
2199 | uint64_t i_rsvd : 50; | 2122 | uint64_t i_rsvd:50; |
2200 | } ii_iiap_fld_s; | 2123 | } ii_iiap_fld_s; |
2201 | } ii_iiap_u_t; | 2124 | } ii_iiap_u_t; |
2202 | 2125 | ||
2203 | |||
2204 | /************************************************************************ | 2126 | /************************************************************************ |
2205 | * * | 2127 | * * |
2206 | * This register allows several parameters of CRB operation to be * | 2128 | * This register allows several parameters of CRB operation to be * |
2207 | * set. Note that writing to this register can have catastrophic side * | 2129 | * set. Note that writing to this register can have catastrophic side * |
2208 | * effects, if the CRB is not quiescent, i.e. if the CRB is * | 2130 | * effects, if the CRB is not quiescent, i.e. if the CRB is * |
2209 | * processing protocol messages when the write occurs. * | 2131 | * processing protocol messages when the write occurs. * |
2210 | * * | 2132 | * * |
2211 | ************************************************************************/ | 2133 | ************************************************************************/ |
2212 | 2134 | ||
2213 | typedef union ii_icmr_u { | 2135 | typedef union ii_icmr_u { |
2214 | uint64_t ii_icmr_regval; | 2136 | uint64_t ii_icmr_regval; |
2215 | struct { | 2137 | struct { |
2216 | uint64_t i_sp_msg : 1; | 2138 | uint64_t i_sp_msg:1; |
2217 | uint64_t i_rd_hdr : 1; | 2139 | uint64_t i_rd_hdr:1; |
2218 | uint64_t i_rsvd_4 : 2; | 2140 | uint64_t i_rsvd_4:2; |
2219 | uint64_t i_c_cnt : 4; | 2141 | uint64_t i_c_cnt:4; |
2220 | uint64_t i_rsvd_3 : 4; | 2142 | uint64_t i_rsvd_3:4; |
2221 | uint64_t i_clr_rqpd : 1; | 2143 | uint64_t i_clr_rqpd:1; |
2222 | uint64_t i_clr_rppd : 1; | 2144 | uint64_t i_clr_rppd:1; |
2223 | uint64_t i_rsvd_2 : 2; | 2145 | uint64_t i_rsvd_2:2; |
2224 | uint64_t i_fc_cnt : 4; | 2146 | uint64_t i_fc_cnt:4; |
2225 | uint64_t i_crb_vld : 15; | 2147 | uint64_t i_crb_vld:15; |
2226 | uint64_t i_crb_mark : 15; | 2148 | uint64_t i_crb_mark:15; |
2227 | uint64_t i_rsvd_1 : 2; | 2149 | uint64_t i_rsvd_1:2; |
2228 | uint64_t i_precise : 1; | 2150 | uint64_t i_precise:1; |
2229 | uint64_t i_rsvd : 11; | 2151 | uint64_t i_rsvd:11; |
2230 | } ii_icmr_fld_s; | 2152 | } ii_icmr_fld_s; |
2231 | } ii_icmr_u_t; | 2153 | } ii_icmr_u_t; |
2232 | 2154 | ||
2233 | |||
2234 | /************************************************************************ | 2155 | /************************************************************************ |
2235 | * * | 2156 | * * |
2236 | * This register allows control of the table portion of the CRB * | 2157 | * This register allows control of the table portion of the CRB * |
2237 | * logic via software. Control operations from this register have * | 2158 | * logic via software. Control operations from this register have * |
2238 | * priority over all incoming Crosstalk or BTE requests. * | 2159 | * priority over all incoming Crosstalk or BTE requests. * |
2239 | * * | 2160 | * * |
2240 | ************************************************************************/ | 2161 | ************************************************************************/ |
2241 | 2162 | ||
2242 | typedef union ii_iccr_u { | 2163 | typedef union ii_iccr_u { |
2243 | uint64_t ii_iccr_regval; | 2164 | uint64_t ii_iccr_regval; |
2244 | struct { | 2165 | struct { |
2245 | uint64_t i_crb_num : 4; | 2166 | uint64_t i_crb_num:4; |
2246 | uint64_t i_rsvd_1 : 4; | 2167 | uint64_t i_rsvd_1:4; |
2247 | uint64_t i_cmd : 8; | 2168 | uint64_t i_cmd:8; |
2248 | uint64_t i_pending : 1; | 2169 | uint64_t i_pending:1; |
2249 | uint64_t i_rsvd : 47; | 2170 | uint64_t i_rsvd:47; |
2250 | } ii_iccr_fld_s; | 2171 | } ii_iccr_fld_s; |
2251 | } ii_iccr_u_t; | 2172 | } ii_iccr_u_t; |
2252 | 2173 | ||
2253 | |||
2254 | /************************************************************************ | 2174 | /************************************************************************ |
2255 | * * | 2175 | * * |
2256 | * This register allows the maximum timeout value to be programmed. * | 2176 | * This register allows the maximum timeout value to be programmed. * |
2257 | * * | 2177 | * * |
2258 | ************************************************************************/ | 2178 | ************************************************************************/ |
2259 | 2179 | ||
2260 | typedef union ii_icto_u { | 2180 | typedef union ii_icto_u { |
2261 | uint64_t ii_icto_regval; | 2181 | uint64_t ii_icto_regval; |
2262 | struct { | 2182 | struct { |
2263 | uint64_t i_timeout : 8; | 2183 | uint64_t i_timeout:8; |
2264 | uint64_t i_rsvd : 56; | 2184 | uint64_t i_rsvd:56; |
2265 | } ii_icto_fld_s; | 2185 | } ii_icto_fld_s; |
2266 | } ii_icto_u_t; | 2186 | } ii_icto_u_t; |
2267 | 2187 | ||
2268 | |||
2269 | /************************************************************************ | 2188 | /************************************************************************ |
2270 | * * | 2189 | * * |
2271 | * This register allows the timeout prescalar to be programmed. An * | 2190 | * This register allows the timeout prescalar to be programmed. An * |
2272 | * internal counter is associated with this register. When the * | 2191 | * internal counter is associated with this register. When the * |
2273 | * internal counter reaches the value of the PRESCALE field, the * | 2192 | * internal counter reaches the value of the PRESCALE field, the * |
2274 | * timer registers in all valid CRBs are incremented (CRBx_D[TIMEOUT] * | 2193 | * timer registers in all valid CRBs are incremented (CRBx_D[TIMEOUT] * |
2275 | * field). The internal counter resets to zero, and then continues * | 2194 | * field). The internal counter resets to zero, and then continues * |
2276 | * counting. * | 2195 | * counting. * |
2277 | * * | 2196 | * * |
2278 | ************************************************************************/ | 2197 | ************************************************************************/ |
2279 | 2198 | ||
2280 | typedef union ii_ictp_u { | 2199 | typedef union ii_ictp_u { |
2281 | uint64_t ii_ictp_regval; | 2200 | uint64_t ii_ictp_regval; |
2282 | struct { | 2201 | struct { |
2283 | uint64_t i_prescale : 24; | 2202 | uint64_t i_prescale:24; |
2284 | uint64_t i_rsvd : 40; | 2203 | uint64_t i_rsvd:40; |
2285 | } ii_ictp_fld_s; | 2204 | } ii_ictp_fld_s; |
2286 | } ii_ictp_u_t; | 2205 | } ii_ictp_u_t; |
2287 | 2206 | ||
2288 | |||
2289 | /************************************************************************ | 2207 | /************************************************************************ |
2290 | * * | 2208 | * * |
2291 | * Description: There are 15 CRB Entries (ICRB0 to ICRBE) that are * | 2209 | * Description: There are 15 CRB Entries (ICRB0 to ICRBE) that are * |
2292 | * used for Crosstalk operations (both cacheline and partial * | 2210 | * used for Crosstalk operations (both cacheline and partial * |
2293 | * operations) or BTE/IO. Because the CRB entries are very wide, five * | 2211 | * operations) or BTE/IO. Because the CRB entries are very wide, five * |
@@ -2306,243 +2224,234 @@ typedef union ii_ictp_u { | |||
2306 | * recovering any potential error state from before the reset). * | 2224 | * recovering any potential error state from before the reset). * |
2307 | * The following four tables summarize the format for the four * | 2225 | * The following four tables summarize the format for the four * |
2308 | * registers that are used for each ICRB# Entry. * | 2226 | * registers that are used for each ICRB# Entry. * |
2309 | * * | 2227 | * * |
2310 | ************************************************************************/ | 2228 | ************************************************************************/ |
2311 | 2229 | ||
2312 | typedef union ii_icrb0_a_u { | 2230 | typedef union ii_icrb0_a_u { |
2313 | uint64_t ii_icrb0_a_regval; | 2231 | uint64_t ii_icrb0_a_regval; |
2314 | struct { | 2232 | struct { |
2315 | uint64_t ia_iow : 1; | 2233 | uint64_t ia_iow:1; |
2316 | uint64_t ia_vld : 1; | 2234 | uint64_t ia_vld:1; |
2317 | uint64_t ia_addr : 47; | 2235 | uint64_t ia_addr:47; |
2318 | uint64_t ia_tnum : 5; | 2236 | uint64_t ia_tnum:5; |
2319 | uint64_t ia_sidn : 4; | 2237 | uint64_t ia_sidn:4; |
2320 | uint64_t ia_rsvd : 6; | 2238 | uint64_t ia_rsvd:6; |
2321 | } ii_icrb0_a_fld_s; | 2239 | } ii_icrb0_a_fld_s; |
2322 | } ii_icrb0_a_u_t; | 2240 | } ii_icrb0_a_u_t; |
2323 | 2241 | ||
2324 | |||
2325 | /************************************************************************ | 2242 | /************************************************************************ |
2326 | * * | 2243 | * * |
2327 | * Description: There are 15 CRB Entries (ICRB0 to ICRBE) that are * | 2244 | * Description: There are 15 CRB Entries (ICRB0 to ICRBE) that are * |
2328 | * used for Crosstalk operations (both cacheline and partial * | 2245 | * used for Crosstalk operations (both cacheline and partial * |
2329 | * operations) or BTE/IO. Because the CRB entries are very wide, five * | 2246 | * operations) or BTE/IO. Because the CRB entries are very wide, five * |
2330 | * registers (_A to _E) are required to read and write each entry. * | 2247 | * registers (_A to _E) are required to read and write each entry. * |
2331 | * * | 2248 | * * |
2332 | ************************************************************************/ | 2249 | ************************************************************************/ |
2333 | 2250 | ||
2334 | typedef union ii_icrb0_b_u { | 2251 | typedef union ii_icrb0_b_u { |
2335 | uint64_t ii_icrb0_b_regval; | 2252 | uint64_t ii_icrb0_b_regval; |
2336 | struct { | 2253 | struct { |
2337 | uint64_t ib_xt_err : 1; | 2254 | uint64_t ib_xt_err:1; |
2338 | uint64_t ib_mark : 1; | 2255 | uint64_t ib_mark:1; |
2339 | uint64_t ib_ln_uce : 1; | 2256 | uint64_t ib_ln_uce:1; |
2340 | uint64_t ib_errcode : 3; | 2257 | uint64_t ib_errcode:3; |
2341 | uint64_t ib_error : 1; | 2258 | uint64_t ib_error:1; |
2342 | uint64_t ib_stall__bte_1 : 1; | 2259 | uint64_t ib_stall__bte_1:1; |
2343 | uint64_t ib_stall__bte_0 : 1; | 2260 | uint64_t ib_stall__bte_0:1; |
2344 | uint64_t ib_stall__intr : 1; | 2261 | uint64_t ib_stall__intr:1; |
2345 | uint64_t ib_stall_ib : 1; | 2262 | uint64_t ib_stall_ib:1; |
2346 | uint64_t ib_intvn : 1; | 2263 | uint64_t ib_intvn:1; |
2347 | uint64_t ib_wb : 1; | 2264 | uint64_t ib_wb:1; |
2348 | uint64_t ib_hold : 1; | 2265 | uint64_t ib_hold:1; |
2349 | uint64_t ib_ack : 1; | 2266 | uint64_t ib_ack:1; |
2350 | uint64_t ib_resp : 1; | 2267 | uint64_t ib_resp:1; |
2351 | uint64_t ib_ack_cnt : 11; | 2268 | uint64_t ib_ack_cnt:11; |
2352 | uint64_t ib_rsvd : 7; | 2269 | uint64_t ib_rsvd:7; |
2353 | uint64_t ib_exc : 5; | 2270 | uint64_t ib_exc:5; |
2354 | uint64_t ib_init : 3; | 2271 | uint64_t ib_init:3; |
2355 | uint64_t ib_imsg : 8; | 2272 | uint64_t ib_imsg:8; |
2356 | uint64_t ib_imsgtype : 2; | 2273 | uint64_t ib_imsgtype:2; |
2357 | uint64_t ib_use_old : 1; | 2274 | uint64_t ib_use_old:1; |
2358 | uint64_t ib_rsvd_1 : 11; | 2275 | uint64_t ib_rsvd_1:11; |
2359 | } ii_icrb0_b_fld_s; | 2276 | } ii_icrb0_b_fld_s; |
2360 | } ii_icrb0_b_u_t; | 2277 | } ii_icrb0_b_u_t; |
2361 | 2278 | ||
2362 | |||
2363 | /************************************************************************ | 2279 | /************************************************************************ |
2364 | * * | 2280 | * * |
2365 | * Description: There are 15 CRB Entries (ICRB0 to ICRBE) that are * | 2281 | * Description: There are 15 CRB Entries (ICRB0 to ICRBE) that are * |
2366 | * used for Crosstalk operations (both cacheline and partial * | 2282 | * used for Crosstalk operations (both cacheline and partial * |
2367 | * operations) or BTE/IO. Because the CRB entries are very wide, five * | 2283 | * operations) or BTE/IO. Because the CRB entries are very wide, five * |
2368 | * registers (_A to _E) are required to read and write each entry. * | 2284 | * registers (_A to _E) are required to read and write each entry. * |
2369 | * * | 2285 | * * |
2370 | ************************************************************************/ | 2286 | ************************************************************************/ |
2371 | 2287 | ||
2372 | typedef union ii_icrb0_c_u { | 2288 | typedef union ii_icrb0_c_u { |
2373 | uint64_t ii_icrb0_c_regval; | 2289 | uint64_t ii_icrb0_c_regval; |
2374 | struct { | 2290 | struct { |
2375 | uint64_t ic_source : 15; | 2291 | uint64_t ic_source:15; |
2376 | uint64_t ic_size : 2; | 2292 | uint64_t ic_size:2; |
2377 | uint64_t ic_ct : 1; | 2293 | uint64_t ic_ct:1; |
2378 | uint64_t ic_bte_num : 1; | 2294 | uint64_t ic_bte_num:1; |
2379 | uint64_t ic_gbr : 1; | 2295 | uint64_t ic_gbr:1; |
2380 | uint64_t ic_resprqd : 1; | 2296 | uint64_t ic_resprqd:1; |
2381 | uint64_t ic_bo : 1; | 2297 | uint64_t ic_bo:1; |
2382 | uint64_t ic_suppl : 15; | 2298 | uint64_t ic_suppl:15; |
2383 | uint64_t ic_rsvd : 27; | 2299 | uint64_t ic_rsvd:27; |
2384 | } ii_icrb0_c_fld_s; | 2300 | } ii_icrb0_c_fld_s; |
2385 | } ii_icrb0_c_u_t; | 2301 | } ii_icrb0_c_u_t; |
2386 | 2302 | ||
2387 | |||
2388 | /************************************************************************ | 2303 | /************************************************************************ |
2389 | * * | 2304 | * * |
2390 | * Description: There are 15 CRB Entries (ICRB0 to ICRBE) that are * | 2305 | * Description: There are 15 CRB Entries (ICRB0 to ICRBE) that are * |
2391 | * used for Crosstalk operations (both cacheline and partial * | 2306 | * used for Crosstalk operations (both cacheline and partial * |
2392 | * operations) or BTE/IO. Because the CRB entries are very wide, five * | 2307 | * operations) or BTE/IO. Because the CRB entries are very wide, five * |
2393 | * registers (_A to _E) are required to read and write each entry. * | 2308 | * registers (_A to _E) are required to read and write each entry. * |
2394 | * * | 2309 | * * |
2395 | ************************************************************************/ | 2310 | ************************************************************************/ |
2396 | 2311 | ||
2397 | typedef union ii_icrb0_d_u { | 2312 | typedef union ii_icrb0_d_u { |
2398 | uint64_t ii_icrb0_d_regval; | 2313 | uint64_t ii_icrb0_d_regval; |
2399 | struct { | 2314 | struct { |
2400 | uint64_t id_pa_be : 43; | 2315 | uint64_t id_pa_be:43; |
2401 | uint64_t id_bte_op : 1; | 2316 | uint64_t id_bte_op:1; |
2402 | uint64_t id_pr_psc : 4; | 2317 | uint64_t id_pr_psc:4; |
2403 | uint64_t id_pr_cnt : 4; | 2318 | uint64_t id_pr_cnt:4; |
2404 | uint64_t id_sleep : 1; | 2319 | uint64_t id_sleep:1; |
2405 | uint64_t id_rsvd : 11; | 2320 | uint64_t id_rsvd:11; |
2406 | } ii_icrb0_d_fld_s; | 2321 | } ii_icrb0_d_fld_s; |
2407 | } ii_icrb0_d_u_t; | 2322 | } ii_icrb0_d_u_t; |
2408 | 2323 | ||
2409 | |||
2410 | /************************************************************************ | 2324 | /************************************************************************ |
2411 | * * | 2325 | * * |
2412 | * Description: There are 15 CRB Entries (ICRB0 to ICRBE) that are * | 2326 | * Description: There are 15 CRB Entries (ICRB0 to ICRBE) that are * |
2413 | * used for Crosstalk operations (both cacheline and partial * | 2327 | * used for Crosstalk operations (both cacheline and partial * |
2414 | * operations) or BTE/IO. Because the CRB entries are very wide, five * | 2328 | * operations) or BTE/IO. Because the CRB entries are very wide, five * |
2415 | * registers (_A to _E) are required to read and write each entry. * | 2329 | * registers (_A to _E) are required to read and write each entry. * |
2416 | * * | 2330 | * * |
2417 | ************************************************************************/ | 2331 | ************************************************************************/ |
2418 | 2332 | ||
2419 | typedef union ii_icrb0_e_u { | 2333 | typedef union ii_icrb0_e_u { |
2420 | uint64_t ii_icrb0_e_regval; | 2334 | uint64_t ii_icrb0_e_regval; |
2421 | struct { | 2335 | struct { |
2422 | uint64_t ie_timeout : 8; | 2336 | uint64_t ie_timeout:8; |
2423 | uint64_t ie_context : 15; | 2337 | uint64_t ie_context:15; |
2424 | uint64_t ie_rsvd : 1; | 2338 | uint64_t ie_rsvd:1; |
2425 | uint64_t ie_tvld : 1; | 2339 | uint64_t ie_tvld:1; |
2426 | uint64_t ie_cvld : 1; | 2340 | uint64_t ie_cvld:1; |
2427 | uint64_t ie_rsvd_0 : 38; | 2341 | uint64_t ie_rsvd_0:38; |
2428 | } ii_icrb0_e_fld_s; | 2342 | } ii_icrb0_e_fld_s; |
2429 | } ii_icrb0_e_u_t; | 2343 | } ii_icrb0_e_u_t; |
2430 | 2344 | ||
2431 | |||
2432 | /************************************************************************ | 2345 | /************************************************************************ |
2433 | * * | 2346 | * * |
2434 | * This register contains the lower 64 bits of the header of the * | 2347 | * This register contains the lower 64 bits of the header of the * |
2435 | * spurious message captured by II. Valid when the SP_MSG bit in ICMR * | 2348 | * spurious message captured by II. Valid when the SP_MSG bit in ICMR * |
2436 | * register is set. * | 2349 | * register is set. * |
2437 | * * | 2350 | * * |
2438 | ************************************************************************/ | 2351 | ************************************************************************/ |
2439 | 2352 | ||
2440 | typedef union ii_icsml_u { | 2353 | typedef union ii_icsml_u { |
2441 | uint64_t ii_icsml_regval; | 2354 | uint64_t ii_icsml_regval; |
2442 | struct { | 2355 | struct { |
2443 | uint64_t i_tt_addr : 47; | 2356 | uint64_t i_tt_addr:47; |
2444 | uint64_t i_newsuppl_ex : 14; | 2357 | uint64_t i_newsuppl_ex:14; |
2445 | uint64_t i_reserved : 2; | 2358 | uint64_t i_reserved:2; |
2446 | uint64_t i_overflow : 1; | 2359 | uint64_t i_overflow:1; |
2447 | } ii_icsml_fld_s; | 2360 | } ii_icsml_fld_s; |
2448 | } ii_icsml_u_t; | 2361 | } ii_icsml_u_t; |
2449 | 2362 | ||
2450 | |||
2451 | /************************************************************************ | 2363 | /************************************************************************ |
2452 | * * | 2364 | * * |
2453 | * This register contains the middle 64 bits of the header of the * | 2365 | * This register contains the middle 64 bits of the header of the * |
2454 | * spurious message captured by II. Valid when the SP_MSG bit in ICMR * | 2366 | * spurious message captured by II. Valid when the SP_MSG bit in ICMR * |
2455 | * register is set. * | 2367 | * register is set. * |
2456 | * * | 2368 | * * |
2457 | ************************************************************************/ | 2369 | ************************************************************************/ |
2458 | 2370 | ||
2459 | typedef union ii_icsmm_u { | 2371 | typedef union ii_icsmm_u { |
2460 | uint64_t ii_icsmm_regval; | 2372 | uint64_t ii_icsmm_regval; |
2461 | struct { | 2373 | struct { |
2462 | uint64_t i_tt_ack_cnt : 11; | 2374 | uint64_t i_tt_ack_cnt:11; |
2463 | uint64_t i_reserved : 53; | 2375 | uint64_t i_reserved:53; |
2464 | } ii_icsmm_fld_s; | 2376 | } ii_icsmm_fld_s; |
2465 | } ii_icsmm_u_t; | 2377 | } ii_icsmm_u_t; |
2466 | 2378 | ||
2467 | |||
2468 | /************************************************************************ | 2379 | /************************************************************************ |
2469 | * * | 2380 | * * |
2470 | * This register contains the microscopic state, all the inputs to * | 2381 | * This register contains the microscopic state, all the inputs to * |
2471 | * the protocol table, captured with the spurious message. Valid when * | 2382 | * the protocol table, captured with the spurious message. Valid when * |
2472 | * the SP_MSG bit in the ICMR register is set. * | 2383 | * the SP_MSG bit in the ICMR register is set. * |
2473 | * * | 2384 | * * |
2474 | ************************************************************************/ | 2385 | ************************************************************************/ |
2475 | 2386 | ||
2476 | typedef union ii_icsmh_u { | 2387 | typedef union ii_icsmh_u { |
2477 | uint64_t ii_icsmh_regval; | 2388 | uint64_t ii_icsmh_regval; |
2478 | struct { | 2389 | struct { |
2479 | uint64_t i_tt_vld : 1; | 2390 | uint64_t i_tt_vld:1; |
2480 | uint64_t i_xerr : 1; | 2391 | uint64_t i_xerr:1; |
2481 | uint64_t i_ft_cwact_o : 1; | 2392 | uint64_t i_ft_cwact_o:1; |
2482 | uint64_t i_ft_wact_o : 1; | 2393 | uint64_t i_ft_wact_o:1; |
2483 | uint64_t i_ft_active_o : 1; | 2394 | uint64_t i_ft_active_o:1; |
2484 | uint64_t i_sync : 1; | 2395 | uint64_t i_sync:1; |
2485 | uint64_t i_mnusg : 1; | 2396 | uint64_t i_mnusg:1; |
2486 | uint64_t i_mnusz : 1; | 2397 | uint64_t i_mnusz:1; |
2487 | uint64_t i_plusz : 1; | 2398 | uint64_t i_plusz:1; |
2488 | uint64_t i_plusg : 1; | 2399 | uint64_t i_plusg:1; |
2489 | uint64_t i_tt_exc : 5; | 2400 | uint64_t i_tt_exc:5; |
2490 | uint64_t i_tt_wb : 1; | 2401 | uint64_t i_tt_wb:1; |
2491 | uint64_t i_tt_hold : 1; | 2402 | uint64_t i_tt_hold:1; |
2492 | uint64_t i_tt_ack : 1; | 2403 | uint64_t i_tt_ack:1; |
2493 | uint64_t i_tt_resp : 1; | 2404 | uint64_t i_tt_resp:1; |
2494 | uint64_t i_tt_intvn : 1; | 2405 | uint64_t i_tt_intvn:1; |
2495 | uint64_t i_g_stall_bte1 : 1; | 2406 | uint64_t i_g_stall_bte1:1; |
2496 | uint64_t i_g_stall_bte0 : 1; | 2407 | uint64_t i_g_stall_bte0:1; |
2497 | uint64_t i_g_stall_il : 1; | 2408 | uint64_t i_g_stall_il:1; |
2498 | uint64_t i_g_stall_ib : 1; | 2409 | uint64_t i_g_stall_ib:1; |
2499 | uint64_t i_tt_imsg : 8; | 2410 | uint64_t i_tt_imsg:8; |
2500 | uint64_t i_tt_imsgtype : 2; | 2411 | uint64_t i_tt_imsgtype:2; |
2501 | uint64_t i_tt_use_old : 1; | 2412 | uint64_t i_tt_use_old:1; |
2502 | uint64_t i_tt_respreqd : 1; | 2413 | uint64_t i_tt_respreqd:1; |
2503 | uint64_t i_tt_bte_num : 1; | 2414 | uint64_t i_tt_bte_num:1; |
2504 | uint64_t i_cbn : 1; | 2415 | uint64_t i_cbn:1; |
2505 | uint64_t i_match : 1; | 2416 | uint64_t i_match:1; |
2506 | uint64_t i_rpcnt_lt_34 : 1; | 2417 | uint64_t i_rpcnt_lt_34:1; |
2507 | uint64_t i_rpcnt_ge_34 : 1; | 2418 | uint64_t i_rpcnt_ge_34:1; |
2508 | uint64_t i_rpcnt_lt_18 : 1; | 2419 | uint64_t i_rpcnt_lt_18:1; |
2509 | uint64_t i_rpcnt_ge_18 : 1; | 2420 | uint64_t i_rpcnt_ge_18:1; |
2510 | uint64_t i_rpcnt_lt_2 : 1; | 2421 | uint64_t i_rpcnt_lt_2:1; |
2511 | uint64_t i_rpcnt_ge_2 : 1; | 2422 | uint64_t i_rpcnt_ge_2:1; |
2512 | uint64_t i_rqcnt_lt_18 : 1; | 2423 | uint64_t i_rqcnt_lt_18:1; |
2513 | uint64_t i_rqcnt_ge_18 : 1; | 2424 | uint64_t i_rqcnt_ge_18:1; |
2514 | uint64_t i_rqcnt_lt_2 : 1; | 2425 | uint64_t i_rqcnt_lt_2:1; |
2515 | uint64_t i_rqcnt_ge_2 : 1; | 2426 | uint64_t i_rqcnt_ge_2:1; |
2516 | uint64_t i_tt_device : 7; | 2427 | uint64_t i_tt_device:7; |
2517 | uint64_t i_tt_init : 3; | 2428 | uint64_t i_tt_init:3; |
2518 | uint64_t i_reserved : 5; | 2429 | uint64_t i_reserved:5; |
2519 | } ii_icsmh_fld_s; | 2430 | } ii_icsmh_fld_s; |
2520 | } ii_icsmh_u_t; | 2431 | } ii_icsmh_u_t; |
2521 | 2432 | ||
2522 | |||
2523 | /************************************************************************ | 2433 | /************************************************************************ |
2524 | * * | 2434 | * * |
2525 | * The Shub DEBUG unit provides a 3-bit selection signal to the * | 2435 | * The Shub DEBUG unit provides a 3-bit selection signal to the * |
2526 | * II core and a 3-bit selection signal to the fsbclk domain in the II * | 2436 | * II core and a 3-bit selection signal to the fsbclk domain in the II * |
2527 | * wrapper. * | 2437 | * wrapper. * |
2528 | * * | 2438 | * * |
2529 | ************************************************************************/ | 2439 | ************************************************************************/ |
2530 | 2440 | ||
2531 | typedef union ii_idbss_u { | 2441 | typedef union ii_idbss_u { |
2532 | uint64_t ii_idbss_regval; | 2442 | uint64_t ii_idbss_regval; |
2533 | struct { | 2443 | struct { |
2534 | uint64_t i_iioclk_core_submenu : 3; | 2444 | uint64_t i_iioclk_core_submenu:3; |
2535 | uint64_t i_rsvd : 5; | 2445 | uint64_t i_rsvd:5; |
2536 | uint64_t i_fsbclk_wrapper_submenu : 3; | 2446 | uint64_t i_fsbclk_wrapper_submenu:3; |
2537 | uint64_t i_rsvd_1 : 5; | 2447 | uint64_t i_rsvd_1:5; |
2538 | uint64_t i_iioclk_menu : 5; | 2448 | uint64_t i_iioclk_menu:5; |
2539 | uint64_t i_rsvd_2 : 43; | 2449 | uint64_t i_rsvd_2:43; |
2540 | } ii_idbss_fld_s; | 2450 | } ii_idbss_fld_s; |
2541 | } ii_idbss_u_t; | 2451 | } ii_idbss_u_t; |
2542 | 2452 | ||
2543 | |||
2544 | /************************************************************************ | 2453 | /************************************************************************ |
2545 | * * | 2454 | * * |
2546 | * Description: This register is used to set up the length for a * | 2455 | * Description: This register is used to set up the length for a * |
2547 | * transfer and then to monitor the progress of that transfer. This * | 2456 | * transfer and then to monitor the progress of that transfer. This * |
2548 | * register needs to be initialized before a transfer is started. A * | 2457 | * register needs to be initialized before a transfer is started. A * |
@@ -2553,63 +2462,60 @@ typedef union ii_idbss_u { | |||
2553 | * transfer completes, hardware will clear the Busy bit. The length * | 2462 | * transfer completes, hardware will clear the Busy bit. The length * |
2554 | * field will also contain the number of cache lines left to be * | 2463 | * field will also contain the number of cache lines left to be * |
2555 | * transferred. * | 2464 | * transferred. * |
2556 | * * | 2465 | * * |
2557 | ************************************************************************/ | 2466 | ************************************************************************/ |
2558 | 2467 | ||
2559 | typedef union ii_ibls0_u { | 2468 | typedef union ii_ibls0_u { |
2560 | uint64_t ii_ibls0_regval; | 2469 | uint64_t ii_ibls0_regval; |
2561 | struct { | 2470 | struct { |
2562 | uint64_t i_length : 16; | 2471 | uint64_t i_length:16; |
2563 | uint64_t i_error : 1; | 2472 | uint64_t i_error:1; |
2564 | uint64_t i_rsvd_1 : 3; | 2473 | uint64_t i_rsvd_1:3; |
2565 | uint64_t i_busy : 1; | 2474 | uint64_t i_busy:1; |
2566 | uint64_t i_rsvd : 43; | 2475 | uint64_t i_rsvd:43; |
2567 | } ii_ibls0_fld_s; | 2476 | } ii_ibls0_fld_s; |
2568 | } ii_ibls0_u_t; | 2477 | } ii_ibls0_u_t; |
2569 | 2478 | ||
2570 | |||
2571 | /************************************************************************ | 2479 | /************************************************************************ |
2572 | * * | 2480 | * * |
2573 | * This register should be loaded before a transfer is started. The * | 2481 | * This register should be loaded before a transfer is started. The * |
2574 | * address to be loaded in bits 39:0 is the 40-bit TRex+ physical * | 2482 | * address to be loaded in bits 39:0 is the 40-bit TRex+ physical * |
2575 | * address as described in Section 1.3, Figure2 and Figure3. Since * | 2483 | * address as described in Section 1.3, Figure2 and Figure3. Since * |
2576 | * the bottom 7 bits of the address are always taken to be zero, BTE * | 2484 | * the bottom 7 bits of the address are always taken to be zero, BTE * |
2577 | * transfers are always cacheline-aligned. * | 2485 | * transfers are always cacheline-aligned. * |
2578 | * * | 2486 | * * |
2579 | ************************************************************************/ | 2487 | ************************************************************************/ |
2580 | 2488 | ||
2581 | typedef union ii_ibsa0_u { | 2489 | typedef union ii_ibsa0_u { |
2582 | uint64_t ii_ibsa0_regval; | 2490 | uint64_t ii_ibsa0_regval; |
2583 | struct { | 2491 | struct { |
2584 | uint64_t i_rsvd_1 : 7; | 2492 | uint64_t i_rsvd_1:7; |
2585 | uint64_t i_addr : 42; | 2493 | uint64_t i_addr:42; |
2586 | uint64_t i_rsvd : 15; | 2494 | uint64_t i_rsvd:15; |
2587 | } ii_ibsa0_fld_s; | 2495 | } ii_ibsa0_fld_s; |
2588 | } ii_ibsa0_u_t; | 2496 | } ii_ibsa0_u_t; |
2589 | 2497 | ||
2590 | |||
2591 | /************************************************************************ | 2498 | /************************************************************************ |
2592 | * * | 2499 | * * |
2593 | * This register should be loaded before a transfer is started. The * | 2500 | * This register should be loaded before a transfer is started. The * |
2594 | * address to be loaded in bits 39:0 is the 40-bit TRex+ physical * | 2501 | * address to be loaded in bits 39:0 is the 40-bit TRex+ physical * |
2595 | * address as described in Section 1.3, Figure2 and Figure3. Since * | 2502 | * address as described in Section 1.3, Figure2 and Figure3. Since * |
2596 | * the bottom 7 bits of the address are always taken to be zero, BTE * | 2503 | * the bottom 7 bits of the address are always taken to be zero, BTE * |
2597 | * transfers are always cacheline-aligned. * | 2504 | * transfers are always cacheline-aligned. * |
2598 | * * | 2505 | * * |
2599 | ************************************************************************/ | 2506 | ************************************************************************/ |
2600 | 2507 | ||
2601 | typedef union ii_ibda0_u { | 2508 | typedef union ii_ibda0_u { |
2602 | uint64_t ii_ibda0_regval; | 2509 | uint64_t ii_ibda0_regval; |
2603 | struct { | 2510 | struct { |
2604 | uint64_t i_rsvd_1 : 7; | 2511 | uint64_t i_rsvd_1:7; |
2605 | uint64_t i_addr : 42; | 2512 | uint64_t i_addr:42; |
2606 | uint64_t i_rsvd : 15; | 2513 | uint64_t i_rsvd:15; |
2607 | } ii_ibda0_fld_s; | 2514 | } ii_ibda0_fld_s; |
2608 | } ii_ibda0_u_t; | 2515 | } ii_ibda0_u_t; |
2609 | 2516 | ||
2610 | |||
2611 | /************************************************************************ | 2517 | /************************************************************************ |
2612 | * * | 2518 | * * |
2613 | * Writing to this register sets up the attributes of the transfer * | 2519 | * Writing to this register sets up the attributes of the transfer * |
2614 | * and initiates the transfer operation. Reading this register has * | 2520 | * and initiates the transfer operation. Reading this register has * |
2615 | * the side effect of terminating any transfer in progress. Note: * | 2521 | * the side effect of terminating any transfer in progress. Note: * |
@@ -2617,61 +2523,58 @@ typedef union ii_ibda0_u { | |||
2617 | * other BTE. If a BTE stream has to be stopped (due to error * | 2523 | * other BTE. If a BTE stream has to be stopped (due to error * |
2618 | * handling for example), both BTE streams should be stopped and * | 2524 | * handling for example), both BTE streams should be stopped and * |
2619 | * their transfers discarded. * | 2525 | * their transfers discarded. * |
2620 | * * | 2526 | * * |
2621 | ************************************************************************/ | 2527 | ************************************************************************/ |
2622 | 2528 | ||
2623 | typedef union ii_ibct0_u { | 2529 | typedef union ii_ibct0_u { |
2624 | uint64_t ii_ibct0_regval; | 2530 | uint64_t ii_ibct0_regval; |
2625 | struct { | 2531 | struct { |
2626 | uint64_t i_zerofill : 1; | 2532 | uint64_t i_zerofill:1; |
2627 | uint64_t i_rsvd_2 : 3; | 2533 | uint64_t i_rsvd_2:3; |
2628 | uint64_t i_notify : 1; | 2534 | uint64_t i_notify:1; |
2629 | uint64_t i_rsvd_1 : 3; | 2535 | uint64_t i_rsvd_1:3; |
2630 | uint64_t i_poison : 1; | 2536 | uint64_t i_poison:1; |
2631 | uint64_t i_rsvd : 55; | 2537 | uint64_t i_rsvd:55; |
2632 | } ii_ibct0_fld_s; | 2538 | } ii_ibct0_fld_s; |
2633 | } ii_ibct0_u_t; | 2539 | } ii_ibct0_u_t; |
2634 | 2540 | ||
2635 | |||
2636 | /************************************************************************ | 2541 | /************************************************************************ |
2637 | * * | 2542 | * * |
2638 | * This register contains the address to which the WINV is sent. * | 2543 | * This register contains the address to which the WINV is sent. * |
2639 | * This address has to be cache line aligned. * | 2544 | * This address has to be cache line aligned. * |
2640 | * * | 2545 | * * |
2641 | ************************************************************************/ | 2546 | ************************************************************************/ |
2642 | 2547 | ||
2643 | typedef union ii_ibna0_u { | 2548 | typedef union ii_ibna0_u { |
2644 | uint64_t ii_ibna0_regval; | 2549 | uint64_t ii_ibna0_regval; |
2645 | struct { | 2550 | struct { |
2646 | uint64_t i_rsvd_1 : 7; | 2551 | uint64_t i_rsvd_1:7; |
2647 | uint64_t i_addr : 42; | 2552 | uint64_t i_addr:42; |
2648 | uint64_t i_rsvd : 15; | 2553 | uint64_t i_rsvd:15; |
2649 | } ii_ibna0_fld_s; | 2554 | } ii_ibna0_fld_s; |
2650 | } ii_ibna0_u_t; | 2555 | } ii_ibna0_u_t; |
2651 | 2556 | ||
2652 | |||
2653 | /************************************************************************ | 2557 | /************************************************************************ |
2654 | * * | 2558 | * * |
2655 | * This register contains the programmable level as well as the node * | 2559 | * This register contains the programmable level as well as the node * |
2656 | * ID and PI unit of the processor to which the interrupt will be * | 2560 | * ID and PI unit of the processor to which the interrupt will be * |
2657 | * sent. * | 2561 | * sent. * |
2658 | * * | 2562 | * * |
2659 | ************************************************************************/ | 2563 | ************************************************************************/ |
2660 | 2564 | ||
2661 | typedef union ii_ibia0_u { | 2565 | typedef union ii_ibia0_u { |
2662 | uint64_t ii_ibia0_regval; | 2566 | uint64_t ii_ibia0_regval; |
2663 | struct { | 2567 | struct { |
2664 | uint64_t i_rsvd_2 : 1; | 2568 | uint64_t i_rsvd_2:1; |
2665 | uint64_t i_node_id : 11; | 2569 | uint64_t i_node_id:11; |
2666 | uint64_t i_rsvd_1 : 4; | 2570 | uint64_t i_rsvd_1:4; |
2667 | uint64_t i_level : 7; | 2571 | uint64_t i_level:7; |
2668 | uint64_t i_rsvd : 41; | 2572 | uint64_t i_rsvd:41; |
2669 | } ii_ibia0_fld_s; | 2573 | } ii_ibia0_fld_s; |
2670 | } ii_ibia0_u_t; | 2574 | } ii_ibia0_u_t; |
2671 | 2575 | ||
2672 | |||
2673 | /************************************************************************ | 2576 | /************************************************************************ |
2674 | * * | 2577 | * * |
2675 | * Description: This register is used to set up the length for a * | 2578 | * Description: This register is used to set up the length for a * |
2676 | * transfer and then to monitor the progress of that transfer. This * | 2579 | * transfer and then to monitor the progress of that transfer. This * |
2677 | * register needs to be initialized before a transfer is started. A * | 2580 | * register needs to be initialized before a transfer is started. A * |
@@ -2682,63 +2585,60 @@ typedef union ii_ibia0_u { | |||
2682 | * transfer completes, hardware will clear the Busy bit. The length * | 2585 | * transfer completes, hardware will clear the Busy bit. The length * |
2683 | * field will also contain the number of cache lines left to be * | 2586 | * field will also contain the number of cache lines left to be * |
2684 | * transferred. * | 2587 | * transferred. * |
2685 | * * | 2588 | * * |
2686 | ************************************************************************/ | 2589 | ************************************************************************/ |
2687 | 2590 | ||
2688 | typedef union ii_ibls1_u { | 2591 | typedef union ii_ibls1_u { |
2689 | uint64_t ii_ibls1_regval; | 2592 | uint64_t ii_ibls1_regval; |
2690 | struct { | 2593 | struct { |
2691 | uint64_t i_length : 16; | 2594 | uint64_t i_length:16; |
2692 | uint64_t i_error : 1; | 2595 | uint64_t i_error:1; |
2693 | uint64_t i_rsvd_1 : 3; | 2596 | uint64_t i_rsvd_1:3; |
2694 | uint64_t i_busy : 1; | 2597 | uint64_t i_busy:1; |
2695 | uint64_t i_rsvd : 43; | 2598 | uint64_t i_rsvd:43; |
2696 | } ii_ibls1_fld_s; | 2599 | } ii_ibls1_fld_s; |
2697 | } ii_ibls1_u_t; | 2600 | } ii_ibls1_u_t; |
2698 | 2601 | ||
2699 | |||
2700 | /************************************************************************ | 2602 | /************************************************************************ |
2701 | * * | 2603 | * * |
2702 | * This register should be loaded before a transfer is started. The * | 2604 | * This register should be loaded before a transfer is started. The * |
2703 | * address to be loaded in bits 39:0 is the 40-bit TRex+ physical * | 2605 | * address to be loaded in bits 39:0 is the 40-bit TRex+ physical * |
2704 | * address as described in Section 1.3, Figure2 and Figure3. Since * | 2606 | * address as described in Section 1.3, Figure2 and Figure3. Since * |
2705 | * the bottom 7 bits of the address are always taken to be zero, BTE * | 2607 | * the bottom 7 bits of the address are always taken to be zero, BTE * |
2706 | * transfers are always cacheline-aligned. * | 2608 | * transfers are always cacheline-aligned. * |
2707 | * * | 2609 | * * |
2708 | ************************************************************************/ | 2610 | ************************************************************************/ |
2709 | 2611 | ||
2710 | typedef union ii_ibsa1_u { | 2612 | typedef union ii_ibsa1_u { |
2711 | uint64_t ii_ibsa1_regval; | 2613 | uint64_t ii_ibsa1_regval; |
2712 | struct { | 2614 | struct { |
2713 | uint64_t i_rsvd_1 : 7; | 2615 | uint64_t i_rsvd_1:7; |
2714 | uint64_t i_addr : 33; | 2616 | uint64_t i_addr:33; |
2715 | uint64_t i_rsvd : 24; | 2617 | uint64_t i_rsvd:24; |
2716 | } ii_ibsa1_fld_s; | 2618 | } ii_ibsa1_fld_s; |
2717 | } ii_ibsa1_u_t; | 2619 | } ii_ibsa1_u_t; |
2718 | 2620 | ||
2719 | |||
2720 | /************************************************************************ | 2621 | /************************************************************************ |
2721 | * * | 2622 | * * |
2722 | * This register should be loaded before a transfer is started. The * | 2623 | * This register should be loaded before a transfer is started. The * |
2723 | * address to be loaded in bits 39:0 is the 40-bit TRex+ physical * | 2624 | * address to be loaded in bits 39:0 is the 40-bit TRex+ physical * |
2724 | * address as described in Section 1.3, Figure2 and Figure3. Since * | 2625 | * address as described in Section 1.3, Figure2 and Figure3. Since * |
2725 | * the bottom 7 bits of the address are always taken to be zero, BTE * | 2626 | * the bottom 7 bits of the address are always taken to be zero, BTE * |
2726 | * transfers are always cacheline-aligned. * | 2627 | * transfers are always cacheline-aligned. * |
2727 | * * | 2628 | * * |
2728 | ************************************************************************/ | 2629 | ************************************************************************/ |
2729 | 2630 | ||
2730 | typedef union ii_ibda1_u { | 2631 | typedef union ii_ibda1_u { |
2731 | uint64_t ii_ibda1_regval; | 2632 | uint64_t ii_ibda1_regval; |
2732 | struct { | 2633 | struct { |
2733 | uint64_t i_rsvd_1 : 7; | 2634 | uint64_t i_rsvd_1:7; |
2734 | uint64_t i_addr : 33; | 2635 | uint64_t i_addr:33; |
2735 | uint64_t i_rsvd : 24; | 2636 | uint64_t i_rsvd:24; |
2736 | } ii_ibda1_fld_s; | 2637 | } ii_ibda1_fld_s; |
2737 | } ii_ibda1_u_t; | 2638 | } ii_ibda1_u_t; |
2738 | 2639 | ||
2739 | |||
2740 | /************************************************************************ | 2640 | /************************************************************************ |
2741 | * * | 2641 | * * |
2742 | * Writing to this register sets up the attributes of the transfer * | 2642 | * Writing to this register sets up the attributes of the transfer * |
2743 | * and initiates the transfer operation. Reading this register has * | 2643 | * and initiates the transfer operation. Reading this register has * |
2744 | * the side effect of terminating any transfer in progress. Note: * | 2644 | * the side effect of terminating any transfer in progress. Note: * |
@@ -2746,61 +2646,58 @@ typedef union ii_ibda1_u { | |||
2746 | * other BTE. If a BTE stream has to be stopped (due to error * | 2646 | * other BTE. If a BTE stream has to be stopped (due to error * |
2747 | * handling for example), both BTE streams should be stopped and * | 2647 | * handling for example), both BTE streams should be stopped and * |
2748 | * their transfers discarded. * | 2648 | * their transfers discarded. * |
2749 | * * | 2649 | * * |
2750 | ************************************************************************/ | 2650 | ************************************************************************/ |
2751 | 2651 | ||
2752 | typedef union ii_ibct1_u { | 2652 | typedef union ii_ibct1_u { |
2753 | uint64_t ii_ibct1_regval; | 2653 | uint64_t ii_ibct1_regval; |
2754 | struct { | 2654 | struct { |
2755 | uint64_t i_zerofill : 1; | 2655 | uint64_t i_zerofill:1; |
2756 | uint64_t i_rsvd_2 : 3; | 2656 | uint64_t i_rsvd_2:3; |
2757 | uint64_t i_notify : 1; | 2657 | uint64_t i_notify:1; |
2758 | uint64_t i_rsvd_1 : 3; | 2658 | uint64_t i_rsvd_1:3; |
2759 | uint64_t i_poison : 1; | 2659 | uint64_t i_poison:1; |
2760 | uint64_t i_rsvd : 55; | 2660 | uint64_t i_rsvd:55; |
2761 | } ii_ibct1_fld_s; | 2661 | } ii_ibct1_fld_s; |
2762 | } ii_ibct1_u_t; | 2662 | } ii_ibct1_u_t; |
2763 | 2663 | ||
2764 | |||
2765 | /************************************************************************ | 2664 | /************************************************************************ |
2766 | * * | 2665 | * * |
2767 | * This register contains the address to which the WINV is sent. * | 2666 | * This register contains the address to which the WINV is sent. * |
2768 | * This address has to be cache line aligned. * | 2667 | * This address has to be cache line aligned. * |
2769 | * * | 2668 | * * |
2770 | ************************************************************************/ | 2669 | ************************************************************************/ |
2771 | 2670 | ||
2772 | typedef union ii_ibna1_u { | 2671 | typedef union ii_ibna1_u { |
2773 | uint64_t ii_ibna1_regval; | 2672 | uint64_t ii_ibna1_regval; |
2774 | struct { | 2673 | struct { |
2775 | uint64_t i_rsvd_1 : 7; | 2674 | uint64_t i_rsvd_1:7; |
2776 | uint64_t i_addr : 33; | 2675 | uint64_t i_addr:33; |
2777 | uint64_t i_rsvd : 24; | 2676 | uint64_t i_rsvd:24; |
2778 | } ii_ibna1_fld_s; | 2677 | } ii_ibna1_fld_s; |
2779 | } ii_ibna1_u_t; | 2678 | } ii_ibna1_u_t; |
2780 | 2679 | ||
2781 | |||
2782 | /************************************************************************ | 2680 | /************************************************************************ |
2783 | * * | 2681 | * * |
2784 | * This register contains the programmable level as well as the node * | 2682 | * This register contains the programmable level as well as the node * |
2785 | * ID and PI unit of the processor to which the interrupt will be * | 2683 | * ID and PI unit of the processor to which the interrupt will be * |
2786 | * sent. * | 2684 | * sent. * |
2787 | * * | 2685 | * * |
2788 | ************************************************************************/ | 2686 | ************************************************************************/ |
2789 | 2687 | ||
2790 | typedef union ii_ibia1_u { | 2688 | typedef union ii_ibia1_u { |
2791 | uint64_t ii_ibia1_regval; | 2689 | uint64_t ii_ibia1_regval; |
2792 | struct { | 2690 | struct { |
2793 | uint64_t i_pi_id : 1; | 2691 | uint64_t i_pi_id:1; |
2794 | uint64_t i_node_id : 8; | 2692 | uint64_t i_node_id:8; |
2795 | uint64_t i_rsvd_1 : 7; | 2693 | uint64_t i_rsvd_1:7; |
2796 | uint64_t i_level : 7; | 2694 | uint64_t i_level:7; |
2797 | uint64_t i_rsvd : 41; | 2695 | uint64_t i_rsvd:41; |
2798 | } ii_ibia1_fld_s; | 2696 | } ii_ibia1_fld_s; |
2799 | } ii_ibia1_u_t; | 2697 | } ii_ibia1_u_t; |
2800 | 2698 | ||
2801 | |||
2802 | /************************************************************************ | 2699 | /************************************************************************ |
2803 | * * | 2700 | * * |
2804 | * This register defines the resources that feed information into * | 2701 | * This register defines the resources that feed information into * |
2805 | * the two performance counters located in the IO Performance * | 2702 | * the two performance counters located in the IO Performance * |
2806 | * Profiling Register. There are 17 different quantities that can be * | 2703 | * Profiling Register. There are 17 different quantities that can be * |
@@ -2811,133 +2708,129 @@ typedef union ii_ibia1_u { | |||
2811 | * other is available from the other performance counter. Hence, the * | 2708 | * other is available from the other performance counter. Hence, the * |
2812 | * II supports all 17*16=272 possible combinations of quantities to * | 2709 | * II supports all 17*16=272 possible combinations of quantities to * |
2813 | * measure. * | 2710 | * measure. * |
2814 | * * | 2711 | * * |
2815 | ************************************************************************/ | 2712 | ************************************************************************/ |
2816 | 2713 | ||
2817 | typedef union ii_ipcr_u { | 2714 | typedef union ii_ipcr_u { |
2818 | uint64_t ii_ipcr_regval; | 2715 | uint64_t ii_ipcr_regval; |
2819 | struct { | 2716 | struct { |
2820 | uint64_t i_ippr0_c : 4; | 2717 | uint64_t i_ippr0_c:4; |
2821 | uint64_t i_ippr1_c : 4; | 2718 | uint64_t i_ippr1_c:4; |
2822 | uint64_t i_icct : 8; | 2719 | uint64_t i_icct:8; |
2823 | uint64_t i_rsvd : 48; | 2720 | uint64_t i_rsvd:48; |
2824 | } ii_ipcr_fld_s; | 2721 | } ii_ipcr_fld_s; |
2825 | } ii_ipcr_u_t; | 2722 | } ii_ipcr_u_t; |
2826 | 2723 | ||
2827 | |||
2828 | /************************************************************************ | 2724 | /************************************************************************ |
2829 | * * | 2725 | * * |
2830 | * * | 2726 | * * |
2831 | * * | 2727 | * * |
2832 | ************************************************************************/ | 2728 | ************************************************************************/ |
2833 | 2729 | ||
2834 | typedef union ii_ippr_u { | 2730 | typedef union ii_ippr_u { |
2835 | uint64_t ii_ippr_regval; | 2731 | uint64_t ii_ippr_regval; |
2836 | struct { | 2732 | struct { |
2837 | uint64_t i_ippr0 : 32; | 2733 | uint64_t i_ippr0:32; |
2838 | uint64_t i_ippr1 : 32; | 2734 | uint64_t i_ippr1:32; |
2839 | } ii_ippr_fld_s; | 2735 | } ii_ippr_fld_s; |
2840 | } ii_ippr_u_t; | 2736 | } ii_ippr_u_t; |
2841 | 2737 | ||
2842 | 2738 | /************************************************************************ | |
2843 | 2739 | * * | |
2844 | /************************************************************************** | 2740 | * The following defines which were not formed into structures are * |
2845 | * * | 2741 | * probably indentical to another register, and the name of the * |
2846 | * The following defines which were not formed into structures are * | 2742 | * register is provided against each of these registers. This * |
2847 | * probably indentical to another register, and the name of the * | 2743 | * information needs to be checked carefully * |
2848 | * register is provided against each of these registers. This * | 2744 | * * |
2849 | * information needs to be checked carefully * | 2745 | * IIO_ICRB1_A IIO_ICRB0_A * |
2850 | * * | 2746 | * IIO_ICRB1_B IIO_ICRB0_B * |
2851 | * IIO_ICRB1_A IIO_ICRB0_A * | 2747 | * IIO_ICRB1_C IIO_ICRB0_C * |
2852 | * IIO_ICRB1_B IIO_ICRB0_B * | 2748 | * IIO_ICRB1_D IIO_ICRB0_D * |
2853 | * IIO_ICRB1_C IIO_ICRB0_C * | 2749 | * IIO_ICRB1_E IIO_ICRB0_E * |
2854 | * IIO_ICRB1_D IIO_ICRB0_D * | 2750 | * IIO_ICRB2_A IIO_ICRB0_A * |
2855 | * IIO_ICRB1_E IIO_ICRB0_E * | 2751 | * IIO_ICRB2_B IIO_ICRB0_B * |
2856 | * IIO_ICRB2_A IIO_ICRB0_A * | 2752 | * IIO_ICRB2_C IIO_ICRB0_C * |
2857 | * IIO_ICRB2_B IIO_ICRB0_B * | 2753 | * IIO_ICRB2_D IIO_ICRB0_D * |
2858 | * IIO_ICRB2_C IIO_ICRB0_C * | 2754 | * IIO_ICRB2_E IIO_ICRB0_E * |
2859 | * IIO_ICRB2_D IIO_ICRB0_D * | 2755 | * IIO_ICRB3_A IIO_ICRB0_A * |
2860 | * IIO_ICRB2_E IIO_ICRB0_E * | 2756 | * IIO_ICRB3_B IIO_ICRB0_B * |
2861 | * IIO_ICRB3_A IIO_ICRB0_A * | 2757 | * IIO_ICRB3_C IIO_ICRB0_C * |
2862 | * IIO_ICRB3_B IIO_ICRB0_B * | 2758 | * IIO_ICRB3_D IIO_ICRB0_D * |
2863 | * IIO_ICRB3_C IIO_ICRB0_C * | 2759 | * IIO_ICRB3_E IIO_ICRB0_E * |
2864 | * IIO_ICRB3_D IIO_ICRB0_D * | 2760 | * IIO_ICRB4_A IIO_ICRB0_A * |
2865 | * IIO_ICRB3_E IIO_ICRB0_E * | 2761 | * IIO_ICRB4_B IIO_ICRB0_B * |
2866 | * IIO_ICRB4_A IIO_ICRB0_A * | 2762 | * IIO_ICRB4_C IIO_ICRB0_C * |
2867 | * IIO_ICRB4_B IIO_ICRB0_B * | 2763 | * IIO_ICRB4_D IIO_ICRB0_D * |
2868 | * IIO_ICRB4_C IIO_ICRB0_C * | 2764 | * IIO_ICRB4_E IIO_ICRB0_E * |
2869 | * IIO_ICRB4_D IIO_ICRB0_D * | 2765 | * IIO_ICRB5_A IIO_ICRB0_A * |
2870 | * IIO_ICRB4_E IIO_ICRB0_E * | 2766 | * IIO_ICRB5_B IIO_ICRB0_B * |
2871 | * IIO_ICRB5_A IIO_ICRB0_A * | 2767 | * IIO_ICRB5_C IIO_ICRB0_C * |
2872 | * IIO_ICRB5_B IIO_ICRB0_B * | 2768 | * IIO_ICRB5_D IIO_ICRB0_D * |
2873 | * IIO_ICRB5_C IIO_ICRB0_C * | 2769 | * IIO_ICRB5_E IIO_ICRB0_E * |
2874 | * IIO_ICRB5_D IIO_ICRB0_D * | 2770 | * IIO_ICRB6_A IIO_ICRB0_A * |
2875 | * IIO_ICRB5_E IIO_ICRB0_E * | 2771 | * IIO_ICRB6_B IIO_ICRB0_B * |
2876 | * IIO_ICRB6_A IIO_ICRB0_A * | 2772 | * IIO_ICRB6_C IIO_ICRB0_C * |
2877 | * IIO_ICRB6_B IIO_ICRB0_B * | 2773 | * IIO_ICRB6_D IIO_ICRB0_D * |
2878 | * IIO_ICRB6_C IIO_ICRB0_C * | 2774 | * IIO_ICRB6_E IIO_ICRB0_E * |
2879 | * IIO_ICRB6_D IIO_ICRB0_D * | 2775 | * IIO_ICRB7_A IIO_ICRB0_A * |
2880 | * IIO_ICRB6_E IIO_ICRB0_E * | 2776 | * IIO_ICRB7_B IIO_ICRB0_B * |
2881 | * IIO_ICRB7_A IIO_ICRB0_A * | 2777 | * IIO_ICRB7_C IIO_ICRB0_C * |
2882 | * IIO_ICRB7_B IIO_ICRB0_B * | 2778 | * IIO_ICRB7_D IIO_ICRB0_D * |
2883 | * IIO_ICRB7_C IIO_ICRB0_C * | 2779 | * IIO_ICRB7_E IIO_ICRB0_E * |
2884 | * IIO_ICRB7_D IIO_ICRB0_D * | 2780 | * IIO_ICRB8_A IIO_ICRB0_A * |
2885 | * IIO_ICRB7_E IIO_ICRB0_E * | 2781 | * IIO_ICRB8_B IIO_ICRB0_B * |
2886 | * IIO_ICRB8_A IIO_ICRB0_A * | 2782 | * IIO_ICRB8_C IIO_ICRB0_C * |
2887 | * IIO_ICRB8_B IIO_ICRB0_B * | 2783 | * IIO_ICRB8_D IIO_ICRB0_D * |
2888 | * IIO_ICRB8_C IIO_ICRB0_C * | 2784 | * IIO_ICRB8_E IIO_ICRB0_E * |
2889 | * IIO_ICRB8_D IIO_ICRB0_D * | 2785 | * IIO_ICRB9_A IIO_ICRB0_A * |
2890 | * IIO_ICRB8_E IIO_ICRB0_E * | 2786 | * IIO_ICRB9_B IIO_ICRB0_B * |
2891 | * IIO_ICRB9_A IIO_ICRB0_A * | 2787 | * IIO_ICRB9_C IIO_ICRB0_C * |
2892 | * IIO_ICRB9_B IIO_ICRB0_B * | 2788 | * IIO_ICRB9_D IIO_ICRB0_D * |
2893 | * IIO_ICRB9_C IIO_ICRB0_C * | 2789 | * IIO_ICRB9_E IIO_ICRB0_E * |
2894 | * IIO_ICRB9_D IIO_ICRB0_D * | 2790 | * IIO_ICRBA_A IIO_ICRB0_A * |
2895 | * IIO_ICRB9_E IIO_ICRB0_E * | 2791 | * IIO_ICRBA_B IIO_ICRB0_B * |
2896 | * IIO_ICRBA_A IIO_ICRB0_A * | 2792 | * IIO_ICRBA_C IIO_ICRB0_C * |
2897 | * IIO_ICRBA_B IIO_ICRB0_B * | 2793 | * IIO_ICRBA_D IIO_ICRB0_D * |
2898 | * IIO_ICRBA_C IIO_ICRB0_C * | 2794 | * IIO_ICRBA_E IIO_ICRB0_E * |
2899 | * IIO_ICRBA_D IIO_ICRB0_D * | 2795 | * IIO_ICRBB_A IIO_ICRB0_A * |
2900 | * IIO_ICRBA_E IIO_ICRB0_E * | 2796 | * IIO_ICRBB_B IIO_ICRB0_B * |
2901 | * IIO_ICRBB_A IIO_ICRB0_A * | 2797 | * IIO_ICRBB_C IIO_ICRB0_C * |
2902 | * IIO_ICRBB_B IIO_ICRB0_B * | 2798 | * IIO_ICRBB_D IIO_ICRB0_D * |
2903 | * IIO_ICRBB_C IIO_ICRB0_C * | 2799 | * IIO_ICRBB_E IIO_ICRB0_E * |
2904 | * IIO_ICRBB_D IIO_ICRB0_D * | 2800 | * IIO_ICRBC_A IIO_ICRB0_A * |
2905 | * IIO_ICRBB_E IIO_ICRB0_E * | 2801 | * IIO_ICRBC_B IIO_ICRB0_B * |
2906 | * IIO_ICRBC_A IIO_ICRB0_A * | 2802 | * IIO_ICRBC_C IIO_ICRB0_C * |
2907 | * IIO_ICRBC_B IIO_ICRB0_B * | 2803 | * IIO_ICRBC_D IIO_ICRB0_D * |
2908 | * IIO_ICRBC_C IIO_ICRB0_C * | 2804 | * IIO_ICRBC_E IIO_ICRB0_E * |
2909 | * IIO_ICRBC_D IIO_ICRB0_D * | 2805 | * IIO_ICRBD_A IIO_ICRB0_A * |
2910 | * IIO_ICRBC_E IIO_ICRB0_E * | 2806 | * IIO_ICRBD_B IIO_ICRB0_B * |
2911 | * IIO_ICRBD_A IIO_ICRB0_A * | 2807 | * IIO_ICRBD_C IIO_ICRB0_C * |
2912 | * IIO_ICRBD_B IIO_ICRB0_B * | 2808 | * IIO_ICRBD_D IIO_ICRB0_D * |
2913 | * IIO_ICRBD_C IIO_ICRB0_C * | 2809 | * IIO_ICRBD_E IIO_ICRB0_E * |
2914 | * IIO_ICRBD_D IIO_ICRB0_D * | 2810 | * IIO_ICRBE_A IIO_ICRB0_A * |
2915 | * IIO_ICRBD_E IIO_ICRB0_E * | 2811 | * IIO_ICRBE_B IIO_ICRB0_B * |
2916 | * IIO_ICRBE_A IIO_ICRB0_A * | 2812 | * IIO_ICRBE_C IIO_ICRB0_C * |
2917 | * IIO_ICRBE_B IIO_ICRB0_B * | 2813 | * IIO_ICRBE_D IIO_ICRB0_D * |
2918 | * IIO_ICRBE_C IIO_ICRB0_C * | 2814 | * IIO_ICRBE_E IIO_ICRB0_E * |
2919 | * IIO_ICRBE_D IIO_ICRB0_D * | 2815 | * * |
2920 | * IIO_ICRBE_E IIO_ICRB0_E * | 2816 | ************************************************************************/ |
2921 | * * | ||
2922 | **************************************************************************/ | ||
2923 | |||
2924 | 2817 | ||
2925 | /* | 2818 | /* |
2926 | * Slightly friendlier names for some common registers. | 2819 | * Slightly friendlier names for some common registers. |
2927 | */ | 2820 | */ |
2928 | #define IIO_WIDGET IIO_WID /* Widget identification */ | 2821 | #define IIO_WIDGET IIO_WID /* Widget identification */ |
2929 | #define IIO_WIDGET_STAT IIO_WSTAT /* Widget status register */ | 2822 | #define IIO_WIDGET_STAT IIO_WSTAT /* Widget status register */ |
2930 | #define IIO_WIDGET_CTRL IIO_WCR /* Widget control register */ | 2823 | #define IIO_WIDGET_CTRL IIO_WCR /* Widget control register */ |
2931 | #define IIO_PROTECT IIO_ILAPR /* IO interface protection */ | 2824 | #define IIO_PROTECT IIO_ILAPR /* IO interface protection */ |
2932 | #define IIO_PROTECT_OVRRD IIO_ILAPO /* IO protect override */ | 2825 | #define IIO_PROTECT_OVRRD IIO_ILAPO /* IO protect override */ |
2933 | #define IIO_OUTWIDGET_ACCESS IIO_IOWA /* Outbound widget access */ | 2826 | #define IIO_OUTWIDGET_ACCESS IIO_IOWA /* Outbound widget access */ |
2934 | #define IIO_INWIDGET_ACCESS IIO_IIWA /* Inbound widget access */ | 2827 | #define IIO_INWIDGET_ACCESS IIO_IIWA /* Inbound widget access */ |
2935 | #define IIO_INDEV_ERR_MASK IIO_IIDEM /* Inbound device error mask */ | 2828 | #define IIO_INDEV_ERR_MASK IIO_IIDEM /* Inbound device error mask */ |
2936 | #define IIO_LLP_CSR IIO_ILCSR /* LLP control and status */ | 2829 | #define IIO_LLP_CSR IIO_ILCSR /* LLP control and status */ |
2937 | #define IIO_LLP_LOG IIO_ILLR /* LLP log */ | 2830 | #define IIO_LLP_LOG IIO_ILLR /* LLP log */ |
2938 | #define IIO_XTALKCC_TOUT IIO_IXCC /* Xtalk credit count timeout*/ | 2831 | #define IIO_XTALKCC_TOUT IIO_IXCC /* Xtalk credit count timeout */ |
2939 | #define IIO_XTALKTT_TOUT IIO_IXTT /* Xtalk tail timeout */ | 2832 | #define IIO_XTALKTT_TOUT IIO_IXTT /* Xtalk tail timeout */ |
2940 | #define IIO_IO_ERR_CLR IIO_IECLR /* IO error clear */ | 2833 | #define IIO_IO_ERR_CLR IIO_IECLR /* IO error clear */ |
2941 | #define IIO_IGFX_0 IIO_IGFX0 | 2834 | #define IIO_IGFX_0 IIO_IGFX0 |
2942 | #define IIO_IGFX_1 IIO_IGFX1 | 2835 | #define IIO_IGFX_1 IIO_IGFX1 |
2943 | #define IIO_IBCT_0 IIO_IBCT0 | 2836 | #define IIO_IBCT_0 IIO_IBCT0 |
@@ -2957,12 +2850,12 @@ typedef union ii_ippr_u { | |||
2957 | #define IIO_PRTE_A(_x) (IIO_IPRTE0_A + (8 * (_x))) | 2850 | #define IIO_PRTE_A(_x) (IIO_IPRTE0_A + (8 * (_x))) |
2958 | #define IIO_PRTE_B(_x) (IIO_IPRTE0_B + (8 * (_x))) | 2851 | #define IIO_PRTE_B(_x) (IIO_IPRTE0_B + (8 * (_x))) |
2959 | #define IIO_NUM_PRTES 8 /* Total number of PRB table entries */ | 2852 | #define IIO_NUM_PRTES 8 /* Total number of PRB table entries */ |
2960 | #define IIO_WIDPRTE_A(x) IIO_PRTE_A(((x) - 8)) /* widget ID to its PRTE num */ | 2853 | #define IIO_WIDPRTE_A(x) IIO_PRTE_A(((x) - 8)) /* widget ID to its PRTE num */ |
2961 | #define IIO_WIDPRTE_B(x) IIO_PRTE_B(((x) - 8)) /* widget ID to its PRTE num */ | 2854 | #define IIO_WIDPRTE_B(x) IIO_PRTE_B(((x) - 8)) /* widget ID to its PRTE num */ |
2962 | 2855 | ||
2963 | #define IIO_NUM_IPRBS (9) | 2856 | #define IIO_NUM_IPRBS 9 |
2964 | 2857 | ||
2965 | #define IIO_LLP_CSR_IS_UP 0x00002000 | 2858 | #define IIO_LLP_CSR_IS_UP 0x00002000 |
2966 | #define IIO_LLP_CSR_LLP_STAT_MASK 0x00003000 | 2859 | #define IIO_LLP_CSR_LLP_STAT_MASK 0x00003000 |
2967 | #define IIO_LLP_CSR_LLP_STAT_SHFT 12 | 2860 | #define IIO_LLP_CSR_LLP_STAT_SHFT 12 |
2968 | 2861 | ||
@@ -2970,30 +2863,29 @@ typedef union ii_ippr_u { | |||
2970 | #define IIO_LLP_SN_MAX 0xffff /* in ILLR SN_CNT, Max Sequence Number errors */ | 2863 | #define IIO_LLP_SN_MAX 0xffff /* in ILLR SN_CNT, Max Sequence Number errors */ |
2971 | 2864 | ||
2972 | /* key to IIO_PROTECT_OVRRD */ | 2865 | /* key to IIO_PROTECT_OVRRD */ |
2973 | #define IIO_PROTECT_OVRRD_KEY 0x53474972756c6573ull /* "SGIrules" */ | 2866 | #define IIO_PROTECT_OVRRD_KEY 0x53474972756c6573ull /* "SGIrules" */ |
2974 | 2867 | ||
2975 | /* BTE register names */ | 2868 | /* BTE register names */ |
2976 | #define IIO_BTE_STAT_0 IIO_IBLS_0 /* Also BTE length/status 0 */ | 2869 | #define IIO_BTE_STAT_0 IIO_IBLS_0 /* Also BTE length/status 0 */ |
2977 | #define IIO_BTE_SRC_0 IIO_IBSA_0 /* Also BTE source address 0 */ | 2870 | #define IIO_BTE_SRC_0 IIO_IBSA_0 /* Also BTE source address 0 */ |
2978 | #define IIO_BTE_DEST_0 IIO_IBDA_0 /* Also BTE dest. address 0 */ | 2871 | #define IIO_BTE_DEST_0 IIO_IBDA_0 /* Also BTE dest. address 0 */ |
2979 | #define IIO_BTE_CTRL_0 IIO_IBCT_0 /* Also BTE control/terminate 0 */ | 2872 | #define IIO_BTE_CTRL_0 IIO_IBCT_0 /* Also BTE control/terminate 0 */ |
2980 | #define IIO_BTE_NOTIFY_0 IIO_IBNA_0 /* Also BTE notification 0 */ | 2873 | #define IIO_BTE_NOTIFY_0 IIO_IBNA_0 /* Also BTE notification 0 */ |
2981 | #define IIO_BTE_INT_0 IIO_IBIA_0 /* Also BTE interrupt 0 */ | 2874 | #define IIO_BTE_INT_0 IIO_IBIA_0 /* Also BTE interrupt 0 */ |
2982 | #define IIO_BTE_OFF_0 0 /* Base offset from BTE 0 regs. */ | 2875 | #define IIO_BTE_OFF_0 0 /* Base offset from BTE 0 regs. */ |
2983 | #define IIO_BTE_OFF_1 (IIO_IBLS_1 - IIO_IBLS_0) /* Offset from base to BTE 1 */ | 2876 | #define IIO_BTE_OFF_1 (IIO_IBLS_1 - IIO_IBLS_0) /* Offset from base to BTE 1 */ |
2984 | 2877 | ||
2985 | /* BTE register offsets from base */ | 2878 | /* BTE register offsets from base */ |
2986 | #define BTEOFF_STAT 0 | 2879 | #define BTEOFF_STAT 0 |
2987 | #define BTEOFF_SRC (IIO_BTE_SRC_0 - IIO_BTE_STAT_0) | 2880 | #define BTEOFF_SRC (IIO_BTE_SRC_0 - IIO_BTE_STAT_0) |
2988 | #define BTEOFF_DEST (IIO_BTE_DEST_0 - IIO_BTE_STAT_0) | 2881 | #define BTEOFF_DEST (IIO_BTE_DEST_0 - IIO_BTE_STAT_0) |
2989 | #define BTEOFF_CTRL (IIO_BTE_CTRL_0 - IIO_BTE_STAT_0) | 2882 | #define BTEOFF_CTRL (IIO_BTE_CTRL_0 - IIO_BTE_STAT_0) |
2990 | #define BTEOFF_NOTIFY (IIO_BTE_NOTIFY_0 - IIO_BTE_STAT_0) | 2883 | #define BTEOFF_NOTIFY (IIO_BTE_NOTIFY_0 - IIO_BTE_STAT_0) |
2991 | #define BTEOFF_INT (IIO_BTE_INT_0 - IIO_BTE_STAT_0) | 2884 | #define BTEOFF_INT (IIO_BTE_INT_0 - IIO_BTE_STAT_0) |
2992 | |||
2993 | 2885 | ||
2994 | /* names used in shub diags */ | 2886 | /* names used in shub diags */ |
2995 | #define IIO_BASE_BTE0 IIO_IBLS_0 | 2887 | #define IIO_BASE_BTE0 IIO_IBLS_0 |
2996 | #define IIO_BASE_BTE1 IIO_IBLS_1 | 2888 | #define IIO_BASE_BTE1 IIO_IBLS_1 |
2997 | 2889 | ||
2998 | /* | 2890 | /* |
2999 | * Macro which takes the widget number, and returns the | 2891 | * Macro which takes the widget number, and returns the |
@@ -3001,10 +2893,9 @@ typedef union ii_ippr_u { | |||
3001 | * value _x is expected to be a widget number in the range | 2893 | * value _x is expected to be a widget number in the range |
3002 | * 0, 8 - 0xF | 2894 | * 0, 8 - 0xF |
3003 | */ | 2895 | */ |
3004 | #define IIO_IOPRB(_x) (IIO_IOPRB_0 + ( ( (_x) < HUB_WIDGET_ID_MIN ? \ | 2896 | #define IIO_IOPRB(_x) (IIO_IOPRB_0 + ( ( (_x) < HUB_WIDGET_ID_MIN ? \ |
3005 | (_x) : \ | 2897 | (_x) : \ |
3006 | (_x) - (HUB_WIDGET_ID_MIN-1)) << 3) ) | 2898 | (_x) - (HUB_WIDGET_ID_MIN-1)) << 3) ) |
3007 | |||
3008 | 2899 | ||
3009 | /* GFX Flow Control Node/Widget Register */ | 2900 | /* GFX Flow Control Node/Widget Register */ |
3010 | #define IIO_IGFX_W_NUM_BITS 4 /* size of widget num field */ | 2901 | #define IIO_IGFX_W_NUM_BITS 4 /* size of widget num field */ |
@@ -3025,7 +2916,6 @@ typedef union ii_ippr_u { | |||
3025 | (((node) & IIO_IGFX_N_NUM_MASK) << IIO_IGFX_N_NUM_SHIFT) | \ | 2916 | (((node) & IIO_IGFX_N_NUM_MASK) << IIO_IGFX_N_NUM_SHIFT) | \ |
3026 | (((cpu) & IIO_IGFX_P_NUM_MASK) << IIO_IGFX_P_NUM_SHIFT)) | 2917 | (((cpu) & IIO_IGFX_P_NUM_MASK) << IIO_IGFX_P_NUM_SHIFT)) |
3027 | 2918 | ||
3028 | |||
3029 | /* Scratch registers (all bits available) */ | 2919 | /* Scratch registers (all bits available) */ |
3030 | #define IIO_SCRATCH_REG0 IIO_ISCR0 | 2920 | #define IIO_SCRATCH_REG0 IIO_ISCR0 |
3031 | #define IIO_SCRATCH_REG1 IIO_ISCR1 | 2921 | #define IIO_SCRATCH_REG1 IIO_ISCR1 |
@@ -3046,21 +2936,21 @@ typedef union ii_ippr_u { | |||
3046 | #define IIO_SCRATCH_BIT1_0 0x0000000000000001UL | 2936 | #define IIO_SCRATCH_BIT1_0 0x0000000000000001UL |
3047 | #define IIO_SCRATCH_BIT1_1 0x0000000000000002UL | 2937 | #define IIO_SCRATCH_BIT1_1 0x0000000000000002UL |
3048 | /* IO Translation Table Entries */ | 2938 | /* IO Translation Table Entries */ |
3049 | #define IIO_NUM_ITTES 7 /* ITTEs numbered 0..6 */ | 2939 | #define IIO_NUM_ITTES 7 /* ITTEs numbered 0..6 */ |
3050 | /* Hw manuals number them 1..7! */ | 2940 | /* Hw manuals number them 1..7! */ |
3051 | /* | 2941 | /* |
3052 | * IIO_IMEM Register fields. | 2942 | * IIO_IMEM Register fields. |
3053 | */ | 2943 | */ |
3054 | #define IIO_IMEM_W0ESD 0x1UL /* Widget 0 shut down due to error */ | 2944 | #define IIO_IMEM_W0ESD 0x1UL /* Widget 0 shut down due to error */ |
3055 | #define IIO_IMEM_B0ESD (1UL << 4) /* BTE 0 shut down due to error */ | 2945 | #define IIO_IMEM_B0ESD (1UL << 4) /* BTE 0 shut down due to error */ |
3056 | #define IIO_IMEM_B1ESD (1UL << 8) /* BTE 1 Shut down due to error */ | 2946 | #define IIO_IMEM_B1ESD (1UL << 8) /* BTE 1 Shut down due to error */ |
3057 | 2947 | ||
3058 | /* | 2948 | /* |
3059 | * As a permanent workaround for a bug in the PI side of the shub, we've | 2949 | * As a permanent workaround for a bug in the PI side of the shub, we've |
3060 | * redefined big window 7 as small window 0. | 2950 | * redefined big window 7 as small window 0. |
3061 | XXX does this still apply for SN1?? | 2951 | XXX does this still apply for SN1?? |
3062 | */ | 2952 | */ |
3063 | #define HUB_NUM_BIG_WINDOW (IIO_NUM_ITTES - 1) | 2953 | #define HUB_NUM_BIG_WINDOW (IIO_NUM_ITTES - 1) |
3064 | 2954 | ||
3065 | /* | 2955 | /* |
3066 | * Use the top big window as a surrogate for the first small window | 2956 | * Use the top big window as a surrogate for the first small window |
@@ -3071,11 +2961,11 @@ typedef union ii_ippr_u { | |||
3071 | 2961 | ||
3072 | /* | 2962 | /* |
3073 | * CRB manipulation macros | 2963 | * CRB manipulation macros |
3074 | * The CRB macros are slightly complicated, since there are up to | 2964 | * The CRB macros are slightly complicated, since there are up to |
3075 | * four registers associated with each CRB entry. | 2965 | * four registers associated with each CRB entry. |
3076 | */ | 2966 | */ |
3077 | #define IIO_NUM_CRBS 15 /* Number of CRBs */ | 2967 | #define IIO_NUM_CRBS 15 /* Number of CRBs */ |
3078 | #define IIO_NUM_PC_CRBS 4 /* Number of partial cache CRBs */ | 2968 | #define IIO_NUM_PC_CRBS 4 /* Number of partial cache CRBs */ |
3079 | #define IIO_ICRB_OFFSET 8 | 2969 | #define IIO_ICRB_OFFSET 8 |
3080 | #define IIO_ICRB_0 IIO_ICRB0_A | 2970 | #define IIO_ICRB_0 IIO_ICRB0_A |
3081 | #define IIO_ICRB_ADDR_SHFT 2 /* Shift to get proper address */ | 2971 | #define IIO_ICRB_ADDR_SHFT 2 /* Shift to get proper address */ |
@@ -3083,43 +2973,43 @@ typedef union ii_ippr_u { | |||
3083 | #define IIO_FIRST_PC_ENTRY 12 | 2973 | #define IIO_FIRST_PC_ENTRY 12 |
3084 | */ | 2974 | */ |
3085 | 2975 | ||
3086 | #define IIO_ICRB_A(_x) ((u64)(IIO_ICRB_0 + (6 * IIO_ICRB_OFFSET * (_x)))) | 2976 | #define IIO_ICRB_A(_x) ((u64)(IIO_ICRB_0 + (6 * IIO_ICRB_OFFSET * (_x)))) |
3087 | #define IIO_ICRB_B(_x) ((u64)((char *)IIO_ICRB_A(_x) + 1*IIO_ICRB_OFFSET)) | 2977 | #define IIO_ICRB_B(_x) ((u64)((char *)IIO_ICRB_A(_x) + 1*IIO_ICRB_OFFSET)) |
3088 | #define IIO_ICRB_C(_x) ((u64)((char *)IIO_ICRB_A(_x) + 2*IIO_ICRB_OFFSET)) | 2978 | #define IIO_ICRB_C(_x) ((u64)((char *)IIO_ICRB_A(_x) + 2*IIO_ICRB_OFFSET)) |
3089 | #define IIO_ICRB_D(_x) ((u64)((char *)IIO_ICRB_A(_x) + 3*IIO_ICRB_OFFSET)) | 2979 | #define IIO_ICRB_D(_x) ((u64)((char *)IIO_ICRB_A(_x) + 3*IIO_ICRB_OFFSET)) |
3090 | #define IIO_ICRB_E(_x) ((u64)((char *)IIO_ICRB_A(_x) + 4*IIO_ICRB_OFFSET)) | 2980 | #define IIO_ICRB_E(_x) ((u64)((char *)IIO_ICRB_A(_x) + 4*IIO_ICRB_OFFSET)) |
3091 | 2981 | ||
3092 | #define TNUM_TO_WIDGET_DEV(_tnum) (_tnum & 0x7) | 2982 | #define TNUM_TO_WIDGET_DEV(_tnum) (_tnum & 0x7) |
3093 | 2983 | ||
3094 | /* | 2984 | /* |
3095 | * values for "ecode" field | 2985 | * values for "ecode" field |
3096 | */ | 2986 | */ |
3097 | #define IIO_ICRB_ECODE_DERR 0 /* Directory error due to IIO access */ | 2987 | #define IIO_ICRB_ECODE_DERR 0 /* Directory error due to IIO access */ |
3098 | #define IIO_ICRB_ECODE_PERR 1 /* Poison error on IO access */ | 2988 | #define IIO_ICRB_ECODE_PERR 1 /* Poison error on IO access */ |
3099 | #define IIO_ICRB_ECODE_WERR 2 /* Write error by IIO access | 2989 | #define IIO_ICRB_ECODE_WERR 2 /* Write error by IIO access |
3100 | * e.g. WINV to a Read only line. */ | 2990 | * e.g. WINV to a Read only line. */ |
3101 | #define IIO_ICRB_ECODE_AERR 3 /* Access error caused by IIO access */ | 2991 | #define IIO_ICRB_ECODE_AERR 3 /* Access error caused by IIO access */ |
3102 | #define IIO_ICRB_ECODE_PWERR 4 /* Error on partial write */ | 2992 | #define IIO_ICRB_ECODE_PWERR 4 /* Error on partial write */ |
3103 | #define IIO_ICRB_ECODE_PRERR 5 /* Error on partial read */ | 2993 | #define IIO_ICRB_ECODE_PRERR 5 /* Error on partial read */ |
3104 | #define IIO_ICRB_ECODE_TOUT 6 /* CRB timeout before deallocating */ | 2994 | #define IIO_ICRB_ECODE_TOUT 6 /* CRB timeout before deallocating */ |
3105 | #define IIO_ICRB_ECODE_XTERR 7 /* Incoming xtalk pkt had error bit */ | 2995 | #define IIO_ICRB_ECODE_XTERR 7 /* Incoming xtalk pkt had error bit */ |
3106 | 2996 | ||
3107 | /* | 2997 | /* |
3108 | * Values for field imsgtype | 2998 | * Values for field imsgtype |
3109 | */ | 2999 | */ |
3110 | #define IIO_ICRB_IMSGT_XTALK 0 /* Incoming Meessage from Xtalk */ | 3000 | #define IIO_ICRB_IMSGT_XTALK 0 /* Incoming Meessage from Xtalk */ |
3111 | #define IIO_ICRB_IMSGT_BTE 1 /* Incoming message from BTE */ | 3001 | #define IIO_ICRB_IMSGT_BTE 1 /* Incoming message from BTE */ |
3112 | #define IIO_ICRB_IMSGT_SN1NET 2 /* Incoming message from SN1 net */ | 3002 | #define IIO_ICRB_IMSGT_SN1NET 2 /* Incoming message from SN1 net */ |
3113 | #define IIO_ICRB_IMSGT_CRB 3 /* Incoming message from CRB ??? */ | 3003 | #define IIO_ICRB_IMSGT_CRB 3 /* Incoming message from CRB ??? */ |
3114 | 3004 | ||
3115 | /* | 3005 | /* |
3116 | * values for field initiator. | 3006 | * values for field initiator. |
3117 | */ | 3007 | */ |
3118 | #define IIO_ICRB_INIT_XTALK 0 /* Message originated in xtalk */ | 3008 | #define IIO_ICRB_INIT_XTALK 0 /* Message originated in xtalk */ |
3119 | #define IIO_ICRB_INIT_BTE0 0x1 /* Message originated in BTE 0 */ | 3009 | #define IIO_ICRB_INIT_BTE0 0x1 /* Message originated in BTE 0 */ |
3120 | #define IIO_ICRB_INIT_SN1NET 0x2 /* Message originated in SN1net */ | 3010 | #define IIO_ICRB_INIT_SN1NET 0x2 /* Message originated in SN1net */ |
3121 | #define IIO_ICRB_INIT_CRB 0x3 /* Message originated in CRB ? */ | 3011 | #define IIO_ICRB_INIT_CRB 0x3 /* Message originated in CRB ? */ |
3122 | #define IIO_ICRB_INIT_BTE1 0x5 /* MEssage originated in BTE 1 */ | 3012 | #define IIO_ICRB_INIT_BTE1 0x5 /* MEssage originated in BTE 1 */ |
3123 | 3013 | ||
3124 | /* | 3014 | /* |
3125 | * Number of credits Hub widget has while sending req/response to | 3015 | * Number of credits Hub widget has while sending req/response to |
@@ -3127,8 +3017,8 @@ typedef union ii_ippr_u { | |||
3127 | * Value of 3 is required by Xbow 1.1 | 3017 | * Value of 3 is required by Xbow 1.1 |
3128 | * We may be able to increase this to 4 with Xbow 1.2. | 3018 | * We may be able to increase this to 4 with Xbow 1.2. |
3129 | */ | 3019 | */ |
3130 | #define HUBII_XBOW_CREDIT 3 | 3020 | #define HUBII_XBOW_CREDIT 3 |
3131 | #define HUBII_XBOW_REV2_CREDIT 4 | 3021 | #define HUBII_XBOW_REV2_CREDIT 4 |
3132 | 3022 | ||
3133 | /* | 3023 | /* |
3134 | * Number of credits that xtalk devices should use when communicating | 3024 | * Number of credits that xtalk devices should use when communicating |
@@ -3159,28 +3049,28 @@ typedef union ii_ippr_u { | |||
3159 | */ | 3049 | */ |
3160 | 3050 | ||
3161 | #define IIO_ICMR_CRB_VLD_SHFT 20 | 3051 | #define IIO_ICMR_CRB_VLD_SHFT 20 |
3162 | #define IIO_ICMR_CRB_VLD_MASK (0x7fffUL << IIO_ICMR_CRB_VLD_SHFT) | 3052 | #define IIO_ICMR_CRB_VLD_MASK (0x7fffUL << IIO_ICMR_CRB_VLD_SHFT) |
3163 | 3053 | ||
3164 | #define IIO_ICMR_FC_CNT_SHFT 16 | 3054 | #define IIO_ICMR_FC_CNT_SHFT 16 |
3165 | #define IIO_ICMR_FC_CNT_MASK (0xf << IIO_ICMR_FC_CNT_SHFT) | 3055 | #define IIO_ICMR_FC_CNT_MASK (0xf << IIO_ICMR_FC_CNT_SHFT) |
3166 | 3056 | ||
3167 | #define IIO_ICMR_C_CNT_SHFT 4 | 3057 | #define IIO_ICMR_C_CNT_SHFT 4 |
3168 | #define IIO_ICMR_C_CNT_MASK (0xf << IIO_ICMR_C_CNT_SHFT) | 3058 | #define IIO_ICMR_C_CNT_MASK (0xf << IIO_ICMR_C_CNT_SHFT) |
3169 | 3059 | ||
3170 | #define IIO_ICMR_PRECISE (1UL << 52) | 3060 | #define IIO_ICMR_PRECISE (1UL << 52) |
3171 | #define IIO_ICMR_CLR_RPPD (1UL << 13) | 3061 | #define IIO_ICMR_CLR_RPPD (1UL << 13) |
3172 | #define IIO_ICMR_CLR_RQPD (1UL << 12) | 3062 | #define IIO_ICMR_CLR_RQPD (1UL << 12) |
3173 | 3063 | ||
3174 | /* | 3064 | /* |
3175 | * IIO PIO Deallocation register field masks : (IIO_IPDR) | 3065 | * IIO PIO Deallocation register field masks : (IIO_IPDR) |
3176 | XXX present but not needed in bedrock? See the manual. | 3066 | XXX present but not needed in bedrock? See the manual. |
3177 | */ | 3067 | */ |
3178 | #define IIO_IPDR_PND (1 << 4) | 3068 | #define IIO_IPDR_PND (1 << 4) |
3179 | 3069 | ||
3180 | /* | 3070 | /* |
3181 | * IIO CRB deallocation register field masks: (IIO_ICDR) | 3071 | * IIO CRB deallocation register field masks: (IIO_ICDR) |
3182 | */ | 3072 | */ |
3183 | #define IIO_ICDR_PND (1 << 4) | 3073 | #define IIO_ICDR_PND (1 << 4) |
3184 | 3074 | ||
3185 | /* | 3075 | /* |
3186 | * IO BTE Length/Status (IIO_IBLS) register bit field definitions | 3076 | * IO BTE Length/Status (IIO_IBLS) register bit field definitions |
@@ -3223,35 +3113,35 @@ typedef union ii_ippr_u { | |||
3223 | /* | 3113 | /* |
3224 | * IO Error Clear register bit field definitions | 3114 | * IO Error Clear register bit field definitions |
3225 | */ | 3115 | */ |
3226 | #define IECLR_PI1_FWD_INT (1UL << 31) /* clear PI1_FORWARD_INT in iidsr */ | 3116 | #define IECLR_PI1_FWD_INT (1UL << 31) /* clear PI1_FORWARD_INT in iidsr */ |
3227 | #define IECLR_PI0_FWD_INT (1UL << 30) /* clear PI0_FORWARD_INT in iidsr */ | 3117 | #define IECLR_PI0_FWD_INT (1UL << 30) /* clear PI0_FORWARD_INT in iidsr */ |
3228 | #define IECLR_SPUR_RD_HDR (1UL << 29) /* clear valid bit in ixss reg */ | 3118 | #define IECLR_SPUR_RD_HDR (1UL << 29) /* clear valid bit in ixss reg */ |
3229 | #define IECLR_BTE1 (1UL << 18) /* clear bte error 1 */ | 3119 | #define IECLR_BTE1 (1UL << 18) /* clear bte error 1 */ |
3230 | #define IECLR_BTE0 (1UL << 17) /* clear bte error 0 */ | 3120 | #define IECLR_BTE0 (1UL << 17) /* clear bte error 0 */ |
3231 | #define IECLR_CRAZY (1UL << 16) /* clear crazy bit in wstat reg */ | 3121 | #define IECLR_CRAZY (1UL << 16) /* clear crazy bit in wstat reg */ |
3232 | #define IECLR_PRB_F (1UL << 15) /* clear err bit in PRB_F reg */ | 3122 | #define IECLR_PRB_F (1UL << 15) /* clear err bit in PRB_F reg */ |
3233 | #define IECLR_PRB_E (1UL << 14) /* clear err bit in PRB_E reg */ | 3123 | #define IECLR_PRB_E (1UL << 14) /* clear err bit in PRB_E reg */ |
3234 | #define IECLR_PRB_D (1UL << 13) /* clear err bit in PRB_D reg */ | 3124 | #define IECLR_PRB_D (1UL << 13) /* clear err bit in PRB_D reg */ |
3235 | #define IECLR_PRB_C (1UL << 12) /* clear err bit in PRB_C reg */ | 3125 | #define IECLR_PRB_C (1UL << 12) /* clear err bit in PRB_C reg */ |
3236 | #define IECLR_PRB_B (1UL << 11) /* clear err bit in PRB_B reg */ | 3126 | #define IECLR_PRB_B (1UL << 11) /* clear err bit in PRB_B reg */ |
3237 | #define IECLR_PRB_A (1UL << 10) /* clear err bit in PRB_A reg */ | 3127 | #define IECLR_PRB_A (1UL << 10) /* clear err bit in PRB_A reg */ |
3238 | #define IECLR_PRB_9 (1UL << 9) /* clear err bit in PRB_9 reg */ | 3128 | #define IECLR_PRB_9 (1UL << 9) /* clear err bit in PRB_9 reg */ |
3239 | #define IECLR_PRB_8 (1UL << 8) /* clear err bit in PRB_8 reg */ | 3129 | #define IECLR_PRB_8 (1UL << 8) /* clear err bit in PRB_8 reg */ |
3240 | #define IECLR_PRB_0 (1UL << 0) /* clear err bit in PRB_0 reg */ | 3130 | #define IECLR_PRB_0 (1UL << 0) /* clear err bit in PRB_0 reg */ |
3241 | 3131 | ||
3242 | /* | 3132 | /* |
3243 | * IIO CRB control register Fields: IIO_ICCR | 3133 | * IIO CRB control register Fields: IIO_ICCR |
3244 | */ | 3134 | */ |
3245 | #define IIO_ICCR_PENDING (0x10000) | 3135 | #define IIO_ICCR_PENDING 0x10000 |
3246 | #define IIO_ICCR_CMD_MASK (0xFF) | 3136 | #define IIO_ICCR_CMD_MASK 0xFF |
3247 | #define IIO_ICCR_CMD_SHFT (7) | 3137 | #define IIO_ICCR_CMD_SHFT 7 |
3248 | #define IIO_ICCR_CMD_NOP (0x0) /* No Op */ | 3138 | #define IIO_ICCR_CMD_NOP 0x0 /* No Op */ |
3249 | #define IIO_ICCR_CMD_WAKE (0x100) /* Reactivate CRB entry and process */ | 3139 | #define IIO_ICCR_CMD_WAKE 0x100 /* Reactivate CRB entry and process */ |
3250 | #define IIO_ICCR_CMD_TIMEOUT (0x200) /* Make CRB timeout & mark invalid */ | 3140 | #define IIO_ICCR_CMD_TIMEOUT 0x200 /* Make CRB timeout & mark invalid */ |
3251 | #define IIO_ICCR_CMD_EJECT (0x400) /* Contents of entry written to memory | 3141 | #define IIO_ICCR_CMD_EJECT 0x400 /* Contents of entry written to memory |
3252 | * via a WB | 3142 | * via a WB |
3253 | */ | 3143 | */ |
3254 | #define IIO_ICCR_CMD_FLUSH (0x800) | 3144 | #define IIO_ICCR_CMD_FLUSH 0x800 |
3255 | 3145 | ||
3256 | /* | 3146 | /* |
3257 | * | 3147 | * |
@@ -3283,8 +3173,8 @@ typedef union ii_ippr_u { | |||
3283 | * Easy access macros for CRBs, all 5 registers (A-E) | 3173 | * Easy access macros for CRBs, all 5 registers (A-E) |
3284 | */ | 3174 | */ |
3285 | typedef ii_icrb0_a_u_t icrba_t; | 3175 | typedef ii_icrb0_a_u_t icrba_t; |
3286 | #define a_sidn ii_icrb0_a_fld_s.ia_sidn | 3176 | #define a_sidn ii_icrb0_a_fld_s.ia_sidn |
3287 | #define a_tnum ii_icrb0_a_fld_s.ia_tnum | 3177 | #define a_tnum ii_icrb0_a_fld_s.ia_tnum |
3288 | #define a_addr ii_icrb0_a_fld_s.ia_addr | 3178 | #define a_addr ii_icrb0_a_fld_s.ia_addr |
3289 | #define a_valid ii_icrb0_a_fld_s.ia_vld | 3179 | #define a_valid ii_icrb0_a_fld_s.ia_vld |
3290 | #define a_iow ii_icrb0_a_fld_s.ia_iow | 3180 | #define a_iow ii_icrb0_a_fld_s.ia_iow |
@@ -3324,14 +3214,13 @@ typedef ii_icrb0_c_u_t icrbc_t; | |||
3324 | #define c_source ii_icrb0_c_fld_s.ic_source | 3214 | #define c_source ii_icrb0_c_fld_s.ic_source |
3325 | #define c_regvalue ii_icrb0_c_regval | 3215 | #define c_regvalue ii_icrb0_c_regval |
3326 | 3216 | ||
3327 | |||
3328 | typedef ii_icrb0_d_u_t icrbd_t; | 3217 | typedef ii_icrb0_d_u_t icrbd_t; |
3329 | #define d_sleep ii_icrb0_d_fld_s.id_sleep | 3218 | #define d_sleep ii_icrb0_d_fld_s.id_sleep |
3330 | #define d_pricnt ii_icrb0_d_fld_s.id_pr_cnt | 3219 | #define d_pricnt ii_icrb0_d_fld_s.id_pr_cnt |
3331 | #define d_pripsc ii_icrb0_d_fld_s.id_pr_psc | 3220 | #define d_pripsc ii_icrb0_d_fld_s.id_pr_psc |
3332 | #define d_bteop ii_icrb0_d_fld_s.id_bte_op | 3221 | #define d_bteop ii_icrb0_d_fld_s.id_bte_op |
3333 | #define d_bteaddr ii_icrb0_d_fld_s.id_pa_be /* ic_pa_be fld has 2 names*/ | 3222 | #define d_bteaddr ii_icrb0_d_fld_s.id_pa_be /* ic_pa_be fld has 2 names */ |
3334 | #define d_benable ii_icrb0_d_fld_s.id_pa_be /* ic_pa_be fld has 2 names*/ | 3223 | #define d_benable ii_icrb0_d_fld_s.id_pa_be /* ic_pa_be fld has 2 names */ |
3335 | #define d_regvalue ii_icrb0_d_regval | 3224 | #define d_regvalue ii_icrb0_d_regval |
3336 | 3225 | ||
3337 | typedef ii_icrb0_e_u_t icrbe_t; | 3226 | typedef ii_icrb0_e_u_t icrbe_t; |
@@ -3341,7 +3230,6 @@ typedef ii_icrb0_e_u_t icrbe_t; | |||
3341 | #define icrbe_timeout ii_icrb0_e_fld_s.ie_timeout | 3230 | #define icrbe_timeout ii_icrb0_e_fld_s.ie_timeout |
3342 | #define e_regvalue ii_icrb0_e_regval | 3231 | #define e_regvalue ii_icrb0_e_regval |
3343 | 3232 | ||
3344 | |||
3345 | /* Number of widgets supported by shub */ | 3233 | /* Number of widgets supported by shub */ |
3346 | #define HUB_NUM_WIDGET 9 | 3234 | #define HUB_NUM_WIDGET 9 |
3347 | #define HUB_WIDGET_ID_MIN 0x8 | 3235 | #define HUB_WIDGET_ID_MIN 0x8 |
@@ -3367,27 +3255,27 @@ typedef ii_icrb0_e_u_t icrbe_t; | |||
3367 | 3255 | ||
3368 | #define LNK_STAT_WORKING 0x2 /* LLP is working */ | 3256 | #define LNK_STAT_WORKING 0x2 /* LLP is working */ |
3369 | 3257 | ||
3370 | #define IIO_WSTAT_ECRAZY (1ULL << 32) /* Hub gone crazy */ | 3258 | #define IIO_WSTAT_ECRAZY (1ULL << 32) /* Hub gone crazy */ |
3371 | #define IIO_WSTAT_TXRETRY (1ULL << 9) /* Hub Tx Retry timeout */ | 3259 | #define IIO_WSTAT_TXRETRY (1ULL << 9) /* Hub Tx Retry timeout */ |
3372 | #define IIO_WSTAT_TXRETRY_MASK (0x7F) /* should be 0xFF?? */ | 3260 | #define IIO_WSTAT_TXRETRY_MASK 0x7F /* should be 0xFF?? */ |
3373 | #define IIO_WSTAT_TXRETRY_SHFT (16) | 3261 | #define IIO_WSTAT_TXRETRY_SHFT 16 |
3374 | #define IIO_WSTAT_TXRETRY_CNT(w) (((w) >> IIO_WSTAT_TXRETRY_SHFT) & \ | 3262 | #define IIO_WSTAT_TXRETRY_CNT(w) (((w) >> IIO_WSTAT_TXRETRY_SHFT) & \ |
3375 | IIO_WSTAT_TXRETRY_MASK) | 3263 | IIO_WSTAT_TXRETRY_MASK) |
3376 | 3264 | ||
3377 | /* Number of II perf. counters we can multiplex at once */ | 3265 | /* Number of II perf. counters we can multiplex at once */ |
3378 | 3266 | ||
3379 | #define IO_PERF_SETS 32 | 3267 | #define IO_PERF_SETS 32 |
3380 | 3268 | ||
3381 | /* Bit for the widget in inbound access register */ | 3269 | /* Bit for the widget in inbound access register */ |
3382 | #define IIO_IIWA_WIDGET(_w) ((uint64_t)(1ULL << _w)) | 3270 | #define IIO_IIWA_WIDGET(_w) ((uint64_t)(1ULL << _w)) |
3383 | /* Bit for the widget in outbound access register */ | 3271 | /* Bit for the widget in outbound access register */ |
3384 | #define IIO_IOWA_WIDGET(_w) ((uint64_t)(1ULL << _w)) | 3272 | #define IIO_IOWA_WIDGET(_w) ((uint64_t)(1ULL << _w)) |
3385 | 3273 | ||
3386 | /* NOTE: The following define assumes that we are going to get | 3274 | /* NOTE: The following define assumes that we are going to get |
3387 | * widget numbers from 8 thru F and the device numbers within | 3275 | * widget numbers from 8 thru F and the device numbers within |
3388 | * widget from 0 thru 7. | 3276 | * widget from 0 thru 7. |
3389 | */ | 3277 | */ |
3390 | #define IIO_IIDEM_WIDGETDEV_MASK(w, d) ((uint64_t)(1ULL << (8 * ((w) - 8) + (d)))) | 3278 | #define IIO_IIDEM_WIDGETDEV_MASK(w, d) ((uint64_t)(1ULL << (8 * ((w) - 8) + (d)))) |
3391 | 3279 | ||
3392 | /* IO Interrupt Destination Register */ | 3280 | /* IO Interrupt Destination Register */ |
3393 | #define IIO_IIDSR_SENT_SHIFT 28 | 3281 | #define IIO_IIDSR_SENT_SHIFT 28 |
@@ -3402,11 +3290,11 @@ typedef ii_icrb0_e_u_t icrbe_t; | |||
3402 | #define IIO_IIDSR_LVL_MASK 0x000000ff | 3290 | #define IIO_IIDSR_LVL_MASK 0x000000ff |
3403 | 3291 | ||
3404 | /* Xtalk timeout threshhold register (IIO_IXTT) */ | 3292 | /* Xtalk timeout threshhold register (IIO_IXTT) */ |
3405 | #define IXTT_RRSP_TO_SHFT 55 /* read response timeout */ | 3293 | #define IXTT_RRSP_TO_SHFT 55 /* read response timeout */ |
3406 | #define IXTT_RRSP_TO_MASK (0x1FULL << IXTT_RRSP_TO_SHFT) | 3294 | #define IXTT_RRSP_TO_MASK (0x1FULL << IXTT_RRSP_TO_SHFT) |
3407 | #define IXTT_RRSP_PS_SHFT 32 /* read responsed TO prescalar */ | 3295 | #define IXTT_RRSP_PS_SHFT 32 /* read responsed TO prescalar */ |
3408 | #define IXTT_RRSP_PS_MASK (0x7FFFFFULL << IXTT_RRSP_PS_SHFT) | 3296 | #define IXTT_RRSP_PS_MASK (0x7FFFFFULL << IXTT_RRSP_PS_SHFT) |
3409 | #define IXTT_TAIL_TO_SHFT 0 /* tail timeout counter threshold */ | 3297 | #define IXTT_TAIL_TO_SHFT 0 /* tail timeout counter threshold */ |
3410 | #define IXTT_TAIL_TO_MASK (0x3FFFFFFULL << IXTT_TAIL_TO_SHFT) | 3298 | #define IXTT_TAIL_TO_MASK (0x3FFFFFFULL << IXTT_TAIL_TO_SHFT) |
3411 | 3299 | ||
3412 | /* | 3300 | /* |
@@ -3414,17 +3302,17 @@ typedef ii_icrb0_e_u_t icrbe_t; | |||
3414 | */ | 3302 | */ |
3415 | 3303 | ||
3416 | typedef union hubii_wcr_u { | 3304 | typedef union hubii_wcr_u { |
3417 | uint64_t wcr_reg_value; | 3305 | uint64_t wcr_reg_value; |
3418 | struct { | 3306 | struct { |
3419 | uint64_t wcr_widget_id: 4, /* LLP crossbar credit */ | 3307 | uint64_t wcr_widget_id:4, /* LLP crossbar credit */ |
3420 | wcr_tag_mode: 1, /* Tag mode */ | 3308 | wcr_tag_mode:1, /* Tag mode */ |
3421 | wcr_rsvd1: 8, /* Reserved */ | 3309 | wcr_rsvd1:8, /* Reserved */ |
3422 | wcr_xbar_crd: 3, /* LLP crossbar credit */ | 3310 | wcr_xbar_crd:3, /* LLP crossbar credit */ |
3423 | wcr_f_bad_pkt: 1, /* Force bad llp pkt enable */ | 3311 | wcr_f_bad_pkt:1, /* Force bad llp pkt enable */ |
3424 | wcr_dir_con: 1, /* widget direct connect */ | 3312 | wcr_dir_con:1, /* widget direct connect */ |
3425 | wcr_e_thresh: 5, /* elasticity threshold */ | 3313 | wcr_e_thresh:5, /* elasticity threshold */ |
3426 | wcr_rsvd: 41; /* unused */ | 3314 | wcr_rsvd:41; /* unused */ |
3427 | } wcr_fields_s; | 3315 | } wcr_fields_s; |
3428 | } hubii_wcr_t; | 3316 | } hubii_wcr_t; |
3429 | 3317 | ||
3430 | #define iwcr_dir_con wcr_fields_s.wcr_dir_con | 3318 | #define iwcr_dir_con wcr_fields_s.wcr_dir_con |
@@ -3436,41 +3324,35 @@ performance registers */ | |||
3436 | performed */ | 3324 | performed */ |
3437 | 3325 | ||
3438 | typedef union io_perf_sel { | 3326 | typedef union io_perf_sel { |
3439 | uint64_t perf_sel_reg; | 3327 | uint64_t perf_sel_reg; |
3440 | struct { | 3328 | struct { |
3441 | uint64_t perf_ippr0 : 4, | 3329 | uint64_t perf_ippr0:4, perf_ippr1:4, perf_icct:8, perf_rsvd:48; |
3442 | perf_ippr1 : 4, | 3330 | } perf_sel_bits; |
3443 | perf_icct : 8, | ||
3444 | perf_rsvd : 48; | ||
3445 | } perf_sel_bits; | ||
3446 | } io_perf_sel_t; | 3331 | } io_perf_sel_t; |
3447 | 3332 | ||
3448 | /* io_perf_cnt is to extract the count from the shub registers. Due to | 3333 | /* io_perf_cnt is to extract the count from the shub registers. Due to |
3449 | hardware problems there is only one counter, not two. */ | 3334 | hardware problems there is only one counter, not two. */ |
3450 | 3335 | ||
3451 | typedef union io_perf_cnt { | 3336 | typedef union io_perf_cnt { |
3452 | uint64_t perf_cnt; | 3337 | uint64_t perf_cnt; |
3453 | struct { | 3338 | struct { |
3454 | uint64_t perf_cnt : 20, | 3339 | uint64_t perf_cnt:20, perf_rsvd2:12, perf_rsvd1:32; |
3455 | perf_rsvd2 : 12, | 3340 | } perf_cnt_bits; |
3456 | perf_rsvd1 : 32; | ||
3457 | } perf_cnt_bits; | ||
3458 | 3341 | ||
3459 | } io_perf_cnt_t; | 3342 | } io_perf_cnt_t; |
3460 | 3343 | ||
3461 | typedef union iprte_a { | 3344 | typedef union iprte_a { |
3462 | uint64_t entry; | 3345 | uint64_t entry; |
3463 | struct { | 3346 | struct { |
3464 | uint64_t i_rsvd_1 : 3; | 3347 | uint64_t i_rsvd_1:3; |
3465 | uint64_t i_addr : 38; | 3348 | uint64_t i_addr:38; |
3466 | uint64_t i_init : 3; | 3349 | uint64_t i_init:3; |
3467 | uint64_t i_source : 8; | 3350 | uint64_t i_source:8; |
3468 | uint64_t i_rsvd : 2; | 3351 | uint64_t i_rsvd:2; |
3469 | uint64_t i_widget : 4; | 3352 | uint64_t i_widget:4; |
3470 | uint64_t i_to_cnt : 5; | 3353 | uint64_t i_to_cnt:5; |
3471 | uint64_t i_vld : 1; | 3354 | uint64_t i_vld:1; |
3472 | } iprte_fields; | 3355 | } iprte_fields; |
3473 | } iprte_a_t; | 3356 | } iprte_a_t; |
3474 | 3357 | ||
3475 | #endif /* _ASM_IA64_SN_SHUBIO_H */ | 3358 | #endif /* _ASM_IA64_SN_SHUBIO_H */ |
3476 | |||
diff --git a/include/asm-ia64/sn/sn_cpuid.h b/include/asm-ia64/sn/sn_cpuid.h index 685435af170d..20b300187669 100644 --- a/include/asm-ia64/sn/sn_cpuid.h +++ b/include/asm-ia64/sn/sn_cpuid.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * License. See the file "COPYING" in the main directory of this archive | 4 | * License. See the file "COPYING" in the main directory of this archive |
5 | * for more details. | 5 | * for more details. |
6 | * | 6 | * |
7 | * Copyright (C) 2000-2004 Silicon Graphics, Inc. All rights reserved. | 7 | * Copyright (C) 2000-2005 Silicon Graphics, Inc. All rights reserved. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | 10 | ||
@@ -92,24 +92,24 @@ | |||
92 | * NOTE: on non-MP systems, only cpuid 0 exists | 92 | * NOTE: on non-MP systems, only cpuid 0 exists |
93 | */ | 93 | */ |
94 | 94 | ||
95 | extern short physical_node_map[]; /* indexed by nasid to get cnode */ | 95 | extern short physical_node_map[]; /* indexed by nasid to get cnode */ |
96 | 96 | ||
97 | /* | 97 | /* |
98 | * Macros for retrieving info about current cpu | 98 | * Macros for retrieving info about current cpu |
99 | */ | 99 | */ |
100 | #define get_nasid() (nodepda->phys_cpuid[smp_processor_id()].nasid) | 100 | #define get_nasid() (sn_nodepda->phys_cpuid[smp_processor_id()].nasid) |
101 | #define get_subnode() (nodepda->phys_cpuid[smp_processor_id()].subnode) | 101 | #define get_subnode() (sn_nodepda->phys_cpuid[smp_processor_id()].subnode) |
102 | #define get_slice() (nodepda->phys_cpuid[smp_processor_id()].slice) | 102 | #define get_slice() (sn_nodepda->phys_cpuid[smp_processor_id()].slice) |
103 | #define get_cnode() (nodepda->phys_cpuid[smp_processor_id()].cnode) | 103 | #define get_cnode() (sn_nodepda->phys_cpuid[smp_processor_id()].cnode) |
104 | #define get_sapicid() ((ia64_getreg(_IA64_REG_CR_LID) >> 16) & 0xffff) | 104 | #define get_sapicid() ((ia64_getreg(_IA64_REG_CR_LID) >> 16) & 0xffff) |
105 | 105 | ||
106 | /* | 106 | /* |
107 | * Macros for retrieving info about an arbitrary cpu | 107 | * Macros for retrieving info about an arbitrary cpu |
108 | * cpuid - logical cpu id | 108 | * cpuid - logical cpu id |
109 | */ | 109 | */ |
110 | #define cpuid_to_nasid(cpuid) (nodepda->phys_cpuid[cpuid].nasid) | 110 | #define cpuid_to_nasid(cpuid) (sn_nodepda->phys_cpuid[cpuid].nasid) |
111 | #define cpuid_to_subnode(cpuid) (nodepda->phys_cpuid[cpuid].subnode) | 111 | #define cpuid_to_subnode(cpuid) (sn_nodepda->phys_cpuid[cpuid].subnode) |
112 | #define cpuid_to_slice(cpuid) (nodepda->phys_cpuid[cpuid].slice) | 112 | #define cpuid_to_slice(cpuid) (sn_nodepda->phys_cpuid[cpuid].slice) |
113 | #define cpuid_to_cnodeid(cpuid) (physical_node_map[cpuid_to_nasid(cpuid)]) | 113 | #define cpuid_to_cnodeid(cpuid) (physical_node_map[cpuid_to_nasid(cpuid)]) |
114 | 114 | ||
115 | 115 | ||
@@ -123,11 +123,8 @@ extern int nasid_slice_to_cpuid(int, int); | |||
123 | 123 | ||
124 | /* | 124 | /* |
125 | * cnodeid_to_nasid - convert a cnodeid to a NASID | 125 | * cnodeid_to_nasid - convert a cnodeid to a NASID |
126 | * Macro relies on pg_data for a node being on the node itself. | ||
127 | * Just extract the NASID from the pointer. | ||
128 | * | ||
129 | */ | 126 | */ |
130 | #define cnodeid_to_nasid(cnodeid) pda->cnodeid_to_nasid_table[cnodeid] | 127 | #define cnodeid_to_nasid(cnodeid) (sn_cnodeid_to_nasid[cnodeid]) |
131 | 128 | ||
132 | /* | 129 | /* |
133 | * nasid_to_cnodeid - convert a NASID to a cnodeid | 130 | * nasid_to_cnodeid - convert a NASID to a cnodeid |
diff --git a/include/asm-ia64/sn/sn_fru.h b/include/asm-ia64/sn/sn_fru.h deleted file mode 100644 index 8c21ac3f0156..000000000000 --- a/include/asm-ia64/sn/sn_fru.h +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
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) 1992-1997,1999-2004 Silicon Graphics, Inc. All rights reserved. | ||
7 | */ | ||
8 | #ifndef _ASM_IA64_SN_SN_FRU_H | ||
9 | #define _ASM_IA64_SN_SN_FRU_H | ||
10 | |||
11 | #define MAX_DIMMS 8 /* max # of dimm banks */ | ||
12 | #define MAX_PCIDEV 8 /* max # of pci devices on a pci bus */ | ||
13 | |||
14 | typedef unsigned char confidence_t; | ||
15 | |||
16 | typedef struct kf_mem_s { | ||
17 | confidence_t km_confidence; /* confidence level that the memory is bad | ||
18 | * is this necessary ? | ||
19 | */ | ||
20 | confidence_t km_dimm[MAX_DIMMS]; | ||
21 | /* confidence level that dimm[i] is bad | ||
22 | *I think this is the right number | ||
23 | */ | ||
24 | |||
25 | } kf_mem_t; | ||
26 | |||
27 | typedef struct kf_cpu_s { | ||
28 | confidence_t kc_confidence; /* confidence level that cpu is bad */ | ||
29 | confidence_t kc_icache; /* confidence level that instr. cache is bad */ | ||
30 | confidence_t kc_dcache; /* confidence level that data cache is bad */ | ||
31 | confidence_t kc_scache; /* confidence level that sec. cache is bad */ | ||
32 | confidence_t kc_sysbus; /* confidence level that sysad/cmd/state bus is bad */ | ||
33 | } kf_cpu_t; | ||
34 | |||
35 | |||
36 | typedef struct kf_pci_bus_s { | ||
37 | confidence_t kpb_belief; /* confidence level that the pci bus is bad */ | ||
38 | confidence_t kpb_pcidev_belief[MAX_PCIDEV]; | ||
39 | /* confidence level that the pci dev is bad */ | ||
40 | } kf_pci_bus_t; | ||
41 | |||
42 | |||
43 | #endif /* _ASM_IA64_SN_SN_FRU_H */ | ||
44 | |||
diff --git a/include/asm-ia64/sn/sn_sal.h b/include/asm-ia64/sn/sn_sal.h index f914f6da077c..eb0395ad0d6a 100644 --- a/include/asm-ia64/sn/sn_sal.h +++ b/include/asm-ia64/sn/sn_sal.h | |||
@@ -115,6 +115,13 @@ | |||
115 | #define SAL_IROUTER_INTR_XMIT SAL_CONSOLE_INTR_XMIT | 115 | #define SAL_IROUTER_INTR_XMIT SAL_CONSOLE_INTR_XMIT |
116 | #define SAL_IROUTER_INTR_RECV SAL_CONSOLE_INTR_RECV | 116 | #define SAL_IROUTER_INTR_RECV SAL_CONSOLE_INTR_RECV |
117 | 117 | ||
118 | /* | ||
119 | * Error Handling Features | ||
120 | */ | ||
121 | #define SAL_ERR_FEAT_MCA_SLV_TO_OS_INIT_SLV 0x1 | ||
122 | #define SAL_ERR_FEAT_LOG_SBES 0x2 | ||
123 | #define SAL_ERR_FEAT_MFR_OVERRIDE 0x4 | ||
124 | #define SAL_ERR_FEAT_SBE_THRESHOLD 0xffff0000 | ||
118 | 125 | ||
119 | /* | 126 | /* |
120 | * SAL Error Codes | 127 | * SAL Error Codes |
@@ -342,6 +349,25 @@ ia64_sn_plat_cpei_handler(void) | |||
342 | } | 349 | } |
343 | 350 | ||
344 | /* | 351 | /* |
352 | * Set Error Handling Features | ||
353 | */ | ||
354 | static inline u64 | ||
355 | ia64_sn_plat_set_error_handling_features(void) | ||
356 | { | ||
357 | struct ia64_sal_retval ret_stuff; | ||
358 | |||
359 | ret_stuff.status = 0; | ||
360 | ret_stuff.v0 = 0; | ||
361 | ret_stuff.v1 = 0; | ||
362 | ret_stuff.v2 = 0; | ||
363 | SAL_CALL_REENTRANT(ret_stuff, SN_SAL_SET_ERROR_HANDLING_FEATURES, | ||
364 | (SAL_ERR_FEAT_MCA_SLV_TO_OS_INIT_SLV | SAL_ERR_FEAT_LOG_SBES), | ||
365 | 0, 0, 0, 0, 0, 0); | ||
366 | |||
367 | return ret_stuff.status; | ||
368 | } | ||
369 | |||
370 | /* | ||
345 | * Checks for console input. | 371 | * Checks for console input. |
346 | */ | 372 | */ |
347 | static inline u64 | 373 | static inline u64 |
@@ -472,7 +498,7 @@ static inline u64 | |||
472 | ia64_sn_pod_mode(void) | 498 | ia64_sn_pod_mode(void) |
473 | { | 499 | { |
474 | struct ia64_sal_retval isrv; | 500 | struct ia64_sal_retval isrv; |
475 | SAL_CALL(isrv, SN_SAL_POD_MODE, 0, 0, 0, 0, 0, 0, 0); | 501 | SAL_CALL_REENTRANT(isrv, SN_SAL_POD_MODE, 0, 0, 0, 0, 0, 0, 0); |
476 | if (isrv.status) | 502 | if (isrv.status) |
477 | return 0; | 503 | return 0; |
478 | return isrv.v0; | 504 | return isrv.v0; |
@@ -557,7 +583,8 @@ static inline u64 | |||
557 | ia64_sn_partition_serial_get(void) | 583 | ia64_sn_partition_serial_get(void) |
558 | { | 584 | { |
559 | struct ia64_sal_retval ret_stuff; | 585 | struct ia64_sal_retval ret_stuff; |
560 | SAL_CALL(ret_stuff, SN_SAL_PARTITION_SERIAL_GET, 0, 0, 0, 0, 0, 0, 0); | 586 | ia64_sal_oemcall_reentrant(&ret_stuff, SN_SAL_PARTITION_SERIAL_GET, 0, |
587 | 0, 0, 0, 0, 0, 0); | ||
561 | if (ret_stuff.status != 0) | 588 | if (ret_stuff.status != 0) |
562 | return 0; | 589 | return 0; |
563 | return ret_stuff.v0; | 590 | return ret_stuff.v0; |
@@ -565,11 +592,10 @@ ia64_sn_partition_serial_get(void) | |||
565 | 592 | ||
566 | static inline u64 | 593 | static inline u64 |
567 | sn_partition_serial_number_val(void) { | 594 | sn_partition_serial_number_val(void) { |
568 | if (sn_partition_serial_number) { | 595 | if (unlikely(sn_partition_serial_number == 0)) { |
569 | return(sn_partition_serial_number); | 596 | sn_partition_serial_number = ia64_sn_partition_serial_get(); |
570 | } else { | ||
571 | return(sn_partition_serial_number = ia64_sn_partition_serial_get()); | ||
572 | } | 597 | } |
598 | return sn_partition_serial_number; | ||
573 | } | 599 | } |
574 | 600 | ||
575 | /* | 601 | /* |
@@ -580,8 +606,8 @@ static inline partid_t | |||
580 | ia64_sn_sysctl_partition_get(nasid_t nasid) | 606 | ia64_sn_sysctl_partition_get(nasid_t nasid) |
581 | { | 607 | { |
582 | struct ia64_sal_retval ret_stuff; | 608 | struct ia64_sal_retval ret_stuff; |
583 | SAL_CALL(ret_stuff, SN_SAL_SYSCTL_PARTITION_GET, nasid, | 609 | ia64_sal_oemcall_nolock(&ret_stuff, SN_SAL_SYSCTL_PARTITION_GET, nasid, |
584 | 0, 0, 0, 0, 0, 0); | 610 | 0, 0, 0, 0, 0, 0); |
585 | if (ret_stuff.status != 0) | 611 | if (ret_stuff.status != 0) |
586 | return INVALID_PARTID; | 612 | return INVALID_PARTID; |
587 | return ((partid_t)ret_stuff.v0); | 613 | return ((partid_t)ret_stuff.v0); |
@@ -595,11 +621,38 @@ extern partid_t sn_partid; | |||
595 | 621 | ||
596 | static inline partid_t | 622 | static inline partid_t |
597 | sn_local_partid(void) { | 623 | sn_local_partid(void) { |
598 | if (sn_partid < 0) { | 624 | if (unlikely(sn_partid < 0)) { |
599 | return (sn_partid = ia64_sn_sysctl_partition_get(cpuid_to_nasid(smp_processor_id()))); | 625 | sn_partid = ia64_sn_sysctl_partition_get(cpuid_to_nasid(smp_processor_id())); |
600 | } else { | ||
601 | return sn_partid; | ||
602 | } | 626 | } |
627 | return sn_partid; | ||
628 | } | ||
629 | |||
630 | /* | ||
631 | * Returns the physical address of the partition's reserved page through | ||
632 | * an iterative number of calls. | ||
633 | * | ||
634 | * On first call, 'cookie' and 'len' should be set to 0, and 'addr' | ||
635 | * set to the nasid of the partition whose reserved page's address is | ||
636 | * being sought. | ||
637 | * On subsequent calls, pass the values, that were passed back on the | ||
638 | * previous call. | ||
639 | * | ||
640 | * While the return status equals SALRET_MORE_PASSES, keep calling | ||
641 | * this function after first copying 'len' bytes starting at 'addr' | ||
642 | * into 'buf'. Once the return status equals SALRET_OK, 'addr' will | ||
643 | * be the physical address of the partition's reserved page. If the | ||
644 | * return status equals neither of these, an error as occurred. | ||
645 | */ | ||
646 | static inline s64 | ||
647 | sn_partition_reserved_page_pa(u64 buf, u64 *cookie, u64 *addr, u64 *len) | ||
648 | { | ||
649 | struct ia64_sal_retval rv; | ||
650 | ia64_sal_oemcall_reentrant(&rv, SN_SAL_GET_PARTITION_ADDR, *cookie, | ||
651 | *addr, buf, *len, 0, 0, 0); | ||
652 | *cookie = rv.v0; | ||
653 | *addr = rv.v1; | ||
654 | *len = rv.v2; | ||
655 | return rv.status; | ||
603 | } | 656 | } |
604 | 657 | ||
605 | /* | 658 | /* |
@@ -621,8 +674,8 @@ static inline int | |||
621 | sn_register_xp_addr_region(u64 paddr, u64 len, int operation) | 674 | sn_register_xp_addr_region(u64 paddr, u64 len, int operation) |
622 | { | 675 | { |
623 | struct ia64_sal_retval ret_stuff; | 676 | struct ia64_sal_retval ret_stuff; |
624 | SAL_CALL(ret_stuff, SN_SAL_XP_ADDR_REGION, paddr, len, (u64)operation, | 677 | ia64_sal_oemcall(&ret_stuff, SN_SAL_XP_ADDR_REGION, paddr, len, |
625 | 0, 0, 0, 0); | 678 | (u64)operation, 0, 0, 0, 0); |
626 | return ret_stuff.status; | 679 | return ret_stuff.status; |
627 | } | 680 | } |
628 | 681 | ||
@@ -646,8 +699,8 @@ sn_register_nofault_code(u64 start_addr, u64 end_addr, u64 return_addr, | |||
646 | } else { | 699 | } else { |
647 | call = SN_SAL_NO_FAULT_ZONE_PHYSICAL; | 700 | call = SN_SAL_NO_FAULT_ZONE_PHYSICAL; |
648 | } | 701 | } |
649 | SAL_CALL(ret_stuff, call, start_addr, end_addr, return_addr, (u64)1, | 702 | ia64_sal_oemcall(&ret_stuff, call, start_addr, end_addr, return_addr, |
650 | 0, 0, 0); | 703 | (u64)1, 0, 0, 0); |
651 | return ret_stuff.status; | 704 | return ret_stuff.status; |
652 | } | 705 | } |
653 | 706 | ||
@@ -668,8 +721,8 @@ static inline int | |||
668 | sn_change_coherence(u64 *new_domain, u64 *old_domain) | 721 | sn_change_coherence(u64 *new_domain, u64 *old_domain) |
669 | { | 722 | { |
670 | struct ia64_sal_retval ret_stuff; | 723 | struct ia64_sal_retval ret_stuff; |
671 | SAL_CALL(ret_stuff, SN_SAL_COHERENCE, new_domain, old_domain, 0, 0, | 724 | ia64_sal_oemcall(&ret_stuff, SN_SAL_COHERENCE, (u64)new_domain, |
672 | 0, 0, 0); | 725 | (u64)old_domain, 0, 0, 0, 0, 0); |
673 | return ret_stuff.status; | 726 | return ret_stuff.status; |
674 | } | 727 | } |
675 | 728 | ||
@@ -688,8 +741,8 @@ sn_change_memprotect(u64 paddr, u64 len, u64 perms, u64 *nasid_array) | |||
688 | cnodeid = nasid_to_cnodeid(get_node_number(paddr)); | 741 | cnodeid = nasid_to_cnodeid(get_node_number(paddr)); |
689 | // spin_lock(&NODEPDA(cnodeid)->bist_lock); | 742 | // spin_lock(&NODEPDA(cnodeid)->bist_lock); |
690 | local_irq_save(irq_flags); | 743 | local_irq_save(irq_flags); |
691 | SAL_CALL_NOLOCK(ret_stuff, SN_SAL_MEMPROTECT, paddr, len, nasid_array, | 744 | ia64_sal_oemcall_nolock(&ret_stuff, SN_SAL_MEMPROTECT, paddr, len, |
692 | perms, 0, 0, 0); | 745 | (u64)nasid_array, perms, 0, 0, 0); |
693 | local_irq_restore(irq_flags); | 746 | local_irq_restore(irq_flags); |
694 | // spin_unlock(&NODEPDA(cnodeid)->bist_lock); | 747 | // spin_unlock(&NODEPDA(cnodeid)->bist_lock); |
695 | return ret_stuff.status; | 748 | return ret_stuff.status; |
diff --git a/include/asm-ia64/sn/sndrv.h b/include/asm-ia64/sn/sndrv.h deleted file mode 100644 index aa00d42cde32..000000000000 --- a/include/asm-ia64/sn/sndrv.h +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
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) 2002-2004 Silicon Graphics, Inc. All Rights Reserved. | ||
7 | */ | ||
8 | |||
9 | #ifndef _ASM_IA64_SN_SNDRV_H | ||
10 | #define _ASM_IA64_SN_SNDRV_H | ||
11 | |||
12 | /* ioctl commands */ | ||
13 | #define SNDRV_GET_ROUTERINFO 1 | ||
14 | #define SNDRV_GET_INFOSIZE 2 | ||
15 | #define SNDRV_GET_HUBINFO 3 | ||
16 | #define SNDRV_GET_FLASHLOGSIZE 4 | ||
17 | #define SNDRV_SET_FLASHSYNC 5 | ||
18 | #define SNDRV_GET_FLASHLOGDATA 6 | ||
19 | #define SNDRV_GET_FLASHLOGALL 7 | ||
20 | |||
21 | #define SNDRV_SET_HISTOGRAM_TYPE 14 | ||
22 | |||
23 | #define SNDRV_ELSC_COMMAND 19 | ||
24 | #define SNDRV_CLEAR_LOG 20 | ||
25 | #define SNDRV_INIT_LOG 21 | ||
26 | #define SNDRV_GET_PIMM_PSC 22 | ||
27 | #define SNDRV_SET_PARTITION 23 | ||
28 | #define SNDRV_GET_PARTITION 24 | ||
29 | |||
30 | /* see synergy_perf_ioctl() */ | ||
31 | #define SNDRV_GET_SYNERGY_VERSION 30 | ||
32 | #define SNDRV_GET_SYNERGY_STATUS 31 | ||
33 | #define SNDRV_GET_SYNERGYINFO 32 | ||
34 | #define SNDRV_SYNERGY_APPEND 33 | ||
35 | #define SNDRV_SYNERGY_ENABLE 34 | ||
36 | #define SNDRV_SYNERGY_FREQ 35 | ||
37 | |||
38 | /* Devices */ | ||
39 | #define SNDRV_UKNOWN_DEVICE -1 | ||
40 | #define SNDRV_ROUTER_DEVICE 1 | ||
41 | #define SNDRV_HUB_DEVICE 2 | ||
42 | #define SNDRV_ELSC_NVRAM_DEVICE 3 | ||
43 | #define SNDRV_ELSC_CONTROLLER_DEVICE 4 | ||
44 | #define SNDRV_SYSCTL_SUBCH 5 | ||
45 | #define SNDRV_SYNERGY_DEVICE 6 | ||
46 | |||
47 | #endif /* _ASM_IA64_SN_SNDRV_H */ | ||
diff --git a/include/asm-ia64/sn/xp.h b/include/asm-ia64/sn/xp.h new file mode 100644 index 000000000000..9902185c0288 --- /dev/null +++ b/include/asm-ia64/sn/xp.h | |||
@@ -0,0 +1,436 @@ | |||
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-2005 Silicon Graphics, Inc. All rights reserved. | ||
7 | */ | ||
8 | |||
9 | |||
10 | /* | ||
11 | * External Cross Partition (XP) structures and defines. | ||
12 | */ | ||
13 | |||
14 | |||
15 | #ifndef _ASM_IA64_SN_XP_H | ||
16 | #define _ASM_IA64_SN_XP_H | ||
17 | |||
18 | |||
19 | #include <linux/version.h> | ||
20 | #include <linux/cache.h> | ||
21 | #include <linux/hardirq.h> | ||
22 | #include <asm/sn/types.h> | ||
23 | #include <asm/sn/bte.h> | ||
24 | |||
25 | |||
26 | #ifdef USE_DBUG_ON | ||
27 | #define DBUG_ON(condition) BUG_ON(condition) | ||
28 | #else | ||
29 | #define DBUG_ON(condition) | ||
30 | #endif | ||
31 | |||
32 | |||
33 | /* | ||
34 | * Define the maximum number of logically defined partitions the system | ||
35 | * can support. It is constrained by the maximum number of hardware | ||
36 | * partitionable regions. The term 'region' in this context refers to the | ||
37 | * minimum number of nodes that can comprise an access protection grouping. | ||
38 | * The access protection is in regards to memory, IPI and IOI. | ||
39 | * | ||
40 | * The maximum number of hardware partitionable regions is equal to the | ||
41 | * maximum number of nodes in the entire system divided by the minimum number | ||
42 | * of nodes that comprise an access protection grouping. | ||
43 | */ | ||
44 | #define XP_MAX_PARTITIONS 64 | ||
45 | |||
46 | |||
47 | /* | ||
48 | * Define the number of u64s required to represent all the C-brick nasids | ||
49 | * as a bitmap. The cross-partition kernel modules deal only with | ||
50 | * C-brick nasids, thus the need for bitmaps which don't account for | ||
51 | * odd-numbered (non C-brick) nasids. | ||
52 | */ | ||
53 | #define XP_MAX_PHYSNODE_ID (MAX_PHYSNODE_ID / 2) | ||
54 | #define XP_NASID_MASK_BYTES ((XP_MAX_PHYSNODE_ID + 7) / 8) | ||
55 | #define XP_NASID_MASK_WORDS ((XP_MAX_PHYSNODE_ID + 63) / 64) | ||
56 | |||
57 | |||
58 | /* | ||
59 | * Wrapper for bte_copy() that should it return a failure status will retry | ||
60 | * the bte_copy() once in the hope that the failure was due to a temporary | ||
61 | * aberration (i.e., the link going down temporarily). | ||
62 | * | ||
63 | * See bte_copy for definition of the input parameters. | ||
64 | * | ||
65 | * Note: xp_bte_copy() should never be called while holding a spinlock. | ||
66 | */ | ||
67 | static inline bte_result_t | ||
68 | xp_bte_copy(u64 src, u64 dest, u64 len, u64 mode, void *notification) | ||
69 | { | ||
70 | bte_result_t ret; | ||
71 | |||
72 | |||
73 | ret = bte_copy(src, dest, len, mode, notification); | ||
74 | |||
75 | if (ret != BTE_SUCCESS) { | ||
76 | if (!in_interrupt()) { | ||
77 | cond_resched(); | ||
78 | } | ||
79 | ret = bte_copy(src, dest, len, mode, notification); | ||
80 | } | ||
81 | |||
82 | return ret; | ||
83 | } | ||
84 | |||
85 | |||
86 | /* | ||
87 | * XPC establishes channel connections between the local partition and any | ||
88 | * other partition that is currently up. Over these channels, kernel-level | ||
89 | * `users' can communicate with their counterparts on the other partitions. | ||
90 | * | ||
91 | * The maxinum number of channels is limited to eight. For performance reasons, | ||
92 | * the internal cross partition structures require sixteen bytes per channel, | ||
93 | * and eight allows all of this interface-shared info to fit in one cache line. | ||
94 | * | ||
95 | * XPC_NCHANNELS reflects the total number of channels currently defined. | ||
96 | * If the need for additional channels arises, one can simply increase | ||
97 | * XPC_NCHANNELS accordingly. If the day should come where that number | ||
98 | * exceeds the MAXIMUM number of channels allowed (eight), then one will need | ||
99 | * to make changes to the XPC code to allow for this. | ||
100 | */ | ||
101 | #define XPC_MEM_CHANNEL 0 /* memory channel number */ | ||
102 | #define XPC_NET_CHANNEL 1 /* network channel number */ | ||
103 | |||
104 | #define XPC_NCHANNELS 2 /* #of defined channels */ | ||
105 | #define XPC_MAX_NCHANNELS 8 /* max #of channels allowed */ | ||
106 | |||
107 | #if XPC_NCHANNELS > XPC_MAX_NCHANNELS | ||
108 | #error XPC_NCHANNELS exceeds MAXIMUM allowed. | ||
109 | #endif | ||
110 | |||
111 | |||
112 | /* | ||
113 | * The format of an XPC message is as follows: | ||
114 | * | ||
115 | * +-------+--------------------------------+ | ||
116 | * | flags |////////////////////////////////| | ||
117 | * +-------+--------------------------------+ | ||
118 | * | message # | | ||
119 | * +----------------------------------------+ | ||
120 | * | payload (user-defined message) | | ||
121 | * | | | ||
122 | * : | ||
123 | * | | | ||
124 | * +----------------------------------------+ | ||
125 | * | ||
126 | * The size of the payload is defined by the user via xpc_connect(). A user- | ||
127 | * defined message resides in the payload area. | ||
128 | * | ||
129 | * The user should have no dealings with the message header, but only the | ||
130 | * message's payload. When a message entry is allocated (via xpc_allocate()) | ||
131 | * a pointer to the payload area is returned and not the actual beginning of | ||
132 | * the XPC message. The user then constructs a message in the payload area | ||
133 | * and passes that pointer as an argument on xpc_send() or xpc_send_notify(). | ||
134 | * | ||
135 | * The size of a message entry (within a message queue) must be a cacheline | ||
136 | * sized multiple in order to facilitate the BTE transfer of messages from one | ||
137 | * message queue to another. A macro, XPC_MSG_SIZE(), is provided for the user | ||
138 | * that wants to fit as many msg entries as possible in a given memory size | ||
139 | * (e.g. a memory page). | ||
140 | */ | ||
141 | struct xpc_msg { | ||
142 | u8 flags; /* FOR XPC INTERNAL USE ONLY */ | ||
143 | u8 reserved[7]; /* FOR XPC INTERNAL USE ONLY */ | ||
144 | s64 number; /* FOR XPC INTERNAL USE ONLY */ | ||
145 | |||
146 | u64 payload; /* user defined portion of message */ | ||
147 | }; | ||
148 | |||
149 | |||
150 | #define XPC_MSG_PAYLOAD_OFFSET (u64) (&((struct xpc_msg *)0)->payload) | ||
151 | #define XPC_MSG_SIZE(_payload_size) \ | ||
152 | L1_CACHE_ALIGN(XPC_MSG_PAYLOAD_OFFSET + (_payload_size)) | ||
153 | |||
154 | |||
155 | /* | ||
156 | * Define the return values and values passed to user's callout functions. | ||
157 | * (It is important to add new value codes at the end just preceding | ||
158 | * xpcUnknownReason, which must have the highest numerical value.) | ||
159 | */ | ||
160 | enum xpc_retval { | ||
161 | xpcSuccess = 0, | ||
162 | |||
163 | xpcNotConnected, /* 1: channel is not connected */ | ||
164 | xpcConnected, /* 2: channel connected (opened) */ | ||
165 | xpcRETIRED1, /* 3: (formerly xpcDisconnected) */ | ||
166 | |||
167 | xpcMsgReceived, /* 4: message received */ | ||
168 | xpcMsgDelivered, /* 5: message delivered and acknowledged */ | ||
169 | |||
170 | xpcRETIRED2, /* 6: (formerly xpcTransferFailed) */ | ||
171 | |||
172 | xpcNoWait, /* 7: operation would require wait */ | ||
173 | xpcRetry, /* 8: retry operation */ | ||
174 | xpcTimeout, /* 9: timeout in xpc_allocate_msg_wait() */ | ||
175 | xpcInterrupted, /* 10: interrupted wait */ | ||
176 | |||
177 | xpcUnequalMsgSizes, /* 11: message size disparity between sides */ | ||
178 | xpcInvalidAddress, /* 12: invalid address */ | ||
179 | |||
180 | xpcNoMemory, /* 13: no memory available for XPC structures */ | ||
181 | xpcLackOfResources, /* 14: insufficient resources for operation */ | ||
182 | xpcUnregistered, /* 15: channel is not registered */ | ||
183 | xpcAlreadyRegistered, /* 16: channel is already registered */ | ||
184 | |||
185 | xpcPartitionDown, /* 17: remote partition is down */ | ||
186 | xpcNotLoaded, /* 18: XPC module is not loaded */ | ||
187 | xpcUnloading, /* 19: this side is unloading XPC module */ | ||
188 | |||
189 | xpcBadMagic, /* 20: XPC MAGIC string not found */ | ||
190 | |||
191 | xpcReactivating, /* 21: remote partition was reactivated */ | ||
192 | |||
193 | xpcUnregistering, /* 22: this side is unregistering channel */ | ||
194 | xpcOtherUnregistering, /* 23: other side is unregistering channel */ | ||
195 | |||
196 | xpcCloneKThread, /* 24: cloning kernel thread */ | ||
197 | xpcCloneKThreadFailed, /* 25: cloning kernel thread failed */ | ||
198 | |||
199 | xpcNoHeartbeat, /* 26: remote partition has no heartbeat */ | ||
200 | |||
201 | xpcPioReadError, /* 27: PIO read error */ | ||
202 | xpcPhysAddrRegFailed, /* 28: registration of phys addr range failed */ | ||
203 | |||
204 | xpcBteDirectoryError, /* 29: maps to BTEFAIL_DIR */ | ||
205 | xpcBtePoisonError, /* 30: maps to BTEFAIL_POISON */ | ||
206 | xpcBteWriteError, /* 31: maps to BTEFAIL_WERR */ | ||
207 | xpcBteAccessError, /* 32: maps to BTEFAIL_ACCESS */ | ||
208 | xpcBtePWriteError, /* 33: maps to BTEFAIL_PWERR */ | ||
209 | xpcBtePReadError, /* 34: maps to BTEFAIL_PRERR */ | ||
210 | xpcBteTimeOutError, /* 35: maps to BTEFAIL_TOUT */ | ||
211 | xpcBteXtalkError, /* 36: maps to BTEFAIL_XTERR */ | ||
212 | xpcBteNotAvailable, /* 37: maps to BTEFAIL_NOTAVAIL */ | ||
213 | xpcBteUnmappedError, /* 38: unmapped BTEFAIL_ error */ | ||
214 | |||
215 | xpcBadVersion, /* 39: bad version number */ | ||
216 | xpcVarsNotSet, /* 40: the XPC variables are not set up */ | ||
217 | xpcNoRsvdPageAddr, /* 41: unable to get rsvd page's phys addr */ | ||
218 | xpcInvalidPartid, /* 42: invalid partition ID */ | ||
219 | xpcLocalPartid, /* 43: local partition ID */ | ||
220 | |||
221 | xpcUnknownReason /* 44: unknown reason -- must be last in list */ | ||
222 | }; | ||
223 | |||
224 | |||
225 | /* | ||
226 | * Define the callout function types used by XPC to update the user on | ||
227 | * connection activity and state changes (via the user function registered by | ||
228 | * xpc_connect()) and to notify them of messages received and delivered (via | ||
229 | * the user function registered by xpc_send_notify()). | ||
230 | * | ||
231 | * The two function types are xpc_channel_func and xpc_notify_func and | ||
232 | * both share the following arguments, with the exception of "data", which | ||
233 | * only xpc_channel_func has. | ||
234 | * | ||
235 | * Arguments: | ||
236 | * | ||
237 | * reason - reason code. (See following table.) | ||
238 | * partid - partition ID associated with condition. | ||
239 | * ch_number - channel # associated with condition. | ||
240 | * data - pointer to optional data. (See following table.) | ||
241 | * key - pointer to optional user-defined value provided as the "key" | ||
242 | * argument to xpc_connect() or xpc_send_notify(). | ||
243 | * | ||
244 | * In the following table the "Optional Data" column applies to callouts made | ||
245 | * to functions registered by xpc_connect(). A "NA" in that column indicates | ||
246 | * that this reason code can be passed to functions registered by | ||
247 | * xpc_send_notify() (i.e. they don't have data arguments). | ||
248 | * | ||
249 | * Also, the first three reason codes in the following table indicate | ||
250 | * success, whereas the others indicate failure. When a failure reason code | ||
251 | * is received, one can assume that the channel is not connected. | ||
252 | * | ||
253 | * | ||
254 | * Reason Code | Cause | Optional Data | ||
255 | * =====================+================================+===================== | ||
256 | * xpcConnected | connection has been established| max #of entries | ||
257 | * | to the specified partition on | allowed in message | ||
258 | * | the specified channel | queue | ||
259 | * ---------------------+--------------------------------+--------------------- | ||
260 | * xpcMsgReceived | an XPC message arrived from | address of payload | ||
261 | * | the specified partition on the | | ||
262 | * | specified channel | [the user must call | ||
263 | * | | xpc_received() when | ||
264 | * | | finished with the | ||
265 | * | | payload] | ||
266 | * ---------------------+--------------------------------+--------------------- | ||
267 | * xpcMsgDelivered | notification that the message | NA | ||
268 | * | was delivered to the intended | | ||
269 | * | recipient and that they have | | ||
270 | * | acknowledged its receipt by | | ||
271 | * | calling xpc_received() | | ||
272 | * =====================+================================+===================== | ||
273 | * xpcUnequalMsgSizes | can't connect to the specified | NULL | ||
274 | * | partition on the specified | | ||
275 | * | channel because of mismatched | | ||
276 | * | message sizes | | ||
277 | * ---------------------+--------------------------------+--------------------- | ||
278 | * xpcNoMemory | insufficient memory avaiable | NULL | ||
279 | * | to allocate message queue | | ||
280 | * ---------------------+--------------------------------+--------------------- | ||
281 | * xpcLackOfResources | lack of resources to create | NULL | ||
282 | * | the necessary kthreads to | | ||
283 | * | support the channel | | ||
284 | * ---------------------+--------------------------------+--------------------- | ||
285 | * xpcUnregistering | this side's user has | NULL or NA | ||
286 | * | unregistered by calling | | ||
287 | * | xpc_disconnect() | | ||
288 | * ---------------------+--------------------------------+--------------------- | ||
289 | * xpcOtherUnregistering| the other side's user has | NULL or NA | ||
290 | * | unregistered by calling | | ||
291 | * | xpc_disconnect() | | ||
292 | * ---------------------+--------------------------------+--------------------- | ||
293 | * xpcNoHeartbeat | the other side's XPC is no | NULL or NA | ||
294 | * | longer heartbeating | | ||
295 | * | | | ||
296 | * ---------------------+--------------------------------+--------------------- | ||
297 | * xpcUnloading | this side's XPC module is | NULL or NA | ||
298 | * | being unloaded | | ||
299 | * | | | ||
300 | * ---------------------+--------------------------------+--------------------- | ||
301 | * xpcOtherUnloading | the other side's XPC module is | NULL or NA | ||
302 | * | is being unloaded | | ||
303 | * | | | ||
304 | * ---------------------+--------------------------------+--------------------- | ||
305 | * xpcPioReadError | xp_nofault_PIOR() returned an | NULL or NA | ||
306 | * | error while sending an IPI | | ||
307 | * | | | ||
308 | * ---------------------+--------------------------------+--------------------- | ||
309 | * xpcInvalidAddress | the address either received or | NULL or NA | ||
310 | * | sent by the specified partition| | ||
311 | * | is invalid | | ||
312 | * ---------------------+--------------------------------+--------------------- | ||
313 | * xpcBteNotAvailable | attempt to pull data from the | NULL or NA | ||
314 | * xpcBtePoisonError | specified partition over the | | ||
315 | * xpcBteWriteError | specified channel via a | | ||
316 | * xpcBteAccessError | bte_copy() failed | | ||
317 | * xpcBteTimeOutError | | | ||
318 | * xpcBteXtalkError | | | ||
319 | * xpcBteDirectoryError | | | ||
320 | * xpcBteGenericError | | | ||
321 | * xpcBteUnmappedError | | | ||
322 | * ---------------------+--------------------------------+--------------------- | ||
323 | * xpcUnknownReason | the specified channel to the | NULL or NA | ||
324 | * | specified partition was | | ||
325 | * | unavailable for unknown reasons| | ||
326 | * =====================+================================+===================== | ||
327 | */ | ||
328 | |||
329 | typedef void (*xpc_channel_func)(enum xpc_retval reason, partid_t partid, | ||
330 | int ch_number, void *data, void *key); | ||
331 | |||
332 | typedef void (*xpc_notify_func)(enum xpc_retval reason, partid_t partid, | ||
333 | int ch_number, void *key); | ||
334 | |||
335 | |||
336 | /* | ||
337 | * The following is a registration entry. There is a global array of these, | ||
338 | * one per channel. It is used to record the connection registration made | ||
339 | * by the users of XPC. As long as a registration entry exists, for any | ||
340 | * partition that comes up, XPC will attempt to establish a connection on | ||
341 | * that channel. Notification that a connection has been made will occur via | ||
342 | * the xpc_channel_func function. | ||
343 | * | ||
344 | * The 'func' field points to the function to call when aynchronous | ||
345 | * notification is required for such events as: a connection established/lost, | ||
346 | * or an incomming message received, or an error condition encountered. A | ||
347 | * non-NULL 'func' field indicates that there is an active registration for | ||
348 | * the channel. | ||
349 | */ | ||
350 | struct xpc_registration { | ||
351 | struct semaphore sema; | ||
352 | xpc_channel_func func; /* function to call */ | ||
353 | void *key; /* pointer to user's key */ | ||
354 | u16 nentries; /* #of msg entries in local msg queue */ | ||
355 | u16 msg_size; /* message queue's message size */ | ||
356 | u32 assigned_limit; /* limit on #of assigned kthreads */ | ||
357 | u32 idle_limit; /* limit on #of idle kthreads */ | ||
358 | } ____cacheline_aligned; | ||
359 | |||
360 | |||
361 | #define XPC_CHANNEL_REGISTERED(_c) (xpc_registrations[_c].func != NULL) | ||
362 | |||
363 | |||
364 | /* the following are valid xpc_allocate() flags */ | ||
365 | #define XPC_WAIT 0 /* wait flag */ | ||
366 | #define XPC_NOWAIT 1 /* no wait flag */ | ||
367 | |||
368 | |||
369 | struct xpc_interface { | ||
370 | void (*connect)(int); | ||
371 | void (*disconnect)(int); | ||
372 | enum xpc_retval (*allocate)(partid_t, int, u32, void **); | ||
373 | enum xpc_retval (*send)(partid_t, int, void *); | ||
374 | enum xpc_retval (*send_notify)(partid_t, int, void *, | ||
375 | xpc_notify_func, void *); | ||
376 | void (*received)(partid_t, int, void *); | ||
377 | enum xpc_retval (*partid_to_nasids)(partid_t, void *); | ||
378 | }; | ||
379 | |||
380 | |||
381 | extern struct xpc_interface xpc_interface; | ||
382 | |||
383 | extern void xpc_set_interface(void (*)(int), | ||
384 | void (*)(int), | ||
385 | enum xpc_retval (*)(partid_t, int, u32, void **), | ||
386 | enum xpc_retval (*)(partid_t, int, void *), | ||
387 | enum xpc_retval (*)(partid_t, int, void *, xpc_notify_func, | ||
388 | void *), | ||
389 | void (*)(partid_t, int, void *), | ||
390 | enum xpc_retval (*)(partid_t, void *)); | ||
391 | extern void xpc_clear_interface(void); | ||
392 | |||
393 | |||
394 | extern enum xpc_retval xpc_connect(int, xpc_channel_func, void *, u16, | ||
395 | u16, u32, u32); | ||
396 | extern void xpc_disconnect(int); | ||
397 | |||
398 | static inline enum xpc_retval | ||
399 | xpc_allocate(partid_t partid, int ch_number, u32 flags, void **payload) | ||
400 | { | ||
401 | return xpc_interface.allocate(partid, ch_number, flags, payload); | ||
402 | } | ||
403 | |||
404 | static inline enum xpc_retval | ||
405 | xpc_send(partid_t partid, int ch_number, void *payload) | ||
406 | { | ||
407 | return xpc_interface.send(partid, ch_number, payload); | ||
408 | } | ||
409 | |||
410 | static inline enum xpc_retval | ||
411 | xpc_send_notify(partid_t partid, int ch_number, void *payload, | ||
412 | xpc_notify_func func, void *key) | ||
413 | { | ||
414 | return xpc_interface.send_notify(partid, ch_number, payload, func, key); | ||
415 | } | ||
416 | |||
417 | static inline void | ||
418 | xpc_received(partid_t partid, int ch_number, void *payload) | ||
419 | { | ||
420 | return xpc_interface.received(partid, ch_number, payload); | ||
421 | } | ||
422 | |||
423 | static inline enum xpc_retval | ||
424 | xpc_partid_to_nasids(partid_t partid, void *nasids) | ||
425 | { | ||
426 | return xpc_interface.partid_to_nasids(partid, nasids); | ||
427 | } | ||
428 | |||
429 | |||
430 | extern u64 xp_nofault_PIOR_target; | ||
431 | extern int xp_nofault_PIOR(void *); | ||
432 | extern int xp_error_PIOR(void); | ||
433 | |||
434 | |||
435 | #endif /* _ASM_IA64_SN_XP_H */ | ||
436 | |||
diff --git a/include/asm-m32r/signal.h b/include/asm-m32r/signal.h index 6e55fd421883..95f69b191953 100644 --- a/include/asm-m32r/signal.h +++ b/include/asm-m32r/signal.h | |||
@@ -114,20 +114,7 @@ typedef unsigned long sigset_t; | |||
114 | #define MINSIGSTKSZ 2048 | 114 | #define MINSIGSTKSZ 2048 |
115 | #define SIGSTKSZ 8192 | 115 | #define SIGSTKSZ 8192 |
116 | 116 | ||
117 | #define SIG_BLOCK 0 /* for blocking signals */ | 117 | #include <asm-generic/signal.h> |
118 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | ||
119 | #define SIG_SETMASK 2 /* for setting the signal mask */ | ||
120 | |||
121 | /* Type of a signal handler. */ | ||
122 | typedef void __signalfn_t(int); | ||
123 | typedef __signalfn_t __user *__sighandler_t; | ||
124 | |||
125 | typedef void __restorefn_t(void); | ||
126 | typedef __restorefn_t __user *__sigrestore_t; | ||
127 | |||
128 | #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ | ||
129 | #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ | ||
130 | #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ | ||
131 | 118 | ||
132 | #ifdef __KERNEL__ | 119 | #ifdef __KERNEL__ |
133 | struct old_sigaction { | 120 | struct old_sigaction { |
diff --git a/include/asm-m68k/signal.h b/include/asm-m68k/signal.h index 1d016e9f19bf..a0cdf9082372 100644 --- a/include/asm-m68k/signal.h +++ b/include/asm-m68k/signal.h | |||
@@ -105,29 +105,20 @@ typedef unsigned long sigset_t; | |||
105 | #define MINSIGSTKSZ 2048 | 105 | #define MINSIGSTKSZ 2048 |
106 | #define SIGSTKSZ 8192 | 106 | #define SIGSTKSZ 8192 |
107 | 107 | ||
108 | #define SIG_BLOCK 0 /* for blocking signals */ | 108 | #include <asm-generic/signal.h> |
109 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | ||
110 | #define SIG_SETMASK 2 /* for setting the signal mask */ | ||
111 | |||
112 | /* Type of a signal handler. */ | ||
113 | typedef void (*__sighandler_t)(int); | ||
114 | |||
115 | #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ | ||
116 | #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ | ||
117 | #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ | ||
118 | 109 | ||
119 | #ifdef __KERNEL__ | 110 | #ifdef __KERNEL__ |
120 | struct old_sigaction { | 111 | struct old_sigaction { |
121 | __sighandler_t sa_handler; | 112 | __sighandler_t sa_handler; |
122 | old_sigset_t sa_mask; | 113 | old_sigset_t sa_mask; |
123 | unsigned long sa_flags; | 114 | unsigned long sa_flags; |
124 | void (*sa_restorer)(void); | 115 | __sigrestore_t sa_restorer; |
125 | }; | 116 | }; |
126 | 117 | ||
127 | struct sigaction { | 118 | struct sigaction { |
128 | __sighandler_t sa_handler; | 119 | __sighandler_t sa_handler; |
129 | unsigned long sa_flags; | 120 | unsigned long sa_flags; |
130 | void (*sa_restorer)(void); | 121 | __sigrestore_t sa_restorer; |
131 | sigset_t sa_mask; /* mask last for extensibility */ | 122 | sigset_t sa_mask; /* mask last for extensibility */ |
132 | }; | 123 | }; |
133 | 124 | ||
diff --git a/include/asm-m68knommu/signal.h b/include/asm-m68knommu/signal.h index 37c9c8a024ba..1d13187f6062 100644 --- a/include/asm-m68knommu/signal.h +++ b/include/asm-m68knommu/signal.h | |||
@@ -105,16 +105,7 @@ typedef unsigned long sigset_t; | |||
105 | #define MINSIGSTKSZ 2048 | 105 | #define MINSIGSTKSZ 2048 |
106 | #define SIGSTKSZ 8192 | 106 | #define SIGSTKSZ 8192 |
107 | 107 | ||
108 | #define SIG_BLOCK 0 /* for blocking signals */ | 108 | #include <asm-generic/signal.h> |
109 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | ||
110 | #define SIG_SETMASK 2 /* for setting the signal mask */ | ||
111 | |||
112 | /* Type of a signal handler. */ | ||
113 | typedef void (*__sighandler_t)(int); | ||
114 | |||
115 | #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ | ||
116 | #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ | ||
117 | #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ | ||
118 | 109 | ||
119 | #ifdef __KERNEL__ | 110 | #ifdef __KERNEL__ |
120 | struct old_sigaction { | 111 | struct old_sigaction { |
diff --git a/include/asm-mips/signal.h b/include/asm-mips/signal.h index d81356731eb6..f2c470f1d369 100644 --- a/include/asm-mips/signal.h +++ b/include/asm-mips/signal.h | |||
@@ -103,14 +103,7 @@ typedef unsigned long old_sigset_t; /* at least 32 bits */ | |||
103 | #define SIG_SETMASK 3 /* for setting the signal mask */ | 103 | #define SIG_SETMASK 3 /* for setting the signal mask */ |
104 | #define SIG_SETMASK32 256 /* Goodie from SGI for BSD compatibility: | 104 | #define SIG_SETMASK32 256 /* Goodie from SGI for BSD compatibility: |
105 | set only the low 32 bit of the sigset. */ | 105 | set only the low 32 bit of the sigset. */ |
106 | 106 | #include <asm-generic/signal.h> | |
107 | /* Type of a signal handler. */ | ||
108 | typedef void (*__sighandler_t)(int); | ||
109 | |||
110 | /* Fake signal functions */ | ||
111 | #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ | ||
112 | #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ | ||
113 | #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ | ||
114 | 107 | ||
115 | struct sigaction { | 108 | struct sigaction { |
116 | unsigned int sa_flags; | 109 | unsigned int sa_flags; |
diff --git a/include/asm-parisc/floppy.h b/include/asm-parisc/floppy.h index 47f53df2cef5..ca3aed768cdc 100644 --- a/include/asm-parisc/floppy.h +++ b/include/asm-parisc/floppy.h | |||
@@ -235,7 +235,7 @@ static int hard_dma_setup(char *addr, unsigned long size, int mode, int io) | |||
235 | return 0; | 235 | return 0; |
236 | } | 236 | } |
237 | 237 | ||
238 | struct fd_routine_l { | 238 | static struct fd_routine_l { |
239 | int (*_request_dma)(unsigned int dmanr, const char * device_id); | 239 | int (*_request_dma)(unsigned int dmanr, const char * device_id); |
240 | void (*_free_dma)(unsigned int dmanr); | 240 | void (*_free_dma)(unsigned int dmanr); |
241 | int (*_get_dma_residue)(unsigned int dummy); | 241 | int (*_get_dma_residue)(unsigned int dummy); |
diff --git a/include/asm-ppc/agp.h b/include/asm-ppc/agp.h index be27cfa8c5b0..ca9e423307f4 100644 --- a/include/asm-ppc/agp.h +++ b/include/asm-ppc/agp.h | |||
@@ -10,4 +10,14 @@ | |||
10 | #define flush_agp_mappings() | 10 | #define flush_agp_mappings() |
11 | #define flush_agp_cache() mb() | 11 | #define flush_agp_cache() mb() |
12 | 12 | ||
13 | /* Convert a physical address to an address suitable for the GART. */ | ||
14 | #define phys_to_gart(x) (x) | ||
15 | #define gart_to_phys(x) (x) | ||
16 | |||
17 | /* GATT allocation. Returns/accepts GATT kernel virtual address. */ | ||
18 | #define alloc_gatt_pages(order) \ | ||
19 | ((char *)__get_free_pages(GFP_KERNEL, (order))) | ||
20 | #define free_gatt_pages(table, order) \ | ||
21 | free_pages((unsigned long)(table), (order)) | ||
22 | |||
13 | #endif | 23 | #endif |
diff --git a/include/asm-ppc/cpm2.h b/include/asm-ppc/cpm2.h index 42fd1068cf2a..c5883dbed63f 100644 --- a/include/asm-ppc/cpm2.h +++ b/include/asm-ppc/cpm2.h | |||
@@ -1039,6 +1039,52 @@ typedef struct im_idma { | |||
1039 | #define CMXSCR_TS4CS_CLK7 0x00000006 /* SCC4 Tx Clock Source is CLK7 */ | 1039 | #define CMXSCR_TS4CS_CLK7 0x00000006 /* SCC4 Tx Clock Source is CLK7 */ |
1040 | #define CMXSCR_TS4CS_CLK8 0x00000007 /* SCC4 Tx Clock Source is CLK8 */ | 1040 | #define CMXSCR_TS4CS_CLK8 0x00000007 /* SCC4 Tx Clock Source is CLK8 */ |
1041 | 1041 | ||
1042 | /*----------------------------------------------------------------------- | ||
1043 | * SIUMCR - SIU Module Configuration Register 4-31 | ||
1044 | */ | ||
1045 | #define SIUMCR_BBD 0x80000000 /* Bus Busy Disable */ | ||
1046 | #define SIUMCR_ESE 0x40000000 /* External Snoop Enable */ | ||
1047 | #define SIUMCR_PBSE 0x20000000 /* Parity Byte Select Enable */ | ||
1048 | #define SIUMCR_CDIS 0x10000000 /* Core Disable */ | ||
1049 | #define SIUMCR_DPPC00 0x00000000 /* Data Parity Pins Configuration*/ | ||
1050 | #define SIUMCR_DPPC01 0x04000000 /* - " - */ | ||
1051 | #define SIUMCR_DPPC10 0x08000000 /* - " - */ | ||
1052 | #define SIUMCR_DPPC11 0x0c000000 /* - " - */ | ||
1053 | #define SIUMCR_L2CPC00 0x00000000 /* L2 Cache Pins Configuration */ | ||
1054 | #define SIUMCR_L2CPC01 0x01000000 /* - " - */ | ||
1055 | #define SIUMCR_L2CPC10 0x02000000 /* - " - */ | ||
1056 | #define SIUMCR_L2CPC11 0x03000000 /* - " - */ | ||
1057 | #define SIUMCR_LBPC00 0x00000000 /* Local Bus Pins Configuration */ | ||
1058 | #define SIUMCR_LBPC01 0x00400000 /* - " - */ | ||
1059 | #define SIUMCR_LBPC10 0x00800000 /* - " - */ | ||
1060 | #define SIUMCR_LBPC11 0x00c00000 /* - " - */ | ||
1061 | #define SIUMCR_APPC00 0x00000000 /* Address Parity Pins Configuration*/ | ||
1062 | #define SIUMCR_APPC01 0x00100000 /* - " - */ | ||
1063 | #define SIUMCR_APPC10 0x00200000 /* - " - */ | ||
1064 | #define SIUMCR_APPC11 0x00300000 /* - " - */ | ||
1065 | #define SIUMCR_CS10PC00 0x00000000 /* CS10 Pin Configuration */ | ||
1066 | #define SIUMCR_CS10PC01 0x00040000 /* - " - */ | ||
1067 | #define SIUMCR_CS10PC10 0x00080000 /* - " - */ | ||
1068 | #define SIUMCR_CS10PC11 0x000c0000 /* - " - */ | ||
1069 | #define SIUMCR_BCTLC00 0x00000000 /* Buffer Control Configuration */ | ||
1070 | #define SIUMCR_BCTLC01 0x00010000 /* - " - */ | ||
1071 | #define SIUMCR_BCTLC10 0x00020000 /* - " - */ | ||
1072 | #define SIUMCR_BCTLC11 0x00030000 /* - " - */ | ||
1073 | #define SIUMCR_MMR00 0x00000000 /* Mask Masters Requests */ | ||
1074 | #define SIUMCR_MMR01 0x00004000 /* - " - */ | ||
1075 | #define SIUMCR_MMR10 0x00008000 /* - " - */ | ||
1076 | #define SIUMCR_MMR11 0x0000c000 /* - " - */ | ||
1077 | #define SIUMCR_LPBSE 0x00002000 /* LocalBus Parity Byte Select Enable*/ | ||
1078 | |||
1079 | /*----------------------------------------------------------------------- | ||
1080 | * SCCR - System Clock Control Register 9-8 | ||
1081 | */ | ||
1082 | #define SCCR_PCI_MODE 0x00000100 /* PCI Mode */ | ||
1083 | #define SCCR_PCI_MODCK 0x00000080 /* Value of PCI_MODCK pin */ | ||
1084 | #define SCCR_PCIDF_MSK 0x00000078 /* PCI division factor */ | ||
1085 | #define SCCR_PCIDF_SHIFT 3 | ||
1086 | |||
1087 | |||
1042 | #endif /* __CPM2__ */ | 1088 | #endif /* __CPM2__ */ |
1043 | #endif /* __KERNEL__ */ | 1089 | #endif /* __KERNEL__ */ |
1044 | 1090 | ||
diff --git a/include/asm-ppc/m8260_pci.h b/include/asm-ppc/m8260_pci.h index 163a6b91d5b2..bf9e05dd54b5 100644 --- a/include/asm-ppc/m8260_pci.h +++ b/include/asm-ppc/m8260_pci.h | |||
@@ -19,6 +19,7 @@ | |||
19 | * Define the vendor/device ID for the MPC8265. | 19 | * Define the vendor/device ID for the MPC8265. |
20 | */ | 20 | */ |
21 | #define PCI_DEVICE_ID_MPC8265 ((0x18C0 << 16) | PCI_VENDOR_ID_MOTOROLA) | 21 | #define PCI_DEVICE_ID_MPC8265 ((0x18C0 << 16) | PCI_VENDOR_ID_MOTOROLA) |
22 | #define PCI_DEVICE_ID_MPC8272 ((0x18C1 << 16) | PCI_VENDOR_ID_MOTOROLA) | ||
22 | 23 | ||
23 | #define M8265_PCIBR0 0x101ac | 24 | #define M8265_PCIBR0 0x101ac |
24 | #define M8265_PCIBR1 0x101b0 | 25 | #define M8265_PCIBR1 0x101b0 |
diff --git a/include/asm-ppc/mpc8260.h b/include/asm-ppc/mpc8260.h index d820894e5991..89eb8a2ac693 100644 --- a/include/asm-ppc/mpc8260.h +++ b/include/asm-ppc/mpc8260.h | |||
@@ -41,7 +41,7 @@ | |||
41 | #endif | 41 | #endif |
42 | 42 | ||
43 | #ifdef CONFIG_PCI_8260 | 43 | #ifdef CONFIG_PCI_8260 |
44 | #include <syslib/m8260_pci.h> | 44 | #include <syslib/m82xx_pci.h> |
45 | #endif | 45 | #endif |
46 | 46 | ||
47 | /* Make sure the memory translation stuff is there if PCI not used. | 47 | /* Make sure the memory translation stuff is there if PCI not used. |
diff --git a/include/asm-ppc/sigcontext.h b/include/asm-ppc/sigcontext.h index f82dcccdee1e..b7a417e0a921 100644 --- a/include/asm-ppc/sigcontext.h +++ b/include/asm-ppc/sigcontext.h | |||
@@ -2,7 +2,7 @@ | |||
2 | #define _ASM_PPC_SIGCONTEXT_H | 2 | #define _ASM_PPC_SIGCONTEXT_H |
3 | 3 | ||
4 | #include <asm/ptrace.h> | 4 | #include <asm/ptrace.h> |
5 | 5 | #include <linux/compiler.h> | |
6 | 6 | ||
7 | struct sigcontext { | 7 | struct sigcontext { |
8 | unsigned long _unused[4]; | 8 | unsigned long _unused[4]; |
diff --git a/include/asm-ppc/signal.h b/include/asm-ppc/signal.h index d890dabd5a69..caf6ede3710f 100644 --- a/include/asm-ppc/signal.h +++ b/include/asm-ppc/signal.h | |||
@@ -100,20 +100,7 @@ typedef struct { | |||
100 | #define MINSIGSTKSZ 2048 | 100 | #define MINSIGSTKSZ 2048 |
101 | #define SIGSTKSZ 8192 | 101 | #define SIGSTKSZ 8192 |
102 | 102 | ||
103 | #define SIG_BLOCK 0 /* for blocking signals */ | 103 | #include <asm-generic/signal.h> |
104 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | ||
105 | #define SIG_SETMASK 2 /* for setting the signal mask */ | ||
106 | |||
107 | /* Type of a signal handler. */ | ||
108 | typedef void __signalfn_t(int); | ||
109 | typedef __signalfn_t __user *__sighandler_t; | ||
110 | |||
111 | typedef void __restorefn_t(void); | ||
112 | typedef __restorefn_t __user *__sigrestore_t; | ||
113 | |||
114 | #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ | ||
115 | #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ | ||
116 | #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ | ||
117 | 104 | ||
118 | struct old_sigaction { | 105 | struct old_sigaction { |
119 | __sighandler_t sa_handler; | 106 | __sighandler_t sa_handler; |
diff --git a/include/asm-ppc64/agp.h b/include/asm-ppc64/agp.h index be27cfa8c5b0..ca9e423307f4 100644 --- a/include/asm-ppc64/agp.h +++ b/include/asm-ppc64/agp.h | |||
@@ -10,4 +10,14 @@ | |||
10 | #define flush_agp_mappings() | 10 | #define flush_agp_mappings() |
11 | #define flush_agp_cache() mb() | 11 | #define flush_agp_cache() mb() |
12 | 12 | ||
13 | /* Convert a physical address to an address suitable for the GART. */ | ||
14 | #define phys_to_gart(x) (x) | ||
15 | #define gart_to_phys(x) (x) | ||
16 | |||
17 | /* GATT allocation. Returns/accepts GATT kernel virtual address. */ | ||
18 | #define alloc_gatt_pages(order) \ | ||
19 | ((char *)__get_free_pages(GFP_KERNEL, (order))) | ||
20 | #define free_gatt_pages(table, order) \ | ||
21 | free_pages((unsigned long)(table), (order)) | ||
22 | |||
13 | #endif | 23 | #endif |
diff --git a/include/asm-ppc64/elf.h b/include/asm-ppc64/elf.h index 6c42d61bedd1..085eedb956fe 100644 --- a/include/asm-ppc64/elf.h +++ b/include/asm-ppc64/elf.h | |||
@@ -221,9 +221,7 @@ do { \ | |||
221 | set_thread_flag(TIF_ABI_PENDING); \ | 221 | set_thread_flag(TIF_ABI_PENDING); \ |
222 | else \ | 222 | else \ |
223 | clear_thread_flag(TIF_ABI_PENDING); \ | 223 | clear_thread_flag(TIF_ABI_PENDING); \ |
224 | if (ibcs2) \ | 224 | if (personality(current->personality) != PER_LINUX32) \ |
225 | set_personality(PER_SVR4); \ | ||
226 | else if (current->personality != PER_LINUX32) \ | ||
227 | set_personality(PER_LINUX); \ | 225 | set_personality(PER_LINUX); \ |
228 | } while (0) | 226 | } while (0) |
229 | 227 | ||
diff --git a/include/asm-ppc64/iSeries/mf.h b/include/asm-ppc64/iSeries/mf.h index 2e59a8e15a0b..db333e1ee216 100644 --- a/include/asm-ppc64/iSeries/mf.h +++ b/include/asm-ppc64/iSeries/mf.h | |||
@@ -52,6 +52,7 @@ extern void mf_clear_src(void); | |||
52 | extern void mf_init(void); | 52 | extern void mf_init(void); |
53 | 53 | ||
54 | extern int mf_get_rtc(struct rtc_time *tm); | 54 | extern int mf_get_rtc(struct rtc_time *tm); |
55 | extern int mf_get_boot_rtc(struct rtc_time *tm); | ||
55 | extern int mf_set_rtc(struct rtc_time *tm); | 56 | extern int mf_set_rtc(struct rtc_time *tm); |
56 | 57 | ||
57 | #endif /* _ASM_PPC64_ISERIES_MF_H */ | 58 | #endif /* _ASM_PPC64_ISERIES_MF_H */ |
diff --git a/include/asm-ppc64/imalloc.h b/include/asm-ppc64/imalloc.h new file mode 100644 index 000000000000..3a45e918bf16 --- /dev/null +++ b/include/asm-ppc64/imalloc.h | |||
@@ -0,0 +1,24 @@ | |||
1 | #ifndef _PPC64_IMALLOC_H | ||
2 | #define _PPC64_IMALLOC_H | ||
3 | |||
4 | /* | ||
5 | * Define the address range of the imalloc VM area. | ||
6 | */ | ||
7 | #define PHBS_IO_BASE IOREGIONBASE | ||
8 | #define IMALLOC_BASE (IOREGIONBASE + 0x80000000ul) /* Reserve 2 gigs for PHBs */ | ||
9 | #define IMALLOC_END (IOREGIONBASE + EADDR_MASK) | ||
10 | |||
11 | |||
12 | /* imalloc region types */ | ||
13 | #define IM_REGION_UNUSED 0x1 | ||
14 | #define IM_REGION_SUBSET 0x2 | ||
15 | #define IM_REGION_EXISTS 0x4 | ||
16 | #define IM_REGION_OVERLAP 0x8 | ||
17 | #define IM_REGION_SUPERSET 0x10 | ||
18 | |||
19 | extern struct vm_struct * im_get_free_area(unsigned long size); | ||
20 | extern struct vm_struct * im_get_area(unsigned long v_addr, unsigned long size, | ||
21 | int region_type); | ||
22 | unsigned long im_free(void *addr); | ||
23 | |||
24 | #endif /* _PPC64_IMALLOC_H */ | ||
diff --git a/include/asm-ppc64/mmu.h b/include/asm-ppc64/mmu.h index 188987e9d9d4..c78282a67d8e 100644 --- a/include/asm-ppc64/mmu.h +++ b/include/asm-ppc64/mmu.h | |||
@@ -15,19 +15,10 @@ | |||
15 | 15 | ||
16 | #include <linux/config.h> | 16 | #include <linux/config.h> |
17 | #include <asm/page.h> | 17 | #include <asm/page.h> |
18 | #include <linux/stringify.h> | ||
19 | 18 | ||
20 | #ifndef __ASSEMBLY__ | 19 | /* |
21 | 20 | * Segment table | |
22 | /* Time to allow for more things here */ | 21 | */ |
23 | typedef unsigned long mm_context_id_t; | ||
24 | typedef struct { | ||
25 | mm_context_id_t id; | ||
26 | #ifdef CONFIG_HUGETLB_PAGE | ||
27 | pgd_t *huge_pgdir; | ||
28 | u16 htlb_segs; /* bitmask */ | ||
29 | #endif | ||
30 | } mm_context_t; | ||
31 | 22 | ||
32 | #define STE_ESID_V 0x80 | 23 | #define STE_ESID_V 0x80 |
33 | #define STE_ESID_KS 0x20 | 24 | #define STE_ESID_KS 0x20 |
@@ -36,15 +27,48 @@ typedef struct { | |||
36 | 27 | ||
37 | #define STE_VSID_SHIFT 12 | 28 | #define STE_VSID_SHIFT 12 |
38 | 29 | ||
39 | struct stab_entry { | 30 | /* Location of cpu0's segment table */ |
40 | unsigned long esid_data; | 31 | #define STAB0_PAGE 0x9 |
41 | unsigned long vsid_data; | 32 | #define STAB0_PHYS_ADDR (STAB0_PAGE<<PAGE_SHIFT) |
42 | }; | 33 | #define STAB0_VIRT_ADDR (KERNELBASE+STAB0_PHYS_ADDR) |
34 | |||
35 | /* | ||
36 | * SLB | ||
37 | */ | ||
43 | 38 | ||
44 | /* Hardware Page Table Entry */ | 39 | #define SLB_NUM_BOLTED 3 |
40 | #define SLB_CACHE_ENTRIES 8 | ||
41 | |||
42 | /* Bits in the SLB ESID word */ | ||
43 | #define SLB_ESID_V ASM_CONST(0x0000000008000000) /* valid */ | ||
44 | |||
45 | /* Bits in the SLB VSID word */ | ||
46 | #define SLB_VSID_SHIFT 12 | ||
47 | #define SLB_VSID_KS ASM_CONST(0x0000000000000800) | ||
48 | #define SLB_VSID_KP ASM_CONST(0x0000000000000400) | ||
49 | #define SLB_VSID_N ASM_CONST(0x0000000000000200) /* no-execute */ | ||
50 | #define SLB_VSID_L ASM_CONST(0x0000000000000100) /* largepage 16M */ | ||
51 | #define SLB_VSID_C ASM_CONST(0x0000000000000080) /* class */ | ||
52 | |||
53 | #define SLB_VSID_KERNEL (SLB_VSID_KP|SLB_VSID_C) | ||
54 | #define SLB_VSID_USER (SLB_VSID_KP|SLB_VSID_KS) | ||
55 | |||
56 | /* | ||
57 | * Hash table | ||
58 | */ | ||
45 | 59 | ||
46 | #define HPTES_PER_GROUP 8 | 60 | #define HPTES_PER_GROUP 8 |
47 | 61 | ||
62 | /* Values for PP (assumes Ks=0, Kp=1) */ | ||
63 | /* pp0 will always be 0 for linux */ | ||
64 | #define PP_RWXX 0 /* Supervisor read/write, User none */ | ||
65 | #define PP_RWRX 1 /* Supervisor read/write, User read */ | ||
66 | #define PP_RWRW 2 /* Supervisor read/write, User read/write */ | ||
67 | #define PP_RXRX 3 /* Supervisor read, User read */ | ||
68 | |||
69 | #ifndef __ASSEMBLY__ | ||
70 | |||
71 | /* Hardware Page Table Entry */ | ||
48 | typedef struct { | 72 | typedef struct { |
49 | unsigned long avpn:57; /* vsid | api == avpn */ | 73 | unsigned long avpn:57; /* vsid | api == avpn */ |
50 | unsigned long : 2; /* Software use */ | 74 | unsigned long : 2; /* Software use */ |
@@ -90,14 +114,6 @@ typedef struct { | |||
90 | } dw1; | 114 | } dw1; |
91 | } HPTE; | 115 | } HPTE; |
92 | 116 | ||
93 | /* Values for PP (assumes Ks=0, Kp=1) */ | ||
94 | /* pp0 will always be 0 for linux */ | ||
95 | #define PP_RWXX 0 /* Supervisor read/write, User none */ | ||
96 | #define PP_RWRX 1 /* Supervisor read/write, User read */ | ||
97 | #define PP_RWRW 2 /* Supervisor read/write, User read/write */ | ||
98 | #define PP_RXRX 3 /* Supervisor read, User read */ | ||
99 | |||
100 | |||
101 | extern HPTE * htab_address; | 117 | extern HPTE * htab_address; |
102 | extern unsigned long htab_hash_mask; | 118 | extern unsigned long htab_hash_mask; |
103 | 119 | ||
@@ -174,31 +190,70 @@ extern int __hash_page(unsigned long ea, unsigned long access, | |||
174 | 190 | ||
175 | extern void htab_finish_init(void); | 191 | extern void htab_finish_init(void); |
176 | 192 | ||
193 | extern void hpte_init_native(void); | ||
194 | extern void hpte_init_lpar(void); | ||
195 | extern void hpte_init_iSeries(void); | ||
196 | |||
197 | extern long pSeries_lpar_hpte_insert(unsigned long hpte_group, | ||
198 | unsigned long va, unsigned long prpn, | ||
199 | int secondary, unsigned long hpteflags, | ||
200 | int bolted, int large); | ||
201 | extern long native_hpte_insert(unsigned long hpte_group, unsigned long va, | ||
202 | unsigned long prpn, int secondary, | ||
203 | unsigned long hpteflags, int bolted, int large); | ||
204 | |||
177 | #endif /* __ASSEMBLY__ */ | 205 | #endif /* __ASSEMBLY__ */ |
178 | 206 | ||
179 | /* | 207 | /* |
180 | * Location of cpu0's segment table | 208 | * VSID allocation |
209 | * | ||
210 | * We first generate a 36-bit "proto-VSID". For kernel addresses this | ||
211 | * is equal to the ESID, for user addresses it is: | ||
212 | * (context << 15) | (esid & 0x7fff) | ||
213 | * | ||
214 | * The two forms are distinguishable because the top bit is 0 for user | ||
215 | * addresses, whereas the top two bits are 1 for kernel addresses. | ||
216 | * Proto-VSIDs with the top two bits equal to 0b10 are reserved for | ||
217 | * now. | ||
218 | * | ||
219 | * The proto-VSIDs are then scrambled into real VSIDs with the | ||
220 | * multiplicative hash: | ||
221 | * | ||
222 | * VSID = (proto-VSID * VSID_MULTIPLIER) % VSID_MODULUS | ||
223 | * where VSID_MULTIPLIER = 268435399 = 0xFFFFFC7 | ||
224 | * VSID_MODULUS = 2^36-1 = 0xFFFFFFFFF | ||
225 | * | ||
226 | * This scramble is only well defined for proto-VSIDs below | ||
227 | * 0xFFFFFFFFF, so both proto-VSID and actual VSID 0xFFFFFFFFF are | ||
228 | * reserved. VSID_MULTIPLIER is prime, so in particular it is | ||
229 | * co-prime to VSID_MODULUS, making this a 1:1 scrambling function. | ||
230 | * Because the modulus is 2^n-1 we can compute it efficiently without | ||
231 | * a divide or extra multiply (see below). | ||
232 | * | ||
233 | * This scheme has several advantages over older methods: | ||
234 | * | ||
235 | * - We have VSIDs allocated for every kernel address | ||
236 | * (i.e. everything above 0xC000000000000000), except the very top | ||
237 | * segment, which simplifies several things. | ||
238 | * | ||
239 | * - We allow for 15 significant bits of ESID and 20 bits of | ||
240 | * context for user addresses. i.e. 8T (43 bits) of address space for | ||
241 | * up to 1M contexts (although the page table structure and context | ||
242 | * allocation will need changes to take advantage of this). | ||
243 | * | ||
244 | * - The scramble function gives robust scattering in the hash | ||
245 | * table (at least based on some initial results). The previous | ||
246 | * method was more susceptible to pathological cases giving excessive | ||
247 | * hash collisions. | ||
248 | */ | ||
249 | /* | ||
250 | * WARNING - If you change these you must make sure the asm | ||
251 | * implementations in slb_allocate (slb_low.S), do_stab_bolted | ||
252 | * (head.S) and ASM_VSID_SCRAMBLE (below) are changed accordingly. | ||
253 | * | ||
254 | * You'll also need to change the precomputed VSID values in head.S | ||
255 | * which are used by the iSeries firmware. | ||
181 | */ | 256 | */ |
182 | #define STAB0_PAGE 0x9 | ||
183 | #define STAB0_PHYS_ADDR (STAB0_PAGE<<PAGE_SHIFT) | ||
184 | #define STAB0_VIRT_ADDR (KERNELBASE+STAB0_PHYS_ADDR) | ||
185 | |||
186 | #define SLB_NUM_BOLTED 3 | ||
187 | #define SLB_CACHE_ENTRIES 8 | ||
188 | |||
189 | /* Bits in the SLB ESID word */ | ||
190 | #define SLB_ESID_V 0x0000000008000000 /* entry is valid */ | ||
191 | |||
192 | /* Bits in the SLB VSID word */ | ||
193 | #define SLB_VSID_SHIFT 12 | ||
194 | #define SLB_VSID_KS 0x0000000000000800 | ||
195 | #define SLB_VSID_KP 0x0000000000000400 | ||
196 | #define SLB_VSID_N 0x0000000000000200 /* no-execute */ | ||
197 | #define SLB_VSID_L 0x0000000000000100 /* largepage (4M) */ | ||
198 | #define SLB_VSID_C 0x0000000000000080 /* class */ | ||
199 | |||
200 | #define SLB_VSID_KERNEL (SLB_VSID_KP|SLB_VSID_C) | ||
201 | #define SLB_VSID_USER (SLB_VSID_KP|SLB_VSID_KS) | ||
202 | 257 | ||
203 | #define VSID_MULTIPLIER ASM_CONST(200730139) /* 28-bit prime */ | 258 | #define VSID_MULTIPLIER ASM_CONST(200730139) /* 28-bit prime */ |
204 | #define VSID_BITS 36 | 259 | #define VSID_BITS 36 |
@@ -239,4 +294,50 @@ extern void htab_finish_init(void); | |||
239 | srdi rx,rx,VSID_BITS; /* extract 2^36 bit */ \ | 294 | srdi rx,rx,VSID_BITS; /* extract 2^36 bit */ \ |
240 | add rt,rt,rx | 295 | add rt,rt,rx |
241 | 296 | ||
297 | |||
298 | #ifndef __ASSEMBLY__ | ||
299 | |||
300 | typedef unsigned long mm_context_id_t; | ||
301 | |||
302 | typedef struct { | ||
303 | mm_context_id_t id; | ||
304 | #ifdef CONFIG_HUGETLB_PAGE | ||
305 | pgd_t *huge_pgdir; | ||
306 | u16 htlb_segs; /* bitmask */ | ||
307 | #endif | ||
308 | } mm_context_t; | ||
309 | |||
310 | |||
311 | static inline unsigned long vsid_scramble(unsigned long protovsid) | ||
312 | { | ||
313 | #if 0 | ||
314 | /* The code below is equivalent to this function for arguments | ||
315 | * < 2^VSID_BITS, which is all this should ever be called | ||
316 | * with. However gcc is not clever enough to compute the | ||
317 | * modulus (2^n-1) without a second multiply. */ | ||
318 | return ((protovsid * VSID_MULTIPLIER) % VSID_MODULUS); | ||
319 | #else /* 1 */ | ||
320 | unsigned long x; | ||
321 | |||
322 | x = protovsid * VSID_MULTIPLIER; | ||
323 | x = (x >> VSID_BITS) + (x & VSID_MODULUS); | ||
324 | return (x + ((x+1) >> VSID_BITS)) & VSID_MODULUS; | ||
325 | #endif /* 1 */ | ||
326 | } | ||
327 | |||
328 | /* This is only valid for addresses >= KERNELBASE */ | ||
329 | static inline unsigned long get_kernel_vsid(unsigned long ea) | ||
330 | { | ||
331 | return vsid_scramble(ea >> SID_SHIFT); | ||
332 | } | ||
333 | |||
334 | /* This is only valid for user addresses (which are below 2^41) */ | ||
335 | static inline unsigned long get_vsid(unsigned long context, unsigned long ea) | ||
336 | { | ||
337 | return vsid_scramble((context << USER_ESID_BITS) | ||
338 | | (ea >> SID_SHIFT)); | ||
339 | } | ||
340 | |||
341 | #endif /* __ASSEMBLY */ | ||
342 | |||
242 | #endif /* _PPC64_MMU_H_ */ | 343 | #endif /* _PPC64_MMU_H_ */ |
diff --git a/include/asm-ppc64/mmu_context.h b/include/asm-ppc64/mmu_context.h index c2e8e0466383..77a743402db4 100644 --- a/include/asm-ppc64/mmu_context.h +++ b/include/asm-ppc64/mmu_context.h | |||
@@ -84,86 +84,4 @@ static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) | |||
84 | local_irq_restore(flags); | 84 | local_irq_restore(flags); |
85 | } | 85 | } |
86 | 86 | ||
87 | /* VSID allocation | ||
88 | * =============== | ||
89 | * | ||
90 | * We first generate a 36-bit "proto-VSID". For kernel addresses this | ||
91 | * is equal to the ESID, for user addresses it is: | ||
92 | * (context << 15) | (esid & 0x7fff) | ||
93 | * | ||
94 | * The two forms are distinguishable because the top bit is 0 for user | ||
95 | * addresses, whereas the top two bits are 1 for kernel addresses. | ||
96 | * Proto-VSIDs with the top two bits equal to 0b10 are reserved for | ||
97 | * now. | ||
98 | * | ||
99 | * The proto-VSIDs are then scrambled into real VSIDs with the | ||
100 | * multiplicative hash: | ||
101 | * | ||
102 | * VSID = (proto-VSID * VSID_MULTIPLIER) % VSID_MODULUS | ||
103 | * where VSID_MULTIPLIER = 268435399 = 0xFFFFFC7 | ||
104 | * VSID_MODULUS = 2^36-1 = 0xFFFFFFFFF | ||
105 | * | ||
106 | * This scramble is only well defined for proto-VSIDs below | ||
107 | * 0xFFFFFFFFF, so both proto-VSID and actual VSID 0xFFFFFFFFF are | ||
108 | * reserved. VSID_MULTIPLIER is prime, so in particular it is | ||
109 | * co-prime to VSID_MODULUS, making this a 1:1 scrambling function. | ||
110 | * Because the modulus is 2^n-1 we can compute it efficiently without | ||
111 | * a divide or extra multiply (see below). | ||
112 | * | ||
113 | * This scheme has several advantages over older methods: | ||
114 | * | ||
115 | * - We have VSIDs allocated for every kernel address | ||
116 | * (i.e. everything above 0xC000000000000000), except the very top | ||
117 | * segment, which simplifies several things. | ||
118 | * | ||
119 | * - We allow for 15 significant bits of ESID and 20 bits of | ||
120 | * context for user addresses. i.e. 8T (43 bits) of address space for | ||
121 | * up to 1M contexts (although the page table structure and context | ||
122 | * allocation will need changes to take advantage of this). | ||
123 | * | ||
124 | * - The scramble function gives robust scattering in the hash | ||
125 | * table (at least based on some initial results). The previous | ||
126 | * method was more susceptible to pathological cases giving excessive | ||
127 | * hash collisions. | ||
128 | */ | ||
129 | |||
130 | /* | ||
131 | * WARNING - If you change these you must make sure the asm | ||
132 | * implementations in slb_allocate(), do_stab_bolted and mmu.h | ||
133 | * (ASM_VSID_SCRAMBLE macro) are changed accordingly. | ||
134 | * | ||
135 | * You'll also need to change the precomputed VSID values in head.S | ||
136 | * which are used by the iSeries firmware. | ||
137 | */ | ||
138 | |||
139 | static inline unsigned long vsid_scramble(unsigned long protovsid) | ||
140 | { | ||
141 | #if 0 | ||
142 | /* The code below is equivalent to this function for arguments | ||
143 | * < 2^VSID_BITS, which is all this should ever be called | ||
144 | * with. However gcc is not clever enough to compute the | ||
145 | * modulus (2^n-1) without a second multiply. */ | ||
146 | return ((protovsid * VSID_MULTIPLIER) % VSID_MODULUS); | ||
147 | #else /* 1 */ | ||
148 | unsigned long x; | ||
149 | |||
150 | x = protovsid * VSID_MULTIPLIER; | ||
151 | x = (x >> VSID_BITS) + (x & VSID_MODULUS); | ||
152 | return (x + ((x+1) >> VSID_BITS)) & VSID_MODULUS; | ||
153 | #endif /* 1 */ | ||
154 | } | ||
155 | |||
156 | /* This is only valid for addresses >= KERNELBASE */ | ||
157 | static inline unsigned long get_kernel_vsid(unsigned long ea) | ||
158 | { | ||
159 | return vsid_scramble(ea >> SID_SHIFT); | ||
160 | } | ||
161 | |||
162 | /* This is only valid for user addresses (which are below 2^41) */ | ||
163 | static inline unsigned long get_vsid(unsigned long context, unsigned long ea) | ||
164 | { | ||
165 | return vsid_scramble((context << USER_ESID_BITS) | ||
166 | | (ea >> SID_SHIFT)); | ||
167 | } | ||
168 | |||
169 | #endif /* __PPC64_MMU_CONTEXT_H */ | 87 | #endif /* __PPC64_MMU_CONTEXT_H */ |
diff --git a/include/asm-ppc64/page.h b/include/asm-ppc64/page.h index 86219574c1a5..bcd21789d3b7 100644 --- a/include/asm-ppc64/page.h +++ b/include/asm-ppc64/page.h | |||
@@ -23,7 +23,6 @@ | |||
23 | #define PAGE_SHIFT 12 | 23 | #define PAGE_SHIFT 12 |
24 | #define PAGE_SIZE (ASM_CONST(1) << PAGE_SHIFT) | 24 | #define PAGE_SIZE (ASM_CONST(1) << PAGE_SHIFT) |
25 | #define PAGE_MASK (~(PAGE_SIZE-1)) | 25 | #define PAGE_MASK (~(PAGE_SIZE-1)) |
26 | #define PAGE_OFFSET_MASK (PAGE_SIZE-1) | ||
27 | 26 | ||
28 | #define SID_SHIFT 28 | 27 | #define SID_SHIFT 28 |
29 | #define SID_MASK 0xfffffffffUL | 28 | #define SID_MASK 0xfffffffffUL |
@@ -85,9 +84,6 @@ | |||
85 | /* align addr on a size boundary - adjust address up if needed */ | 84 | /* align addr on a size boundary - adjust address up if needed */ |
86 | #define _ALIGN(addr,size) _ALIGN_UP(addr,size) | 85 | #define _ALIGN(addr,size) _ALIGN_UP(addr,size) |
87 | 86 | ||
88 | /* to align the pointer to the (next) double word boundary */ | ||
89 | #define DOUBLEWORD_ALIGN(addr) _ALIGN(addr,sizeof(unsigned long)) | ||
90 | |||
91 | /* to align the pointer to the (next) page boundary */ | 87 | /* to align the pointer to the (next) page boundary */ |
92 | #define PAGE_ALIGN(addr) _ALIGN(addr, PAGE_SIZE) | 88 | #define PAGE_ALIGN(addr) _ALIGN(addr, PAGE_SIZE) |
93 | 89 | ||
@@ -100,7 +96,6 @@ | |||
100 | #define REGION_SIZE 4UL | 96 | #define REGION_SIZE 4UL |
101 | #define REGION_SHIFT 60UL | 97 | #define REGION_SHIFT 60UL |
102 | #define REGION_MASK (((1UL<<REGION_SIZE)-1UL)<<REGION_SHIFT) | 98 | #define REGION_MASK (((1UL<<REGION_SIZE)-1UL)<<REGION_SHIFT) |
103 | #define REGION_STRIDE (1UL << REGION_SHIFT) | ||
104 | 99 | ||
105 | static __inline__ void clear_page(void *addr) | 100 | static __inline__ void clear_page(void *addr) |
106 | { | 101 | { |
@@ -209,13 +204,13 @@ extern u64 ppc64_pft_size; /* Log 2 of page table size */ | |||
209 | #define VMALLOCBASE ASM_CONST(0xD000000000000000) | 204 | #define VMALLOCBASE ASM_CONST(0xD000000000000000) |
210 | #define IOREGIONBASE ASM_CONST(0xE000000000000000) | 205 | #define IOREGIONBASE ASM_CONST(0xE000000000000000) |
211 | 206 | ||
212 | #define IO_REGION_ID (IOREGIONBASE>>REGION_SHIFT) | 207 | #define IO_REGION_ID (IOREGIONBASE >> REGION_SHIFT) |
213 | #define VMALLOC_REGION_ID (VMALLOCBASE>>REGION_SHIFT) | 208 | #define VMALLOC_REGION_ID (VMALLOCBASE >> REGION_SHIFT) |
214 | #define KERNEL_REGION_ID (KERNELBASE>>REGION_SHIFT) | 209 | #define KERNEL_REGION_ID (KERNELBASE >> REGION_SHIFT) |
215 | #define USER_REGION_ID (0UL) | 210 | #define USER_REGION_ID (0UL) |
216 | #define REGION_ID(X) (((unsigned long)(X))>>REGION_SHIFT) | 211 | #define REGION_ID(ea) (((unsigned long)(ea)) >> REGION_SHIFT) |
217 | 212 | ||
218 | #define __bpn_to_ba(x) ((((unsigned long)(x))<<PAGE_SHIFT) + KERNELBASE) | 213 | #define __bpn_to_ba(x) ((((unsigned long)(x)) << PAGE_SHIFT) + KERNELBASE) |
219 | #define __ba_to_bpn(x) ((((unsigned long)(x)) & ~REGION_MASK) >> PAGE_SHIFT) | 214 | #define __ba_to_bpn(x) ((((unsigned long)(x)) & ~REGION_MASK) >> PAGE_SHIFT) |
220 | 215 | ||
221 | #define __va(x) ((void *)((unsigned long)(x) + KERNELBASE)) | 216 | #define __va(x) ((void *)((unsigned long)(x) + KERNELBASE)) |
diff --git a/include/asm-ppc64/pgtable.h b/include/asm-ppc64/pgtable.h index b984e2747e0c..264c4f7993be 100644 --- a/include/asm-ppc64/pgtable.h +++ b/include/asm-ppc64/pgtable.h | |||
@@ -17,16 +17,6 @@ | |||
17 | 17 | ||
18 | #include <asm-generic/pgtable-nopud.h> | 18 | #include <asm-generic/pgtable-nopud.h> |
19 | 19 | ||
20 | /* PMD_SHIFT determines what a second-level page table entry can map */ | ||
21 | #define PMD_SHIFT (PAGE_SHIFT + PAGE_SHIFT - 3) | ||
22 | #define PMD_SIZE (1UL << PMD_SHIFT) | ||
23 | #define PMD_MASK (~(PMD_SIZE-1)) | ||
24 | |||
25 | /* PGDIR_SHIFT determines what a third-level page table entry can map */ | ||
26 | #define PGDIR_SHIFT (PAGE_SHIFT + (PAGE_SHIFT - 3) + (PAGE_SHIFT - 2)) | ||
27 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) | ||
28 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) | ||
29 | |||
30 | /* | 20 | /* |
31 | * Entries per page directory level. The PTE level must use a 64b record | 21 | * Entries per page directory level. The PTE level must use a 64b record |
32 | * for each page table entry. The PMD and PGD level use a 32b record for | 22 | * for each page table entry. The PMD and PGD level use a 32b record for |
@@ -40,40 +30,30 @@ | |||
40 | #define PTRS_PER_PMD (1 << PMD_INDEX_SIZE) | 30 | #define PTRS_PER_PMD (1 << PMD_INDEX_SIZE) |
41 | #define PTRS_PER_PGD (1 << PGD_INDEX_SIZE) | 31 | #define PTRS_PER_PGD (1 << PGD_INDEX_SIZE) |
42 | 32 | ||
43 | #define USER_PTRS_PER_PGD (1024) | 33 | /* PMD_SHIFT determines what a second-level page table entry can map */ |
44 | #define FIRST_USER_ADDRESS 0 | 34 | #define PMD_SHIFT (PAGE_SHIFT + PTE_INDEX_SIZE) |
35 | #define PMD_SIZE (1UL << PMD_SHIFT) | ||
36 | #define PMD_MASK (~(PMD_SIZE-1)) | ||
45 | 37 | ||
46 | #define EADDR_SIZE (PTE_INDEX_SIZE + PMD_INDEX_SIZE + \ | 38 | /* PGDIR_SHIFT determines what a third-level page table entry can map */ |
47 | PGD_INDEX_SIZE + PAGE_SHIFT) | 39 | #define PGDIR_SHIFT (PMD_SHIFT + PMD_INDEX_SIZE) |
40 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) | ||
41 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) | ||
42 | |||
43 | #define FIRST_USER_ADDRESS 0 | ||
48 | 44 | ||
49 | /* | 45 | /* |
50 | * Size of EA range mapped by our pagetables. | 46 | * Size of EA range mapped by our pagetables. |
51 | */ | 47 | */ |
52 | #define PGTABLE_EA_BITS 41 | 48 | #define EADDR_SIZE (PTE_INDEX_SIZE + PMD_INDEX_SIZE + \ |
53 | #define PGTABLE_EA_MASK ((1UL<<PGTABLE_EA_BITS)-1) | 49 | PGD_INDEX_SIZE + PAGE_SHIFT) |
50 | #define EADDR_MASK ((1UL << EADDR_SIZE) - 1) | ||
54 | 51 | ||
55 | /* | 52 | /* |
56 | * Define the address range of the vmalloc VM area. | 53 | * Define the address range of the vmalloc VM area. |
57 | */ | 54 | */ |
58 | #define VMALLOC_START (0xD000000000000000ul) | 55 | #define VMALLOC_START (0xD000000000000000ul) |
59 | #define VMALLOC_END (VMALLOC_START + PGTABLE_EA_MASK) | 56 | #define VMALLOC_END (VMALLOC_START + EADDR_MASK) |
60 | |||
61 | /* | ||
62 | * Define the address range of the imalloc VM area. | ||
63 | * (used for ioremap) | ||
64 | */ | ||
65 | #define IMALLOC_START (ioremap_bot) | ||
66 | #define IMALLOC_VMADDR(x) ((unsigned long)(x)) | ||
67 | #define PHBS_IO_BASE (0xE000000000000000ul) /* Reserve 2 gigs for PHBs */ | ||
68 | #define IMALLOC_BASE (0xE000000080000000ul) | ||
69 | #define IMALLOC_END (IMALLOC_BASE + PGTABLE_EA_MASK) | ||
70 | |||
71 | /* | ||
72 | * Define the user address range | ||
73 | */ | ||
74 | #define USER_START (0UL) | ||
75 | #define USER_END (USER_START + PGTABLE_EA_MASK) | ||
76 | |||
77 | 57 | ||
78 | /* | 58 | /* |
79 | * Bits in a linux-style PTE. These match the bits in the | 59 | * Bits in a linux-style PTE. These match the bits in the |
@@ -168,10 +148,6 @@ extern unsigned long empty_zero_page[PAGE_SIZE/sizeof(unsigned long)]; | |||
168 | /* shift to put page number into pte */ | 148 | /* shift to put page number into pte */ |
169 | #define PTE_SHIFT (17) | 149 | #define PTE_SHIFT (17) |
170 | 150 | ||
171 | /* We allow 2^41 bytes of real memory, so we need 29 bits in the PMD | ||
172 | * to give the PTE page number. The bottom two bits are for flags. */ | ||
173 | #define PMD_TO_PTEPAGE_SHIFT (2) | ||
174 | |||
175 | #ifdef CONFIG_HUGETLB_PAGE | 151 | #ifdef CONFIG_HUGETLB_PAGE |
176 | 152 | ||
177 | #ifndef __ASSEMBLY__ | 153 | #ifndef __ASSEMBLY__ |
@@ -200,13 +176,14 @@ void hugetlb_mm_free_pgd(struct mm_struct *mm); | |||
200 | */ | 176 | */ |
201 | #define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot)) | 177 | #define mk_pte(page, pgprot) pfn_pte(page_to_pfn(page), (pgprot)) |
202 | 178 | ||
203 | #define pfn_pte(pfn,pgprot) \ | 179 | static inline pte_t pfn_pte(unsigned long pfn, pgprot_t pgprot) |
204 | ({ \ | 180 | { |
205 | pte_t pte; \ | 181 | pte_t pte; |
206 | pte_val(pte) = ((unsigned long)(pfn) << PTE_SHIFT) | \ | 182 | |
207 | pgprot_val(pgprot); \ | 183 | |
208 | pte; \ | 184 | pte_val(pte) = (pfn << PTE_SHIFT) | pgprot_val(pgprot); |
209 | }) | 185 | return pte; |
186 | } | ||
210 | 187 | ||
211 | #define pte_modify(_pte, newprot) \ | 188 | #define pte_modify(_pte, newprot) \ |
212 | (__pte((pte_val(_pte) & _PAGE_CHG_MASK) | pgprot_val(newprot))) | 189 | (__pte((pte_val(_pte) & _PAGE_CHG_MASK) | pgprot_val(newprot))) |
@@ -220,13 +197,12 @@ void hugetlb_mm_free_pgd(struct mm_struct *mm); | |||
220 | #define pte_page(x) pfn_to_page(pte_pfn(x)) | 197 | #define pte_page(x) pfn_to_page(pte_pfn(x)) |
221 | 198 | ||
222 | #define pmd_set(pmdp, ptep) \ | 199 | #define pmd_set(pmdp, ptep) \ |
223 | (pmd_val(*(pmdp)) = (__ba_to_bpn(ptep) << PMD_TO_PTEPAGE_SHIFT)) | 200 | (pmd_val(*(pmdp)) = __ba_to_bpn(ptep)) |
224 | #define pmd_none(pmd) (!pmd_val(pmd)) | 201 | #define pmd_none(pmd) (!pmd_val(pmd)) |
225 | #define pmd_bad(pmd) (pmd_val(pmd) == 0) | 202 | #define pmd_bad(pmd) (pmd_val(pmd) == 0) |
226 | #define pmd_present(pmd) (pmd_val(pmd) != 0) | 203 | #define pmd_present(pmd) (pmd_val(pmd) != 0) |
227 | #define pmd_clear(pmdp) (pmd_val(*(pmdp)) = 0) | 204 | #define pmd_clear(pmdp) (pmd_val(*(pmdp)) = 0) |
228 | #define pmd_page_kernel(pmd) \ | 205 | #define pmd_page_kernel(pmd) (__bpn_to_ba(pmd_val(pmd))) |
229 | (__bpn_to_ba(pmd_val(pmd) >> PMD_TO_PTEPAGE_SHIFT)) | ||
230 | #define pmd_page(pmd) virt_to_page(pmd_page_kernel(pmd)) | 206 | #define pmd_page(pmd) virt_to_page(pmd_page_kernel(pmd)) |
231 | 207 | ||
232 | #define pud_set(pudp, pmdp) (pud_val(*(pudp)) = (__ba_to_bpn(pmdp))) | 208 | #define pud_set(pudp, pmdp) (pud_val(*(pudp)) = (__ba_to_bpn(pmdp))) |
@@ -266,8 +242,6 @@ void hugetlb_mm_free_pgd(struct mm_struct *mm); | |||
266 | /* to find an entry in the ioremap page-table-directory */ | 242 | /* to find an entry in the ioremap page-table-directory */ |
267 | #define pgd_offset_i(address) (ioremap_pgd + pgd_index(address)) | 243 | #define pgd_offset_i(address) (ioremap_pgd + pgd_index(address)) |
268 | 244 | ||
269 | #define pages_to_mb(x) ((x) >> (20-PAGE_SHIFT)) | ||
270 | |||
271 | /* | 245 | /* |
272 | * The following only work if pte_present() is true. | 246 | * The following only work if pte_present() is true. |
273 | * Undefined behaviour if not.. | 247 | * Undefined behaviour if not.. |
@@ -442,7 +416,7 @@ static inline void set_pte_at(struct mm_struct *mm, unsigned long addr, | |||
442 | pte_clear(mm, addr, ptep); | 416 | pte_clear(mm, addr, ptep); |
443 | flush_tlb_pending(); | 417 | flush_tlb_pending(); |
444 | } | 418 | } |
445 | *ptep = __pte(pte_val(pte)) & ~_PAGE_HPTEFLAGS; | 419 | *ptep = __pte(pte_val(pte) & ~_PAGE_HPTEFLAGS); |
446 | } | 420 | } |
447 | 421 | ||
448 | /* Set the dirty and/or accessed bits atomically in a linux PTE, this | 422 | /* Set the dirty and/or accessed bits atomically in a linux PTE, this |
@@ -487,18 +461,13 @@ extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long addr, | |||
487 | 461 | ||
488 | extern unsigned long ioremap_bot, ioremap_base; | 462 | extern unsigned long ioremap_bot, ioremap_base; |
489 | 463 | ||
490 | #define USER_PGD_PTRS (PAGE_OFFSET >> PGDIR_SHIFT) | ||
491 | #define KERNEL_PGD_PTRS (PTRS_PER_PGD-USER_PGD_PTRS) | ||
492 | |||
493 | #define pte_ERROR(e) \ | ||
494 | printk("%s:%d: bad pte %016lx.\n", __FILE__, __LINE__, pte_val(e)) | ||
495 | #define pmd_ERROR(e) \ | 464 | #define pmd_ERROR(e) \ |
496 | printk("%s:%d: bad pmd %08x.\n", __FILE__, __LINE__, pmd_val(e)) | 465 | printk("%s:%d: bad pmd %08x.\n", __FILE__, __LINE__, pmd_val(e)) |
497 | #define pgd_ERROR(e) \ | 466 | #define pgd_ERROR(e) \ |
498 | printk("%s:%d: bad pgd %08x.\n", __FILE__, __LINE__, pgd_val(e)) | 467 | printk("%s:%d: bad pgd %08x.\n", __FILE__, __LINE__, pgd_val(e)) |
499 | 468 | ||
500 | extern pgd_t swapper_pg_dir[1024]; | 469 | extern pgd_t swapper_pg_dir[]; |
501 | extern pgd_t ioremap_dir[1024]; | 470 | extern pgd_t ioremap_dir[]; |
502 | 471 | ||
503 | extern void paging_init(void); | 472 | extern void paging_init(void); |
504 | 473 | ||
@@ -540,43 +509,11 @@ extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t); | |||
540 | */ | 509 | */ |
541 | #define kern_addr_valid(addr) (1) | 510 | #define kern_addr_valid(addr) (1) |
542 | 511 | ||
543 | #define io_remap_page_range(vma, vaddr, paddr, size, prot) \ | ||
544 | remap_pfn_range(vma, vaddr, (paddr) >> PAGE_SHIFT, size, prot) | ||
545 | |||
546 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ | 512 | #define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \ |
547 | remap_pfn_range(vma, vaddr, pfn, size, prot) | 513 | remap_pfn_range(vma, vaddr, pfn, size, prot) |
548 | 514 | ||
549 | #define MK_IOSPACE_PFN(space, pfn) (pfn) | ||
550 | #define GET_IOSPACE(pfn) 0 | ||
551 | #define GET_PFN(pfn) (pfn) | ||
552 | |||
553 | void pgtable_cache_init(void); | 515 | void pgtable_cache_init(void); |
554 | 516 | ||
555 | extern void hpte_init_native(void); | ||
556 | extern void hpte_init_lpar(void); | ||
557 | extern void hpte_init_iSeries(void); | ||
558 | |||
559 | /* imalloc region types */ | ||
560 | #define IM_REGION_UNUSED 0x1 | ||
561 | #define IM_REGION_SUBSET 0x2 | ||
562 | #define IM_REGION_EXISTS 0x4 | ||
563 | #define IM_REGION_OVERLAP 0x8 | ||
564 | #define IM_REGION_SUPERSET 0x10 | ||
565 | |||
566 | extern struct vm_struct * im_get_free_area(unsigned long size); | ||
567 | extern struct vm_struct * im_get_area(unsigned long v_addr, unsigned long size, | ||
568 | int region_type); | ||
569 | unsigned long im_free(void *addr); | ||
570 | |||
571 | extern long pSeries_lpar_hpte_insert(unsigned long hpte_group, | ||
572 | unsigned long va, unsigned long prpn, | ||
573 | int secondary, unsigned long hpteflags, | ||
574 | int bolted, int large); | ||
575 | |||
576 | extern long native_hpte_insert(unsigned long hpte_group, unsigned long va, | ||
577 | unsigned long prpn, int secondary, | ||
578 | unsigned long hpteflags, int bolted, int large); | ||
579 | |||
580 | /* | 517 | /* |
581 | * find_linux_pte returns the address of a linux pte for a given | 518 | * find_linux_pte returns the address of a linux pte for a given |
582 | * effective address and directory. If not found, it returns zero. | 519 | * effective address and directory. If not found, it returns zero. |
diff --git a/include/asm-ppc64/processor.h b/include/asm-ppc64/processor.h index 0035efe2db2b..809c634ba1df 100644 --- a/include/asm-ppc64/processor.h +++ b/include/asm-ppc64/processor.h | |||
@@ -120,103 +120,18 @@ | |||
120 | 120 | ||
121 | /* Special Purpose Registers (SPRNs)*/ | 121 | /* Special Purpose Registers (SPRNs)*/ |
122 | 122 | ||
123 | #define SPRN_CDBCR 0x3D7 /* Cache Debug Control Register */ | ||
124 | #define SPRN_CTR 0x009 /* Count Register */ | 123 | #define SPRN_CTR 0x009 /* Count Register */ |
125 | #define SPRN_DABR 0x3F5 /* Data Address Breakpoint Register */ | 124 | #define SPRN_DABR 0x3F5 /* Data Address Breakpoint Register */ |
126 | #define SPRN_DAC1 0x3F6 /* Data Address Compare 1 */ | 125 | #define DABR_TRANSLATION (1UL << 2) |
127 | #define SPRN_DAC2 0x3F7 /* Data Address Compare 2 */ | ||
128 | #define SPRN_DAR 0x013 /* Data Address Register */ | 126 | #define SPRN_DAR 0x013 /* Data Address Register */ |
129 | #define SPRN_DBCR 0x3F2 /* Debug Control Regsiter */ | ||
130 | #define DBCR_EDM 0x80000000 | ||
131 | #define DBCR_IDM 0x40000000 | ||
132 | #define DBCR_RST(x) (((x) & 0x3) << 28) | ||
133 | #define DBCR_RST_NONE 0 | ||
134 | #define DBCR_RST_CORE 1 | ||
135 | #define DBCR_RST_CHIP 2 | ||
136 | #define DBCR_RST_SYSTEM 3 | ||
137 | #define DBCR_IC 0x08000000 /* Instruction Completion Debug Evnt */ | ||
138 | #define DBCR_BT 0x04000000 /* Branch Taken Debug Event */ | ||
139 | #define DBCR_EDE 0x02000000 /* Exception Debug Event */ | ||
140 | #define DBCR_TDE 0x01000000 /* TRAP Debug Event */ | ||
141 | #define DBCR_FER 0x00F80000 /* First Events Remaining Mask */ | ||
142 | #define DBCR_FT 0x00040000 /* Freeze Timers on Debug Event */ | ||
143 | #define DBCR_IA1 0x00020000 /* Instr. Addr. Compare 1 Enable */ | ||
144 | #define DBCR_IA2 0x00010000 /* Instr. Addr. Compare 2 Enable */ | ||
145 | #define DBCR_D1R 0x00008000 /* Data Addr. Compare 1 Read Enable */ | ||
146 | #define DBCR_D1W 0x00004000 /* Data Addr. Compare 1 Write Enable */ | ||
147 | #define DBCR_D1S(x) (((x) & 0x3) << 12) /* Data Adrr. Compare 1 Size */ | ||
148 | #define DAC_BYTE 0 | ||
149 | #define DAC_HALF 1 | ||
150 | #define DAC_WORD 2 | ||
151 | #define DAC_QUAD 3 | ||
152 | #define DBCR_D2R 0x00000800 /* Data Addr. Compare 2 Read Enable */ | ||
153 | #define DBCR_D2W 0x00000400 /* Data Addr. Compare 2 Write Enable */ | ||
154 | #define DBCR_D2S(x) (((x) & 0x3) << 8) /* Data Addr. Compare 2 Size */ | ||
155 | #define DBCR_SBT 0x00000040 /* Second Branch Taken Debug Event */ | ||
156 | #define DBCR_SED 0x00000020 /* Second Exception Debug Event */ | ||
157 | #define DBCR_STD 0x00000010 /* Second Trap Debug Event */ | ||
158 | #define DBCR_SIA 0x00000008 /* Second IAC Enable */ | ||
159 | #define DBCR_SDA 0x00000004 /* Second DAC Enable */ | ||
160 | #define DBCR_JOI 0x00000002 /* JTAG Serial Outbound Int. Enable */ | ||
161 | #define DBCR_JII 0x00000001 /* JTAG Serial Inbound Int. Enable */ | ||
162 | #define SPRN_DBCR0 0x3F2 /* Debug Control Register 0 */ | ||
163 | #define SPRN_DBCR1 0x3BD /* Debug Control Register 1 */ | ||
164 | #define SPRN_DBSR 0x3F0 /* Debug Status Register */ | ||
165 | #define SPRN_DCCR 0x3FA /* Data Cache Cacheability Register */ | ||
166 | #define DCCR_NOCACHE 0 /* Noncacheable */ | ||
167 | #define DCCR_CACHE 1 /* Cacheable */ | ||
168 | #define SPRN_DCMP 0x3D1 /* Data TLB Compare Register */ | ||
169 | #define SPRN_DCWR 0x3BA /* Data Cache Write-thru Register */ | ||
170 | #define DCWR_COPY 0 /* Copy-back */ | ||
171 | #define DCWR_WRITE 1 /* Write-through */ | ||
172 | #define SPRN_DEAR 0x3D5 /* Data Error Address Register */ | ||
173 | #define SPRN_DEC 0x016 /* Decrement Register */ | 127 | #define SPRN_DEC 0x016 /* Decrement Register */ |
174 | #define SPRN_DMISS 0x3D0 /* Data TLB Miss Register */ | ||
175 | #define SPRN_DSISR 0x012 /* Data Storage Interrupt Status Register */ | 128 | #define SPRN_DSISR 0x012 /* Data Storage Interrupt Status Register */ |
176 | #define DSISR_NOHPTE 0x40000000 /* no translation found */ | 129 | #define DSISR_NOHPTE 0x40000000 /* no translation found */ |
177 | #define DSISR_PROTFAULT 0x08000000 /* protection fault */ | 130 | #define DSISR_PROTFAULT 0x08000000 /* protection fault */ |
178 | #define DSISR_ISSTORE 0x02000000 /* access was a store */ | 131 | #define DSISR_ISSTORE 0x02000000 /* access was a store */ |
179 | #define DSISR_DABRMATCH 0x00400000 /* hit data breakpoint */ | 132 | #define DSISR_DABRMATCH 0x00400000 /* hit data breakpoint */ |
180 | #define DSISR_NOSEGMENT 0x00200000 /* STAB/SLB miss */ | 133 | #define DSISR_NOSEGMENT 0x00200000 /* STAB/SLB miss */ |
181 | #define SPRN_EAR 0x11A /* External Address Register */ | ||
182 | #define SPRN_ESR 0x3D4 /* Exception Syndrome Register */ | ||
183 | #define ESR_IMCP 0x80000000 /* Instr. Machine Check - Protection */ | ||
184 | #define ESR_IMCN 0x40000000 /* Instr. Machine Check - Non-config */ | ||
185 | #define ESR_IMCB 0x20000000 /* Instr. Machine Check - Bus error */ | ||
186 | #define ESR_IMCT 0x10000000 /* Instr. Machine Check - Timeout */ | ||
187 | #define ESR_PIL 0x08000000 /* Program Exception - Illegal */ | ||
188 | #define ESR_PPR 0x04000000 /* Program Exception - Priveleged */ | ||
189 | #define ESR_PTR 0x02000000 /* Program Exception - Trap */ | ||
190 | #define ESR_DST 0x00800000 /* Storage Exception - Data miss */ | ||
191 | #define ESR_DIZ 0x00400000 /* Storage Exception - Zone fault */ | ||
192 | #define SPRN_EVPR 0x3D6 /* Exception Vector Prefix Register */ | ||
193 | #define SPRN_HASH1 0x3D2 /* Primary Hash Address Register */ | ||
194 | #define SPRN_HASH2 0x3D3 /* Secondary Hash Address Resgister */ | ||
195 | #define SPRN_HID0 0x3F0 /* Hardware Implementation Register 0 */ | 134 | #define SPRN_HID0 0x3F0 /* Hardware Implementation Register 0 */ |
196 | #define HID0_EMCP (1<<31) /* Enable Machine Check pin */ | ||
197 | #define HID0_EBA (1<<29) /* Enable Bus Address Parity */ | ||
198 | #define HID0_EBD (1<<28) /* Enable Bus Data Parity */ | ||
199 | #define HID0_SBCLK (1<<27) | ||
200 | #define HID0_EICE (1<<26) | ||
201 | #define HID0_ECLK (1<<25) | ||
202 | #define HID0_PAR (1<<24) | ||
203 | #define HID0_DOZE (1<<23) | ||
204 | #define HID0_NAP (1<<22) | ||
205 | #define HID0_SLEEP (1<<21) | ||
206 | #define HID0_DPM (1<<20) | ||
207 | #define HID0_ICE (1<<15) /* Instruction Cache Enable */ | ||
208 | #define HID0_DCE (1<<14) /* Data Cache Enable */ | ||
209 | #define HID0_ILOCK (1<<13) /* Instruction Cache Lock */ | ||
210 | #define HID0_DLOCK (1<<12) /* Data Cache Lock */ | ||
211 | #define HID0_ICFI (1<<11) /* Instr. Cache Flash Invalidate */ | ||
212 | #define HID0_DCI (1<<10) /* Data Cache Invalidate */ | ||
213 | #define HID0_SPD (1<<9) /* Speculative disable */ | ||
214 | #define HID0_SGE (1<<7) /* Store Gathering Enable */ | ||
215 | #define HID0_SIED (1<<7) /* Serial Instr. Execution [Disable] */ | ||
216 | #define HID0_BTIC (1<<5) /* Branch Target Instruction Cache Enable */ | ||
217 | #define HID0_ABE (1<<3) /* Address Broadcast Enable */ | ||
218 | #define HID0_BHTE (1<<2) /* Branch History Table Enable */ | ||
219 | #define HID0_BTCD (1<<1) /* Branch target cache disable */ | ||
220 | #define SPRN_MSRDORM 0x3F1 /* Hardware Implementation Register 1 */ | 135 | #define SPRN_MSRDORM 0x3F1 /* Hardware Implementation Register 1 */ |
221 | #define SPRN_HID1 0x3F1 /* Hardware Implementation Register 1 */ | 136 | #define SPRN_HID1 0x3F1 /* Hardware Implementation Register 1 */ |
222 | #define SPRN_IABR 0x3F2 /* Instruction Address Breakpoint Register */ | 137 | #define SPRN_IABR 0x3F2 /* Instruction Address Breakpoint Register */ |
@@ -225,23 +140,8 @@ | |||
225 | #define SPRN_HID5 0x3F6 /* 970 HID5 */ | 140 | #define SPRN_HID5 0x3F6 /* 970 HID5 */ |
226 | #define SPRN_TSC 0x3FD /* Thread switch control */ | 141 | #define SPRN_TSC 0x3FD /* Thread switch control */ |
227 | #define SPRN_TST 0x3FC /* Thread switch timeout */ | 142 | #define SPRN_TST 0x3FC /* Thread switch timeout */ |
228 | #define SPRN_IAC1 0x3F4 /* Instruction Address Compare 1 */ | ||
229 | #define SPRN_IAC2 0x3F5 /* Instruction Address Compare 2 */ | ||
230 | #define SPRN_ICCR 0x3FB /* Instruction Cache Cacheability Register */ | ||
231 | #define ICCR_NOCACHE 0 /* Noncacheable */ | ||
232 | #define ICCR_CACHE 1 /* Cacheable */ | ||
233 | #define SPRN_ICDBDR 0x3D3 /* Instruction Cache Debug Data Register */ | ||
234 | #define SPRN_ICMP 0x3D5 /* Instruction TLB Compare Register */ | ||
235 | #define SPRN_ICTC 0x3FB /* Instruction Cache Throttling Control Reg */ | ||
236 | #define SPRN_IMISS 0x3D4 /* Instruction TLB Miss Register */ | ||
237 | #define SPRN_IMMR 0x27E /* Internal Memory Map Register */ | ||
238 | #define SPRN_L2CR 0x3F9 /* Level 2 Cache Control Regsiter */ | 143 | #define SPRN_L2CR 0x3F9 /* Level 2 Cache Control Regsiter */ |
239 | #define SPRN_LR 0x008 /* Link Register */ | 144 | #define SPRN_LR 0x008 /* Link Register */ |
240 | #define SPRN_PBL1 0x3FC /* Protection Bound Lower 1 */ | ||
241 | #define SPRN_PBL2 0x3FE /* Protection Bound Lower 2 */ | ||
242 | #define SPRN_PBU1 0x3FD /* Protection Bound Upper 1 */ | ||
243 | #define SPRN_PBU2 0x3FF /* Protection Bound Upper 2 */ | ||
244 | #define SPRN_PID 0x3B1 /* Process ID */ | ||
245 | #define SPRN_PIR 0x3FF /* Processor Identification Register */ | 145 | #define SPRN_PIR 0x3FF /* Processor Identification Register */ |
246 | #define SPRN_PIT 0x3DB /* Programmable Interval Timer */ | 146 | #define SPRN_PIT 0x3DB /* Programmable Interval Timer */ |
247 | #define SPRN_PURR 0x135 /* Processor Utilization of Resources Register */ | 147 | #define SPRN_PURR 0x135 /* Processor Utilization of Resources Register */ |
@@ -249,9 +149,6 @@ | |||
249 | #define SPRN_RPA 0x3D6 /* Required Physical Address Register */ | 149 | #define SPRN_RPA 0x3D6 /* Required Physical Address Register */ |
250 | #define SPRN_SDA 0x3BF /* Sampled Data Address Register */ | 150 | #define SPRN_SDA 0x3BF /* Sampled Data Address Register */ |
251 | #define SPRN_SDR1 0x019 /* MMU Hash Base Register */ | 151 | #define SPRN_SDR1 0x019 /* MMU Hash Base Register */ |
252 | #define SPRN_SGR 0x3B9 /* Storage Guarded Register */ | ||
253 | #define SGR_NORMAL 0 | ||
254 | #define SGR_GUARDED 1 | ||
255 | #define SPRN_SIA 0x3BB /* Sampled Instruction Address Register */ | 152 | #define SPRN_SIA 0x3BB /* Sampled Instruction Address Register */ |
256 | #define SPRN_SPRG0 0x110 /* Special Purpose Register General 0 */ | 153 | #define SPRN_SPRG0 0x110 /* Special Purpose Register General 0 */ |
257 | #define SPRN_SPRG1 0x111 /* Special Purpose Register General 1 */ | 154 | #define SPRN_SPRG1 0x111 /* Special Purpose Register General 1 */ |
@@ -264,50 +161,12 @@ | |||
264 | #define SPRN_TBWL 0x11C /* Time Base Lower Register (super, W/O) */ | 161 | #define SPRN_TBWL 0x11C /* Time Base Lower Register (super, W/O) */ |
265 | #define SPRN_TBWU 0x11D /* Time Base Write Upper Register (super, W/O) */ | 162 | #define SPRN_TBWU 0x11D /* Time Base Write Upper Register (super, W/O) */ |
266 | #define SPRN_HIOR 0x137 /* 970 Hypervisor interrupt offset */ | 163 | #define SPRN_HIOR 0x137 /* 970 Hypervisor interrupt offset */ |
267 | #define SPRN_TCR 0x3DA /* Timer Control Register */ | ||
268 | #define TCR_WP(x) (((x)&0x3)<<30) /* WDT Period */ | ||
269 | #define WP_2_17 0 /* 2^17 clocks */ | ||
270 | #define WP_2_21 1 /* 2^21 clocks */ | ||
271 | #define WP_2_25 2 /* 2^25 clocks */ | ||
272 | #define WP_2_29 3 /* 2^29 clocks */ | ||
273 | #define TCR_WRC(x) (((x)&0x3)<<28) /* WDT Reset Control */ | ||
274 | #define WRC_NONE 0 /* No reset will occur */ | ||
275 | #define WRC_CORE 1 /* Core reset will occur */ | ||
276 | #define WRC_CHIP 2 /* Chip reset will occur */ | ||
277 | #define WRC_SYSTEM 3 /* System reset will occur */ | ||
278 | #define TCR_WIE 0x08000000 /* WDT Interrupt Enable */ | ||
279 | #define TCR_PIE 0x04000000 /* PIT Interrupt Enable */ | ||
280 | #define TCR_FP(x) (((x)&0x3)<<24) /* FIT Period */ | ||
281 | #define FP_2_9 0 /* 2^9 clocks */ | ||
282 | #define FP_2_13 1 /* 2^13 clocks */ | ||
283 | #define FP_2_17 2 /* 2^17 clocks */ | ||
284 | #define FP_2_21 3 /* 2^21 clocks */ | ||
285 | #define TCR_FIE 0x00800000 /* FIT Interrupt Enable */ | ||
286 | #define TCR_ARE 0x00400000 /* Auto Reload Enable */ | ||
287 | #define SPRN_THRM1 0x3FC /* Thermal Management Register 1 */ | ||
288 | #define THRM1_TIN (1<<0) | ||
289 | #define THRM1_TIV (1<<1) | ||
290 | #define THRM1_THRES (0x7f<<2) | ||
291 | #define THRM1_TID (1<<29) | ||
292 | #define THRM1_TIE (1<<30) | ||
293 | #define THRM1_V (1<<31) | ||
294 | #define SPRN_THRM2 0x3FD /* Thermal Management Register 2 */ | ||
295 | #define SPRN_THRM3 0x3FE /* Thermal Management Register 3 */ | ||
296 | #define THRM3_E (1<<31) | ||
297 | #define SPRN_TSR 0x3D8 /* Timer Status Register */ | ||
298 | #define TSR_ENW 0x80000000 /* Enable Next Watchdog */ | ||
299 | #define TSR_WIS 0x40000000 /* WDT Interrupt Status */ | ||
300 | #define TSR_WRS(x) (((x)&0x3)<<28) /* WDT Reset Status */ | ||
301 | #define WRS_NONE 0 /* No WDT reset occurred */ | ||
302 | #define WRS_CORE 1 /* WDT forced core reset */ | ||
303 | #define WRS_CHIP 2 /* WDT forced chip reset */ | ||
304 | #define WRS_SYSTEM 3 /* WDT forced system reset */ | ||
305 | #define TSR_PIS 0x08000000 /* PIT Interrupt Status */ | ||
306 | #define TSR_FIS 0x04000000 /* FIT Interrupt Status */ | ||
307 | #define SPRN_USIA 0x3AB /* User Sampled Instruction Address Register */ | 164 | #define SPRN_USIA 0x3AB /* User Sampled Instruction Address Register */ |
308 | #define SPRN_XER 0x001 /* Fixed Point Exception Register */ | 165 | #define SPRN_XER 0x001 /* Fixed Point Exception Register */ |
309 | #define SPRN_ZPR 0x3B0 /* Zone Protection Register */ | ||
310 | #define SPRN_VRSAVE 0x100 /* Vector save */ | 166 | #define SPRN_VRSAVE 0x100 /* Vector save */ |
167 | #define SPRN_CTRLF 0x088 | ||
168 | #define SPRN_CTRLT 0x098 | ||
169 | #define CTRL_RUNLATCH 0x1 | ||
311 | 170 | ||
312 | /* Performance monitor SPRs */ | 171 | /* Performance monitor SPRs */ |
313 | #define SPRN_SIAR 780 | 172 | #define SPRN_SIAR 780 |
@@ -352,28 +211,19 @@ | |||
352 | #define CTR SPRN_CTR /* Counter Register */ | 211 | #define CTR SPRN_CTR /* Counter Register */ |
353 | #define DAR SPRN_DAR /* Data Address Register */ | 212 | #define DAR SPRN_DAR /* Data Address Register */ |
354 | #define DABR SPRN_DABR /* Data Address Breakpoint Register */ | 213 | #define DABR SPRN_DABR /* Data Address Breakpoint Register */ |
355 | #define DCMP SPRN_DCMP /* Data TLB Compare Register */ | ||
356 | #define DEC SPRN_DEC /* Decrement Register */ | 214 | #define DEC SPRN_DEC /* Decrement Register */ |
357 | #define DMISS SPRN_DMISS /* Data TLB Miss Register */ | ||
358 | #define DSISR SPRN_DSISR /* Data Storage Interrupt Status Register */ | 215 | #define DSISR SPRN_DSISR /* Data Storage Interrupt Status Register */ |
359 | #define EAR SPRN_EAR /* External Address Register */ | ||
360 | #define HASH1 SPRN_HASH1 /* Primary Hash Address Register */ | ||
361 | #define HASH2 SPRN_HASH2 /* Secondary Hash Address Register */ | ||
362 | #define HID0 SPRN_HID0 /* Hardware Implementation Register 0 */ | 216 | #define HID0 SPRN_HID0 /* Hardware Implementation Register 0 */ |
363 | #define MSRDORM SPRN_MSRDORM /* MSR Dormant Register */ | 217 | #define MSRDORM SPRN_MSRDORM /* MSR Dormant Register */ |
364 | #define NIADORM SPRN_NIADORM /* NIA Dormant Register */ | 218 | #define NIADORM SPRN_NIADORM /* NIA Dormant Register */ |
365 | #define TSC SPRN_TSC /* Thread switch control */ | 219 | #define TSC SPRN_TSC /* Thread switch control */ |
366 | #define TST SPRN_TST /* Thread switch timeout */ | 220 | #define TST SPRN_TST /* Thread switch timeout */ |
367 | #define IABR SPRN_IABR /* Instruction Address Breakpoint Register */ | 221 | #define IABR SPRN_IABR /* Instruction Address Breakpoint Register */ |
368 | #define ICMP SPRN_ICMP /* Instruction TLB Compare Register */ | ||
369 | #define IMISS SPRN_IMISS /* Instruction TLB Miss Register */ | ||
370 | #define IMMR SPRN_IMMR /* PPC 860/821 Internal Memory Map Register */ | ||
371 | #define L2CR SPRN_L2CR /* PPC 750 L2 control register */ | 222 | #define L2CR SPRN_L2CR /* PPC 750 L2 control register */ |
372 | #define __LR SPRN_LR | 223 | #define __LR SPRN_LR |
373 | #define PVR SPRN_PVR /* Processor Version */ | 224 | #define PVR SPRN_PVR /* Processor Version */ |
374 | #define PIR SPRN_PIR /* Processor ID */ | 225 | #define PIR SPRN_PIR /* Processor ID */ |
375 | #define PURR SPRN_PURR /* Processor Utilization of Resource Register */ | 226 | #define PURR SPRN_PURR /* Processor Utilization of Resource Register */ |
376 | //#define RPA SPRN_RPA /* Required Physical Address Register */ | ||
377 | #define SDR1 SPRN_SDR1 /* MMU hash base register */ | 227 | #define SDR1 SPRN_SDR1 /* MMU hash base register */ |
378 | #define SPR0 SPRN_SPRG0 /* Supervisor Private Registers */ | 228 | #define SPR0 SPRN_SPRG0 /* Supervisor Private Registers */ |
379 | #define SPR1 SPRN_SPRG1 | 229 | #define SPR1 SPRN_SPRG1 |
@@ -389,10 +239,6 @@ | |||
389 | #define TBRU SPRN_TBRU /* Time Base Read Upper Register */ | 239 | #define TBRU SPRN_TBRU /* Time Base Read Upper Register */ |
390 | #define TBWL SPRN_TBWL /* Time Base Write Lower Register */ | 240 | #define TBWL SPRN_TBWL /* Time Base Write Lower Register */ |
391 | #define TBWU SPRN_TBWU /* Time Base Write Upper Register */ | 241 | #define TBWU SPRN_TBWU /* Time Base Write Upper Register */ |
392 | #define ICTC 1019 | ||
393 | #define THRM1 SPRN_THRM1 /* Thermal Management Register 1 */ | ||
394 | #define THRM2 SPRN_THRM2 /* Thermal Management Register 2 */ | ||
395 | #define THRM3 SPRN_THRM3 /* Thermal Management Register 3 */ | ||
396 | #define XER SPRN_XER | 242 | #define XER SPRN_XER |
397 | 243 | ||
398 | /* Processor Version Register (PVR) field extraction */ | 244 | /* Processor Version Register (PVR) field extraction */ |
@@ -436,12 +282,6 @@ | |||
436 | #define XGLUE(a,b) a##b | 282 | #define XGLUE(a,b) a##b |
437 | #define GLUE(a,b) XGLUE(a,b) | 283 | #define GLUE(a,b) XGLUE(a,b) |
438 | 284 | ||
439 | /* iSeries CTRL register (for runlatch) */ | ||
440 | |||
441 | #define CTRLT 0x098 | ||
442 | #define CTRLF 0x088 | ||
443 | #define RUNLATCH 0x0001 | ||
444 | |||
445 | #ifdef __ASSEMBLY__ | 285 | #ifdef __ASSEMBLY__ |
446 | 286 | ||
447 | #define _GLOBAL(name) \ | 287 | #define _GLOBAL(name) \ |
@@ -656,6 +496,24 @@ static inline void prefetchw(const void *x) | |||
656 | 496 | ||
657 | #define HAVE_ARCH_PICK_MMAP_LAYOUT | 497 | #define HAVE_ARCH_PICK_MMAP_LAYOUT |
658 | 498 | ||
499 | static inline void ppc64_runlatch_on(void) | ||
500 | { | ||
501 | unsigned long ctrl; | ||
502 | |||
503 | ctrl = mfspr(SPRN_CTRLF); | ||
504 | ctrl |= CTRL_RUNLATCH; | ||
505 | mtspr(SPRN_CTRLT, ctrl); | ||
506 | } | ||
507 | |||
508 | static inline void ppc64_runlatch_off(void) | ||
509 | { | ||
510 | unsigned long ctrl; | ||
511 | |||
512 | ctrl = mfspr(SPRN_CTRLF); | ||
513 | ctrl &= ~CTRL_RUNLATCH; | ||
514 | mtspr(SPRN_CTRLT, ctrl); | ||
515 | } | ||
516 | |||
659 | #endif /* __KERNEL__ */ | 517 | #endif /* __KERNEL__ */ |
660 | 518 | ||
661 | #endif /* __ASSEMBLY__ */ | 519 | #endif /* __ASSEMBLY__ */ |
diff --git a/include/asm-ppc64/prom.h b/include/asm-ppc64/prom.h index 2440a2c90ae9..04b1a84f7ca3 100644 --- a/include/asm-ppc64/prom.h +++ b/include/asm-ppc64/prom.h | |||
@@ -147,9 +147,7 @@ struct device_node { | |||
147 | struct device_node *sibling; | 147 | struct device_node *sibling; |
148 | struct device_node *next; /* next device of same type */ | 148 | struct device_node *next; /* next device of same type */ |
149 | struct device_node *allnext; /* next in list of all nodes */ | 149 | struct device_node *allnext; /* next in list of all nodes */ |
150 | struct proc_dir_entry *pde; /* this node's proc directory */ | 150 | struct proc_dir_entry *pde; /* this node's proc directory */ |
151 | struct proc_dir_entry *name_link; /* name symlink */ | ||
152 | struct proc_dir_entry *addr_link; /* addr symlink */ | ||
153 | struct kref kref; | 151 | struct kref kref; |
154 | unsigned long _flags; | 152 | unsigned long _flags; |
155 | }; | 153 | }; |
@@ -174,15 +172,6 @@ static inline void set_node_proc_entry(struct device_node *dn, struct proc_dir_e | |||
174 | dn->pde = de; | 172 | dn->pde = de; |
175 | } | 173 | } |
176 | 174 | ||
177 | static void inline set_node_name_link(struct device_node *dn, struct proc_dir_entry *de) | ||
178 | { | ||
179 | dn->name_link = de; | ||
180 | } | ||
181 | |||
182 | static void inline set_node_addr_link(struct device_node *dn, struct proc_dir_entry *de) | ||
183 | { | ||
184 | dn->addr_link = de; | ||
185 | } | ||
186 | 175 | ||
187 | /* OBSOLETE: Old stlye node lookup */ | 176 | /* OBSOLETE: Old stlye node lookup */ |
188 | extern struct device_node *find_devices(const char *name); | 177 | extern struct device_node *find_devices(const char *name); |
diff --git a/include/asm-ppc64/signal.h b/include/asm-ppc64/signal.h index a2d7bbb4befd..432df7dd355d 100644 --- a/include/asm-ppc64/signal.h +++ b/include/asm-ppc64/signal.h | |||
@@ -97,33 +97,19 @@ typedef struct { | |||
97 | #define MINSIGSTKSZ 2048 | 97 | #define MINSIGSTKSZ 2048 |
98 | #define SIGSTKSZ 8192 | 98 | #define SIGSTKSZ 8192 |
99 | 99 | ||
100 | #define SIG_BLOCK 0 /* for blocking signals */ | 100 | #include <asm-generic/signal.h> |
101 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | ||
102 | #define SIG_SETMASK 2 /* for setting the signal mask */ | ||
103 | |||
104 | /* Type of a signal handler. */ | ||
105 | typedef void __sigfunction(int); | ||
106 | typedef __sigfunction __user * __sighandler_t; | ||
107 | |||
108 | /* Type of the restorer function */ | ||
109 | typedef void __sigrestorer(void); | ||
110 | typedef __sigrestorer __user * __sigrestorer_t; | ||
111 | |||
112 | #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ | ||
113 | #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ | ||
114 | #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ | ||
115 | 101 | ||
116 | struct old_sigaction { | 102 | struct old_sigaction { |
117 | __sighandler_t sa_handler; | 103 | __sighandler_t sa_handler; |
118 | old_sigset_t sa_mask; | 104 | old_sigset_t sa_mask; |
119 | unsigned long sa_flags; | 105 | unsigned long sa_flags; |
120 | __sigrestorer_t sa_restorer; | 106 | __sigrestore_t sa_restorer; |
121 | }; | 107 | }; |
122 | 108 | ||
123 | struct sigaction { | 109 | struct sigaction { |
124 | __sighandler_t sa_handler; | 110 | __sighandler_t sa_handler; |
125 | unsigned long sa_flags; | 111 | unsigned long sa_flags; |
126 | __sigrestorer_t sa_restorer; | 112 | __sigrestore_t sa_restorer; |
127 | sigset_t sa_mask; /* mask last for extensibility */ | 113 | sigset_t sa_mask; /* mask last for extensibility */ |
128 | }; | 114 | }; |
129 | 115 | ||
diff --git a/include/asm-ppc64/thread_info.h b/include/asm-ppc64/thread_info.h index 037b5e06083c..48b7900e90ec 100644 --- a/include/asm-ppc64/thread_info.h +++ b/include/asm-ppc64/thread_info.h | |||
@@ -96,7 +96,7 @@ static inline struct thread_info *current_thread_info(void) | |||
96 | #define TIF_POLLING_NRFLAG 4 /* true if poll_idle() is polling | 96 | #define TIF_POLLING_NRFLAG 4 /* true if poll_idle() is polling |
97 | TIF_NEED_RESCHED */ | 97 | TIF_NEED_RESCHED */ |
98 | #define TIF_32BIT 5 /* 32 bit binary */ | 98 | #define TIF_32BIT 5 /* 32 bit binary */ |
99 | #define TIF_RUN_LIGHT 6 /* iSeries run light */ | 99 | /* #define SPARE 6 */ |
100 | #define TIF_ABI_PENDING 7 /* 32/64 bit switch needed */ | 100 | #define TIF_ABI_PENDING 7 /* 32/64 bit switch needed */ |
101 | #define TIF_SYSCALL_AUDIT 8 /* syscall auditing active */ | 101 | #define TIF_SYSCALL_AUDIT 8 /* syscall auditing active */ |
102 | #define TIF_SINGLESTEP 9 /* singlestepping active */ | 102 | #define TIF_SINGLESTEP 9 /* singlestepping active */ |
@@ -110,7 +110,7 @@ static inline struct thread_info *current_thread_info(void) | |||
110 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 110 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
111 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 111 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
112 | #define _TIF_32BIT (1<<TIF_32BIT) | 112 | #define _TIF_32BIT (1<<TIF_32BIT) |
113 | #define _TIF_RUN_LIGHT (1<<TIF_RUN_LIGHT) | 113 | /* #define _SPARE (1<<SPARE) */ |
114 | #define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING) | 114 | #define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING) |
115 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) | 115 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) |
116 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) | 116 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) |
diff --git a/include/asm-ppc64/xics.h b/include/asm-ppc64/xics.h index 0027da4364ac..fdec5e7a7af6 100644 --- a/include/asm-ppc64/xics.h +++ b/include/asm-ppc64/xics.h | |||
@@ -30,7 +30,4 @@ struct xics_ipi_struct { | |||
30 | 30 | ||
31 | extern struct xics_ipi_struct xics_ipi_message[NR_CPUS] __cacheline_aligned; | 31 | extern struct xics_ipi_struct xics_ipi_message[NR_CPUS] __cacheline_aligned; |
32 | 32 | ||
33 | extern unsigned int default_distrib_server; | ||
34 | extern unsigned int interrupt_server_size; | ||
35 | |||
36 | #endif /* _PPC64_KERNEL_XICS_H */ | 33 | #endif /* _PPC64_KERNEL_XICS_H */ |
diff --git a/include/asm-s390/signal.h b/include/asm-s390/signal.h index bfed83a818cc..3d6e11c6c1fd 100644 --- a/include/asm-s390/signal.h +++ b/include/asm-s390/signal.h | |||
@@ -117,16 +117,7 @@ typedef unsigned long sigset_t; | |||
117 | #define MINSIGSTKSZ 2048 | 117 | #define MINSIGSTKSZ 2048 |
118 | #define SIGSTKSZ 8192 | 118 | #define SIGSTKSZ 8192 |
119 | 119 | ||
120 | #define SIG_BLOCK 0 /* for blocking signals */ | 120 | #include <asm-generic/signal.h> |
121 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | ||
122 | #define SIG_SETMASK 2 /* for setting the signal mask */ | ||
123 | |||
124 | /* Type of a signal handler. */ | ||
125 | typedef void (*__sighandler_t)(int); | ||
126 | |||
127 | #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ | ||
128 | #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ | ||
129 | #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ | ||
130 | 121 | ||
131 | #ifdef __KERNEL__ | 122 | #ifdef __KERNEL__ |
132 | struct old_sigaction { | 123 | struct old_sigaction { |
diff --git a/include/asm-s390/user.h b/include/asm-s390/user.h index c64f8c181df3..1dc74baf03c4 100644 --- a/include/asm-s390/user.h +++ b/include/asm-s390/user.h | |||
@@ -10,7 +10,7 @@ | |||
10 | #define _S390_USER_H | 10 | #define _S390_USER_H |
11 | 11 | ||
12 | #include <asm/page.h> | 12 | #include <asm/page.h> |
13 | #include <linux/ptrace.h> | 13 | #include <asm/ptrace.h> |
14 | /* Core file format: The core file is written in such a way that gdb | 14 | /* Core file format: The core file is written in such a way that gdb |
15 | can understand it and provide useful information to the user (under | 15 | can understand it and provide useful information to the user (under |
16 | linux we use the 'trad-core' bfd). There are quite a number of | 16 | linux we use the 'trad-core' bfd). There are quite a number of |
diff --git a/include/asm-sh/floppy.h b/include/asm-sh/floppy.h index f030ca08052b..38d7a2942476 100644 --- a/include/asm-sh/floppy.h +++ b/include/asm-sh/floppy.h | |||
@@ -227,7 +227,7 @@ static int hard_dma_setup(char *addr, unsigned long size, int mode, int io) | |||
227 | return 0; | 227 | return 0; |
228 | } | 228 | } |
229 | 229 | ||
230 | struct fd_routine_l { | 230 | static struct fd_routine_l { |
231 | int (*_request_dma)(unsigned int dmanr, const char * device_id); | 231 | int (*_request_dma)(unsigned int dmanr, const char * device_id); |
232 | void (*_free_dma)(unsigned int dmanr); | 232 | void (*_free_dma)(unsigned int dmanr); |
233 | int (*_get_dma_residue)(unsigned int dummy); | 233 | int (*_get_dma_residue)(unsigned int dummy); |
diff --git a/include/asm-sh/signal.h b/include/asm-sh/signal.h index 29f1ac1bf4df..d6e8eb0e65c7 100644 --- a/include/asm-sh/signal.h +++ b/include/asm-sh/signal.h | |||
@@ -108,16 +108,7 @@ typedef unsigned long sigset_t; | |||
108 | #define MINSIGSTKSZ 2048 | 108 | #define MINSIGSTKSZ 2048 |
109 | #define SIGSTKSZ 8192 | 109 | #define SIGSTKSZ 8192 |
110 | 110 | ||
111 | #define SIG_BLOCK 0 /* for blocking signals */ | 111 | #include <asm-generic/signal.h> |
112 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | ||
113 | #define SIG_SETMASK 2 /* for setting the signal mask */ | ||
114 | |||
115 | /* Type of a signal handler. */ | ||
116 | typedef void (*__sighandler_t)(int); | ||
117 | |||
118 | #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ | ||
119 | #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ | ||
120 | #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ | ||
121 | 112 | ||
122 | #ifdef __KERNEL__ | 113 | #ifdef __KERNEL__ |
123 | struct old_sigaction { | 114 | struct old_sigaction { |
diff --git a/include/asm-sh/thread_info.h b/include/asm-sh/thread_info.h index d82f883d8e6d..4bbbd9f3c37e 100644 --- a/include/asm-sh/thread_info.h +++ b/include/asm-sh/thread_info.h | |||
@@ -27,7 +27,7 @@ struct thread_info { | |||
27 | 27 | ||
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | #define PREEMPT_ACTIVE 0x4000000 | 30 | #define PREEMPT_ACTIVE 0x10000000 |
31 | 31 | ||
32 | /* | 32 | /* |
33 | * macros/functions for gaining access to the thread information structure | 33 | * macros/functions for gaining access to the thread information structure |
diff --git a/include/asm-sh64/signal.h b/include/asm-sh64/signal.h index 864c94ecc98c..2400dc688a65 100644 --- a/include/asm-sh64/signal.h +++ b/include/asm-sh64/signal.h | |||
@@ -107,16 +107,7 @@ typedef struct { | |||
107 | #define MINSIGSTKSZ 2048 | 107 | #define MINSIGSTKSZ 2048 |
108 | #define SIGSTKSZ THREAD_SIZE | 108 | #define SIGSTKSZ THREAD_SIZE |
109 | 109 | ||
110 | #define SIG_BLOCK 0 /* for blocking signals */ | 110 | #include <asm-generic/signal.h> |
111 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | ||
112 | #define SIG_SETMASK 2 /* for setting the signal mask */ | ||
113 | |||
114 | /* Type of a signal handler. */ | ||
115 | typedef void (*__sighandler_t)(int); | ||
116 | |||
117 | #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ | ||
118 | #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ | ||
119 | #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ | ||
120 | 111 | ||
121 | #ifdef __KERNEL__ | 112 | #ifdef __KERNEL__ |
122 | struct old_sigaction { | 113 | struct old_sigaction { |
diff --git a/include/asm-sh64/thread_info.h b/include/asm-sh64/thread_info.h index e65f394da472..8a32d6bd0b79 100644 --- a/include/asm-sh64/thread_info.h +++ b/include/asm-sh64/thread_info.h | |||
@@ -73,7 +73,7 @@ static inline struct thread_info *current_thread_info(void) | |||
73 | 73 | ||
74 | #define THREAD_SIZE 8192 | 74 | #define THREAD_SIZE 8192 |
75 | 75 | ||
76 | #define PREEMPT_ACTIVE 0x4000000 | 76 | #define PREEMPT_ACTIVE 0x10000000 |
77 | 77 | ||
78 | /* thread information flags */ | 78 | /* thread information flags */ |
79 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 79 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
diff --git a/include/asm-sparc/floppy.h b/include/asm-sparc/floppy.h index 780ee7ff9dc3..caf926116506 100644 --- a/include/asm-sparc/floppy.h +++ b/include/asm-sparc/floppy.h | |||
@@ -227,7 +227,7 @@ static __inline__ void sun_fd_disable_dma(void) | |||
227 | doing_pdma = 0; | 227 | doing_pdma = 0; |
228 | if (pdma_base) { | 228 | if (pdma_base) { |
229 | mmu_unlockarea(pdma_base, pdma_areasize); | 229 | mmu_unlockarea(pdma_base, pdma_areasize); |
230 | pdma_base = 0; | 230 | pdma_base = NULL; |
231 | } | 231 | } |
232 | } | 232 | } |
233 | 233 | ||
diff --git a/include/asm-sparc/signal.h b/include/asm-sparc/signal.h index f792e10e704f..aa9960ad0ca9 100644 --- a/include/asm-sparc/signal.h +++ b/include/asm-sparc/signal.h | |||
@@ -174,16 +174,7 @@ struct sigstack { | |||
174 | #define SA_STATIC_ALLOC 0x80 | 174 | #define SA_STATIC_ALLOC 0x80 |
175 | #endif | 175 | #endif |
176 | 176 | ||
177 | /* Type of a signal handler. */ | 177 | #include <asm-generic/signal.h> |
178 | #ifdef __KERNEL__ | ||
179 | typedef void (*__sighandler_t)(int, int, struct sigcontext *, char *); | ||
180 | #else | ||
181 | typedef void (*__sighandler_t)(int); | ||
182 | #endif | ||
183 | |||
184 | #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ | ||
185 | #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ | ||
186 | #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ | ||
187 | 178 | ||
188 | #ifdef __KERNEL__ | 179 | #ifdef __KERNEL__ |
189 | struct __new_sigaction { | 180 | struct __new_sigaction { |
diff --git a/include/asm-sparc/uaccess.h b/include/asm-sparc/uaccess.h index f461144067ee..0a780e84a12b 100644 --- a/include/asm-sparc/uaccess.h +++ b/include/asm-sparc/uaccess.h | |||
@@ -41,10 +41,11 @@ | |||
41 | * No one can read/write anything from userland in the kernel space by setting | 41 | * No one can read/write anything from userland in the kernel space by setting |
42 | * large size and address near to PAGE_OFFSET - a fault will break his intentions. | 42 | * large size and address near to PAGE_OFFSET - a fault will break his intentions. |
43 | */ | 43 | */ |
44 | #define __user_ok(addr,size) ((addr) < STACK_TOP) | 44 | #define __user_ok(addr, size) ({ (void)(size); (addr) < STACK_TOP; }) |
45 | #define __kernel_ok (segment_eq(get_fs(), KERNEL_DS)) | 45 | #define __kernel_ok (segment_eq(get_fs(), KERNEL_DS)) |
46 | #define __access_ok(addr,size) (__user_ok((addr) & get_fs().seg,(size))) | 46 | #define __access_ok(addr,size) (__user_ok((addr) & get_fs().seg,(size))) |
47 | #define access_ok(type,addr,size) __access_ok((unsigned long)(addr),(size)) | 47 | #define access_ok(type, addr, size) \ |
48 | ({ (void)(type); __access_ok((unsigned long)(addr), size); }) | ||
48 | 49 | ||
49 | /* this function will go away soon - use access_ok() instead */ | 50 | /* this function will go away soon - use access_ok() instead */ |
50 | static inline int __deprecated verify_area(int type, const void __user * addr, unsigned long size) | 51 | static inline int __deprecated verify_area(int type, const void __user * addr, unsigned long size) |
diff --git a/include/asm-sparc64/agp.h b/include/asm-sparc64/agp.h index ba05bdf9a211..58f8cb6ae767 100644 --- a/include/asm-sparc64/agp.h +++ b/include/asm-sparc64/agp.h | |||
@@ -8,4 +8,14 @@ | |||
8 | #define flush_agp_mappings() | 8 | #define flush_agp_mappings() |
9 | #define flush_agp_cache() mb() | 9 | #define flush_agp_cache() mb() |
10 | 10 | ||
11 | /* Convert a physical address to an address suitable for the GART. */ | ||
12 | #define phys_to_gart(x) (x) | ||
13 | #define gart_to_phys(x) (x) | ||
14 | |||
15 | /* GATT allocation. Returns/accepts GATT kernel virtual address. */ | ||
16 | #define alloc_gatt_pages(order) \ | ||
17 | ((char *)__get_free_pages(GFP_KERNEL, (order))) | ||
18 | #define free_gatt_pages(table, order) \ | ||
19 | free_pages((unsigned long)(table), (order)) | ||
20 | |||
11 | #endif | 21 | #endif |
diff --git a/include/asm-sparc64/iommu.h b/include/asm-sparc64/iommu.h index 5fd16e42a045..0de7a3da79cd 100644 --- a/include/asm-sparc64/iommu.h +++ b/include/asm-sparc64/iommu.h | |||
@@ -16,4 +16,6 @@ | |||
16 | #define IOPTE_CACHE 0x0000000000000010UL /* Cached (in UPA E-cache) */ | 16 | #define IOPTE_CACHE 0x0000000000000010UL /* Cached (in UPA E-cache) */ |
17 | #define IOPTE_WRITE 0x0000000000000002UL /* Writeable */ | 17 | #define IOPTE_WRITE 0x0000000000000002UL /* Writeable */ |
18 | 18 | ||
19 | #define IOMMU_NUM_CTXS 4096 | ||
20 | |||
19 | #endif /* !(_SPARC_IOMMU_H) */ | 21 | #endif /* !(_SPARC_IOMMU_H) */ |
diff --git a/include/asm-sparc64/parport.h b/include/asm-sparc64/parport.h index ab88349ddadc..b7e635544cec 100644 --- a/include/asm-sparc64/parport.h +++ b/include/asm-sparc64/parport.h | |||
@@ -13,6 +13,12 @@ | |||
13 | 13 | ||
14 | #define PARPORT_PC_MAX_PORTS PARPORT_MAX | 14 | #define PARPORT_PC_MAX_PORTS PARPORT_MAX |
15 | 15 | ||
16 | /* | ||
17 | * While sparc64 doesn't have an ISA DMA API, we provide something that looks | ||
18 | * close enough to make parport_pc happy | ||
19 | */ | ||
20 | #define HAS_DMA | ||
21 | |||
16 | static struct sparc_ebus_info { | 22 | static struct sparc_ebus_info { |
17 | struct ebus_dma_info info; | 23 | struct ebus_dma_info info; |
18 | unsigned int addr; | 24 | unsigned int addr; |
diff --git a/include/asm-sparc64/pbm.h b/include/asm-sparc64/pbm.h index 92999631c819..4c15610a2bac 100644 --- a/include/asm-sparc64/pbm.h +++ b/include/asm-sparc64/pbm.h | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <asm/io.h> | 15 | #include <asm/io.h> |
16 | #include <asm/page.h> | 16 | #include <asm/page.h> |
17 | #include <asm/oplib.h> | 17 | #include <asm/oplib.h> |
18 | #include <asm/iommu.h> | ||
18 | 19 | ||
19 | /* The abstraction used here is that there are PCI controllers, | 20 | /* The abstraction used here is that there are PCI controllers, |
20 | * each with one (Sabre) or two (PSYCHO/SCHIZO) PCI bus modules | 21 | * each with one (Sabre) or two (PSYCHO/SCHIZO) PCI bus modules |
@@ -40,9 +41,6 @@ struct pci_iommu { | |||
40 | */ | 41 | */ |
41 | spinlock_t lock; | 42 | spinlock_t lock; |
42 | 43 | ||
43 | /* Context allocator. */ | ||
44 | unsigned int iommu_cur_ctx; | ||
45 | |||
46 | /* IOMMU page table, a linear array of ioptes. */ | 44 | /* IOMMU page table, a linear array of ioptes. */ |
47 | iopte_t *page_table; /* The page table itself. */ | 45 | iopte_t *page_table; /* The page table itself. */ |
48 | int page_table_sz_bits; /* log2 of ow many pages does it map? */ | 46 | int page_table_sz_bits; /* log2 of ow many pages does it map? */ |
@@ -87,6 +85,10 @@ struct pci_iommu { | |||
87 | u16 flush; | 85 | u16 flush; |
88 | } alloc_info[PBM_NCLUSTERS]; | 86 | } alloc_info[PBM_NCLUSTERS]; |
89 | 87 | ||
88 | /* CTX allocation. */ | ||
89 | unsigned long ctx_lowest_free; | ||
90 | unsigned long ctx_bitmap[IOMMU_NUM_CTXS / (sizeof(unsigned long) * 8)]; | ||
91 | |||
90 | /* Here a PCI controller driver describes the areas of | 92 | /* Here a PCI controller driver describes the areas of |
91 | * PCI memory space where DMA to/from physical memory | 93 | * PCI memory space where DMA to/from physical memory |
92 | * are addressed. Drivers interrogate the PCI layer | 94 | * are addressed. Drivers interrogate the PCI layer |
diff --git a/include/asm-sparc64/pgalloc.h b/include/asm-sparc64/pgalloc.h index 2c28e1f605b7..b9b1914aae63 100644 --- a/include/asm-sparc64/pgalloc.h +++ b/include/asm-sparc64/pgalloc.h | |||
@@ -122,17 +122,12 @@ static __inline__ void free_pmd_slow(pmd_t *pmd) | |||
122 | #define pmd_populate(MM,PMD,PTE_PAGE) \ | 122 | #define pmd_populate(MM,PMD,PTE_PAGE) \ |
123 | pmd_populate_kernel(MM,PMD,page_address(PTE_PAGE)) | 123 | pmd_populate_kernel(MM,PMD,page_address(PTE_PAGE)) |
124 | 124 | ||
125 | extern pte_t *__pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address); | 125 | extern pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address); |
126 | |||
127 | static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address) | ||
128 | { | ||
129 | return __pte_alloc_one_kernel(mm, address); | ||
130 | } | ||
131 | 126 | ||
132 | static inline struct page * | 127 | static inline struct page * |
133 | pte_alloc_one(struct mm_struct *mm, unsigned long addr) | 128 | pte_alloc_one(struct mm_struct *mm, unsigned long addr) |
134 | { | 129 | { |
135 | pte_t *pte = __pte_alloc_one_kernel(mm, addr); | 130 | pte_t *pte = pte_alloc_one_kernel(mm, addr); |
136 | 131 | ||
137 | if (pte) | 132 | if (pte) |
138 | return virt_to_page(pte); | 133 | return virt_to_page(pte); |
diff --git a/include/asm-sparc64/signal.h b/include/asm-sparc64/signal.h index 466d021d7038..becdf1bc5924 100644 --- a/include/asm-sparc64/signal.h +++ b/include/asm-sparc64/signal.h | |||
@@ -177,21 +177,7 @@ struct sigstack { | |||
177 | #define SA_STATIC_ALLOC 0x80 | 177 | #define SA_STATIC_ALLOC 0x80 |
178 | #endif | 178 | #endif |
179 | 179 | ||
180 | /* Type of a signal handler. */ | 180 | #include <asm-generic/signal.h> |
181 | #ifdef __KERNEL__ | ||
182 | typedef void __signalfn_t(int); | ||
183 | typedef __signalfn_t __user *__sighandler_t; | ||
184 | |||
185 | typedef void __restorefn_t(void); | ||
186 | typedef __restorefn_t __user *__sigrestore_t; | ||
187 | #else | ||
188 | typedef void (*__sighandler_t)(int); | ||
189 | typedef void (*__sigrestore_t)(void); | ||
190 | #endif | ||
191 | |||
192 | #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ | ||
193 | #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ | ||
194 | #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ | ||
195 | 181 | ||
196 | struct __new_sigaction { | 182 | struct __new_sigaction { |
197 | __sighandler_t sa_handler; | 183 | __sighandler_t sa_handler; |
diff --git a/include/asm-sparc64/spitfire.h b/include/asm-sparc64/spitfire.h index ad78ce64d69e..9d7613eea812 100644 --- a/include/asm-sparc64/spitfire.h +++ b/include/asm-sparc64/spitfire.h | |||
@@ -48,6 +48,9 @@ enum ultra_tlb_layout { | |||
48 | 48 | ||
49 | extern enum ultra_tlb_layout tlb_type; | 49 | extern enum ultra_tlb_layout tlb_type; |
50 | 50 | ||
51 | extern int cheetah_pcache_forced_on; | ||
52 | extern void cheetah_enable_pcache(void); | ||
53 | |||
51 | #define sparc64_highest_locked_tlbent() \ | 54 | #define sparc64_highest_locked_tlbent() \ |
52 | (tlb_type == spitfire ? \ | 55 | (tlb_type == spitfire ? \ |
53 | SPITFIRE_HIGHEST_LOCKED_TLBENT : \ | 56 | SPITFIRE_HIGHEST_LOCKED_TLBENT : \ |
diff --git a/include/asm-um/arch-signal-i386.h b/include/asm-um/arch-signal-i386.h deleted file mode 100644 index 99a9de4728da..000000000000 --- a/include/asm-um/arch-signal-i386.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #ifndef __UM_ARCH_SIGNAL_I386_H | ||
7 | #define __UM_ARCH_SIGNAL_I386_H | ||
8 | |||
9 | struct arch_signal_context { | ||
10 | unsigned long extrasigs[_NSIG_WORDS]; | ||
11 | }; | ||
12 | |||
13 | #endif | ||
14 | |||
15 | /* | ||
16 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
17 | * Emacs will notice this stuff at the end of the file and automatically | ||
18 | * adjust the settings for this buffer only. This must remain at the end | ||
19 | * of the file. | ||
20 | * --------------------------------------------------------------------------- | ||
21 | * Local variables: | ||
22 | * c-file-style: "linux" | ||
23 | * End: | ||
24 | */ | ||
diff --git a/include/asm-um/archparam-i386.h b/include/asm-um/archparam-i386.h index 6f78de5b621b..49e89b8d7e58 100644 --- a/include/asm-um/archparam-i386.h +++ b/include/asm-um/archparam-i386.h | |||
@@ -6,143 +6,6 @@ | |||
6 | #ifndef __UM_ARCHPARAM_I386_H | 6 | #ifndef __UM_ARCHPARAM_I386_H |
7 | #define __UM_ARCHPARAM_I386_H | 7 | #define __UM_ARCHPARAM_I386_H |
8 | 8 | ||
9 | /********* Bits for asm-um/elf.h ************/ | ||
10 | |||
11 | #include <asm/user.h> | ||
12 | |||
13 | extern char * elf_aux_platform; | ||
14 | #define ELF_PLATFORM (elf_aux_platform) | ||
15 | |||
16 | #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) | ||
17 | |||
18 | typedef struct user_i387_struct elf_fpregset_t; | ||
19 | typedef unsigned long elf_greg_t; | ||
20 | |||
21 | #define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t)) | ||
22 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | ||
23 | |||
24 | #define ELF_DATA ELFDATA2LSB | ||
25 | #define ELF_ARCH EM_386 | ||
26 | |||
27 | #define ELF_PLAT_INIT(regs, load_addr) do { \ | ||
28 | PT_REGS_EBX(regs) = 0; \ | ||
29 | PT_REGS_ECX(regs) = 0; \ | ||
30 | PT_REGS_EDX(regs) = 0; \ | ||
31 | PT_REGS_ESI(regs) = 0; \ | ||
32 | PT_REGS_EDI(regs) = 0; \ | ||
33 | PT_REGS_EBP(regs) = 0; \ | ||
34 | PT_REGS_EAX(regs) = 0; \ | ||
35 | } while(0) | ||
36 | |||
37 | /* Shamelessly stolen from include/asm-i386/elf.h */ | ||
38 | |||
39 | #define ELF_CORE_COPY_REGS(pr_reg, regs) do { \ | ||
40 | pr_reg[0] = PT_REGS_EBX(regs); \ | ||
41 | pr_reg[1] = PT_REGS_ECX(regs); \ | ||
42 | pr_reg[2] = PT_REGS_EDX(regs); \ | ||
43 | pr_reg[3] = PT_REGS_ESI(regs); \ | ||
44 | pr_reg[4] = PT_REGS_EDI(regs); \ | ||
45 | pr_reg[5] = PT_REGS_EBP(regs); \ | ||
46 | pr_reg[6] = PT_REGS_EAX(regs); \ | ||
47 | pr_reg[7] = PT_REGS_DS(regs); \ | ||
48 | pr_reg[8] = PT_REGS_ES(regs); \ | ||
49 | /* fake once used fs and gs selectors? */ \ | ||
50 | pr_reg[9] = PT_REGS_DS(regs); \ | ||
51 | pr_reg[10] = PT_REGS_DS(regs); \ | ||
52 | pr_reg[11] = PT_REGS_SYSCALL_NR(regs); \ | ||
53 | pr_reg[12] = PT_REGS_IP(regs); \ | ||
54 | pr_reg[13] = PT_REGS_CS(regs); \ | ||
55 | pr_reg[14] = PT_REGS_EFLAGS(regs); \ | ||
56 | pr_reg[15] = PT_REGS_SP(regs); \ | ||
57 | pr_reg[16] = PT_REGS_SS(regs); \ | ||
58 | } while(0); | ||
59 | |||
60 | |||
61 | extern unsigned long vsyscall_ehdr; | ||
62 | extern unsigned long vsyscall_end; | ||
63 | extern unsigned long __kernel_vsyscall; | ||
64 | |||
65 | #define VSYSCALL_BASE vsyscall_ehdr | ||
66 | #define VSYSCALL_END vsyscall_end | ||
67 | |||
68 | /* | ||
69 | * This is the range that is readable by user mode, and things | ||
70 | * acting like user mode such as get_user_pages. | ||
71 | */ | ||
72 | #define FIXADDR_USER_START VSYSCALL_BASE | ||
73 | #define FIXADDR_USER_END VSYSCALL_END | ||
74 | |||
75 | /* | ||
76 | * Architecture-neutral AT_ values in 0-17, leave some room | ||
77 | * for more of them, start the x86-specific ones at 32. | ||
78 | */ | ||
79 | #define AT_SYSINFO 32 | ||
80 | #define AT_SYSINFO_EHDR 33 | ||
81 | |||
82 | #define ARCH_DLINFO \ | ||
83 | do { \ | ||
84 | if ( vsyscall_ehdr ) { \ | ||
85 | NEW_AUX_ENT(AT_SYSINFO, __kernel_vsyscall); \ | ||
86 | NEW_AUX_ENT(AT_SYSINFO_EHDR, vsyscall_ehdr); \ | ||
87 | } \ | ||
88 | } while (0) | ||
89 | |||
90 | /* | ||
91 | * These macros parameterize elf_core_dump in fs/binfmt_elf.c to write out | ||
92 | * extra segments containing the vsyscall DSO contents. Dumping its | ||
93 | * contents makes post-mortem fully interpretable later without matching up | ||
94 | * the same kernel and hardware config to see what PC values meant. | ||
95 | * Dumping its extra ELF program headers includes all the other information | ||
96 | * a debugger needs to easily find how the vsyscall DSO was being used. | ||
97 | */ | ||
98 | #define ELF_CORE_EXTRA_PHDRS \ | ||
99 | (vsyscall_ehdr ? (((struct elfhdr *)vsyscall_ehdr)->e_phnum) : 0 ) | ||
100 | |||
101 | #define ELF_CORE_WRITE_EXTRA_PHDRS \ | ||
102 | if ( vsyscall_ehdr ) { \ | ||
103 | const struct elfhdr *const ehdrp = (struct elfhdr *)vsyscall_ehdr; \ | ||
104 | const struct elf_phdr *const phdrp = \ | ||
105 | (const struct elf_phdr *) (vsyscall_ehdr + ehdrp->e_phoff); \ | ||
106 | int i; \ | ||
107 | Elf32_Off ofs = 0; \ | ||
108 | for (i = 0; i < ehdrp->e_phnum; ++i) { \ | ||
109 | struct elf_phdr phdr = phdrp[i]; \ | ||
110 | if (phdr.p_type == PT_LOAD) { \ | ||
111 | ofs = phdr.p_offset = offset; \ | ||
112 | offset += phdr.p_filesz; \ | ||
113 | } \ | ||
114 | else \ | ||
115 | phdr.p_offset += ofs; \ | ||
116 | phdr.p_paddr = 0; /* match other core phdrs */ \ | ||
117 | DUMP_WRITE(&phdr, sizeof(phdr)); \ | ||
118 | } \ | ||
119 | } | ||
120 | #define ELF_CORE_WRITE_EXTRA_DATA \ | ||
121 | if ( vsyscall_ehdr ) { \ | ||
122 | const struct elfhdr *const ehdrp = (struct elfhdr *)vsyscall_ehdr; \ | ||
123 | const struct elf_phdr *const phdrp = \ | ||
124 | (const struct elf_phdr *) (vsyscall_ehdr + ehdrp->e_phoff); \ | ||
125 | int i; \ | ||
126 | for (i = 0; i < ehdrp->e_phnum; ++i) { \ | ||
127 | if (phdrp[i].p_type == PT_LOAD) \ | ||
128 | DUMP_WRITE((void *) phdrp[i].p_vaddr, \ | ||
129 | phdrp[i].p_filesz); \ | ||
130 | } \ | ||
131 | } | ||
132 | |||
133 | #define R_386_NONE 0 | ||
134 | #define R_386_32 1 | ||
135 | #define R_386_PC32 2 | ||
136 | #define R_386_GOT32 3 | ||
137 | #define R_386_PLT32 4 | ||
138 | #define R_386_COPY 5 | ||
139 | #define R_386_GLOB_DAT 6 | ||
140 | #define R_386_JMP_SLOT 7 | ||
141 | #define R_386_RELATIVE 8 | ||
142 | #define R_386_GOTOFF 9 | ||
143 | #define R_386_GOTPC 10 | ||
144 | #define R_386_NUM 11 | ||
145 | |||
146 | /********* Nothing for asm-um/hardirq.h **********/ | 9 | /********* Nothing for asm-um/hardirq.h **********/ |
147 | 10 | ||
148 | /********* Nothing for asm-um/hw_irq.h **********/ | 11 | /********* Nothing for asm-um/hw_irq.h **********/ |
diff --git a/include/asm-um/archparam-ppc.h b/include/asm-um/archparam-ppc.h index 0ebced92a762..172cd6ffacc4 100644 --- a/include/asm-um/archparam-ppc.h +++ b/include/asm-um/archparam-ppc.h | |||
@@ -1,26 +1,6 @@ | |||
1 | #ifndef __UM_ARCHPARAM_PPC_H | 1 | #ifndef __UM_ARCHPARAM_PPC_H |
2 | #define __UM_ARCHPARAM_PPC_H | 2 | #define __UM_ARCHPARAM_PPC_H |
3 | 3 | ||
4 | /********* Bits for asm-um/elf.h ************/ | ||
5 | |||
6 | #define ELF_PLATFORM (0) | ||
7 | |||
8 | #define ELF_ET_DYN_BASE (0x08000000) | ||
9 | |||
10 | /* the following stolen from asm-ppc/elf.h */ | ||
11 | #define ELF_NGREG 48 /* includes nip, msr, lr, etc. */ | ||
12 | #define ELF_NFPREG 33 /* includes fpscr */ | ||
13 | /* General registers */ | ||
14 | typedef unsigned long elf_greg_t; | ||
15 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | ||
16 | |||
17 | /* Floating point registers */ | ||
18 | typedef double elf_fpreg_t; | ||
19 | typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; | ||
20 | |||
21 | #define ELF_DATA ELFDATA2MSB | ||
22 | #define ELF_ARCH EM_PPC | ||
23 | |||
24 | /********* Bits for asm-um/hw_irq.h **********/ | 4 | /********* Bits for asm-um/hw_irq.h **********/ |
25 | 5 | ||
26 | struct hw_interrupt_type; | 6 | struct hw_interrupt_type; |
diff --git a/include/asm-um/archparam-x86_64.h b/include/asm-um/archparam-x86_64.h index 96321c4892f1..270ed9586b68 100644 --- a/include/asm-um/archparam-x86_64.h +++ b/include/asm-um/archparam-x86_64.h | |||
@@ -7,42 +7,6 @@ | |||
7 | #ifndef __UM_ARCHPARAM_X86_64_H | 7 | #ifndef __UM_ARCHPARAM_X86_64_H |
8 | #define __UM_ARCHPARAM_X86_64_H | 8 | #define __UM_ARCHPARAM_X86_64_H |
9 | 9 | ||
10 | #include <asm/user.h> | ||
11 | |||
12 | #define ELF_PLATFORM "x86_64" | ||
13 | |||
14 | #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) | ||
15 | |||
16 | typedef unsigned long elf_greg_t; | ||
17 | typedef struct { } elf_fpregset_t; | ||
18 | |||
19 | #define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t)) | ||
20 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | ||
21 | |||
22 | #define ELF_DATA ELFDATA2LSB | ||
23 | #define ELF_ARCH EM_X86_64 | ||
24 | |||
25 | #define ELF_PLAT_INIT(regs, load_addr) do { \ | ||
26 | PT_REGS_RBX(regs) = 0; \ | ||
27 | PT_REGS_RCX(regs) = 0; \ | ||
28 | PT_REGS_RDX(regs) = 0; \ | ||
29 | PT_REGS_RSI(regs) = 0; \ | ||
30 | PT_REGS_RDI(regs) = 0; \ | ||
31 | PT_REGS_RBP(regs) = 0; \ | ||
32 | PT_REGS_RAX(regs) = 0; \ | ||
33 | PT_REGS_R8(regs) = 0; \ | ||
34 | PT_REGS_R9(regs) = 0; \ | ||
35 | PT_REGS_R10(regs) = 0; \ | ||
36 | PT_REGS_R11(regs) = 0; \ | ||
37 | PT_REGS_R12(regs) = 0; \ | ||
38 | PT_REGS_R13(regs) = 0; \ | ||
39 | PT_REGS_R14(regs) = 0; \ | ||
40 | PT_REGS_R15(regs) = 0; \ | ||
41 | } while (0) | ||
42 | |||
43 | #ifdef TIF_IA32 /* XXX */ | ||
44 | clear_thread_flag(TIF_IA32); | ||
45 | #endif | ||
46 | 10 | ||
47 | /* No user-accessible fixmap addresses, i.e. vsyscall */ | 11 | /* No user-accessible fixmap addresses, i.e. vsyscall */ |
48 | #define FIXADDR_USER_START 0 | 12 | #define FIXADDR_USER_START 0 |
diff --git a/include/asm-um/delay.h b/include/asm-um/delay.h index 40695576ca60..0985bda66750 100644 --- a/include/asm-um/delay.h +++ b/include/asm-um/delay.h | |||
@@ -4,4 +4,6 @@ | |||
4 | #include "asm/arch/delay.h" | 4 | #include "asm/arch/delay.h" |
5 | #include "asm/archparam.h" | 5 | #include "asm/archparam.h" |
6 | 6 | ||
7 | #define MILLION 1000000 | ||
8 | |||
7 | #endif | 9 | #endif |
diff --git a/include/asm-um/elf-i386.h b/include/asm-um/elf-i386.h new file mode 100644 index 000000000000..9bab712dc5c0 --- /dev/null +++ b/include/asm-um/elf-i386.h | |||
@@ -0,0 +1,169 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | #ifndef __UM_ELF_I386_H | ||
6 | #define __UM_ELF_I386_H | ||
7 | |||
8 | #include <asm/user.h> | ||
9 | |||
10 | #define R_386_NONE 0 | ||
11 | #define R_386_32 1 | ||
12 | #define R_386_PC32 2 | ||
13 | #define R_386_GOT32 3 | ||
14 | #define R_386_PLT32 4 | ||
15 | #define R_386_COPY 5 | ||
16 | #define R_386_GLOB_DAT 6 | ||
17 | #define R_386_JMP_SLOT 7 | ||
18 | #define R_386_RELATIVE 8 | ||
19 | #define R_386_GOTOFF 9 | ||
20 | #define R_386_GOTPC 10 | ||
21 | #define R_386_NUM 11 | ||
22 | |||
23 | typedef unsigned long elf_greg_t; | ||
24 | |||
25 | #define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t)) | ||
26 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | ||
27 | |||
28 | typedef struct user_i387_struct elf_fpregset_t; | ||
29 | |||
30 | /* | ||
31 | * This is used to ensure we don't load something for the wrong architecture. | ||
32 | */ | ||
33 | #define elf_check_arch(x) \ | ||
34 | (((x)->e_machine == EM_386) || ((x)->e_machine == EM_486)) | ||
35 | |||
36 | #define ELF_CLASS ELFCLASS32 | ||
37 | #define ELF_DATA ELFDATA2LSB | ||
38 | #define ELF_ARCH EM_386 | ||
39 | |||
40 | #define ELF_PLAT_INIT(regs, load_addr) do { \ | ||
41 | PT_REGS_EBX(regs) = 0; \ | ||
42 | PT_REGS_ECX(regs) = 0; \ | ||
43 | PT_REGS_EDX(regs) = 0; \ | ||
44 | PT_REGS_ESI(regs) = 0; \ | ||
45 | PT_REGS_EDI(regs) = 0; \ | ||
46 | PT_REGS_EBP(regs) = 0; \ | ||
47 | PT_REGS_EAX(regs) = 0; \ | ||
48 | } while(0) | ||
49 | |||
50 | #define USE_ELF_CORE_DUMP | ||
51 | #define ELF_EXEC_PAGESIZE 4096 | ||
52 | |||
53 | #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) | ||
54 | |||
55 | /* Shamelessly stolen from include/asm-i386/elf.h */ | ||
56 | |||
57 | #define ELF_CORE_COPY_REGS(pr_reg, regs) do { \ | ||
58 | pr_reg[0] = PT_REGS_EBX(regs); \ | ||
59 | pr_reg[1] = PT_REGS_ECX(regs); \ | ||
60 | pr_reg[2] = PT_REGS_EDX(regs); \ | ||
61 | pr_reg[3] = PT_REGS_ESI(regs); \ | ||
62 | pr_reg[4] = PT_REGS_EDI(regs); \ | ||
63 | pr_reg[5] = PT_REGS_EBP(regs); \ | ||
64 | pr_reg[6] = PT_REGS_EAX(regs); \ | ||
65 | pr_reg[7] = PT_REGS_DS(regs); \ | ||
66 | pr_reg[8] = PT_REGS_ES(regs); \ | ||
67 | /* fake once used fs and gs selectors? */ \ | ||
68 | pr_reg[9] = PT_REGS_DS(regs); \ | ||
69 | pr_reg[10] = PT_REGS_DS(regs); \ | ||
70 | pr_reg[11] = PT_REGS_SYSCALL_NR(regs); \ | ||
71 | pr_reg[12] = PT_REGS_IP(regs); \ | ||
72 | pr_reg[13] = PT_REGS_CS(regs); \ | ||
73 | pr_reg[14] = PT_REGS_EFLAGS(regs); \ | ||
74 | pr_reg[15] = PT_REGS_SP(regs); \ | ||
75 | pr_reg[16] = PT_REGS_SS(regs); \ | ||
76 | } while(0); | ||
77 | |||
78 | extern long elf_aux_hwcap; | ||
79 | #define ELF_HWCAP (elf_aux_hwcap) | ||
80 | |||
81 | extern char * elf_aux_platform; | ||
82 | #define ELF_PLATFORM (elf_aux_platform) | ||
83 | |||
84 | #define SET_PERSONALITY(ex, ibcs2) do ; while(0) | ||
85 | |||
86 | extern unsigned long vsyscall_ehdr; | ||
87 | extern unsigned long vsyscall_end; | ||
88 | extern unsigned long __kernel_vsyscall; | ||
89 | |||
90 | #define VSYSCALL_BASE vsyscall_ehdr | ||
91 | #define VSYSCALL_END vsyscall_end | ||
92 | |||
93 | /* | ||
94 | * This is the range that is readable by user mode, and things | ||
95 | * acting like user mode such as get_user_pages. | ||
96 | */ | ||
97 | #define FIXADDR_USER_START VSYSCALL_BASE | ||
98 | #define FIXADDR_USER_END VSYSCALL_END | ||
99 | |||
100 | /* | ||
101 | * Architecture-neutral AT_ values in 0-17, leave some room | ||
102 | * for more of them, start the x86-specific ones at 32. | ||
103 | */ | ||
104 | #define AT_SYSINFO 32 | ||
105 | #define AT_SYSINFO_EHDR 33 | ||
106 | |||
107 | #define ARCH_DLINFO \ | ||
108 | do { \ | ||
109 | if ( vsyscall_ehdr ) { \ | ||
110 | NEW_AUX_ENT(AT_SYSINFO, __kernel_vsyscall); \ | ||
111 | NEW_AUX_ENT(AT_SYSINFO_EHDR, vsyscall_ehdr); \ | ||
112 | } \ | ||
113 | } while (0) | ||
114 | |||
115 | /* | ||
116 | * These macros parameterize elf_core_dump in fs/binfmt_elf.c to write out | ||
117 | * extra segments containing the vsyscall DSO contents. Dumping its | ||
118 | * contents makes post-mortem fully interpretable later without matching up | ||
119 | * the same kernel and hardware config to see what PC values meant. | ||
120 | * Dumping its extra ELF program headers includes all the other information | ||
121 | * a debugger needs to easily find how the vsyscall DSO was being used. | ||
122 | */ | ||
123 | #define ELF_CORE_EXTRA_PHDRS \ | ||
124 | (vsyscall_ehdr ? (((struct elfhdr *)vsyscall_ehdr)->e_phnum) : 0 ) | ||
125 | |||
126 | #define ELF_CORE_WRITE_EXTRA_PHDRS \ | ||
127 | if ( vsyscall_ehdr ) { \ | ||
128 | const struct elfhdr *const ehdrp = (struct elfhdr *)vsyscall_ehdr; \ | ||
129 | const struct elf_phdr *const phdrp = \ | ||
130 | (const struct elf_phdr *) (vsyscall_ehdr + ehdrp->e_phoff); \ | ||
131 | int i; \ | ||
132 | Elf32_Off ofs = 0; \ | ||
133 | for (i = 0; i < ehdrp->e_phnum; ++i) { \ | ||
134 | struct elf_phdr phdr = phdrp[i]; \ | ||
135 | if (phdr.p_type == PT_LOAD) { \ | ||
136 | ofs = phdr.p_offset = offset; \ | ||
137 | offset += phdr.p_filesz; \ | ||
138 | } \ | ||
139 | else \ | ||
140 | phdr.p_offset += ofs; \ | ||
141 | phdr.p_paddr = 0; /* match other core phdrs */ \ | ||
142 | DUMP_WRITE(&phdr, sizeof(phdr)); \ | ||
143 | } \ | ||
144 | } | ||
145 | #define ELF_CORE_WRITE_EXTRA_DATA \ | ||
146 | if ( vsyscall_ehdr ) { \ | ||
147 | const struct elfhdr *const ehdrp = (struct elfhdr *)vsyscall_ehdr; \ | ||
148 | const struct elf_phdr *const phdrp = \ | ||
149 | (const struct elf_phdr *) (vsyscall_ehdr + ehdrp->e_phoff); \ | ||
150 | int i; \ | ||
151 | for (i = 0; i < ehdrp->e_phnum; ++i) { \ | ||
152 | if (phdrp[i].p_type == PT_LOAD) \ | ||
153 | DUMP_WRITE((void *) phdrp[i].p_vaddr, \ | ||
154 | phdrp[i].p_filesz); \ | ||
155 | } \ | ||
156 | } | ||
157 | |||
158 | #endif | ||
159 | |||
160 | /* | ||
161 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
162 | * Emacs will notice this stuff at the end of the file and automatically | ||
163 | * adjust the settings for this buffer only. This must remain at the end | ||
164 | * of the file. | ||
165 | * --------------------------------------------------------------------------- | ||
166 | * Local variables: | ||
167 | * c-file-style: "linux" | ||
168 | * End: | ||
169 | */ | ||
diff --git a/include/asm-um/elf.h b/include/asm-um/elf-ppc.h index 7908f8fe8231..2998cf925042 100644 --- a/include/asm-um/elf.h +++ b/include/asm-um/elf-ppc.h | |||
@@ -1,8 +1,7 @@ | |||
1 | #ifndef __UM_ELF_H | 1 | #ifndef __UM_ELF_PPC_H |
2 | #define __UM_ELF_H | 2 | #define __UM_ELF_PPC_H |
3 | 3 | ||
4 | #include "linux/config.h" | 4 | #include "linux/config.h" |
5 | #include "asm/archparam.h" | ||
6 | 5 | ||
7 | extern long elf_aux_hwcap; | 6 | extern long elf_aux_hwcap; |
8 | #define ELF_HWCAP (elf_aux_hwcap) | 7 | #define ELF_HWCAP (elf_aux_hwcap) |
@@ -13,7 +12,7 @@ extern long elf_aux_hwcap; | |||
13 | 12 | ||
14 | #define elf_check_arch(x) (1) | 13 | #define elf_check_arch(x) (1) |
15 | 14 | ||
16 | #ifdef CONFIG_64BIT | 15 | #ifdef CONFIG_64_BIT |
17 | #define ELF_CLASS ELFCLASS64 | 16 | #define ELF_CLASS ELFCLASS64 |
18 | #else | 17 | #else |
19 | #define ELF_CLASS ELFCLASS32 | 18 | #define ELF_CLASS ELFCLASS32 |
@@ -34,4 +33,22 @@ extern long elf_aux_hwcap; | |||
34 | #define R_386_GOTPC 10 | 33 | #define R_386_GOTPC 10 |
35 | #define R_386_NUM 11 | 34 | #define R_386_NUM 11 |
36 | 35 | ||
36 | #define ELF_PLATFORM (0) | ||
37 | |||
38 | #define ELF_ET_DYN_BASE (0x08000000) | ||
39 | |||
40 | /* the following stolen from asm-ppc/elf.h */ | ||
41 | #define ELF_NGREG 48 /* includes nip, msr, lr, etc. */ | ||
42 | #define ELF_NFPREG 33 /* includes fpscr */ | ||
43 | /* General registers */ | ||
44 | typedef unsigned long elf_greg_t; | ||
45 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | ||
46 | |||
47 | /* Floating point registers */ | ||
48 | typedef double elf_fpreg_t; | ||
49 | typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; | ||
50 | |||
51 | #define ELF_DATA ELFDATA2MSB | ||
52 | #define ELF_ARCH EM_PPC | ||
53 | |||
37 | #endif | 54 | #endif |
diff --git a/include/asm-um/elf-x86_64.h b/include/asm-um/elf-x86_64.h new file mode 100644 index 000000000000..8a8246d03936 --- /dev/null +++ b/include/asm-um/elf-x86_64.h | |||
@@ -0,0 +1,95 @@ | |||
1 | /* | ||
2 | * Copyright 2003 PathScale, Inc. | ||
3 | * | ||
4 | * Licensed under the GPL | ||
5 | */ | ||
6 | #ifndef __UM_ELF_X86_64_H | ||
7 | #define __UM_ELF_X86_64_H | ||
8 | |||
9 | #include <asm/user.h> | ||
10 | |||
11 | /* x86-64 relocation types, taken from asm-x86_64/elf.h */ | ||
12 | #define R_X86_64_NONE 0 /* No reloc */ | ||
13 | #define R_X86_64_64 1 /* Direct 64 bit */ | ||
14 | #define R_X86_64_PC32 2 /* PC relative 32 bit signed */ | ||
15 | #define R_X86_64_GOT32 3 /* 32 bit GOT entry */ | ||
16 | #define R_X86_64_PLT32 4 /* 32 bit PLT address */ | ||
17 | #define R_X86_64_COPY 5 /* Copy symbol at runtime */ | ||
18 | #define R_X86_64_GLOB_DAT 6 /* Create GOT entry */ | ||
19 | #define R_X86_64_JUMP_SLOT 7 /* Create PLT entry */ | ||
20 | #define R_X86_64_RELATIVE 8 /* Adjust by program base */ | ||
21 | #define R_X86_64_GOTPCREL 9 /* 32 bit signed pc relative | ||
22 | offset to GOT */ | ||
23 | #define R_X86_64_32 10 /* Direct 32 bit zero extended */ | ||
24 | #define R_X86_64_32S 11 /* Direct 32 bit sign extended */ | ||
25 | #define R_X86_64_16 12 /* Direct 16 bit zero extended */ | ||
26 | #define R_X86_64_PC16 13 /* 16 bit sign extended pc relative */ | ||
27 | #define R_X86_64_8 14 /* Direct 8 bit sign extended */ | ||
28 | #define R_X86_64_PC8 15 /* 8 bit sign extended pc relative */ | ||
29 | |||
30 | #define R_X86_64_NUM 16 | ||
31 | |||
32 | typedef unsigned long elf_greg_t; | ||
33 | |||
34 | #define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t)) | ||
35 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | ||
36 | |||
37 | typedef struct { } elf_fpregset_t; | ||
38 | |||
39 | /* | ||
40 | * This is used to ensure we don't load something for the wrong architecture. | ||
41 | */ | ||
42 | #define elf_check_arch(x) \ | ||
43 | ((x)->e_machine == EM_X86_64) | ||
44 | |||
45 | #define ELF_CLASS ELFCLASS64 | ||
46 | #define ELF_DATA ELFDATA2LSB | ||
47 | #define ELF_ARCH EM_X86_64 | ||
48 | |||
49 | #define ELF_PLAT_INIT(regs, load_addr) do { \ | ||
50 | PT_REGS_RBX(regs) = 0; \ | ||
51 | PT_REGS_RCX(regs) = 0; \ | ||
52 | PT_REGS_RDX(regs) = 0; \ | ||
53 | PT_REGS_RSI(regs) = 0; \ | ||
54 | PT_REGS_RDI(regs) = 0; \ | ||
55 | PT_REGS_RBP(regs) = 0; \ | ||
56 | PT_REGS_RAX(regs) = 0; \ | ||
57 | PT_REGS_R8(regs) = 0; \ | ||
58 | PT_REGS_R9(regs) = 0; \ | ||
59 | PT_REGS_R10(regs) = 0; \ | ||
60 | PT_REGS_R11(regs) = 0; \ | ||
61 | PT_REGS_R12(regs) = 0; \ | ||
62 | PT_REGS_R13(regs) = 0; \ | ||
63 | PT_REGS_R14(regs) = 0; \ | ||
64 | PT_REGS_R15(regs) = 0; \ | ||
65 | } while (0) | ||
66 | |||
67 | #ifdef TIF_IA32 /* XXX */ | ||
68 | #error XXX, indeed | ||
69 | clear_thread_flag(TIF_IA32); | ||
70 | #endif | ||
71 | |||
72 | #define USE_ELF_CORE_DUMP | ||
73 | #define ELF_EXEC_PAGESIZE 4096 | ||
74 | |||
75 | #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3) | ||
76 | |||
77 | extern long elf_aux_hwcap; | ||
78 | #define ELF_HWCAP (elf_aux_hwcap) | ||
79 | |||
80 | #define ELF_PLATFORM "x86_64" | ||
81 | |||
82 | #define SET_PERSONALITY(ex, ibcs2) do ; while(0) | ||
83 | |||
84 | #endif | ||
85 | |||
86 | /* | ||
87 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
88 | * Emacs will notice this stuff at the end of the file and automatically | ||
89 | * adjust the settings for this buffer only. This must remain at the end | ||
90 | * of the file. | ||
91 | * --------------------------------------------------------------------------- | ||
92 | * Local variables: | ||
93 | * c-file-style: "linux" | ||
94 | * End: | ||
95 | */ | ||
diff --git a/include/asm-um/fixmap.h b/include/asm-um/fixmap.h index 900f3fbb9fab..ae0ca3932d50 100644 --- a/include/asm-um/fixmap.h +++ b/include/asm-um/fixmap.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <linux/config.h> | 4 | #include <linux/config.h> |
5 | #include <asm/kmap_types.h> | 5 | #include <asm/kmap_types.h> |
6 | #include <asm/archparam.h> | 6 | #include <asm/archparam.h> |
7 | #include <asm/elf.h> | ||
7 | 8 | ||
8 | /* | 9 | /* |
9 | * Here we define all the compile-time 'special' virtual | 10 | * Here we define all the compile-time 'special' virtual |
diff --git a/include/asm-um/ipc.h b/include/asm-um/ipc.h index e2ddc47f3e52..a46e3d9c2a3f 100644 --- a/include/asm-um/ipc.h +++ b/include/asm-um/ipc.h | |||
@@ -1,6 +1 @@ | |||
1 | #ifndef __UM_IPC_H | #include <asm-generic/ipc.h> | |
2 | #define __UM_IPC_H | ||
3 | |||
4 | #include "asm/arch/ipc.h" | ||
5 | |||
6 | #endif | ||
diff --git a/include/asm-um/linkage.h b/include/asm-um/linkage.h index 27011652b015..7dfce37adc8b 100644 --- a/include/asm-um/linkage.h +++ b/include/asm-um/linkage.h | |||
@@ -1,7 +1,6 @@ | |||
1 | #ifndef __ASM_LINKAGE_H | 1 | #ifndef __ASM_UM_LINKAGE_H |
2 | #define __ASM_LINKAGE_H | 2 | #define __ASM_UM_LINKAGE_H |
3 | 3 | ||
4 | #define FASTCALL(x) x __attribute__((regparm(3))) | 4 | #include "asm/arch/linkage.h" |
5 | #define fastcall __attribute__((regparm(3))) | ||
6 | 5 | ||
7 | #endif | 6 | #endif |
diff --git a/include/asm-um/page.h b/include/asm-um/page.h index 102eb3df1aaf..5afee8a8cdf3 100644 --- a/include/asm-um/page.h +++ b/include/asm-um/page.h | |||
@@ -45,6 +45,9 @@ typedef struct { unsigned long pgd; } pgd_t; | |||
45 | ({ (pte).pte_high = (phys) >> 32; \ | 45 | ({ (pte).pte_high = (phys) >> 32; \ |
46 | (pte).pte_low = (phys) | pgprot_val(prot); }) | 46 | (pte).pte_low = (phys) | pgprot_val(prot); }) |
47 | 47 | ||
48 | #define pmd_val(x) ((x).pmd) | ||
49 | #define __pmd(x) ((pmd_t) { (x) } ) | ||
50 | |||
48 | typedef unsigned long long pfn_t; | 51 | typedef unsigned long long pfn_t; |
49 | typedef unsigned long long phys_t; | 52 | typedef unsigned long long phys_t; |
50 | 53 | ||
@@ -95,7 +98,13 @@ extern unsigned long uml_physmem; | |||
95 | 98 | ||
96 | extern unsigned long to_phys(void *virt); | 99 | extern unsigned long to_phys(void *virt); |
97 | extern void *to_virt(unsigned long phys); | 100 | extern void *to_virt(unsigned long phys); |
98 | #define __pa(virt) to_phys((void *) virt) | 101 | |
102 | /* Cast to unsigned long before casting to void * to avoid a warning from | ||
103 | * mmap_kmem about cutting a long long down to a void *. Not sure that | ||
104 | * casting is the right thing, but 32-bit UML can't have 64-bit virtual | ||
105 | * addresses | ||
106 | */ | ||
107 | #define __pa(virt) to_phys((void *) (unsigned long) virt) | ||
99 | #define __va(phys) to_virt((unsigned long) phys) | 108 | #define __va(phys) to_virt((unsigned long) phys) |
100 | 109 | ||
101 | #define page_to_pfn(page) ((page) - mem_map) | 110 | #define page_to_pfn(page) ((page) - mem_map) |
diff --git a/include/asm-um/pgtable-3level.h b/include/asm-um/pgtable-3level.h index d309f3a9e6f6..65e8bfc55fc4 100644 --- a/include/asm-um/pgtable-3level.h +++ b/include/asm-um/pgtable-3level.h | |||
@@ -149,7 +149,7 @@ static inline pmd_t pfn_pmd(pfn_t page_nr, pgprot_t pgprot) | |||
149 | 149 | ||
150 | #define pte_to_pgoff(p) ((p).pte >> 32) | 150 | #define pte_to_pgoff(p) ((p).pte >> 32) |
151 | 151 | ||
152 | #define pgoff_to_pte(off) ((pte_t) { ((off) < 32) | _PAGE_FILE }) | 152 | #define pgoff_to_pte(off) ((pte_t) { ((off) << 32) | _PAGE_FILE }) |
153 | 153 | ||
154 | #else | 154 | #else |
155 | 155 | ||
diff --git a/include/asm-um/pgtable.h b/include/asm-um/pgtable.h index 71f9c0c78c0c..a88040920311 100644 --- a/include/asm-um/pgtable.h +++ b/include/asm-um/pgtable.h | |||
@@ -106,7 +106,7 @@ extern unsigned long end_iomem; | |||
106 | /* | 106 | /* |
107 | * Define this if things work differently on an i386 and an i486: | 107 | * Define this if things work differently on an i386 and an i486: |
108 | * it will (on an i486) warn about kernel memory accesses that are | 108 | * it will (on an i486) warn about kernel memory accesses that are |
109 | * done without a 'verify_area(VERIFY_WRITE,..)' | 109 | * done without a 'access_ok(VERIFY_WRITE,..)' |
110 | */ | 110 | */ |
111 | #undef TEST_VERIFY_AREA | 111 | #undef TEST_VERIFY_AREA |
112 | 112 | ||
@@ -114,17 +114,9 @@ extern unsigned long end_iomem; | |||
114 | extern unsigned long pg0[1024]; | 114 | extern unsigned long pg0[1024]; |
115 | 115 | ||
116 | /* | 116 | /* |
117 | * BAD_PAGETABLE is used when we need a bogus page-table, while | ||
118 | * BAD_PAGE is used for a bogus page. | ||
119 | * | ||
120 | * ZERO_PAGE is a global shared page that is always zero: used | 117 | * ZERO_PAGE is a global shared page that is always zero: used |
121 | * for zero-mapped memory areas etc.. | 118 | * for zero-mapped memory areas etc.. |
122 | */ | 119 | */ |
123 | extern pte_t __bad_page(void); | ||
124 | extern pte_t * __bad_pagetable(void); | ||
125 | |||
126 | #define BAD_PAGETABLE __bad_pagetable() | ||
127 | #define BAD_PAGE __bad_page() | ||
128 | 120 | ||
129 | #define ZERO_PAGE(vaddr) virt_to_page(empty_zero_page) | 121 | #define ZERO_PAGE(vaddr) virt_to_page(empty_zero_page) |
130 | 122 | ||
diff --git a/include/asm-um/processor-generic.h b/include/asm-um/processor-generic.h index b953b1ad3b02..b2fc94fbc2d9 100644 --- a/include/asm-um/processor-generic.h +++ b/include/asm-um/processor-generic.h | |||
@@ -24,9 +24,6 @@ struct thread_struct { | |||
24 | int forking; | 24 | int forking; |
25 | int nsyscalls; | 25 | int nsyscalls; |
26 | struct pt_regs regs; | 26 | struct pt_regs regs; |
27 | unsigned long cr2; | ||
28 | int err; | ||
29 | unsigned long trap_no; | ||
30 | int singlestep_syscall; | 27 | int singlestep_syscall; |
31 | void *fault_addr; | 28 | void *fault_addr; |
32 | void *fault_catcher; | 29 | void *fault_catcher; |
@@ -74,8 +71,6 @@ struct thread_struct { | |||
74 | .forking = 0, \ | 71 | .forking = 0, \ |
75 | .nsyscalls = 0, \ | 72 | .nsyscalls = 0, \ |
76 | .regs = EMPTY_REGS, \ | 73 | .regs = EMPTY_REGS, \ |
77 | .cr2 = 0, \ | ||
78 | .err = 0, \ | ||
79 | .fault_addr = NULL, \ | 74 | .fault_addr = NULL, \ |
80 | .prev_sched = NULL, \ | 75 | .prev_sched = NULL, \ |
81 | .temp_stack = 0, \ | 76 | .temp_stack = 0, \ |
diff --git a/include/asm-um/processor-i386.h b/include/asm-um/processor-i386.h index 2deb8f1adbf1..431bad3ae9d7 100644 --- a/include/asm-um/processor-i386.h +++ b/include/asm-um/processor-i386.h | |||
@@ -9,13 +9,18 @@ | |||
9 | extern int host_has_xmm; | 9 | extern int host_has_xmm; |
10 | extern int host_has_cmov; | 10 | extern int host_has_cmov; |
11 | 11 | ||
12 | /* include faultinfo structure */ | ||
13 | #include "sysdep/faultinfo.h" | ||
14 | |||
12 | struct arch_thread { | 15 | struct arch_thread { |
13 | unsigned long debugregs[8]; | 16 | unsigned long debugregs[8]; |
14 | int debugregs_seq; | 17 | int debugregs_seq; |
18 | struct faultinfo faultinfo; | ||
15 | }; | 19 | }; |
16 | 20 | ||
17 | #define INIT_ARCH_THREAD { .debugregs = { [ 0 ... 7 ] = 0 }, \ | 21 | #define INIT_ARCH_THREAD { .debugregs = { [ 0 ... 7 ] = 0 }, \ |
18 | .debugregs_seq = 0 } | 22 | .debugregs_seq = 0, \ |
23 | .faultinfo = { 0, 0, 0 } } | ||
19 | 24 | ||
20 | #include "asm/arch/user.h" | 25 | #include "asm/arch/user.h" |
21 | 26 | ||
diff --git a/include/asm-um/processor-x86_64.h b/include/asm-um/processor-x86_64.h index a1ae3a4cd938..0beb9a42ae05 100644 --- a/include/asm-um/processor-x86_64.h +++ b/include/asm-um/processor-x86_64.h | |||
@@ -7,9 +7,13 @@ | |||
7 | #ifndef __UM_PROCESSOR_X86_64_H | 7 | #ifndef __UM_PROCESSOR_X86_64_H |
8 | #define __UM_PROCESSOR_X86_64_H | 8 | #define __UM_PROCESSOR_X86_64_H |
9 | 9 | ||
10 | #include "asm/arch/user.h" | 10 | /* include faultinfo structure */ |
11 | #include "sysdep/faultinfo.h" | ||
11 | 12 | ||
12 | struct arch_thread { | 13 | struct arch_thread { |
14 | unsigned long debugregs[8]; | ||
15 | int debugregs_seq; | ||
16 | struct faultinfo faultinfo; | ||
13 | }; | 17 | }; |
14 | 18 | ||
15 | /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ | 19 | /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */ |
@@ -20,7 +24,11 @@ extern inline void rep_nop(void) | |||
20 | 24 | ||
21 | #define cpu_relax() rep_nop() | 25 | #define cpu_relax() rep_nop() |
22 | 26 | ||
23 | #define INIT_ARCH_THREAD { } | 27 | #define INIT_ARCH_THREAD { .debugregs = { [ 0 ... 7 ] = 0 }, \ |
28 | .debugregs_seq = 0, \ | ||
29 | .faultinfo = { 0, 0, 0 } } | ||
30 | |||
31 | #include "asm/arch/user.h" | ||
24 | 32 | ||
25 | #define current_text_addr() \ | 33 | #define current_text_addr() \ |
26 | ({ void *pc; __asm__("movq $1f,%0\n1:":"=g" (pc)); pc; }) | 34 | ({ void *pc; __asm__("movq $1f,%0\n1:":"=g" (pc)); pc; }) |
diff --git a/include/asm-um/ptrace-i386.h b/include/asm-um/ptrace-i386.h index 9e47590ec293..04222f35c43e 100644 --- a/include/asm-um/ptrace-i386.h +++ b/include/asm-um/ptrace-i386.h | |||
@@ -6,6 +6,8 @@ | |||
6 | #ifndef __UM_PTRACE_I386_H | 6 | #ifndef __UM_PTRACE_I386_H |
7 | #define __UM_PTRACE_I386_H | 7 | #define __UM_PTRACE_I386_H |
8 | 8 | ||
9 | #define HOST_AUDIT_ARCH AUDIT_ARCH_I386 | ||
10 | |||
9 | #include "sysdep/ptrace.h" | 11 | #include "sysdep/ptrace.h" |
10 | #include "asm/ptrace-generic.h" | 12 | #include "asm/ptrace-generic.h" |
11 | 13 | ||
diff --git a/include/asm-um/ptrace-x86_64.h b/include/asm-um/ptrace-x86_64.h index c34be39b78b2..be51219a8ffe 100644 --- a/include/asm-um/ptrace-x86_64.h +++ b/include/asm-um/ptrace-x86_64.h | |||
@@ -14,6 +14,8 @@ | |||
14 | #include "asm/ptrace-generic.h" | 14 | #include "asm/ptrace-generic.h" |
15 | #undef signal_fault | 15 | #undef signal_fault |
16 | 16 | ||
17 | #define HOST_AUDIT_ARCH AUDIT_ARCH_X86_64 | ||
18 | |||
17 | void signal_fault(struct pt_regs_subarch *regs, void *frame, char *where); | 19 | void signal_fault(struct pt_regs_subarch *regs, void *frame, char *where); |
18 | 20 | ||
19 | #define FS_BASE (21 * sizeof(unsigned long)) | 21 | #define FS_BASE (21 * sizeof(unsigned long)) |
diff --git a/include/asm-um/setup.h b/include/asm-um/setup.h index c85252e803c1..99f086301f4c 100644 --- a/include/asm-um/setup.h +++ b/include/asm-um/setup.h | |||
@@ -2,7 +2,8 @@ | |||
2 | #define SETUP_H_INCLUDED | 2 | #define SETUP_H_INCLUDED |
3 | 3 | ||
4 | /* POSIX mandated with _POSIX_ARG_MAX that we can rely on 4096 chars in the | 4 | /* POSIX mandated with _POSIX_ARG_MAX that we can rely on 4096 chars in the |
5 | * command line, so this choice is ok.*/ | 5 | * command line, so this choice is ok. |
6 | */ | ||
6 | 7 | ||
7 | #define COMMAND_LINE_SIZE 4096 | 8 | #define COMMAND_LINE_SIZE 4096 |
8 | 9 | ||
diff --git a/include/asm-um/thread_info.h b/include/asm-um/thread_info.h index bffb577bc54e..1feaaf148ef1 100644 --- a/include/asm-um/thread_info.h +++ b/include/asm-um/thread_info.h | |||
@@ -41,18 +41,17 @@ struct thread_info { | |||
41 | #define init_thread_info (init_thread_union.thread_info) | 41 | #define init_thread_info (init_thread_union.thread_info) |
42 | #define init_stack (init_thread_union.stack) | 42 | #define init_stack (init_thread_union.stack) |
43 | 43 | ||
44 | #define THREAD_SIZE ((1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE) | ||
44 | /* how to get the thread information struct from C */ | 45 | /* how to get the thread information struct from C */ |
45 | static inline struct thread_info *current_thread_info(void) | 46 | static inline struct thread_info *current_thread_info(void) |
46 | { | 47 | { |
47 | struct thread_info *ti; | 48 | struct thread_info *ti; |
48 | unsigned long mask = PAGE_SIZE * | 49 | unsigned long mask = THREAD_SIZE - 1; |
49 | (1 << CONFIG_KERNEL_STACK_ORDER) - 1; | 50 | ti = (struct thread_info *) (((unsigned long) &ti) & ~mask); |
50 | ti = (struct thread_info *) (((unsigned long) &ti) & ~mask); | ||
51 | return ti; | 51 | return ti; |
52 | } | 52 | } |
53 | 53 | ||
54 | /* thread information allocation */ | 54 | /* thread information allocation */ |
55 | #define THREAD_SIZE ((1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE) | ||
56 | #define alloc_thread_info(tsk) \ | 55 | #define alloc_thread_info(tsk) \ |
57 | ((struct thread_info *) kmalloc(THREAD_SIZE, GFP_KERNEL)) | 56 | ((struct thread_info *) kmalloc(THREAD_SIZE, GFP_KERNEL)) |
58 | #define free_thread_info(ti) kfree(ti) | 57 | #define free_thread_info(ti) kfree(ti) |
@@ -62,7 +61,7 @@ static inline struct thread_info *current_thread_info(void) | |||
62 | 61 | ||
63 | #endif | 62 | #endif |
64 | 63 | ||
65 | #define PREEMPT_ACTIVE 0x4000000 | 64 | #define PREEMPT_ACTIVE 0x10000000 |
66 | 65 | ||
67 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ | 66 | #define TIF_SYSCALL_TRACE 0 /* syscall trace active */ |
68 | #define TIF_SIGPENDING 1 /* signal pending */ | 67 | #define TIF_SIGPENDING 1 /* signal pending */ |
@@ -72,12 +71,14 @@ static inline struct thread_info *current_thread_info(void) | |||
72 | */ | 71 | */ |
73 | #define TIF_RESTART_BLOCK 4 | 72 | #define TIF_RESTART_BLOCK 4 |
74 | #define TIF_MEMDIE 5 | 73 | #define TIF_MEMDIE 5 |
74 | #define TIF_SYSCALL_AUDIT 6 | ||
75 | 75 | ||
76 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) | 76 | #define _TIF_SYSCALL_TRACE (1 << TIF_SYSCALL_TRACE) |
77 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) | 77 | #define _TIF_SIGPENDING (1 << TIF_SIGPENDING) |
78 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) | 78 | #define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) |
79 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) | 79 | #define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) |
80 | #define _TIF_RESTART_BLOCK (1 << TIF_RESTART_BLOCK) | 80 | #define _TIF_MEMDIE (1 << TIF_MEMDIE) |
81 | #define _TIF_SYSCALL_AUDIT (1 << TIF_SYSCALL_AUDIT) | ||
81 | 82 | ||
82 | #endif | 83 | #endif |
83 | 84 | ||
diff --git a/include/asm-v850/signal.h b/include/asm-v850/signal.h index ec3566c875d9..cb52caa69925 100644 --- a/include/asm-v850/signal.h +++ b/include/asm-v850/signal.h | |||
@@ -110,17 +110,7 @@ typedef unsigned long sigset_t; | |||
110 | #define MINSIGSTKSZ 2048 | 110 | #define MINSIGSTKSZ 2048 |
111 | #define SIGSTKSZ 8192 | 111 | #define SIGSTKSZ 8192 |
112 | 112 | ||
113 | #define SIG_BLOCK 0 /* for blocking signals */ | 113 | #include <asm-generic/signal.h> |
114 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | ||
115 | #define SIG_SETMASK 2 /* for setting the signal mask */ | ||
116 | |||
117 | /* Type of a signal handler. */ | ||
118 | typedef void (*__sighandler_t)(int); | ||
119 | |||
120 | #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ | ||
121 | #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ | ||
122 | #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ | ||
123 | |||
124 | 114 | ||
125 | #ifdef __KERNEL__ | 115 | #ifdef __KERNEL__ |
126 | 116 | ||
diff --git a/include/asm-x86_64/agp.h b/include/asm-x86_64/agp.h index 0bb9019d58aa..06c52ee9c06b 100644 --- a/include/asm-x86_64/agp.h +++ b/include/asm-x86_64/agp.h | |||
@@ -19,4 +19,14 @@ int unmap_page_from_agp(struct page *page); | |||
19 | worth it. Would need a page for it. */ | 19 | worth it. Would need a page for it. */ |
20 | #define flush_agp_cache() asm volatile("wbinvd":::"memory") | 20 | #define flush_agp_cache() asm volatile("wbinvd":::"memory") |
21 | 21 | ||
22 | /* Convert a physical address to an address suitable for the GART. */ | ||
23 | #define phys_to_gart(x) (x) | ||
24 | #define gart_to_phys(x) (x) | ||
25 | |||
26 | /* GATT allocation. Returns/accepts GATT kernel virtual address. */ | ||
27 | #define alloc_gatt_pages(order) \ | ||
28 | ((char *)__get_free_pages(GFP_KERNEL, (order))) | ||
29 | #define free_gatt_pages(table, order) \ | ||
30 | free_pages((unsigned long)(table), (order)) | ||
31 | |||
22 | #endif | 32 | #endif |
diff --git a/include/asm-x86_64/apicdef.h b/include/asm-x86_64/apicdef.h index 3d7627ffe67d..bfebdb690654 100644 --- a/include/asm-x86_64/apicdef.h +++ b/include/asm-x86_64/apicdef.h | |||
@@ -112,7 +112,7 @@ | |||
112 | 112 | ||
113 | #define APIC_BASE (fix_to_virt(FIX_APIC_BASE)) | 113 | #define APIC_BASE (fix_to_virt(FIX_APIC_BASE)) |
114 | 114 | ||
115 | #define MAX_IO_APICS 32 | 115 | #define MAX_IO_APICS 128 |
116 | 116 | ||
117 | /* | 117 | /* |
118 | * All x86-64 systems are xAPIC compatible. | 118 | * All x86-64 systems are xAPIC compatible. |
diff --git a/include/asm-x86_64/bug.h b/include/asm-x86_64/bug.h index bdbf66eab6ee..3d2a666a5dd5 100644 --- a/include/asm-x86_64/bug.h +++ b/include/asm-x86_64/bug.h | |||
@@ -21,6 +21,8 @@ struct bug_frame { | |||
21 | asm volatile("ud2 ; .quad %c1 ; .short %c0" :: \ | 21 | asm volatile("ud2 ; .quad %c1 ; .short %c0" :: \ |
22 | "i"(__LINE__), "i" (__stringify(__FILE__))) | 22 | "i"(__LINE__), "i" (__stringify(__FILE__))) |
23 | void out_of_line_bug(void); | 23 | void out_of_line_bug(void); |
24 | #else | ||
25 | static inline void out_of_line_bug(void) { } | ||
24 | #endif | 26 | #endif |
25 | 27 | ||
26 | #include <asm-generic/bug.h> | 28 | #include <asm-generic/bug.h> |
diff --git a/include/asm-x86_64/floppy.h b/include/asm-x86_64/floppy.h index bca9b28a1a0a..af7ded63b517 100644 --- a/include/asm-x86_64/floppy.h +++ b/include/asm-x86_64/floppy.h | |||
@@ -223,7 +223,7 @@ static int hard_dma_setup(char *addr, unsigned long size, int mode, int io) | |||
223 | return 0; | 223 | return 0; |
224 | } | 224 | } |
225 | 225 | ||
226 | struct fd_routine_l { | 226 | static struct fd_routine_l { |
227 | int (*_request_dma)(unsigned int dmanr, const char * device_id); | 227 | int (*_request_dma)(unsigned int dmanr, const char * device_id); |
228 | void (*_free_dma)(unsigned int dmanr); | 228 | void (*_free_dma)(unsigned int dmanr); |
229 | int (*_get_dma_residue)(unsigned int dummy); | 229 | int (*_get_dma_residue)(unsigned int dummy); |
diff --git a/include/asm-x86_64/io_apic.h b/include/asm-x86_64/io_apic.h index 7efc932e8f0b..32573749004c 100644 --- a/include/asm-x86_64/io_apic.h +++ b/include/asm-x86_64/io_apic.h | |||
@@ -202,7 +202,6 @@ extern int skip_ioapic_setup; | |||
202 | #define io_apic_assign_pci_irqs (mp_irq_entries && !skip_ioapic_setup && io_apic_irqs) | 202 | #define io_apic_assign_pci_irqs (mp_irq_entries && !skip_ioapic_setup && io_apic_irqs) |
203 | 203 | ||
204 | #ifdef CONFIG_ACPI_BOOT | 204 | #ifdef CONFIG_ACPI_BOOT |
205 | extern int io_apic_get_unique_id (int ioapic, int apic_id); | ||
206 | extern int io_apic_get_version (int ioapic); | 205 | extern int io_apic_get_version (int ioapic); |
207 | extern int io_apic_get_redir_entries (int ioapic); | 206 | extern int io_apic_get_redir_entries (int ioapic); |
208 | extern int io_apic_set_pci_routing (int ioapic, int pin, int irq, int, int); | 207 | extern int io_apic_set_pci_routing (int ioapic, int pin, int irq, int, int); |
diff --git a/include/asm-x86_64/ioctl32.h b/include/asm-x86_64/ioctl32.h deleted file mode 100644 index d0d227f45e05..000000000000 --- a/include/asm-x86_64/ioctl32.h +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | #include <linux/ioctl32.h> | ||
diff --git a/include/asm-x86_64/nmi.h b/include/asm-x86_64/nmi.h index 21d56b086b9d..d3abfc6a8fd5 100644 --- a/include/asm-x86_64/nmi.h +++ b/include/asm-x86_64/nmi.h | |||
@@ -53,5 +53,7 @@ extern void die_nmi(char *str, struct pt_regs *regs); | |||
53 | 53 | ||
54 | extern int panic_on_timeout; | 54 | extern int panic_on_timeout; |
55 | extern int unknown_nmi_panic; | 55 | extern int unknown_nmi_panic; |
56 | |||
57 | extern int check_nmi_watchdog(void); | ||
56 | 58 | ||
57 | #endif /* ASM_NMI_H */ | 59 | #endif /* ASM_NMI_H */ |
diff --git a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h index f0581c35628e..d641b19f6da5 100644 --- a/include/asm-x86_64/processor.h +++ b/include/asm-x86_64/processor.h | |||
@@ -62,7 +62,6 @@ struct cpuinfo_x86 { | |||
62 | int x86_tlbsize; /* number of 4K pages in DTLB/ITLB combined(in pages)*/ | 62 | int x86_tlbsize; /* number of 4K pages in DTLB/ITLB combined(in pages)*/ |
63 | __u8 x86_virt_bits, x86_phys_bits; | 63 | __u8 x86_virt_bits, x86_phys_bits; |
64 | __u8 x86_num_cores; | 64 | __u8 x86_num_cores; |
65 | __u8 x86_apicid; | ||
66 | __u32 x86_power; | 65 | __u32 x86_power; |
67 | __u32 extended_cpuid_level; /* Max extended CPUID function supported */ | 66 | __u32 extended_cpuid_level; /* Max extended CPUID function supported */ |
68 | unsigned long loops_per_jiffy; | 67 | unsigned long loops_per_jiffy; |
@@ -159,9 +158,9 @@ static inline void clear_in_cr4 (unsigned long mask) | |||
159 | 158 | ||
160 | 159 | ||
161 | /* | 160 | /* |
162 | * User space process size. 47bits. | 161 | * User space process size. 47bits minus one guard page. |
163 | */ | 162 | */ |
164 | #define TASK_SIZE (0x800000000000UL) | 163 | #define TASK_SIZE (0x800000000000UL - 4096) |
165 | 164 | ||
166 | /* This decides where the kernel will search for a free chunk of vm | 165 | /* This decides where the kernel will search for a free chunk of vm |
167 | * space during mmap's. | 166 | * space during mmap's. |
diff --git a/include/asm-x86_64/proto.h b/include/asm-x86_64/proto.h index d0f8f8b4c394..f2f073642d62 100644 --- a/include/asm-x86_64/proto.h +++ b/include/asm-x86_64/proto.h | |||
@@ -30,6 +30,11 @@ extern void ia32_syscall(void); | |||
30 | extern void iommu_hole_init(void); | 30 | extern void iommu_hole_init(void); |
31 | 31 | ||
32 | extern void time_init_gtod(void); | 32 | extern void time_init_gtod(void); |
33 | extern int pmtimer_mark_offset(void); | ||
34 | extern unsigned int do_gettimeoffset_pm(void); | ||
35 | extern u32 pmtmr_ioport; | ||
36 | extern unsigned long long monotonic_base; | ||
37 | extern int sysctl_vsyscall; | ||
33 | 38 | ||
34 | extern void do_softirq_thunk(void); | 39 | extern void do_softirq_thunk(void); |
35 | 40 | ||
diff --git a/include/asm-x86_64/signal.h b/include/asm-x86_64/signal.h index 4987ad8082ba..fe9b96d94815 100644 --- a/include/asm-x86_64/signal.h +++ b/include/asm-x86_64/signal.h | |||
@@ -116,21 +116,9 @@ typedef unsigned long sigset_t; | |||
116 | #define MINSIGSTKSZ 2048 | 116 | #define MINSIGSTKSZ 2048 |
117 | #define SIGSTKSZ 8192 | 117 | #define SIGSTKSZ 8192 |
118 | 118 | ||
119 | #define SIG_BLOCK 0 /* for blocking signals */ | 119 | #include <asm-generic/signal.h> |
120 | #define SIG_UNBLOCK 1 /* for unblocking signals */ | ||
121 | #define SIG_SETMASK 2 /* for setting the signal mask */ | ||
122 | 120 | ||
123 | #ifndef __ASSEMBLY__ | 121 | #ifndef __ASSEMBLY__ |
124 | /* Type of a signal handler. */ | ||
125 | typedef void __signalfn_t(int); | ||
126 | typedef __signalfn_t __user *__sighandler_t; | ||
127 | |||
128 | typedef void __restorefn_t(void); | ||
129 | typedef __restorefn_t __user *__sigrestore_t; | ||
130 | |||
131 | #define SIG_DFL ((__sighandler_t)0) /* default signal handling */ | ||
132 | #define SIG_IGN ((__sighandler_t)1) /* ignore signal */ | ||
133 | #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */ | ||
134 | 122 | ||
135 | struct sigaction { | 123 | struct sigaction { |
136 | __sighandler_t sa_handler; | 124 | __sighandler_t sa_handler; |
diff --git a/include/asm-x86_64/vsyscall.h b/include/asm-x86_64/vsyscall.h index b0c8d4339906..2872da23fc7e 100644 --- a/include/asm-x86_64/vsyscall.h +++ b/include/asm-x86_64/vsyscall.h | |||
@@ -25,6 +25,7 @@ enum vsyscall_num { | |||
25 | 25 | ||
26 | #define VXTIME_TSC 1 | 26 | #define VXTIME_TSC 1 |
27 | #define VXTIME_HPET 2 | 27 | #define VXTIME_HPET 2 |
28 | #define VXTIME_PMTMR 3 | ||
28 | 29 | ||
29 | struct vxtime_data { | 30 | struct vxtime_data { |
30 | long hpet_address; /* HPET base address */ | 31 | long hpet_address; /* HPET base address */ |
@@ -54,6 +55,8 @@ extern struct timezone sys_tz; | |||
54 | extern int sysctl_vsyscall; | 55 | extern int sysctl_vsyscall; |
55 | extern seqlock_t xtime_lock; | 56 | extern seqlock_t xtime_lock; |
56 | 57 | ||
58 | extern int sysctl_vsyscall; | ||
59 | |||
57 | #define ARCH_HAVE_XTIME_LOCK 1 | 60 | #define ARCH_HAVE_XTIME_LOCK 1 |
58 | 61 | ||
59 | #endif /* __KERNEL__ */ | 62 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index aefe6d051ace..b123cc08773d 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -25,6 +25,10 @@ | |||
25 | #ifndef _LINUX_ACPI_H | 25 | #ifndef _LINUX_ACPI_H |
26 | #define _LINUX_ACPI_H | 26 | #define _LINUX_ACPI_H |
27 | 27 | ||
28 | #include <linux/config.h> | ||
29 | |||
30 | #ifdef CONFIG_ACPI | ||
31 | |||
28 | #ifndef _LINUX | 32 | #ifndef _LINUX |
29 | #define _LINUX | 33 | #define _LINUX |
30 | #endif | 34 | #endif |
@@ -533,4 +537,5 @@ static inline int acpi_get_pxm(acpi_handle handle) | |||
533 | 537 | ||
534 | extern int pnpacpi_disabled; | 538 | extern int pnpacpi_disabled; |
535 | 539 | ||
536 | #endif /*_LINUX_ACPI_H*/ | 540 | #endif /* CONFIG_ACPI */ |
541 | #endif /*_LINUX_ACPI_H*/ | ||
diff --git a/include/linux/audit.h b/include/linux/audit.h index 3628f7cfb178..19f04b049798 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* audit.h -- Auditing support -*- linux-c -*- | 1 | /* audit.h -- Auditing support |
2 | * | 2 | * |
3 | * Copyright 2003-2004 Red Hat Inc., Durham, North Carolina. | 3 | * Copyright 2003-2004 Red Hat Inc., Durham, North Carolina. |
4 | * All Rights Reserved. | 4 | * All Rights Reserved. |
@@ -24,6 +24,9 @@ | |||
24 | #ifndef _LINUX_AUDIT_H_ | 24 | #ifndef _LINUX_AUDIT_H_ |
25 | #define _LINUX_AUDIT_H_ | 25 | #define _LINUX_AUDIT_H_ |
26 | 26 | ||
27 | #include <linux/sched.h> | ||
28 | #include <linux/elf.h> | ||
29 | |||
27 | /* Request and reply types */ | 30 | /* Request and reply types */ |
28 | #define AUDIT_GET 1000 /* Get status */ | 31 | #define AUDIT_GET 1000 /* Get status */ |
29 | #define AUDIT_SET 1001 /* Set status (enable/disable/auditd) */ | 32 | #define AUDIT_SET 1001 /* Set status (enable/disable/auditd) */ |
@@ -67,6 +70,7 @@ | |||
67 | #define AUDIT_FSGID 8 | 70 | #define AUDIT_FSGID 8 |
68 | #define AUDIT_LOGINUID 9 | 71 | #define AUDIT_LOGINUID 9 |
69 | #define AUDIT_PERS 10 | 72 | #define AUDIT_PERS 10 |
73 | #define AUDIT_ARCH 11 | ||
70 | 74 | ||
71 | /* These are ONLY useful when checking | 75 | /* These are ONLY useful when checking |
72 | * at syscall exit time (AUDIT_AT_EXIT). */ | 76 | * at syscall exit time (AUDIT_AT_EXIT). */ |
@@ -96,6 +100,38 @@ | |||
96 | #define AUDIT_FAIL_PRINTK 1 | 100 | #define AUDIT_FAIL_PRINTK 1 |
97 | #define AUDIT_FAIL_PANIC 2 | 101 | #define AUDIT_FAIL_PANIC 2 |
98 | 102 | ||
103 | /* distinguish syscall tables */ | ||
104 | #define __AUDIT_ARCH_64BIT 0x80000000 | ||
105 | #define __AUDIT_ARCH_LE 0x40000000 | ||
106 | #define AUDIT_ARCH_ALPHA (EM_ALPHA|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | ||
107 | #define AUDIT_ARCH_ARM (EM_ARM|__AUDIT_ARCH_LE) | ||
108 | #define AUDIT_ARCH_ARMEB (EM_ARM) | ||
109 | #define AUDIT_ARCH_CRIS (EM_CRIS|__AUDIT_ARCH_LE) | ||
110 | #define AUDIT_ARCH_FRV (EM_FRV) | ||
111 | #define AUDIT_ARCH_H8300 (EM_H8_300) | ||
112 | #define AUDIT_ARCH_I386 (EM_386|__AUDIT_ARCH_LE) | ||
113 | #define AUDIT_ARCH_IA64 (EM_IA_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | ||
114 | #define AUDIT_ARCH_M32R (EM_M32R) | ||
115 | #define AUDIT_ARCH_M68K (EM_68K) | ||
116 | #define AUDIT_ARCH_MIPS (EM_MIPS) | ||
117 | #define AUDIT_ARCH_MIPSEL (EM_MIPS|__AUDIT_ARCH_LE) | ||
118 | #define AUDIT_ARCH_MIPS64 (EM_MIPS|__AUDIT_ARCH_64BIT) | ||
119 | #define AUDIT_ARCH_MIPSEL64 (EM_MIPS|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | ||
120 | #define AUDIT_ARCH_PARISC (EM_PARISC) | ||
121 | #define AUDIT_ARCH_PARISC64 (EM_PARISC|__AUDIT_ARCH_64BIT) | ||
122 | #define AUDIT_ARCH_PPC (EM_PPC) | ||
123 | #define AUDIT_ARCH_PPC64 (EM_PPC64|__AUDIT_ARCH_64BIT) | ||
124 | #define AUDIT_ARCH_S390 (EM_S390) | ||
125 | #define AUDIT_ARCH_S390X (EM_S390|__AUDIT_ARCH_64BIT) | ||
126 | #define AUDIT_ARCH_SH (EM_SH) | ||
127 | #define AUDIT_ARCH_SHEL (EM_SH|__AUDIT_ARCH_LE) | ||
128 | #define AUDIT_ARCH_SH64 (EM_SH|__AUDIT_ARCH_64BIT) | ||
129 | #define AUDIT_ARCH_SHEL64 (EM_SH|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | ||
130 | #define AUDIT_ARCH_SPARC (EM_SPARC) | ||
131 | #define AUDIT_ARCH_SPARC64 (EM_SPARC64|__AUDIT_ARCH_64BIT) | ||
132 | #define AUDIT_ARCH_V850 (EM_V850|__AUDIT_ARCH_LE) | ||
133 | #define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | ||
134 | |||
99 | #ifndef __KERNEL__ | 135 | #ifndef __KERNEL__ |
100 | struct audit_message { | 136 | struct audit_message { |
101 | struct nlmsghdr nlh; | 137 | struct nlmsghdr nlh; |
@@ -129,32 +165,36 @@ struct audit_buffer; | |||
129 | struct audit_context; | 165 | struct audit_context; |
130 | struct inode; | 166 | struct inode; |
131 | 167 | ||
168 | #define AUDITSC_INVALID 0 | ||
169 | #define AUDITSC_SUCCESS 1 | ||
170 | #define AUDITSC_FAILURE 2 | ||
171 | #define AUDITSC_RESULT(x) ( ((long)(x))<0?AUDITSC_FAILURE:AUDITSC_SUCCESS ) | ||
132 | #ifdef CONFIG_AUDITSYSCALL | 172 | #ifdef CONFIG_AUDITSYSCALL |
133 | /* These are defined in auditsc.c */ | 173 | /* These are defined in auditsc.c */ |
134 | /* Public API */ | 174 | /* Public API */ |
135 | extern int audit_alloc(struct task_struct *task); | 175 | extern int audit_alloc(struct task_struct *task); |
136 | extern void audit_free(struct task_struct *task); | 176 | extern void audit_free(struct task_struct *task); |
137 | extern void audit_syscall_entry(struct task_struct *task, | 177 | extern void audit_syscall_entry(struct task_struct *task, int arch, |
138 | int major, unsigned long a0, unsigned long a1, | 178 | int major, unsigned long a0, unsigned long a1, |
139 | unsigned long a2, unsigned long a3); | 179 | unsigned long a2, unsigned long a3); |
140 | extern void audit_syscall_exit(struct task_struct *task, int return_code); | 180 | extern void audit_syscall_exit(struct task_struct *task, int failed, long return_code); |
141 | extern void audit_getname(const char *name); | 181 | extern void audit_getname(const char *name); |
142 | extern void audit_putname(const char *name); | 182 | extern void audit_putname(const char *name); |
143 | extern void audit_inode(const char *name, const struct inode *inode); | 183 | extern void audit_inode(const char *name, const struct inode *inode); |
144 | 184 | ||
145 | /* Private API (for audit.c only) */ | 185 | /* Private API (for audit.c only) */ |
146 | extern int audit_receive_filter(int type, int pid, int uid, int seq, | 186 | extern int audit_receive_filter(int type, int pid, int uid, int seq, |
147 | void *data); | 187 | void *data, uid_t loginuid); |
148 | extern void audit_get_stamp(struct audit_context *ctx, | 188 | extern void audit_get_stamp(struct audit_context *ctx, |
149 | struct timespec *t, int *serial); | 189 | struct timespec *t, unsigned int *serial); |
150 | extern int audit_set_loginuid(struct audit_context *ctx, uid_t loginuid); | 190 | extern int audit_set_loginuid(struct task_struct *task, uid_t loginuid); |
151 | extern uid_t audit_get_loginuid(struct audit_context *ctx); | 191 | extern uid_t audit_get_loginuid(struct audit_context *ctx); |
152 | extern int audit_ipc_perms(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode); | 192 | extern int audit_ipc_perms(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode); |
153 | #else | 193 | #else |
154 | #define audit_alloc(t) ({ 0; }) | 194 | #define audit_alloc(t) ({ 0; }) |
155 | #define audit_free(t) do { ; } while (0) | 195 | #define audit_free(t) do { ; } while (0) |
156 | #define audit_syscall_entry(t,a,b,c,d,e) do { ; } while (0) | 196 | #define audit_syscall_entry(t,ta,a,b,c,d,e) do { ; } while (0) |
157 | #define audit_syscall_exit(t,r) do { ; } while (0) | 197 | #define audit_syscall_exit(t,f,r) do { ; } while (0) |
158 | #define audit_getname(n) do { ; } while (0) | 198 | #define audit_getname(n) do { ; } while (0) |
159 | #define audit_putname(n) do { ; } while (0) | 199 | #define audit_putname(n) do { ; } while (0) |
160 | #define audit_inode(n,i) do { ; } while (0) | 200 | #define audit_inode(n,i) do { ; } while (0) |
@@ -174,11 +214,15 @@ extern void audit_log_format(struct audit_buffer *ab, | |||
174 | const char *fmt, ...) | 214 | const char *fmt, ...) |
175 | __attribute__((format(printf,2,3))); | 215 | __attribute__((format(printf,2,3))); |
176 | extern void audit_log_end(struct audit_buffer *ab); | 216 | extern void audit_log_end(struct audit_buffer *ab); |
217 | extern void audit_log_hex(struct audit_buffer *ab, | ||
218 | const unsigned char *buf, | ||
219 | size_t len); | ||
220 | extern void audit_log_untrustedstring(struct audit_buffer *ab, | ||
221 | const char *string); | ||
177 | extern void audit_log_d_path(struct audit_buffer *ab, | 222 | extern void audit_log_d_path(struct audit_buffer *ab, |
178 | const char *prefix, | 223 | const char *prefix, |
179 | struct dentry *dentry, | 224 | struct dentry *dentry, |
180 | struct vfsmount *vfsmnt); | 225 | struct vfsmount *vfsmnt); |
181 | |||
182 | /* Private API (for auditsc.c only) */ | 226 | /* Private API (for auditsc.c only) */ |
183 | extern void audit_send_reply(int pid, int seq, int type, | 227 | extern void audit_send_reply(int pid, int seq, int type, |
184 | int done, int multi, | 228 | int done, int multi, |
@@ -190,6 +234,8 @@ extern void audit_log_lost(const char *message); | |||
190 | #define audit_log_vformat(b,f,a) do { ; } while (0) | 234 | #define audit_log_vformat(b,f,a) do { ; } while (0) |
191 | #define audit_log_format(b,f,...) do { ; } while (0) | 235 | #define audit_log_format(b,f,...) do { ; } while (0) |
192 | #define audit_log_end(b) do { ; } while (0) | 236 | #define audit_log_end(b) do { ; } while (0) |
237 | #define audit_log_hex(a,b,l) do { ; } while (0) | ||
238 | #define audit_log_untrustedstring(a,s) do { ; } while (0) | ||
193 | #define audit_log_d_path(b,p,d,v) do { ; } while (0) | 239 | #define audit_log_d_path(b,p,d,v) do { ; } while (0) |
194 | #endif | 240 | #endif |
195 | #endif | 241 | #endif |
diff --git a/include/linux/awe_voice.h b/include/linux/awe_voice.h index da0e27de752c..4bf9f33048e2 100644 --- a/include/linux/awe_voice.h +++ b/include/linux/awe_voice.h | |||
@@ -29,9 +29,9 @@ | |||
29 | #define SAMPLE_TYPE_AWE32 0x20 | 29 | #define SAMPLE_TYPE_AWE32 0x20 |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | #ifndef _PATCHKEY | 32 | #define _LINUX_PATCHKEY_H_INDIRECT |
33 | #define _PATCHKEY(id) ((id<<8)|0xfd) | 33 | #include <linux/patchkey.h> |
34 | #endif | 34 | #undef _LINUX_PATCHKEY_H_INDIRECT |
35 | 35 | ||
36 | /*---------------------------------------------------------------- | 36 | /*---------------------------------------------------------------- |
37 | * patch information record | 37 | * patch information record |
diff --git a/include/linux/binfmts.h b/include/linux/binfmts.h index 54f820832c73..7e736e201c46 100644 --- a/include/linux/binfmts.h +++ b/include/linux/binfmts.h | |||
@@ -77,7 +77,6 @@ extern int flush_old_exec(struct linux_binprm * bprm); | |||
77 | extern int setup_arg_pages(struct linux_binprm * bprm, | 77 | extern int setup_arg_pages(struct linux_binprm * bprm, |
78 | unsigned long stack_top, | 78 | unsigned long stack_top, |
79 | int executable_stack); | 79 | int executable_stack); |
80 | extern int copy_strings(int argc,char __user * __user * argv,struct linux_binprm *bprm); | ||
81 | extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm); | 80 | extern int copy_strings_kernel(int argc,char ** argv,struct linux_binprm *bprm); |
82 | extern void compute_creds(struct linux_binprm *binprm); | 81 | extern void compute_creds(struct linux_binprm *binprm); |
83 | extern int do_coredump(long signr, int exit_code, struct pt_regs * regs); | 82 | extern int do_coredump(long signr, int exit_code, struct pt_regs * regs); |
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index f21af067d015..927daa86c9b3 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h | |||
@@ -49,7 +49,7 @@ int cpufreq_unregister_notifier(struct notifier_block *nb, unsigned int list); | |||
49 | /* Frequency values here are CPU kHz so that hardware which doesn't run | 49 | /* Frequency values here are CPU kHz so that hardware which doesn't run |
50 | * with some frequencies can complain without having to guess what per | 50 | * with some frequencies can complain without having to guess what per |
51 | * cent / per mille means. | 51 | * cent / per mille means. |
52 | * Maximum transition latency is in microseconds - if it's unknown, | 52 | * Maximum transition latency is in nanoseconds - if it's unknown, |
53 | * CPUFREQ_ETERNAL shall be used. | 53 | * CPUFREQ_ETERNAL shall be used. |
54 | */ | 54 | */ |
55 | 55 | ||
diff --git a/include/linux/device.h b/include/linux/device.h index cf470459fa69..df94c0de53f2 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -273,9 +273,6 @@ struct device { | |||
273 | BIOS data relevant to device) */ | 273 | BIOS data relevant to device) */ |
274 | struct dev_pm_info power; | 274 | struct dev_pm_info power; |
275 | 275 | ||
276 | u32 detach_state; /* State to enter when device is | ||
277 | detached from its driver. */ | ||
278 | |||
279 | u64 *dma_mask; /* dma mask (if dma'able device) */ | 276 | u64 *dma_mask; /* dma mask (if dma'able device) */ |
280 | u64 coherent_dma_mask;/* Like dma_mask, but for | 277 | u64 coherent_dma_mask;/* Like dma_mask, but for |
281 | alloc_coherent mappings as | 278 | alloc_coherent mappings as |
diff --git a/include/linux/err.h b/include/linux/err.h index 17c55df13615..ff71d2af5da3 100644 --- a/include/linux/err.h +++ b/include/linux/err.h | |||
@@ -13,6 +13,8 @@ | |||
13 | * This should be a per-architecture thing, to allow different | 13 | * This should be a per-architecture thing, to allow different |
14 | * error and pointer decisions. | 14 | * error and pointer decisions. |
15 | */ | 15 | */ |
16 | #define IS_ERR_VALUE(x) unlikely((x) > (unsigned long)-1000L) | ||
17 | |||
16 | static inline void *ERR_PTR(long error) | 18 | static inline void *ERR_PTR(long error) |
17 | { | 19 | { |
18 | return (void *) error; | 20 | return (void *) error; |
@@ -25,7 +27,7 @@ static inline long PTR_ERR(const void *ptr) | |||
25 | 27 | ||
26 | static inline long IS_ERR(const void *ptr) | 28 | static inline long IS_ERR(const void *ptr) |
27 | { | 29 | { |
28 | return unlikely((unsigned long)ptr > (unsigned long)-1000L); | 30 | return IS_ERR_VALUE((unsigned long)ptr); |
29 | } | 31 | } |
30 | 32 | ||
31 | #endif /* _LINUX_ERR_H */ | 33 | #endif /* _LINUX_ERR_H */ |
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index 396c48cbaeb1..a1478258d002 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * Version: @(#)eth.h 1.0.4 05/13/93 | 8 | * Version: @(#)eth.h 1.0.4 05/13/93 |
9 | * | 9 | * |
10 | * Authors: Ross Biro, <bir7@leland.Stanford.Edu> | 10 | * Authors: Ross Biro |
11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
12 | * | 12 | * |
13 | * Relocated to include/linux where it belongs by Alan Cox | 13 | * Relocated to include/linux where it belongs by Alan Cox |
@@ -56,18 +56,32 @@ static inline int is_zero_ether_addr(const u8 *addr) | |||
56 | } | 56 | } |
57 | 57 | ||
58 | /** | 58 | /** |
59 | * is_multicast_ether_addr - Determine if the given Ethernet address is a | ||
60 | * multicast address. | ||
61 | * | ||
62 | * @addr: Pointer to a six-byte array containing the Ethernet address | ||
63 | * | ||
64 | * Return true if the address is a multicast address. | ||
65 | */ | ||
66 | static inline int is_multicast_ether_addr(const u8 *addr) | ||
67 | { | ||
68 | return addr[0] & 0x01; | ||
69 | } | ||
70 | |||
71 | /** | ||
59 | * is_valid_ether_addr - Determine if the given Ethernet address is valid | 72 | * is_valid_ether_addr - Determine if the given Ethernet address is valid |
60 | * @addr: Pointer to a six-byte array containing the Ethernet address | 73 | * @addr: Pointer to a six-byte array containing the Ethernet address |
61 | * | 74 | * |
62 | * Check that the Ethernet address (MAC) is not 00:00:00:00:00:00, is not | 75 | * Check that the Ethernet address (MAC) is not 00:00:00:00:00:00, is not |
63 | * a multicast address, and is not FF:FF:FF:FF:FF:FF. The multicast | 76 | * a multicast address, and is not FF:FF:FF:FF:FF:FF. |
64 | * and FF:FF:... tests are combined into the single test "!(addr[0]&1)". | ||
65 | * | 77 | * |
66 | * Return true if the address is valid. | 78 | * Return true if the address is valid. |
67 | */ | 79 | */ |
68 | static inline int is_valid_ether_addr(const u8 *addr) | 80 | static inline int is_valid_ether_addr(const u8 *addr) |
69 | { | 81 | { |
70 | return !(addr[0]&1) && !is_zero_ether_addr(addr); | 82 | /* FF:FF:FF:FF:FF:FF is a multicast address so we don't need to |
83 | * explicitly check for it here. */ | ||
84 | return !is_multicast_ether_addr(addr) && !is_zero_ether_addr(addr); | ||
71 | } | 85 | } |
72 | 86 | ||
73 | /** | 87 | /** |
@@ -83,6 +97,6 @@ static inline void random_ether_addr(u8 *addr) | |||
83 | addr [0] &= 0xfe; /* clear multicast bit */ | 97 | addr [0] &= 0xfe; /* clear multicast bit */ |
84 | addr [0] |= 0x02; /* set local assignment bit (IEEE802) */ | 98 | addr [0] |= 0x02; /* set local assignment bit (IEEE802) */ |
85 | } | 99 | } |
86 | #endif | 100 | #endif /* __KERNEL__ */ |
87 | 101 | ||
88 | #endif /* _LINUX_ETHERDEVICE_H */ | 102 | #endif /* _LINUX_ETHERDEVICE_H */ |
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index c85b210490ea..a0ab26aab450 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
@@ -256,6 +256,7 @@ struct net_device; | |||
256 | u32 ethtool_op_get_link(struct net_device *dev); | 256 | u32 ethtool_op_get_link(struct net_device *dev); |
257 | u32 ethtool_op_get_tx_csum(struct net_device *dev); | 257 | u32 ethtool_op_get_tx_csum(struct net_device *dev); |
258 | int ethtool_op_set_tx_csum(struct net_device *dev, u32 data); | 258 | int ethtool_op_set_tx_csum(struct net_device *dev, u32 data); |
259 | int ethtool_op_set_tx_hw_csum(struct net_device *dev, u32 data); | ||
259 | u32 ethtool_op_get_sg(struct net_device *dev); | 260 | u32 ethtool_op_get_sg(struct net_device *dev); |
260 | int ethtool_op_set_sg(struct net_device *dev, u32 data); | 261 | int ethtool_op_set_sg(struct net_device *dev, u32 data); |
261 | u32 ethtool_op_get_tso(struct net_device *dev); | 262 | u32 ethtool_op_get_tso(struct net_device *dev); |
diff --git a/include/linux/fddidevice.h b/include/linux/fddidevice.h index 2e5ee47f3e1e..002f6367697d 100644 --- a/include/linux/fddidevice.h +++ b/include/linux/fddidevice.h | |||
@@ -10,7 +10,7 @@ | |||
10 | * Author: Lawrence V. Stefani, <stefani@lkg.dec.com> | 10 | * Author: Lawrence V. Stefani, <stefani@lkg.dec.com> |
11 | * | 11 | * |
12 | * fddidevice.h is based on previous trdevice.h work by | 12 | * fddidevice.h is based on previous trdevice.h work by |
13 | * Ross Biro, <bir7@leland.Stanford.Edu> | 13 | * Ross Biro |
14 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 14 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
15 | * Alan Cox, <gw4pts@gw4pts.ampr.org> | 15 | * Alan Cox, <gw4pts@gw4pts.ampr.org> |
16 | * | 16 | * |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 4edba067a717..0180102dace1 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1341,7 +1341,7 @@ extern int fs_may_remount_ro(struct super_block *); | |||
1341 | 1341 | ||
1342 | extern int check_disk_change(struct block_device *); | 1342 | extern int check_disk_change(struct block_device *); |
1343 | extern int invalidate_inodes(struct super_block *); | 1343 | extern int invalidate_inodes(struct super_block *); |
1344 | extern int __invalidate_device(struct block_device *, int); | 1344 | extern int __invalidate_device(struct block_device *); |
1345 | extern int invalidate_partition(struct gendisk *, int); | 1345 | extern int invalidate_partition(struct gendisk *, int); |
1346 | unsigned long invalidate_mapping_pages(struct address_space *mapping, | 1346 | unsigned long invalidate_mapping_pages(struct address_space *mapping, |
1347 | pgoff_t start, pgoff_t end); | 1347 | pgoff_t start, pgoff_t end); |
diff --git a/include/linux/gameport.h b/include/linux/gameport.h index b1272f822cfa..cd623eccdbea 100644 --- a/include/linux/gameport.h +++ b/include/linux/gameport.h | |||
@@ -67,6 +67,8 @@ int gameport_open(struct gameport *gameport, struct gameport_driver *drv, int mo | |||
67 | void gameport_close(struct gameport *gameport); | 67 | void gameport_close(struct gameport *gameport); |
68 | void gameport_rescan(struct gameport *gameport); | 68 | void gameport_rescan(struct gameport *gameport); |
69 | 69 | ||
70 | #if defined(CONFIG_GAMEPORT) || (defined(MODULE) && defined(CONFIG_GAMEPORT_MODULE)) | ||
71 | |||
70 | void __gameport_register_port(struct gameport *gameport, struct module *owner); | 72 | void __gameport_register_port(struct gameport *gameport, struct module *owner); |
71 | static inline void gameport_register_port(struct gameport *gameport) | 73 | static inline void gameport_register_port(struct gameport *gameport) |
72 | { | 74 | { |
@@ -75,6 +77,29 @@ static inline void gameport_register_port(struct gameport *gameport) | |||
75 | 77 | ||
76 | void gameport_unregister_port(struct gameport *gameport); | 78 | void gameport_unregister_port(struct gameport *gameport); |
77 | 79 | ||
80 | void gameport_set_phys(struct gameport *gameport, const char *fmt, ...) | ||
81 | __attribute__ ((format (printf, 2, 3))); | ||
82 | |||
83 | #else | ||
84 | |||
85 | static inline void gameport_register_port(struct gameport *gameport) | ||
86 | { | ||
87 | return; | ||
88 | } | ||
89 | |||
90 | static inline void gameport_unregister_port(struct gameport *gameport) | ||
91 | { | ||
92 | return; | ||
93 | } | ||
94 | |||
95 | static inline void gameport_set_phys(struct gameport *gameport, | ||
96 | const char *fmt, ...) | ||
97 | { | ||
98 | return; | ||
99 | } | ||
100 | |||
101 | #endif | ||
102 | |||
78 | static inline struct gameport *gameport_allocate_port(void) | 103 | static inline struct gameport *gameport_allocate_port(void) |
79 | { | 104 | { |
80 | struct gameport *gameport = kcalloc(1, sizeof(struct gameport), GFP_KERNEL); | 105 | struct gameport *gameport = kcalloc(1, sizeof(struct gameport), GFP_KERNEL); |
@@ -92,9 +117,6 @@ static inline void gameport_set_name(struct gameport *gameport, const char *name | |||
92 | strlcpy(gameport->name, name, sizeof(gameport->name)); | 117 | strlcpy(gameport->name, name, sizeof(gameport->name)); |
93 | } | 118 | } |
94 | 119 | ||
95 | void gameport_set_phys(struct gameport *gameport, const char *fmt, ...) | ||
96 | __attribute__ ((format (printf, 2, 3))); | ||
97 | |||
98 | /* | 120 | /* |
99 | * Use the following fucntions to manipulate gameport's per-port | 121 | * Use the following fucntions to manipulate gameport's per-port |
100 | * driver-specific data. | 122 | * driver-specific data. |
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index ebc712e91066..8336dba18971 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
@@ -43,13 +43,17 @@ | |||
43 | #define __IRQ_MASK(x) ((1UL << (x))-1) | 43 | #define __IRQ_MASK(x) ((1UL << (x))-1) |
44 | 44 | ||
45 | #define PREEMPT_MASK (__IRQ_MASK(PREEMPT_BITS) << PREEMPT_SHIFT) | 45 | #define PREEMPT_MASK (__IRQ_MASK(PREEMPT_BITS) << PREEMPT_SHIFT) |
46 | #define HARDIRQ_MASK (__IRQ_MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT) | ||
47 | #define SOFTIRQ_MASK (__IRQ_MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT) | 46 | #define SOFTIRQ_MASK (__IRQ_MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT) |
47 | #define HARDIRQ_MASK (__IRQ_MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT) | ||
48 | 48 | ||
49 | #define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT) | 49 | #define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT) |
50 | #define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT) | 50 | #define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT) |
51 | #define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT) | 51 | #define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT) |
52 | 52 | ||
53 | #if PREEMPT_ACTIVE < (1 << (HARDIRQ_SHIFT + HARDIRQ_BITS)) | ||
54 | #error PREEMPT_ACTIVE is too low! | ||
55 | #endif | ||
56 | |||
53 | #define hardirq_count() (preempt_count() & HARDIRQ_MASK) | 57 | #define hardirq_count() (preempt_count() & HARDIRQ_MASK) |
54 | #define softirq_count() (preempt_count() & SOFTIRQ_MASK) | 58 | #define softirq_count() (preempt_count() & SOFTIRQ_MASK) |
55 | #define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK)) | 59 | #define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK)) |
diff --git a/include/linux/hippidevice.h b/include/linux/hippidevice.h index 89b3a4a5b761..9debe6bbe5f0 100644 --- a/include/linux/hippidevice.h +++ b/include/linux/hippidevice.h | |||
@@ -10,7 +10,7 @@ | |||
10 | * Author: Jes Sorensen, <Jes.Sorensen@cern.ch> | 10 | * Author: Jes Sorensen, <Jes.Sorensen@cern.ch> |
11 | * | 11 | * |
12 | * hippidevice.h is based on previous fddidevice.h work by | 12 | * hippidevice.h is based on previous fddidevice.h work by |
13 | * Ross Biro, <bir7@leland.Stanford.Edu> | 13 | * Ross Biro |
14 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 14 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
15 | * Alan Cox, <gw4pts@gw4pts.ampr.org> | 15 | * Alan Cox, <gw4pts@gw4pts.ampr.org> |
16 | * Lawrence V. Stefani, <stefani@lkg.dec.com> | 16 | * Lawrence V. Stefani, <stefani@lkg.dec.com> |
diff --git a/include/linux/ide.h b/include/linux/ide.h index 9cfc0999becb..336d6e509f59 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -664,7 +664,6 @@ typedef struct ide_drive_s { | |||
664 | 664 | ||
665 | struct request *rq; /* current request */ | 665 | struct request *rq; /* current request */ |
666 | struct ide_drive_s *next; /* circular list of hwgroup drives */ | 666 | struct ide_drive_s *next; /* circular list of hwgroup drives */ |
667 | struct ide_driver_s *driver;/* (ide_driver_t *) */ | ||
668 | void *driver_data; /* extra driver data */ | 667 | void *driver_data; /* extra driver data */ |
669 | struct hd_driveid *id; /* drive model identification info */ | 668 | struct hd_driveid *id; /* drive model identification info */ |
670 | struct proc_dir_entry *proc; /* /proc/ide/ directory entry */ | 669 | struct proc_dir_entry *proc; /* /proc/ide/ directory entry */ |
@@ -758,6 +757,8 @@ typedef struct ide_drive_s { | |||
758 | struct semaphore gendev_rel_sem; /* to deal with device release() */ | 757 | struct semaphore gendev_rel_sem; /* to deal with device release() */ |
759 | } ide_drive_t; | 758 | } ide_drive_t; |
760 | 759 | ||
760 | #define to_ide_device(dev)container_of(dev, ide_drive_t, gendev) | ||
761 | |||
761 | #define IDE_CHIPSET_PCI_MASK \ | 762 | #define IDE_CHIPSET_PCI_MASK \ |
762 | ((1<<ide_pci)|(1<<ide_cmd646)|(1<<ide_ali14xx)) | 763 | ((1<<ide_pci)|(1<<ide_cmd646)|(1<<ide_ali14xx)) |
763 | #define IDE_CHIPSET_IS_PCI(c) ((IDE_CHIPSET_PCI_MASK >> (c)) & 1) | 764 | #define IDE_CHIPSET_IS_PCI(c) ((IDE_CHIPSET_PCI_MASK >> (c)) & 1) |
@@ -1086,28 +1087,20 @@ enum { | |||
1086 | */ | 1087 | */ |
1087 | typedef struct ide_driver_s { | 1088 | typedef struct ide_driver_s { |
1088 | struct module *owner; | 1089 | struct module *owner; |
1089 | const char *name; | ||
1090 | const char *version; | 1090 | const char *version; |
1091 | u8 media; | 1091 | u8 media; |
1092 | unsigned busy : 1; | ||
1093 | unsigned supports_dsc_overlap : 1; | 1092 | unsigned supports_dsc_overlap : 1; |
1094 | int (*cleanup)(ide_drive_t *); | ||
1095 | ide_startstop_t (*do_request)(ide_drive_t *, struct request *, sector_t); | 1093 | ide_startstop_t (*do_request)(ide_drive_t *, struct request *, sector_t); |
1096 | int (*end_request)(ide_drive_t *, int, int); | 1094 | int (*end_request)(ide_drive_t *, int, int); |
1097 | ide_startstop_t (*error)(ide_drive_t *, struct request *rq, u8, u8); | 1095 | ide_startstop_t (*error)(ide_drive_t *, struct request *rq, u8, u8); |
1098 | ide_startstop_t (*abort)(ide_drive_t *, struct request *rq); | 1096 | ide_startstop_t (*abort)(ide_drive_t *, struct request *rq); |
1099 | int (*ioctl)(ide_drive_t *, struct inode *, struct file *, unsigned int, unsigned long); | 1097 | int (*ioctl)(ide_drive_t *, struct inode *, struct file *, unsigned int, unsigned long); |
1100 | ide_proc_entry_t *proc; | 1098 | ide_proc_entry_t *proc; |
1101 | int (*attach)(ide_drive_t *); | ||
1102 | void (*ata_prebuilder)(ide_drive_t *); | 1099 | void (*ata_prebuilder)(ide_drive_t *); |
1103 | void (*atapi_prebuilder)(ide_drive_t *); | 1100 | void (*atapi_prebuilder)(ide_drive_t *); |
1104 | struct device_driver gen_driver; | 1101 | struct device_driver gen_driver; |
1105 | struct list_head drives; | ||
1106 | struct list_head drivers; | ||
1107 | } ide_driver_t; | 1102 | } ide_driver_t; |
1108 | 1103 | ||
1109 | #define DRIVER(drive) ((drive)->driver) | ||
1110 | |||
1111 | int generic_ide_ioctl(ide_drive_t *, struct file *, struct block_device *, unsigned, unsigned long); | 1104 | int generic_ide_ioctl(ide_drive_t *, struct file *, struct block_device *, unsigned, unsigned long); |
1112 | 1105 | ||
1113 | /* | 1106 | /* |
@@ -1328,8 +1321,6 @@ extern void ide_init_subdrivers(void); | |||
1328 | 1321 | ||
1329 | void ide_init_disk(struct gendisk *, ide_drive_t *); | 1322 | void ide_init_disk(struct gendisk *, ide_drive_t *); |
1330 | 1323 | ||
1331 | extern int ata_attach(ide_drive_t *); | ||
1332 | |||
1333 | extern int ideprobe_init(void); | 1324 | extern int ideprobe_init(void); |
1334 | 1325 | ||
1335 | extern void ide_scan_pcibus(int scan_direction) __init; | 1326 | extern void ide_scan_pcibus(int scan_direction) __init; |
@@ -1342,11 +1333,8 @@ extern void default_hwif_iops(ide_hwif_t *); | |||
1342 | extern void default_hwif_mmiops(ide_hwif_t *); | 1333 | extern void default_hwif_mmiops(ide_hwif_t *); |
1343 | extern void default_hwif_transport(ide_hwif_t *); | 1334 | extern void default_hwif_transport(ide_hwif_t *); |
1344 | 1335 | ||
1345 | int ide_register_driver(ide_driver_t *driver); | 1336 | void ide_register_subdriver(ide_drive_t *, ide_driver_t *); |
1346 | void ide_unregister_driver(ide_driver_t *driver); | 1337 | void ide_unregister_subdriver(ide_drive_t *, ide_driver_t *); |
1347 | int ide_register_subdriver(ide_drive_t *, ide_driver_t *); | ||
1348 | int ide_unregister_subdriver (ide_drive_t *drive); | ||
1349 | int ide_replace_subdriver(ide_drive_t *drive, const char *driver); | ||
1350 | 1338 | ||
1351 | #define ON_BOARD 1 | 1339 | #define ON_BOARD 1 |
1352 | #define NEVER_BOARD 0 | 1340 | #define NEVER_BOARD 0 |
diff --git a/include/linux/if.h b/include/linux/if.h index 110282dbd3e0..d73a9d62f208 100644 --- a/include/linux/if.h +++ b/include/linux/if.h | |||
@@ -8,7 +8,7 @@ | |||
8 | * Version: @(#)if.h 1.0.2 04/18/93 | 8 | * Version: @(#)if.h 1.0.2 04/18/93 |
9 | * | 9 | * |
10 | * Authors: Original taken from Berkeley UNIX 4.3, (c) UCB 1982-1988 | 10 | * Authors: Original taken from Berkeley UNIX 4.3, (c) UCB 1982-1988 |
11 | * Ross Biro, <bir7@leland.Stanford.Edu> | 11 | * Ross Biro |
12 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 12 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
13 | * | 13 | * |
14 | * This program is free software; you can redistribute it and/or | 14 | * This program is free software; you can redistribute it and/or |
diff --git a/include/linux/if_arp.h b/include/linux/if_arp.h index bbf49bcd7705..0856548a2a08 100644 --- a/include/linux/if_arp.h +++ b/include/linux/if_arp.h | |||
@@ -9,7 +9,7 @@ | |||
9 | * | 9 | * |
10 | * Authors: Original taken from Berkeley UNIX 4.3, (c) UCB 1986-1988 | 10 | * Authors: Original taken from Berkeley UNIX 4.3, (c) UCB 1986-1988 |
11 | * Portions taken from the KA9Q/NOS (v2.00m PA0GRI) source. | 11 | * Portions taken from the KA9Q/NOS (v2.00m PA0GRI) source. |
12 | * Ross Biro, <bir7@leland.Stanford.Edu> | 12 | * Ross Biro |
13 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 13 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
14 | * Florian La Roche, | 14 | * Florian La Roche, |
15 | * Jonathan Layes <layes@loran.com> | 15 | * Jonathan Layes <layes@loran.com> |
diff --git a/include/linux/if_ltalk.h b/include/linux/if_ltalk.h index e75e832b7ff0..76525760ba48 100644 --- a/include/linux/if_ltalk.h +++ b/include/linux/if_ltalk.h | |||
@@ -6,7 +6,7 @@ | |||
6 | #define LTALK_ALEN 1 | 6 | #define LTALK_ALEN 1 |
7 | 7 | ||
8 | #ifdef __KERNEL__ | 8 | #ifdef __KERNEL__ |
9 | extern void ltalk_setup(struct net_device *); | 9 | extern struct net_device *alloc_ltalkdev(int sizeof_priv); |
10 | #endif | 10 | #endif |
11 | 11 | ||
12 | #endif | 12 | #endif |
diff --git a/include/linux/if_shaper.h b/include/linux/if_shaper.h index 0485b256d043..004e6f09a6e2 100644 --- a/include/linux/if_shaper.h +++ b/include/linux/if_shaper.h | |||
@@ -23,7 +23,7 @@ struct shaper | |||
23 | __u32 shapeclock; | 23 | __u32 shapeclock; |
24 | unsigned long recovery; /* Time we can next clock a packet out on | 24 | unsigned long recovery; /* Time we can next clock a packet out on |
25 | an empty queue */ | 25 | an empty queue */ |
26 | unsigned long locked; | 26 | struct semaphore sem; |
27 | struct net_device_stats stats; | 27 | struct net_device_stats stats; |
28 | struct net_device *dev; | 28 | struct net_device *dev; |
29 | int (*hard_start_xmit) (struct sk_buff *skb, | 29 | int (*hard_start_xmit) (struct sk_buff *skb, |
@@ -38,7 +38,6 @@ struct shaper | |||
38 | int (*hard_header_cache)(struct neighbour *neigh, struct hh_cache *hh); | 38 | int (*hard_header_cache)(struct neighbour *neigh, struct hh_cache *hh); |
39 | void (*header_cache_update)(struct hh_cache *hh, struct net_device *dev, unsigned char * haddr); | 39 | void (*header_cache_update)(struct hh_cache *hh, struct net_device *dev, unsigned char * haddr); |
40 | struct net_device_stats* (*get_stats)(struct net_device *dev); | 40 | struct net_device_stats* (*get_stats)(struct net_device *dev); |
41 | wait_queue_head_t wait_queue; | ||
42 | struct timer_list timer; | 41 | struct timer_list timer; |
43 | }; | 42 | }; |
44 | 43 | ||
diff --git a/include/linux/if_tr.h b/include/linux/if_tr.h index 4fd451f81ccb..3fba9e2f5427 100644 --- a/include/linux/if_tr.h +++ b/include/linux/if_tr.h | |||
@@ -9,7 +9,7 @@ | |||
9 | * | 9 | * |
10 | * Author: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 10 | * Author: Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
11 | * Donald Becker, <becker@super.org> | 11 | * Donald Becker, <becker@super.org> |
12 | * Peter De Schrijver, <stud11@cc4.kuleuven.ac.be> | 12 | * Peter De Schrijver, <stud11@cc4.kuleuven.ac.be> |
13 | * | 13 | * |
14 | * This program is free software; you can redistribute it and/or | 14 | * This program is free software; you can redistribute it and/or |
15 | * modify it under the terms of the GNU General Public License | 15 | * modify it under the terms of the GNU General Public License |
@@ -19,24 +19,18 @@ | |||
19 | #ifndef _LINUX_IF_TR_H | 19 | #ifndef _LINUX_IF_TR_H |
20 | #define _LINUX_IF_TR_H | 20 | #define _LINUX_IF_TR_H |
21 | 21 | ||
22 | #include <asm/byteorder.h> /* For __be16 */ | ||
22 | 23 | ||
23 | /* IEEE 802.5 Token-Ring magic constants. The frame sizes omit the preamble | 24 | /* IEEE 802.5 Token-Ring magic constants. The frame sizes omit the preamble |
24 | and FCS/CRC (frame check sequence). */ | 25 | and FCS/CRC (frame check sequence). */ |
25 | #define TR_ALEN 6 /* Octets in one ethernet addr */ | 26 | #define TR_ALEN 6 /* Octets in one token-ring addr */ |
26 | #define TR_HLEN (sizeof(struct trh_hdr)+sizeof(struct trllc)) | 27 | #define TR_HLEN (sizeof(struct trh_hdr)+sizeof(struct trllc)) |
27 | #define AC 0x10 | 28 | #define AC 0x10 |
28 | #define LLC_FRAME 0x40 | 29 | #define LLC_FRAME 0x40 |
29 | #if 0 | ||
30 | #define ETH_HLEN 14 /* Total octets in header. */ | ||
31 | #define ETH_ZLEN 60 /* Min. octets in frame sans FCS */ | ||
32 | #define ETH_DATA_LEN 1500 /* Max. octets in payload */ | ||
33 | #define ETH_FRAME_LEN 1514 /* Max. octets in frame sans FCS */ | ||
34 | #endif | ||
35 | |||
36 | 30 | ||
37 | /* LLC and SNAP constants */ | 31 | /* LLC and SNAP constants */ |
38 | #define EXTENDED_SAP 0xAA | 32 | #define EXTENDED_SAP 0xAA |
39 | #define UI_CMD 0x03 | 33 | #define UI_CMD 0x03 |
40 | 34 | ||
41 | /* This is an Token-Ring frame header. */ | 35 | /* This is an Token-Ring frame header. */ |
42 | struct trh_hdr { | 36 | struct trh_hdr { |
@@ -44,8 +38,8 @@ struct trh_hdr { | |||
44 | __u8 fc; /* frame control field */ | 38 | __u8 fc; /* frame control field */ |
45 | __u8 daddr[TR_ALEN]; /* destination address */ | 39 | __u8 daddr[TR_ALEN]; /* destination address */ |
46 | __u8 saddr[TR_ALEN]; /* source address */ | 40 | __u8 saddr[TR_ALEN]; /* source address */ |
47 | __u16 rcf; /* route control field */ | 41 | __be16 rcf; /* route control field */ |
48 | __u16 rseg[8]; /* routing registers */ | 42 | __be16 rseg[8]; /* routing registers */ |
49 | }; | 43 | }; |
50 | 44 | ||
51 | #ifdef __KERNEL__ | 45 | #ifdef __KERNEL__ |
@@ -63,7 +57,7 @@ struct trllc { | |||
63 | __u8 ssap; /* source SAP */ | 57 | __u8 ssap; /* source SAP */ |
64 | __u8 llc; /* LLC control field */ | 58 | __u8 llc; /* LLC control field */ |
65 | __u8 protid[3]; /* protocol id */ | 59 | __u8 protid[3]; /* protocol id */ |
66 | __u16 ethertype; /* ether type field */ | 60 | __be16 ethertype; /* ether type field */ |
67 | }; | 61 | }; |
68 | 62 | ||
69 | /* Token-Ring statistics collection data. */ | 63 | /* Token-Ring statistics collection data. */ |
@@ -96,14 +90,13 @@ struct tr_statistics { | |||
96 | }; | 90 | }; |
97 | 91 | ||
98 | /* source routing stuff */ | 92 | /* source routing stuff */ |
99 | 93 | #define TR_RII 0x80 | |
100 | #define TR_RII 0x80 | 94 | #define TR_RCF_DIR_BIT 0x80 |
101 | #define TR_RCF_DIR_BIT 0x80 | 95 | #define TR_RCF_LEN_MASK 0x1f00 |
102 | #define TR_RCF_LEN_MASK 0x1f00 | 96 | #define TR_RCF_BROADCAST 0x8000 /* all-routes broadcast */ |
103 | #define TR_RCF_BROADCAST 0x8000 /* all-routes broadcast */ | 97 | #define TR_RCF_LIMITED_BROADCAST 0xC000 /* single-route broadcast */ |
104 | #define TR_RCF_LIMITED_BROADCAST 0xC000 /* single-route broadcast */ | 98 | #define TR_RCF_FRAME2K 0x20 |
105 | #define TR_RCF_FRAME2K 0x20 | 99 | #define TR_RCF_BROADCAST_MASK 0xC000 |
106 | #define TR_RCF_BROADCAST_MASK 0xC000 | 100 | #define TR_MAXRIFLEN 18 |
107 | #define TR_MAXRIFLEN 18 | ||
108 | 101 | ||
109 | #endif /* _LINUX_IF_TR_H */ | 102 | #endif /* _LINUX_IF_TR_H */ |
diff --git a/include/linux/inetdevice.h b/include/linux/inetdevice.h index 6fafb27877a7..7e1e15f934f3 100644 --- a/include/linux/inetdevice.h +++ b/include/linux/inetdevice.h | |||
@@ -29,6 +29,7 @@ struct ipv4_devconf | |||
29 | int no_xfrm; | 29 | int no_xfrm; |
30 | int no_policy; | 30 | int no_policy; |
31 | int force_igmp_version; | 31 | int force_igmp_version; |
32 | int promote_secondaries; | ||
32 | void *sysctl; | 33 | void *sysctl; |
33 | }; | 34 | }; |
34 | 35 | ||
@@ -71,6 +72,7 @@ struct in_device | |||
71 | #define IN_DEV_SEC_REDIRECTS(in_dev) (ipv4_devconf.secure_redirects || (in_dev)->cnf.secure_redirects) | 72 | #define IN_DEV_SEC_REDIRECTS(in_dev) (ipv4_devconf.secure_redirects || (in_dev)->cnf.secure_redirects) |
72 | #define IN_DEV_IDTAG(in_dev) ((in_dev)->cnf.tag) | 73 | #define IN_DEV_IDTAG(in_dev) ((in_dev)->cnf.tag) |
73 | #define IN_DEV_MEDIUM_ID(in_dev) ((in_dev)->cnf.medium_id) | 74 | #define IN_DEV_MEDIUM_ID(in_dev) ((in_dev)->cnf.medium_id) |
75 | #define IN_DEV_PROMOTE_SECONDARIES(in_dev) (ipv4_devconf.promote_secondaries || (in_dev)->cnf.promote_secondaries) | ||
74 | 76 | ||
75 | #define IN_DEV_RX_REDIRECTS(in_dev) \ | 77 | #define IN_DEV_RX_REDIRECTS(in_dev) \ |
76 | ((IN_DEV_FORWARD(in_dev) && \ | 78 | ((IN_DEV_FORWARD(in_dev) && \ |
diff --git a/include/linux/ixjuser.h b/include/linux/ixjuser.h index 88121166d715..fd1756d3a47e 100644 --- a/include/linux/ixjuser.h +++ b/include/linux/ixjuser.h | |||
@@ -42,8 +42,6 @@ | |||
42 | * | 42 | * |
43 | *****************************************************************************/ | 43 | *****************************************************************************/ |
44 | 44 | ||
45 | static char ixjuser_h_rcsid[] = "$Id: ixjuser.h,v 4.1 2001/08/05 00:17:37 craigs Exp $"; | ||
46 | |||
47 | #include <linux/telephony.h> | 45 | #include <linux/telephony.h> |
48 | 46 | ||
49 | 47 | ||
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index f20c163de4f5..99ddba5a4e00 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
@@ -43,6 +43,9 @@ typedef int (*kprobe_fault_handler_t) (struct kprobe *, struct pt_regs *, | |||
43 | struct kprobe { | 43 | struct kprobe { |
44 | struct hlist_node hlist; | 44 | struct hlist_node hlist; |
45 | 45 | ||
46 | /* list of kprobes for multi-handler support */ | ||
47 | struct list_head list; | ||
48 | |||
46 | /* location of the probe point */ | 49 | /* location of the probe point */ |
47 | kprobe_opcode_t *addr; | 50 | kprobe_opcode_t *addr; |
48 | 51 | ||
diff --git a/include/linux/libata.h b/include/linux/libata.h index 505160ab472b..b009f801e7c5 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -410,6 +410,7 @@ extern u8 ata_chk_err(struct ata_port *ap); | |||
410 | extern void ata_exec_command(struct ata_port *ap, struct ata_taskfile *tf); | 410 | extern void ata_exec_command(struct ata_port *ap, struct ata_taskfile *tf); |
411 | extern int ata_port_start (struct ata_port *ap); | 411 | extern int ata_port_start (struct ata_port *ap); |
412 | extern void ata_port_stop (struct ata_port *ap); | 412 | extern void ata_port_stop (struct ata_port *ap); |
413 | extern void ata_host_stop (struct ata_host_set *host_set); | ||
413 | extern irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs); | 414 | extern irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs); |
414 | extern void ata_qc_prep(struct ata_queued_cmd *qc); | 415 | extern void ata_qc_prep(struct ata_queued_cmd *qc); |
415 | extern int ata_qc_issue_prot(struct ata_queued_cmd *qc); | 416 | extern int ata_qc_issue_prot(struct ata_queued_cmd *qc); |
@@ -466,12 +467,34 @@ static inline u8 ata_chk_status(struct ata_port *ap) | |||
466 | return ap->ops->check_status(ap); | 467 | return ap->ops->check_status(ap); |
467 | } | 468 | } |
468 | 469 | ||
470 | |||
471 | /** | ||
472 | * ata_pause - Flush writes and pause 400 nanoseconds. | ||
473 | * @ap: Port to wait for. | ||
474 | * | ||
475 | * LOCKING: | ||
476 | * Inherited from caller. | ||
477 | */ | ||
478 | |||
469 | static inline void ata_pause(struct ata_port *ap) | 479 | static inline void ata_pause(struct ata_port *ap) |
470 | { | 480 | { |
471 | ata_altstatus(ap); | 481 | ata_altstatus(ap); |
472 | ndelay(400); | 482 | ndelay(400); |
473 | } | 483 | } |
474 | 484 | ||
485 | |||
486 | /** | ||
487 | * ata_busy_wait - Wait for a port status register | ||
488 | * @ap: Port to wait for. | ||
489 | * | ||
490 | * Waits up to max*10 microseconds for the selected bits in the port's | ||
491 | * status register to be cleared. | ||
492 | * Returns final value of status register. | ||
493 | * | ||
494 | * LOCKING: | ||
495 | * Inherited from caller. | ||
496 | */ | ||
497 | |||
475 | static inline u8 ata_busy_wait(struct ata_port *ap, unsigned int bits, | 498 | static inline u8 ata_busy_wait(struct ata_port *ap, unsigned int bits, |
476 | unsigned int max) | 499 | unsigned int max) |
477 | { | 500 | { |
@@ -486,6 +509,18 @@ static inline u8 ata_busy_wait(struct ata_port *ap, unsigned int bits, | |||
486 | return status; | 509 | return status; |
487 | } | 510 | } |
488 | 511 | ||
512 | |||
513 | /** | ||
514 | * ata_wait_idle - Wait for a port to be idle. | ||
515 | * @ap: Port to wait for. | ||
516 | * | ||
517 | * Waits up to 10ms for port's BUSY and DRQ signals to clear. | ||
518 | * Returns final value of status register. | ||
519 | * | ||
520 | * LOCKING: | ||
521 | * Inherited from caller. | ||
522 | */ | ||
523 | |||
489 | static inline u8 ata_wait_idle(struct ata_port *ap) | 524 | static inline u8 ata_wait_idle(struct ata_port *ap) |
490 | { | 525 | { |
491 | u8 status = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000); | 526 | u8 status = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000); |
@@ -524,6 +559,18 @@ static inline void ata_tf_init(struct ata_port *ap, struct ata_taskfile *tf, uns | |||
524 | tf->device = ATA_DEVICE_OBS | ATA_DEV1; | 559 | tf->device = ATA_DEVICE_OBS | ATA_DEV1; |
525 | } | 560 | } |
526 | 561 | ||
562 | |||
563 | /** | ||
564 | * ata_irq_on - Enable interrupts on a port. | ||
565 | * @ap: Port on which interrupts are enabled. | ||
566 | * | ||
567 | * Enable interrupts on a legacy IDE device using MMIO or PIO, | ||
568 | * wait for idle, clear any pending interrupts. | ||
569 | * | ||
570 | * LOCKING: | ||
571 | * Inherited from caller. | ||
572 | */ | ||
573 | |||
527 | static inline u8 ata_irq_on(struct ata_port *ap) | 574 | static inline u8 ata_irq_on(struct ata_port *ap) |
528 | { | 575 | { |
529 | struct ata_ioports *ioaddr = &ap->ioaddr; | 576 | struct ata_ioports *ioaddr = &ap->ioaddr; |
@@ -543,6 +590,18 @@ static inline u8 ata_irq_on(struct ata_port *ap) | |||
543 | return tmp; | 590 | return tmp; |
544 | } | 591 | } |
545 | 592 | ||
593 | |||
594 | /** | ||
595 | * ata_irq_ack - Acknowledge a device interrupt. | ||
596 | * @ap: Port on which interrupts are enabled. | ||
597 | * | ||
598 | * Wait up to 10 ms for legacy IDE device to become idle (BUSY | ||
599 | * or BUSY+DRQ clear). Obtain dma status and port status from | ||
600 | * device. Clear the interrupt. Return port status. | ||
601 | * | ||
602 | * LOCKING: | ||
603 | */ | ||
604 | |||
546 | static inline u8 ata_irq_ack(struct ata_port *ap, unsigned int chk_drq) | 605 | static inline u8 ata_irq_ack(struct ata_port *ap, unsigned int chk_drq) |
547 | { | 606 | { |
548 | unsigned int bits = chk_drq ? ATA_BUSY | ATA_DRQ : ATA_BUSY; | 607 | unsigned int bits = chk_drq ? ATA_BUSY | ATA_DRQ : ATA_BUSY; |
@@ -584,6 +643,13 @@ static inline void scr_write(struct ata_port *ap, unsigned int reg, u32 val) | |||
584 | ap->ops->scr_write(ap, reg, val); | 643 | ap->ops->scr_write(ap, reg, val); |
585 | } | 644 | } |
586 | 645 | ||
646 | static inline void scr_write_flush(struct ata_port *ap, unsigned int reg, | ||
647 | u32 val) | ||
648 | { | ||
649 | ap->ops->scr_write(ap, reg, val); | ||
650 | (void) ap->ops->scr_read(ap, reg); | ||
651 | } | ||
652 | |||
587 | static inline unsigned int sata_dev_present(struct ata_port *ap) | 653 | static inline unsigned int sata_dev_present(struct ata_port *ap) |
588 | { | 654 | { |
589 | return ((scr_read(ap, SCR_STATUS) & 0xf) == 0x3) ? 1 : 0; | 655 | return ((scr_read(ap, SCR_STATUS) & 0xf) == 0x3) ? 1 : 0; |
diff --git a/include/linux/mii.h b/include/linux/mii.h index 20971fe78a8d..374b615ea9ea 100644 --- a/include/linux/mii.h +++ b/include/linux/mii.h | |||
@@ -65,9 +65,13 @@ | |||
65 | #define ADVERTISE_SLCT 0x001f /* Selector bits */ | 65 | #define ADVERTISE_SLCT 0x001f /* Selector bits */ |
66 | #define ADVERTISE_CSMA 0x0001 /* Only selector supported */ | 66 | #define ADVERTISE_CSMA 0x0001 /* Only selector supported */ |
67 | #define ADVERTISE_10HALF 0x0020 /* Try for 10mbps half-duplex */ | 67 | #define ADVERTISE_10HALF 0x0020 /* Try for 10mbps half-duplex */ |
68 | #define ADVERTISE_1000XFULL 0x0020 /* Try for 1000BASE-X full-duplex */ | ||
68 | #define ADVERTISE_10FULL 0x0040 /* Try for 10mbps full-duplex */ | 69 | #define ADVERTISE_10FULL 0x0040 /* Try for 10mbps full-duplex */ |
70 | #define ADVERTISE_1000XHALF 0x0040 /* Try for 1000BASE-X half-duplex */ | ||
69 | #define ADVERTISE_100HALF 0x0080 /* Try for 100mbps half-duplex */ | 71 | #define ADVERTISE_100HALF 0x0080 /* Try for 100mbps half-duplex */ |
72 | #define ADVERTISE_1000XPAUSE 0x0080 /* Try for 1000BASE-X pause */ | ||
70 | #define ADVERTISE_100FULL 0x0100 /* Try for 100mbps full-duplex */ | 73 | #define ADVERTISE_100FULL 0x0100 /* Try for 100mbps full-duplex */ |
74 | #define ADVERTISE_1000XPSE_ASYM 0x0100 /* Try for 1000BASE-X asym pause */ | ||
71 | #define ADVERTISE_100BASE4 0x0200 /* Try for 100mbps 4k packets */ | 75 | #define ADVERTISE_100BASE4 0x0200 /* Try for 100mbps 4k packets */ |
72 | #define ADVERTISE_PAUSE_CAP 0x0400 /* Try for pause */ | 76 | #define ADVERTISE_PAUSE_CAP 0x0400 /* Try for pause */ |
73 | #define ADVERTISE_PAUSE_ASYM 0x0800 /* Try for asymetric pause */ | 77 | #define ADVERTISE_PAUSE_ASYM 0x0800 /* Try for asymetric pause */ |
@@ -84,9 +88,13 @@ | |||
84 | /* Link partner ability register. */ | 88 | /* Link partner ability register. */ |
85 | #define LPA_SLCT 0x001f /* Same as advertise selector */ | 89 | #define LPA_SLCT 0x001f /* Same as advertise selector */ |
86 | #define LPA_10HALF 0x0020 /* Can do 10mbps half-duplex */ | 90 | #define LPA_10HALF 0x0020 /* Can do 10mbps half-duplex */ |
91 | #define LPA_1000XFULL 0x0020 /* Can do 1000BASE-X full-duplex */ | ||
87 | #define LPA_10FULL 0x0040 /* Can do 10mbps full-duplex */ | 92 | #define LPA_10FULL 0x0040 /* Can do 10mbps full-duplex */ |
93 | #define LPA_1000XHALF 0x0040 /* Can do 1000BASE-X half-duplex */ | ||
88 | #define LPA_100HALF 0x0080 /* Can do 100mbps half-duplex */ | 94 | #define LPA_100HALF 0x0080 /* Can do 100mbps half-duplex */ |
95 | #define LPA_1000XPAUSE 0x0080 /* Can do 1000BASE-X pause */ | ||
89 | #define LPA_100FULL 0x0100 /* Can do 100mbps full-duplex */ | 96 | #define LPA_100FULL 0x0100 /* Can do 100mbps full-duplex */ |
97 | #define LPA_1000XPAUSE_ASYM 0x0100 /* Can do 1000BASE-X pause asym*/ | ||
90 | #define LPA_100BASE4 0x0200 /* Can do 100mbps 4k packets */ | 98 | #define LPA_100BASE4 0x0200 /* Can do 100mbps 4k packets */ |
91 | #define LPA_PAUSE_CAP 0x0400 /* Can pause */ | 99 | #define LPA_PAUSE_CAP 0x0400 /* Can pause */ |
92 | #define LPA_PAUSE_ASYM 0x0800 /* Can pause asymetrically */ | 100 | #define LPA_PAUSE_ASYM 0x0800 /* Can pause asymetrically */ |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 8b007ad2d450..17518fe0b311 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -637,9 +637,9 @@ extern unsigned long do_mremap(unsigned long addr, | |||
637 | * These functions are passed a count `nr_to_scan' and a gfpmask. They should | 637 | * These functions are passed a count `nr_to_scan' and a gfpmask. They should |
638 | * scan `nr_to_scan' objects, attempting to free them. | 638 | * scan `nr_to_scan' objects, attempting to free them. |
639 | * | 639 | * |
640 | * The callback must the number of objects which remain in the cache. | 640 | * The callback must return the number of objects which remain in the cache. |
641 | * | 641 | * |
642 | * The callback will be passes nr_to_scan == 0 when the VM is querying the | 642 | * The callback will be passed nr_to_scan == 0 when the VM is querying the |
643 | * cache size, so a fastpath for that case is appropriate. | 643 | * cache size, so a fastpath for that case is appropriate. |
644 | */ | 644 | */ |
645 | typedef int (*shrinker_t)(int nr_to_scan, unsigned int gfp_mask); | 645 | typedef int (*shrinker_t)(int nr_to_scan, unsigned int gfp_mask); |
diff --git a/include/linux/mmc/protocol.h b/include/linux/mmc/protocol.h index 7b904c5102f6..896342817b97 100644 --- a/include/linux/mmc/protocol.h +++ b/include/linux/mmc/protocol.h | |||
@@ -195,6 +195,33 @@ struct _mmc_csd { | |||
195 | #define MMC_VDD_35_36 0x00800000 /* VDD voltage 3.5 ~ 3.6 */ | 195 | #define MMC_VDD_35_36 0x00800000 /* VDD voltage 3.5 ~ 3.6 */ |
196 | #define MMC_CARD_BUSY 0x80000000 /* Card Power up status bit */ | 196 | #define MMC_CARD_BUSY 0x80000000 /* Card Power up status bit */ |
197 | 197 | ||
198 | /* | ||
199 | * Card Command Classes (CCC) | ||
200 | */ | ||
201 | #define CCC_BASIC (1<<0) /* (0) Basic protocol functions */ | ||
202 | /* (CMD0,1,2,3,4,7,9,10,12,13,15) */ | ||
203 | #define CCC_STREAM_READ (1<<1) /* (1) Stream read commands */ | ||
204 | /* (CMD11) */ | ||
205 | #define CCC_BLOCK_READ (1<<2) /* (2) Block read commands */ | ||
206 | /* (CMD16,17,18) */ | ||
207 | #define CCC_STREAM_WRITE (1<<3) /* (3) Stream write commands */ | ||
208 | /* (CMD20) */ | ||
209 | #define CCC_BLOCK_WRITE (1<<4) /* (4) Block write commands */ | ||
210 | /* (CMD16,24,25,26,27) */ | ||
211 | #define CCC_ERASE (1<<5) /* (5) Ability to erase blocks */ | ||
212 | /* (CMD32,33,34,35,36,37,38,39) */ | ||
213 | #define CCC_WRITE_PROT (1<<6) /* (6) Able to write protect blocks */ | ||
214 | /* (CMD28,29,30) */ | ||
215 | #define CCC_LOCK_CARD (1<<7) /* (7) Able to lock down card */ | ||
216 | /* (CMD16,CMD42) */ | ||
217 | #define CCC_APP_SPEC (1<<8) /* (8) Application specific */ | ||
218 | /* (CMD55,56,57,ACMD*) */ | ||
219 | #define CCC_IO_MODE (1<<9) /* (9) I/O mode */ | ||
220 | /* (CMD5,39,40,52,53) */ | ||
221 | #define CCC_SWITCH (1<<10) /* (10) High speed switch */ | ||
222 | /* (CMD6,34,35,36,37,50) */ | ||
223 | /* (11) Reserved */ | ||
224 | /* (CMD?) */ | ||
198 | 225 | ||
199 | /* | 226 | /* |
200 | * CSD field definitions | 227 | * CSD field definitions |
diff --git a/include/linux/mpage.h b/include/linux/mpage.h index dea1b0083661..3ca880463c47 100644 --- a/include/linux/mpage.h +++ b/include/linux/mpage.h | |||
@@ -20,9 +20,6 @@ int mpage_writepages(struct address_space *mapping, | |||
20 | struct writeback_control *wbc, get_block_t get_block); | 20 | struct writeback_control *wbc, get_block_t get_block); |
21 | int mpage_writepage(struct page *page, get_block_t *get_block, | 21 | int mpage_writepage(struct page *page, get_block_t *get_block, |
22 | struct writeback_control *wbc); | 22 | struct writeback_control *wbc); |
23 | int __mpage_writepages(struct address_space *mapping, | ||
24 | struct writeback_control *wbc, get_block_t get_block, | ||
25 | writepage_t writepage); | ||
26 | 23 | ||
27 | static inline int | 24 | static inline int |
28 | generic_writepages(struct address_space *mapping, struct writeback_control *wbc) | 25 | generic_writepages(struct address_space *mapping, struct writeback_control *wbc) |
diff --git a/include/linux/net.h b/include/linux/net.h index e5914c1f0c4d..20cb226b2268 100644 --- a/include/linux/net.h +++ b/include/linux/net.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * Version: @(#)net.h 1.0.3 05/25/93 | 7 | * Version: @(#)net.h 1.0.3 05/25/93 |
8 | * | 8 | * |
9 | * Authors: Orest Zborowski, <obz@Kodak.COM> | 9 | * Authors: Orest Zborowski, <obz@Kodak.COM> |
10 | * Ross Biro, <bir7@leland.Stanford.Edu> | 10 | * Ross Biro |
11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
12 | * | 12 | * |
13 | * This program is free software; you can redistribute it and/or | 13 | * This program is free software; you can redistribute it and/or |
@@ -101,7 +101,6 @@ enum sock_type { | |||
101 | * @sk: internal networking protocol agnostic socket representation | 101 | * @sk: internal networking protocol agnostic socket representation |
102 | * @wait: wait queue for several uses | 102 | * @wait: wait queue for several uses |
103 | * @type: socket type (%SOCK_STREAM, etc) | 103 | * @type: socket type (%SOCK_STREAM, etc) |
104 | * @passcred: credentials (used only in Unix Sockets (aka PF_LOCAL)) | ||
105 | */ | 104 | */ |
106 | struct socket { | 105 | struct socket { |
107 | socket_state state; | 106 | socket_state state; |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 8d775be67833..ba5d1236aa17 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * Version: @(#)dev.h 1.0.10 08/12/93 | 8 | * Version: @(#)dev.h 1.0.10 08/12/93 |
9 | * | 9 | * |
10 | * Authors: Ross Biro, <bir7@leland.Stanford.Edu> | 10 | * Authors: Ross Biro |
11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
12 | * Corey Minyard <wf-rch!minyard@relay.EU.net> | 12 | * Corey Minyard <wf-rch!minyard@relay.EU.net> |
13 | * Donald J. Becker, <becker@cesdis.gsfc.nasa.gov> | 13 | * Donald J. Becker, <becker@cesdis.gsfc.nasa.gov> |
@@ -204,7 +204,7 @@ struct hh_cache | |||
204 | /* cached hardware header; allow for machine alignment needs. */ | 204 | /* cached hardware header; allow for machine alignment needs. */ |
205 | #define HH_DATA_MOD 16 | 205 | #define HH_DATA_MOD 16 |
206 | #define HH_DATA_OFF(__len) \ | 206 | #define HH_DATA_OFF(__len) \ |
207 | (HH_DATA_MOD - ((__len) & (HH_DATA_MOD - 1))) | 207 | (HH_DATA_MOD - (((__len - 1) & (HH_DATA_MOD - 1)) + 1)) |
208 | #define HH_DATA_ALIGN(__len) \ | 208 | #define HH_DATA_ALIGN(__len) \ |
209 | (((__len)+(HH_DATA_MOD-1))&~(HH_DATA_MOD - 1)) | 209 | (((__len)+(HH_DATA_MOD-1))&~(HH_DATA_MOD - 1)) |
210 | unsigned long hh_data[HH_DATA_ALIGN(LL_MAX_HEADER) / sizeof(long)]; | 210 | unsigned long hh_data[HH_DATA_ALIGN(LL_MAX_HEADER) / sizeof(long)]; |
@@ -401,7 +401,7 @@ struct net_device | |||
401 | } reg_state; | 401 | } reg_state; |
402 | 402 | ||
403 | /* Net device features */ | 403 | /* Net device features */ |
404 | int features; | 404 | unsigned long features; |
405 | #define NETIF_F_SG 1 /* Scatter/gather IO. */ | 405 | #define NETIF_F_SG 1 /* Scatter/gather IO. */ |
406 | #define NETIF_F_IP_CSUM 2 /* Can checksum only TCP/UDP over IPv4. */ | 406 | #define NETIF_F_IP_CSUM 2 /* Can checksum only TCP/UDP over IPv4. */ |
407 | #define NETIF_F_NO_CSUM 4 /* Does not require checksum. F.e. loopack. */ | 407 | #define NETIF_F_NO_CSUM 4 /* Does not require checksum. F.e. loopack. */ |
@@ -503,7 +503,7 @@ static inline void *netdev_priv(struct net_device *dev) | |||
503 | #define SET_NETDEV_DEV(net, pdev) ((net)->class_dev.dev = (pdev)) | 503 | #define SET_NETDEV_DEV(net, pdev) ((net)->class_dev.dev = (pdev)) |
504 | 504 | ||
505 | struct packet_type { | 505 | struct packet_type { |
506 | unsigned short type; /* This is really htons(ether_type). */ | 506 | __be16 type; /* This is really htons(ether_type). */ |
507 | struct net_device *dev; /* NULL is wildcarded here */ | 507 | struct net_device *dev; /* NULL is wildcarded here */ |
508 | int (*func) (struct sk_buff *, struct net_device *, | 508 | int (*func) (struct sk_buff *, struct net_device *, |
509 | struct packet_type *); | 509 | struct packet_type *); |
@@ -913,6 +913,7 @@ extern void dev_mc_discard(struct net_device *dev); | |||
913 | extern void dev_set_promiscuity(struct net_device *dev, int inc); | 913 | extern void dev_set_promiscuity(struct net_device *dev, int inc); |
914 | extern void dev_set_allmulti(struct net_device *dev, int inc); | 914 | extern void dev_set_allmulti(struct net_device *dev, int inc); |
915 | extern void netdev_state_change(struct net_device *dev); | 915 | extern void netdev_state_change(struct net_device *dev); |
916 | extern void netdev_features_change(struct net_device *dev); | ||
916 | /* Load a device via the kmod */ | 917 | /* Load a device via the kmod */ |
917 | extern void dev_load(const char *name); | 918 | extern void dev_load(const char *name); |
918 | extern void dev_mcast_init(void); | 919 | extern void dev_mcast_init(void); |
diff --git a/include/linux/netlink.h b/include/linux/netlink.h index f731abdc1a29..b2738ac8bc99 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h | |||
@@ -110,6 +110,7 @@ struct netlink_skb_parms | |||
110 | __u32 dst_pid; | 110 | __u32 dst_pid; |
111 | __u32 dst_groups; | 111 | __u32 dst_groups; |
112 | kernel_cap_t eff_cap; | 112 | kernel_cap_t eff_cap; |
113 | __u32 loginuid; /* Login (audit) uid */ | ||
113 | }; | 114 | }; |
114 | 115 | ||
115 | #define NETLINK_CB(skb) (*(struct netlink_skb_parms*)&((skb)->cb)) | 116 | #define NETLINK_CB(skb) (*(struct netlink_skb_parms*)&((skb)->cb)) |
diff --git a/include/linux/notifier.h b/include/linux/notifier.h index 9303a003e9ab..5937dd6053c3 100644 --- a/include/linux/notifier.h +++ b/include/linux/notifier.h | |||
@@ -56,6 +56,7 @@ extern int notifier_call_chain(struct notifier_block **n, unsigned long val, voi | |||
56 | #define NETDEV_CHANGEADDR 0x0008 | 56 | #define NETDEV_CHANGEADDR 0x0008 |
57 | #define NETDEV_GOING_DOWN 0x0009 | 57 | #define NETDEV_GOING_DOWN 0x0009 |
58 | #define NETDEV_CHANGENAME 0x000A | 58 | #define NETDEV_CHANGENAME 0x000A |
59 | #define NETDEV_FEAT_CHANGE 0x000B | ||
59 | 60 | ||
60 | #define SYS_DOWN 0x0001 /* Notify of system down */ | 61 | #define SYS_DOWN 0x0001 /* Notify of system down */ |
61 | #define SYS_RESTART SYS_DOWN | 62 | #define SYS_RESTART SYS_DOWN |
diff --git a/include/linux/patchkey.h b/include/linux/patchkey.h new file mode 100644 index 000000000000..d974a6e92372 --- /dev/null +++ b/include/linux/patchkey.h | |||
@@ -0,0 +1,45 @@ | |||
1 | /* | ||
2 | * <linux/patchkey.h> -- definition of _PATCHKEY macro | ||
3 | * | ||
4 | * Copyright (C) 2005 Stuart Brady | ||
5 | * | ||
6 | * This exists because awe_voice.h defined its own _PATCHKEY and it wasn't | ||
7 | * clear whether removing this would break anything in userspace. | ||
8 | * | ||
9 | * Do not include this file directly. Please use <sys/soundcard.h> instead. | ||
10 | * For kernel code, use <linux/soundcard.h> | ||
11 | */ | ||
12 | |||
13 | #ifndef _LINUX_PATCHKEY_H_INDIRECT | ||
14 | #error "patchkey.h included directly" | ||
15 | #endif | ||
16 | |||
17 | #ifndef _LINUX_PATCHKEY_H | ||
18 | #define _LINUX_PATCHKEY_H | ||
19 | |||
20 | /* Endian macros. */ | ||
21 | #ifdef __KERNEL__ | ||
22 | # include <asm/byteorder.h> | ||
23 | #else | ||
24 | # include <endian.h> | ||
25 | #endif | ||
26 | |||
27 | #if defined(__KERNEL__) | ||
28 | # if defined(__BIG_ENDIAN) | ||
29 | # define _PATCHKEY(id) (0xfd00|id) | ||
30 | # elif defined(__LITTLE_ENDIAN) | ||
31 | # define _PATCHKEY(id) ((id<<8)|0x00fd) | ||
32 | # else | ||
33 | # error "could not determine byte order" | ||
34 | # endif | ||
35 | #elif defined(__BYTE_ORDER) | ||
36 | # if __BYTE_ORDER == __BIG_ENDIAN | ||
37 | # define _PATCHKEY(id) (0xfd00|id) | ||
38 | # elif __BYTE_ORDER == __LITTLE_ENDIAN | ||
39 | # define _PATCHKEY(id) ((id<<8)|0x00fd) | ||
40 | # else | ||
41 | # error "could not determine byte order" | ||
42 | # endif | ||
43 | #endif | ||
44 | |||
45 | #endif /* _LINUX_PATCHKEY_H */ | ||
diff --git a/include/linux/pci.h b/include/linux/pci.h index 3c89148ae28a..b5238bd18830 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -671,6 +671,7 @@ struct pci_driver { | |||
671 | int (*suspend) (struct pci_dev *dev, pm_message_t state); /* Device suspended */ | 671 | int (*suspend) (struct pci_dev *dev, pm_message_t state); /* Device suspended */ |
672 | int (*resume) (struct pci_dev *dev); /* Device woken up */ | 672 | int (*resume) (struct pci_dev *dev); /* Device woken up */ |
673 | int (*enable_wake) (struct pci_dev *dev, pci_power_t state, int enable); /* Enable wake event */ | 673 | int (*enable_wake) (struct pci_dev *dev, pci_power_t state, int enable); /* Enable wake event */ |
674 | void (*shutdown) (struct pci_dev *dev); | ||
674 | 675 | ||
675 | struct device_driver driver; | 676 | struct device_driver driver; |
676 | struct pci_dynids dynids; | 677 | struct pci_dynids dynids; |
@@ -810,7 +811,6 @@ void pci_set_master(struct pci_dev *dev); | |||
810 | int pci_set_mwi(struct pci_dev *dev); | 811 | int pci_set_mwi(struct pci_dev *dev); |
811 | void pci_clear_mwi(struct pci_dev *dev); | 812 | void pci_clear_mwi(struct pci_dev *dev); |
812 | int pci_set_dma_mask(struct pci_dev *dev, u64 mask); | 813 | int pci_set_dma_mask(struct pci_dev *dev, u64 mask); |
813 | int pci_dac_set_dma_mask(struct pci_dev *dev, u64 mask); | ||
814 | int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); | 814 | int pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask); |
815 | int pci_assign_resource(struct pci_dev *dev, int i); | 815 | int pci_assign_resource(struct pci_dev *dev, int i); |
816 | 816 | ||
@@ -941,7 +941,6 @@ static inline void pci_set_master(struct pci_dev *dev) { } | |||
941 | static inline int pci_enable_device(struct pci_dev *dev) { return -EIO; } | 941 | static inline int pci_enable_device(struct pci_dev *dev) { return -EIO; } |
942 | static inline void pci_disable_device(struct pci_dev *dev) { } | 942 | static inline void pci_disable_device(struct pci_dev *dev) { } |
943 | static inline int pci_set_dma_mask(struct pci_dev *dev, u64 mask) { return -EIO; } | 943 | static inline int pci_set_dma_mask(struct pci_dev *dev, u64 mask) { return -EIO; } |
944 | static inline int pci_dac_set_dma_mask(struct pci_dev *dev, u64 mask) { return -EIO; } | ||
945 | static inline int pci_assign_resource(struct pci_dev *dev, int i) { return -EBUSY;} | 944 | static inline int pci_assign_resource(struct pci_dev *dev, int i) { return -EBUSY;} |
946 | static inline int pci_register_driver(struct pci_driver *drv) { return 0;} | 945 | static inline int pci_register_driver(struct pci_driver *drv) { return 0;} |
947 | static inline void pci_unregister_driver(struct pci_driver *drv) { } | 946 | static inline void pci_unregister_driver(struct pci_driver *drv) { } |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 5d5820a4cf10..b8b4ebf9abf1 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -854,6 +854,7 @@ | |||
854 | #define PCI_DEVICE_ID_MYLEX_DAC960_LA 0x0020 | 854 | #define PCI_DEVICE_ID_MYLEX_DAC960_LA 0x0020 |
855 | #define PCI_DEVICE_ID_MYLEX_DAC960_LP 0x0050 | 855 | #define PCI_DEVICE_ID_MYLEX_DAC960_LP 0x0050 |
856 | #define PCI_DEVICE_ID_MYLEX_DAC960_BA 0xBA56 | 856 | #define PCI_DEVICE_ID_MYLEX_DAC960_BA 0xBA56 |
857 | #define PCI_DEVICE_ID_MYLEX_DAC960_GEM 0xB166 | ||
857 | 858 | ||
858 | #define PCI_VENDOR_ID_PICOP 0x1066 | 859 | #define PCI_VENDOR_ID_PICOP 0x1066 |
859 | #define PCI_DEVICE_ID_PICOP_PT86C52X 0x0001 | 860 | #define PCI_DEVICE_ID_PICOP_PT86C52X 0x0001 |
@@ -873,6 +874,7 @@ | |||
873 | #define PCI_DEVICE_ID_APPLE_KL_USB_P 0x0026 | 874 | #define PCI_DEVICE_ID_APPLE_KL_USB_P 0x0026 |
874 | #define PCI_DEVICE_ID_APPLE_UNI_N_AGP_P 0x0027 | 875 | #define PCI_DEVICE_ID_APPLE_UNI_N_AGP_P 0x0027 |
875 | #define PCI_DEVICE_ID_APPLE_UNI_N_AGP15 0x002d | 876 | #define PCI_DEVICE_ID_APPLE_UNI_N_AGP15 0x002d |
877 | #define PCI_DEVICE_ID_APPLE_UNI_N_PCI15 0x002e | ||
876 | #define PCI_DEVICE_ID_APPLE_UNI_N_FW2 0x0030 | 878 | #define PCI_DEVICE_ID_APPLE_UNI_N_FW2 0x0030 |
877 | #define PCI_DEVICE_ID_APPLE_UNI_N_GMAC2 0x0032 | 879 | #define PCI_DEVICE_ID_APPLE_UNI_N_GMAC2 0x0032 |
878 | #define PCI_DEVIEC_ID_APPLE_UNI_N_ATA 0x0033 | 880 | #define PCI_DEVIEC_ID_APPLE_UNI_N_ATA 0x0033 |
@@ -1229,6 +1231,12 @@ | |||
1229 | #define PCI_DEVICE_ID_NVIDIA_QUADRO4_900XGL 0x0258 | 1231 | #define PCI_DEVICE_ID_NVIDIA_QUADRO4_900XGL 0x0258 |
1230 | #define PCI_DEVICE_ID_NVIDIA_QUADRO4_750XGL 0x0259 | 1232 | #define PCI_DEVICE_ID_NVIDIA_QUADRO4_750XGL 0x0259 |
1231 | #define PCI_DEVICE_ID_NVIDIA_QUADRO4_700XGL 0x025B | 1233 | #define PCI_DEVICE_ID_NVIDIA_QUADRO4_700XGL 0x025B |
1234 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE 0x0265 | ||
1235 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA 0x0266 | ||
1236 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2 0x0267 | ||
1237 | #define PCI_DEVICE_ID_NVIDIA_NVENET_12 0x0268 | ||
1238 | #define PCI_DEVICE_ID_NVIDIA_NVENET_13 0x0269 | ||
1239 | #define PCI_DEVICE_ID_NVIDIA_MCP51_AUDIO 0x026B | ||
1232 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800 0x0280 | 1240 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800 0x0280 |
1233 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800_8X 0x0281 | 1241 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800_8X 0x0281 |
1234 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800SE 0x0282 | 1242 | #define PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4800SE 0x0282 |
@@ -2063,12 +2071,14 @@ | |||
2063 | 2071 | ||
2064 | #define PCI_VENDOR_ID_BROADCOM 0x14e4 | 2072 | #define PCI_VENDOR_ID_BROADCOM 0x14e4 |
2065 | #define PCI_DEVICE_ID_TIGON3_5752 0x1600 | 2073 | #define PCI_DEVICE_ID_TIGON3_5752 0x1600 |
2074 | #define PCI_DEVICE_ID_TIGON3_5752M 0x1601 | ||
2066 | #define PCI_DEVICE_ID_TIGON3_5700 0x1644 | 2075 | #define PCI_DEVICE_ID_TIGON3_5700 0x1644 |
2067 | #define PCI_DEVICE_ID_TIGON3_5701 0x1645 | 2076 | #define PCI_DEVICE_ID_TIGON3_5701 0x1645 |
2068 | #define PCI_DEVICE_ID_TIGON3_5702 0x1646 | 2077 | #define PCI_DEVICE_ID_TIGON3_5702 0x1646 |
2069 | #define PCI_DEVICE_ID_TIGON3_5703 0x1647 | 2078 | #define PCI_DEVICE_ID_TIGON3_5703 0x1647 |
2070 | #define PCI_DEVICE_ID_TIGON3_5704 0x1648 | 2079 | #define PCI_DEVICE_ID_TIGON3_5704 0x1648 |
2071 | #define PCI_DEVICE_ID_TIGON3_5704S_2 0x1649 | 2080 | #define PCI_DEVICE_ID_TIGON3_5704S_2 0x1649 |
2081 | #define PCI_DEVICE_ID_NX2_5706 0x164a | ||
2072 | #define PCI_DEVICE_ID_TIGON3_5702FE 0x164d | 2082 | #define PCI_DEVICE_ID_TIGON3_5702FE 0x164d |
2073 | #define PCI_DEVICE_ID_TIGON3_5705 0x1653 | 2083 | #define PCI_DEVICE_ID_TIGON3_5705 0x1653 |
2074 | #define PCI_DEVICE_ID_TIGON3_5705_2 0x1654 | 2084 | #define PCI_DEVICE_ID_TIGON3_5705_2 0x1654 |
@@ -2088,6 +2098,7 @@ | |||
2088 | #define PCI_DEVICE_ID_TIGON3_5702X 0x16a6 | 2098 | #define PCI_DEVICE_ID_TIGON3_5702X 0x16a6 |
2089 | #define PCI_DEVICE_ID_TIGON3_5703X 0x16a7 | 2099 | #define PCI_DEVICE_ID_TIGON3_5703X 0x16a7 |
2090 | #define PCI_DEVICE_ID_TIGON3_5704S 0x16a8 | 2100 | #define PCI_DEVICE_ID_TIGON3_5704S 0x16a8 |
2101 | #define PCI_DEVICE_ID_NX2_5706S 0x16aa | ||
2091 | #define PCI_DEVICE_ID_TIGON3_5702A3 0x16c6 | 2102 | #define PCI_DEVICE_ID_TIGON3_5702A3 0x16c6 |
2092 | #define PCI_DEVICE_ID_TIGON3_5703A3 0x16c7 | 2103 | #define PCI_DEVICE_ID_TIGON3_5703A3 0x16c7 |
2093 | #define PCI_DEVICE_ID_TIGON3_5781 0x16dd | 2104 | #define PCI_DEVICE_ID_TIGON3_5781 0x16dd |
@@ -2372,6 +2383,8 @@ | |||
2372 | #define PCI_DEVICE_ID_INTEL_82915G_IG 0x2582 | 2383 | #define PCI_DEVICE_ID_INTEL_82915G_IG 0x2582 |
2373 | #define PCI_DEVICE_ID_INTEL_82915GM_HB 0x2590 | 2384 | #define PCI_DEVICE_ID_INTEL_82915GM_HB 0x2590 |
2374 | #define PCI_DEVICE_ID_INTEL_82915GM_IG 0x2592 | 2385 | #define PCI_DEVICE_ID_INTEL_82915GM_IG 0x2592 |
2386 | #define PCI_DEVICE_ID_INTEL_82945G_HB 0x2770 | ||
2387 | #define PCI_DEVICE_ID_INTEL_82945G_IG 0x2772 | ||
2375 | #define PCI_DEVICE_ID_INTEL_ICH6_0 0x2640 | 2388 | #define PCI_DEVICE_ID_INTEL_ICH6_0 0x2640 |
2376 | #define PCI_DEVICE_ID_INTEL_ICH6_1 0x2641 | 2389 | #define PCI_DEVICE_ID_INTEL_ICH6_1 0x2641 |
2377 | #define PCI_DEVICE_ID_INTEL_ICH6_2 0x2642 | 2390 | #define PCI_DEVICE_ID_INTEL_ICH6_2 0x2642 |
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h index 73d84c071cb1..1d9da36eb9db 100644 --- a/include/linux/pkt_sched.h +++ b/include/linux/pkt_sched.h | |||
@@ -427,6 +427,7 @@ enum | |||
427 | TCA_NETEM_UNSPEC, | 427 | TCA_NETEM_UNSPEC, |
428 | TCA_NETEM_CORR, | 428 | TCA_NETEM_CORR, |
429 | TCA_NETEM_DELAY_DIST, | 429 | TCA_NETEM_DELAY_DIST, |
430 | TCA_NETEM_REORDER, | ||
430 | __TCA_NETEM_MAX, | 431 | __TCA_NETEM_MAX, |
431 | }; | 432 | }; |
432 | 433 | ||
@@ -437,7 +438,7 @@ struct tc_netem_qopt | |||
437 | __u32 latency; /* added delay (us) */ | 438 | __u32 latency; /* added delay (us) */ |
438 | __u32 limit; /* fifo limit (packets) */ | 439 | __u32 limit; /* fifo limit (packets) */ |
439 | __u32 loss; /* random packet loss (0=none ~0=100%) */ | 440 | __u32 loss; /* random packet loss (0=none ~0=100%) */ |
440 | __u32 gap; /* re-ordering gap (0 for delay all) */ | 441 | __u32 gap; /* re-ordering gap (0 for none) */ |
441 | __u32 duplicate; /* random packet dup (0=none ~0=100%) */ | 442 | __u32 duplicate; /* random packet dup (0=none ~0=100%) */ |
442 | __u32 jitter; /* random jitter in latency (us) */ | 443 | __u32 jitter; /* random jitter in latency (us) */ |
443 | }; | 444 | }; |
@@ -449,6 +450,12 @@ struct tc_netem_corr | |||
449 | __u32 dup_corr; /* duplicate correlation */ | 450 | __u32 dup_corr; /* duplicate correlation */ |
450 | }; | 451 | }; |
451 | 452 | ||
453 | struct tc_netem_reorder | ||
454 | { | ||
455 | __u32 probability; | ||
456 | __u32 correlation; | ||
457 | }; | ||
458 | |||
452 | #define NETEM_DIST_SCALE 8192 | 459 | #define NETEM_DIST_SCALE 8192 |
453 | 460 | ||
454 | #endif | 461 | #endif |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 5f868a588581..4dbb109022f3 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -578,7 +578,7 @@ struct task_struct { | |||
578 | unsigned long flags; /* per process flags, defined below */ | 578 | unsigned long flags; /* per process flags, defined below */ |
579 | unsigned long ptrace; | 579 | unsigned long ptrace; |
580 | 580 | ||
581 | int lock_depth; /* Lock depth */ | 581 | int lock_depth; /* BKL lock depth */ |
582 | 582 | ||
583 | int prio, static_prio; | 583 | int prio, static_prio; |
584 | struct list_head run_list; | 584 | struct list_head run_list; |
@@ -661,7 +661,10 @@ struct task_struct { | |||
661 | struct key *thread_keyring; /* keyring private to this thread */ | 661 | struct key *thread_keyring; /* keyring private to this thread */ |
662 | #endif | 662 | #endif |
663 | int oomkilladj; /* OOM kill score adjustment (bit shift). */ | 663 | int oomkilladj; /* OOM kill score adjustment (bit shift). */ |
664 | char comm[TASK_COMM_LEN]; | 664 | char comm[TASK_COMM_LEN]; /* executable name excluding path |
665 | - access with [gs]et_task_comm (which lock | ||
666 | it with task_lock()) | ||
667 | - initialized normally by flush_old_exec */ | ||
665 | /* file system info */ | 668 | /* file system info */ |
666 | int link_count, total_link_count; | 669 | int link_count, total_link_count; |
667 | /* ipc stuff */ | 670 | /* ipc stuff */ |
diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index c3fb5984f250..d6025af7efac 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h | |||
@@ -479,6 +479,25 @@ uart_handle_cts_change(struct uart_port *port, unsigned int status) | |||
479 | } | 479 | } |
480 | } | 480 | } |
481 | 481 | ||
482 | #include <linux/tty_flip.h> | ||
483 | |||
484 | static inline void | ||
485 | uart_insert_char(struct uart_port *port, unsigned int status, | ||
486 | unsigned int overrun, unsigned int ch, unsigned int flag) | ||
487 | { | ||
488 | struct tty_struct *tty = port->info->tty; | ||
489 | |||
490 | if ((status & port->ignore_status_mask & ~overrun) == 0) | ||
491 | tty_insert_flip_char(tty, ch, flag); | ||
492 | |||
493 | /* | ||
494 | * Overrun is special. Since it's reported immediately, | ||
495 | * it doesn't affect the current character. | ||
496 | */ | ||
497 | if (status & ~port->ignore_status_mask & overrun) | ||
498 | tty_insert_flip_char(tty, 0, TTY_OVERRUN); | ||
499 | } | ||
500 | |||
482 | /* | 501 | /* |
483 | * UART_ENABLE_MS - determine if port should enable modem status irqs | 502 | * UART_ENABLE_MS - determine if port should enable modem status irqs |
484 | */ | 503 | */ |
diff --git a/include/linux/signal.h b/include/linux/signal.h index 0a98f5ec5cae..7be18b5e2fb4 100644 --- a/include/linux/signal.h +++ b/include/linux/signal.h | |||
@@ -231,10 +231,8 @@ extern int __group_send_sig_info(int, struct siginfo *, struct task_struct *); | |||
231 | extern long do_sigpending(void __user *, unsigned long); | 231 | extern long do_sigpending(void __user *, unsigned long); |
232 | extern int sigprocmask(int, sigset_t *, sigset_t *); | 232 | extern int sigprocmask(int, sigset_t *, sigset_t *); |
233 | 233 | ||
234 | #ifndef HAVE_ARCH_GET_SIGNAL_TO_DELIVER | ||
235 | struct pt_regs; | 234 | struct pt_regs; |
236 | extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie); | 235 | extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka, struct pt_regs *regs, void *cookie); |
237 | #endif | ||
238 | 236 | ||
239 | #endif /* __KERNEL__ */ | 237 | #endif /* __KERNEL__ */ |
240 | 238 | ||
diff --git a/include/linux/sockios.h b/include/linux/sockios.h index 5eb33205cc04..e6b9d1d36ea2 100644 --- a/include/linux/sockios.h +++ b/include/linux/sockios.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * Version: @(#)sockios.h 1.0.2 03/09/93 | 8 | * Version: @(#)sockios.h 1.0.2 03/09/93 |
9 | * | 9 | * |
10 | * Authors: Ross Biro, <bir7@leland.Stanford.Edu> | 10 | * Authors: Ross Biro |
11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
12 | * | 12 | * |
13 | * This program is free software; you can redistribute it and/or | 13 | * This program is free software; you can redistribute it and/or |
diff --git a/include/linux/soundcard.h b/include/linux/soundcard.h index 28d2d1881978..523d069c862c 100644 --- a/include/linux/soundcard.h +++ b/include/linux/soundcard.h | |||
@@ -39,6 +39,13 @@ | |||
39 | /* In Linux we need to be prepared for cross compiling */ | 39 | /* In Linux we need to be prepared for cross compiling */ |
40 | #include <linux/ioctl.h> | 40 | #include <linux/ioctl.h> |
41 | 41 | ||
42 | /* Endian macros. */ | ||
43 | #ifdef __KERNEL__ | ||
44 | # include <asm/byteorder.h> | ||
45 | #else | ||
46 | # include <endian.h> | ||
47 | #endif | ||
48 | |||
42 | /* | 49 | /* |
43 | * Supported card ID numbers (Should be somewhere else?) | 50 | * Supported card ID numbers (Should be somewhere else?) |
44 | */ | 51 | */ |
@@ -179,13 +186,26 @@ typedef struct seq_event_rec { | |||
179 | * Some big endian/little endian handling macros | 186 | * Some big endian/little endian handling macros |
180 | */ | 187 | */ |
181 | 188 | ||
182 | #if defined(_AIX) || defined(AIX) || defined(sparc) || defined(__sparc__) || defined(HPPA) || defined(PPC) || defined(__mc68000__) | 189 | #define _LINUX_PATCHKEY_H_INDIRECT |
183 | /* Big endian machines */ | 190 | #include <linux/patchkey.h> |
184 | # define _PATCHKEY(id) (0xfd00|id) | 191 | #undef _LINUX_PATCHKEY_H_INDIRECT |
185 | # define AFMT_S16_NE AFMT_S16_BE | 192 | |
186 | #else | 193 | #if defined(__KERNEL__) |
187 | # define _PATCHKEY(id) ((id<<8)|0xfd) | 194 | # if defined(__BIG_ENDIAN) |
188 | # define AFMT_S16_NE AFMT_S16_LE | 195 | # define AFMT_S16_NE AFMT_S16_BE |
196 | # elif defined(__LITTLE_ENDIAN) | ||
197 | # define AFMT_S16_NE AFMT_S16_LE | ||
198 | # else | ||
199 | # error "could not determine byte order" | ||
200 | # endif | ||
201 | #elif defined(__BYTE_ORDER) | ||
202 | # if __BYTE_ORDER == __BIG_ENDIAN | ||
203 | # define AFMT_S16_NE AFMT_S16_BE | ||
204 | # elif __BYTE_ORDER == __LITTLE_ENDIAN | ||
205 | # define AFMT_S16_NE AFMT_S16_LE | ||
206 | # else | ||
207 | # error "could not determine byte order" | ||
208 | # endif | ||
189 | #endif | 209 | #endif |
190 | 210 | ||
191 | /* | 211 | /* |
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index e895f3eaf53a..d6ba068719b6 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h | |||
@@ -248,7 +248,7 @@ typedef struct { | |||
248 | 248 | ||
249 | #define _spin_trylock_bh(lock) ({preempt_disable(); local_bh_disable(); \ | 249 | #define _spin_trylock_bh(lock) ({preempt_disable(); local_bh_disable(); \ |
250 | _raw_spin_trylock(lock) ? \ | 250 | _raw_spin_trylock(lock) ? \ |
251 | 1 : ({preempt_enable(); local_bh_enable(); 0;});}) | 251 | 1 : ({preempt_enable_no_resched(); local_bh_enable(); 0;});}) |
252 | 252 | ||
253 | #define _spin_lock(lock) \ | 253 | #define _spin_lock(lock) \ |
254 | do { \ | 254 | do { \ |
@@ -383,7 +383,7 @@ do { \ | |||
383 | #define _spin_unlock_bh(lock) \ | 383 | #define _spin_unlock_bh(lock) \ |
384 | do { \ | 384 | do { \ |
385 | _raw_spin_unlock(lock); \ | 385 | _raw_spin_unlock(lock); \ |
386 | preempt_enable(); \ | 386 | preempt_enable_no_resched(); \ |
387 | local_bh_enable(); \ | 387 | local_bh_enable(); \ |
388 | __release(lock); \ | 388 | __release(lock); \ |
389 | } while (0) | 389 | } while (0) |
@@ -391,7 +391,7 @@ do { \ | |||
391 | #define _write_unlock_bh(lock) \ | 391 | #define _write_unlock_bh(lock) \ |
392 | do { \ | 392 | do { \ |
393 | _raw_write_unlock(lock); \ | 393 | _raw_write_unlock(lock); \ |
394 | preempt_enable(); \ | 394 | preempt_enable_no_resched(); \ |
395 | local_bh_enable(); \ | 395 | local_bh_enable(); \ |
396 | __release(lock); \ | 396 | __release(lock); \ |
397 | } while (0) | 397 | } while (0) |
@@ -423,8 +423,8 @@ do { \ | |||
423 | #define _read_unlock_bh(lock) \ | 423 | #define _read_unlock_bh(lock) \ |
424 | do { \ | 424 | do { \ |
425 | _raw_read_unlock(lock); \ | 425 | _raw_read_unlock(lock); \ |
426 | preempt_enable_no_resched(); \ | ||
426 | local_bh_enable(); \ | 427 | local_bh_enable(); \ |
427 | preempt_enable(); \ | ||
428 | __release(lock); \ | 428 | __release(lock); \ |
429 | } while (0) | 429 | } while (0) |
430 | 430 | ||
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 772998147e3e..a17745c80a91 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -346,6 +346,7 @@ enum | |||
346 | NET_TCP_MODERATE_RCVBUF=106, | 346 | NET_TCP_MODERATE_RCVBUF=106, |
347 | NET_TCP_TSO_WIN_DIVISOR=107, | 347 | NET_TCP_TSO_WIN_DIVISOR=107, |
348 | NET_TCP_BIC_BETA=108, | 348 | NET_TCP_BIC_BETA=108, |
349 | NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR=109, | ||
349 | }; | 350 | }; |
350 | 351 | ||
351 | enum { | 352 | enum { |
@@ -399,6 +400,7 @@ enum | |||
399 | NET_IPV4_CONF_FORCE_IGMP_VERSION=17, | 400 | NET_IPV4_CONF_FORCE_IGMP_VERSION=17, |
400 | NET_IPV4_CONF_ARP_ANNOUNCE=18, | 401 | NET_IPV4_CONF_ARP_ANNOUNCE=18, |
401 | NET_IPV4_CONF_ARP_IGNORE=19, | 402 | NET_IPV4_CONF_ARP_IGNORE=19, |
403 | NET_IPV4_CONF_PROMOTE_SECONDARIES=20, | ||
402 | __NET_IPV4_CONF_MAX | 404 | __NET_IPV4_CONF_MAX |
403 | }; | 405 | }; |
404 | 406 | ||
diff --git a/include/linux/tc_ematch/tc_em_meta.h b/include/linux/tc_ematch/tc_em_meta.h index aa6b48bb4dcd..a6b2cc530af5 100644 --- a/include/linux/tc_ematch/tc_em_meta.h +++ b/include/linux/tc_ematch/tc_em_meta.h | |||
@@ -56,6 +56,36 @@ enum | |||
56 | TCF_META_ID_TCCLASSID, | 56 | TCF_META_ID_TCCLASSID, |
57 | TCF_META_ID_RTCLASSID, | 57 | TCF_META_ID_RTCLASSID, |
58 | TCF_META_ID_RTIIF, | 58 | TCF_META_ID_RTIIF, |
59 | TCF_META_ID_SK_FAMILY, | ||
60 | TCF_META_ID_SK_STATE, | ||
61 | TCF_META_ID_SK_REUSE, | ||
62 | TCF_META_ID_SK_BOUND_IF, | ||
63 | TCF_META_ID_SK_REFCNT, | ||
64 | TCF_META_ID_SK_SHUTDOWN, | ||
65 | TCF_META_ID_SK_PROTO, | ||
66 | TCF_META_ID_SK_TYPE, | ||
67 | TCF_META_ID_SK_RCVBUF, | ||
68 | TCF_META_ID_SK_RMEM_ALLOC, | ||
69 | TCF_META_ID_SK_WMEM_ALLOC, | ||
70 | TCF_META_ID_SK_OMEM_ALLOC, | ||
71 | TCF_META_ID_SK_WMEM_QUEUED, | ||
72 | TCF_META_ID_SK_RCV_QLEN, | ||
73 | TCF_META_ID_SK_SND_QLEN, | ||
74 | TCF_META_ID_SK_ERR_QLEN, | ||
75 | TCF_META_ID_SK_FORWARD_ALLOCS, | ||
76 | TCF_META_ID_SK_SNDBUF, | ||
77 | TCF_META_ID_SK_ALLOCS, | ||
78 | TCF_META_ID_SK_ROUTE_CAPS, | ||
79 | TCF_META_ID_SK_HASHENT, | ||
80 | TCF_META_ID_SK_LINGERTIME, | ||
81 | TCF_META_ID_SK_ACK_BACKLOG, | ||
82 | TCF_META_ID_SK_MAX_ACK_BACKLOG, | ||
83 | TCF_META_ID_SK_PRIO, | ||
84 | TCF_META_ID_SK_RCVLOWAT, | ||
85 | TCF_META_ID_SK_RCVTIMEO, | ||
86 | TCF_META_ID_SK_SNDTIMEO, | ||
87 | TCF_META_ID_SK_SENDMSG_OFF, | ||
88 | TCF_META_ID_SK_WRITE_PENDING, | ||
59 | __TCF_META_ID_MAX | 89 | __TCF_META_ID_MAX |
60 | }; | 90 | }; |
61 | #define TCF_META_ID_MAX (__TCF_META_ID_MAX - 1) | 91 | #define TCF_META_ID_MAX (__TCF_META_ID_MAX - 1) |
diff --git a/include/linux/trdevice.h b/include/linux/trdevice.h index aaa1f337edcb..99e02ef54c47 100644 --- a/include/linux/trdevice.h +++ b/include/linux/trdevice.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * Version: @(#)eth.h 1.0.4 05/13/93 | 8 | * Version: @(#)eth.h 1.0.4 05/13/93 |
9 | * | 9 | * |
10 | * Authors: Ross Biro, <bir7@leland.Stanford.Edu> | 10 | * Authors: Ross Biro |
11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
12 | * | 12 | * |
13 | * Relocated to include/linux where it belongs by Alan Cox | 13 | * Relocated to include/linux where it belongs by Alan Cox |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 41d1a644c9d4..2d1ac5058534 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -796,6 +796,10 @@ typedef void (*usb_complete_t)(struct urb *, struct pt_regs *); | |||
796 | * of the iso_frame_desc array, and the number of errors is reported in | 796 | * of the iso_frame_desc array, and the number of errors is reported in |
797 | * error_count. Completion callbacks for ISO transfers will normally | 797 | * error_count. Completion callbacks for ISO transfers will normally |
798 | * (re)submit URBs to ensure a constant transfer rate. | 798 | * (re)submit URBs to ensure a constant transfer rate. |
799 | * | ||
800 | * Note that even fields marked "public" should not be touched by the driver | ||
801 | * when the urb is owned by the hcd, that is, since the call to | ||
802 | * usb_submit_urb() till the entry into the completion routine. | ||
799 | */ | 803 | */ |
800 | struct urb | 804 | struct urb |
801 | { | 805 | { |
@@ -803,12 +807,12 @@ struct urb | |||
803 | struct kref kref; /* reference count of the URB */ | 807 | struct kref kref; /* reference count of the URB */ |
804 | spinlock_t lock; /* lock for the URB */ | 808 | spinlock_t lock; /* lock for the URB */ |
805 | void *hcpriv; /* private data for host controller */ | 809 | void *hcpriv; /* private data for host controller */ |
806 | struct list_head urb_list; /* list pointer to all active urbs */ | ||
807 | int bandwidth; /* bandwidth for INT/ISO request */ | 810 | int bandwidth; /* bandwidth for INT/ISO request */ |
808 | atomic_t use_count; /* concurrent submissions counter */ | 811 | atomic_t use_count; /* concurrent submissions counter */ |
809 | u8 reject; /* submissions will fail */ | 812 | u8 reject; /* submissions will fail */ |
810 | 813 | ||
811 | /* public, documented fields in the urb that can be used by drivers */ | 814 | /* public, documented fields in the urb that can be used by drivers */ |
815 | struct list_head urb_list; /* list head for use by the urb owner */ | ||
812 | struct usb_device *dev; /* (in) pointer to associated device */ | 816 | struct usb_device *dev; /* (in) pointer to associated device */ |
813 | unsigned int pipe; /* (in) pipe information */ | 817 | unsigned int pipe; /* (in) pipe information */ |
814 | int status; /* (return) non-ISO status */ | 818 | int status; /* (return) non-ISO status */ |
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 3a358c895188..6409d9cf5965 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h | |||
@@ -41,6 +41,7 @@ extern struct vm_struct *get_vm_area(unsigned long size, unsigned long flags); | |||
41 | extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags, | 41 | extern struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags, |
42 | unsigned long start, unsigned long end); | 42 | unsigned long start, unsigned long end); |
43 | extern struct vm_struct *remove_vm_area(void *addr); | 43 | extern struct vm_struct *remove_vm_area(void *addr); |
44 | extern struct vm_struct *__remove_vm_area(void *addr); | ||
44 | extern int map_vm_area(struct vm_struct *area, pgprot_t prot, | 45 | extern int map_vm_area(struct vm_struct *area, pgprot_t prot, |
45 | struct page ***pages); | 46 | struct page ***pages); |
46 | extern void unmap_vm_area(struct vm_struct *area); | 47 | extern void unmap_vm_area(struct vm_struct *area); |
diff --git a/include/linux/wait.h b/include/linux/wait.h index 17c874a8eb3f..c9486c3efb4a 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h | |||
@@ -386,9 +386,7 @@ int wake_bit_function(wait_queue_t *wait, unsigned mode, int sync, void *key); | |||
386 | wait_queue_t name = { \ | 386 | wait_queue_t name = { \ |
387 | .task = current, \ | 387 | .task = current, \ |
388 | .func = autoremove_wake_function, \ | 388 | .func = autoremove_wake_function, \ |
389 | .task_list = { .next = &(name).task_list, \ | 389 | .task_list = LIST_HEAD_INIT((name).task_list), \ |
390 | .prev = &(name).task_list, \ | ||
391 | }, \ | ||
392 | } | 390 | } |
393 | 391 | ||
394 | #define DEFINE_WAIT_BIT(name, word, bit) \ | 392 | #define DEFINE_WAIT_BIT(name, word, bit) \ |
diff --git a/include/media/video-buf-dvb.h b/include/media/video-buf-dvb.h index 94bd33619aa5..ad0a07a3a895 100644 --- a/include/media/video-buf-dvb.h +++ b/include/media/video-buf-dvb.h | |||
@@ -16,7 +16,7 @@ struct videobuf_dvb { | |||
16 | int nfeeds; | 16 | int nfeeds; |
17 | 17 | ||
18 | /* videobuf_dvb_(un)register manges this */ | 18 | /* videobuf_dvb_(un)register manges this */ |
19 | struct dvb_adapter *adapter; | 19 | struct dvb_adapter adapter; |
20 | struct dvb_demux demux; | 20 | struct dvb_demux demux; |
21 | struct dmxdev dmxdev; | 21 | struct dmxdev dmxdev; |
22 | struct dmx_frontend fe_hw; | 22 | struct dmx_frontend fe_hw; |
diff --git a/include/net/act_generic.h b/include/net/act_generic.h index 95b120781c14..c9daa7e52300 100644 --- a/include/net/act_generic.h +++ b/include/net/act_generic.h | |||
@@ -2,8 +2,8 @@ | |||
2 | * include/net/act_generic.h | 2 | * include/net/act_generic.h |
3 | * | 3 | * |
4 | */ | 4 | */ |
5 | #ifndef ACT_GENERIC_H | 5 | #ifndef _NET_ACT_GENERIC_H |
6 | #define ACT_GENERIC_H | 6 | #define _NET_ACT_GENERIC_H |
7 | static inline int tcf_defact_release(struct tcf_defact *p, int bind) | 7 | static inline int tcf_defact_release(struct tcf_defact *p, int bind) |
8 | { | 8 | { |
9 | int ret = 0; | 9 | int ret = 0; |
diff --git a/include/net/addrconf.h b/include/net/addrconf.h index f1e5af4be98e..a0ed93672176 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h | |||
@@ -17,6 +17,8 @@ | |||
17 | 17 | ||
18 | #define IPV6_MAX_ADDRESSES 16 | 18 | #define IPV6_MAX_ADDRESSES 16 |
19 | 19 | ||
20 | #include <linux/in6.h> | ||
21 | |||
20 | struct prefix_info { | 22 | struct prefix_info { |
21 | __u8 type; | 23 | __u8 type; |
22 | __u8 length; | 24 | __u8 length; |
@@ -43,7 +45,6 @@ struct prefix_info { | |||
43 | 45 | ||
44 | #ifdef __KERNEL__ | 46 | #ifdef __KERNEL__ |
45 | 47 | ||
46 | #include <linux/in6.h> | ||
47 | #include <linux/netdevice.h> | 48 | #include <linux/netdevice.h> |
48 | #include <net/if_inet6.h> | 49 | #include <net/if_inet6.h> |
49 | #include <net/ipv6.h> | 50 | #include <net/ipv6.h> |
diff --git a/include/net/icmp.h b/include/net/icmp.h index 3fc192478aa2..e5ef0d15fb45 100644 --- a/include/net/icmp.h +++ b/include/net/icmp.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * Version: @(#)icmp.h 1.0.4 05/13/93 | 8 | * Version: @(#)icmp.h 1.0.4 05/13/93 |
9 | * | 9 | * |
10 | * Authors: Ross Biro, <bir7@leland.Stanford.Edu> | 10 | * Authors: Ross Biro |
11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
12 | * | 12 | * |
13 | * This program is free software; you can redistribute it and/or | 13 | * This program is free software; you can redistribute it and/or |
diff --git a/include/net/ip.h b/include/net/ip.h index b4db1375da2c..32360bbe143f 100644 --- a/include/net/ip.h +++ b/include/net/ip.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * Version: @(#)ip.h 1.0.2 05/07/93 | 8 | * Version: @(#)ip.h 1.0.2 05/07/93 |
9 | * | 9 | * |
10 | * Authors: Ross Biro, <bir7@leland.Stanford.Edu> | 10 | * Authors: Ross Biro |
11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
12 | * Alan Cox, <gw4pts@gw4pts.ampr.org> | 12 | * Alan Cox, <gw4pts@gw4pts.ampr.org> |
13 | * | 13 | * |
@@ -163,6 +163,7 @@ DECLARE_SNMP_STAT(struct linux_mib, net_statistics); | |||
163 | 163 | ||
164 | extern int sysctl_local_port_range[2]; | 164 | extern int sysctl_local_port_range[2]; |
165 | extern int sysctl_ip_default_ttl; | 165 | extern int sysctl_ip_default_ttl; |
166 | extern int sysctl_ip_nonlocal_bind; | ||
166 | 167 | ||
167 | #ifdef CONFIG_INET | 168 | #ifdef CONFIG_INET |
168 | /* The function in 2.2 was invalid, producing wrong result for | 169 | /* The function in 2.2 was invalid, producing wrong result for |
diff --git a/include/net/route.h b/include/net/route.h index 22da7579d5de..d34ca8fc6756 100644 --- a/include/net/route.h +++ b/include/net/route.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * Version: @(#)route.h 1.0.4 05/27/93 | 8 | * Version: @(#)route.h 1.0.4 05/27/93 |
9 | * | 9 | * |
10 | * Authors: Ross Biro, <bir7@leland.Stanford.Edu> | 10 | * Authors: Ross Biro |
11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
12 | * Fixes: | 12 | * Fixes: |
13 | * Alan Cox : Reformatted. Added ip_rt_local() | 13 | * Alan Cox : Reformatted. Added ip_rt_local() |
@@ -181,9 +181,6 @@ static inline int ip_route_newports(struct rtable **rp, u16 sport, u16 dport, | |||
181 | memcpy(&fl, &(*rp)->fl, sizeof(fl)); | 181 | memcpy(&fl, &(*rp)->fl, sizeof(fl)); |
182 | fl.fl_ip_sport = sport; | 182 | fl.fl_ip_sport = sport; |
183 | fl.fl_ip_dport = dport; | 183 | fl.fl_ip_dport = dport; |
184 | #if defined(CONFIG_IP_ROUTE_MULTIPATH_CACHED) | ||
185 | fl.flags |= FLOWI_FLAG_MULTIPATHOLDROUTE; | ||
186 | #endif | ||
187 | ip_rt_put(*rp); | 184 | ip_rt_put(*rp); |
188 | *rp = NULL; | 185 | *rp = NULL; |
189 | return ip_route_output_flow(rp, &fl, sk, 0); | 186 | return ip_route_output_flow(rp, &fl, sk, 0); |
diff --git a/include/net/sock.h b/include/net/sock.h index cc4c9190b7fd..a9ef3a6a13f3 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * Version: @(#)sock.h 1.0.4 05/13/93 | 8 | * Version: @(#)sock.h 1.0.4 05/13/93 |
9 | * | 9 | * |
10 | * Authors: Ross Biro, <bir7@leland.Stanford.Edu> | 10 | * Authors: Ross Biro |
11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
12 | * Corey Minyard <wf-rch!minyard@relay.EU.net> | 12 | * Corey Minyard <wf-rch!minyard@relay.EU.net> |
13 | * Florian La Roche <flla@stud.uni-sb.de> | 13 | * Florian La Roche <flla@stud.uni-sb.de> |
@@ -141,6 +141,7 @@ struct sock_common { | |||
141 | * @sk_callback_lock: used with the callbacks in the end of this struct | 141 | * @sk_callback_lock: used with the callbacks in the end of this struct |
142 | * @sk_error_queue: rarely used | 142 | * @sk_error_queue: rarely used |
143 | * @sk_prot: protocol handlers inside a network family | 143 | * @sk_prot: protocol handlers inside a network family |
144 | * @sk_prot_creator: sk_prot of original sock creator (see ipv6_setsockopt, IPV6_ADDRFORM for instance) | ||
144 | * @sk_err: last error | 145 | * @sk_err: last error |
145 | * @sk_err_soft: errors that don't cause failure but are the cause of a persistent failure not just 'timed out' | 146 | * @sk_err_soft: errors that don't cause failure but are the cause of a persistent failure not just 'timed out' |
146 | * @sk_ack_backlog: current listen backlog | 147 | * @sk_ack_backlog: current listen backlog |
@@ -218,6 +219,7 @@ struct sock { | |||
218 | } sk_backlog; | 219 | } sk_backlog; |
219 | struct sk_buff_head sk_error_queue; | 220 | struct sk_buff_head sk_error_queue; |
220 | struct proto *sk_prot; | 221 | struct proto *sk_prot; |
222 | struct proto *sk_prot_creator; | ||
221 | rwlock_t sk_callback_lock; | 223 | rwlock_t sk_callback_lock; |
222 | int sk_err, | 224 | int sk_err, |
223 | sk_err_soft; | 225 | sk_err_soft; |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 9355ae5b1d75..e71f8ba3e101 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * Version: @(#)tcp.h 1.0.5 05/23/93 | 8 | * Version: @(#)tcp.h 1.0.5 05/23/93 |
9 | * | 9 | * |
10 | * Authors: Ross Biro, <bir7@leland.Stanford.Edu> | 10 | * Authors: Ross Biro |
11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
12 | * | 12 | * |
13 | * This program is free software; you can redistribute it and/or | 13 | * This program is free software; you can redistribute it and/or |
diff --git a/include/net/udp.h b/include/net/udp.h index c496d10101db..ac229b761dbc 100644 --- a/include/net/udp.h +++ b/include/net/udp.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * Version: @(#)udp.h 1.0.2 05/07/93 | 8 | * Version: @(#)udp.h 1.0.2 05/07/93 |
9 | * | 9 | * |
10 | * Authors: Ross Biro, <bir7@leland.Stanford.Edu> | 10 | * Authors: Ross Biro |
11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> | 11 | * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> |
12 | * | 12 | * |
13 | * Fixes: | 13 | * Fixes: |
diff --git a/include/net/xfrm.h b/include/net/xfrm.h index e142a256d5dc..d675836ba6c3 100644 --- a/include/net/xfrm.h +++ b/include/net/xfrm.h | |||
@@ -515,6 +515,8 @@ struct xfrm_dst | |||
515 | struct dst_entry *route; | 515 | struct dst_entry *route; |
516 | u32 route_mtu_cached; | 516 | u32 route_mtu_cached; |
517 | u32 child_mtu_cached; | 517 | u32 child_mtu_cached; |
518 | u32 route_cookie; | ||
519 | u32 path_cookie; | ||
518 | }; | 520 | }; |
519 | 521 | ||
520 | static inline void xfrm_dst_destroy(struct xfrm_dst *xdst) | 522 | static inline void xfrm_dst_destroy(struct xfrm_dst *xdst) |
diff --git a/include/scsi/scsi_transport_spi.h b/include/scsi/scsi_transport_spi.h index 6dcf497bf46d..a30d6cd4c0e8 100644 --- a/include/scsi/scsi_transport_spi.h +++ b/include/scsi/scsi_transport_spi.h | |||
@@ -27,8 +27,11 @@ struct scsi_transport_template; | |||
27 | 27 | ||
28 | struct spi_transport_attrs { | 28 | struct spi_transport_attrs { |
29 | int period; /* value in the PPR/SDTR command */ | 29 | int period; /* value in the PPR/SDTR command */ |
30 | int min_period; | ||
30 | int offset; | 31 | int offset; |
32 | int max_offset; | ||
31 | unsigned int width:1; /* 0 - narrow, 1 - wide */ | 33 | unsigned int width:1; /* 0 - narrow, 1 - wide */ |
34 | unsigned int max_width:1; | ||
32 | unsigned int iu:1; /* Information Units enabled */ | 35 | unsigned int iu:1; /* Information Units enabled */ |
33 | unsigned int dt:1; /* DT clocking enabled */ | 36 | unsigned int dt:1; /* DT clocking enabled */ |
34 | unsigned int qas:1; /* Quick Arbitration and Selection enabled */ | 37 | unsigned int qas:1; /* Quick Arbitration and Selection enabled */ |
@@ -63,8 +66,11 @@ struct spi_host_attrs { | |||
63 | 66 | ||
64 | /* accessor functions */ | 67 | /* accessor functions */ |
65 | #define spi_period(x) (((struct spi_transport_attrs *)&(x)->starget_data)->period) | 68 | #define spi_period(x) (((struct spi_transport_attrs *)&(x)->starget_data)->period) |
69 | #define spi_min_period(x) (((struct spi_transport_attrs *)&(x)->starget_data)->min_period) | ||
66 | #define spi_offset(x) (((struct spi_transport_attrs *)&(x)->starget_data)->offset) | 70 | #define spi_offset(x) (((struct spi_transport_attrs *)&(x)->starget_data)->offset) |
71 | #define spi_max_offset(x) (((struct spi_transport_attrs *)&(x)->starget_data)->max_offset) | ||
67 | #define spi_width(x) (((struct spi_transport_attrs *)&(x)->starget_data)->width) | 72 | #define spi_width(x) (((struct spi_transport_attrs *)&(x)->starget_data)->width) |
73 | #define spi_max_width(x) (((struct spi_transport_attrs *)&(x)->starget_data)->max_width) | ||
68 | #define spi_iu(x) (((struct spi_transport_attrs *)&(x)->starget_data)->iu) | 74 | #define spi_iu(x) (((struct spi_transport_attrs *)&(x)->starget_data)->iu) |
69 | #define spi_dt(x) (((struct spi_transport_attrs *)&(x)->starget_data)->dt) | 75 | #define spi_dt(x) (((struct spi_transport_attrs *)&(x)->starget_data)->dt) |
70 | #define spi_qas(x) (((struct spi_transport_attrs *)&(x)->starget_data)->qas) | 76 | #define spi_qas(x) (((struct spi_transport_attrs *)&(x)->starget_data)->qas) |