diff options
Diffstat (limited to 'include')
236 files changed, 5706 insertions, 1469 deletions
diff --git a/include/asm-alpha/core_t2.h b/include/asm-alpha/core_t2.h index dba70c62a1..457c34b6eb 100644 --- a/include/asm-alpha/core_t2.h +++ b/include/asm-alpha/core_t2.h | |||
@@ -435,7 +435,7 @@ static inline void t2_outl(u32 b, unsigned long addr) | |||
435 | set_hae(msb); \ | 435 | set_hae(msb); \ |
436 | } | 436 | } |
437 | 437 | ||
438 | static spinlock_t t2_hae_lock = SPIN_LOCK_UNLOCKED; | 438 | static DEFINE_SPINLOCK(t2_hae_lock); |
439 | 439 | ||
440 | __EXTERN_INLINE u8 t2_readb(const volatile void __iomem *xaddr) | 440 | __EXTERN_INLINE u8 t2_readb(const volatile void __iomem *xaddr) |
441 | { | 441 | { |
diff --git a/include/asm-alpha/hw_irq.h b/include/asm-alpha/hw_irq.h index ca9d43b635..a37db0f950 100644 --- a/include/asm-alpha/hw_irq.h +++ b/include/asm-alpha/hw_irq.h | |||
@@ -2,8 +2,6 @@ | |||
2 | #define _ALPHA_HW_IRQ_H | 2 | #define _ALPHA_HW_IRQ_H |
3 | 3 | ||
4 | 4 | ||
5 | static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) {} | ||
6 | |||
7 | extern volatile unsigned long irq_err_count; | 5 | extern volatile unsigned long irq_err_count; |
8 | 6 | ||
9 | #ifdef CONFIG_ALPHA_GENERIC | 7 | #ifdef CONFIG_ALPHA_GENERIC |
diff --git a/include/asm-arm/arch-at91rm9200/memory.h b/include/asm-arm/arch-at91rm9200/memory.h index 3c327c4043..f985069e6d 100644 --- a/include/asm-arm/arch-at91rm9200/memory.h +++ b/include/asm-arm/arch-at91rm9200/memory.h | |||
@@ -33,9 +33,7 @@ | |||
33 | * bus_to_virt: Used to convert an address for DMA operations | 33 | * bus_to_virt: Used to convert an address for DMA operations |
34 | * to an address that the kernel can use. | 34 | * to an address that the kernel can use. |
35 | */ | 35 | */ |
36 | #define __virt_to_bus__is_a_macro | ||
37 | #define __virt_to_bus(x) __virt_to_phys(x) | 36 | #define __virt_to_bus(x) __virt_to_phys(x) |
38 | #define __bus_to_virt__is_a_macro | ||
39 | #define __bus_to_virt(x) __phys_to_virt(x) | 37 | #define __bus_to_virt(x) __phys_to_virt(x) |
40 | 38 | ||
41 | #endif | 39 | #endif |
diff --git a/include/asm-arm/arch-h720x/memory.h b/include/asm-arm/arch-h720x/memory.h index 4a1bfd78a0..53e923dba7 100644 --- a/include/asm-arm/arch-h720x/memory.h +++ b/include/asm-arm/arch-h720x/memory.h | |||
@@ -23,9 +23,7 @@ | |||
23 | * There is something to do here later !, Mar 2000, Jungjun Kim | 23 | * There is something to do here later !, Mar 2000, Jungjun Kim |
24 | */ | 24 | */ |
25 | 25 | ||
26 | #define __virt_to_bus__is_a_macro | ||
27 | #define __virt_to_bus(x) __virt_to_phys(x) | 26 | #define __virt_to_bus(x) __virt_to_phys(x) |
28 | #define __bus_to_virt__is_a_macro | ||
29 | #define __bus_to_virt(x) __phys_to_virt(x) | 27 | #define __bus_to_virt(x) __phys_to_virt(x) |
30 | 28 | ||
31 | #endif | 29 | #endif |
diff --git a/include/asm-arm/arch-imx/memory.h b/include/asm-arm/arch-imx/memory.h index d09ae32cd2..5ad9012791 100644 --- a/include/asm-arm/arch-imx/memory.h +++ b/include/asm-arm/arch-imx/memory.h | |||
@@ -30,9 +30,7 @@ | |||
30 | * bus_to_virt: Used to convert an address for DMA operations | 30 | * bus_to_virt: Used to convert an address for DMA operations |
31 | * to an address that the kernel can use. | 31 | * to an address that the kernel can use. |
32 | */ | 32 | */ |
33 | #define __virt_to_bus__is_a_macro | 33 | #define __virt_to_bus(x) (x - PAGE_OFFSET + PHYS_OFFSET) |
34 | #define __virt_to_bus(x) (x - PAGE_OFFSET + PHYS_OFFSET) | 34 | #define __bus_to_virt(x) (x - PHYS_OFFSET + PAGE_OFFSET) |
35 | #define __bus_to_virt__is_a_macro | ||
36 | #define __bus_to_virt(x) (x - PHYS_OFFSET + PAGE_OFFSET) | ||
37 | 35 | ||
38 | #endif | 36 | #endif |
diff --git a/include/asm-arm/arch-ixp23xx/ixp23xx.h b/include/asm-arm/arch-ixp23xx/ixp23xx.h index d0a72201ee..3927b1d61b 100644 --- a/include/asm-arm/arch-ixp23xx/ixp23xx.h +++ b/include/asm-arm/arch-ixp23xx/ixp23xx.h | |||
@@ -295,15 +295,4 @@ | |||
295 | #define IXP23XX_PCI_CPP_ADDR_BITS IXP23XX_PCI_CSR(0x0160) | 295 | #define IXP23XX_PCI_CPP_ADDR_BITS IXP23XX_PCI_CSR(0x0160) |
296 | 296 | ||
297 | 297 | ||
298 | #ifndef __ASSEMBLY__ | ||
299 | /* | ||
300 | * Is system memory on the XSI or CPP bus? | ||
301 | */ | ||
302 | static inline unsigned ixp23xx_cpp_boot(void) | ||
303 | { | ||
304 | return (*IXP23XX_EXP_CFG0 & IXP23XX_EXP_CFG0_XSI_NOT_PRES); | ||
305 | } | ||
306 | #endif | ||
307 | |||
308 | |||
309 | #endif | 298 | #endif |
diff --git a/include/asm-arm/arch-ixp23xx/platform.h b/include/asm-arm/arch-ixp23xx/platform.h index 19a73b39c8..56e16d6664 100644 --- a/include/asm-arm/arch-ixp23xx/platform.h +++ b/include/asm-arm/arch-ixp23xx/platform.h | |||
@@ -43,5 +43,15 @@ extern struct sys_timer ixp23xx_timer; | |||
43 | 43 | ||
44 | #define IXP23XX_UART_XTAL 14745600 | 44 | #define IXP23XX_UART_XTAL 14745600 |
45 | 45 | ||
46 | #ifndef __ASSEMBLY__ | ||
47 | /* | ||
48 | * Is system memory on the XSI or CPP bus? | ||
49 | */ | ||
50 | static inline unsigned ixp23xx_cpp_boot(void) | ||
51 | { | ||
52 | return (*IXP23XX_EXP_CFG0 & IXP23XX_EXP_CFG0_XSI_NOT_PRES); | ||
53 | } | ||
54 | #endif | ||
55 | |||
46 | 56 | ||
47 | #endif | 57 | #endif |
diff --git a/include/asm-arm/arch-ixp23xx/uncompress.h b/include/asm-arm/arch-ixp23xx/uncompress.h index 013575e6a9..16c1110f23 100644 --- a/include/asm-arm/arch-ixp23xx/uncompress.h +++ b/include/asm-arm/arch-ixp23xx/uncompress.h | |||
@@ -11,7 +11,7 @@ | |||
11 | #ifndef __ASM_ARCH_UNCOMPRESS_H | 11 | #ifndef __ASM_ARCH_UNCOMPRESS_H |
12 | #define __ASM_ARCH_UNCOMPRESS_H | 12 | #define __ASM_ARCH_UNCOMPRESS_H |
13 | 13 | ||
14 | #include <asm/hardware.h> | 14 | #include <asm/arch/ixp23xx.h> |
15 | #include <linux/serial_reg.h> | 15 | #include <linux/serial_reg.h> |
16 | 16 | ||
17 | #define UART_BASE ((volatile u32 *)IXP23XX_UART1_PHYS) | 17 | #define UART_BASE ((volatile u32 *)IXP23XX_UART1_PHYS) |
diff --git a/include/asm-arm/arch-s3c2410/regs-dsc.h b/include/asm-arm/arch-s3c2410/regs-dsc.h index 84aca61cba..a0a1248751 100644 --- a/include/asm-arm/arch-s3c2410/regs-dsc.h +++ b/include/asm-arm/arch-s3c2410/regs-dsc.h | |||
@@ -7,25 +7,23 @@ | |||
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 | * S3C2440 Signal Drive Strength Control | 10 | * S3C2440/S3C2412 Signal Drive Strength Control |
11 | * | ||
12 | * Changelog: | ||
13 | * 11-Aug-2004 BJD Created file | ||
14 | * 25-Aug-2004 BJD Added the _SELECT_* defs for using with functions | ||
15 | */ | 11 | */ |
16 | 12 | ||
17 | 13 | ||
18 | #ifndef __ASM_ARCH_REGS_DSC_H | 14 | #ifndef __ASM_ARCH_REGS_DSC_H |
19 | #define __ASM_ARCH_REGS_DSC_H "2440-dsc" | 15 | #define __ASM_ARCH_REGS_DSC_H "2440-dsc" |
20 | 16 | ||
21 | #ifdef CONFIG_CPU_S3C2440 | 17 | #if defined(CONFIG_CPU_S3C2412) |
18 | #define S3C2412_DSC0 S3C2410_GPIOREG(0xdc) | ||
19 | #define S3C2412_DSC1 S3C2410_GPIOREG(0xe0) | ||
20 | #endif | ||
21 | |||
22 | #if defined(CONFIG_CPU_S3C2440) | ||
22 | 23 | ||
23 | #define S3C2440_DSC0 S3C2410_GPIOREG(0xc4) | 24 | #define S3C2440_DSC0 S3C2410_GPIOREG(0xc4) |
24 | #define S3C2440_DSC1 S3C2410_GPIOREG(0xc8) | 25 | #define S3C2440_DSC1 S3C2410_GPIOREG(0xc8) |
25 | 26 | ||
26 | #define S3C2412_DSC0 S3C2410_GPIOREG(0xdc) | ||
27 | #define S3C2412_DSC1 S3C2410_GPIOREG(0xe0) | ||
28 | |||
29 | #define S3C2440_SELECT_DSC0 (0) | 27 | #define S3C2440_SELECT_DSC0 (0) |
30 | #define S3C2440_SELECT_DSC1 (1<<31) | 28 | #define S3C2440_SELECT_DSC1 (1<<31) |
31 | 29 | ||
diff --git a/include/asm-arm/arch-s3c2410/regs-nand.h b/include/asm-arm/arch-s3c2410/regs-nand.h index 7cff235e66..c1470c695c 100644 --- a/include/asm-arm/arch-s3c2410/regs-nand.h +++ b/include/asm-arm/arch-s3c2410/regs-nand.h | |||
@@ -39,10 +39,19 @@ | |||
39 | #define S3C2440_NFESTAT1 S3C2410_NFREG(0x28) | 39 | #define S3C2440_NFESTAT1 S3C2410_NFREG(0x28) |
40 | #define S3C2440_NFMECC0 S3C2410_NFREG(0x2C) | 40 | #define S3C2440_NFMECC0 S3C2410_NFREG(0x2C) |
41 | #define S3C2440_NFMECC1 S3C2410_NFREG(0x30) | 41 | #define S3C2440_NFMECC1 S3C2410_NFREG(0x30) |
42 | #define S3C2440_NFSECC S3C2410_NFREG(0x34) | 42 | #define S3C2440_NFSECC S3C24E10_NFREG(0x34) |
43 | #define S3C2440_NFSBLK S3C2410_NFREG(0x38) | 43 | #define S3C2440_NFSBLK S3C2410_NFREG(0x38) |
44 | #define S3C2440_NFEBLK S3C2410_NFREG(0x3C) | 44 | #define S3C2440_NFEBLK S3C2410_NFREG(0x3C) |
45 | 45 | ||
46 | #define S3C2412_NFSBLK S3C2410_NFREG(0x20) | ||
47 | #define S3C2412_NFEBLK S3C2410_NFREG(0x24) | ||
48 | #define S3C2412_NFSTAT S3C2410_NFREG(0x28) | ||
49 | #define S3C2412_NFMECC_ERR0 S3C2410_NFREG(0x2C) | ||
50 | #define S3C2412_NFMECC_ERR1 S3C2410_NFREG(0x30) | ||
51 | #define S3C2412_NFMECC0 S3C2410_NFREG(0x34) | ||
52 | #define S3C2412_NFMECC1 S3C2410_NFREG(0x38) | ||
53 | #define S3C2412_NFSECC S3C2410_NFREG(0x3C) | ||
54 | |||
46 | #define S3C2410_NFCONF_EN (1<<15) | 55 | #define S3C2410_NFCONF_EN (1<<15) |
47 | #define S3C2410_NFCONF_512BYTE (1<<14) | 56 | #define S3C2410_NFCONF_512BYTE (1<<14) |
48 | #define S3C2410_NFCONF_4STEP (1<<13) | 57 | #define S3C2410_NFCONF_4STEP (1<<13) |
@@ -77,5 +86,42 @@ | |||
77 | #define S3C2440_NFSTAT_RnB_CHANGE (1<<2) | 86 | #define S3C2440_NFSTAT_RnB_CHANGE (1<<2) |
78 | #define S3C2440_NFSTAT_ILLEGAL_ACCESS (1<<3) | 87 | #define S3C2440_NFSTAT_ILLEGAL_ACCESS (1<<3) |
79 | 88 | ||
89 | #define S3C2412_NFCONF_NANDBOOT (1<<31) | ||
90 | #define S3C2412_NFCONF_ECCCLKCON (1<<30) | ||
91 | #define S3C2412_NFCONF_ECC_MLC (1<<24) | ||
92 | #define S3C2412_NFCONF_TACLS_MASK (7<<12) /* 1 extra bit of Tacls */ | ||
93 | |||
94 | #define S3C2412_NFCONT_ECC4_DIRWR (1<<18) | ||
95 | #define S3C2412_NFCONT_LOCKTIGHT (1<<17) | ||
96 | #define S3C2412_NFCONT_SOFTLOCK (1<<16) | ||
97 | #define S3C2412_NFCONT_ECC4_ENCINT (1<<13) | ||
98 | #define S3C2412_NFCONT_ECC4_DECINT (1<<12) | ||
99 | #define S3C2412_NFCONT_MAIN_ECC_LOCK (1<<7) | ||
100 | #define S3C2412_NFCONT_INIT_MAIN_ECC (1<<5) | ||
101 | #define S3C2412_NFCONT_nFCE1 (1<<2) | ||
102 | #define S3C2412_NFCONT_nFCE0 (1<<1) | ||
103 | |||
104 | #define S3C2412_NFSTAT_ECC_ENCDONE (1<<7) | ||
105 | #define S3C2412_NFSTAT_ECC_DECDONE (1<<6) | ||
106 | #define S3C2412_NFSTAT_ILLEGAL_ACCESS (1<<5) | ||
107 | #define S3C2412_NFSTAT_RnB_CHANGE (1<<4) | ||
108 | #define S3C2412_NFSTAT_nFCE1 (1<<3) | ||
109 | #define S3C2412_NFSTAT_nFCE0 (1<<2) | ||
110 | #define S3C2412_NFSTAT_Res1 (1<<1) | ||
111 | #define S3C2412_NFSTAT_READY (1<<0) | ||
112 | |||
113 | #define S3C2412_NFECCERR_SERRDATA(x) (((x) >> 21) & 0xf) | ||
114 | #define S3C2412_NFECCERR_SERRBIT(x) (((x) >> 18) & 0x7) | ||
115 | #define S3C2412_NFECCERR_MERRDATA(x) (((x) >> 7) & 0x3ff) | ||
116 | #define S3C2412_NFECCERR_MERRBIT(x) (((x) >> 4) & 0x7) | ||
117 | #define S3C2412_NFECCERR_SPARE_ERR(x) (((x) >> 2) & 0x3) | ||
118 | #define S3C2412_NFECCERR_MAIN_ERR(x) (((x) >> 2) & 0x3) | ||
119 | #define S3C2412_NFECCERR_NONE (0) | ||
120 | #define S3C2412_NFECCERR_1BIT (1) | ||
121 | #define S3C2412_NFECCERR_MULTIBIT (2) | ||
122 | #define S3C2412_NFECCERR_ECCAREA (3) | ||
123 | |||
124 | |||
125 | |||
80 | #endif /* __ASM_ARM_REGS_NAND */ | 126 | #endif /* __ASM_ARM_REGS_NAND */ |
81 | 127 | ||
diff --git a/include/asm-arm/assembler.h b/include/asm-arm/assembler.h index d53bafa9bf..fce8328208 100644 --- a/include/asm-arm/assembler.h +++ b/include/asm-arm/assembler.h | |||
@@ -55,30 +55,6 @@ | |||
55 | #define PLD(code...) | 55 | #define PLD(code...) |
56 | #endif | 56 | #endif |
57 | 57 | ||
58 | #define MODE_USR USR_MODE | ||
59 | #define MODE_FIQ FIQ_MODE | ||
60 | #define MODE_IRQ IRQ_MODE | ||
61 | #define MODE_SVC SVC_MODE | ||
62 | |||
63 | #define DEFAULT_FIQ MODE_FIQ | ||
64 | |||
65 | /* | ||
66 | * LOADREGS - ldm with PC in register list (eg, ldmfd sp!, {pc}) | ||
67 | */ | ||
68 | #ifdef __STDC__ | ||
69 | #define LOADREGS(cond, base, reglist...)\ | ||
70 | ldm##cond base,reglist | ||
71 | #else | ||
72 | #define LOADREGS(cond, base, reglist...)\ | ||
73 | ldm/**/cond base,reglist | ||
74 | #endif | ||
75 | |||
76 | /* | ||
77 | * Build a return instruction for this processor type. | ||
78 | */ | ||
79 | #define RETINSTR(instr, regs...)\ | ||
80 | instr regs | ||
81 | |||
82 | /* | 58 | /* |
83 | * Enable and disable interrupts | 59 | * Enable and disable interrupts |
84 | */ | 60 | */ |
@@ -117,18 +93,6 @@ | |||
117 | msr cpsr_c, \oldcpsr | 93 | msr cpsr_c, \oldcpsr |
118 | .endm | 94 | .endm |
119 | 95 | ||
120 | /* | ||
121 | * These two are used to save LR/restore PC over a user-based access. | ||
122 | * The old 26-bit architecture requires that we do. On 32-bit | ||
123 | * architecture, we can safely ignore this requirement. | ||
124 | */ | ||
125 | .macro save_lr | ||
126 | .endm | ||
127 | |||
128 | .macro restore_pc | ||
129 | mov pc, lr | ||
130 | .endm | ||
131 | |||
132 | #define USER(x...) \ | 96 | #define USER(x...) \ |
133 | 9999: x; \ | 97 | 9999: x; \ |
134 | .section __ex_table,"a"; \ | 98 | .section __ex_table,"a"; \ |
diff --git a/include/asm-arm/bugs.h b/include/asm-arm/bugs.h index 4c80ec519d..ca54eb0f12 100644 --- a/include/asm-arm/bugs.h +++ b/include/asm-arm/bugs.h | |||
@@ -10,8 +10,12 @@ | |||
10 | #ifndef __ASM_BUGS_H | 10 | #ifndef __ASM_BUGS_H |
11 | #define __ASM_BUGS_H | 11 | #define __ASM_BUGS_H |
12 | 12 | ||
13 | #ifdef CONFIG_MMU | ||
13 | extern void check_writebuffer_bugs(void); | 14 | extern void check_writebuffer_bugs(void); |
14 | 15 | ||
15 | #define check_bugs() check_writebuffer_bugs() | 16 | #define check_bugs() check_writebuffer_bugs() |
17 | #else | ||
18 | #define check_bugs() do { } while (0) | ||
19 | #endif | ||
16 | 20 | ||
17 | #endif | 21 | #endif |
diff --git a/include/asm-arm/domain.h b/include/asm-arm/domain.h index f8ea2de484..4c2885abbe 100644 --- a/include/asm-arm/domain.h +++ b/include/asm-arm/domain.h | |||
@@ -50,6 +50,8 @@ | |||
50 | #define domain_val(dom,type) ((type) << (2*(dom))) | 50 | #define domain_val(dom,type) ((type) << (2*(dom))) |
51 | 51 | ||
52 | #ifndef __ASSEMBLY__ | 52 | #ifndef __ASSEMBLY__ |
53 | |||
54 | #ifdef CONFIG_MMU | ||
53 | #define set_domain(x) \ | 55 | #define set_domain(x) \ |
54 | do { \ | 56 | do { \ |
55 | __asm__ __volatile__( \ | 57 | __asm__ __volatile__( \ |
@@ -66,5 +68,10 @@ | |||
66 | set_domain(thread->cpu_domain); \ | 68 | set_domain(thread->cpu_domain); \ |
67 | } while (0) | 69 | } while (0) |
68 | 70 | ||
71 | #else | ||
72 | #define set_domain(x) do { } while (0) | ||
73 | #define modify_domain(dom,type) do { } while (0) | ||
74 | #endif | ||
75 | |||
69 | #endif | 76 | #endif |
70 | #endif /* !__ASSEMBLY__ */ | 77 | #endif /* !__ASSEMBLY__ */ |
diff --git a/include/asm-arm/fpstate.h b/include/asm-arm/fpstate.h index 132c3c5628..6af4e6bd12 100644 --- a/include/asm-arm/fpstate.h +++ b/include/asm-arm/fpstate.h | |||
@@ -72,6 +72,14 @@ union fp_state { | |||
72 | 72 | ||
73 | #define FP_SIZE (sizeof(union fp_state) / sizeof(int)) | 73 | #define FP_SIZE (sizeof(union fp_state) / sizeof(int)) |
74 | 74 | ||
75 | struct crunch_state { | ||
76 | unsigned int mvdx[16][2]; | ||
77 | unsigned int mvax[4][3]; | ||
78 | unsigned int dspsc[2]; | ||
79 | }; | ||
80 | |||
81 | #define CRUNCH_SIZE sizeof(struct crunch_state) | ||
82 | |||
75 | #endif | 83 | #endif |
76 | 84 | ||
77 | #endif | 85 | #endif |
diff --git a/include/asm-arm/hardware/locomo.h b/include/asm-arm/hardware/locomo.h index 5f10048ec5..22dfb17377 100644 --- a/include/asm-arm/hardware/locomo.h +++ b/include/asm-arm/hardware/locomo.h | |||
@@ -111,6 +111,8 @@ | |||
111 | #define LOCOMO_ALS 0x00 /* Adjust light cycle */ | 111 | #define LOCOMO_ALS 0x00 /* Adjust light cycle */ |
112 | #define LOCOMO_ALD 0x04 /* Adjust light duty */ | 112 | #define LOCOMO_ALD 0x04 /* Adjust light duty */ |
113 | 113 | ||
114 | #define LOCOMO_ALC_EN 0x8000 | ||
115 | |||
114 | /* Backlight controller: TFT signal */ | 116 | /* Backlight controller: TFT signal */ |
115 | #define LOCOMO_BACKLIGHT 0x38 | 117 | #define LOCOMO_BACKLIGHT 0x38 |
116 | #define LOCOMO_TC 0x00 /* TFT control signal */ | 118 | #define LOCOMO_TC 0x00 /* TFT control signal */ |
@@ -203,4 +205,7 @@ void locomo_gpio_write(struct locomo_dev *ldev, unsigned int bits, unsigned int | |||
203 | /* M62332 control function */ | 205 | /* M62332 control function */ |
204 | void locomo_m62332_senddata(struct locomo_dev *ldev, unsigned int dac_data, int channel); | 206 | void locomo_m62332_senddata(struct locomo_dev *ldev, unsigned int dac_data, int channel); |
205 | 207 | ||
208 | /* Frontlight control */ | ||
209 | void locomo_frontlight_set(struct locomo_dev *dev, int duty, int vr, int bpwf); | ||
210 | |||
206 | #endif | 211 | #endif |
diff --git a/include/asm-arm/mach/map.h b/include/asm-arm/mach/map.h index e8ea67c97c..cef5364ed5 100644 --- a/include/asm-arm/mach/map.h +++ b/include/asm-arm/mach/map.h | |||
@@ -16,8 +16,6 @@ struct map_desc { | |||
16 | unsigned int type; | 16 | unsigned int type; |
17 | }; | 17 | }; |
18 | 18 | ||
19 | struct meminfo; | ||
20 | |||
21 | #define MT_DEVICE 0 | 19 | #define MT_DEVICE 0 |
22 | #define MT_CACHECLEAN 1 | 20 | #define MT_CACHECLEAN 1 |
23 | #define MT_MINICLEAN 2 | 21 | #define MT_MINICLEAN 2 |
@@ -28,7 +26,8 @@ struct meminfo; | |||
28 | #define MT_IXP2000_DEVICE 7 | 26 | #define MT_IXP2000_DEVICE 7 |
29 | #define MT_NONSHARED_DEVICE 8 | 27 | #define MT_NONSHARED_DEVICE 8 |
30 | 28 | ||
31 | extern void create_memmap_holes(struct meminfo *); | 29 | #ifdef CONFIG_MMU |
32 | extern void memtable_init(struct meminfo *); | ||
33 | extern void iotable_init(struct map_desc *, int); | 30 | extern void iotable_init(struct map_desc *, int); |
34 | extern void setup_io_desc(void); | 31 | #else |
32 | #define iotable_init(map,num) do { } while (0) | ||
33 | #endif | ||
diff --git a/include/asm-arm/mach/pci.h b/include/asm-arm/mach/pci.h index 25d540ed00..923e0ca662 100644 --- a/include/asm-arm/mach/pci.h +++ b/include/asm-arm/mach/pci.h | |||
@@ -28,7 +28,7 @@ struct hw_pci { | |||
28 | struct pci_sys_data { | 28 | struct pci_sys_data { |
29 | struct list_head node; | 29 | struct list_head node; |
30 | int busnr; /* primary bus number */ | 30 | int busnr; /* primary bus number */ |
31 | unsigned long mem_offset; /* bus->cpu memory mapping offset */ | 31 | u64 mem_offset; /* bus->cpu memory mapping offset */ |
32 | unsigned long io_offset; /* bus->cpu IO mapping offset */ | 32 | unsigned long io_offset; /* bus->cpu IO mapping offset */ |
33 | struct pci_bus *bus; /* PCI bus */ | 33 | struct pci_bus *bus; /* PCI bus */ |
34 | struct resource *resource[3]; /* Primary PCI bus resources */ | 34 | struct resource *resource[3]; /* Primary PCI bus resources */ |
diff --git a/include/asm-arm/memory.h b/include/asm-arm/memory.h index 731e321a57..94f973b704 100644 --- a/include/asm-arm/memory.h +++ b/include/asm-arm/memory.h | |||
@@ -2,6 +2,7 @@ | |||
2 | * linux/include/asm-arm/memory.h | 2 | * linux/include/asm-arm/memory.h |
3 | * | 3 | * |
4 | * Copyright (C) 2000-2002 Russell King | 4 | * Copyright (C) 2000-2002 Russell King |
5 | * modification for nommu, Hyok S. Choi, 2004 | ||
5 | * | 6 | * |
6 | * This program is free software; you can redistribute it and/or modify | 7 | * 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 | 8 | * it under the terms of the GNU General Public License version 2 as |
@@ -26,6 +27,8 @@ | |||
26 | #include <asm/arch/memory.h> | 27 | #include <asm/arch/memory.h> |
27 | #include <asm/sizes.h> | 28 | #include <asm/sizes.h> |
28 | 29 | ||
30 | #ifdef CONFIG_MMU | ||
31 | |||
29 | #ifndef TASK_SIZE | 32 | #ifndef TASK_SIZE |
30 | /* | 33 | /* |
31 | * TASK_SIZE - the maximum size of a user space task. | 34 | * TASK_SIZE - the maximum size of a user space task. |
@@ -48,6 +51,60 @@ | |||
48 | #endif | 51 | #endif |
49 | 52 | ||
50 | /* | 53 | /* |
54 | * The module space lives between the addresses given by TASK_SIZE | ||
55 | * and PAGE_OFFSET - it must be within 32MB of the kernel text. | ||
56 | */ | ||
57 | #define MODULE_END (PAGE_OFFSET) | ||
58 | #define MODULE_START (MODULE_END - 16*1048576) | ||
59 | |||
60 | #if TASK_SIZE > MODULE_START | ||
61 | #error Top of user space clashes with start of module space | ||
62 | #endif | ||
63 | |||
64 | /* | ||
65 | * The XIP kernel gets mapped at the bottom of the module vm area. | ||
66 | * Since we use sections to map it, this macro replaces the physical address | ||
67 | * with its virtual address while keeping offset from the base section. | ||
68 | */ | ||
69 | #define XIP_VIRT_ADDR(physaddr) (MODULE_START + ((physaddr) & 0x000fffff)) | ||
70 | |||
71 | #else /* CONFIG_MMU */ | ||
72 | |||
73 | /* | ||
74 | * The limitation of user task size can grow up to the end of free ram region. | ||
75 | * It is difficult to define and perhaps will never meet the original meaning | ||
76 | * of this define that was meant to. | ||
77 | * Fortunately, there is no reference for this in noMMU mode, for now. | ||
78 | */ | ||
79 | #ifndef TASK_SIZE | ||
80 | #define TASK_SIZE (CONFIG_DRAM_SIZE) | ||
81 | #endif | ||
82 | |||
83 | #ifndef TASK_UNMAPPED_BASE | ||
84 | #define TASK_UNMAPPED_BASE UL(0x00000000) | ||
85 | #endif | ||
86 | |||
87 | #ifndef PHYS_OFFSET | ||
88 | #define PHYS_OFFSET (CONFIG_DRAM_BASE) | ||
89 | #endif | ||
90 | |||
91 | #ifndef END_MEM | ||
92 | #define END_MEM (CONFIG_DRAM_BASE + CONFIG_DRAM_SIZE) | ||
93 | #endif | ||
94 | |||
95 | #ifndef PAGE_OFFSET | ||
96 | #define PAGE_OFFSET (PHYS_OFFSET) | ||
97 | #endif | ||
98 | |||
99 | /* | ||
100 | * The module can be at any place in ram in nommu mode. | ||
101 | */ | ||
102 | #define MODULE_END (END_MEM) | ||
103 | #define MODULE_START (PHYS_OFFSET) | ||
104 | |||
105 | #endif /* !CONFIG_MMU */ | ||
106 | |||
107 | /* | ||
51 | * Size of DMA-consistent memory region. Must be multiple of 2M, | 108 | * Size of DMA-consistent memory region. Must be multiple of 2M, |
52 | * between 2MB and 14MB inclusive. | 109 | * between 2MB and 14MB inclusive. |
53 | */ | 110 | */ |
@@ -71,24 +128,6 @@ | |||
71 | #define __phys_to_pfn(paddr) ((paddr) >> PAGE_SHIFT) | 128 | #define __phys_to_pfn(paddr) ((paddr) >> PAGE_SHIFT) |
72 | #define __pfn_to_phys(pfn) ((pfn) << PAGE_SHIFT) | 129 | #define __pfn_to_phys(pfn) ((pfn) << PAGE_SHIFT) |
73 | 130 | ||
74 | /* | ||
75 | * The module space lives between the addresses given by TASK_SIZE | ||
76 | * and PAGE_OFFSET - it must be within 32MB of the kernel text. | ||
77 | */ | ||
78 | #define MODULE_END (PAGE_OFFSET) | ||
79 | #define MODULE_START (MODULE_END - 16*1048576) | ||
80 | |||
81 | #if TASK_SIZE > MODULE_START | ||
82 | #error Top of user space clashes with start of module space | ||
83 | #endif | ||
84 | |||
85 | /* | ||
86 | * The XIP kernel gets mapped at the bottom of the module vm area. | ||
87 | * Since we use sections to map it, this macro replaces the physical address | ||
88 | * with its virtual address while keeping offset from the base section. | ||
89 | */ | ||
90 | #define XIP_VIRT_ADDR(physaddr) (MODULE_START + ((physaddr) & 0x000fffff)) | ||
91 | |||
92 | #ifndef __ASSEMBLY__ | 131 | #ifndef __ASSEMBLY__ |
93 | 132 | ||
94 | /* | 133 | /* |
diff --git a/include/asm-arm/mmu.h b/include/asm-arm/mmu.h index a457cb7198..23dde52e09 100644 --- a/include/asm-arm/mmu.h +++ b/include/asm-arm/mmu.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __ARM_MMU_H | 1 | #ifndef __ARM_MMU_H |
2 | #define __ARM_MMU_H | 2 | #define __ARM_MMU_H |
3 | 3 | ||
4 | #ifdef CONFIG_MMU | ||
5 | |||
4 | typedef struct { | 6 | typedef struct { |
5 | #if __LINUX_ARM_ARCH__ >= 6 | 7 | #if __LINUX_ARM_ARCH__ >= 6 |
6 | unsigned int id; | 8 | unsigned int id; |
@@ -13,4 +15,18 @@ typedef struct { | |||
13 | #define ASID(mm) (0) | 15 | #define ASID(mm) (0) |
14 | #endif | 16 | #endif |
15 | 17 | ||
18 | #else | ||
19 | |||
20 | /* | ||
21 | * From nommu.h: | ||
22 | * Copyright (C) 2002, David McCullough <davidm@snapgear.com> | ||
23 | * modified for 2.6 by Hyok S. Choi <hyok.choi@samsung.com> | ||
24 | */ | ||
25 | typedef struct { | ||
26 | struct vm_list_struct *vmlist; | ||
27 | unsigned long end_brk; | ||
28 | } mm_context_t; | ||
29 | |||
30 | #endif | ||
31 | |||
16 | #endif | 32 | #endif |
diff --git a/include/asm-arm/mmu_context.h b/include/asm-arm/mmu_context.h index 81c59facea..9fadb01e03 100644 --- a/include/asm-arm/mmu_context.h +++ b/include/asm-arm/mmu_context.h | |||
@@ -82,6 +82,7 @@ static inline void | |||
82 | switch_mm(struct mm_struct *prev, struct mm_struct *next, | 82 | switch_mm(struct mm_struct *prev, struct mm_struct *next, |
83 | struct task_struct *tsk) | 83 | struct task_struct *tsk) |
84 | { | 84 | { |
85 | #ifdef CONFIG_MMU | ||
85 | unsigned int cpu = smp_processor_id(); | 86 | unsigned int cpu = smp_processor_id(); |
86 | 87 | ||
87 | if (prev != next) { | 88 | if (prev != next) { |
@@ -91,6 +92,7 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next, | |||
91 | if (cache_is_vivt()) | 92 | if (cache_is_vivt()) |
92 | cpu_clear(cpu, prev->cpu_vm_mask); | 93 | cpu_clear(cpu, prev->cpu_vm_mask); |
93 | } | 94 | } |
95 | #endif | ||
94 | } | 96 | } |
95 | 97 | ||
96 | #define deactivate_mm(tsk,mm) do { } while (0) | 98 | #define deactivate_mm(tsk,mm) do { } while (0) |
diff --git a/include/asm-arm/page-nommu.h b/include/asm-arm/page-nommu.h new file mode 100644 index 0000000000..a1bcad0604 --- /dev/null +++ b/include/asm-arm/page-nommu.h | |||
@@ -0,0 +1,51 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/page-nommu.h | ||
3 | * | ||
4 | * Copyright (C) 2004 Hyok S. Choi | ||
5 | * | ||
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 | ||
8 | * published by the Free Software Foundation. | ||
9 | */ | ||
10 | #ifndef _ASMARM_PAGE_NOMMU_H | ||
11 | #define _ASMARM_PAGE_NOMMU_H | ||
12 | |||
13 | #if !defined(CONFIG_SMALL_TASKS) && PAGE_SHIFT < 13 | ||
14 | #define KTHREAD_SIZE (8192) | ||
15 | #else | ||
16 | #define KTHREAD_SIZE PAGE_SIZE | ||
17 | #endif | ||
18 | |||
19 | #define get_user_page(vaddr) __get_free_page(GFP_KERNEL) | ||
20 | #define free_user_page(page, addr) free_page(addr) | ||
21 | |||
22 | #define clear_page(page) memset((page), 0, PAGE_SIZE) | ||
23 | #define copy_page(to,from) memcpy((to), (from), PAGE_SIZE) | ||
24 | |||
25 | #define clear_user_page(page, vaddr, pg) clear_page(page) | ||
26 | #define copy_user_page(to, from, vaddr, pg) copy_page(to, from) | ||
27 | |||
28 | /* | ||
29 | * These are used to make use of C type-checking.. | ||
30 | */ | ||
31 | typedef unsigned long pte_t; | ||
32 | typedef unsigned long pmd_t; | ||
33 | typedef unsigned long pgd_t[2]; | ||
34 | typedef unsigned long pgprot_t; | ||
35 | |||
36 | #define pte_val(x) (x) | ||
37 | #define pmd_val(x) (x) | ||
38 | #define pgd_val(x) ((x)[0]) | ||
39 | #define pgprot_val(x) (x) | ||
40 | |||
41 | #define __pte(x) (x) | ||
42 | #define __pmd(x) (x) | ||
43 | #define __pgprot(x) (x) | ||
44 | |||
45 | /* to align the pointer to the (next) page boundary */ | ||
46 | #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) | ||
47 | |||
48 | extern unsigned long memory_start; | ||
49 | extern unsigned long memory_end; | ||
50 | |||
51 | #endif | ||
diff --git a/include/asm-arm/page.h b/include/asm-arm/page.h index 66cfeb5290..63d12f0244 100644 --- a/include/asm-arm/page.h +++ b/include/asm-arm/page.h | |||
@@ -23,6 +23,12 @@ | |||
23 | 23 | ||
24 | #ifndef __ASSEMBLY__ | 24 | #ifndef __ASSEMBLY__ |
25 | 25 | ||
26 | #ifndef CONFIG_MMU | ||
27 | |||
28 | #include "page-nommu.h" | ||
29 | |||
30 | #else | ||
31 | |||
26 | #include <asm/glue.h> | 32 | #include <asm/glue.h> |
27 | 33 | ||
28 | /* | 34 | /* |
@@ -171,6 +177,8 @@ typedef unsigned long pgprot_t; | |||
171 | /* the upper-most page table pointer */ | 177 | /* the upper-most page table pointer */ |
172 | extern pmd_t *top_pmd; | 178 | extern pmd_t *top_pmd; |
173 | 179 | ||
180 | #endif /* CONFIG_MMU */ | ||
181 | |||
174 | #include <asm/memory.h> | 182 | #include <asm/memory.h> |
175 | 183 | ||
176 | #endif /* !__ASSEMBLY__ */ | 184 | #endif /* !__ASSEMBLY__ */ |
diff --git a/include/asm-arm/pgalloc.h b/include/asm-arm/pgalloc.h index c4ac2e6776..4d43945529 100644 --- a/include/asm-arm/pgalloc.h +++ b/include/asm-arm/pgalloc.h | |||
@@ -16,6 +16,10 @@ | |||
16 | #include <asm/cacheflush.h> | 16 | #include <asm/cacheflush.h> |
17 | #include <asm/tlbflush.h> | 17 | #include <asm/tlbflush.h> |
18 | 18 | ||
19 | #define check_pgt_cache() do { } while (0) | ||
20 | |||
21 | #ifdef CONFIG_MMU | ||
22 | |||
19 | #define _PAGE_USER_TABLE (PMD_TYPE_TABLE | PMD_BIT4 | PMD_DOMAIN(DOMAIN_USER)) | 23 | #define _PAGE_USER_TABLE (PMD_TYPE_TABLE | PMD_BIT4 | PMD_DOMAIN(DOMAIN_USER)) |
20 | #define _PAGE_KERNEL_TABLE (PMD_TYPE_TABLE | PMD_BIT4 | PMD_DOMAIN(DOMAIN_KERNEL)) | 24 | #define _PAGE_KERNEL_TABLE (PMD_TYPE_TABLE | PMD_BIT4 | PMD_DOMAIN(DOMAIN_KERNEL)) |
21 | 25 | ||
@@ -32,8 +36,6 @@ extern void free_pgd_slow(pgd_t *pgd); | |||
32 | #define pgd_alloc(mm) get_pgd_slow(mm) | 36 | #define pgd_alloc(mm) get_pgd_slow(mm) |
33 | #define pgd_free(pgd) free_pgd_slow(pgd) | 37 | #define pgd_free(pgd) free_pgd_slow(pgd) |
34 | 38 | ||
35 | #define check_pgt_cache() do { } while (0) | ||
36 | |||
37 | /* | 39 | /* |
38 | * Allocate one PTE table. | 40 | * Allocate one PTE table. |
39 | * | 41 | * |
@@ -126,4 +128,6 @@ pmd_populate(struct mm_struct *mm, pmd_t *pmdp, struct page *ptep) | |||
126 | __pmd_populate(pmdp, page_to_pfn(ptep) << PAGE_SHIFT | _PAGE_USER_TABLE); | 128 | __pmd_populate(pmdp, page_to_pfn(ptep) << PAGE_SHIFT | _PAGE_USER_TABLE); |
127 | } | 129 | } |
128 | 130 | ||
131 | #endif /* CONFIG_MMU */ | ||
132 | |||
129 | #endif | 133 | #endif |
diff --git a/include/asm-arm/pgtable-nommu.h b/include/asm-arm/pgtable-nommu.h new file mode 100644 index 0000000000..b13322dccf --- /dev/null +++ b/include/asm-arm/pgtable-nommu.h | |||
@@ -0,0 +1,123 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm/pgtable-nommu.h | ||
3 | * | ||
4 | * Copyright (C) 1995-2002 Russell King | ||
5 | * Copyright (C) 2004 Hyok S. Choi | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License version 2 as | ||
9 | * published by the Free Software Foundation. | ||
10 | */ | ||
11 | #ifndef _ASMARM_PGTABLE_NOMMU_H | ||
12 | #define _ASMARM_PGTABLE_NOMMU_H | ||
13 | |||
14 | #ifndef __ASSEMBLY__ | ||
15 | |||
16 | #include <linux/config.h> | ||
17 | #include <linux/slab.h> | ||
18 | #include <asm/processor.h> | ||
19 | #include <asm/page.h> | ||
20 | #include <asm/io.h> | ||
21 | |||
22 | /* | ||
23 | * Trivial page table functions. | ||
24 | */ | ||
25 | #define pgd_present(pgd) (1) | ||
26 | #define pgd_none(pgd) (0) | ||
27 | #define pgd_bad(pgd) (0) | ||
28 | #define pgd_clear(pgdp) | ||
29 | #define kern_addr_valid(addr) (1) | ||
30 | #define pmd_offset(a, b) ((void *)0) | ||
31 | /* FIXME */ | ||
32 | /* | ||
33 | * PMD_SHIFT determines the size of the area a second-level page table can map | ||
34 | * PGDIR_SHIFT determines what a third-level page table entry can map | ||
35 | */ | ||
36 | #define PGDIR_SHIFT 21 | ||
37 | |||
38 | #define PGDIR_SIZE (1UL << PGDIR_SHIFT) | ||
39 | #define PGDIR_MASK (~(PGDIR_SIZE-1)) | ||
40 | /* FIXME */ | ||
41 | |||
42 | #define PAGE_NONE __pgprot(0) | ||
43 | #define PAGE_SHARED __pgprot(0) | ||
44 | #define PAGE_COPY __pgprot(0) | ||
45 | #define PAGE_READONLY __pgprot(0) | ||
46 | #define PAGE_KERNEL __pgprot(0) | ||
47 | |||
48 | //extern void paging_init(struct meminfo *, struct machine_desc *); | ||
49 | #define swapper_pg_dir ((pgd_t *) 0) | ||
50 | |||
51 | #define __swp_type(x) (0) | ||
52 | #define __swp_offset(x) (0) | ||
53 | #define __swp_entry(typ,off) ((swp_entry_t) { ((typ) | ((off) << 7)) }) | ||
54 | #define __pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) }) | ||
55 | #define __swp_entry_to_pte(x) ((pte_t) { (x).val }) | ||
56 | |||
57 | |||
58 | typedef pte_t *pte_addr_t; | ||
59 | |||
60 | static inline int pte_file(pte_t pte) { return 0; } | ||
61 | |||
62 | /* | ||
63 | * ZERO_PAGE is a global shared page that is always zero: used | ||
64 | * for zero-mapped memory areas etc.. | ||
65 | */ | ||
66 | #define ZERO_PAGE(vaddr) (virt_to_page(0)) | ||
67 | |||
68 | /* | ||
69 | * Mark the prot value as uncacheable and unbufferable. | ||
70 | */ | ||
71 | #define pgprot_noncached(prot) __pgprot(0) | ||
72 | #define pgprot_writecombine(prot) __pgprot(0) | ||
73 | |||
74 | |||
75 | /* | ||
76 | * These would be in other places but having them here reduces the diffs. | ||
77 | */ | ||
78 | extern unsigned int kobjsize(const void *objp); | ||
79 | extern int is_in_rom(unsigned long); | ||
80 | |||
81 | /* | ||
82 | * No page table caches to initialise. | ||
83 | */ | ||
84 | #define pgtable_cache_init() do { } while (0) | ||
85 | #define io_remap_page_range remap_page_range | ||
86 | #define io_remap_pfn_range remap_pfn_range | ||
87 | |||
88 | #define MK_IOSPACE_PFN(space, pfn) (pfn) | ||
89 | #define GET_IOSPACE(pfn) 0 | ||
90 | #define GET_PFN(pfn) (pfn) | ||
91 | |||
92 | |||
93 | /* | ||
94 | * All 32bit addresses are effectively valid for vmalloc... | ||
95 | * Sort of meaningless for non-VM targets. | ||
96 | */ | ||
97 | #define VMALLOC_START 0 | ||
98 | #define VMALLOC_END 0xffffffff | ||
99 | |||
100 | #define FIRST_USER_ADDRESS (0) | ||
101 | |||
102 | #else | ||
103 | |||
104 | /* | ||
105 | * dummy tlb and user structures. | ||
106 | */ | ||
107 | #define v3_tlb_fns (0) | ||
108 | #define v4_tlb_fns (0) | ||
109 | #define v4wb_tlb_fns (0) | ||
110 | #define v4wbi_tlb_fns (0) | ||
111 | #define v6_tlb_fns (0) | ||
112 | |||
113 | #define v3_user_fns (0) | ||
114 | #define v4_user_fns (0) | ||
115 | #define v4_mc_user_fns (0) | ||
116 | #define v4wb_user_fns (0) | ||
117 | #define v4wt_user_fns (0) | ||
118 | #define v6_user_fns (0) | ||
119 | #define xscale_mc_user_fns (0) | ||
120 | |||
121 | #endif /*__ASSEMBLY__*/ | ||
122 | |||
123 | #endif /* _ASMARM_PGTABLE_H */ | ||
diff --git a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h index e85c08d78d..8d3919c645 100644 --- a/include/asm-arm/pgtable.h +++ b/include/asm-arm/pgtable.h | |||
@@ -11,9 +11,15 @@ | |||
11 | #define _ASMARM_PGTABLE_H | 11 | #define _ASMARM_PGTABLE_H |
12 | 12 | ||
13 | #include <asm-generic/4level-fixup.h> | 13 | #include <asm-generic/4level-fixup.h> |
14 | #include <asm/proc-fns.h> | ||
15 | |||
16 | #ifndef CONFIG_MMU | ||
17 | |||
18 | #include "pgtable-nommu.h" | ||
19 | |||
20 | #else | ||
14 | 21 | ||
15 | #include <asm/memory.h> | 22 | #include <asm/memory.h> |
16 | #include <asm/proc-fns.h> | ||
17 | #include <asm/arch/vmalloc.h> | 23 | #include <asm/arch/vmalloc.h> |
18 | 24 | ||
19 | /* | 25 | /* |
@@ -378,4 +384,6 @@ extern pgd_t swapper_pg_dir[PTRS_PER_PGD]; | |||
378 | 384 | ||
379 | #endif /* !__ASSEMBLY__ */ | 385 | #endif /* !__ASSEMBLY__ */ |
380 | 386 | ||
387 | #endif /* CONFIG_MMU */ | ||
388 | |||
381 | #endif /* _ASMARM_PGTABLE_H */ | 389 | #endif /* _ASMARM_PGTABLE_H */ |
diff --git a/include/asm-arm/proc-fns.h b/include/asm-arm/proc-fns.h index e9310895e7..1bde92cdae 100644 --- a/include/asm-arm/proc-fns.h +++ b/include/asm-arm/proc-fns.h | |||
@@ -165,6 +165,8 @@ | |||
165 | 165 | ||
166 | #include <asm/memory.h> | 166 | #include <asm/memory.h> |
167 | 167 | ||
168 | #ifdef CONFIG_MMU | ||
169 | |||
168 | #define cpu_switch_mm(pgd,mm) cpu_do_switch_mm(virt_to_phys(pgd),mm) | 170 | #define cpu_switch_mm(pgd,mm) cpu_do_switch_mm(virt_to_phys(pgd),mm) |
169 | 171 | ||
170 | #define cpu_get_pgd() \ | 172 | #define cpu_get_pgd() \ |
@@ -176,6 +178,8 @@ | |||
176 | (pgd_t *)phys_to_virt(pg); \ | 178 | (pgd_t *)phys_to_virt(pg); \ |
177 | }) | 179 | }) |
178 | 180 | ||
181 | #endif | ||
182 | |||
179 | #endif /* __ASSEMBLY__ */ | 183 | #endif /* __ASSEMBLY__ */ |
180 | #endif /* __KERNEL__ */ | 184 | #endif /* __KERNEL__ */ |
181 | #endif /* __ASM_PROCFNS_H */ | 185 | #endif /* __ASM_PROCFNS_H */ |
diff --git a/include/asm-arm/ptrace.h b/include/asm-arm/ptrace.h index 2bebe3dc0a..5a8ef787db 100644 --- a/include/asm-arm/ptrace.h +++ b/include/asm-arm/ptrace.h | |||
@@ -25,6 +25,11 @@ | |||
25 | 25 | ||
26 | #define PTRACE_SET_SYSCALL 23 | 26 | #define PTRACE_SET_SYSCALL 23 |
27 | 27 | ||
28 | /* PTRACE_SYSCALL is 24 */ | ||
29 | |||
30 | #define PTRACE_GETCRUNCHREGS 25 | ||
31 | #define PTRACE_SETCRUNCHREGS 26 | ||
32 | |||
28 | /* | 33 | /* |
29 | * PSR bits | 34 | * PSR bits |
30 | */ | 35 | */ |
diff --git a/include/asm-arm/thread_info.h b/include/asm-arm/thread_info.h index cfbccb63c6..c46b5c8427 100644 --- a/include/asm-arm/thread_info.h +++ b/include/asm-arm/thread_info.h | |||
@@ -59,6 +59,7 @@ struct thread_info { | |||
59 | struct cpu_context_save cpu_context; /* cpu context */ | 59 | struct cpu_context_save cpu_context; /* cpu context */ |
60 | __u8 used_cp[16]; /* thread used copro */ | 60 | __u8 used_cp[16]; /* thread used copro */ |
61 | unsigned long tp_value; | 61 | unsigned long tp_value; |
62 | struct crunch_state crunchstate; | ||
62 | union fp_state fpstate __attribute__((aligned(8))); | 63 | union fp_state fpstate __attribute__((aligned(8))); |
63 | union vfp_state vfpstate; | 64 | union vfp_state vfpstate; |
64 | struct restart_block restart_block; | 65 | struct restart_block restart_block; |
@@ -101,6 +102,11 @@ extern void free_thread_info(struct thread_info *); | |||
101 | #define thread_saved_fp(tsk) \ | 102 | #define thread_saved_fp(tsk) \ |
102 | ((unsigned long)(task_thread_info(tsk)->cpu_context.fp)) | 103 | ((unsigned long)(task_thread_info(tsk)->cpu_context.fp)) |
103 | 104 | ||
105 | extern void crunch_task_disable(struct thread_info *); | ||
106 | extern void crunch_task_copy(struct thread_info *, void *); | ||
107 | extern void crunch_task_restore(struct thread_info *, void *); | ||
108 | extern void crunch_task_release(struct thread_info *); | ||
109 | |||
104 | extern void iwmmxt_task_disable(struct thread_info *); | 110 | extern void iwmmxt_task_disable(struct thread_info *); |
105 | extern void iwmmxt_task_copy(struct thread_info *, void *); | 111 | extern void iwmmxt_task_copy(struct thread_info *, void *); |
106 | extern void iwmmxt_task_restore(struct thread_info *, void *); | 112 | extern void iwmmxt_task_restore(struct thread_info *, void *); |
diff --git a/include/asm-arm/uaccess.h b/include/asm-arm/uaccess.h index 064f0f5e8e..87aba57a66 100644 --- a/include/asm-arm/uaccess.h +++ b/include/asm-arm/uaccess.h | |||
@@ -41,15 +41,24 @@ struct exception_table_entry | |||
41 | extern int fixup_exception(struct pt_regs *regs); | 41 | extern int fixup_exception(struct pt_regs *regs); |
42 | 42 | ||
43 | /* | 43 | /* |
44 | * These two are intentionally not defined anywhere - if the kernel | ||
45 | * code generates any references to them, that's a bug. | ||
46 | */ | ||
47 | extern int __get_user_bad(void); | ||
48 | extern int __put_user_bad(void); | ||
49 | |||
50 | /* | ||
44 | * Note that this is actually 0x1,0000,0000 | 51 | * Note that this is actually 0x1,0000,0000 |
45 | */ | 52 | */ |
46 | #define KERNEL_DS 0x00000000 | 53 | #define KERNEL_DS 0x00000000 |
47 | #define USER_DS TASK_SIZE | ||
48 | |||
49 | #define get_ds() (KERNEL_DS) | 54 | #define get_ds() (KERNEL_DS) |
55 | |||
56 | #ifdef CONFIG_MMU | ||
57 | |||
58 | #define USER_DS TASK_SIZE | ||
50 | #define get_fs() (current_thread_info()->addr_limit) | 59 | #define get_fs() (current_thread_info()->addr_limit) |
51 | 60 | ||
52 | static inline void set_fs (mm_segment_t fs) | 61 | static inline void set_fs(mm_segment_t fs) |
53 | { | 62 | { |
54 | current_thread_info()->addr_limit = fs; | 63 | current_thread_info()->addr_limit = fs; |
55 | modify_domain(DOMAIN_KERNEL, fs ? DOMAIN_CLIENT : DOMAIN_MANAGER); | 64 | modify_domain(DOMAIN_KERNEL, fs ? DOMAIN_CLIENT : DOMAIN_MANAGER); |
@@ -75,8 +84,6 @@ static inline void set_fs (mm_segment_t fs) | |||
75 | : "cc"); \ | 84 | : "cc"); \ |
76 | flag; }) | 85 | flag; }) |
77 | 86 | ||
78 | #define access_ok(type,addr,size) (__range_ok(addr,size) == 0) | ||
79 | |||
80 | /* | 87 | /* |
81 | * Single-value transfer routines. They automatically use the right | 88 | * Single-value transfer routines. They automatically use the right |
82 | * size if we just have the right pointer type. Note that the functions | 89 | * size if we just have the right pointer type. Note that the functions |
@@ -87,20 +94,10 @@ static inline void set_fs (mm_segment_t fs) | |||
87 | * fixup code, but there are a few places where it intrudes on the | 94 | * fixup code, but there are a few places where it intrudes on the |
88 | * main code path. When we only write to user space, there is no | 95 | * main code path. When we only write to user space, there is no |
89 | * problem. | 96 | * problem. |
90 | * | ||
91 | * The "__xxx" versions of the user access functions do not verify the | ||
92 | * address space - it must have been done previously with a separate | ||
93 | * "access_ok()" call. | ||
94 | * | ||
95 | * The "xxx_error" versions set the third argument to EFAULT if an | ||
96 | * error occurs, and leave it unchanged on success. Note that these | ||
97 | * versions are void (ie, don't return a value as such). | ||
98 | */ | 97 | */ |
99 | |||
100 | extern int __get_user_1(void *); | 98 | extern int __get_user_1(void *); |
101 | extern int __get_user_2(void *); | 99 | extern int __get_user_2(void *); |
102 | extern int __get_user_4(void *); | 100 | extern int __get_user_4(void *); |
103 | extern int __get_user_bad(void); | ||
104 | 101 | ||
105 | #define __get_user_x(__r2,__p,__e,__s,__i...) \ | 102 | #define __get_user_x(__r2,__p,__e,__s,__i...) \ |
106 | __asm__ __volatile__ ( \ | 103 | __asm__ __volatile__ ( \ |
@@ -131,6 +128,74 @@ extern int __get_user_bad(void); | |||
131 | __e; \ | 128 | __e; \ |
132 | }) | 129 | }) |
133 | 130 | ||
131 | extern int __put_user_1(void *, unsigned int); | ||
132 | extern int __put_user_2(void *, unsigned int); | ||
133 | extern int __put_user_4(void *, unsigned int); | ||
134 | extern int __put_user_8(void *, unsigned long long); | ||
135 | |||
136 | #define __put_user_x(__r2,__p,__e,__s) \ | ||
137 | __asm__ __volatile__ ( \ | ||
138 | __asmeq("%0", "r0") __asmeq("%2", "r2") \ | ||
139 | "bl __put_user_" #__s \ | ||
140 | : "=&r" (__e) \ | ||
141 | : "0" (__p), "r" (__r2) \ | ||
142 | : "ip", "lr", "cc") | ||
143 | |||
144 | #define put_user(x,p) \ | ||
145 | ({ \ | ||
146 | const register typeof(*(p)) __r2 asm("r2") = (x); \ | ||
147 | const register typeof(*(p)) __user *__p asm("r0") = (p);\ | ||
148 | register int __e asm("r0"); \ | ||
149 | switch (sizeof(*(__p))) { \ | ||
150 | case 1: \ | ||
151 | __put_user_x(__r2, __p, __e, 1); \ | ||
152 | break; \ | ||
153 | case 2: \ | ||
154 | __put_user_x(__r2, __p, __e, 2); \ | ||
155 | break; \ | ||
156 | case 4: \ | ||
157 | __put_user_x(__r2, __p, __e, 4); \ | ||
158 | break; \ | ||
159 | case 8: \ | ||
160 | __put_user_x(__r2, __p, __e, 8); \ | ||
161 | break; \ | ||
162 | default: __e = __put_user_bad(); break; \ | ||
163 | } \ | ||
164 | __e; \ | ||
165 | }) | ||
166 | |||
167 | #else /* CONFIG_MMU */ | ||
168 | |||
169 | /* | ||
170 | * uClinux has only one addr space, so has simplified address limits. | ||
171 | */ | ||
172 | #define USER_DS KERNEL_DS | ||
173 | |||
174 | #define segment_eq(a,b) (1) | ||
175 | #define __addr_ok(addr) (1) | ||
176 | #define __range_ok(addr,size) (0) | ||
177 | #define get_fs() (KERNEL_DS) | ||
178 | |||
179 | static inline void set_fs(mm_segment_t fs) | ||
180 | { | ||
181 | } | ||
182 | |||
183 | #define get_user(x,p) __get_user(x,p) | ||
184 | #define put_user(x,p) __put_user(x,p) | ||
185 | |||
186 | #endif /* CONFIG_MMU */ | ||
187 | |||
188 | #define access_ok(type,addr,size) (__range_ok(addr,size) == 0) | ||
189 | |||
190 | /* | ||
191 | * The "__xxx" versions of the user access functions do not verify the | ||
192 | * address space - it must have been done previously with a separate | ||
193 | * "access_ok()" call. | ||
194 | * | ||
195 | * The "xxx_error" versions set the third argument to EFAULT if an | ||
196 | * error occurs, and leave it unchanged on success. Note that these | ||
197 | * versions are void (ie, don't return a value as such). | ||
198 | */ | ||
134 | #define __get_user(x,ptr) \ | 199 | #define __get_user(x,ptr) \ |
135 | ({ \ | 200 | ({ \ |
136 | long __gu_err = 0; \ | 201 | long __gu_err = 0; \ |
@@ -212,43 +277,6 @@ do { \ | |||
212 | : "r" (addr), "i" (-EFAULT) \ | 277 | : "r" (addr), "i" (-EFAULT) \ |
213 | : "cc") | 278 | : "cc") |
214 | 279 | ||
215 | extern int __put_user_1(void *, unsigned int); | ||
216 | extern int __put_user_2(void *, unsigned int); | ||
217 | extern int __put_user_4(void *, unsigned int); | ||
218 | extern int __put_user_8(void *, unsigned long long); | ||
219 | extern int __put_user_bad(void); | ||
220 | |||
221 | #define __put_user_x(__r2,__p,__e,__s) \ | ||
222 | __asm__ __volatile__ ( \ | ||
223 | __asmeq("%0", "r0") __asmeq("%2", "r2") \ | ||
224 | "bl __put_user_" #__s \ | ||
225 | : "=&r" (__e) \ | ||
226 | : "0" (__p), "r" (__r2) \ | ||
227 | : "ip", "lr", "cc") | ||
228 | |||
229 | #define put_user(x,p) \ | ||
230 | ({ \ | ||
231 | const register typeof(*(p)) __r2 asm("r2") = (x); \ | ||
232 | const register typeof(*(p)) __user *__p asm("r0") = (p);\ | ||
233 | register int __e asm("r0"); \ | ||
234 | switch (sizeof(*(__p))) { \ | ||
235 | case 1: \ | ||
236 | __put_user_x(__r2, __p, __e, 1); \ | ||
237 | break; \ | ||
238 | case 2: \ | ||
239 | __put_user_x(__r2, __p, __e, 2); \ | ||
240 | break; \ | ||
241 | case 4: \ | ||
242 | __put_user_x(__r2, __p, __e, 4); \ | ||
243 | break; \ | ||
244 | case 8: \ | ||
245 | __put_user_x(__r2, __p, __e, 8); \ | ||
246 | break; \ | ||
247 | default: __e = __put_user_bad(); break; \ | ||
248 | } \ | ||
249 | __e; \ | ||
250 | }) | ||
251 | |||
252 | #define __put_user(x,ptr) \ | 280 | #define __put_user(x,ptr) \ |
253 | ({ \ | 281 | ({ \ |
254 | long __pu_err = 0; \ | 282 | long __pu_err = 0; \ |
@@ -353,66 +381,54 @@ do { \ | |||
353 | : "r" (x), "i" (-EFAULT) \ | 381 | : "r" (x), "i" (-EFAULT) \ |
354 | : "cc") | 382 | : "cc") |
355 | 383 | ||
356 | extern unsigned long __arch_copy_from_user(void *to, const void __user *from, unsigned long n); | 384 | |
357 | extern unsigned long __arch_copy_to_user(void __user *to, const void *from, unsigned long n); | 385 | #ifdef CONFIG_MMU |
358 | extern unsigned long __arch_clear_user(void __user *addr, unsigned long n); | 386 | extern unsigned long __copy_from_user(void *to, const void __user *from, unsigned long n); |
359 | extern unsigned long __arch_strncpy_from_user(char *to, const char __user *from, unsigned long count); | 387 | extern unsigned long __copy_to_user(void __user *to, const void *from, unsigned long n); |
360 | extern unsigned long __arch_strnlen_user(const char __user *s, long n); | 388 | extern unsigned long __clear_user(void __user *addr, unsigned long n); |
389 | #else | ||
390 | #define __copy_from_user(to,from,n) (memcpy(to, (void __force *)from, n), 0) | ||
391 | #define __copy_to_user(to,from,n) (memcpy((void __force *)to, from, n), 0) | ||
392 | #define __clear_user(addr,n) (memset((void __force *)addr, 0, n), 0) | ||
393 | #endif | ||
394 | |||
395 | extern unsigned long __strncpy_from_user(char *to, const char __user *from, unsigned long count); | ||
396 | extern unsigned long __strnlen_user(const char __user *s, long n); | ||
361 | 397 | ||
362 | static inline unsigned long copy_from_user(void *to, const void __user *from, unsigned long n) | 398 | static inline unsigned long copy_from_user(void *to, const void __user *from, unsigned long n) |
363 | { | 399 | { |
364 | if (access_ok(VERIFY_READ, from, n)) | 400 | if (access_ok(VERIFY_READ, from, n)) |
365 | n = __arch_copy_from_user(to, from, n); | 401 | n = __copy_from_user(to, from, n); |
366 | else /* security hole - plug it */ | 402 | else /* security hole - plug it */ |
367 | memzero(to, n); | 403 | memzero(to, n); |
368 | return n; | 404 | return n; |
369 | } | 405 | } |
370 | 406 | ||
371 | static inline unsigned long __copy_from_user(void *to, const void __user *from, unsigned long n) | ||
372 | { | ||
373 | return __arch_copy_from_user(to, from, n); | ||
374 | } | ||
375 | |||
376 | static inline unsigned long copy_to_user(void __user *to, const void *from, unsigned long n) | 407 | static inline unsigned long copy_to_user(void __user *to, const void *from, unsigned long n) |
377 | { | 408 | { |
378 | if (access_ok(VERIFY_WRITE, to, n)) | 409 | if (access_ok(VERIFY_WRITE, to, n)) |
379 | n = __arch_copy_to_user(to, from, n); | 410 | n = __copy_to_user(to, from, n); |
380 | return n; | 411 | return n; |
381 | } | 412 | } |
382 | 413 | ||
383 | static inline unsigned long __copy_to_user(void __user *to, const void *from, unsigned long n) | ||
384 | { | ||
385 | return __arch_copy_to_user(to, from, n); | ||
386 | } | ||
387 | |||
388 | #define __copy_to_user_inatomic __copy_to_user | 414 | #define __copy_to_user_inatomic __copy_to_user |
389 | #define __copy_from_user_inatomic __copy_from_user | 415 | #define __copy_from_user_inatomic __copy_from_user |
390 | 416 | ||
391 | static inline unsigned long clear_user (void __user *to, unsigned long n) | 417 | static inline unsigned long clear_user(void __user *to, unsigned long n) |
392 | { | 418 | { |
393 | if (access_ok(VERIFY_WRITE, to, n)) | 419 | if (access_ok(VERIFY_WRITE, to, n)) |
394 | n = __arch_clear_user(to, n); | 420 | n = __clear_user(to, n); |
395 | return n; | 421 | return n; |
396 | } | 422 | } |
397 | 423 | ||
398 | static inline unsigned long __clear_user (void __user *to, unsigned long n) | 424 | static inline long strncpy_from_user(char *dst, const char __user *src, long count) |
399 | { | ||
400 | return __arch_clear_user(to, n); | ||
401 | } | ||
402 | |||
403 | static inline long strncpy_from_user (char *dst, const char __user *src, long count) | ||
404 | { | 425 | { |
405 | long res = -EFAULT; | 426 | long res = -EFAULT; |
406 | if (access_ok(VERIFY_READ, src, 1)) | 427 | if (access_ok(VERIFY_READ, src, 1)) |
407 | res = __arch_strncpy_from_user(dst, src, count); | 428 | res = __strncpy_from_user(dst, src, count); |
408 | return res; | 429 | return res; |
409 | } | 430 | } |
410 | 431 | ||
411 | static inline long __strncpy_from_user (char *dst, const char __user *src, long count) | ||
412 | { | ||
413 | return __arch_strncpy_from_user(dst, src, count); | ||
414 | } | ||
415 | |||
416 | #define strlen_user(s) strnlen_user(s, ~0UL >> 1) | 432 | #define strlen_user(s) strnlen_user(s, ~0UL >> 1) |
417 | 433 | ||
418 | static inline long strnlen_user(const char __user *s, long n) | 434 | static inline long strnlen_user(const char __user *s, long n) |
@@ -420,7 +436,7 @@ static inline long strnlen_user(const char __user *s, long n) | |||
420 | unsigned long res = 0; | 436 | unsigned long res = 0; |
421 | 437 | ||
422 | if (__addr_ok(s)) | 438 | if (__addr_ok(s)) |
423 | res = __arch_strnlen_user(s, n); | 439 | res = __strnlen_user(s, n); |
424 | 440 | ||
425 | return res; | 441 | return res; |
426 | } | 442 | } |
diff --git a/include/asm-arm/ucontext.h b/include/asm-arm/ucontext.h index 9e6f7ca9f5..bf65e9f452 100644 --- a/include/asm-arm/ucontext.h +++ b/include/asm-arm/ucontext.h | |||
@@ -35,6 +35,17 @@ struct ucontext { | |||
35 | * bytes, to prevent unpredictable padding in the signal frame. | 35 | * bytes, to prevent unpredictable padding in the signal frame. |
36 | */ | 36 | */ |
37 | 37 | ||
38 | #ifdef CONFIG_CRUNCH | ||
39 | #define CRUNCH_MAGIC 0x5065cf03 | ||
40 | #define CRUNCH_STORAGE_SIZE (CRUNCH_SIZE + 8) | ||
41 | |||
42 | struct crunch_sigframe { | ||
43 | unsigned long magic; | ||
44 | unsigned long size; | ||
45 | struct crunch_state storage; | ||
46 | } __attribute__((__aligned__(8))); | ||
47 | #endif | ||
48 | |||
38 | #ifdef CONFIG_IWMMXT | 49 | #ifdef CONFIG_IWMMXT |
39 | /* iwmmxt_area is 0x98 bytes long, preceeded by 8 bytes of signature */ | 50 | /* iwmmxt_area is 0x98 bytes long, preceeded by 8 bytes of signature */ |
40 | #define IWMMXT_MAGIC 0x12ef842a | 51 | #define IWMMXT_MAGIC 0x12ef842a |
@@ -74,6 +85,9 @@ struct vfp_sigframe | |||
74 | * one of these. | 85 | * one of these. |
75 | */ | 86 | */ |
76 | struct aux_sigframe { | 87 | struct aux_sigframe { |
88 | #ifdef CONFIG_CRUNCH | ||
89 | struct crunch_sigframe crunch; | ||
90 | #endif | ||
77 | #ifdef CONFIG_IWMMXT | 91 | #ifdef CONFIG_IWMMXT |
78 | struct iwmmxt_sigframe iwmmxt; | 92 | struct iwmmxt_sigframe iwmmxt; |
79 | #endif | 93 | #endif |
diff --git a/include/asm-cris/hw_irq.h b/include/asm-cris/hw_irq.h index 341536a234..298066020a 100644 --- a/include/asm-cris/hw_irq.h +++ b/include/asm-cris/hw_irq.h | |||
@@ -1,7 +1,5 @@ | |||
1 | #ifndef _ASM_HW_IRQ_H | 1 | #ifndef _ASM_HW_IRQ_H |
2 | #define _ASM_HW_IRQ_H | 2 | #define _ASM_HW_IRQ_H |
3 | 3 | ||
4 | static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) {} | ||
5 | |||
6 | #endif | 4 | #endif |
7 | 5 | ||
diff --git a/include/asm-cris/irq.h b/include/asm-cris/irq.h index 4b33879221..998cce9f32 100644 --- a/include/asm-cris/irq.h +++ b/include/asm-cris/irq.h | |||
@@ -1,11 +1,6 @@ | |||
1 | #ifndef _ASM_IRQ_H | 1 | #ifndef _ASM_IRQ_H |
2 | #define _ASM_IRQ_H | 2 | #define _ASM_IRQ_H |
3 | 3 | ||
4 | /* | ||
5 | * IRQ line status macro IRQ_PER_CPU is used | ||
6 | */ | ||
7 | #define ARCH_HAS_IRQ_PER_CPU | ||
8 | |||
9 | #include <asm/arch/irq.h> | 4 | #include <asm/arch/irq.h> |
10 | 5 | ||
11 | static inline int irq_canonicalize(int irq) | 6 | static inline int irq_canonicalize(int irq) |
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h index 845cb67ad8..8ceab7bcd8 100644 --- a/include/asm-generic/bug.h +++ b/include/asm-generic/bug.h | |||
@@ -51,4 +51,10 @@ | |||
51 | __ret; \ | 51 | __ret; \ |
52 | }) | 52 | }) |
53 | 53 | ||
54 | #ifdef CONFIG_SMP | ||
55 | # define WARN_ON_SMP(x) WARN_ON(x) | ||
56 | #else | ||
57 | # define WARN_ON_SMP(x) do { } while (0) | ||
58 | #endif | ||
59 | |||
54 | #endif | 60 | #endif |
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 9d11550b48..db5a3732f1 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h | |||
@@ -58,6 +58,20 @@ | |||
58 | VMLINUX_SYMBOL(__stop___ksymtab_gpl) = .; \ | 58 | VMLINUX_SYMBOL(__stop___ksymtab_gpl) = .; \ |
59 | } \ | 59 | } \ |
60 | \ | 60 | \ |
61 | /* Kernel symbol table: Normal unused symbols */ \ | ||
62 | __ksymtab_unused : AT(ADDR(__ksymtab_unused) - LOAD_OFFSET) { \ | ||
63 | VMLINUX_SYMBOL(__start___ksymtab_unused) = .; \ | ||
64 | *(__ksymtab_unused) \ | ||
65 | VMLINUX_SYMBOL(__stop___ksymtab_unused) = .; \ | ||
66 | } \ | ||
67 | \ | ||
68 | /* Kernel symbol table: GPL-only unused symbols */ \ | ||
69 | __ksymtab_unused_gpl : AT(ADDR(__ksymtab_unused_gpl) - LOAD_OFFSET) { \ | ||
70 | VMLINUX_SYMBOL(__start___ksymtab_unused_gpl) = .; \ | ||
71 | *(__ksymtab_unused_gpl) \ | ||
72 | VMLINUX_SYMBOL(__stop___ksymtab_unused_gpl) = .; \ | ||
73 | } \ | ||
74 | \ | ||
61 | /* Kernel symbol table: GPL-future-only symbols */ \ | 75 | /* Kernel symbol table: GPL-future-only symbols */ \ |
62 | __ksymtab_gpl_future : AT(ADDR(__ksymtab_gpl_future) - LOAD_OFFSET) { \ | 76 | __ksymtab_gpl_future : AT(ADDR(__ksymtab_gpl_future) - LOAD_OFFSET) { \ |
63 | VMLINUX_SYMBOL(__start___ksymtab_gpl_future) = .; \ | 77 | VMLINUX_SYMBOL(__start___ksymtab_gpl_future) = .; \ |
@@ -79,6 +93,20 @@ | |||
79 | VMLINUX_SYMBOL(__stop___kcrctab_gpl) = .; \ | 93 | VMLINUX_SYMBOL(__stop___kcrctab_gpl) = .; \ |
80 | } \ | 94 | } \ |
81 | \ | 95 | \ |
96 | /* Kernel symbol table: Normal unused symbols */ \ | ||
97 | __kcrctab_unused : AT(ADDR(__kcrctab_unused) - LOAD_OFFSET) { \ | ||
98 | VMLINUX_SYMBOL(__start___kcrctab_unused) = .; \ | ||
99 | *(__kcrctab_unused) \ | ||
100 | VMLINUX_SYMBOL(__stop___kcrctab_unused) = .; \ | ||
101 | } \ | ||
102 | \ | ||
103 | /* Kernel symbol table: GPL-only unused symbols */ \ | ||
104 | __kcrctab_unused_gpl : AT(ADDR(__kcrctab_unused_gpl) - LOAD_OFFSET) { \ | ||
105 | VMLINUX_SYMBOL(__start___kcrctab_unused_gpl) = .; \ | ||
106 | *(__kcrctab_unused_gpl) \ | ||
107 | VMLINUX_SYMBOL(__stop___kcrctab_unused_gpl) = .; \ | ||
108 | } \ | ||
109 | \ | ||
82 | /* Kernel symbol table: GPL-future-only symbols */ \ | 110 | /* Kernel symbol table: GPL-future-only symbols */ \ |
83 | __kcrctab_gpl_future : AT(ADDR(__kcrctab_gpl_future) - LOAD_OFFSET) { \ | 111 | __kcrctab_gpl_future : AT(ADDR(__kcrctab_gpl_future) - LOAD_OFFSET) { \ |
84 | VMLINUX_SYMBOL(__start___kcrctab_gpl_future) = .; \ | 112 | VMLINUX_SYMBOL(__start___kcrctab_gpl_future) = .; \ |
diff --git a/include/asm-i386/alternative.h b/include/asm-i386/alternative.h index d79e9ee10f..c61bd1a17f 100644 --- a/include/asm-i386/alternative.h +++ b/include/asm-i386/alternative.h | |||
@@ -5,6 +5,8 @@ | |||
5 | 5 | ||
6 | #include <asm/types.h> | 6 | #include <asm/types.h> |
7 | 7 | ||
8 | #include <linux/types.h> | ||
9 | |||
8 | struct alt_instr { | 10 | struct alt_instr { |
9 | u8 *instr; /* original instruction */ | 11 | u8 *instr; /* original instruction */ |
10 | u8 *replacement; | 12 | u8 *replacement; |
diff --git a/include/asm-i386/apic.h b/include/asm-i386/apic.h index 1d8362cb2c..2c1e371ceb 100644 --- a/include/asm-i386/apic.h +++ b/include/asm-i386/apic.h | |||
@@ -111,24 +111,12 @@ extern void init_apic_mappings (void); | |||
111 | extern void smp_local_timer_interrupt (struct pt_regs * regs); | 111 | extern void smp_local_timer_interrupt (struct pt_regs * regs); |
112 | extern void setup_boot_APIC_clock (void); | 112 | extern void setup_boot_APIC_clock (void); |
113 | extern void setup_secondary_APIC_clock (void); | 113 | extern void setup_secondary_APIC_clock (void); |
114 | extern void setup_apic_nmi_watchdog (void); | ||
115 | extern int reserve_lapic_nmi(void); | ||
116 | extern void release_lapic_nmi(void); | ||
117 | extern void disable_timer_nmi_watchdog(void); | ||
118 | extern void enable_timer_nmi_watchdog(void); | ||
119 | extern void nmi_watchdog_tick (struct pt_regs * regs); | ||
120 | extern int APIC_init_uniprocessor (void); | 114 | extern int APIC_init_uniprocessor (void); |
121 | extern void disable_APIC_timer(void); | 115 | extern void disable_APIC_timer(void); |
122 | extern void enable_APIC_timer(void); | 116 | extern void enable_APIC_timer(void); |
123 | 117 | ||
124 | extern void enable_NMI_through_LVT0 (void * dummy); | 118 | extern void enable_NMI_through_LVT0 (void * dummy); |
125 | 119 | ||
126 | extern unsigned int nmi_watchdog; | ||
127 | #define NMI_NONE 0 | ||
128 | #define NMI_IO_APIC 1 | ||
129 | #define NMI_LOCAL_APIC 2 | ||
130 | #define NMI_INVALID 3 | ||
131 | |||
132 | extern int disable_timer_pin_1; | 120 | extern int disable_timer_pin_1; |
133 | 121 | ||
134 | void smp_send_timer_broadcast_ipi(struct pt_regs *regs); | 122 | void smp_send_timer_broadcast_ipi(struct pt_regs *regs); |
diff --git a/include/asm-i386/cpu.h b/include/asm-i386/cpu.h index e7252c216c..b1bc7b1b64 100644 --- a/include/asm-i386/cpu.h +++ b/include/asm-i386/cpu.h | |||
@@ -7,8 +7,6 @@ | |||
7 | #include <linux/nodemask.h> | 7 | #include <linux/nodemask.h> |
8 | #include <linux/percpu.h> | 8 | #include <linux/percpu.h> |
9 | 9 | ||
10 | #include <asm/node.h> | ||
11 | |||
12 | struct i386_cpu { | 10 | struct i386_cpu { |
13 | struct cpu cpu; | 11 | struct cpu cpu; |
14 | }; | 12 | }; |
diff --git a/include/asm-i386/cpufeature.h b/include/asm-i386/cpufeature.h index 3ecedbafa8..d314ebb3d5 100644 --- a/include/asm-i386/cpufeature.h +++ b/include/asm-i386/cpufeature.h | |||
@@ -72,6 +72,7 @@ | |||
72 | #define X86_FEATURE_CONSTANT_TSC (3*32+ 8) /* TSC ticks at a constant rate */ | 72 | #define X86_FEATURE_CONSTANT_TSC (3*32+ 8) /* TSC ticks at a constant rate */ |
73 | #define X86_FEATURE_UP (3*32+ 9) /* smp kernel running on up */ | 73 | #define X86_FEATURE_UP (3*32+ 9) /* smp kernel running on up */ |
74 | #define X86_FEATURE_FXSAVE_LEAK (3*32+10) /* FXSAVE leaks FOP/FIP/FOP */ | 74 | #define X86_FEATURE_FXSAVE_LEAK (3*32+10) /* FXSAVE leaks FOP/FIP/FOP */ |
75 | #define X86_FEATURE_ARCH_PERFMON (3*32+11) /* Intel Architectural PerfMon */ | ||
75 | 76 | ||
76 | /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ | 77 | /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ |
77 | #define X86_FEATURE_XMM3 (4*32+ 0) /* Streaming SIMD Extensions-3 */ | 78 | #define X86_FEATURE_XMM3 (4*32+ 0) /* Streaming SIMD Extensions-3 */ |
diff --git a/include/asm-i386/delay.h b/include/asm-i386/delay.h index 456db8501c..b1c7650dc7 100644 --- a/include/asm-i386/delay.h +++ b/include/asm-i386/delay.h | |||
@@ -23,4 +23,6 @@ extern void __delay(unsigned long loops); | |||
23 | ((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5ul)) : \ | 23 | ((n) > 20000 ? __bad_ndelay() : __const_udelay((n) * 5ul)) : \ |
24 | __ndelay(n)) | 24 | __ndelay(n)) |
25 | 25 | ||
26 | void use_tsc_delay(void); | ||
27 | |||
26 | #endif /* defined(_I386_DELAY_H) */ | 28 | #endif /* defined(_I386_DELAY_H) */ |
diff --git a/include/asm-i386/dwarf2.h b/include/asm-i386/dwarf2.h new file mode 100644 index 0000000000..2280f6272f --- /dev/null +++ b/include/asm-i386/dwarf2.h | |||
@@ -0,0 +1,54 @@ | |||
1 | #ifndef _DWARF2_H | ||
2 | #define _DWARF2_H | ||
3 | |||
4 | #include <linux/config.h> | ||
5 | |||
6 | #ifndef __ASSEMBLY__ | ||
7 | #warning "asm/dwarf2.h should be only included in pure assembly files" | ||
8 | #endif | ||
9 | |||
10 | /* | ||
11 | Macros for dwarf2 CFI unwind table entries. | ||
12 | See "as.info" for details on these pseudo ops. Unfortunately | ||
13 | they are only supported in very new binutils, so define them | ||
14 | away for older version. | ||
15 | */ | ||
16 | |||
17 | #ifdef CONFIG_UNWIND_INFO | ||
18 | |||
19 | #define CFI_STARTPROC .cfi_startproc | ||
20 | #define CFI_ENDPROC .cfi_endproc | ||
21 | #define CFI_DEF_CFA .cfi_def_cfa | ||
22 | #define CFI_DEF_CFA_REGISTER .cfi_def_cfa_register | ||
23 | #define CFI_DEF_CFA_OFFSET .cfi_def_cfa_offset | ||
24 | #define CFI_ADJUST_CFA_OFFSET .cfi_adjust_cfa_offset | ||
25 | #define CFI_OFFSET .cfi_offset | ||
26 | #define CFI_REL_OFFSET .cfi_rel_offset | ||
27 | #define CFI_REGISTER .cfi_register | ||
28 | #define CFI_RESTORE .cfi_restore | ||
29 | #define CFI_REMEMBER_STATE .cfi_remember_state | ||
30 | #define CFI_RESTORE_STATE .cfi_restore_state | ||
31 | |||
32 | #else | ||
33 | |||
34 | /* Due to the structure of pre-exisiting code, don't use assembler line | ||
35 | comment character # to ignore the arguments. Instead, use a dummy macro. */ | ||
36 | .macro ignore a=0, b=0, c=0, d=0 | ||
37 | .endm | ||
38 | |||
39 | #define CFI_STARTPROC ignore | ||
40 | #define CFI_ENDPROC ignore | ||
41 | #define CFI_DEF_CFA ignore | ||
42 | #define CFI_DEF_CFA_REGISTER ignore | ||
43 | #define CFI_DEF_CFA_OFFSET ignore | ||
44 | #define CFI_ADJUST_CFA_OFFSET ignore | ||
45 | #define CFI_OFFSET ignore | ||
46 | #define CFI_REL_OFFSET ignore | ||
47 | #define CFI_REGISTER ignore | ||
48 | #define CFI_RESTORE ignore | ||
49 | #define CFI_REMEMBER_STATE ignore | ||
50 | #define CFI_RESTORE_STATE ignore | ||
51 | |||
52 | #endif | ||
53 | |||
54 | #endif | ||
diff --git a/include/asm-i386/elf.h b/include/asm-i386/elf.h index 4153d80e4d..1eac92cb5b 100644 --- a/include/asm-i386/elf.h +++ b/include/asm-i386/elf.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <asm/processor.h> | 10 | #include <asm/processor.h> |
11 | #include <asm/system.h> /* for savesegment */ | 11 | #include <asm/system.h> /* for savesegment */ |
12 | #include <asm/auxvec.h> | 12 | #include <asm/auxvec.h> |
13 | #include <asm/desc.h> | ||
13 | 14 | ||
14 | #include <linux/utsname.h> | 15 | #include <linux/utsname.h> |
15 | 16 | ||
@@ -129,15 +130,41 @@ extern int dump_task_extended_fpu (struct task_struct *, struct user_fxsr_struct | |||
129 | #define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs) | 130 | #define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs) |
130 | #define ELF_CORE_COPY_XFPREGS(tsk, elf_xfpregs) dump_task_extended_fpu(tsk, elf_xfpregs) | 131 | #define ELF_CORE_COPY_XFPREGS(tsk, elf_xfpregs) dump_task_extended_fpu(tsk, elf_xfpregs) |
131 | 132 | ||
132 | #define VSYSCALL_BASE (__fix_to_virt(FIX_VSYSCALL)) | 133 | #define VDSO_HIGH_BASE (__fix_to_virt(FIX_VDSO)) |
133 | #define VSYSCALL_EHDR ((const struct elfhdr *) VSYSCALL_BASE) | 134 | #define VDSO_BASE ((unsigned long)current->mm->context.vdso) |
134 | #define VSYSCALL_ENTRY ((unsigned long) &__kernel_vsyscall) | 135 | |
136 | #ifdef CONFIG_COMPAT_VDSO | ||
137 | # define VDSO_COMPAT_BASE VDSO_HIGH_BASE | ||
138 | # define VDSO_PRELINK VDSO_HIGH_BASE | ||
139 | #else | ||
140 | # define VDSO_COMPAT_BASE VDSO_BASE | ||
141 | # define VDSO_PRELINK 0 | ||
142 | #endif | ||
143 | |||
144 | #define VDSO_COMPAT_SYM(x) \ | ||
145 | (VDSO_COMPAT_BASE + (unsigned long)(x) - VDSO_PRELINK) | ||
146 | |||
147 | #define VDSO_SYM(x) \ | ||
148 | (VDSO_BASE + (unsigned long)(x) - VDSO_PRELINK) | ||
149 | |||
150 | #define VDSO_HIGH_EHDR ((const struct elfhdr *) VDSO_HIGH_BASE) | ||
151 | #define VDSO_EHDR ((const struct elfhdr *) VDSO_COMPAT_BASE) | ||
152 | |||
135 | extern void __kernel_vsyscall; | 153 | extern void __kernel_vsyscall; |
136 | 154 | ||
155 | #define VDSO_ENTRY VDSO_SYM(&__kernel_vsyscall) | ||
156 | |||
157 | #define ARCH_HAS_SETUP_ADDITIONAL_PAGES | ||
158 | struct linux_binprm; | ||
159 | extern int arch_setup_additional_pages(struct linux_binprm *bprm, | ||
160 | int executable_stack); | ||
161 | |||
162 | extern unsigned int vdso_enabled; | ||
163 | |||
137 | #define ARCH_DLINFO \ | 164 | #define ARCH_DLINFO \ |
138 | do { \ | 165 | do if (vdso_enabled) { \ |
139 | NEW_AUX_ENT(AT_SYSINFO, VSYSCALL_ENTRY); \ | 166 | NEW_AUX_ENT(AT_SYSINFO, VDSO_ENTRY); \ |
140 | NEW_AUX_ENT(AT_SYSINFO_EHDR, VSYSCALL_BASE); \ | 167 | NEW_AUX_ENT(AT_SYSINFO_EHDR, VDSO_COMPAT_BASE); \ |
141 | } while (0) | 168 | } while (0) |
142 | 169 | ||
143 | /* | 170 | /* |
@@ -148,15 +175,15 @@ do { \ | |||
148 | * Dumping its extra ELF program headers includes all the other information | 175 | * Dumping its extra ELF program headers includes all the other information |
149 | * a debugger needs to easily find how the vsyscall DSO was being used. | 176 | * a debugger needs to easily find how the vsyscall DSO was being used. |
150 | */ | 177 | */ |
151 | #define ELF_CORE_EXTRA_PHDRS (VSYSCALL_EHDR->e_phnum) | 178 | #define ELF_CORE_EXTRA_PHDRS (VDSO_HIGH_EHDR->e_phnum) |
152 | #define ELF_CORE_WRITE_EXTRA_PHDRS \ | 179 | #define ELF_CORE_WRITE_EXTRA_PHDRS \ |
153 | do { \ | 180 | do { \ |
154 | const struct elf_phdr *const vsyscall_phdrs = \ | 181 | const struct elf_phdr *const vsyscall_phdrs = \ |
155 | (const struct elf_phdr *) (VSYSCALL_BASE \ | 182 | (const struct elf_phdr *) (VDSO_HIGH_BASE \ |
156 | + VSYSCALL_EHDR->e_phoff); \ | 183 | + VDSO_HIGH_EHDR->e_phoff); \ |
157 | int i; \ | 184 | int i; \ |
158 | Elf32_Off ofs = 0; \ | 185 | Elf32_Off ofs = 0; \ |
159 | for (i = 0; i < VSYSCALL_EHDR->e_phnum; ++i) { \ | 186 | for (i = 0; i < VDSO_HIGH_EHDR->e_phnum; ++i) { \ |
160 | struct elf_phdr phdr = vsyscall_phdrs[i]; \ | 187 | struct elf_phdr phdr = vsyscall_phdrs[i]; \ |
161 | if (phdr.p_type == PT_LOAD) { \ | 188 | if (phdr.p_type == PT_LOAD) { \ |
162 | BUG_ON(ofs != 0); \ | 189 | BUG_ON(ofs != 0); \ |
@@ -174,10 +201,10 @@ do { \ | |||
174 | #define ELF_CORE_WRITE_EXTRA_DATA \ | 201 | #define ELF_CORE_WRITE_EXTRA_DATA \ |
175 | do { \ | 202 | do { \ |
176 | const struct elf_phdr *const vsyscall_phdrs = \ | 203 | const struct elf_phdr *const vsyscall_phdrs = \ |
177 | (const struct elf_phdr *) (VSYSCALL_BASE \ | 204 | (const struct elf_phdr *) (VDSO_HIGH_BASE \ |
178 | + VSYSCALL_EHDR->e_phoff); \ | 205 | + VDSO_HIGH_EHDR->e_phoff); \ |
179 | int i; \ | 206 | int i; \ |
180 | for (i = 0; i < VSYSCALL_EHDR->e_phnum; ++i) { \ | 207 | for (i = 0; i < VDSO_HIGH_EHDR->e_phnum; ++i) { \ |
181 | if (vsyscall_phdrs[i].p_type == PT_LOAD) \ | 208 | if (vsyscall_phdrs[i].p_type == PT_LOAD) \ |
182 | DUMP_WRITE((void *) vsyscall_phdrs[i].p_vaddr, \ | 209 | DUMP_WRITE((void *) vsyscall_phdrs[i].p_vaddr, \ |
183 | PAGE_ALIGN(vsyscall_phdrs[i].p_memsz)); \ | 210 | PAGE_ALIGN(vsyscall_phdrs[i].p_memsz)); \ |
diff --git a/include/asm-i386/fixmap.h b/include/asm-i386/fixmap.h index f7e068f4d2..a48cc3f7cc 100644 --- a/include/asm-i386/fixmap.h +++ b/include/asm-i386/fixmap.h | |||
@@ -51,7 +51,7 @@ | |||
51 | */ | 51 | */ |
52 | enum fixed_addresses { | 52 | enum fixed_addresses { |
53 | FIX_HOLE, | 53 | FIX_HOLE, |
54 | FIX_VSYSCALL, | 54 | FIX_VDSO, |
55 | #ifdef CONFIG_X86_LOCAL_APIC | 55 | #ifdef CONFIG_X86_LOCAL_APIC |
56 | FIX_APIC_BASE, /* local (CPU) APIC) -- required for SMP or not */ | 56 | FIX_APIC_BASE, /* local (CPU) APIC) -- required for SMP or not */ |
57 | #endif | 57 | #endif |
@@ -115,14 +115,6 @@ extern void __set_fixmap (enum fixed_addresses idx, | |||
115 | #define __fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT)) | 115 | #define __fix_to_virt(x) (FIXADDR_TOP - ((x) << PAGE_SHIFT)) |
116 | #define __virt_to_fix(x) ((FIXADDR_TOP - ((x)&PAGE_MASK)) >> PAGE_SHIFT) | 116 | #define __virt_to_fix(x) ((FIXADDR_TOP - ((x)&PAGE_MASK)) >> PAGE_SHIFT) |
117 | 117 | ||
118 | /* | ||
119 | * This is the range that is readable by user mode, and things | ||
120 | * acting like user mode such as get_user_pages. | ||
121 | */ | ||
122 | #define FIXADDR_USER_START (__fix_to_virt(FIX_VSYSCALL)) | ||
123 | #define FIXADDR_USER_END (FIXADDR_USER_START + PAGE_SIZE) | ||
124 | |||
125 | |||
126 | extern void __this_fixmap_does_not_exist(void); | 118 | extern void __this_fixmap_does_not_exist(void); |
127 | 119 | ||
128 | /* | 120 | /* |
diff --git a/include/asm-i386/hw_irq.h b/include/asm-i386/hw_irq.h index 95d3fd0902..87e5a351d8 100644 --- a/include/asm-i386/hw_irq.h +++ b/include/asm-i386/hw_irq.h | |||
@@ -19,6 +19,8 @@ | |||
19 | 19 | ||
20 | struct hw_interrupt_type; | 20 | struct hw_interrupt_type; |
21 | 21 | ||
22 | #define NMI_VECTOR 0x02 | ||
23 | |||
22 | /* | 24 | /* |
23 | * Various low-level irq details needed by irq.c, process.c, | 25 | * Various low-level irq details needed by irq.c, process.c, |
24 | * time.c, io_apic.c and smp.c | 26 | * time.c, io_apic.c and smp.c |
@@ -67,14 +69,4 @@ extern atomic_t irq_mis_count; | |||
67 | 69 | ||
68 | #define IO_APIC_IRQ(x) (((x) >= 16) || ((1<<(x)) & io_apic_irqs)) | 70 | #define IO_APIC_IRQ(x) (((x) >= 16) || ((1<<(x)) & io_apic_irqs)) |
69 | 71 | ||
70 | #if defined(CONFIG_X86_IO_APIC) | ||
71 | static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) | ||
72 | { | ||
73 | if (IO_APIC_IRQ(i)) | ||
74 | send_IPI_self(IO_APIC_VECTOR(i)); | ||
75 | } | ||
76 | #else | ||
77 | static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) {} | ||
78 | #endif | ||
79 | |||
80 | #endif /* _ASM_HW_IRQ_H */ | 72 | #endif /* _ASM_HW_IRQ_H */ |
diff --git a/include/asm-i386/intel_arch_perfmon.h b/include/asm-i386/intel_arch_perfmon.h new file mode 100644 index 0000000000..134ea9cc52 --- /dev/null +++ b/include/asm-i386/intel_arch_perfmon.h | |||
@@ -0,0 +1,19 @@ | |||
1 | #ifndef X86_INTEL_ARCH_PERFMON_H | ||
2 | #define X86_INTEL_ARCH_PERFMON_H 1 | ||
3 | |||
4 | #define MSR_ARCH_PERFMON_PERFCTR0 0xc1 | ||
5 | #define MSR_ARCH_PERFMON_PERFCTR1 0xc2 | ||
6 | |||
7 | #define MSR_ARCH_PERFMON_EVENTSEL0 0x186 | ||
8 | #define MSR_ARCH_PERFMON_EVENTSEL1 0x187 | ||
9 | |||
10 | #define ARCH_PERFMON_EVENTSEL0_ENABLE (1 << 22) | ||
11 | #define ARCH_PERFMON_EVENTSEL_INT (1 << 20) | ||
12 | #define ARCH_PERFMON_EVENTSEL_OS (1 << 17) | ||
13 | #define ARCH_PERFMON_EVENTSEL_USR (1 << 16) | ||
14 | |||
15 | #define ARCH_PERFMON_UNHALTED_CORE_CYCLES_SEL (0x3c) | ||
16 | #define ARCH_PERFMON_UNHALTED_CORE_CYCLES_UMASK (0x00 << 8) | ||
17 | #define ARCH_PERFMON_UNHALTED_CORE_CYCLES_PRESENT (1 << 0) | ||
18 | |||
19 | #endif /* X86_INTEL_ARCH_PERFMON_H */ | ||
diff --git a/include/asm-i386/k8.h b/include/asm-i386/k8.h new file mode 100644 index 0000000000..dfd88a6e60 --- /dev/null +++ b/include/asm-i386/k8.h | |||
@@ -0,0 +1 @@ | |||
#include <asm-x86_64/k8.h> | |||
diff --git a/include/asm-i386/kdebug.h b/include/asm-i386/kdebug.h index 96d0828ce0..d18cdb9fc9 100644 --- a/include/asm-i386/kdebug.h +++ b/include/asm-i386/kdebug.h | |||
@@ -19,6 +19,8 @@ struct die_args { | |||
19 | 19 | ||
20 | extern int register_die_notifier(struct notifier_block *); | 20 | extern int register_die_notifier(struct notifier_block *); |
21 | extern int unregister_die_notifier(struct notifier_block *); | 21 | extern int unregister_die_notifier(struct notifier_block *); |
22 | extern int register_page_fault_notifier(struct notifier_block *); | ||
23 | extern int unregister_page_fault_notifier(struct notifier_block *); | ||
22 | extern struct atomic_notifier_head i386die_chain; | 24 | extern struct atomic_notifier_head i386die_chain; |
23 | 25 | ||
24 | 26 | ||
diff --git a/include/asm-i386/kprobes.h b/include/asm-i386/kprobes.h index 57d157c5cf..0730a20f6d 100644 --- a/include/asm-i386/kprobes.h +++ b/include/asm-i386/kprobes.h | |||
@@ -44,6 +44,7 @@ typedef u8 kprobe_opcode_t; | |||
44 | 44 | ||
45 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry | 45 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry |
46 | #define ARCH_SUPPORTS_KRETPROBES | 46 | #define ARCH_SUPPORTS_KRETPROBES |
47 | #define ARCH_INACTIVE_KPROBE_COUNT 0 | ||
47 | 48 | ||
48 | void arch_remove_kprobe(struct kprobe *p); | 49 | void arch_remove_kprobe(struct kprobe *p); |
49 | void kretprobe_trampoline(void); | 50 | void kretprobe_trampoline(void); |
diff --git a/include/asm-i386/local.h b/include/asm-i386/local.h index e67fa08260..3b4998c51d 100644 --- a/include/asm-i386/local.h +++ b/include/asm-i386/local.h | |||
@@ -55,12 +55,26 @@ static __inline__ void local_sub(long i, local_t *v) | |||
55 | * much more efficient than these naive implementations. Note they take | 55 | * much more efficient than these naive implementations. Note they take |
56 | * a variable, not an address. | 56 | * a variable, not an address. |
57 | */ | 57 | */ |
58 | #define cpu_local_read(v) local_read(&__get_cpu_var(v)) | 58 | |
59 | #define cpu_local_set(v, i) local_set(&__get_cpu_var(v), (i)) | 59 | /* Need to disable preemption for the cpu local counters otherwise we could |
60 | #define cpu_local_inc(v) local_inc(&__get_cpu_var(v)) | 60 | still access a variable of a previous CPU in a non atomic way. */ |
61 | #define cpu_local_dec(v) local_dec(&__get_cpu_var(v)) | 61 | #define cpu_local_wrap_v(v) \ |
62 | #define cpu_local_add(i, v) local_add((i), &__get_cpu_var(v)) | 62 | ({ local_t res__; \ |
63 | #define cpu_local_sub(i, v) local_sub((i), &__get_cpu_var(v)) | 63 | preempt_disable(); \ |
64 | res__ = (v); \ | ||
65 | preempt_enable(); \ | ||
66 | res__; }) | ||
67 | #define cpu_local_wrap(v) \ | ||
68 | ({ preempt_disable(); \ | ||
69 | v; \ | ||
70 | preempt_enable(); }) \ | ||
71 | |||
72 | #define cpu_local_read(v) cpu_local_wrap_v(local_read(&__get_cpu_var(v))) | ||
73 | #define cpu_local_set(v, i) cpu_local_wrap(local_set(&__get_cpu_var(v), (i))) | ||
74 | #define cpu_local_inc(v) cpu_local_wrap(local_inc(&__get_cpu_var(v))) | ||
75 | #define cpu_local_dec(v) cpu_local_wrap(local_dec(&__get_cpu_var(v))) | ||
76 | #define cpu_local_add(i, v) cpu_local_wrap(local_add((i), &__get_cpu_var(v))) | ||
77 | #define cpu_local_sub(i, v) cpu_local_wrap(local_sub((i), &__get_cpu_var(v))) | ||
64 | 78 | ||
65 | #define __cpu_local_inc(v) cpu_local_inc(v) | 79 | #define __cpu_local_inc(v) cpu_local_inc(v) |
66 | #define __cpu_local_dec(v) cpu_local_dec(v) | 80 | #define __cpu_local_dec(v) cpu_local_dec(v) |
diff --git a/include/asm-i386/mach-default/mach_ipi.h b/include/asm-i386/mach-default/mach_ipi.h index a1d0072e36..0dba244c86 100644 --- a/include/asm-i386/mach-default/mach_ipi.h +++ b/include/asm-i386/mach-default/mach_ipi.h | |||
@@ -1,6 +1,9 @@ | |||
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 | /* Avoid include hell */ | ||
5 | #define NMI_VECTOR 0x02 | ||
6 | |||
4 | void send_IPI_mask_bitmask(cpumask_t mask, int vector); | 7 | void send_IPI_mask_bitmask(cpumask_t mask, int vector); |
5 | void __send_IPI_shortcut(unsigned int shortcut, int vector); | 8 | void __send_IPI_shortcut(unsigned int shortcut, int vector); |
6 | 9 | ||
@@ -13,7 +16,7 @@ static inline void send_IPI_mask(cpumask_t mask, int vector) | |||
13 | 16 | ||
14 | static inline void __local_send_IPI_allbutself(int vector) | 17 | static inline void __local_send_IPI_allbutself(int vector) |
15 | { | 18 | { |
16 | if (no_broadcast) { | 19 | if (no_broadcast || vector == NMI_VECTOR) { |
17 | cpumask_t mask = cpu_online_map; | 20 | cpumask_t mask = cpu_online_map; |
18 | 21 | ||
19 | cpu_clear(smp_processor_id(), mask); | 22 | cpu_clear(smp_processor_id(), mask); |
@@ -24,7 +27,7 @@ static inline void __local_send_IPI_allbutself(int vector) | |||
24 | 27 | ||
25 | static inline void __local_send_IPI_all(int vector) | 28 | static inline void __local_send_IPI_all(int vector) |
26 | { | 29 | { |
27 | if (no_broadcast) | 30 | if (no_broadcast || vector == NMI_VECTOR) |
28 | send_IPI_mask(cpu_online_map, vector); | 31 | send_IPI_mask(cpu_online_map, vector); |
29 | else | 32 | else |
30 | __send_IPI_shortcut(APIC_DEST_ALLINC, vector); | 33 | __send_IPI_shortcut(APIC_DEST_ALLINC, vector); |
diff --git a/include/asm-i386/mach-default/mach_timer.h b/include/asm-i386/mach-default/mach_timer.h index 4b9703bb02..807992fd41 100644 --- a/include/asm-i386/mach-default/mach_timer.h +++ b/include/asm-i386/mach-default/mach_timer.h | |||
@@ -15,7 +15,9 @@ | |||
15 | #ifndef _MACH_TIMER_H | 15 | #ifndef _MACH_TIMER_H |
16 | #define _MACH_TIMER_H | 16 | #define _MACH_TIMER_H |
17 | 17 | ||
18 | #define CALIBRATE_LATCH (5 * LATCH) | 18 | #define CALIBRATE_TIME_MSEC 30 /* 30 msecs */ |
19 | #define CALIBRATE_LATCH \ | ||
20 | ((CLOCK_TICK_RATE * CALIBRATE_TIME_MSEC + 1000/2)/1000) | ||
19 | 21 | ||
20 | static inline void mach_prepare_counter(void) | 22 | static inline void mach_prepare_counter(void) |
21 | { | 23 | { |
diff --git a/include/asm-i386/mach-summit/mach_mpparse.h b/include/asm-i386/mach-summit/mach_mpparse.h index 1cce2b924a..9426839917 100644 --- a/include/asm-i386/mach-summit/mach_mpparse.h +++ b/include/asm-i386/mach-summit/mach_mpparse.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define __ASM_MACH_MPPARSE_H | 2 | #define __ASM_MACH_MPPARSE_H |
3 | 3 | ||
4 | #include <mach_apic.h> | 4 | #include <mach_apic.h> |
5 | #include <asm/tsc.h> | ||
5 | 6 | ||
6 | extern int use_cyclone; | 7 | extern int use_cyclone; |
7 | 8 | ||
@@ -29,6 +30,7 @@ static inline int mps_oem_check(struct mp_config_table *mpc, char *oem, | |||
29 | (!strncmp(productid, "VIGIL SMP", 9) | 30 | (!strncmp(productid, "VIGIL SMP", 9) |
30 | || !strncmp(productid, "EXA", 3) | 31 | || !strncmp(productid, "EXA", 3) |
31 | || !strncmp(productid, "RUTHLESS SMP", 12))){ | 32 | || !strncmp(productid, "RUTHLESS SMP", 12))){ |
33 | mark_tsc_unstable(); | ||
32 | use_cyclone = 1; /*enable cyclone-timer*/ | 34 | use_cyclone = 1; /*enable cyclone-timer*/ |
33 | setup_summit(); | 35 | setup_summit(); |
34 | return 1; | 36 | return 1; |
@@ -42,6 +44,7 @@ static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) | |||
42 | if (!strncmp(oem_id, "IBM", 3) && | 44 | if (!strncmp(oem_id, "IBM", 3) && |
43 | (!strncmp(oem_table_id, "SERVIGIL", 8) | 45 | (!strncmp(oem_table_id, "SERVIGIL", 8) |
44 | || !strncmp(oem_table_id, "EXA", 3))){ | 46 | || !strncmp(oem_table_id, "EXA", 3))){ |
47 | mark_tsc_unstable(); | ||
45 | use_cyclone = 1; /*enable cyclone-timer*/ | 48 | use_cyclone = 1; /*enable cyclone-timer*/ |
46 | setup_summit(); | 49 | setup_summit(); |
47 | return 1; | 50 | return 1; |
diff --git a/include/asm-i386/mach-visws/setup_arch.h b/include/asm-i386/mach-visws/setup_arch.h index b92d6d9a4d..33f700ef68 100644 --- a/include/asm-i386/mach-visws/setup_arch.h +++ b/include/asm-i386/mach-visws/setup_arch.h | |||
@@ -1,5 +1,8 @@ | |||
1 | /* Hook to call BIOS initialisation function */ | 1 | /* Hook to call BIOS initialisation function */ |
2 | 2 | ||
3 | extern unsigned long sgivwfb_mem_phys; | ||
4 | extern unsigned long sgivwfb_mem_size; | ||
5 | |||
3 | /* no action for visws */ | 6 | /* no action for visws */ |
4 | 7 | ||
5 | #define ARCH_SETUP | 8 | #define ARCH_SETUP |
diff --git a/include/asm-i386/mmu.h b/include/asm-i386/mmu.h index f431a0b86d..8358dd3df7 100644 --- a/include/asm-i386/mmu.h +++ b/include/asm-i386/mmu.h | |||
@@ -12,6 +12,7 @@ typedef struct { | |||
12 | int size; | 12 | int size; |
13 | struct semaphore sem; | 13 | struct semaphore sem; |
14 | void *ldt; | 14 | void *ldt; |
15 | void *vdso; | ||
15 | } mm_context_t; | 16 | } mm_context_t; |
16 | 17 | ||
17 | #endif | 18 | #endif |
diff --git a/include/asm-i386/nmi.h b/include/asm-i386/nmi.h index 21f16638fc..67d9947999 100644 --- a/include/asm-i386/nmi.h +++ b/include/asm-i386/nmi.h | |||
@@ -5,24 +5,38 @@ | |||
5 | #define ASM_NMI_H | 5 | #define ASM_NMI_H |
6 | 6 | ||
7 | #include <linux/pm.h> | 7 | #include <linux/pm.h> |
8 | 8 | ||
9 | struct pt_regs; | 9 | struct pt_regs; |
10 | 10 | ||
11 | typedef int (*nmi_callback_t)(struct pt_regs * regs, int cpu); | 11 | typedef int (*nmi_callback_t)(struct pt_regs * regs, int cpu); |
12 | 12 | ||
13 | /** | 13 | /** |
14 | * set_nmi_callback | 14 | * set_nmi_callback |
15 | * | 15 | * |
16 | * Set a handler for an NMI. Only one handler may be | 16 | * Set a handler for an NMI. Only one handler may be |
17 | * set. Return 1 if the NMI was handled. | 17 | * set. Return 1 if the NMI was handled. |
18 | */ | 18 | */ |
19 | void set_nmi_callback(nmi_callback_t callback); | 19 | void set_nmi_callback(nmi_callback_t callback); |
20 | 20 | ||
21 | /** | 21 | /** |
22 | * unset_nmi_callback | 22 | * unset_nmi_callback |
23 | * | 23 | * |
24 | * Remove the handler previously set. | 24 | * Remove the handler previously set. |
25 | */ | 25 | */ |
26 | void unset_nmi_callback(void); | 26 | void unset_nmi_callback(void); |
27 | 27 | ||
28 | extern void setup_apic_nmi_watchdog (void); | ||
29 | extern int reserve_lapic_nmi(void); | ||
30 | extern void release_lapic_nmi(void); | ||
31 | extern void disable_timer_nmi_watchdog(void); | ||
32 | extern void enable_timer_nmi_watchdog(void); | ||
33 | extern void nmi_watchdog_tick (struct pt_regs * regs); | ||
34 | |||
35 | extern unsigned int nmi_watchdog; | ||
36 | #define NMI_DEFAULT -1 | ||
37 | #define NMI_NONE 0 | ||
38 | #define NMI_IO_APIC 1 | ||
39 | #define NMI_LOCAL_APIC 2 | ||
40 | #define NMI_INVALID 3 | ||
41 | |||
28 | #endif /* ASM_NMI_H */ | 42 | #endif /* ASM_NMI_H */ |
diff --git a/include/asm-i386/node.h b/include/asm-i386/node.h deleted file mode 100644 index e13c6ffa72..0000000000 --- a/include/asm-i386/node.h +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | #ifndef _ASM_I386_NODE_H_ | ||
2 | #define _ASM_I386_NODE_H_ | ||
3 | |||
4 | #include <linux/device.h> | ||
5 | #include <linux/mmzone.h> | ||
6 | #include <linux/node.h> | ||
7 | #include <linux/topology.h> | ||
8 | #include <linux/nodemask.h> | ||
9 | |||
10 | struct i386_node { | ||
11 | struct node node; | ||
12 | }; | ||
13 | extern struct i386_node node_devices[MAX_NUMNODES]; | ||
14 | |||
15 | static inline int arch_register_node(int num){ | ||
16 | int p_node; | ||
17 | struct node *parent = NULL; | ||
18 | |||
19 | if (!node_online(num)) | ||
20 | return 0; | ||
21 | p_node = parent_node(num); | ||
22 | |||
23 | if (p_node != num) | ||
24 | parent = &node_devices[p_node].node; | ||
25 | |||
26 | return register_node(&node_devices[num].node, num, parent); | ||
27 | } | ||
28 | |||
29 | #endif /* _ASM_I386_NODE_H_ */ | ||
diff --git a/include/asm-i386/page.h b/include/asm-i386/page.h index e3a552fa55..f5bf544c72 100644 --- a/include/asm-i386/page.h +++ b/include/asm-i386/page.h | |||
@@ -96,6 +96,8 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
96 | 96 | ||
97 | #ifndef __ASSEMBLY__ | 97 | #ifndef __ASSEMBLY__ |
98 | 98 | ||
99 | struct vm_area_struct; | ||
100 | |||
99 | /* | 101 | /* |
100 | * This much address space is reserved for vmalloc() and iomap() | 102 | * This much address space is reserved for vmalloc() and iomap() |
101 | * as well as fixmap mappings. | 103 | * as well as fixmap mappings. |
@@ -139,6 +141,7 @@ extern int page_is_ram(unsigned long pagenr); | |||
139 | #include <asm-generic/memory_model.h> | 141 | #include <asm-generic/memory_model.h> |
140 | #include <asm-generic/page.h> | 142 | #include <asm-generic/page.h> |
141 | 143 | ||
144 | #define __HAVE_ARCH_GATE_AREA 1 | ||
142 | #endif /* __KERNEL__ */ | 145 | #endif /* __KERNEL__ */ |
143 | 146 | ||
144 | #endif /* _I386_PAGE_H */ | 147 | #endif /* _I386_PAGE_H */ |
diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h index 0c83cf12ee..b32346d62e 100644 --- a/include/asm-i386/processor.h +++ b/include/asm-i386/processor.h | |||
@@ -71,8 +71,12 @@ struct cpuinfo_x86 { | |||
71 | cpumask_t llc_shared_map; /* cpus sharing the last level cache */ | 71 | cpumask_t llc_shared_map; /* cpus sharing the last level cache */ |
72 | #endif | 72 | #endif |
73 | unsigned char x86_max_cores; /* cpuid returned max cores value */ | 73 | unsigned char x86_max_cores; /* cpuid returned max cores value */ |
74 | unsigned char booted_cores; /* number of cores as seen by OS */ | ||
75 | unsigned char apicid; | 74 | unsigned char apicid; |
75 | #ifdef CONFIG_SMP | ||
76 | unsigned char booted_cores; /* number of cores as seen by OS */ | ||
77 | __u8 phys_proc_id; /* Physical processor id. */ | ||
78 | __u8 cpu_core_id; /* Core id */ | ||
79 | #endif | ||
76 | } __attribute__((__aligned__(SMP_CACHE_BYTES))); | 80 | } __attribute__((__aligned__(SMP_CACHE_BYTES))); |
77 | 81 | ||
78 | #define X86_VENDOR_INTEL 0 | 82 | #define X86_VENDOR_INTEL 0 |
@@ -104,14 +108,13 @@ extern struct cpuinfo_x86 cpu_data[]; | |||
104 | #define current_cpu_data boot_cpu_data | 108 | #define current_cpu_data boot_cpu_data |
105 | #endif | 109 | #endif |
106 | 110 | ||
107 | extern int phys_proc_id[NR_CPUS]; | ||
108 | extern int cpu_core_id[NR_CPUS]; | ||
109 | extern int cpu_llc_id[NR_CPUS]; | 111 | extern int cpu_llc_id[NR_CPUS]; |
110 | extern char ignore_fpu_irq; | 112 | extern char ignore_fpu_irq; |
111 | 113 | ||
112 | extern void identify_cpu(struct cpuinfo_x86 *); | 114 | extern void identify_cpu(struct cpuinfo_x86 *); |
113 | extern void print_cpu_info(struct cpuinfo_x86 *); | 115 | extern void print_cpu_info(struct cpuinfo_x86 *); |
114 | extern unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c); | 116 | extern unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c); |
117 | extern unsigned short num_cache_leaves; | ||
115 | 118 | ||
116 | #ifdef CONFIG_X86_HT | 119 | #ifdef CONFIG_X86_HT |
117 | extern void detect_ht(struct cpuinfo_x86 *c); | 120 | extern void detect_ht(struct cpuinfo_x86 *c); |
@@ -554,7 +557,7 @@ extern void prepare_to_copy(struct task_struct *tsk); | |||
554 | extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); | 557 | extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags); |
555 | 558 | ||
556 | extern unsigned long thread_saved_pc(struct task_struct *tsk); | 559 | extern unsigned long thread_saved_pc(struct task_struct *tsk); |
557 | void show_trace(struct task_struct *task, unsigned long *stack); | 560 | void show_trace(struct task_struct *task, struct pt_regs *regs, unsigned long *stack); |
558 | 561 | ||
559 | unsigned long get_wchan(struct task_struct *p); | 562 | unsigned long get_wchan(struct task_struct *p); |
560 | 563 | ||
diff --git a/include/asm-i386/system.h b/include/asm-i386/system.h index 0249f912a2..cab0180567 100644 --- a/include/asm-i386/system.h +++ b/include/asm-i386/system.h | |||
@@ -427,7 +427,7 @@ static inline unsigned long long __cmpxchg64(volatile void *ptr, unsigned long l | |||
427 | * does not enforce ordering, since there is no data dependency between | 427 | * does not enforce ordering, since there is no data dependency between |
428 | * the read of "a" and the read of "b". Therefore, on some CPUs, such | 428 | * the read of "a" and the read of "b". Therefore, on some CPUs, such |
429 | * as Alpha, "y" could be set to 3 and "x" to 0. Use rmb() | 429 | * as Alpha, "y" could be set to 3 and "x" to 0. Use rmb() |
430 | * in cases like thiswhere there are no data dependencies. | 430 | * in cases like this where there are no data dependencies. |
431 | **/ | 431 | **/ |
432 | 432 | ||
433 | #define read_barrier_depends() do { } while(0) | 433 | #define read_barrier_depends() do { } while(0) |
diff --git a/include/asm-i386/thread_info.h b/include/asm-i386/thread_info.h index 8420ed1249..2833fa2c0d 100644 --- a/include/asm-i386/thread_info.h +++ b/include/asm-i386/thread_info.h | |||
@@ -37,6 +37,7 @@ struct thread_info { | |||
37 | 0-0xBFFFFFFF for user-thead | 37 | 0-0xBFFFFFFF for user-thead |
38 | 0-0xFFFFFFFF for kernel-thread | 38 | 0-0xFFFFFFFF for kernel-thread |
39 | */ | 39 | */ |
40 | void *sysenter_return; | ||
40 | struct restart_block restart_block; | 41 | struct restart_block restart_block; |
41 | 42 | ||
42 | unsigned long previous_esp; /* ESP of the previous stack in case | 43 | unsigned long previous_esp; /* ESP of the previous stack in case |
@@ -83,17 +84,15 @@ struct thread_info { | |||
83 | #define init_stack (init_thread_union.stack) | 84 | #define init_stack (init_thread_union.stack) |
84 | 85 | ||
85 | 86 | ||
87 | /* how to get the current stack pointer from C */ | ||
88 | register unsigned long current_stack_pointer asm("esp") __attribute_used__; | ||
89 | |||
86 | /* how to get the thread information struct from C */ | 90 | /* how to get the thread information struct from C */ |
87 | static inline struct thread_info *current_thread_info(void) | 91 | static inline struct thread_info *current_thread_info(void) |
88 | { | 92 | { |
89 | struct thread_info *ti; | 93 | return (struct thread_info *)(current_stack_pointer & ~(THREAD_SIZE - 1)); |
90 | __asm__("andl %%esp,%0; ":"=r" (ti) : "0" (~(THREAD_SIZE - 1))); | ||
91 | return ti; | ||
92 | } | 94 | } |
93 | 95 | ||
94 | /* how to get the current stack pointer from C */ | ||
95 | register unsigned long current_stack_pointer asm("esp") __attribute_used__; | ||
96 | |||
97 | /* thread information allocation */ | 96 | /* thread information allocation */ |
98 | #ifdef CONFIG_DEBUG_STACK_USAGE | 97 | #ifdef CONFIG_DEBUG_STACK_USAGE |
99 | #define alloc_thread_info(tsk) \ | 98 | #define alloc_thread_info(tsk) \ |
@@ -140,8 +139,7 @@ register unsigned long current_stack_pointer asm("esp") __attribute_used__; | |||
140 | #define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */ | 139 | #define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */ |
141 | #define TIF_SECCOMP 8 /* secure computing */ | 140 | #define TIF_SECCOMP 8 /* secure computing */ |
142 | #define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */ | 141 | #define TIF_RESTORE_SIGMASK 9 /* restore signal mask in do_signal() */ |
143 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 142 | #define TIF_MEMDIE 16 |
144 | #define TIF_MEMDIE 17 | ||
145 | 143 | ||
146 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) | 144 | #define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE) |
147 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) | 145 | #define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME) |
@@ -153,7 +151,6 @@ register unsigned long current_stack_pointer asm("esp") __attribute_used__; | |||
153 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) | 151 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) |
154 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) | 152 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) |
155 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) | 153 | #define _TIF_RESTORE_SIGMASK (1<<TIF_RESTORE_SIGMASK) |
156 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | ||
157 | 154 | ||
158 | /* work to do on interrupt/exception return */ | 155 | /* work to do on interrupt/exception return */ |
159 | #define _TIF_WORK_MASK \ | 156 | #define _TIF_WORK_MASK \ |
@@ -170,6 +167,9 @@ register unsigned long current_stack_pointer asm("esp") __attribute_used__; | |||
170 | * have to worry about atomic accesses. | 167 | * have to worry about atomic accesses. |
171 | */ | 168 | */ |
172 | #define TS_USEDFPU 0x0001 /* FPU was used by this task this quantum (SMP) */ | 169 | #define TS_USEDFPU 0x0001 /* FPU was used by this task this quantum (SMP) */ |
170 | #define TS_POLLING 0x0002 /* True if in idle loop and not sleeping */ | ||
171 | |||
172 | #define tsk_is_polling(t) ((t)->thread_info->status & TS_POLLING) | ||
173 | 173 | ||
174 | #endif /* __KERNEL__ */ | 174 | #endif /* __KERNEL__ */ |
175 | 175 | ||
diff --git a/include/asm-i386/timer.h b/include/asm-i386/timer.h index aed1643747..d0ebd05f85 100644 --- a/include/asm-i386/timer.h +++ b/include/asm-i386/timer.h | |||
@@ -3,68 +3,11 @@ | |||
3 | #include <linux/init.h> | 3 | #include <linux/init.h> |
4 | #include <linux/pm.h> | 4 | #include <linux/pm.h> |
5 | 5 | ||
6 | /** | ||
7 | * struct timer_ops - used to define a timer source | ||
8 | * | ||
9 | * @name: name of the timer. | ||
10 | * @init: Probes and initializes the timer. Takes clock= override | ||
11 | * string as an argument. Returns 0 on success, anything else | ||
12 | * on failure. | ||
13 | * @mark_offset: called by the timer interrupt. | ||
14 | * @get_offset: called by gettimeofday(). Returns the number of microseconds | ||
15 | * since the last timer interupt. | ||
16 | * @monotonic_clock: returns the number of nanoseconds since the init of the | ||
17 | * timer. | ||
18 | * @delay: delays this many clock cycles. | ||
19 | */ | ||
20 | struct timer_opts { | ||
21 | char* name; | ||
22 | void (*mark_offset)(void); | ||
23 | unsigned long (*get_offset)(void); | ||
24 | unsigned long long (*monotonic_clock)(void); | ||
25 | void (*delay)(unsigned long); | ||
26 | unsigned long (*read_timer)(void); | ||
27 | int (*suspend)(pm_message_t state); | ||
28 | int (*resume)(void); | ||
29 | }; | ||
30 | |||
31 | struct init_timer_opts { | ||
32 | int (*init)(char *override); | ||
33 | struct timer_opts *opts; | ||
34 | }; | ||
35 | |||
36 | #define TICK_SIZE (tick_nsec / 1000) | 6 | #define TICK_SIZE (tick_nsec / 1000) |
37 | |||
38 | extern struct timer_opts* __init select_timer(void); | ||
39 | extern void clock_fallback(void); | ||
40 | void setup_pit_timer(void); | 7 | void setup_pit_timer(void); |
41 | |||
42 | /* Modifiers for buggy PIT handling */ | 8 | /* Modifiers for buggy PIT handling */ |
43 | |||
44 | extern int pit_latch_buggy; | 9 | extern int pit_latch_buggy; |
45 | |||
46 | extern struct timer_opts *cur_timer; | ||
47 | extern int timer_ack; | 10 | extern int timer_ack; |
48 | |||
49 | /* list of externed timers */ | ||
50 | extern struct timer_opts timer_none; | ||
51 | extern struct timer_opts timer_pit; | ||
52 | extern struct init_timer_opts timer_pit_init; | ||
53 | extern struct init_timer_opts timer_tsc_init; | ||
54 | #ifdef CONFIG_X86_CYCLONE_TIMER | ||
55 | extern struct init_timer_opts timer_cyclone_init; | ||
56 | #endif | ||
57 | |||
58 | extern unsigned long calibrate_tsc(void); | ||
59 | extern unsigned long read_timer_tsc(void); | ||
60 | extern void init_cpu_khz(void); | ||
61 | extern int recalibrate_cpu_khz(void); | 11 | extern int recalibrate_cpu_khz(void); |
62 | #ifdef CONFIG_HPET_TIMER | ||
63 | extern struct init_timer_opts timer_hpet_init; | ||
64 | extern unsigned long calibrate_tsc_hpet(unsigned long *tsc_hpet_quotient_ptr); | ||
65 | #endif | ||
66 | 12 | ||
67 | #ifdef CONFIG_X86_PM_TIMER | ||
68 | extern struct init_timer_opts timer_pmtmr_init; | ||
69 | #endif | ||
70 | #endif | 13 | #endif |
diff --git a/include/asm-i386/timex.h b/include/asm-i386/timex.h index d434984303..3666044409 100644 --- a/include/asm-i386/timex.h +++ b/include/asm-i386/timex.h | |||
@@ -7,6 +7,7 @@ | |||
7 | #define _ASMi386_TIMEX_H | 7 | #define _ASMi386_TIMEX_H |
8 | 8 | ||
9 | #include <asm/processor.h> | 9 | #include <asm/processor.h> |
10 | #include <asm/tsc.h> | ||
10 | 11 | ||
11 | #ifdef CONFIG_X86_ELAN | 12 | #ifdef CONFIG_X86_ELAN |
12 | # define CLOCK_TICK_RATE 1189200 /* AMD Elan has different frequency! */ | 13 | # define CLOCK_TICK_RATE 1189200 /* AMD Elan has different frequency! */ |
@@ -15,39 +16,6 @@ | |||
15 | #endif | 16 | #endif |
16 | 17 | ||
17 | 18 | ||
18 | /* | ||
19 | * Standard way to access the cycle counter on i586+ CPUs. | ||
20 | * Currently only used on SMP. | ||
21 | * | ||
22 | * If you really have a SMP machine with i486 chips or older, | ||
23 | * compile for that, and this will just always return zero. | ||
24 | * That's ok, it just means that the nicer scheduling heuristics | ||
25 | * won't work for you. | ||
26 | * | ||
27 | * We only use the low 32 bits, and we'd simply better make sure | ||
28 | * that we reschedule before that wraps. Scheduling at least every | ||
29 | * four billion cycles just basically sounds like a good idea, | ||
30 | * regardless of how fast the machine is. | ||
31 | */ | ||
32 | typedef unsigned long long cycles_t; | ||
33 | |||
34 | static inline cycles_t get_cycles (void) | ||
35 | { | ||
36 | unsigned long long ret=0; | ||
37 | |||
38 | #ifndef CONFIG_X86_TSC | ||
39 | if (!cpu_has_tsc) | ||
40 | return 0; | ||
41 | #endif | ||
42 | |||
43 | #if defined(CONFIG_X86_GENERIC) || defined(CONFIG_X86_TSC) | ||
44 | rdtscll(ret); | ||
45 | #endif | ||
46 | return ret; | ||
47 | } | ||
48 | |||
49 | extern unsigned int cpu_khz; | ||
50 | |||
51 | extern int read_current_timer(unsigned long *timer_value); | 19 | extern int read_current_timer(unsigned long *timer_value); |
52 | #define ARCH_HAS_READ_CURRENT_TIMER 1 | 20 | #define ARCH_HAS_READ_CURRENT_TIMER 1 |
53 | 21 | ||
diff --git a/include/asm-i386/topology.h b/include/asm-i386/topology.h index b94e5eeef9..6adbd9b1ae 100644 --- a/include/asm-i386/topology.h +++ b/include/asm-i386/topology.h | |||
@@ -28,10 +28,8 @@ | |||
28 | #define _ASM_I386_TOPOLOGY_H | 28 | #define _ASM_I386_TOPOLOGY_H |
29 | 29 | ||
30 | #ifdef CONFIG_X86_HT | 30 | #ifdef CONFIG_X86_HT |
31 | #define topology_physical_package_id(cpu) \ | 31 | #define topology_physical_package_id(cpu) (cpu_data[cpu].phys_proc_id) |
32 | (phys_proc_id[cpu] == BAD_APICID ? -1 : phys_proc_id[cpu]) | 32 | #define topology_core_id(cpu) (cpu_data[cpu].cpu_core_id) |
33 | #define topology_core_id(cpu) \ | ||
34 | (cpu_core_id[cpu] == BAD_APICID ? 0 : cpu_core_id[cpu]) | ||
35 | #define topology_core_siblings(cpu) (cpu_core_map[cpu]) | 33 | #define topology_core_siblings(cpu) (cpu_core_map[cpu]) |
36 | #define topology_thread_siblings(cpu) (cpu_sibling_map[cpu]) | 34 | #define topology_thread_siblings(cpu) (cpu_sibling_map[cpu]) |
37 | #endif | 35 | #endif |
@@ -114,4 +112,9 @@ extern unsigned long node_remap_size[]; | |||
114 | 112 | ||
115 | extern cpumask_t cpu_coregroup_map(int cpu); | 113 | extern cpumask_t cpu_coregroup_map(int cpu); |
116 | 114 | ||
115 | #ifdef CONFIG_SMP | ||
116 | #define mc_capable() (boot_cpu_data.x86_max_cores > 1) | ||
117 | #define smt_capable() (smp_num_siblings > 1) | ||
118 | #endif | ||
119 | |||
117 | #endif /* _ASM_I386_TOPOLOGY_H */ | 120 | #endif /* _ASM_I386_TOPOLOGY_H */ |
diff --git a/include/asm-i386/tsc.h b/include/asm-i386/tsc.h new file mode 100644 index 0000000000..97b828ce31 --- /dev/null +++ b/include/asm-i386/tsc.h | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * linux/include/asm-i386/tsc.h | ||
3 | * | ||
4 | * i386 TSC related functions | ||
5 | */ | ||
6 | #ifndef _ASM_i386_TSC_H | ||
7 | #define _ASM_i386_TSC_H | ||
8 | |||
9 | #include <linux/config.h> | ||
10 | #include <asm/processor.h> | ||
11 | |||
12 | /* | ||
13 | * Standard way to access the cycle counter on i586+ CPUs. | ||
14 | * Currently only used on SMP. | ||
15 | * | ||
16 | * If you really have a SMP machine with i486 chips or older, | ||
17 | * compile for that, and this will just always return zero. | ||
18 | * That's ok, it just means that the nicer scheduling heuristics | ||
19 | * won't work for you. | ||
20 | * | ||
21 | * We only use the low 32 bits, and we'd simply better make sure | ||
22 | * that we reschedule before that wraps. Scheduling at least every | ||
23 | * four billion cycles just basically sounds like a good idea, | ||
24 | * regardless of how fast the machine is. | ||
25 | */ | ||
26 | typedef unsigned long long cycles_t; | ||
27 | |||
28 | extern unsigned int cpu_khz; | ||
29 | extern unsigned int tsc_khz; | ||
30 | |||
31 | static inline cycles_t get_cycles(void) | ||
32 | { | ||
33 | unsigned long long ret = 0; | ||
34 | |||
35 | #ifndef CONFIG_X86_TSC | ||
36 | if (!cpu_has_tsc) | ||
37 | return 0; | ||
38 | #endif | ||
39 | |||
40 | #if defined(CONFIG_X86_GENERIC) || defined(CONFIG_X86_TSC) | ||
41 | rdtscll(ret); | ||
42 | #endif | ||
43 | return ret; | ||
44 | } | ||
45 | |||
46 | extern void tsc_init(void); | ||
47 | extern void mark_tsc_unstable(void); | ||
48 | |||
49 | #endif | ||
diff --git a/include/asm-i386/unwind.h b/include/asm-i386/unwind.h new file mode 100644 index 0000000000..69f0f1df67 --- /dev/null +++ b/include/asm-i386/unwind.h | |||
@@ -0,0 +1,98 @@ | |||
1 | #ifndef _ASM_I386_UNWIND_H | ||
2 | #define _ASM_I386_UNWIND_H | ||
3 | |||
4 | /* | ||
5 | * Copyright (C) 2002-2006 Novell, Inc. | ||
6 | * Jan Beulich <jbeulich@novell.com> | ||
7 | * This code is released under version 2 of the GNU GPL. | ||
8 | */ | ||
9 | |||
10 | #ifdef CONFIG_STACK_UNWIND | ||
11 | |||
12 | #include <linux/sched.h> | ||
13 | #include <asm/fixmap.h> | ||
14 | #include <asm/ptrace.h> | ||
15 | #include <asm/uaccess.h> | ||
16 | |||
17 | struct unwind_frame_info | ||
18 | { | ||
19 | struct pt_regs regs; | ||
20 | struct task_struct *task; | ||
21 | }; | ||
22 | |||
23 | #define UNW_PC(frame) (frame)->regs.eip | ||
24 | #define UNW_SP(frame) (frame)->regs.esp | ||
25 | #ifdef CONFIG_FRAME_POINTER | ||
26 | #define UNW_FP(frame) (frame)->regs.ebp | ||
27 | #define FRAME_RETADDR_OFFSET 4 | ||
28 | #define FRAME_LINK_OFFSET 0 | ||
29 | #define STACK_BOTTOM(tsk) STACK_LIMIT((tsk)->thread.esp0) | ||
30 | #define STACK_TOP(tsk) ((tsk)->thread.esp0) | ||
31 | #endif | ||
32 | #define STACK_LIMIT(ptr) (((ptr) - 1) & ~(THREAD_SIZE - 1)) | ||
33 | |||
34 | #define UNW_REGISTER_INFO \ | ||
35 | PTREGS_INFO(eax), \ | ||
36 | PTREGS_INFO(ecx), \ | ||
37 | PTREGS_INFO(edx), \ | ||
38 | PTREGS_INFO(ebx), \ | ||
39 | PTREGS_INFO(esp), \ | ||
40 | PTREGS_INFO(ebp), \ | ||
41 | PTREGS_INFO(esi), \ | ||
42 | PTREGS_INFO(edi), \ | ||
43 | PTREGS_INFO(eip) | ||
44 | |||
45 | static inline void arch_unw_init_frame_info(struct unwind_frame_info *info, | ||
46 | /*const*/ struct pt_regs *regs) | ||
47 | { | ||
48 | if (user_mode_vm(regs)) | ||
49 | info->regs = *regs; | ||
50 | else { | ||
51 | memcpy(&info->regs, regs, offsetof(struct pt_regs, esp)); | ||
52 | info->regs.esp = (unsigned long)®s->esp; | ||
53 | info->regs.xss = __KERNEL_DS; | ||
54 | } | ||
55 | } | ||
56 | |||
57 | static inline void arch_unw_init_blocked(struct unwind_frame_info *info) | ||
58 | { | ||
59 | memset(&info->regs, 0, sizeof(info->regs)); | ||
60 | info->regs.eip = info->task->thread.eip; | ||
61 | info->regs.xcs = __KERNEL_CS; | ||
62 | __get_user(info->regs.ebp, (long *)info->task->thread.esp); | ||
63 | info->regs.esp = info->task->thread.esp; | ||
64 | info->regs.xss = __KERNEL_DS; | ||
65 | info->regs.xds = __USER_DS; | ||
66 | info->regs.xes = __USER_DS; | ||
67 | } | ||
68 | |||
69 | extern asmlinkage int arch_unwind_init_running(struct unwind_frame_info *, | ||
70 | asmlinkage int (*callback)(struct unwind_frame_info *, | ||
71 | void *arg), | ||
72 | void *arg); | ||
73 | |||
74 | static inline int arch_unw_user_mode(const struct unwind_frame_info *info) | ||
75 | { | ||
76 | #if 0 /* This can only work when selector register and EFLAGS saves/restores | ||
77 | are properly annotated (and tracked in UNW_REGISTER_INFO). */ | ||
78 | return user_mode_vm(&info->regs); | ||
79 | #else | ||
80 | return info->regs.eip < PAGE_OFFSET | ||
81 | || (info->regs.eip >= __fix_to_virt(FIX_VDSO) | ||
82 | && info->regs.eip < __fix_to_virt(FIX_VDSO) + PAGE_SIZE) | ||
83 | || info->regs.esp < PAGE_OFFSET; | ||
84 | #endif | ||
85 | } | ||
86 | |||
87 | #else | ||
88 | |||
89 | #define UNW_PC(frame) ((void)(frame), 0) | ||
90 | |||
91 | static inline int arch_unw_user_mode(const void *info) | ||
92 | { | ||
93 | return 0; | ||
94 | } | ||
95 | |||
96 | #endif | ||
97 | |||
98 | #endif /* _ASM_I386_UNWIND_H */ | ||
diff --git a/include/asm-ia64/hw_irq.h b/include/asm-ia64/hw_irq.h index ea8b8c407a..27f9df6b91 100644 --- a/include/asm-ia64/hw_irq.h +++ b/include/asm-ia64/hw_irq.h | |||
@@ -97,8 +97,7 @@ extern int reserve_irq_vector (int vector); | |||
97 | extern void ia64_send_ipi (int cpu, int vector, int delivery_mode, int redirect); | 97 | extern void ia64_send_ipi (int cpu, int vector, int delivery_mode, int redirect); |
98 | extern void register_percpu_irq (ia64_vector vec, struct irqaction *action); | 98 | extern void register_percpu_irq (ia64_vector vec, struct irqaction *action); |
99 | 99 | ||
100 | static inline void | 100 | static inline void ia64_resend_irq(unsigned int vector) |
101 | hw_resend_irq (struct hw_interrupt_type *h, unsigned int vector) | ||
102 | { | 101 | { |
103 | platform_send_ipi(smp_processor_id(), vector, IA64_IPI_DM_INT, 0); | 102 | platform_send_ipi(smp_processor_id(), vector, IA64_IPI_DM_INT, 0); |
104 | } | 103 | } |
diff --git a/include/asm-ia64/irq.h b/include/asm-ia64/irq.h index dbe86c0bbc..79479e2c69 100644 --- a/include/asm-ia64/irq.h +++ b/include/asm-ia64/irq.h | |||
@@ -14,11 +14,6 @@ | |||
14 | #define NR_IRQS 256 | 14 | #define NR_IRQS 256 |
15 | #define NR_IRQ_VECTORS NR_IRQS | 15 | #define NR_IRQ_VECTORS NR_IRQS |
16 | 16 | ||
17 | /* | ||
18 | * IRQ line status macro IRQ_PER_CPU is used | ||
19 | */ | ||
20 | #define ARCH_HAS_IRQ_PER_CPU | ||
21 | |||
22 | static __inline__ int | 17 | static __inline__ int |
23 | irq_canonicalize (int irq) | 18 | irq_canonicalize (int irq) |
24 | { | 19 | { |
diff --git a/include/asm-ia64/kdebug.h b/include/asm-ia64/kdebug.h index c195a9ad12..aed7142f9e 100644 --- a/include/asm-ia64/kdebug.h +++ b/include/asm-ia64/kdebug.h | |||
@@ -40,6 +40,8 @@ struct die_args { | |||
40 | 40 | ||
41 | extern int register_die_notifier(struct notifier_block *); | 41 | extern int register_die_notifier(struct notifier_block *); |
42 | extern int unregister_die_notifier(struct notifier_block *); | 42 | extern int unregister_die_notifier(struct notifier_block *); |
43 | extern int register_page_fault_notifier(struct notifier_block *); | ||
44 | extern int unregister_page_fault_notifier(struct notifier_block *); | ||
43 | extern struct atomic_notifier_head ia64die_chain; | 45 | extern struct atomic_notifier_head ia64die_chain; |
44 | 46 | ||
45 | enum die_val { | 47 | enum die_val { |
diff --git a/include/asm-ia64/kprobes.h b/include/asm-ia64/kprobes.h index 8c0fc227f0..2418a787c4 100644 --- a/include/asm-ia64/kprobes.h +++ b/include/asm-ia64/kprobes.h | |||
@@ -82,6 +82,7 @@ struct kprobe_ctlblk { | |||
82 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry | 82 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry |
83 | 83 | ||
84 | #define ARCH_SUPPORTS_KRETPROBES | 84 | #define ARCH_SUPPORTS_KRETPROBES |
85 | #define ARCH_INACTIVE_KPROBE_COUNT 1 | ||
85 | 86 | ||
86 | #define SLOT0_OPCODE_SHIFT (37) | 87 | #define SLOT0_OPCODE_SHIFT (37) |
87 | #define SLOT1_p1_OPCODE_SHIFT (37 - (64-46)) | 88 | #define SLOT1_p1_OPCODE_SHIFT (37 - (64-46)) |
diff --git a/include/asm-ia64/nodedata.h b/include/asm-ia64/nodedata.h index a140310bf8..2fb337b0e9 100644 --- a/include/asm-ia64/nodedata.h +++ b/include/asm-ia64/nodedata.h | |||
@@ -46,6 +46,18 @@ struct ia64_node_data { | |||
46 | */ | 46 | */ |
47 | #define NODE_DATA(nid) (local_node_data->pg_data_ptrs[nid]) | 47 | #define NODE_DATA(nid) (local_node_data->pg_data_ptrs[nid]) |
48 | 48 | ||
49 | /* | ||
50 | * LOCAL_DATA_ADDR - This is to calculate the address of other node's | ||
51 | * "local_node_data" at hot-plug phase. The local_node_data | ||
52 | * is pointed by per_cpu_page. Kernel usually use it for | ||
53 | * just executing cpu. However, when new node is hot-added, | ||
54 | * the addresses of local data for other nodes are necessary | ||
55 | * to update all of them. | ||
56 | */ | ||
57 | #define LOCAL_DATA_ADDR(pgdat) \ | ||
58 | ((struct ia64_node_data *)((u64)(pgdat) + \ | ||
59 | L1_CACHE_ALIGN(sizeof(struct pglist_data)))) | ||
60 | |||
49 | #endif /* CONFIG_NUMA */ | 61 | #endif /* CONFIG_NUMA */ |
50 | 62 | ||
51 | #endif /* _ASM_IA64_NODEDATA_H */ | 63 | #endif /* _ASM_IA64_NODEDATA_H */ |
diff --git a/include/asm-ia64/sn/sn_sal.h b/include/asm-ia64/sn/sn_sal.h index cd490b20d5..bd4452bda3 100644 --- a/include/asm-ia64/sn/sn_sal.h +++ b/include/asm-ia64/sn/sn_sal.h | |||
@@ -85,6 +85,7 @@ | |||
85 | #define SN_SAL_GET_PROM_FEATURE_SET 0x02000065 | 85 | #define SN_SAL_GET_PROM_FEATURE_SET 0x02000065 |
86 | #define SN_SAL_SET_OS_FEATURE_SET 0x02000066 | 86 | #define SN_SAL_SET_OS_FEATURE_SET 0x02000066 |
87 | #define SN_SAL_INJECT_ERROR 0x02000067 | 87 | #define SN_SAL_INJECT_ERROR 0x02000067 |
88 | #define SN_SAL_SET_CPU_NUMBER 0x02000068 | ||
88 | 89 | ||
89 | /* | 90 | /* |
90 | * Service-specific constants | 91 | * Service-specific constants |
@@ -1150,4 +1151,13 @@ sn_inject_error(u64 paddr, u64 *data, u64 *ecc) | |||
1150 | local_irq_restore(irq_flags); | 1151 | local_irq_restore(irq_flags); |
1151 | return ret_stuff.status; | 1152 | return ret_stuff.status; |
1152 | } | 1153 | } |
1154 | |||
1155 | static inline int | ||
1156 | ia64_sn_set_cpu_number(int cpu) | ||
1157 | { | ||
1158 | struct ia64_sal_retval rv; | ||
1159 | |||
1160 | SAL_CALL_NOLOCK(rv, SN_SAL_SET_CPU_NUMBER, cpu, 0, 0, 0, 0, 0, 0); | ||
1161 | return rv.status; | ||
1162 | } | ||
1153 | #endif /* _ASM_IA64_SN_SN_SAL_H */ | 1163 | #endif /* _ASM_IA64_SN_SN_SAL_H */ |
diff --git a/include/asm-ia64/thread_info.h b/include/asm-ia64/thread_info.h index e5392c4d30..8bc9869e57 100644 --- a/include/asm-ia64/thread_info.h +++ b/include/asm-ia64/thread_info.h | |||
@@ -27,6 +27,7 @@ struct thread_info { | |||
27 | __u32 flags; /* thread_info flags (see TIF_*) */ | 27 | __u32 flags; /* thread_info flags (see TIF_*) */ |
28 | __u32 cpu; /* current CPU */ | 28 | __u32 cpu; /* current CPU */ |
29 | __u32 last_cpu; /* Last CPU thread ran on */ | 29 | __u32 last_cpu; /* Last CPU thread ran on */ |
30 | __u32 status; /* Thread synchronous flags */ | ||
30 | mm_segment_t addr_limit; /* user-level address space limit */ | 31 | mm_segment_t addr_limit; /* user-level address space limit */ |
31 | int preempt_count; /* 0=premptable, <0=BUG; will also serve as bh-counter */ | 32 | int preempt_count; /* 0=premptable, <0=BUG; will also serve as bh-counter */ |
32 | struct restart_block restart_block; | 33 | struct restart_block restart_block; |
@@ -103,4 +104,8 @@ struct thread_info { | |||
103 | /* like TIF_ALLWORK_BITS but sans TIF_SYSCALL_TRACE or TIF_SYSCALL_AUDIT */ | 104 | /* like TIF_ALLWORK_BITS but sans TIF_SYSCALL_TRACE or TIF_SYSCALL_AUDIT */ |
104 | #define TIF_WORK_MASK (TIF_ALLWORK_MASK&~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)) | 105 | #define TIF_WORK_MASK (TIF_ALLWORK_MASK&~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)) |
105 | 106 | ||
107 | #define TS_POLLING 1 /* true if in idle loop and not sleeping */ | ||
108 | |||
109 | #define tsk_is_polling(t) ((t)->thread_info->status & TS_POLLING) | ||
110 | |||
106 | #endif /* _ASM_IA64_THREAD_INFO_H */ | 111 | #endif /* _ASM_IA64_THREAD_INFO_H */ |
diff --git a/include/asm-ia64/topology.h b/include/asm-ia64/topology.h index 616b5ed2aa..937c212575 100644 --- a/include/asm-ia64/topology.h +++ b/include/asm-ia64/topology.h | |||
@@ -112,6 +112,7 @@ void build_cpu_to_node_map(void); | |||
112 | #define topology_core_id(cpu) (cpu_data(cpu)->core_id) | 112 | #define topology_core_id(cpu) (cpu_data(cpu)->core_id) |
113 | #define topology_core_siblings(cpu) (cpu_core_map[cpu]) | 113 | #define topology_core_siblings(cpu) (cpu_core_map[cpu]) |
114 | #define topology_thread_siblings(cpu) (cpu_sibling_map[cpu]) | 114 | #define topology_thread_siblings(cpu) (cpu_sibling_map[cpu]) |
115 | #define smt_capable() (smp_num_siblings > 1) | ||
115 | #endif | 116 | #endif |
116 | 117 | ||
117 | #include <asm-generic/topology.h> | 118 | #include <asm-generic/topology.h> |
diff --git a/include/asm-m32r/hw_irq.h b/include/asm-m32r/hw_irq.h index 8d7e9d0e09..7138537cda 100644 --- a/include/asm-m32r/hw_irq.h +++ b/include/asm-m32r/hw_irq.h | |||
@@ -1,9 +1,4 @@ | |||
1 | #ifndef _ASM_M32R_HW_IRQ_H | 1 | #ifndef _ASM_M32R_HW_IRQ_H |
2 | #define _ASM_M32R_HW_IRQ_H | 2 | #define _ASM_M32R_HW_IRQ_H |
3 | 3 | ||
4 | static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) | ||
5 | { | ||
6 | /* Nothing to do */ | ||
7 | } | ||
8 | |||
9 | #endif /* _ASM_M32R_HW_IRQ_H */ | 4 | #endif /* _ASM_M32R_HW_IRQ_H */ |
diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h index 33567e8bfe..66c4742f09 100644 --- a/include/asm-m32r/system.h +++ b/include/asm-m32r/system.h | |||
@@ -318,7 +318,7 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) | |||
318 | * does not enforce ordering, since there is no data dependency between | 318 | * does not enforce ordering, since there is no data dependency between |
319 | * the read of "a" and the read of "b". Therefore, on some CPUs, such | 319 | * the read of "a" and the read of "b". Therefore, on some CPUs, such |
320 | * as Alpha, "y" could be set to 3 and "x" to 0. Use rmb() | 320 | * as Alpha, "y" could be set to 3 and "x" to 0. Use rmb() |
321 | * in cases like thiswhere there are no data dependencies. | 321 | * in cases like this where there are no data dependencies. |
322 | **/ | 322 | **/ |
323 | 323 | ||
324 | #define read_barrier_depends() do { } while (0) | 324 | #define read_barrier_depends() do { } while (0) |
diff --git a/include/asm-m68knommu/bootstd.h b/include/asm-m68knommu/bootstd.h index 3fdc79f06d..bdc1a4ac4f 100644 --- a/include/asm-m68knommu/bootstd.h +++ b/include/asm-m68knommu/bootstd.h | |||
@@ -52,7 +52,7 @@ type name(void) \ | |||
52 | __asm__ __volatile__ ("trap #2" \ | 52 | __asm__ __volatile__ ("trap #2" \ |
53 | : "=g" (__res) \ | 53 | : "=g" (__res) \ |
54 | : "0" (__res) \ | 54 | : "0" (__res) \ |
55 | : "%d0"); \ | 55 | ); \ |
56 | __bsc_return(type,__res); \ | 56 | __bsc_return(type,__res); \ |
57 | } | 57 | } |
58 | 58 | ||
@@ -64,7 +64,7 @@ type name(atype a) \ | |||
64 | __asm__ __volatile__ ("trap #2" \ | 64 | __asm__ __volatile__ ("trap #2" \ |
65 | : "=g" (__res) \ | 65 | : "=g" (__res) \ |
66 | : "0" (__res), "d" (__a) \ | 66 | : "0" (__res), "d" (__a) \ |
67 | : "%d0"); \ | 67 | ); \ |
68 | __bsc_return(type,__res); \ | 68 | __bsc_return(type,__res); \ |
69 | } | 69 | } |
70 | 70 | ||
@@ -77,7 +77,7 @@ type name(atype a, btype b) \ | |||
77 | __asm__ __volatile__ ("trap #2" \ | 77 | __asm__ __volatile__ ("trap #2" \ |
78 | : "=g" (__res) \ | 78 | : "=g" (__res) \ |
79 | : "0" (__res), "d" (__a), "d" (__b) \ | 79 | : "0" (__res), "d" (__a), "d" (__b) \ |
80 | : "%d0"); \ | 80 | ); \ |
81 | __bsc_return(type,__res); \ | 81 | __bsc_return(type,__res); \ |
82 | } | 82 | } |
83 | 83 | ||
@@ -92,7 +92,7 @@ type name(atype a, btype b, ctype c) \ | |||
92 | : "=g" (__res) \ | 92 | : "=g" (__res) \ |
93 | : "0" (__res), "d" (__a), "d" (__b), \ | 93 | : "0" (__res), "d" (__a), "d" (__b), \ |
94 | "d" (__c) \ | 94 | "d" (__c) \ |
95 | : "%d0"); \ | 95 | ); \ |
96 | __bsc_return(type,__res); \ | 96 | __bsc_return(type,__res); \ |
97 | } | 97 | } |
98 | 98 | ||
@@ -108,7 +108,7 @@ type name(atype a, btype b, ctype c, dtype d) \ | |||
108 | : "=g" (__res) \ | 108 | : "=g" (__res) \ |
109 | : "0" (__res), "d" (__a), "d" (__b), \ | 109 | : "0" (__res), "d" (__a), "d" (__b), \ |
110 | "d" (__c), "d" (__d) \ | 110 | "d" (__c), "d" (__d) \ |
111 | : "%d0"); \ | 111 | ); \ |
112 | __bsc_return(type,__res); \ | 112 | __bsc_return(type,__res); \ |
113 | } | 113 | } |
114 | 114 | ||
@@ -125,7 +125,7 @@ type name(atype a, btype b, ctype c, dtype d, etype e) \ | |||
125 | : "=g" (__res) \ | 125 | : "=g" (__res) \ |
126 | : "0" (__res), "d" (__a), "d" (__b), \ | 126 | : "0" (__res), "d" (__a), "d" (__b), \ |
127 | "d" (__c), "d" (__d), "d" (__e) \ | 127 | "d" (__c), "d" (__d), "d" (__e) \ |
128 | : "%d0"); \ | 128 | ); \ |
129 | __bsc_return(type,__res); \ | 129 | __bsc_return(type,__res); \ |
130 | } | 130 | } |
131 | 131 | ||
diff --git a/include/asm-m68knommu/cacheflush.h b/include/asm-m68knommu/cacheflush.h index 49925e91e8..c3aadf3b0d 100644 --- a/include/asm-m68knommu/cacheflush.h +++ b/include/asm-m68knommu/cacheflush.h | |||
@@ -57,13 +57,13 @@ static inline void __flush_cache_all(void) | |||
57 | "nop\n\t" | 57 | "nop\n\t" |
58 | : : : "d0" ); | 58 | : : : "d0" ); |
59 | #endif /* CONFIG_M527x || CONFIG_M528x */ | 59 | #endif /* CONFIG_M527x || CONFIG_M528x */ |
60 | #ifdef CONFIG_M5272 | 60 | #if defined(CONFIG_M5206) || defined(CONFIG_M5206e) || defined(CONFIG_M5272) |
61 | __asm__ __volatile__ ( | 61 | __asm__ __volatile__ ( |
62 | "movel #0x01000000, %%d0\n\t" | 62 | "movel #0x81000100, %%d0\n\t" |
63 | "movec %%d0, %%CACR\n\t" | 63 | "movec %%d0, %%CACR\n\t" |
64 | "nop\n\t" | 64 | "nop\n\t" |
65 | : : : "d0" ); | 65 | : : : "d0" ); |
66 | #endif /* CONFIG_M5272 */ | 66 | #endif /* CONFIG_M5206 || CONFIG_M5206e || CONFIG_M5272 */ |
67 | #ifdef CONFIG_M5249 | 67 | #ifdef CONFIG_M5249 |
68 | __asm__ __volatile__ ( | 68 | __asm__ __volatile__ ( |
69 | "movel #0xa1000200, %%d0\n\t" | 69 | "movel #0xa1000200, %%d0\n\t" |
@@ -71,6 +71,13 @@ static inline void __flush_cache_all(void) | |||
71 | "nop\n\t" | 71 | "nop\n\t" |
72 | : : : "d0" ); | 72 | : : : "d0" ); |
73 | #endif /* CONFIG_M5249 */ | 73 | #endif /* CONFIG_M5249 */ |
74 | #ifdef CONFIG_M532x | ||
75 | __asm__ __volatile__ ( | ||
76 | "movel #0x81000200, %%d0\n\t" | ||
77 | "movec %%d0, %%CACR\n\t" | ||
78 | "nop\n\t" | ||
79 | : : : "d0" ); | ||
80 | #endif /* CONFIG_M532x */ | ||
74 | } | 81 | } |
75 | 82 | ||
76 | #endif /* _M68KNOMMU_CACHEFLUSH_H */ | 83 | #endif /* _M68KNOMMU_CACHEFLUSH_H */ |
diff --git a/include/asm-m68knommu/coldfire.h b/include/asm-m68knommu/coldfire.h index 2fabca91df..83a9fa4e61 100644 --- a/include/asm-m68knommu/coldfire.h +++ b/include/asm-m68knommu/coldfire.h | |||
@@ -3,7 +3,7 @@ | |||
3 | /* | 3 | /* |
4 | * coldfire.h -- Motorola ColdFire CPU sepecific defines | 4 | * coldfire.h -- Motorola ColdFire CPU sepecific defines |
5 | * | 5 | * |
6 | * (C) Copyright 1999-2002, Greg Ungerer (gerg@snapgear.com) | 6 | * (C) Copyright 1999-2006, Greg Ungerer (gerg@snapgear.com) |
7 | * (C) Copyright 2000, Lineo (www.lineo.com) | 7 | * (C) Copyright 2000, Lineo (www.lineo.com) |
8 | */ | 8 | */ |
9 | 9 | ||
@@ -14,6 +14,19 @@ | |||
14 | 14 | ||
15 | 15 | ||
16 | /* | 16 | /* |
17 | * Define master clock frequency. This is essentially done at config | ||
18 | * time now. No point enumerating dozens of possible clock options | ||
19 | * here. Also the peripheral clock (bus clock) divide ratio is set | ||
20 | * at config time too. | ||
21 | */ | ||
22 | #ifdef CONFIG_CLOCK_SET | ||
23 | #define MCF_CLK CONFIG_CLOCK_FREQ | ||
24 | #define MCF_BUSCLK (CONFIG_CLOCK_FREQ / CONFIG_CLOCK_DIV) | ||
25 | #else | ||
26 | #error "Don't know what your ColdFire CPU clock frequency is??" | ||
27 | #endif | ||
28 | |||
29 | /* | ||
17 | * Define the processor support peripherals base address. | 30 | * Define the processor support peripherals base address. |
18 | * This is generally setup by the boards start up code. | 31 | * This is generally setup by the boards start up code. |
19 | */ | 32 | */ |
@@ -29,64 +42,9 @@ | |||
29 | defined(CONFIG_M520x) | 42 | defined(CONFIG_M520x) |
30 | #undef MCF_MBAR | 43 | #undef MCF_MBAR |
31 | #define MCF_MBAR MCF_IPSBAR | 44 | #define MCF_MBAR MCF_IPSBAR |
32 | #endif | 45 | #elif defined(CONFIG_M532x) |
33 | 46 | #undef MCF_MBAR | |
34 | /* | 47 | #define MCF_MBAR 0x00000000 |
35 | * Define master clock frequency. | ||
36 | */ | ||
37 | #if defined(CONFIG_CLOCK_11MHz) | ||
38 | #define MCF_CLK 11289600 | ||
39 | #elif defined(CONFIG_CLOCK_16MHz) | ||
40 | #define MCF_CLK 16000000 | ||
41 | #elif defined(CONFIG_CLOCK_20MHz) | ||
42 | #define MCF_CLK 20000000 | ||
43 | #elif defined(CONFIG_CLOCK_24MHz) | ||
44 | #define MCF_CLK 24000000 | ||
45 | #elif defined(CONFIG_CLOCK_25MHz) | ||
46 | #define MCF_CLK 25000000 | ||
47 | #elif defined(CONFIG_CLOCK_33MHz) | ||
48 | #define MCF_CLK 33000000 | ||
49 | #elif defined(CONFIG_CLOCK_40MHz) | ||
50 | #define MCF_CLK 40000000 | ||
51 | #elif defined(CONFIG_CLOCK_45MHz) | ||
52 | #define MCF_CLK 45000000 | ||
53 | #elif defined(CONFIG_CLOCK_48MHz) | ||
54 | #define MCF_CLK 48000000 | ||
55 | #elif defined(CONFIG_CLOCK_50MHz) | ||
56 | #define MCF_CLK 50000000 | ||
57 | #elif defined(CONFIG_CLOCK_54MHz) | ||
58 | #define MCF_CLK 54000000 | ||
59 | #elif defined(CONFIG_CLOCK_60MHz) | ||
60 | #define MCF_CLK 60000000 | ||
61 | #elif defined(CONFIG_CLOCK_62_5MHz) | ||
62 | #define MCF_CLK 62500000 | ||
63 | #elif defined(CONFIG_CLOCK_64MHz) | ||
64 | #define MCF_CLK 64000000 | ||
65 | #elif defined(CONFIG_CLOCK_66MHz) | ||
66 | #define MCF_CLK 66000000 | ||
67 | #elif defined(CONFIG_CLOCK_70MHz) | ||
68 | #define MCF_CLK 70000000 | ||
69 | #elif defined(CONFIG_CLOCK_100MHz) | ||
70 | #define MCF_CLK 100000000 | ||
71 | #elif defined(CONFIG_CLOCK_140MHz) | ||
72 | #define MCF_CLK 140000000 | ||
73 | #elif defined(CONFIG_CLOCK_150MHz) | ||
74 | #define MCF_CLK 150000000 | ||
75 | #elif defined(CONFIG_CLOCK_166MHz) | ||
76 | #define MCF_CLK 166000000 | ||
77 | #else | ||
78 | #error "Don't know what your ColdFire CPU clock frequency is??" | ||
79 | #endif | ||
80 | |||
81 | /* | ||
82 | * One some ColdFire family members the bus clock (used by internal | ||
83 | * peripherals) is not the same as the CPU clock. | ||
84 | */ | ||
85 | #if defined(CONFIG_M523x) || defined(CONFIG_M5249) || defined(CONFIG_M527x) || \ | ||
86 | defined(CONFIG_M520x) | ||
87 | #define MCF_BUSCLK (MCF_CLK / 2) | ||
88 | #else | ||
89 | #define MCF_BUSCLK MCF_CLK | ||
90 | #endif | 48 | #endif |
91 | 49 | ||
92 | /****************************************************************************/ | 50 | /****************************************************************************/ |
diff --git a/include/asm-m68knommu/irq.h b/include/asm-m68knommu/irq.h index c5247516fc..53557274ee 100644 --- a/include/asm-m68knommu/irq.h +++ b/include/asm-m68knommu/irq.h | |||
@@ -83,7 +83,7 @@ extern void (*mach_disable_irq)(unsigned int); | |||
83 | /* | 83 | /* |
84 | * Some drivers want these entry points | 84 | * Some drivers want these entry points |
85 | */ | 85 | */ |
86 | #define enable_irq(x) 0 | 86 | #define enable_irq(x) do { } while (0) |
87 | #define disable_irq(x) do { } while (0) | 87 | #define disable_irq(x) do { } while (0) |
88 | #define disable_irq_nosync(x) disable_irq(x) | 88 | #define disable_irq_nosync(x) disable_irq(x) |
89 | 89 | ||
diff --git a/include/asm-m68knommu/m5249sim.h b/include/asm-m68knommu/m5249sim.h index 9344f529bd..399814f0b2 100644 --- a/include/asm-m68knommu/m5249sim.h +++ b/include/asm-m68knommu/m5249sim.h | |||
@@ -157,7 +157,7 @@ | |||
157 | movel %d0,0x180(%a1) /* set PLL register */ | 157 | movel %d0,0x180(%a1) /* set PLL register */ |
158 | nop | 158 | nop |
159 | 159 | ||
160 | #ifdef CONFIG_CLOCK_140MHz | 160 | #if CONFIG_CLOCK_FREQ == 140000000 |
161 | /* | 161 | /* |
162 | * Set initial clock frequency. This assumes M5249C3 board | 162 | * Set initial clock frequency. This assumes M5249C3 board |
163 | * is fitted with 11.2896MHz crystal. It will program the | 163 | * is fitted with 11.2896MHz crystal. It will program the |
diff --git a/include/asm-m68knommu/m532xsim.h b/include/asm-m68knommu/m532xsim.h new file mode 100644 index 0000000000..1835fd20a8 --- /dev/null +++ b/include/asm-m68knommu/m532xsim.h | |||
@@ -0,0 +1,2238 @@ | |||
1 | /****************************************************************************/ | ||
2 | |||
3 | /* | ||
4 | * m532xsim.h -- ColdFire 5329 registers | ||
5 | */ | ||
6 | |||
7 | /****************************************************************************/ | ||
8 | #ifndef m532xsim_h | ||
9 | #define m532xsim_h | ||
10 | /****************************************************************************/ | ||
11 | |||
12 | #define MCF_REG32(x) (*(volatile unsigned long *)(x)) | ||
13 | #define MCF_REG16(x) (*(volatile unsigned short *)(x)) | ||
14 | #define MCF_REG08(x) (*(volatile unsigned char *)(x)) | ||
15 | |||
16 | #define MCFINT_VECBASE 64 | ||
17 | #define MCFINT_UART0 26 /* Interrupt number for UART0 */ | ||
18 | #define MCFINT_UART1 27 /* Interrupt number for UART1 */ | ||
19 | |||
20 | #define MCF_WTM_WCR MCF_REG16(0xFC098000) | ||
21 | |||
22 | /* | ||
23 | * Define the 532x SIM register set addresses. | ||
24 | */ | ||
25 | #define MCFSIM_IPRL 0xFC048004 | ||
26 | #define MCFSIM_IPRH 0xFC048000 | ||
27 | #define MCFSIM_IPR MCFSIM_IPRL | ||
28 | #define MCFSIM_IMRL 0xFC04800C | ||
29 | #define MCFSIM_IMRH 0xFC048008 | ||
30 | #define MCFSIM_IMR MCFSIM_IMRL | ||
31 | #define MCFSIM_ICR0 0xFC048040 | ||
32 | #define MCFSIM_ICR1 0xFC048041 | ||
33 | #define MCFSIM_ICR2 0xFC048042 | ||
34 | #define MCFSIM_ICR3 0xFC048043 | ||
35 | #define MCFSIM_ICR4 0xFC048044 | ||
36 | #define MCFSIM_ICR5 0xFC048045 | ||
37 | #define MCFSIM_ICR6 0xFC048046 | ||
38 | #define MCFSIM_ICR7 0xFC048047 | ||
39 | #define MCFSIM_ICR8 0xFC048048 | ||
40 | #define MCFSIM_ICR9 0xFC048049 | ||
41 | #define MCFSIM_ICR10 0xFC04804A | ||
42 | #define MCFSIM_ICR11 0xFC04804B | ||
43 | |||
44 | /* | ||
45 | * Some symbol defines for the above... | ||
46 | */ | ||
47 | #define MCFSIM_SWDICR MCFSIM_ICR0 /* Watchdog timer ICR */ | ||
48 | #define MCFSIM_TIMER1ICR MCFSIM_ICR1 /* Timer 1 ICR */ | ||
49 | #define MCFSIM_TIMER2ICR MCFSIM_ICR2 /* Timer 2 ICR */ | ||
50 | #define MCFSIM_UART1ICR MCFSIM_ICR4 /* UART 1 ICR */ | ||
51 | #define MCFSIM_UART2ICR MCFSIM_ICR5 /* UART 2 ICR */ | ||
52 | #define MCFSIM_DMA0ICR MCFSIM_ICR6 /* DMA 0 ICR */ | ||
53 | #define MCFSIM_DMA1ICR MCFSIM_ICR7 /* DMA 1 ICR */ | ||
54 | #define MCFSIM_DMA2ICR MCFSIM_ICR8 /* DMA 2 ICR */ | ||
55 | #define MCFSIM_DMA3ICR MCFSIM_ICR9 /* DMA 3 ICR */ | ||
56 | |||
57 | |||
58 | #define MCFSIM_IMR_MASKALL 0xFFFFFFFF /* All SIM intr sources */ | ||
59 | |||
60 | #define MCFSIM_IMR_SIMR0 0xFC04801C | ||
61 | #define MCFSIM_IMR_SIMR1 0xFC04C01C | ||
62 | #define MCFSIM_IMR_CIMR0 0xFC04801D | ||
63 | #define MCFSIM_IMR_CIMR1 0xFC04C01D | ||
64 | |||
65 | #define MCFSIM_ICR_TIMER1 (0xFC048040+32) | ||
66 | #define MCFSIM_ICR_TIMER2 (0xFC048040+33) | ||
67 | |||
68 | |||
69 | /* | ||
70 | * Macro to set IMR register. It is 32 bits on the 5307. | ||
71 | */ | ||
72 | #define mcf_getimr() \ | ||
73 | *((volatile unsigned long *) (MCF_MBAR + MCFSIM_IMR)) | ||
74 | |||
75 | #define mcf_setimr(imr) \ | ||
76 | *((volatile unsigned long *) (MCF_MBAR + MCFSIM_IMR)) = (imr); | ||
77 | |||
78 | #define mcf_getipr() \ | ||
79 | *((volatile unsigned long *) (MCF_MBAR + MCFSIM_IPR)) | ||
80 | |||
81 | #define mcf_getiprl() \ | ||
82 | *((volatile unsigned long *) (MCF_MBAR + MCFSIM_IPRL)) | ||
83 | |||
84 | #define mcf_getiprh() \ | ||
85 | *((volatile unsigned long *) (MCF_MBAR + MCFSIM_IPRH)) | ||
86 | |||
87 | |||
88 | #define mcf_enable_irq0(irq) \ | ||
89 | *((volatile unsigned char*) (MCFSIM_IMR_CIMR0)) = (irq); | ||
90 | |||
91 | #define mcf_enable_irq1(irq) \ | ||
92 | *((volatile unsigned char*) (MCFSIM_IMR_CIMR1)) = (irq); | ||
93 | |||
94 | #define mcf_disable_irq0(irq) \ | ||
95 | *((volatile unsigned char*) (MCFSIM_IMR_SIMR0)) = (irq); | ||
96 | |||
97 | #define mcf_disable_irq1(irq) \ | ||
98 | *((volatile unsigned char*) (MCFSIM_IMR_SIMR1)) = (irq); | ||
99 | |||
100 | /* | ||
101 | * Define the Cache register flags. | ||
102 | */ | ||
103 | #define CACR_EC (1<<31) | ||
104 | #define CACR_ESB (1<<29) | ||
105 | #define CACR_DPI (1<<28) | ||
106 | #define CACR_HLCK (1<<27) | ||
107 | #define CACR_CINVA (1<<24) | ||
108 | #define CACR_DNFB (1<<10) | ||
109 | #define CACR_DCM_WTHRU (0<<8) | ||
110 | #define CACR_DCM_WBACK (1<<8) | ||
111 | #define CACR_DCM_OFF_PRE (2<<8) | ||
112 | #define CACR_DCM_OFF_IMP (3<<8) | ||
113 | #define CACR_DW (1<<5) | ||
114 | |||
115 | #define ACR_BASE_POS 24 | ||
116 | #define ACR_MASK_POS 16 | ||
117 | #define ACR_ENABLE (1<<15) | ||
118 | #define ACR_USER (0<<13) | ||
119 | #define ACR_SUPER (1<<13) | ||
120 | #define ACR_ANY (2<<13) | ||
121 | #define ACR_CM_WTHRU (0<<5) | ||
122 | #define ACR_CM_WBACK (1<<5) | ||
123 | #define ACR_CM_OFF_PRE (2<<5) | ||
124 | #define ACR_CM_OFF_IMP (3<<5) | ||
125 | #define ACR_WPROTECT (1<<2) | ||
126 | |||
127 | /********************************************************************* | ||
128 | * | ||
129 | * Inter-IC (I2C) Module | ||
130 | * | ||
131 | *********************************************************************/ | ||
132 | |||
133 | /* Read/Write access macros for general use */ | ||
134 | #define MCF532x_I2C_I2ADR (volatile u8 *) (0xFC058000) // Address | ||
135 | #define MCF532x_I2C_I2FDR (volatile u8 *) (0xFC058004) // Freq Divider | ||
136 | #define MCF532x_I2C_I2CR (volatile u8 *) (0xFC058008) // Control | ||
137 | #define MCF532x_I2C_I2SR (volatile u8 *) (0xFC05800C) // Status | ||
138 | #define MCF532x_I2C_I2DR (volatile u8 *) (0xFC058010) // Data I/O | ||
139 | |||
140 | /* Bit level definitions and macros */ | ||
141 | #define MCF532x_I2C_I2ADR_ADDR(x) (((x)&0x7F)<<0x01) | ||
142 | |||
143 | #define MCF532x_I2C_I2FDR_IC(x) (((x)&0x3F)) | ||
144 | |||
145 | #define MCF532x_I2C_I2CR_IEN (0x80) // I2C enable | ||
146 | #define MCF532x_I2C_I2CR_IIEN (0x40) // interrupt enable | ||
147 | #define MCF532x_I2C_I2CR_MSTA (0x20) // master/slave mode | ||
148 | #define MCF532x_I2C_I2CR_MTX (0x10) // transmit/receive mode | ||
149 | #define MCF532x_I2C_I2CR_TXAK (0x08) // transmit acknowledge enable | ||
150 | #define MCF532x_I2C_I2CR_RSTA (0x04) // repeat start | ||
151 | |||
152 | #define MCF532x_I2C_I2SR_ICF (0x80) // data transfer bit | ||
153 | #define MCF532x_I2C_I2SR_IAAS (0x40) // I2C addressed as a slave | ||
154 | #define MCF532x_I2C_I2SR_IBB (0x20) // I2C bus busy | ||
155 | #define MCF532x_I2C_I2SR_IAL (0x10) // aribitration lost | ||
156 | #define MCF532x_I2C_I2SR_SRW (0x04) // slave read/write | ||
157 | #define MCF532x_I2C_I2SR_IIF (0x02) // I2C interrupt | ||
158 | #define MCF532x_I2C_I2SR_RXAK (0x01) // received acknowledge | ||
159 | |||
160 | #define MCF532x_PAR_FECI2C (volatile u8 *) (0xFC0A4053) | ||
161 | |||
162 | |||
163 | /* | ||
164 | * The M5329EVB board needs a help getting its devices initialized | ||
165 | * at kernel start time if dBUG doesn't set it up (for example | ||
166 | * it is not used), so we need to do it manually. | ||
167 | */ | ||
168 | #ifdef __ASSEMBLER__ | ||
169 | .macro m5329EVB_setup | ||
170 | movel #0xFC098000, %a7 | ||
171 | movel #0x0, (%a7) | ||
172 | #define CORE_SRAM 0x80000000 | ||
173 | #define CORE_SRAM_SIZE 0x8000 | ||
174 | movel #CORE_SRAM, %d0 | ||
175 | addl #0x221, %d0 | ||
176 | movec %d0,%RAMBAR1 | ||
177 | movel #CORE_SRAM, %sp | ||
178 | addl #CORE_SRAM_SIZE, %sp | ||
179 | jsr sysinit | ||
180 | .endm | ||
181 | #define PLATFORM_SETUP m5329EVB_setup | ||
182 | |||
183 | #endif /* __ASSEMBLER__ */ | ||
184 | |||
185 | /********************************************************************* | ||
186 | * | ||
187 | * Chip Configuration Module (CCM) | ||
188 | * | ||
189 | *********************************************************************/ | ||
190 | |||
191 | /* Register read/write macros */ | ||
192 | #define MCF_CCM_CCR MCF_REG16(0xFC0A0004) | ||
193 | #define MCF_CCM_RCON MCF_REG16(0xFC0A0008) | ||
194 | #define MCF_CCM_CIR MCF_REG16(0xFC0A000A) | ||
195 | #define MCF_CCM_MISCCR MCF_REG16(0xFC0A0010) | ||
196 | #define MCF_CCM_CDR MCF_REG16(0xFC0A0012) | ||
197 | #define MCF_CCM_UHCSR MCF_REG16(0xFC0A0014) | ||
198 | #define MCF_CCM_UOCSR MCF_REG16(0xFC0A0016) | ||
199 | |||
200 | /* Bit definitions and macros for MCF_CCM_CCR */ | ||
201 | #define MCF_CCM_CCR_RESERVED (0x0001) | ||
202 | #define MCF_CCM_CCR_PLL_MODE (0x0003) | ||
203 | #define MCF_CCM_CCR_OSC_MODE (0x0005) | ||
204 | #define MCF_CCM_CCR_BOOTPS(x) (((x)&0x0003)<<3|0x0001) | ||
205 | #define MCF_CCM_CCR_LOAD (0x0021) | ||
206 | #define MCF_CCM_CCR_LIMP (0x0041) | ||
207 | #define MCF_CCM_CCR_CSC(x) (((x)&0x0003)<<8|0x0001) | ||
208 | |||
209 | /* Bit definitions and macros for MCF_CCM_RCON */ | ||
210 | #define MCF_CCM_RCON_RESERVED (0x0001) | ||
211 | #define MCF_CCM_RCON_PLL_MODE (0x0003) | ||
212 | #define MCF_CCM_RCON_OSC_MODE (0x0005) | ||
213 | #define MCF_CCM_RCON_BOOTPS(x) (((x)&0x0003)<<3|0x0001) | ||
214 | #define MCF_CCM_RCON_LOAD (0x0021) | ||
215 | #define MCF_CCM_RCON_LIMP (0x0041) | ||
216 | #define MCF_CCM_RCON_CSC(x) (((x)&0x0003)<<8|0x0001) | ||
217 | |||
218 | /* Bit definitions and macros for MCF_CCM_CIR */ | ||
219 | #define MCF_CCM_CIR_PRN(x) (((x)&0x003F)<<0) | ||
220 | #define MCF_CCM_CIR_PIN(x) (((x)&0x03FF)<<6) | ||
221 | |||
222 | /* Bit definitions and macros for MCF_CCM_MISCCR */ | ||
223 | #define MCF_CCM_MISCCR_USBSRC (0x0001) | ||
224 | #define MCF_CCM_MISCCR_USBDIV (0x0002) | ||
225 | #define MCF_CCM_MISCCR_SSI_SRC (0x0010) | ||
226 | #define MCF_CCM_MISCCR_TIM_DMA (0x0020) | ||
227 | #define MCF_CCM_MISCCR_SSI_PUS (0x0040) | ||
228 | #define MCF_CCM_MISCCR_SSI_PUE (0x0080) | ||
229 | #define MCF_CCM_MISCCR_LCD_CHEN (0x0100) | ||
230 | #define MCF_CCM_MISCCR_LIMP (0x1000) | ||
231 | #define MCF_CCM_MISCCR_PLL_LOCK (0x2000) | ||
232 | |||
233 | /* Bit definitions and macros for MCF_CCM_CDR */ | ||
234 | #define MCF_CCM_CDR_SSIDIV(x) (((x)&0x000F)<<0) | ||
235 | #define MCF_CCM_CDR_LPDIV(x) (((x)&0x000F)<<8) | ||
236 | |||
237 | /* Bit definitions and macros for MCF_CCM_UHCSR */ | ||
238 | #define MCF_CCM_UHCSR_XPDE (0x0001) | ||
239 | #define MCF_CCM_UHCSR_UHMIE (0x0002) | ||
240 | #define MCF_CCM_UHCSR_WKUP (0x0004) | ||
241 | #define MCF_CCM_UHCSR_PORTIND(x) (((x)&0x0003)<<14) | ||
242 | |||
243 | /* Bit definitions and macros for MCF_CCM_UOCSR */ | ||
244 | #define MCF_CCM_UOCSR_XPDE (0x0001) | ||
245 | #define MCF_CCM_UOCSR_UOMIE (0x0002) | ||
246 | #define MCF_CCM_UOCSR_WKUP (0x0004) | ||
247 | #define MCF_CCM_UOCSR_PWRFLT (0x0008) | ||
248 | #define MCF_CCM_UOCSR_SEND (0x0010) | ||
249 | #define MCF_CCM_UOCSR_VVLD (0x0020) | ||
250 | #define MCF_CCM_UOCSR_BVLD (0x0040) | ||
251 | #define MCF_CCM_UOCSR_AVLD (0x0080) | ||
252 | #define MCF_CCM_UOCSR_DPPU (0x0100) | ||
253 | #define MCF_CCM_UOCSR_DCR_VBUS (0x0200) | ||
254 | #define MCF_CCM_UOCSR_CRG_VBUS (0x0400) | ||
255 | #define MCF_CCM_UOCSR_DRV_VBUS (0x0800) | ||
256 | #define MCF_CCM_UOCSR_DMPD (0x1000) | ||
257 | #define MCF_CCM_UOCSR_DPPD (0x2000) | ||
258 | #define MCF_CCM_UOCSR_PORTIND(x) (((x)&0x0003)<<14) | ||
259 | |||
260 | /********************************************************************* | ||
261 | * | ||
262 | * DMA Timers (DTIM) | ||
263 | * | ||
264 | *********************************************************************/ | ||
265 | |||
266 | /* Register read/write macros */ | ||
267 | #define MCF_DTIM0_DTMR MCF_REG16(0xFC070000) | ||
268 | #define MCF_DTIM0_DTXMR MCF_REG08(0xFC070002) | ||
269 | #define MCF_DTIM0_DTER MCF_REG08(0xFC070003) | ||
270 | #define MCF_DTIM0_DTRR MCF_REG32(0xFC070004) | ||
271 | #define MCF_DTIM0_DTCR MCF_REG32(0xFC070008) | ||
272 | #define MCF_DTIM0_DTCN MCF_REG32(0xFC07000C) | ||
273 | #define MCF_DTIM1_DTMR MCF_REG16(0xFC074000) | ||
274 | #define MCF_DTIM1_DTXMR MCF_REG08(0xFC074002) | ||
275 | #define MCF_DTIM1_DTER MCF_REG08(0xFC074003) | ||
276 | #define MCF_DTIM1_DTRR MCF_REG32(0xFC074004) | ||
277 | #define MCF_DTIM1_DTCR MCF_REG32(0xFC074008) | ||
278 | #define MCF_DTIM1_DTCN MCF_REG32(0xFC07400C) | ||
279 | #define MCF_DTIM2_DTMR MCF_REG16(0xFC078000) | ||
280 | #define MCF_DTIM2_DTXMR MCF_REG08(0xFC078002) | ||
281 | #define MCF_DTIM2_DTER MCF_REG08(0xFC078003) | ||
282 | #define MCF_DTIM2_DTRR MCF_REG32(0xFC078004) | ||
283 | #define MCF_DTIM2_DTCR MCF_REG32(0xFC078008) | ||
284 | #define MCF_DTIM2_DTCN MCF_REG32(0xFC07800C) | ||
285 | #define MCF_DTIM3_DTMR MCF_REG16(0xFC07C000) | ||
286 | #define MCF_DTIM3_DTXMR MCF_REG08(0xFC07C002) | ||
287 | #define MCF_DTIM3_DTER MCF_REG08(0xFC07C003) | ||
288 | #define MCF_DTIM3_DTRR MCF_REG32(0xFC07C004) | ||
289 | #define MCF_DTIM3_DTCR MCF_REG32(0xFC07C008) | ||
290 | #define MCF_DTIM3_DTCN MCF_REG32(0xFC07C00C) | ||
291 | #define MCF_DTIM_DTMR(x) MCF_REG16(0xFC070000+((x)*0x4000)) | ||
292 | #define MCF_DTIM_DTXMR(x) MCF_REG08(0xFC070002+((x)*0x4000)) | ||
293 | #define MCF_DTIM_DTER(x) MCF_REG08(0xFC070003+((x)*0x4000)) | ||
294 | #define MCF_DTIM_DTRR(x) MCF_REG32(0xFC070004+((x)*0x4000)) | ||
295 | #define MCF_DTIM_DTCR(x) MCF_REG32(0xFC070008+((x)*0x4000)) | ||
296 | #define MCF_DTIM_DTCN(x) MCF_REG32(0xFC07000C+((x)*0x4000)) | ||
297 | |||
298 | /* Bit definitions and macros for MCF_DTIM_DTMR */ | ||
299 | #define MCF_DTIM_DTMR_RST (0x0001) | ||
300 | #define MCF_DTIM_DTMR_CLK(x) (((x)&0x0003)<<1) | ||
301 | #define MCF_DTIM_DTMR_FRR (0x0008) | ||
302 | #define MCF_DTIM_DTMR_ORRI (0x0010) | ||
303 | #define MCF_DTIM_DTMR_OM (0x0020) | ||
304 | #define MCF_DTIM_DTMR_CE(x) (((x)&0x0003)<<6) | ||
305 | #define MCF_DTIM_DTMR_PS(x) (((x)&0x00FF)<<8) | ||
306 | #define MCF_DTIM_DTMR_CE_ANY (0x00C0) | ||
307 | #define MCF_DTIM_DTMR_CE_FALL (0x0080) | ||
308 | #define MCF_DTIM_DTMR_CE_RISE (0x0040) | ||
309 | #define MCF_DTIM_DTMR_CE_NONE (0x0000) | ||
310 | #define MCF_DTIM_DTMR_CLK_DTIN (0x0006) | ||
311 | #define MCF_DTIM_DTMR_CLK_DIV16 (0x0004) | ||
312 | #define MCF_DTIM_DTMR_CLK_DIV1 (0x0002) | ||
313 | #define MCF_DTIM_DTMR_CLK_STOP (0x0000) | ||
314 | |||
315 | /* Bit definitions and macros for MCF_DTIM_DTXMR */ | ||
316 | #define MCF_DTIM_DTXMR_MODE16 (0x01) | ||
317 | #define MCF_DTIM_DTXMR_DMAEN (0x80) | ||
318 | |||
319 | /* Bit definitions and macros for MCF_DTIM_DTER */ | ||
320 | #define MCF_DTIM_DTER_CAP (0x01) | ||
321 | #define MCF_DTIM_DTER_REF (0x02) | ||
322 | |||
323 | /* Bit definitions and macros for MCF_DTIM_DTRR */ | ||
324 | #define MCF_DTIM_DTRR_REF(x) (((x)&0xFFFFFFFF)<<0) | ||
325 | |||
326 | /* Bit definitions and macros for MCF_DTIM_DTCR */ | ||
327 | #define MCF_DTIM_DTCR_CAP(x) (((x)&0xFFFFFFFF)<<0) | ||
328 | |||
329 | /* Bit definitions and macros for MCF_DTIM_DTCN */ | ||
330 | #define MCF_DTIM_DTCN_CNT(x) (((x)&0xFFFFFFFF)<<0) | ||
331 | |||
332 | /********************************************************************* | ||
333 | * | ||
334 | * FlexBus Chip Selects (FBCS) | ||
335 | * | ||
336 | *********************************************************************/ | ||
337 | |||
338 | /* Register read/write macros */ | ||
339 | #define MCF_FBCS0_CSAR MCF_REG32(0xFC008000) | ||
340 | #define MCF_FBCS0_CSMR MCF_REG32(0xFC008004) | ||
341 | #define MCF_FBCS0_CSCR MCF_REG32(0xFC008008) | ||
342 | #define MCF_FBCS1_CSAR MCF_REG32(0xFC00800C) | ||
343 | #define MCF_FBCS1_CSMR MCF_REG32(0xFC008010) | ||
344 | #define MCF_FBCS1_CSCR MCF_REG32(0xFC008014) | ||
345 | #define MCF_FBCS2_CSAR MCF_REG32(0xFC008018) | ||
346 | #define MCF_FBCS2_CSMR MCF_REG32(0xFC00801C) | ||
347 | #define MCF_FBCS2_CSCR MCF_REG32(0xFC008020) | ||
348 | #define MCF_FBCS3_CSAR MCF_REG32(0xFC008024) | ||
349 | #define MCF_FBCS3_CSMR MCF_REG32(0xFC008028) | ||
350 | #define MCF_FBCS3_CSCR MCF_REG32(0xFC00802C) | ||
351 | #define MCF_FBCS4_CSAR MCF_REG32(0xFC008030) | ||
352 | #define MCF_FBCS4_CSMR MCF_REG32(0xFC008034) | ||
353 | #define MCF_FBCS4_CSCR MCF_REG32(0xFC008038) | ||
354 | #define MCF_FBCS5_CSAR MCF_REG32(0xFC00803C) | ||
355 | #define MCF_FBCS5_CSMR MCF_REG32(0xFC008040) | ||
356 | #define MCF_FBCS5_CSCR MCF_REG32(0xFC008044) | ||
357 | #define MCF_FBCS_CSAR(x) MCF_REG32(0xFC008000+((x)*0x00C)) | ||
358 | #define MCF_FBCS_CSMR(x) MCF_REG32(0xFC008004+((x)*0x00C)) | ||
359 | #define MCF_FBCS_CSCR(x) MCF_REG32(0xFC008008+((x)*0x00C)) | ||
360 | |||
361 | /* Bit definitions and macros for MCF_FBCS_CSAR */ | ||
362 | #define MCF_FBCS_CSAR_BA(x) ((x)&0xFFFF0000) | ||
363 | |||
364 | /* Bit definitions and macros for MCF_FBCS_CSMR */ | ||
365 | #define MCF_FBCS_CSMR_V (0x00000001) | ||
366 | #define MCF_FBCS_CSMR_WP (0x00000100) | ||
367 | #define MCF_FBCS_CSMR_BAM(x) (((x)&0x0000FFFF)<<16) | ||
368 | #define MCF_FBCS_CSMR_BAM_4G (0xFFFF0000) | ||
369 | #define MCF_FBCS_CSMR_BAM_2G (0x7FFF0000) | ||
370 | #define MCF_FBCS_CSMR_BAM_1G (0x3FFF0000) | ||
371 | #define MCF_FBCS_CSMR_BAM_1024M (0x3FFF0000) | ||
372 | #define MCF_FBCS_CSMR_BAM_512M (0x1FFF0000) | ||
373 | #define MCF_FBCS_CSMR_BAM_256M (0x0FFF0000) | ||
374 | #define MCF_FBCS_CSMR_BAM_128M (0x07FF0000) | ||
375 | #define MCF_FBCS_CSMR_BAM_64M (0x03FF0000) | ||
376 | #define MCF_FBCS_CSMR_BAM_32M (0x01FF0000) | ||
377 | #define MCF_FBCS_CSMR_BAM_16M (0x00FF0000) | ||
378 | #define MCF_FBCS_CSMR_BAM_8M (0x007F0000) | ||
379 | #define MCF_FBCS_CSMR_BAM_4M (0x003F0000) | ||
380 | #define MCF_FBCS_CSMR_BAM_2M (0x001F0000) | ||
381 | #define MCF_FBCS_CSMR_BAM_1M (0x000F0000) | ||
382 | #define MCF_FBCS_CSMR_BAM_1024K (0x000F0000) | ||
383 | #define MCF_FBCS_CSMR_BAM_512K (0x00070000) | ||
384 | #define MCF_FBCS_CSMR_BAM_256K (0x00030000) | ||
385 | #define MCF_FBCS_CSMR_BAM_128K (0x00010000) | ||
386 | #define MCF_FBCS_CSMR_BAM_64K (0x00000000) | ||
387 | |||
388 | /* Bit definitions and macros for MCF_FBCS_CSCR */ | ||
389 | #define MCF_FBCS_CSCR_BSTW (0x00000008) | ||
390 | #define MCF_FBCS_CSCR_BSTR (0x00000010) | ||
391 | #define MCF_FBCS_CSCR_BEM (0x00000020) | ||
392 | #define MCF_FBCS_CSCR_PS(x) (((x)&0x00000003)<<6) | ||
393 | #define MCF_FBCS_CSCR_AA (0x00000100) | ||
394 | #define MCF_FBCS_CSCR_SBM (0x00000200) | ||
395 | #define MCF_FBCS_CSCR_WS(x) (((x)&0x0000003F)<<10) | ||
396 | #define MCF_FBCS_CSCR_WRAH(x) (((x)&0x00000003)<<16) | ||
397 | #define MCF_FBCS_CSCR_RDAH(x) (((x)&0x00000003)<<18) | ||
398 | #define MCF_FBCS_CSCR_ASET(x) (((x)&0x00000003)<<20) | ||
399 | #define MCF_FBCS_CSCR_SWSEN (0x00800000) | ||
400 | #define MCF_FBCS_CSCR_SWS(x) (((x)&0x0000003F)<<26) | ||
401 | #define MCF_FBCS_CSCR_PS_8 (0x0040) | ||
402 | #define MCF_FBCS_CSCR_PS_16 (0x0080) | ||
403 | #define MCF_FBCS_CSCR_PS_32 (0x0000) | ||
404 | |||
405 | /********************************************************************* | ||
406 | * | ||
407 | * General Purpose I/O (GPIO) | ||
408 | * | ||
409 | *********************************************************************/ | ||
410 | |||
411 | /* Register read/write macros */ | ||
412 | #define MCF_GPIO_PODR_FECH MCF_REG08(0xFC0A4000) | ||
413 | #define MCF_GPIO_PODR_FECL MCF_REG08(0xFC0A4001) | ||
414 | #define MCF_GPIO_PODR_SSI MCF_REG08(0xFC0A4002) | ||
415 | #define MCF_GPIO_PODR_BUSCTL MCF_REG08(0xFC0A4003) | ||
416 | #define MCF_GPIO_PODR_BE MCF_REG08(0xFC0A4004) | ||
417 | #define MCF_GPIO_PODR_CS MCF_REG08(0xFC0A4005) | ||
418 | #define MCF_GPIO_PODR_PWM MCF_REG08(0xFC0A4006) | ||
419 | #define MCF_GPIO_PODR_FECI2C MCF_REG08(0xFC0A4007) | ||
420 | #define MCF_GPIO_PODR_UART MCF_REG08(0xFC0A4009) | ||
421 | #define MCF_GPIO_PODR_QSPI MCF_REG08(0xFC0A400A) | ||
422 | #define MCF_GPIO_PODR_TIMER MCF_REG08(0xFC0A400B) | ||
423 | #define MCF_GPIO_PODR_LCDDATAH MCF_REG08(0xFC0A400D) | ||
424 | #define MCF_GPIO_PODR_LCDDATAM MCF_REG08(0xFC0A400E) | ||
425 | #define MCF_GPIO_PODR_LCDDATAL MCF_REG08(0xFC0A400F) | ||
426 | #define MCF_GPIO_PODR_LCDCTLH MCF_REG08(0xFC0A4010) | ||
427 | #define MCF_GPIO_PODR_LCDCTLL MCF_REG08(0xFC0A4011) | ||
428 | #define MCF_GPIO_PDDR_FECH MCF_REG08(0xFC0A4014) | ||
429 | #define MCF_GPIO_PDDR_FECL MCF_REG08(0xFC0A4015) | ||
430 | #define MCF_GPIO_PDDR_SSI MCF_REG08(0xFC0A4016) | ||
431 | #define MCF_GPIO_PDDR_BUSCTL MCF_REG08(0xFC0A4017) | ||
432 | #define MCF_GPIO_PDDR_BE MCF_REG08(0xFC0A4018) | ||
433 | #define MCF_GPIO_PDDR_CS MCF_REG08(0xFC0A4019) | ||
434 | #define MCF_GPIO_PDDR_PWM MCF_REG08(0xFC0A401A) | ||
435 | #define MCF_GPIO_PDDR_FECI2C MCF_REG08(0xFC0A401B) | ||
436 | #define MCF_GPIO_PDDR_UART MCF_REG08(0xFC0A401C) | ||
437 | #define MCF_GPIO_PDDR_QSPI MCF_REG08(0xFC0A401E) | ||
438 | #define MCF_GPIO_PDDR_TIMER MCF_REG08(0xFC0A401F) | ||
439 | #define MCF_GPIO_PDDR_LCDDATAH MCF_REG08(0xFC0A4021) | ||
440 | #define MCF_GPIO_PDDR_LCDDATAM MCF_REG08(0xFC0A4022) | ||
441 | #define MCF_GPIO_PDDR_LCDDATAL MCF_REG08(0xFC0A4023) | ||
442 | #define MCF_GPIO_PDDR_LCDCTLH MCF_REG08(0xFC0A4024) | ||
443 | #define MCF_GPIO_PDDR_LCDCTLL MCF_REG08(0xFC0A4025) | ||
444 | #define MCF_GPIO_PPDSDR_FECH MCF_REG08(0xFC0A4028) | ||
445 | #define MCF_GPIO_PPDSDR_FECL MCF_REG08(0xFC0A4029) | ||
446 | #define MCF_GPIO_PPDSDR_SSI MCF_REG08(0xFC0A402A) | ||
447 | #define MCF_GPIO_PPDSDR_BUSCTL MCF_REG08(0xFC0A402B) | ||
448 | #define MCF_GPIO_PPDSDR_BE MCF_REG08(0xFC0A402C) | ||
449 | #define MCF_GPIO_PPDSDR_CS MCF_REG08(0xFC0A402D) | ||
450 | #define MCF_GPIO_PPDSDR_PWM MCF_REG08(0xFC0A402E) | ||
451 | #define MCF_GPIO_PPDSDR_FECI2C MCF_REG08(0xFC0A402F) | ||
452 | #define MCF_GPIO_PPDSDR_UART MCF_REG08(0xFC0A4031) | ||
453 | #define MCF_GPIO_PPDSDR_QSPI MCF_REG08(0xFC0A4032) | ||
454 | #define MCF_GPIO_PPDSDR_TIMER MCF_REG08(0xFC0A4033) | ||
455 | #define MCF_GPIO_PPDSDR_LCDDATAH MCF_REG08(0xFC0A4035) | ||
456 | #define MCF_GPIO_PPDSDR_LCDDATAM MCF_REG08(0xFC0A4036) | ||
457 | #define MCF_GPIO_PPDSDR_LCDDATAL MCF_REG08(0xFC0A4037) | ||
458 | #define MCF_GPIO_PPDSDR_LCDCTLH MCF_REG08(0xFC0A4038) | ||
459 | #define MCF_GPIO_PPDSDR_LCDCTLL MCF_REG08(0xFC0A4039) | ||
460 | #define MCF_GPIO_PCLRR_FECH MCF_REG08(0xFC0A403C) | ||
461 | #define MCF_GPIO_PCLRR_FECL MCF_REG08(0xFC0A403D) | ||
462 | #define MCF_GPIO_PCLRR_SSI MCF_REG08(0xFC0A403E) | ||
463 | #define MCF_GPIO_PCLRR_BUSCTL MCF_REG08(0xFC0A403F) | ||
464 | #define MCF_GPIO_PCLRR_BE MCF_REG08(0xFC0A4040) | ||
465 | #define MCF_GPIO_PCLRR_CS MCF_REG08(0xFC0A4041) | ||
466 | #define MCF_GPIO_PCLRR_PWM MCF_REG08(0xFC0A4042) | ||
467 | #define MCF_GPIO_PCLRR_FECI2C MCF_REG08(0xFC0A4043) | ||
468 | #define MCF_GPIO_PCLRR_UART MCF_REG08(0xFC0A4045) | ||
469 | #define MCF_GPIO_PCLRR_QSPI MCF_REG08(0xFC0A4046) | ||
470 | #define MCF_GPIO_PCLRR_TIMER MCF_REG08(0xFC0A4047) | ||
471 | #define MCF_GPIO_PCLRR_LCDDATAH MCF_REG08(0xFC0A4049) | ||
472 | #define MCF_GPIO_PCLRR_LCDDATAM MCF_REG08(0xFC0A404A) | ||
473 | #define MCF_GPIO_PCLRR_LCDDATAL MCF_REG08(0xFC0A404B) | ||
474 | #define MCF_GPIO_PCLRR_LCDCTLH MCF_REG08(0xFC0A404C) | ||
475 | #define MCF_GPIO_PCLRR_LCDCTLL MCF_REG08(0xFC0A404D) | ||
476 | #define MCF_GPIO_PAR_FEC MCF_REG08(0xFC0A4050) | ||
477 | #define MCF_GPIO_PAR_PWM MCF_REG08(0xFC0A4051) | ||
478 | #define MCF_GPIO_PAR_BUSCTL MCF_REG08(0xFC0A4052) | ||
479 | #define MCF_GPIO_PAR_FECI2C MCF_REG08(0xFC0A4053) | ||
480 | #define MCF_GPIO_PAR_BE MCF_REG08(0xFC0A4054) | ||
481 | #define MCF_GPIO_PAR_CS MCF_REG08(0xFC0A4055) | ||
482 | #define MCF_GPIO_PAR_SSI MCF_REG16(0xFC0A4056) | ||
483 | #define MCF_GPIO_PAR_UART MCF_REG16(0xFC0A4058) | ||
484 | #define MCF_GPIO_PAR_QSPI MCF_REG16(0xFC0A405A) | ||
485 | #define MCF_GPIO_PAR_TIMER MCF_REG08(0xFC0A405C) | ||
486 | #define MCF_GPIO_PAR_LCDDATA MCF_REG08(0xFC0A405D) | ||
487 | #define MCF_GPIO_PAR_LCDCTL MCF_REG16(0xFC0A405E) | ||
488 | #define MCF_GPIO_PAR_IRQ MCF_REG16(0xFC0A4060) | ||
489 | #define MCF_GPIO_MSCR_FLEXBUS MCF_REG08(0xFC0A4064) | ||
490 | #define MCF_GPIO_MSCR_SDRAM MCF_REG08(0xFC0A4065) | ||
491 | #define MCF_GPIO_DSCR_I2C MCF_REG08(0xFC0A4068) | ||
492 | #define MCF_GPIO_DSCR_PWM MCF_REG08(0xFC0A4069) | ||
493 | #define MCF_GPIO_DSCR_FEC MCF_REG08(0xFC0A406A) | ||
494 | #define MCF_GPIO_DSCR_UART MCF_REG08(0xFC0A406B) | ||
495 | #define MCF_GPIO_DSCR_QSPI MCF_REG08(0xFC0A406C) | ||
496 | #define MCF_GPIO_DSCR_TIMER MCF_REG08(0xFC0A406D) | ||
497 | #define MCF_GPIO_DSCR_SSI MCF_REG08(0xFC0A406E) | ||
498 | #define MCF_GPIO_DSCR_LCD MCF_REG08(0xFC0A406F) | ||
499 | #define MCF_GPIO_DSCR_DEBUG MCF_REG08(0xFC0A4070) | ||
500 | #define MCF_GPIO_DSCR_CLKRST MCF_REG08(0xFC0A4071) | ||
501 | #define MCF_GPIO_DSCR_IRQ MCF_REG08(0xFC0A4072) | ||
502 | |||
503 | /* Bit definitions and macros for MCF_GPIO_PODR_FECH */ | ||
504 | #define MCF_GPIO_PODR_FECH_PODR_FECH0 (0x01) | ||
505 | #define MCF_GPIO_PODR_FECH_PODR_FECH1 (0x02) | ||
506 | #define MCF_GPIO_PODR_FECH_PODR_FECH2 (0x04) | ||
507 | #define MCF_GPIO_PODR_FECH_PODR_FECH3 (0x08) | ||
508 | #define MCF_GPIO_PODR_FECH_PODR_FECH4 (0x10) | ||
509 | #define MCF_GPIO_PODR_FECH_PODR_FECH5 (0x20) | ||
510 | #define MCF_GPIO_PODR_FECH_PODR_FECH6 (0x40) | ||
511 | #define MCF_GPIO_PODR_FECH_PODR_FECH7 (0x80) | ||
512 | |||
513 | /* Bit definitions and macros for MCF_GPIO_PODR_FECL */ | ||
514 | #define MCF_GPIO_PODR_FECL_PODR_FECL0 (0x01) | ||
515 | #define MCF_GPIO_PODR_FECL_PODR_FECL1 (0x02) | ||
516 | #define MCF_GPIO_PODR_FECL_PODR_FECL2 (0x04) | ||
517 | #define MCF_GPIO_PODR_FECL_PODR_FECL3 (0x08) | ||
518 | #define MCF_GPIO_PODR_FECL_PODR_FECL4 (0x10) | ||
519 | #define MCF_GPIO_PODR_FECL_PODR_FECL5 (0x20) | ||
520 | #define MCF_GPIO_PODR_FECL_PODR_FECL6 (0x40) | ||
521 | #define MCF_GPIO_PODR_FECL_PODR_FECL7 (0x80) | ||
522 | |||
523 | /* Bit definitions and macros for MCF_GPIO_PODR_SSI */ | ||
524 | #define MCF_GPIO_PODR_SSI_PODR_SSI0 (0x01) | ||
525 | #define MCF_GPIO_PODR_SSI_PODR_SSI1 (0x02) | ||
526 | #define MCF_GPIO_PODR_SSI_PODR_SSI2 (0x04) | ||
527 | #define MCF_GPIO_PODR_SSI_PODR_SSI3 (0x08) | ||
528 | #define MCF_GPIO_PODR_SSI_PODR_SSI4 (0x10) | ||
529 | |||
530 | /* Bit definitions and macros for MCF_GPIO_PODR_BUSCTL */ | ||
531 | #define MCF_GPIO_PODR_BUSCTL_POSDR_BUSCTL0 (0x01) | ||
532 | #define MCF_GPIO_PODR_BUSCTL_PODR_BUSCTL1 (0x02) | ||
533 | #define MCF_GPIO_PODR_BUSCTL_PODR_BUSCTL2 (0x04) | ||
534 | #define MCF_GPIO_PODR_BUSCTL_PODR_BUSCTL3 (0x08) | ||
535 | |||
536 | /* Bit definitions and macros for MCF_GPIO_PODR_BE */ | ||
537 | #define MCF_GPIO_PODR_BE_PODR_BE0 (0x01) | ||
538 | #define MCF_GPIO_PODR_BE_PODR_BE1 (0x02) | ||
539 | #define MCF_GPIO_PODR_BE_PODR_BE2 (0x04) | ||
540 | #define MCF_GPIO_PODR_BE_PODR_BE3 (0x08) | ||
541 | |||
542 | /* Bit definitions and macros for MCF_GPIO_PODR_CS */ | ||
543 | #define MCF_GPIO_PODR_CS_PODR_CS1 (0x02) | ||
544 | #define MCF_GPIO_PODR_CS_PODR_CS2 (0x04) | ||
545 | #define MCF_GPIO_PODR_CS_PODR_CS3 (0x08) | ||
546 | #define MCF_GPIO_PODR_CS_PODR_CS4 (0x10) | ||
547 | #define MCF_GPIO_PODR_CS_PODR_CS5 (0x20) | ||
548 | |||
549 | /* Bit definitions and macros for MCF_GPIO_PODR_PWM */ | ||
550 | #define MCF_GPIO_PODR_PWM_PODR_PWM2 (0x04) | ||
551 | #define MCF_GPIO_PODR_PWM_PODR_PWM3 (0x08) | ||
552 | #define MCF_GPIO_PODR_PWM_PODR_PWM4 (0x10) | ||
553 | #define MCF_GPIO_PODR_PWM_PODR_PWM5 (0x20) | ||
554 | |||
555 | /* Bit definitions and macros for MCF_GPIO_PODR_FECI2C */ | ||
556 | #define MCF_GPIO_PODR_FECI2C_PODR_FECI2C0 (0x01) | ||
557 | #define MCF_GPIO_PODR_FECI2C_PODR_FECI2C1 (0x02) | ||
558 | #define MCF_GPIO_PODR_FECI2C_PODR_FECI2C2 (0x04) | ||
559 | #define MCF_GPIO_PODR_FECI2C_PODR_FECI2C3 (0x08) | ||
560 | |||
561 | /* Bit definitions and macros for MCF_GPIO_PODR_UART */ | ||
562 | #define MCF_GPIO_PODR_UART_PODR_UART0 (0x01) | ||
563 | #define MCF_GPIO_PODR_UART_PODR_UART1 (0x02) | ||
564 | #define MCF_GPIO_PODR_UART_PODR_UART2 (0x04) | ||
565 | #define MCF_GPIO_PODR_UART_PODR_UART3 (0x08) | ||
566 | #define MCF_GPIO_PODR_UART_PODR_UART4 (0x10) | ||
567 | #define MCF_GPIO_PODR_UART_PODR_UART5 (0x20) | ||
568 | #define MCF_GPIO_PODR_UART_PODR_UART6 (0x40) | ||
569 | #define MCF_GPIO_PODR_UART_PODR_UART7 (0x80) | ||
570 | |||
571 | /* Bit definitions and macros for MCF_GPIO_PODR_QSPI */ | ||
572 | #define MCF_GPIO_PODR_QSPI_PODR_QSPI0 (0x01) | ||
573 | #define MCF_GPIO_PODR_QSPI_PODR_QSPI1 (0x02) | ||
574 | #define MCF_GPIO_PODR_QSPI_PODR_QSPI2 (0x04) | ||
575 | #define MCF_GPIO_PODR_QSPI_PODR_QSPI3 (0x08) | ||
576 | #define MCF_GPIO_PODR_QSPI_PODR_QSPI4 (0x10) | ||
577 | #define MCF_GPIO_PODR_QSPI_PODR_QSPI5 (0x20) | ||
578 | |||
579 | /* Bit definitions and macros for MCF_GPIO_PODR_TIMER */ | ||
580 | #define MCF_GPIO_PODR_TIMER_PODR_TIMER0 (0x01) | ||
581 | #define MCF_GPIO_PODR_TIMER_PODR_TIMER1 (0x02) | ||
582 | #define MCF_GPIO_PODR_TIMER_PODR_TIMER2 (0x04) | ||
583 | #define MCF_GPIO_PODR_TIMER_PODR_TIMER3 (0x08) | ||
584 | |||
585 | /* Bit definitions and macros for MCF_GPIO_PODR_LCDDATAH */ | ||
586 | #define MCF_GPIO_PODR_LCDDATAH_PODR_LCDDATAH0 (0x01) | ||
587 | #define MCF_GPIO_PODR_LCDDATAH_PODR_LCDDATAH1 (0x02) | ||
588 | |||
589 | /* Bit definitions and macros for MCF_GPIO_PODR_LCDDATAM */ | ||
590 | #define MCF_GPIO_PODR_LCDDATAM_PODR_LCDDATAM0 (0x01) | ||
591 | #define MCF_GPIO_PODR_LCDDATAM_PODR_LCDDATAM1 (0x02) | ||
592 | #define MCF_GPIO_PODR_LCDDATAM_PODR_LCDDATAM2 (0x04) | ||
593 | #define MCF_GPIO_PODR_LCDDATAM_PODR_LCDDATAM3 (0x08) | ||
594 | #define MCF_GPIO_PODR_LCDDATAM_PODR_LCDDATAM4 (0x10) | ||
595 | #define MCF_GPIO_PODR_LCDDATAM_PODR_LCDDATAM5 (0x20) | ||
596 | #define MCF_GPIO_PODR_LCDDATAM_PODR_LCDDATAM6 (0x40) | ||
597 | #define MCF_GPIO_PODR_LCDDATAM_PODR_LCDDATAM7 (0x80) | ||
598 | |||
599 | /* Bit definitions and macros for MCF_GPIO_PODR_LCDDATAL */ | ||
600 | #define MCF_GPIO_PODR_LCDDATAL_PODR_LCDDATAL0 (0x01) | ||
601 | #define MCF_GPIO_PODR_LCDDATAL_PODR_LCDDATAL1 (0x02) | ||
602 | #define MCF_GPIO_PODR_LCDDATAL_PODR_LCDDATAL2 (0x04) | ||
603 | #define MCF_GPIO_PODR_LCDDATAL_PODR_LCDDATAL3 (0x08) | ||
604 | #define MCF_GPIO_PODR_LCDDATAL_PODR_LCDDATAL4 (0x10) | ||
605 | #define MCF_GPIO_PODR_LCDDATAL_PODR_LCDDATAL5 (0x20) | ||
606 | #define MCF_GPIO_PODR_LCDDATAL_PODR_LCDDATAL6 (0x40) | ||
607 | #define MCF_GPIO_PODR_LCDDATAL_PODR_LCDDATAL7 (0x80) | ||
608 | |||
609 | /* Bit definitions and macros for MCF_GPIO_PODR_LCDCTLH */ | ||
610 | #define MCF_GPIO_PODR_LCDCTLH_PODR_LCDCTLH0 (0x01) | ||
611 | |||
612 | /* Bit definitions and macros for MCF_GPIO_PODR_LCDCTLL */ | ||
613 | #define MCF_GPIO_PODR_LCDCTLL_PODR_LCDCTLL0 (0x01) | ||
614 | #define MCF_GPIO_PODR_LCDCTLL_PODR_LCDCTLL1 (0x02) | ||
615 | #define MCF_GPIO_PODR_LCDCTLL_PODR_LCDCTLL2 (0x04) | ||
616 | #define MCF_GPIO_PODR_LCDCTLL_PODR_LCDCTLL3 (0x08) | ||
617 | #define MCF_GPIO_PODR_LCDCTLL_PODR_LCDCTLL4 (0x10) | ||
618 | #define MCF_GPIO_PODR_LCDCTLL_PODR_LCDCTLL5 (0x20) | ||
619 | #define MCF_GPIO_PODR_LCDCTLL_PODR_LCDCTLL6 (0x40) | ||
620 | #define MCF_GPIO_PODR_LCDCTLL_PODR_LCDCTLL7 (0x80) | ||
621 | |||
622 | /* Bit definitions and macros for MCF_GPIO_PDDR_FECH */ | ||
623 | #define MCF_GPIO_PDDR_FECH_PDDR_FECH0 (0x01) | ||
624 | #define MCF_GPIO_PDDR_FECH_PDDR_FECH1 (0x02) | ||
625 | #define MCF_GPIO_PDDR_FECH_PDDR_FECH2 (0x04) | ||
626 | #define MCF_GPIO_PDDR_FECH_PDDR_FECH3 (0x08) | ||
627 | #define MCF_GPIO_PDDR_FECH_PDDR_FECH4 (0x10) | ||
628 | #define MCF_GPIO_PDDR_FECH_PDDR_FECH5 (0x20) | ||
629 | #define MCF_GPIO_PDDR_FECH_PDDR_FECH6 (0x40) | ||
630 | #define MCF_GPIO_PDDR_FECH_PDDR_FECH7 (0x80) | ||
631 | |||
632 | /* Bit definitions and macros for MCF_GPIO_PDDR_FECL */ | ||
633 | #define MCF_GPIO_PDDR_FECL_PDDR_FECL0 (0x01) | ||
634 | #define MCF_GPIO_PDDR_FECL_PDDR_FECL1 (0x02) | ||
635 | #define MCF_GPIO_PDDR_FECL_PDDR_FECL2 (0x04) | ||
636 | #define MCF_GPIO_PDDR_FECL_PDDR_FECL3 (0x08) | ||
637 | #define MCF_GPIO_PDDR_FECL_PDDR_FECL4 (0x10) | ||
638 | #define MCF_GPIO_PDDR_FECL_PDDR_FECL5 (0x20) | ||
639 | #define MCF_GPIO_PDDR_FECL_PDDR_FECL6 (0x40) | ||
640 | #define MCF_GPIO_PDDR_FECL_PDDR_FECL7 (0x80) | ||
641 | |||
642 | /* Bit definitions and macros for MCF_GPIO_PDDR_SSI */ | ||
643 | #define MCF_GPIO_PDDR_SSI_PDDR_SSI0 (0x01) | ||
644 | #define MCF_GPIO_PDDR_SSI_PDDR_SSI1 (0x02) | ||
645 | #define MCF_GPIO_PDDR_SSI_PDDR_SSI2 (0x04) | ||
646 | #define MCF_GPIO_PDDR_SSI_PDDR_SSI3 (0x08) | ||
647 | #define MCF_GPIO_PDDR_SSI_PDDR_SSI4 (0x10) | ||
648 | |||
649 | /* Bit definitions and macros for MCF_GPIO_PDDR_BUSCTL */ | ||
650 | #define MCF_GPIO_PDDR_BUSCTL_POSDR_BUSCTL0 (0x01) | ||
651 | #define MCF_GPIO_PDDR_BUSCTL_PDDR_BUSCTL1 (0x02) | ||
652 | #define MCF_GPIO_PDDR_BUSCTL_PDDR_BUSCTL2 (0x04) | ||
653 | #define MCF_GPIO_PDDR_BUSCTL_PDDR_BUSCTL3 (0x08) | ||
654 | |||
655 | /* Bit definitions and macros for MCF_GPIO_PDDR_BE */ | ||
656 | #define MCF_GPIO_PDDR_BE_PDDR_BE0 (0x01) | ||
657 | #define MCF_GPIO_PDDR_BE_PDDR_BE1 (0x02) | ||
658 | #define MCF_GPIO_PDDR_BE_PDDR_BE2 (0x04) | ||
659 | #define MCF_GPIO_PDDR_BE_PDDR_BE3 (0x08) | ||
660 | |||
661 | /* Bit definitions and macros for MCF_GPIO_PDDR_CS */ | ||
662 | #define MCF_GPIO_PDDR_CS_PDDR_CS1 (0x02) | ||
663 | #define MCF_GPIO_PDDR_CS_PDDR_CS2 (0x04) | ||
664 | #define MCF_GPIO_PDDR_CS_PDDR_CS3 (0x08) | ||
665 | #define MCF_GPIO_PDDR_CS_PDDR_CS4 (0x10) | ||
666 | #define MCF_GPIO_PDDR_CS_PDDR_CS5 (0x20) | ||
667 | |||
668 | /* Bit definitions and macros for MCF_GPIO_PDDR_PWM */ | ||
669 | #define MCF_GPIO_PDDR_PWM_PDDR_PWM2 (0x04) | ||
670 | #define MCF_GPIO_PDDR_PWM_PDDR_PWM3 (0x08) | ||
671 | #define MCF_GPIO_PDDR_PWM_PDDR_PWM4 (0x10) | ||
672 | #define MCF_GPIO_PDDR_PWM_PDDR_PWM5 (0x20) | ||
673 | |||
674 | /* Bit definitions and macros for MCF_GPIO_PDDR_FECI2C */ | ||
675 | #define MCF_GPIO_PDDR_FECI2C_PDDR_FECI2C0 (0x01) | ||
676 | #define MCF_GPIO_PDDR_FECI2C_PDDR_FECI2C1 (0x02) | ||
677 | #define MCF_GPIO_PDDR_FECI2C_PDDR_FECI2C2 (0x04) | ||
678 | #define MCF_GPIO_PDDR_FECI2C_PDDR_FECI2C3 (0x08) | ||
679 | |||
680 | /* Bit definitions and macros for MCF_GPIO_PDDR_UART */ | ||
681 | #define MCF_GPIO_PDDR_UART_PDDR_UART0 (0x01) | ||
682 | #define MCF_GPIO_PDDR_UART_PDDR_UART1 (0x02) | ||
683 | #define MCF_GPIO_PDDR_UART_PDDR_UART2 (0x04) | ||
684 | #define MCF_GPIO_PDDR_UART_PDDR_UART3 (0x08) | ||
685 | #define MCF_GPIO_PDDR_UART_PDDR_UART4 (0x10) | ||
686 | #define MCF_GPIO_PDDR_UART_PDDR_UART5 (0x20) | ||
687 | #define MCF_GPIO_PDDR_UART_PDDR_UART6 (0x40) | ||
688 | #define MCF_GPIO_PDDR_UART_PDDR_UART7 (0x80) | ||
689 | |||
690 | /* Bit definitions and macros for MCF_GPIO_PDDR_QSPI */ | ||
691 | #define MCF_GPIO_PDDR_QSPI_PDDR_QSPI0 (0x01) | ||
692 | #define MCF_GPIO_PDDR_QSPI_PDDR_QSPI1 (0x02) | ||
693 | #define MCF_GPIO_PDDR_QSPI_PDDR_QSPI2 (0x04) | ||
694 | #define MCF_GPIO_PDDR_QSPI_PDDR_QSPI3 (0x08) | ||
695 | #define MCF_GPIO_PDDR_QSPI_PDDR_QSPI4 (0x10) | ||
696 | #define MCF_GPIO_PDDR_QSPI_PDDR_QSPI5 (0x20) | ||
697 | |||
698 | /* Bit definitions and macros for MCF_GPIO_PDDR_TIMER */ | ||
699 | #define MCF_GPIO_PDDR_TIMER_PDDR_TIMER0 (0x01) | ||
700 | #define MCF_GPIO_PDDR_TIMER_PDDR_TIMER1 (0x02) | ||
701 | #define MCF_GPIO_PDDR_TIMER_PDDR_TIMER2 (0x04) | ||
702 | #define MCF_GPIO_PDDR_TIMER_PDDR_TIMER3 (0x08) | ||
703 | |||
704 | /* Bit definitions and macros for MCF_GPIO_PDDR_LCDDATAH */ | ||
705 | #define MCF_GPIO_PDDR_LCDDATAH_PDDR_LCDDATAH0 (0x01) | ||
706 | #define MCF_GPIO_PDDR_LCDDATAH_PDDR_LCDDATAH1 (0x02) | ||
707 | |||
708 | /* Bit definitions and macros for MCF_GPIO_PDDR_LCDDATAM */ | ||
709 | #define MCF_GPIO_PDDR_LCDDATAM_PDDR_LCDDATAM0 (0x01) | ||
710 | #define MCF_GPIO_PDDR_LCDDATAM_PDDR_LCDDATAM1 (0x02) | ||
711 | #define MCF_GPIO_PDDR_LCDDATAM_PDDR_LCDDATAM2 (0x04) | ||
712 | #define MCF_GPIO_PDDR_LCDDATAM_PDDR_LCDDATAM3 (0x08) | ||
713 | #define MCF_GPIO_PDDR_LCDDATAM_PDDR_LCDDATAM4 (0x10) | ||
714 | #define MCF_GPIO_PDDR_LCDDATAM_PDDR_LCDDATAM5 (0x20) | ||
715 | #define MCF_GPIO_PDDR_LCDDATAM_PDDR_LCDDATAM6 (0x40) | ||
716 | #define MCF_GPIO_PDDR_LCDDATAM_PDDR_LCDDATAM7 (0x80) | ||
717 | |||
718 | /* Bit definitions and macros for MCF_GPIO_PDDR_LCDDATAL */ | ||
719 | #define MCF_GPIO_PDDR_LCDDATAL_PDDR_LCDDATAL0 (0x01) | ||
720 | #define MCF_GPIO_PDDR_LCDDATAL_PDDR_LCDDATAL1 (0x02) | ||
721 | #define MCF_GPIO_PDDR_LCDDATAL_PDDR_LCDDATAL2 (0x04) | ||
722 | #define MCF_GPIO_PDDR_LCDDATAL_PDDR_LCDDATAL3 (0x08) | ||
723 | #define MCF_GPIO_PDDR_LCDDATAL_PDDR_LCDDATAL4 (0x10) | ||
724 | #define MCF_GPIO_PDDR_LCDDATAL_PDDR_LCDDATAL5 (0x20) | ||
725 | #define MCF_GPIO_PDDR_LCDDATAL_PDDR_LCDDATAL6 (0x40) | ||
726 | #define MCF_GPIO_PDDR_LCDDATAL_PDDR_LCDDATAL7 (0x80) | ||
727 | |||
728 | /* Bit definitions and macros for MCF_GPIO_PDDR_LCDCTLH */ | ||
729 | #define MCF_GPIO_PDDR_LCDCTLH_PDDR_LCDCTLH0 (0x01) | ||
730 | |||
731 | /* Bit definitions and macros for MCF_GPIO_PDDR_LCDCTLL */ | ||
732 | #define MCF_GPIO_PDDR_LCDCTLL_PDDR_LCDCTLL0 (0x01) | ||
733 | #define MCF_GPIO_PDDR_LCDCTLL_PDDR_LCDCTLL1 (0x02) | ||
734 | #define MCF_GPIO_PDDR_LCDCTLL_PDDR_LCDCTLL2 (0x04) | ||
735 | #define MCF_GPIO_PDDR_LCDCTLL_PDDR_LCDCTLL3 (0x08) | ||
736 | #define MCF_GPIO_PDDR_LCDCTLL_PDDR_LCDCTLL4 (0x10) | ||
737 | #define MCF_GPIO_PDDR_LCDCTLL_PDDR_LCDCTLL5 (0x20) | ||
738 | #define MCF_GPIO_PDDR_LCDCTLL_PDDR_LCDCTLL6 (0x40) | ||
739 | #define MCF_GPIO_PDDR_LCDCTLL_PDDR_LCDCTLL7 (0x80) | ||
740 | |||
741 | /* Bit definitions and macros for MCF_GPIO_PPDSDR_FECH */ | ||
742 | #define MCF_GPIO_PPDSDR_FECH_PPDSDR_FECH0 (0x01) | ||
743 | #define MCF_GPIO_PPDSDR_FECH_PPDSDR_FECH1 (0x02) | ||
744 | #define MCF_GPIO_PPDSDR_FECH_PPDSDR_FECH2 (0x04) | ||
745 | #define MCF_GPIO_PPDSDR_FECH_PPDSDR_FECH3 (0x08) | ||
746 | #define MCF_GPIO_PPDSDR_FECH_PPDSDR_FECH4 (0x10) | ||
747 | #define MCF_GPIO_PPDSDR_FECH_PPDSDR_FECH5 (0x20) | ||
748 | #define MCF_GPIO_PPDSDR_FECH_PPDSDR_FECH6 (0x40) | ||
749 | #define MCF_GPIO_PPDSDR_FECH_PPDSDR_FECH7 (0x80) | ||
750 | |||
751 | /* Bit definitions and macros for MCF_GPIO_PPDSDR_FECL */ | ||
752 | #define MCF_GPIO_PPDSDR_FECL_PPDSDR_FECL0 (0x01) | ||
753 | #define MCF_GPIO_PPDSDR_FECL_PPDSDR_FECL1 (0x02) | ||
754 | #define MCF_GPIO_PPDSDR_FECL_PPDSDR_FECL2 (0x04) | ||
755 | #define MCF_GPIO_PPDSDR_FECL_PPDSDR_FECL3 (0x08) | ||
756 | #define MCF_GPIO_PPDSDR_FECL_PPDSDR_FECL4 (0x10) | ||
757 | #define MCF_GPIO_PPDSDR_FECL_PPDSDR_FECL5 (0x20) | ||
758 | #define MCF_GPIO_PPDSDR_FECL_PPDSDR_FECL6 (0x40) | ||
759 | #define MCF_GPIO_PPDSDR_FECL_PPDSDR_FECL7 (0x80) | ||
760 | |||
761 | /* Bit definitions and macros for MCF_GPIO_PPDSDR_SSI */ | ||
762 | #define MCF_GPIO_PPDSDR_SSI_PPDSDR_SSI0 (0x01) | ||
763 | #define MCF_GPIO_PPDSDR_SSI_PPDSDR_SSI1 (0x02) | ||
764 | #define MCF_GPIO_PPDSDR_SSI_PPDSDR_SSI2 (0x04) | ||
765 | #define MCF_GPIO_PPDSDR_SSI_PPDSDR_SSI3 (0x08) | ||
766 | #define MCF_GPIO_PPDSDR_SSI_PPDSDR_SSI4 (0x10) | ||
767 | |||
768 | /* Bit definitions and macros for MCF_GPIO_PPDSDR_BUSCTL */ | ||
769 | #define MCF_GPIO_PPDSDR_BUSCTL_POSDR_BUSCTL0 (0x01) | ||
770 | #define MCF_GPIO_PPDSDR_BUSCTL_PPDSDR_BUSCTL1 (0x02) | ||
771 | #define MCF_GPIO_PPDSDR_BUSCTL_PPDSDR_BUSCTL2 (0x04) | ||
772 | #define MCF_GPIO_PPDSDR_BUSCTL_PPDSDR_BUSCTL3 (0x08) | ||
773 | |||
774 | /* Bit definitions and macros for MCF_GPIO_PPDSDR_BE */ | ||
775 | #define MCF_GPIO_PPDSDR_BE_PPDSDR_BE0 (0x01) | ||
776 | #define MCF_GPIO_PPDSDR_BE_PPDSDR_BE1 (0x02) | ||
777 | #define MCF_GPIO_PPDSDR_BE_PPDSDR_BE2 (0x04) | ||
778 | #define MCF_GPIO_PPDSDR_BE_PPDSDR_BE3 (0x08) | ||
779 | |||
780 | /* Bit definitions and macros for MCF_GPIO_PPDSDR_CS */ | ||
781 | #define MCF_GPIO_PPDSDR_CS_PPDSDR_CS1 (0x02) | ||
782 | #define MCF_GPIO_PPDSDR_CS_PPDSDR_CS2 (0x04) | ||
783 | #define MCF_GPIO_PPDSDR_CS_PPDSDR_CS3 (0x08) | ||
784 | #define MCF_GPIO_PPDSDR_CS_PPDSDR_CS4 (0x10) | ||
785 | #define MCF_GPIO_PPDSDR_CS_PPDSDR_CS5 (0x20) | ||
786 | |||
787 | /* Bit definitions and macros for MCF_GPIO_PPDSDR_PWM */ | ||
788 | #define MCF_GPIO_PPDSDR_PWM_PPDSDR_PWM2 (0x04) | ||
789 | #define MCF_GPIO_PPDSDR_PWM_PPDSDR_PWM3 (0x08) | ||
790 | #define MCF_GPIO_PPDSDR_PWM_PPDSDR_PWM4 (0x10) | ||
791 | #define MCF_GPIO_PPDSDR_PWM_PPDSDR_PWM5 (0x20) | ||
792 | |||
793 | /* Bit definitions and macros for MCF_GPIO_PPDSDR_FECI2C */ | ||
794 | #define MCF_GPIO_PPDSDR_FECI2C_PPDSDR_FECI2C0 (0x01) | ||
795 | #define MCF_GPIO_PPDSDR_FECI2C_PPDSDR_FECI2C1 (0x02) | ||
796 | #define MCF_GPIO_PPDSDR_FECI2C_PPDSDR_FECI2C2 (0x04) | ||
797 | #define MCF_GPIO_PPDSDR_FECI2C_PPDSDR_FECI2C3 (0x08) | ||
798 | |||
799 | /* Bit definitions and macros for MCF_GPIO_PPDSDR_UART */ | ||
800 | #define MCF_GPIO_PPDSDR_UART_PPDSDR_UART0 (0x01) | ||
801 | #define MCF_GPIO_PPDSDR_UART_PPDSDR_UART1 (0x02) | ||
802 | #define MCF_GPIO_PPDSDR_UART_PPDSDR_UART2 (0x04) | ||
803 | #define MCF_GPIO_PPDSDR_UART_PPDSDR_UART3 (0x08) | ||
804 | #define MCF_GPIO_PPDSDR_UART_PPDSDR_UART4 (0x10) | ||
805 | #define MCF_GPIO_PPDSDR_UART_PPDSDR_UART5 (0x20) | ||
806 | #define MCF_GPIO_PPDSDR_UART_PPDSDR_UART6 (0x40) | ||
807 | #define MCF_GPIO_PPDSDR_UART_PPDSDR_UART7 (0x80) | ||
808 | |||
809 | /* Bit definitions and macros for MCF_GPIO_PPDSDR_QSPI */ | ||
810 | #define MCF_GPIO_PPDSDR_QSPI_PPDSDR_QSPI0 (0x01) | ||
811 | #define MCF_GPIO_PPDSDR_QSPI_PPDSDR_QSPI1 (0x02) | ||
812 | #define MCF_GPIO_PPDSDR_QSPI_PPDSDR_QSPI2 (0x04) | ||
813 | #define MCF_GPIO_PPDSDR_QSPI_PPDSDR_QSPI3 (0x08) | ||
814 | #define MCF_GPIO_PPDSDR_QSPI_PPDSDR_QSPI4 (0x10) | ||
815 | #define MCF_GPIO_PPDSDR_QSPI_PPDSDR_QSPI5 (0x20) | ||
816 | |||
817 | /* Bit definitions and macros for MCF_GPIO_PPDSDR_TIMER */ | ||
818 | #define MCF_GPIO_PPDSDR_TIMER_PPDSDR_TIMER0 (0x01) | ||
819 | #define MCF_GPIO_PPDSDR_TIMER_PPDSDR_TIMER1 (0x02) | ||
820 | #define MCF_GPIO_PPDSDR_TIMER_PPDSDR_TIMER2 (0x04) | ||
821 | #define MCF_GPIO_PPDSDR_TIMER_PPDSDR_TIMER3 (0x08) | ||
822 | |||
823 | /* Bit definitions and macros for MCF_GPIO_PPDSDR_LCDDATAH */ | ||
824 | #define MCF_GPIO_PPDSDR_LCDDATAH_PPDSDR_LCDDATAH0 (0x01) | ||
825 | #define MCF_GPIO_PPDSDR_LCDDATAH_PPDSDR_LCDDATAH1 (0x02) | ||
826 | |||
827 | /* Bit definitions and macros for MCF_GPIO_PPDSDR_LCDDATAM */ | ||
828 | #define MCF_GPIO_PPDSDR_LCDDATAM_PPDSDR_LCDDATAM0 (0x01) | ||
829 | #define MCF_GPIO_PPDSDR_LCDDATAM_PPDSDR_LCDDATAM1 (0x02) | ||
830 | #define MCF_GPIO_PPDSDR_LCDDATAM_PPDSDR_LCDDATAM2 (0x04) | ||
831 | #define MCF_GPIO_PPDSDR_LCDDATAM_PPDSDR_LCDDATAM3 (0x08) | ||
832 | #define MCF_GPIO_PPDSDR_LCDDATAM_PPDSDR_LCDDATAM4 (0x10) | ||
833 | #define MCF_GPIO_PPDSDR_LCDDATAM_PPDSDR_LCDDATAM5 (0x20) | ||
834 | #define MCF_GPIO_PPDSDR_LCDDATAM_PPDSDR_LCDDATAM6 (0x40) | ||
835 | #define MCF_GPIO_PPDSDR_LCDDATAM_PPDSDR_LCDDATAM7 (0x80) | ||
836 | |||
837 | /* Bit definitions and macros for MCF_GPIO_PPDSDR_LCDDATAL */ | ||
838 | #define MCF_GPIO_PPDSDR_LCDDATAL_PPDSDR_LCDDATAL0 (0x01) | ||
839 | #define MCF_GPIO_PPDSDR_LCDDATAL_PPDSDR_LCDDATAL1 (0x02) | ||
840 | #define MCF_GPIO_PPDSDR_LCDDATAL_PPDSDR_LCDDATAL2 (0x04) | ||
841 | #define MCF_GPIO_PPDSDR_LCDDATAL_PPDSDR_LCDDATAL3 (0x08) | ||
842 | #define MCF_GPIO_PPDSDR_LCDDATAL_PPDSDR_LCDDATAL4 (0x10) | ||
843 | #define MCF_GPIO_PPDSDR_LCDDATAL_PPDSDR_LCDDATAL5 (0x20) | ||
844 | #define MCF_GPIO_PPDSDR_LCDDATAL_PPDSDR_LCDDATAL6 (0x40) | ||
845 | #define MCF_GPIO_PPDSDR_LCDDATAL_PPDSDR_LCDDATAL7 (0x80) | ||
846 | |||
847 | /* Bit definitions and macros for MCF_GPIO_PPDSDR_LCDCTLH */ | ||
848 | #define MCF_GPIO_PPDSDR_LCDCTLH_PPDSDR_LCDCTLH0 (0x01) | ||
849 | |||
850 | /* Bit definitions and macros for MCF_GPIO_PPDSDR_LCDCTLL */ | ||
851 | #define MCF_GPIO_PPDSDR_LCDCTLL_PPDSDR_LCDCTLL0 (0x01) | ||
852 | #define MCF_GPIO_PPDSDR_LCDCTLL_PPDSDR_LCDCTLL1 (0x02) | ||
853 | #define MCF_GPIO_PPDSDR_LCDCTLL_PPDSDR_LCDCTLL2 (0x04) | ||
854 | #define MCF_GPIO_PPDSDR_LCDCTLL_PPDSDR_LCDCTLL3 (0x08) | ||
855 | #define MCF_GPIO_PPDSDR_LCDCTLL_PPDSDR_LCDCTLL4 (0x10) | ||
856 | #define MCF_GPIO_PPDSDR_LCDCTLL_PPDSDR_LCDCTLL5 (0x20) | ||
857 | #define MCF_GPIO_PPDSDR_LCDCTLL_PPDSDR_LCDCTLL6 (0x40) | ||
858 | #define MCF_GPIO_PPDSDR_LCDCTLL_PPDSDR_LCDCTLL7 (0x80) | ||
859 | |||
860 | /* Bit definitions and macros for MCF_GPIO_PCLRR_FECH */ | ||
861 | #define MCF_GPIO_PCLRR_FECH_PCLRR_FECH0 (0x01) | ||
862 | #define MCF_GPIO_PCLRR_FECH_PCLRR_FECH1 (0x02) | ||
863 | #define MCF_GPIO_PCLRR_FECH_PCLRR_FECH2 (0x04) | ||
864 | #define MCF_GPIO_PCLRR_FECH_PCLRR_FECH3 (0x08) | ||
865 | #define MCF_GPIO_PCLRR_FECH_PCLRR_FECH4 (0x10) | ||
866 | #define MCF_GPIO_PCLRR_FECH_PCLRR_FECH5 (0x20) | ||
867 | #define MCF_GPIO_PCLRR_FECH_PCLRR_FECH6 (0x40) | ||
868 | #define MCF_GPIO_PCLRR_FECH_PCLRR_FECH7 (0x80) | ||
869 | |||
870 | /* Bit definitions and macros for MCF_GPIO_PCLRR_FECL */ | ||
871 | #define MCF_GPIO_PCLRR_FECL_PCLRR_FECL0 (0x01) | ||
872 | #define MCF_GPIO_PCLRR_FECL_PCLRR_FECL1 (0x02) | ||
873 | #define MCF_GPIO_PCLRR_FECL_PCLRR_FECL2 (0x04) | ||
874 | #define MCF_GPIO_PCLRR_FECL_PCLRR_FECL3 (0x08) | ||
875 | #define MCF_GPIO_PCLRR_FECL_PCLRR_FECL4 (0x10) | ||
876 | #define MCF_GPIO_PCLRR_FECL_PCLRR_FECL5 (0x20) | ||
877 | #define MCF_GPIO_PCLRR_FECL_PCLRR_FECL6 (0x40) | ||
878 | #define MCF_GPIO_PCLRR_FECL_PCLRR_FECL7 (0x80) | ||
879 | |||
880 | /* Bit definitions and macros for MCF_GPIO_PCLRR_SSI */ | ||
881 | #define MCF_GPIO_PCLRR_SSI_PCLRR_SSI0 (0x01) | ||
882 | #define MCF_GPIO_PCLRR_SSI_PCLRR_SSI1 (0x02) | ||
883 | #define MCF_GPIO_PCLRR_SSI_PCLRR_SSI2 (0x04) | ||
884 | #define MCF_GPIO_PCLRR_SSI_PCLRR_SSI3 (0x08) | ||
885 | #define MCF_GPIO_PCLRR_SSI_PCLRR_SSI4 (0x10) | ||
886 | |||
887 | /* Bit definitions and macros for MCF_GPIO_PCLRR_BUSCTL */ | ||
888 | #define MCF_GPIO_PCLRR_BUSCTL_POSDR_BUSCTL0 (0x01) | ||
889 | #define MCF_GPIO_PCLRR_BUSCTL_PCLRR_BUSCTL1 (0x02) | ||
890 | #define MCF_GPIO_PCLRR_BUSCTL_PCLRR_BUSCTL2 (0x04) | ||
891 | #define MCF_GPIO_PCLRR_BUSCTL_PCLRR_BUSCTL3 (0x08) | ||
892 | |||
893 | /* Bit definitions and macros for MCF_GPIO_PCLRR_BE */ | ||
894 | #define MCF_GPIO_PCLRR_BE_PCLRR_BE0 (0x01) | ||
895 | #define MCF_GPIO_PCLRR_BE_PCLRR_BE1 (0x02) | ||
896 | #define MCF_GPIO_PCLRR_BE_PCLRR_BE2 (0x04) | ||
897 | #define MCF_GPIO_PCLRR_BE_PCLRR_BE3 (0x08) | ||
898 | |||
899 | /* Bit definitions and macros for MCF_GPIO_PCLRR_CS */ | ||
900 | #define MCF_GPIO_PCLRR_CS_PCLRR_CS1 (0x02) | ||
901 | #define MCF_GPIO_PCLRR_CS_PCLRR_CS2 (0x04) | ||
902 | #define MCF_GPIO_PCLRR_CS_PCLRR_CS3 (0x08) | ||
903 | #define MCF_GPIO_PCLRR_CS_PCLRR_CS4 (0x10) | ||
904 | #define MCF_GPIO_PCLRR_CS_PCLRR_CS5 (0x20) | ||
905 | |||
906 | /* Bit definitions and macros for MCF_GPIO_PCLRR_PWM */ | ||
907 | #define MCF_GPIO_PCLRR_PWM_PCLRR_PWM2 (0x04) | ||
908 | #define MCF_GPIO_PCLRR_PWM_PCLRR_PWM3 (0x08) | ||
909 | #define MCF_GPIO_PCLRR_PWM_PCLRR_PWM4 (0x10) | ||
910 | #define MCF_GPIO_PCLRR_PWM_PCLRR_PWM5 (0x20) | ||
911 | |||
912 | /* Bit definitions and macros for MCF_GPIO_PCLRR_FECI2C */ | ||
913 | #define MCF_GPIO_PCLRR_FECI2C_PCLRR_FECI2C0 (0x01) | ||
914 | #define MCF_GPIO_PCLRR_FECI2C_PCLRR_FECI2C1 (0x02) | ||
915 | #define MCF_GPIO_PCLRR_FECI2C_PCLRR_FECI2C2 (0x04) | ||
916 | #define MCF_GPIO_PCLRR_FECI2C_PCLRR_FECI2C3 (0x08) | ||
917 | |||
918 | /* Bit definitions and macros for MCF_GPIO_PCLRR_UART */ | ||
919 | #define MCF_GPIO_PCLRR_UART_PCLRR_UART0 (0x01) | ||
920 | #define MCF_GPIO_PCLRR_UART_PCLRR_UART1 (0x02) | ||
921 | #define MCF_GPIO_PCLRR_UART_PCLRR_UART2 (0x04) | ||
922 | #define MCF_GPIO_PCLRR_UART_PCLRR_UART3 (0x08) | ||
923 | #define MCF_GPIO_PCLRR_UART_PCLRR_UART4 (0x10) | ||
924 | #define MCF_GPIO_PCLRR_UART_PCLRR_UART5 (0x20) | ||
925 | #define MCF_GPIO_PCLRR_UART_PCLRR_UART6 (0x40) | ||
926 | #define MCF_GPIO_PCLRR_UART_PCLRR_UART7 (0x80) | ||
927 | |||
928 | /* Bit definitions and macros for MCF_GPIO_PCLRR_QSPI */ | ||
929 | #define MCF_GPIO_PCLRR_QSPI_PCLRR_QSPI0 (0x01) | ||
930 | #define MCF_GPIO_PCLRR_QSPI_PCLRR_QSPI1 (0x02) | ||
931 | #define MCF_GPIO_PCLRR_QSPI_PCLRR_QSPI2 (0x04) | ||
932 | #define MCF_GPIO_PCLRR_QSPI_PCLRR_QSPI3 (0x08) | ||
933 | #define MCF_GPIO_PCLRR_QSPI_PCLRR_QSPI4 (0x10) | ||
934 | #define MCF_GPIO_PCLRR_QSPI_PCLRR_QSPI5 (0x20) | ||
935 | |||
936 | /* Bit definitions and macros for MCF_GPIO_PCLRR_TIMER */ | ||
937 | #define MCF_GPIO_PCLRR_TIMER_PCLRR_TIMER0 (0x01) | ||
938 | #define MCF_GPIO_PCLRR_TIMER_PCLRR_TIMER1 (0x02) | ||
939 | #define MCF_GPIO_PCLRR_TIMER_PCLRR_TIMER2 (0x04) | ||
940 | #define MCF_GPIO_PCLRR_TIMER_PCLRR_TIMER3 (0x08) | ||
941 | |||
942 | /* Bit definitions and macros for MCF_GPIO_PCLRR_LCDDATAH */ | ||
943 | #define MCF_GPIO_PCLRR_LCDDATAH_PCLRR_LCDDATAH0 (0x01) | ||
944 | #define MCF_GPIO_PCLRR_LCDDATAH_PCLRR_LCDDATAH1 (0x02) | ||
945 | |||
946 | /* Bit definitions and macros for MCF_GPIO_PCLRR_LCDDATAM */ | ||
947 | #define MCF_GPIO_PCLRR_LCDDATAM_PCLRR_LCDDATAM0 (0x01) | ||
948 | #define MCF_GPIO_PCLRR_LCDDATAM_PCLRR_LCDDATAM1 (0x02) | ||
949 | #define MCF_GPIO_PCLRR_LCDDATAM_PCLRR_LCDDATAM2 (0x04) | ||
950 | #define MCF_GPIO_PCLRR_LCDDATAM_PCLRR_LCDDATAM3 (0x08) | ||
951 | #define MCF_GPIO_PCLRR_LCDDATAM_PCLRR_LCDDATAM4 (0x10) | ||
952 | #define MCF_GPIO_PCLRR_LCDDATAM_PCLRR_LCDDATAM5 (0x20) | ||
953 | #define MCF_GPIO_PCLRR_LCDDATAM_PCLRR_LCDDATAM6 (0x40) | ||
954 | #define MCF_GPIO_PCLRR_LCDDATAM_PCLRR_LCDDATAM7 (0x80) | ||
955 | |||
956 | /* Bit definitions and macros for MCF_GPIO_PCLRR_LCDDATAL */ | ||
957 | #define MCF_GPIO_PCLRR_LCDDATAL_PCLRR_LCDDATAL0 (0x01) | ||
958 | #define MCF_GPIO_PCLRR_LCDDATAL_PCLRR_LCDDATAL1 (0x02) | ||
959 | #define MCF_GPIO_PCLRR_LCDDATAL_PCLRR_LCDDATAL2 (0x04) | ||
960 | #define MCF_GPIO_PCLRR_LCDDATAL_PCLRR_LCDDATAL3 (0x08) | ||
961 | #define MCF_GPIO_PCLRR_LCDDATAL_PCLRR_LCDDATAL4 (0x10) | ||
962 | #define MCF_GPIO_PCLRR_LCDDATAL_PCLRR_LCDDATAL5 (0x20) | ||
963 | #define MCF_GPIO_PCLRR_LCDDATAL_PCLRR_LCDDATAL6 (0x40) | ||
964 | #define MCF_GPIO_PCLRR_LCDDATAL_PCLRR_LCDDATAL7 (0x80) | ||
965 | |||
966 | /* Bit definitions and macros for MCF_GPIO_PCLRR_LCDCTLH */ | ||
967 | #define MCF_GPIO_PCLRR_LCDCTLH_PCLRR_LCDCTLH0 (0x01) | ||
968 | |||
969 | /* Bit definitions and macros for MCF_GPIO_PCLRR_LCDCTLL */ | ||
970 | #define MCF_GPIO_PCLRR_LCDCTLL_PCLRR_LCDCTLL0 (0x01) | ||
971 | #define MCF_GPIO_PCLRR_LCDCTLL_PCLRR_LCDCTLL1 (0x02) | ||
972 | #define MCF_GPIO_PCLRR_LCDCTLL_PCLRR_LCDCTLL2 (0x04) | ||
973 | #define MCF_GPIO_PCLRR_LCDCTLL_PCLRR_LCDCTLL3 (0x08) | ||
974 | #define MCF_GPIO_PCLRR_LCDCTLL_PCLRR_LCDCTLL4 (0x10) | ||
975 | #define MCF_GPIO_PCLRR_LCDCTLL_PCLRR_LCDCTLL5 (0x20) | ||
976 | #define MCF_GPIO_PCLRR_LCDCTLL_PCLRR_LCDCTLL6 (0x40) | ||
977 | #define MCF_GPIO_PCLRR_LCDCTLL_PCLRR_LCDCTLL7 (0x80) | ||
978 | |||
979 | /* Bit definitions and macros for MCF_GPIO_PAR_FEC */ | ||
980 | #define MCF_GPIO_PAR_FEC_PAR_FEC_MII(x) (((x)&0x03)<<0) | ||
981 | #define MCF_GPIO_PAR_FEC_PAR_FEC_7W(x) (((x)&0x03)<<2) | ||
982 | #define MCF_GPIO_PAR_FEC_PAR_FEC_7W_GPIO (0x00) | ||
983 | #define MCF_GPIO_PAR_FEC_PAR_FEC_7W_URTS1 (0x04) | ||
984 | #define MCF_GPIO_PAR_FEC_PAR_FEC_7W_FEC (0x0C) | ||
985 | #define MCF_GPIO_PAR_FEC_PAR_FEC_MII_GPIO (0x00) | ||
986 | #define MCF_GPIO_PAR_FEC_PAR_FEC_MII_UART (0x01) | ||
987 | #define MCF_GPIO_PAR_FEC_PAR_FEC_MII_FEC (0x03) | ||
988 | |||
989 | /* Bit definitions and macros for MCF_GPIO_PAR_PWM */ | ||
990 | #define MCF_GPIO_PAR_PWM_PAR_PWM1(x) (((x)&0x03)<<0) | ||
991 | #define MCF_GPIO_PAR_PWM_PAR_PWM3(x) (((x)&0x03)<<2) | ||
992 | #define MCF_GPIO_PAR_PWM_PAR_PWM5 (0x10) | ||
993 | #define MCF_GPIO_PAR_PWM_PAR_PWM7 (0x20) | ||
994 | |||
995 | /* Bit definitions and macros for MCF_GPIO_PAR_BUSCTL */ | ||
996 | #define MCF_GPIO_PAR_BUSCTL_PAR_TS(x) (((x)&0x03)<<3) | ||
997 | #define MCF_GPIO_PAR_BUSCTL_PAR_RWB (0x20) | ||
998 | #define MCF_GPIO_PAR_BUSCTL_PAR_TA (0x40) | ||
999 | #define MCF_GPIO_PAR_BUSCTL_PAR_OE (0x80) | ||
1000 | #define MCF_GPIO_PAR_BUSCTL_PAR_OE_GPIO (0x00) | ||
1001 | #define MCF_GPIO_PAR_BUSCTL_PAR_OE_OE (0x80) | ||
1002 | #define MCF_GPIO_PAR_BUSCTL_PAR_TA_GPIO (0x00) | ||
1003 | #define MCF_GPIO_PAR_BUSCTL_PAR_TA_TA (0x40) | ||
1004 | #define MCF_GPIO_PAR_BUSCTL_PAR_RWB_GPIO (0x00) | ||
1005 | #define MCF_GPIO_PAR_BUSCTL_PAR_RWB_RWB (0x20) | ||
1006 | #define MCF_GPIO_PAR_BUSCTL_PAR_TS_GPIO (0x00) | ||
1007 | #define MCF_GPIO_PAR_BUSCTL_PAR_TS_DACK0 (0x10) | ||
1008 | #define MCF_GPIO_PAR_BUSCTL_PAR_TS_TS (0x18) | ||
1009 | |||
1010 | /* Bit definitions and macros for MCF_GPIO_PAR_FECI2C */ | ||
1011 | #define MCF_GPIO_PAR_FECI2C_PAR_SDA(x) (((x)&0x03)<<0) | ||
1012 | #define MCF_GPIO_PAR_FECI2C_PAR_SCL(x) (((x)&0x03)<<2) | ||
1013 | #define MCF_GPIO_PAR_FECI2C_PAR_MDIO(x) (((x)&0x03)<<4) | ||
1014 | #define MCF_GPIO_PAR_FECI2C_PAR_MDC(x) (((x)&0x03)<<6) | ||
1015 | #define MCF_GPIO_PAR_FECI2C_PAR_MDC_GPIO (0x00) | ||
1016 | #define MCF_GPIO_PAR_FECI2C_PAR_MDC_UTXD2 (0x40) | ||
1017 | #define MCF_GPIO_PAR_FECI2C_PAR_MDC_SCL (0x80) | ||
1018 | #define MCF_GPIO_PAR_FECI2C_PAR_MDC_EMDC (0xC0) | ||
1019 | #define MCF_GPIO_PAR_FECI2C_PAR_MDIO_GPIO (0x00) | ||
1020 | #define MCF_GPIO_PAR_FECI2C_PAR_MDIO_URXD2 (0x10) | ||
1021 | #define MCF_GPIO_PAR_FECI2C_PAR_MDIO_SDA (0x20) | ||
1022 | #define MCF_GPIO_PAR_FECI2C_PAR_MDIO_EMDIO (0x30) | ||
1023 | #define MCF_GPIO_PAR_FECI2C_PAR_SCL_GPIO (0x00) | ||
1024 | #define MCF_GPIO_PAR_FECI2C_PAR_SCL_UTXD2 (0x04) | ||
1025 | #define MCF_GPIO_PAR_FECI2C_PAR_SCL_SCL (0x0C) | ||
1026 | #define MCF_GPIO_PAR_FECI2C_PAR_SDA_GPIO (0x00) | ||
1027 | #define MCF_GPIO_PAR_FECI2C_PAR_SDA_URXD2 (0x02) | ||
1028 | #define MCF_GPIO_PAR_FECI2C_PAR_SDA_SDA (0x03) | ||
1029 | |||
1030 | /* Bit definitions and macros for MCF_GPIO_PAR_BE */ | ||
1031 | #define MCF_GPIO_PAR_BE_PAR_BE0 (0x01) | ||
1032 | #define MCF_GPIO_PAR_BE_PAR_BE1 (0x02) | ||
1033 | #define MCF_GPIO_PAR_BE_PAR_BE2 (0x04) | ||
1034 | #define MCF_GPIO_PAR_BE_PAR_BE3 (0x08) | ||
1035 | |||
1036 | /* Bit definitions and macros for MCF_GPIO_PAR_CS */ | ||
1037 | #define MCF_GPIO_PAR_CS_PAR_CS1 (0x02) | ||
1038 | #define MCF_GPIO_PAR_CS_PAR_CS2 (0x04) | ||
1039 | #define MCF_GPIO_PAR_CS_PAR_CS3 (0x08) | ||
1040 | #define MCF_GPIO_PAR_CS_PAR_CS4 (0x10) | ||
1041 | #define MCF_GPIO_PAR_CS_PAR_CS5 (0x20) | ||
1042 | #define MCF_GPIO_PAR_CS_PAR_CS_CS1_GPIO (0x00) | ||
1043 | #define MCF_GPIO_PAR_CS_PAR_CS_CS1_SDCS1 (0x01) | ||
1044 | #define MCF_GPIO_PAR_CS_PAR_CS_CS1_CS1 (0x03) | ||
1045 | |||
1046 | /* Bit definitions and macros for MCF_GPIO_PAR_SSI */ | ||
1047 | #define MCF_GPIO_PAR_SSI_PAR_MCLK (0x0080) | ||
1048 | #define MCF_GPIO_PAR_SSI_PAR_TXD(x) (((x)&0x0003)<<8) | ||
1049 | #define MCF_GPIO_PAR_SSI_PAR_RXD(x) (((x)&0x0003)<<10) | ||
1050 | #define MCF_GPIO_PAR_SSI_PAR_FS(x) (((x)&0x0003)<<12) | ||
1051 | #define MCF_GPIO_PAR_SSI_PAR_BCLK(x) (((x)&0x0003)<<14) | ||
1052 | |||
1053 | /* Bit definitions and macros for MCF_GPIO_PAR_UART */ | ||
1054 | #define MCF_GPIO_PAR_UART_PAR_UTXD0 (0x0001) | ||
1055 | #define MCF_GPIO_PAR_UART_PAR_URXD0 (0x0002) | ||
1056 | #define MCF_GPIO_PAR_UART_PAR_URTS0 (0x0004) | ||
1057 | #define MCF_GPIO_PAR_UART_PAR_UCTS0 (0x0008) | ||
1058 | #define MCF_GPIO_PAR_UART_PAR_UTXD1(x) (((x)&0x0003)<<4) | ||
1059 | #define MCF_GPIO_PAR_UART_PAR_URXD1(x) (((x)&0x0003)<<6) | ||
1060 | #define MCF_GPIO_PAR_UART_PAR_URTS1(x) (((x)&0x0003)<<8) | ||
1061 | #define MCF_GPIO_PAR_UART_PAR_UCTS1(x) (((x)&0x0003)<<10) | ||
1062 | #define MCF_GPIO_PAR_UART_PAR_UCTS1_GPIO (0x0000) | ||
1063 | #define MCF_GPIO_PAR_UART_PAR_UCTS1_SSI_BCLK (0x0800) | ||
1064 | #define MCF_GPIO_PAR_UART_PAR_UCTS1_ULPI_D7 (0x0400) | ||
1065 | #define MCF_GPIO_PAR_UART_PAR_UCTS1_UCTS1 (0x0C00) | ||
1066 | #define MCF_GPIO_PAR_UART_PAR_URTS1_GPIO (0x0000) | ||
1067 | #define MCF_GPIO_PAR_UART_PAR_URTS1_SSI_FS (0x0200) | ||
1068 | #define MCF_GPIO_PAR_UART_PAR_URTS1_ULPI_D6 (0x0100) | ||
1069 | #define MCF_GPIO_PAR_UART_PAR_URTS1_URTS1 (0x0300) | ||
1070 | #define MCF_GPIO_PAR_UART_PAR_URXD1_GPIO (0x0000) | ||
1071 | #define MCF_GPIO_PAR_UART_PAR_URXD1_SSI_RXD (0x0080) | ||
1072 | #define MCF_GPIO_PAR_UART_PAR_URXD1_ULPI_D5 (0x0040) | ||
1073 | #define MCF_GPIO_PAR_UART_PAR_URXD1_URXD1 (0x00C0) | ||
1074 | #define MCF_GPIO_PAR_UART_PAR_UTXD1_GPIO (0x0000) | ||
1075 | #define MCF_GPIO_PAR_UART_PAR_UTXD1_SSI_TXD (0x0020) | ||
1076 | #define MCF_GPIO_PAR_UART_PAR_UTXD1_ULPI_D4 (0x0010) | ||
1077 | #define MCF_GPIO_PAR_UART_PAR_UTXD1_UTXD1 (0x0030) | ||
1078 | |||
1079 | /* Bit definitions and macros for MCF_GPIO_PAR_QSPI */ | ||
1080 | #define MCF_GPIO_PAR_QSPI_PAR_SCK(x) (((x)&0x0003)<<4) | ||
1081 | #define MCF_GPIO_PAR_QSPI_PAR_DOUT(x) (((x)&0x0003)<<6) | ||
1082 | #define MCF_GPIO_PAR_QSPI_PAR_DIN(x) (((x)&0x0003)<<8) | ||
1083 | #define MCF_GPIO_PAR_QSPI_PAR_PCS0(x) (((x)&0x0003)<<10) | ||
1084 | #define MCF_GPIO_PAR_QSPI_PAR_PCS1(x) (((x)&0x0003)<<12) | ||
1085 | #define MCF_GPIO_PAR_QSPI_PAR_PCS2(x) (((x)&0x0003)<<14) | ||
1086 | |||
1087 | /* Bit definitions and macros for MCF_GPIO_PAR_TIMER */ | ||
1088 | #define MCF_GPIO_PAR_TIMER_PAR_TIN0(x) (((x)&0x03)<<0) | ||
1089 | #define MCF_GPIO_PAR_TIMER_PAR_TIN1(x) (((x)&0x03)<<2) | ||
1090 | #define MCF_GPIO_PAR_TIMER_PAR_TIN2(x) (((x)&0x03)<<4) | ||
1091 | #define MCF_GPIO_PAR_TIMER_PAR_TIN3(x) (((x)&0x03)<<6) | ||
1092 | #define MCF_GPIO_PAR_TIMER_PAR_TIN3_GPIO (0x00) | ||
1093 | #define MCF_GPIO_PAR_TIMER_PAR_TIN3_TOUT3 (0x80) | ||
1094 | #define MCF_GPIO_PAR_TIMER_PAR_TIN3_URXD2 (0x40) | ||
1095 | #define MCF_GPIO_PAR_TIMER_PAR_TIN3_TIN3 (0xC0) | ||
1096 | #define MCF_GPIO_PAR_TIMER_PAR_TIN2_GPIO (0x00) | ||
1097 | #define MCF_GPIO_PAR_TIMER_PAR_TIN2_TOUT2 (0x20) | ||
1098 | #define MCF_GPIO_PAR_TIMER_PAR_TIN2_UTXD2 (0x10) | ||
1099 | #define MCF_GPIO_PAR_TIMER_PAR_TIN2_TIN2 (0x30) | ||
1100 | #define MCF_GPIO_PAR_TIMER_PAR_TIN1_GPIO (0x00) | ||
1101 | #define MCF_GPIO_PAR_TIMER_PAR_TIN1_TOUT1 (0x08) | ||
1102 | #define MCF_GPIO_PAR_TIMER_PAR_TIN1_DACK1 (0x04) | ||
1103 | #define MCF_GPIO_PAR_TIMER_PAR_TIN1_TIN1 (0x0C) | ||
1104 | #define MCF_GPIO_PAR_TIMER_PAR_TIN0_GPIO (0x00) | ||
1105 | #define MCF_GPIO_PAR_TIMER_PAR_TIN0_TOUT0 (0x02) | ||
1106 | #define MCF_GPIO_PAR_TIMER_PAR_TIN0_DREQ0 (0x01) | ||
1107 | #define MCF_GPIO_PAR_TIMER_PAR_TIN0_TIN0 (0x03) | ||
1108 | |||
1109 | /* Bit definitions and macros for MCF_GPIO_PAR_LCDDATA */ | ||
1110 | #define MCF_GPIO_PAR_LCDDATA_PAR_LD7_0(x) (((x)&0x03)<<0) | ||
1111 | #define MCF_GPIO_PAR_LCDDATA_PAR_LD15_8(x) (((x)&0x03)<<2) | ||
1112 | #define MCF_GPIO_PAR_LCDDATA_PAR_LD16(x) (((x)&0x03)<<4) | ||
1113 | #define MCF_GPIO_PAR_LCDDATA_PAR_LD17(x) (((x)&0x03)<<6) | ||
1114 | |||
1115 | /* Bit definitions and macros for MCF_GPIO_PAR_LCDCTL */ | ||
1116 | #define MCF_GPIO_PAR_LCDCTL_PAR_CLS (0x0001) | ||
1117 | #define MCF_GPIO_PAR_LCDCTL_PAR_PS (0x0002) | ||
1118 | #define MCF_GPIO_PAR_LCDCTL_PAR_REV (0x0004) | ||
1119 | #define MCF_GPIO_PAR_LCDCTL_PAR_SPL_SPR (0x0008) | ||
1120 | #define MCF_GPIO_PAR_LCDCTL_PAR_CONTRAST (0x0010) | ||
1121 | #define MCF_GPIO_PAR_LCDCTL_PAR_LSCLK (0x0020) | ||
1122 | #define MCF_GPIO_PAR_LCDCTL_PAR_LP_HSYNC (0x0040) | ||
1123 | #define MCF_GPIO_PAR_LCDCTL_PAR_FLM_VSYNC (0x0080) | ||
1124 | #define MCF_GPIO_PAR_LCDCTL_PAR_ACD_OE (0x0100) | ||
1125 | |||
1126 | /* Bit definitions and macros for MCF_GPIO_PAR_IRQ */ | ||
1127 | #define MCF_GPIO_PAR_IRQ_PAR_IRQ1(x) (((x)&0x0003)<<4) | ||
1128 | #define MCF_GPIO_PAR_IRQ_PAR_IRQ2(x) (((x)&0x0003)<<6) | ||
1129 | #define MCF_GPIO_PAR_IRQ_PAR_IRQ4(x) (((x)&0x0003)<<8) | ||
1130 | #define MCF_GPIO_PAR_IRQ_PAR_IRQ5(x) (((x)&0x0003)<<10) | ||
1131 | #define MCF_GPIO_PAR_IRQ_PAR_IRQ6(x) (((x)&0x0003)<<12) | ||
1132 | |||
1133 | /* Bit definitions and macros for MCF_GPIO_MSCR_FLEXBUS */ | ||
1134 | #define MCF_GPIO_MSCR_FLEXBUS_MSCR_ADDRCTL(x) (((x)&0x03)<<0) | ||
1135 | #define MCF_GPIO_MSCR_FLEXBUS_MSCR_DLOWER(x) (((x)&0x03)<<2) | ||
1136 | #define MCF_GPIO_MSCR_FLEXBUS_MSCR_DUPPER(x) (((x)&0x03)<<4) | ||
1137 | |||
1138 | /* Bit definitions and macros for MCF_GPIO_MSCR_SDRAM */ | ||
1139 | #define MCF_GPIO_MSCR_SDRAM_MSCR_SDRAM(x) (((x)&0x03)<<0) | ||
1140 | #define MCF_GPIO_MSCR_SDRAM_MSCR_SDCLK(x) (((x)&0x03)<<2) | ||
1141 | #define MCF_GPIO_MSCR_SDRAM_MSCR_SDCLKB(x) (((x)&0x03)<<4) | ||
1142 | |||
1143 | /* Bit definitions and macros for MCF_GPIO_DSCR_I2C */ | ||
1144 | #define MCF_GPIO_DSCR_I2C_I2C_DSE(x) (((x)&0x03)<<0) | ||
1145 | |||
1146 | /* Bit definitions and macros for MCF_GPIO_DSCR_PWM */ | ||
1147 | #define MCF_GPIO_DSCR_PWM_PWM_DSE(x) (((x)&0x03)<<0) | ||
1148 | |||
1149 | /* Bit definitions and macros for MCF_GPIO_DSCR_FEC */ | ||
1150 | #define MCF_GPIO_DSCR_FEC_FEC_DSE(x) (((x)&0x03)<<0) | ||
1151 | |||
1152 | /* Bit definitions and macros for MCF_GPIO_DSCR_UART */ | ||
1153 | #define MCF_GPIO_DSCR_UART_UART0_DSE(x) (((x)&0x03)<<0) | ||
1154 | #define MCF_GPIO_DSCR_UART_UART1_DSE(x) (((x)&0x03)<<2) | ||
1155 | |||
1156 | /* Bit definitions and macros for MCF_GPIO_DSCR_QSPI */ | ||
1157 | #define MCF_GPIO_DSCR_QSPI_QSPI_DSE(x) (((x)&0x03)<<0) | ||
1158 | |||
1159 | /* Bit definitions and macros for MCF_GPIO_DSCR_TIMER */ | ||
1160 | #define MCF_GPIO_DSCR_TIMER_TIMER_DSE(x) (((x)&0x03)<<0) | ||
1161 | |||
1162 | /* Bit definitions and macros for MCF_GPIO_DSCR_SSI */ | ||
1163 | #define MCF_GPIO_DSCR_SSI_SSI_DSE(x) (((x)&0x03)<<0) | ||
1164 | |||
1165 | /* Bit definitions and macros for MCF_GPIO_DSCR_LCD */ | ||
1166 | #define MCF_GPIO_DSCR_LCD_LCD_DSE(x) (((x)&0x03)<<0) | ||
1167 | |||
1168 | /* Bit definitions and macros for MCF_GPIO_DSCR_DEBUG */ | ||
1169 | #define MCF_GPIO_DSCR_DEBUG_DEBUG_DSE(x) (((x)&0x03)<<0) | ||
1170 | |||
1171 | /* Bit definitions and macros for MCF_GPIO_DSCR_CLKRST */ | ||
1172 | #define MCF_GPIO_DSCR_CLKRST_CLKRST_DSE(x) (((x)&0x03)<<0) | ||
1173 | |||
1174 | /* Bit definitions and macros for MCF_GPIO_DSCR_IRQ */ | ||
1175 | #define MCF_GPIO_DSCR_IRQ_IRQ_DSE(x) (((x)&0x03)<<0) | ||
1176 | |||
1177 | /********************************************************************* | ||
1178 | * | ||
1179 | * Interrupt Controller (INTC) | ||
1180 | * | ||
1181 | *********************************************************************/ | ||
1182 | |||
1183 | /* Register read/write macros */ | ||
1184 | #define MCF_INTC0_IPRH MCF_REG32(0xFC048000) | ||
1185 | #define MCF_INTC0_IPRL MCF_REG32(0xFC048004) | ||
1186 | #define MCF_INTC0_IMRH MCF_REG32(0xFC048008) | ||
1187 | #define MCF_INTC0_IMRL MCF_REG32(0xFC04800C) | ||
1188 | #define MCF_INTC0_INTFRCH MCF_REG32(0xFC048010) | ||
1189 | #define MCF_INTC0_INTFRCL MCF_REG32(0xFC048014) | ||
1190 | #define MCF_INTC0_ICONFIG MCF_REG16(0xFC04801A) | ||
1191 | #define MCF_INTC0_SIMR MCF_REG08(0xFC04801C) | ||
1192 | #define MCF_INTC0_CIMR MCF_REG08(0xFC04801D) | ||
1193 | #define MCF_INTC0_CLMASK MCF_REG08(0xFC04801E) | ||
1194 | #define MCF_INTC0_SLMASK MCF_REG08(0xFC04801F) | ||
1195 | #define MCF_INTC0_ICR0 MCF_REG08(0xFC048040) | ||
1196 | #define MCF_INTC0_ICR1 MCF_REG08(0xFC048041) | ||
1197 | #define MCF_INTC0_ICR2 MCF_REG08(0xFC048042) | ||
1198 | #define MCF_INTC0_ICR3 MCF_REG08(0xFC048043) | ||
1199 | #define MCF_INTC0_ICR4 MCF_REG08(0xFC048044) | ||
1200 | #define MCF_INTC0_ICR5 MCF_REG08(0xFC048045) | ||
1201 | #define MCF_INTC0_ICR6 MCF_REG08(0xFC048046) | ||
1202 | #define MCF_INTC0_ICR7 MCF_REG08(0xFC048047) | ||
1203 | #define MCF_INTC0_ICR8 MCF_REG08(0xFC048048) | ||
1204 | #define MCF_INTC0_ICR9 MCF_REG08(0xFC048049) | ||
1205 | #define MCF_INTC0_ICR10 MCF_REG08(0xFC04804A) | ||
1206 | #define MCF_INTC0_ICR11 MCF_REG08(0xFC04804B) | ||
1207 | #define MCF_INTC0_ICR12 MCF_REG08(0xFC04804C) | ||
1208 | #define MCF_INTC0_ICR13 MCF_REG08(0xFC04804D) | ||
1209 | #define MCF_INTC0_ICR14 MCF_REG08(0xFC04804E) | ||
1210 | #define MCF_INTC0_ICR15 MCF_REG08(0xFC04804F) | ||
1211 | #define MCF_INTC0_ICR16 MCF_REG08(0xFC048050) | ||
1212 | #define MCF_INTC0_ICR17 MCF_REG08(0xFC048051) | ||
1213 | #define MCF_INTC0_ICR18 MCF_REG08(0xFC048052) | ||
1214 | #define MCF_INTC0_ICR19 MCF_REG08(0xFC048053) | ||
1215 | #define MCF_INTC0_ICR20 MCF_REG08(0xFC048054) | ||
1216 | #define MCF_INTC0_ICR21 MCF_REG08(0xFC048055) | ||
1217 | #define MCF_INTC0_ICR22 MCF_REG08(0xFC048056) | ||
1218 | #define MCF_INTC0_ICR23 MCF_REG08(0xFC048057) | ||
1219 | #define MCF_INTC0_ICR24 MCF_REG08(0xFC048058) | ||
1220 | #define MCF_INTC0_ICR25 MCF_REG08(0xFC048059) | ||
1221 | #define MCF_INTC0_ICR26 MCF_REG08(0xFC04805A) | ||
1222 | #define MCF_INTC0_ICR27 MCF_REG08(0xFC04805B) | ||
1223 | #define MCF_INTC0_ICR28 MCF_REG08(0xFC04805C) | ||
1224 | #define MCF_INTC0_ICR29 MCF_REG08(0xFC04805D) | ||
1225 | #define MCF_INTC0_ICR30 MCF_REG08(0xFC04805E) | ||
1226 | #define MCF_INTC0_ICR31 MCF_REG08(0xFC04805F) | ||
1227 | #define MCF_INTC0_ICR32 MCF_REG08(0xFC048060) | ||
1228 | #define MCF_INTC0_ICR33 MCF_REG08(0xFC048061) | ||
1229 | #define MCF_INTC0_ICR34 MCF_REG08(0xFC048062) | ||
1230 | #define MCF_INTC0_ICR35 MCF_REG08(0xFC048063) | ||
1231 | #define MCF_INTC0_ICR36 MCF_REG08(0xFC048064) | ||
1232 | #define MCF_INTC0_ICR37 MCF_REG08(0xFC048065) | ||
1233 | #define MCF_INTC0_ICR38 MCF_REG08(0xFC048066) | ||
1234 | #define MCF_INTC0_ICR39 MCF_REG08(0xFC048067) | ||
1235 | #define MCF_INTC0_ICR40 MCF_REG08(0xFC048068) | ||
1236 | #define MCF_INTC0_ICR41 MCF_REG08(0xFC048069) | ||
1237 | #define MCF_INTC0_ICR42 MCF_REG08(0xFC04806A) | ||
1238 | #define MCF_INTC0_ICR43 MCF_REG08(0xFC04806B) | ||
1239 | #define MCF_INTC0_ICR44 MCF_REG08(0xFC04806C) | ||
1240 | #define MCF_INTC0_ICR45 MCF_REG08(0xFC04806D) | ||
1241 | #define MCF_INTC0_ICR46 MCF_REG08(0xFC04806E) | ||
1242 | #define MCF_INTC0_ICR47 MCF_REG08(0xFC04806F) | ||
1243 | #define MCF_INTC0_ICR48 MCF_REG08(0xFC048070) | ||
1244 | #define MCF_INTC0_ICR49 MCF_REG08(0xFC048071) | ||
1245 | #define MCF_INTC0_ICR50 MCF_REG08(0xFC048072) | ||
1246 | #define MCF_INTC0_ICR51 MCF_REG08(0xFC048073) | ||
1247 | #define MCF_INTC0_ICR52 MCF_REG08(0xFC048074) | ||
1248 | #define MCF_INTC0_ICR53 MCF_REG08(0xFC048075) | ||
1249 | #define MCF_INTC0_ICR54 MCF_REG08(0xFC048076) | ||
1250 | #define MCF_INTC0_ICR55 MCF_REG08(0xFC048077) | ||
1251 | #define MCF_INTC0_ICR56 MCF_REG08(0xFC048078) | ||
1252 | #define MCF_INTC0_ICR57 MCF_REG08(0xFC048079) | ||
1253 | #define MCF_INTC0_ICR58 MCF_REG08(0xFC04807A) | ||
1254 | #define MCF_INTC0_ICR59 MCF_REG08(0xFC04807B) | ||
1255 | #define MCF_INTC0_ICR60 MCF_REG08(0xFC04807C) | ||
1256 | #define MCF_INTC0_ICR61 MCF_REG08(0xFC04807D) | ||
1257 | #define MCF_INTC0_ICR62 MCF_REG08(0xFC04807E) | ||
1258 | #define MCF_INTC0_ICR63 MCF_REG08(0xFC04807F) | ||
1259 | #define MCF_INTC0_ICR(x) MCF_REG08(0xFC048040+((x)*0x001)) | ||
1260 | #define MCF_INTC0_SWIACK MCF_REG08(0xFC0480E0) | ||
1261 | #define MCF_INTC0_L1IACK MCF_REG08(0xFC0480E4) | ||
1262 | #define MCF_INTC0_L2IACK MCF_REG08(0xFC0480E8) | ||
1263 | #define MCF_INTC0_L3IACK MCF_REG08(0xFC0480EC) | ||
1264 | #define MCF_INTC0_L4IACK MCF_REG08(0xFC0480F0) | ||
1265 | #define MCF_INTC0_L5IACK MCF_REG08(0xFC0480F4) | ||
1266 | #define MCF_INTC0_L6IACK MCF_REG08(0xFC0480F8) | ||
1267 | #define MCF_INTC0_L7IACK MCF_REG08(0xFC0480FC) | ||
1268 | #define MCF_INTC0_LIACK(x) MCF_REG08(0xFC0480E4+((x)*0x004)) | ||
1269 | #define MCF_INTC1_IPRH MCF_REG32(0xFC04C000) | ||
1270 | #define MCF_INTC1_IPRL MCF_REG32(0xFC04C004) | ||
1271 | #define MCF_INTC1_IMRH MCF_REG32(0xFC04C008) | ||
1272 | #define MCF_INTC1_IMRL MCF_REG32(0xFC04C00C) | ||
1273 | #define MCF_INTC1_INTFRCH MCF_REG32(0xFC04C010) | ||
1274 | #define MCF_INTC1_INTFRCL MCF_REG32(0xFC04C014) | ||
1275 | #define MCF_INTC1_ICONFIG MCF_REG16(0xFC04C01A) | ||
1276 | #define MCF_INTC1_SIMR MCF_REG08(0xFC04C01C) | ||
1277 | #define MCF_INTC1_CIMR MCF_REG08(0xFC04C01D) | ||
1278 | #define MCF_INTC1_CLMASK MCF_REG08(0xFC04C01E) | ||
1279 | #define MCF_INTC1_SLMASK MCF_REG08(0xFC04C01F) | ||
1280 | #define MCF_INTC1_ICR0 MCF_REG08(0xFC04C040) | ||
1281 | #define MCF_INTC1_ICR1 MCF_REG08(0xFC04C041) | ||
1282 | #define MCF_INTC1_ICR2 MCF_REG08(0xFC04C042) | ||
1283 | #define MCF_INTC1_ICR3 MCF_REG08(0xFC04C043) | ||
1284 | #define MCF_INTC1_ICR4 MCF_REG08(0xFC04C044) | ||
1285 | #define MCF_INTC1_ICR5 MCF_REG08(0xFC04C045) | ||
1286 | #define MCF_INTC1_ICR6 MCF_REG08(0xFC04C046) | ||
1287 | #define MCF_INTC1_ICR7 MCF_REG08(0xFC04C047) | ||
1288 | #define MCF_INTC1_ICR8 MCF_REG08(0xFC04C048) | ||
1289 | #define MCF_INTC1_ICR9 MCF_REG08(0xFC04C049) | ||
1290 | #define MCF_INTC1_ICR10 MCF_REG08(0xFC04C04A) | ||
1291 | #define MCF_INTC1_ICR11 MCF_REG08(0xFC04C04B) | ||
1292 | #define MCF_INTC1_ICR12 MCF_REG08(0xFC04C04C) | ||
1293 | #define MCF_INTC1_ICR13 MCF_REG08(0xFC04C04D) | ||
1294 | #define MCF_INTC1_ICR14 MCF_REG08(0xFC04C04E) | ||
1295 | #define MCF_INTC1_ICR15 MCF_REG08(0xFC04C04F) | ||
1296 | #define MCF_INTC1_ICR16 MCF_REG08(0xFC04C050) | ||
1297 | #define MCF_INTC1_ICR17 MCF_REG08(0xFC04C051) | ||
1298 | #define MCF_INTC1_ICR18 MCF_REG08(0xFC04C052) | ||
1299 | #define MCF_INTC1_ICR19 MCF_REG08(0xFC04C053) | ||
1300 | #define MCF_INTC1_ICR20 MCF_REG08(0xFC04C054) | ||
1301 | #define MCF_INTC1_ICR21 MCF_REG08(0xFC04C055) | ||
1302 | #define MCF_INTC1_ICR22 MCF_REG08(0xFC04C056) | ||
1303 | #define MCF_INTC1_ICR23 MCF_REG08(0xFC04C057) | ||
1304 | #define MCF_INTC1_ICR24 MCF_REG08(0xFC04C058) | ||
1305 | #define MCF_INTC1_ICR25 MCF_REG08(0xFC04C059) | ||
1306 | #define MCF_INTC1_ICR26 MCF_REG08(0xFC04C05A) | ||
1307 | #define MCF_INTC1_ICR27 MCF_REG08(0xFC04C05B) | ||
1308 | #define MCF_INTC1_ICR28 MCF_REG08(0xFC04C05C) | ||
1309 | #define MCF_INTC1_ICR29 MCF_REG08(0xFC04C05D) | ||
1310 | #define MCF_INTC1_ICR30 MCF_REG08(0xFC04C05E) | ||
1311 | #define MCF_INTC1_ICR31 MCF_REG08(0xFC04C05F) | ||
1312 | #define MCF_INTC1_ICR32 MCF_REG08(0xFC04C060) | ||
1313 | #define MCF_INTC1_ICR33 MCF_REG08(0xFC04C061) | ||
1314 | #define MCF_INTC1_ICR34 MCF_REG08(0xFC04C062) | ||
1315 | #define MCF_INTC1_ICR35 MCF_REG08(0xFC04C063) | ||
1316 | #define MCF_INTC1_ICR36 MCF_REG08(0xFC04C064) | ||
1317 | #define MCF_INTC1_ICR37 MCF_REG08(0xFC04C065) | ||
1318 | #define MCF_INTC1_ICR38 MCF_REG08(0xFC04C066) | ||
1319 | #define MCF_INTC1_ICR39 MCF_REG08(0xFC04C067) | ||
1320 | #define MCF_INTC1_ICR40 MCF_REG08(0xFC04C068) | ||
1321 | #define MCF_INTC1_ICR41 MCF_REG08(0xFC04C069) | ||
1322 | #define MCF_INTC1_ICR42 MCF_REG08(0xFC04C06A) | ||
1323 | #define MCF_INTC1_ICR43 MCF_REG08(0xFC04C06B) | ||
1324 | #define MCF_INTC1_ICR44 MCF_REG08(0xFC04C06C) | ||
1325 | #define MCF_INTC1_ICR45 MCF_REG08(0xFC04C06D) | ||
1326 | #define MCF_INTC1_ICR46 MCF_REG08(0xFC04C06E) | ||
1327 | #define MCF_INTC1_ICR47 MCF_REG08(0xFC04C06F) | ||
1328 | #define MCF_INTC1_ICR48 MCF_REG08(0xFC04C070) | ||
1329 | #define MCF_INTC1_ICR49 MCF_REG08(0xFC04C071) | ||
1330 | #define MCF_INTC1_ICR50 MCF_REG08(0xFC04C072) | ||
1331 | #define MCF_INTC1_ICR51 MCF_REG08(0xFC04C073) | ||
1332 | #define MCF_INTC1_ICR52 MCF_REG08(0xFC04C074) | ||
1333 | #define MCF_INTC1_ICR53 MCF_REG08(0xFC04C075) | ||
1334 | #define MCF_INTC1_ICR54 MCF_REG08(0xFC04C076) | ||
1335 | #define MCF_INTC1_ICR55 MCF_REG08(0xFC04C077) | ||
1336 | #define MCF_INTC1_ICR56 MCF_REG08(0xFC04C078) | ||
1337 | #define MCF_INTC1_ICR57 MCF_REG08(0xFC04C079) | ||
1338 | #define MCF_INTC1_ICR58 MCF_REG08(0xFC04C07A) | ||
1339 | #define MCF_INTC1_ICR59 MCF_REG08(0xFC04C07B) | ||
1340 | #define MCF_INTC1_ICR60 MCF_REG08(0xFC04C07C) | ||
1341 | #define MCF_INTC1_ICR61 MCF_REG08(0xFC04C07D) | ||
1342 | #define MCF_INTC1_ICR62 MCF_REG08(0xFC04C07E) | ||
1343 | #define MCF_INTC1_ICR63 MCF_REG08(0xFC04C07F) | ||
1344 | #define MCF_INTC1_ICR(x) MCF_REG08(0xFC04C040+((x)*0x001)) | ||
1345 | #define MCF_INTC1_SWIACK MCF_REG08(0xFC04C0E0) | ||
1346 | #define MCF_INTC1_L1IACK MCF_REG08(0xFC04C0E4) | ||
1347 | #define MCF_INTC1_L2IACK MCF_REG08(0xFC04C0E8) | ||
1348 | #define MCF_INTC1_L3IACK MCF_REG08(0xFC04C0EC) | ||
1349 | #define MCF_INTC1_L4IACK MCF_REG08(0xFC04C0F0) | ||
1350 | #define MCF_INTC1_L5IACK MCF_REG08(0xFC04C0F4) | ||
1351 | #define MCF_INTC1_L6IACK MCF_REG08(0xFC04C0F8) | ||
1352 | #define MCF_INTC1_L7IACK MCF_REG08(0xFC04C0FC) | ||
1353 | #define MCF_INTC1_LIACK(x) MCF_REG08(0xFC04C0E4+((x)*0x004)) | ||
1354 | #define MCF_INTC_IPRH(x) MCF_REG32(0xFC048000+((x)*0x4000)) | ||
1355 | #define MCF_INTC_IPRL(x) MCF_REG32(0xFC048004+((x)*0x4000)) | ||
1356 | #define MCF_INTC_IMRH(x) MCF_REG32(0xFC048008+((x)*0x4000)) | ||
1357 | #define MCF_INTC_IMRL(x) MCF_REG32(0xFC04800C+((x)*0x4000)) | ||
1358 | #define MCF_INTC_INTFRCH(x) MCF_REG32(0xFC048010+((x)*0x4000)) | ||
1359 | #define MCF_INTC_INTFRCL(x) MCF_REG32(0xFC048014+((x)*0x4000)) | ||
1360 | #define MCF_INTC_ICONFIG(x) MCF_REG16(0xFC04801A+((x)*0x4000)) | ||
1361 | #define MCF_INTC_SIMR(x) MCF_REG08(0xFC04801C+((x)*0x4000)) | ||
1362 | #define MCF_INTC_CIMR(x) MCF_REG08(0xFC04801D+((x)*0x4000)) | ||
1363 | #define MCF_INTC_CLMASK(x) MCF_REG08(0xFC04801E+((x)*0x4000)) | ||
1364 | #define MCF_INTC_SLMASK(x) MCF_REG08(0xFC04801F+((x)*0x4000)) | ||
1365 | #define MCF_INTC_ICR0(x) MCF_REG08(0xFC048040+((x)*0x4000)) | ||
1366 | #define MCF_INTC_ICR1(x) MCF_REG08(0xFC048041+((x)*0x4000)) | ||
1367 | #define MCF_INTC_ICR2(x) MCF_REG08(0xFC048042+((x)*0x4000)) | ||
1368 | #define MCF_INTC_ICR3(x) MCF_REG08(0xFC048043+((x)*0x4000)) | ||
1369 | #define MCF_INTC_ICR4(x) MCF_REG08(0xFC048044+((x)*0x4000)) | ||
1370 | #define MCF_INTC_ICR5(x) MCF_REG08(0xFC048045+((x)*0x4000)) | ||
1371 | #define MCF_INTC_ICR6(x) MCF_REG08(0xFC048046+((x)*0x4000)) | ||
1372 | #define MCF_INTC_ICR7(x) MCF_REG08(0xFC048047+((x)*0x4000)) | ||
1373 | #define MCF_INTC_ICR8(x) MCF_REG08(0xFC048048+((x)*0x4000)) | ||
1374 | #define MCF_INTC_ICR9(x) MCF_REG08(0xFC048049+((x)*0x4000)) | ||
1375 | #define MCF_INTC_ICR10(x) MCF_REG08(0xFC04804A+((x)*0x4000)) | ||
1376 | #define MCF_INTC_ICR11(x) MCF_REG08(0xFC04804B+((x)*0x4000)) | ||
1377 | #define MCF_INTC_ICR12(x) MCF_REG08(0xFC04804C+((x)*0x4000)) | ||
1378 | #define MCF_INTC_ICR13(x) MCF_REG08(0xFC04804D+((x)*0x4000)) | ||
1379 | #define MCF_INTC_ICR14(x) MCF_REG08(0xFC04804E+((x)*0x4000)) | ||
1380 | #define MCF_INTC_ICR15(x) MCF_REG08(0xFC04804F+((x)*0x4000)) | ||
1381 | #define MCF_INTC_ICR16(x) MCF_REG08(0xFC048050+((x)*0x4000)) | ||
1382 | #define MCF_INTC_ICR17(x) MCF_REG08(0xFC048051+((x)*0x4000)) | ||
1383 | #define MCF_INTC_ICR18(x) MCF_REG08(0xFC048052+((x)*0x4000)) | ||
1384 | #define MCF_INTC_ICR19(x) MCF_REG08(0xFC048053+((x)*0x4000)) | ||
1385 | #define MCF_INTC_ICR20(x) MCF_REG08(0xFC048054+((x)*0x4000)) | ||
1386 | #define MCF_INTC_ICR21(x) MCF_REG08(0xFC048055+((x)*0x4000)) | ||
1387 | #define MCF_INTC_ICR22(x) MCF_REG08(0xFC048056+((x)*0x4000)) | ||
1388 | #define MCF_INTC_ICR23(x) MCF_REG08(0xFC048057+((x)*0x4000)) | ||
1389 | #define MCF_INTC_ICR24(x) MCF_REG08(0xFC048058+((x)*0x4000)) | ||
1390 | #define MCF_INTC_ICR25(x) MCF_REG08(0xFC048059+((x)*0x4000)) | ||
1391 | #define MCF_INTC_ICR26(x) MCF_REG08(0xFC04805A+((x)*0x4000)) | ||
1392 | #define MCF_INTC_ICR27(x) MCF_REG08(0xFC04805B+((x)*0x4000)) | ||
1393 | #define MCF_INTC_ICR28(x) MCF_REG08(0xFC04805C+((x)*0x4000)) | ||
1394 | #define MCF_INTC_ICR29(x) MCF_REG08(0xFC04805D+((x)*0x4000)) | ||
1395 | #define MCF_INTC_ICR30(x) MCF_REG08(0xFC04805E+((x)*0x4000)) | ||
1396 | #define MCF_INTC_ICR31(x) MCF_REG08(0xFC04805F+((x)*0x4000)) | ||
1397 | #define MCF_INTC_ICR32(x) MCF_REG08(0xFC048060+((x)*0x4000)) | ||
1398 | #define MCF_INTC_ICR33(x) MCF_REG08(0xFC048061+((x)*0x4000)) | ||
1399 | #define MCF_INTC_ICR34(x) MCF_REG08(0xFC048062+((x)*0x4000)) | ||
1400 | #define MCF_INTC_ICR35(x) MCF_REG08(0xFC048063+((x)*0x4000)) | ||
1401 | #define MCF_INTC_ICR36(x) MCF_REG08(0xFC048064+((x)*0x4000)) | ||
1402 | #define MCF_INTC_ICR37(x) MCF_REG08(0xFC048065+((x)*0x4000)) | ||
1403 | #define MCF_INTC_ICR38(x) MCF_REG08(0xFC048066+((x)*0x4000)) | ||
1404 | #define MCF_INTC_ICR39(x) MCF_REG08(0xFC048067+((x)*0x4000)) | ||
1405 | #define MCF_INTC_ICR40(x) MCF_REG08(0xFC048068+((x)*0x4000)) | ||
1406 | #define MCF_INTC_ICR41(x) MCF_REG08(0xFC048069+((x)*0x4000)) | ||
1407 | #define MCF_INTC_ICR42(x) MCF_REG08(0xFC04806A+((x)*0x4000)) | ||
1408 | #define MCF_INTC_ICR43(x) MCF_REG08(0xFC04806B+((x)*0x4000)) | ||
1409 | #define MCF_INTC_ICR44(x) MCF_REG08(0xFC04806C+((x)*0x4000)) | ||
1410 | #define MCF_INTC_ICR45(x) MCF_REG08(0xFC04806D+((x)*0x4000)) | ||
1411 | #define MCF_INTC_ICR46(x) MCF_REG08(0xFC04806E+((x)*0x4000)) | ||
1412 | #define MCF_INTC_ICR47(x) MCF_REG08(0xFC04806F+((x)*0x4000)) | ||
1413 | #define MCF_INTC_ICR48(x) MCF_REG08(0xFC048070+((x)*0x4000)) | ||
1414 | #define MCF_INTC_ICR49(x) MCF_REG08(0xFC048071+((x)*0x4000)) | ||
1415 | #define MCF_INTC_ICR50(x) MCF_REG08(0xFC048072+((x)*0x4000)) | ||
1416 | #define MCF_INTC_ICR51(x) MCF_REG08(0xFC048073+((x)*0x4000)) | ||
1417 | #define MCF_INTC_ICR52(x) MCF_REG08(0xFC048074+((x)*0x4000)) | ||
1418 | #define MCF_INTC_ICR53(x) MCF_REG08(0xFC048075+((x)*0x4000)) | ||
1419 | #define MCF_INTC_ICR54(x) MCF_REG08(0xFC048076+((x)*0x4000)) | ||
1420 | #define MCF_INTC_ICR55(x) MCF_REG08(0xFC048077+((x)*0x4000)) | ||
1421 | #define MCF_INTC_ICR56(x) MCF_REG08(0xFC048078+((x)*0x4000)) | ||
1422 | #define MCF_INTC_ICR57(x) MCF_REG08(0xFC048079+((x)*0x4000)) | ||
1423 | #define MCF_INTC_ICR58(x) MCF_REG08(0xFC04807A+((x)*0x4000)) | ||
1424 | #define MCF_INTC_ICR59(x) MCF_REG08(0xFC04807B+((x)*0x4000)) | ||
1425 | #define MCF_INTC_ICR60(x) MCF_REG08(0xFC04807C+((x)*0x4000)) | ||
1426 | #define MCF_INTC_ICR61(x) MCF_REG08(0xFC04807D+((x)*0x4000)) | ||
1427 | #define MCF_INTC_ICR62(x) MCF_REG08(0xFC04807E+((x)*0x4000)) | ||
1428 | #define MCF_INTC_ICR63(x) MCF_REG08(0xFC04807F+((x)*0x4000)) | ||
1429 | #define MCF_INTC_SWIACK(x) MCF_REG08(0xFC0480E0+((x)*0x4000)) | ||
1430 | #define MCF_INTC_L1IACK(x) MCF_REG08(0xFC0480E4+((x)*0x4000)) | ||
1431 | #define MCF_INTC_L2IACK(x) MCF_REG08(0xFC0480E8+((x)*0x4000)) | ||
1432 | #define MCF_INTC_L3IACK(x) MCF_REG08(0xFC0480EC+((x)*0x4000)) | ||
1433 | #define MCF_INTC_L4IACK(x) MCF_REG08(0xFC0480F0+((x)*0x4000)) | ||
1434 | #define MCF_INTC_L5IACK(x) MCF_REG08(0xFC0480F4+((x)*0x4000)) | ||
1435 | #define MCF_INTC_L6IACK(x) MCF_REG08(0xFC0480F8+((x)*0x4000)) | ||
1436 | #define MCF_INTC_L7IACK(x) MCF_REG08(0xFC0480FC+((x)*0x4000)) | ||
1437 | |||
1438 | /* Bit definitions and macros for MCF_INTC_IPRH */ | ||
1439 | #define MCF_INTC_IPRH_INT32 (0x00000001) | ||
1440 | #define MCF_INTC_IPRH_INT33 (0x00000002) | ||
1441 | #define MCF_INTC_IPRH_INT34 (0x00000004) | ||
1442 | #define MCF_INTC_IPRH_INT35 (0x00000008) | ||
1443 | #define MCF_INTC_IPRH_INT36 (0x00000010) | ||
1444 | #define MCF_INTC_IPRH_INT37 (0x00000020) | ||
1445 | #define MCF_INTC_IPRH_INT38 (0x00000040) | ||
1446 | #define MCF_INTC_IPRH_INT39 (0x00000080) | ||
1447 | #define MCF_INTC_IPRH_INT40 (0x00000100) | ||
1448 | #define MCF_INTC_IPRH_INT41 (0x00000200) | ||
1449 | #define MCF_INTC_IPRH_INT42 (0x00000400) | ||
1450 | #define MCF_INTC_IPRH_INT43 (0x00000800) | ||
1451 | #define MCF_INTC_IPRH_INT44 (0x00001000) | ||
1452 | #define MCF_INTC_IPRH_INT45 (0x00002000) | ||
1453 | #define MCF_INTC_IPRH_INT46 (0x00004000) | ||
1454 | #define MCF_INTC_IPRH_INT47 (0x00008000) | ||
1455 | #define MCF_INTC_IPRH_INT48 (0x00010000) | ||
1456 | #define MCF_INTC_IPRH_INT49 (0x00020000) | ||
1457 | #define MCF_INTC_IPRH_INT50 (0x00040000) | ||
1458 | #define MCF_INTC_IPRH_INT51 (0x00080000) | ||
1459 | #define MCF_INTC_IPRH_INT52 (0x00100000) | ||
1460 | #define MCF_INTC_IPRH_INT53 (0x00200000) | ||
1461 | #define MCF_INTC_IPRH_INT54 (0x00400000) | ||
1462 | #define MCF_INTC_IPRH_INT55 (0x00800000) | ||
1463 | #define MCF_INTC_IPRH_INT56 (0x01000000) | ||
1464 | #define MCF_INTC_IPRH_INT57 (0x02000000) | ||
1465 | #define MCF_INTC_IPRH_INT58 (0x04000000) | ||
1466 | #define MCF_INTC_IPRH_INT59 (0x08000000) | ||
1467 | #define MCF_INTC_IPRH_INT60 (0x10000000) | ||
1468 | #define MCF_INTC_IPRH_INT61 (0x20000000) | ||
1469 | #define MCF_INTC_IPRH_INT62 (0x40000000) | ||
1470 | #define MCF_INTC_IPRH_INT63 (0x80000000) | ||
1471 | |||
1472 | /* Bit definitions and macros for MCF_INTC_IPRL */ | ||
1473 | #define MCF_INTC_IPRL_INT0 (0x00000001) | ||
1474 | #define MCF_INTC_IPRL_INT1 (0x00000002) | ||
1475 | #define MCF_INTC_IPRL_INT2 (0x00000004) | ||
1476 | #define MCF_INTC_IPRL_INT3 (0x00000008) | ||
1477 | #define MCF_INTC_IPRL_INT4 (0x00000010) | ||
1478 | #define MCF_INTC_IPRL_INT5 (0x00000020) | ||
1479 | #define MCF_INTC_IPRL_INT6 (0x00000040) | ||
1480 | #define MCF_INTC_IPRL_INT7 (0x00000080) | ||
1481 | #define MCF_INTC_IPRL_INT8 (0x00000100) | ||
1482 | #define MCF_INTC_IPRL_INT9 (0x00000200) | ||
1483 | #define MCF_INTC_IPRL_INT10 (0x00000400) | ||
1484 | #define MCF_INTC_IPRL_INT11 (0x00000800) | ||
1485 | #define MCF_INTC_IPRL_INT12 (0x00001000) | ||
1486 | #define MCF_INTC_IPRL_INT13 (0x00002000) | ||
1487 | #define MCF_INTC_IPRL_INT14 (0x00004000) | ||
1488 | #define MCF_INTC_IPRL_INT15 (0x00008000) | ||
1489 | #define MCF_INTC_IPRL_INT16 (0x00010000) | ||
1490 | #define MCF_INTC_IPRL_INT17 (0x00020000) | ||
1491 | #define MCF_INTC_IPRL_INT18 (0x00040000) | ||
1492 | #define MCF_INTC_IPRL_INT19 (0x00080000) | ||
1493 | #define MCF_INTC_IPRL_INT20 (0x00100000) | ||
1494 | #define MCF_INTC_IPRL_INT21 (0x00200000) | ||
1495 | #define MCF_INTC_IPRL_INT22 (0x00400000) | ||
1496 | #define MCF_INTC_IPRL_INT23 (0x00800000) | ||
1497 | #define MCF_INTC_IPRL_INT24 (0x01000000) | ||
1498 | #define MCF_INTC_IPRL_INT25 (0x02000000) | ||
1499 | #define MCF_INTC_IPRL_INT26 (0x04000000) | ||
1500 | #define MCF_INTC_IPRL_INT27 (0x08000000) | ||
1501 | #define MCF_INTC_IPRL_INT28 (0x10000000) | ||
1502 | #define MCF_INTC_IPRL_INT29 (0x20000000) | ||
1503 | #define MCF_INTC_IPRL_INT30 (0x40000000) | ||
1504 | #define MCF_INTC_IPRL_INT31 (0x80000000) | ||
1505 | |||
1506 | /* Bit definitions and macros for MCF_INTC_IMRH */ | ||
1507 | #define MCF_INTC_IMRH_INT_MASK32 (0x00000001) | ||
1508 | #define MCF_INTC_IMRH_INT_MASK33 (0x00000002) | ||
1509 | #define MCF_INTC_IMRH_INT_MASK34 (0x00000004) | ||
1510 | #define MCF_INTC_IMRH_INT_MASK35 (0x00000008) | ||
1511 | #define MCF_INTC_IMRH_INT_MASK36 (0x00000010) | ||
1512 | #define MCF_INTC_IMRH_INT_MASK37 (0x00000020) | ||
1513 | #define MCF_INTC_IMRH_INT_MASK38 (0x00000040) | ||
1514 | #define MCF_INTC_IMRH_INT_MASK39 (0x00000080) | ||
1515 | #define MCF_INTC_IMRH_INT_MASK40 (0x00000100) | ||
1516 | #define MCF_INTC_IMRH_INT_MASK41 (0x00000200) | ||
1517 | #define MCF_INTC_IMRH_INT_MASK42 (0x00000400) | ||
1518 | #define MCF_INTC_IMRH_INT_MASK43 (0x00000800) | ||
1519 | #define MCF_INTC_IMRH_INT_MASK44 (0x00001000) | ||
1520 | #define MCF_INTC_IMRH_INT_MASK45 (0x00002000) | ||
1521 | #define MCF_INTC_IMRH_INT_MASK46 (0x00004000) | ||
1522 | #define MCF_INTC_IMRH_INT_MASK47 (0x00008000) | ||
1523 | #define MCF_INTC_IMRH_INT_MASK48 (0x00010000) | ||
1524 | #define MCF_INTC_IMRH_INT_MASK49 (0x00020000) | ||
1525 | #define MCF_INTC_IMRH_INT_MASK50 (0x00040000) | ||
1526 | #define MCF_INTC_IMRH_INT_MASK51 (0x00080000) | ||
1527 | #define MCF_INTC_IMRH_INT_MASK52 (0x00100000) | ||
1528 | #define MCF_INTC_IMRH_INT_MASK53 (0x00200000) | ||
1529 | #define MCF_INTC_IMRH_INT_MASK54 (0x00400000) | ||
1530 | #define MCF_INTC_IMRH_INT_MASK55 (0x00800000) | ||
1531 | #define MCF_INTC_IMRH_INT_MASK56 (0x01000000) | ||
1532 | #define MCF_INTC_IMRH_INT_MASK57 (0x02000000) | ||
1533 | #define MCF_INTC_IMRH_INT_MASK58 (0x04000000) | ||
1534 | #define MCF_INTC_IMRH_INT_MASK59 (0x08000000) | ||
1535 | #define MCF_INTC_IMRH_INT_MASK60 (0x10000000) | ||
1536 | #define MCF_INTC_IMRH_INT_MASK61 (0x20000000) | ||
1537 | #define MCF_INTC_IMRH_INT_MASK62 (0x40000000) | ||
1538 | #define MCF_INTC_IMRH_INT_MASK63 (0x80000000) | ||
1539 | |||
1540 | /* Bit definitions and macros for MCF_INTC_IMRL */ | ||
1541 | #define MCF_INTC_IMRL_INT_MASK0 (0x00000001) | ||
1542 | #define MCF_INTC_IMRL_INT_MASK1 (0x00000002) | ||
1543 | #define MCF_INTC_IMRL_INT_MASK2 (0x00000004) | ||
1544 | #define MCF_INTC_IMRL_INT_MASK3 (0x00000008) | ||
1545 | #define MCF_INTC_IMRL_INT_MASK4 (0x00000010) | ||
1546 | #define MCF_INTC_IMRL_INT_MASK5 (0x00000020) | ||
1547 | #define MCF_INTC_IMRL_INT_MASK6 (0x00000040) | ||
1548 | #define MCF_INTC_IMRL_INT_MASK7 (0x00000080) | ||
1549 | #define MCF_INTC_IMRL_INT_MASK8 (0x00000100) | ||
1550 | #define MCF_INTC_IMRL_INT_MASK9 (0x00000200) | ||
1551 | #define MCF_INTC_IMRL_INT_MASK10 (0x00000400) | ||
1552 | #define MCF_INTC_IMRL_INT_MASK11 (0x00000800) | ||
1553 | #define MCF_INTC_IMRL_INT_MASK12 (0x00001000) | ||
1554 | #define MCF_INTC_IMRL_INT_MASK13 (0x00002000) | ||
1555 | #define MCF_INTC_IMRL_INT_MASK14 (0x00004000) | ||
1556 | #define MCF_INTC_IMRL_INT_MASK15 (0x00008000) | ||
1557 | #define MCF_INTC_IMRL_INT_MASK16 (0x00010000) | ||
1558 | #define MCF_INTC_IMRL_INT_MASK17 (0x00020000) | ||
1559 | #define MCF_INTC_IMRL_INT_MASK18 (0x00040000) | ||
1560 | #define MCF_INTC_IMRL_INT_MASK19 (0x00080000) | ||
1561 | #define MCF_INTC_IMRL_INT_MASK20 (0x00100000) | ||
1562 | #define MCF_INTC_IMRL_INT_MASK21 (0x00200000) | ||
1563 | #define MCF_INTC_IMRL_INT_MASK22 (0x00400000) | ||
1564 | #define MCF_INTC_IMRL_INT_MASK23 (0x00800000) | ||
1565 | #define MCF_INTC_IMRL_INT_MASK24 (0x01000000) | ||
1566 | #define MCF_INTC_IMRL_INT_MASK25 (0x02000000) | ||
1567 | #define MCF_INTC_IMRL_INT_MASK26 (0x04000000) | ||
1568 | #define MCF_INTC_IMRL_INT_MASK27 (0x08000000) | ||
1569 | #define MCF_INTC_IMRL_INT_MASK28 (0x10000000) | ||
1570 | #define MCF_INTC_IMRL_INT_MASK29 (0x20000000) | ||
1571 | #define MCF_INTC_IMRL_INT_MASK30 (0x40000000) | ||
1572 | #define MCF_INTC_IMRL_INT_MASK31 (0x80000000) | ||
1573 | |||
1574 | /* Bit definitions and macros for MCF_INTC_INTFRCH */ | ||
1575 | #define MCF_INTC_INTFRCH_INTFRC32 (0x00000001) | ||
1576 | #define MCF_INTC_INTFRCH_INTFRC33 (0x00000002) | ||
1577 | #define MCF_INTC_INTFRCH_INTFRC34 (0x00000004) | ||
1578 | #define MCF_INTC_INTFRCH_INTFRC35 (0x00000008) | ||
1579 | #define MCF_INTC_INTFRCH_INTFRC36 (0x00000010) | ||
1580 | #define MCF_INTC_INTFRCH_INTFRC37 (0x00000020) | ||
1581 | #define MCF_INTC_INTFRCH_INTFRC38 (0x00000040) | ||
1582 | #define MCF_INTC_INTFRCH_INTFRC39 (0x00000080) | ||
1583 | #define MCF_INTC_INTFRCH_INTFRC40 (0x00000100) | ||
1584 | #define MCF_INTC_INTFRCH_INTFRC41 (0x00000200) | ||
1585 | #define MCF_INTC_INTFRCH_INTFRC42 (0x00000400) | ||
1586 | #define MCF_INTC_INTFRCH_INTFRC43 (0x00000800) | ||
1587 | #define MCF_INTC_INTFRCH_INTFRC44 (0x00001000) | ||
1588 | #define MCF_INTC_INTFRCH_INTFRC45 (0x00002000) | ||
1589 | #define MCF_INTC_INTFRCH_INTFRC46 (0x00004000) | ||
1590 | #define MCF_INTC_INTFRCH_INTFRC47 (0x00008000) | ||
1591 | #define MCF_INTC_INTFRCH_INTFRC48 (0x00010000) | ||
1592 | #define MCF_INTC_INTFRCH_INTFRC49 (0x00020000) | ||
1593 | #define MCF_INTC_INTFRCH_INTFRC50 (0x00040000) | ||
1594 | #define MCF_INTC_INTFRCH_INTFRC51 (0x00080000) | ||
1595 | #define MCF_INTC_INTFRCH_INTFRC52 (0x00100000) | ||
1596 | #define MCF_INTC_INTFRCH_INTFRC53 (0x00200000) | ||
1597 | #define MCF_INTC_INTFRCH_INTFRC54 (0x00400000) | ||
1598 | #define MCF_INTC_INTFRCH_INTFRC55 (0x00800000) | ||
1599 | #define MCF_INTC_INTFRCH_INTFRC56 (0x01000000) | ||
1600 | #define MCF_INTC_INTFRCH_INTFRC57 (0x02000000) | ||
1601 | #define MCF_INTC_INTFRCH_INTFRC58 (0x04000000) | ||
1602 | #define MCF_INTC_INTFRCH_INTFRC59 (0x08000000) | ||
1603 | #define MCF_INTC_INTFRCH_INTFRC60 (0x10000000) | ||
1604 | #define MCF_INTC_INTFRCH_INTFRC61 (0x20000000) | ||
1605 | #define MCF_INTC_INTFRCH_INTFRC62 (0x40000000) | ||
1606 | #define MCF_INTC_INTFRCH_INTFRC63 (0x80000000) | ||
1607 | |||
1608 | /* Bit definitions and macros for MCF_INTC_INTFRCL */ | ||
1609 | #define MCF_INTC_INTFRCL_INTFRC0 (0x00000001) | ||
1610 | #define MCF_INTC_INTFRCL_INTFRC1 (0x00000002) | ||
1611 | #define MCF_INTC_INTFRCL_INTFRC2 (0x00000004) | ||
1612 | #define MCF_INTC_INTFRCL_INTFRC3 (0x00000008) | ||
1613 | #define MCF_INTC_INTFRCL_INTFRC4 (0x00000010) | ||
1614 | #define MCF_INTC_INTFRCL_INTFRC5 (0x00000020) | ||
1615 | #define MCF_INTC_INTFRCL_INTFRC6 (0x00000040) | ||
1616 | #define MCF_INTC_INTFRCL_INTFRC7 (0x00000080) | ||
1617 | #define MCF_INTC_INTFRCL_INTFRC8 (0x00000100) | ||
1618 | #define MCF_INTC_INTFRCL_INTFRC9 (0x00000200) | ||
1619 | #define MCF_INTC_INTFRCL_INTFRC10 (0x00000400) | ||
1620 | #define MCF_INTC_INTFRCL_INTFRC11 (0x00000800) | ||
1621 | #define MCF_INTC_INTFRCL_INTFRC12 (0x00001000) | ||
1622 | #define MCF_INTC_INTFRCL_INTFRC13 (0x00002000) | ||
1623 | #define MCF_INTC_INTFRCL_INTFRC14 (0x00004000) | ||
1624 | #define MCF_INTC_INTFRCL_INTFRC15 (0x00008000) | ||
1625 | #define MCF_INTC_INTFRCL_INTFRC16 (0x00010000) | ||
1626 | #define MCF_INTC_INTFRCL_INTFRC17 (0x00020000) | ||
1627 | #define MCF_INTC_INTFRCL_INTFRC18 (0x00040000) | ||
1628 | #define MCF_INTC_INTFRCL_INTFRC19 (0x00080000) | ||
1629 | #define MCF_INTC_INTFRCL_INTFRC20 (0x00100000) | ||
1630 | #define MCF_INTC_INTFRCL_INTFRC21 (0x00200000) | ||
1631 | #define MCF_INTC_INTFRCL_INTFRC22 (0x00400000) | ||
1632 | #define MCF_INTC_INTFRCL_INTFRC23 (0x00800000) | ||
1633 | #define MCF_INTC_INTFRCL_INTFRC24 (0x01000000) | ||
1634 | #define MCF_INTC_INTFRCL_INTFRC25 (0x02000000) | ||
1635 | #define MCF_INTC_INTFRCL_INTFRC26 (0x04000000) | ||
1636 | #define MCF_INTC_INTFRCL_INTFRC27 (0x08000000) | ||
1637 | #define MCF_INTC_INTFRCL_INTFRC28 (0x10000000) | ||
1638 | #define MCF_INTC_INTFRCL_INTFRC29 (0x20000000) | ||
1639 | #define MCF_INTC_INTFRCL_INTFRC30 (0x40000000) | ||
1640 | #define MCF_INTC_INTFRCL_INTFRC31 (0x80000000) | ||
1641 | |||
1642 | /* Bit definitions and macros for MCF_INTC_ICONFIG */ | ||
1643 | #define MCF_INTC_ICONFIG_EMASK (0x0020) | ||
1644 | #define MCF_INTC_ICONFIG_ELVLPRI1 (0x0200) | ||
1645 | #define MCF_INTC_ICONFIG_ELVLPRI2 (0x0400) | ||
1646 | #define MCF_INTC_ICONFIG_ELVLPRI3 (0x0800) | ||
1647 | #define MCF_INTC_ICONFIG_ELVLPRI4 (0x1000) | ||
1648 | #define MCF_INTC_ICONFIG_ELVLPRI5 (0x2000) | ||
1649 | #define MCF_INTC_ICONFIG_ELVLPRI6 (0x4000) | ||
1650 | #define MCF_INTC_ICONFIG_ELVLPRI7 (0x8000) | ||
1651 | |||
1652 | /* Bit definitions and macros for MCF_INTC_SIMR */ | ||
1653 | #define MCF_INTC_SIMR_SIMR(x) (((x)&0x7F)<<0) | ||
1654 | |||
1655 | /* Bit definitions and macros for MCF_INTC_CIMR */ | ||
1656 | #define MCF_INTC_CIMR_CIMR(x) (((x)&0x7F)<<0) | ||
1657 | |||
1658 | /* Bit definitions and macros for MCF_INTC_CLMASK */ | ||
1659 | #define MCF_INTC_CLMASK_CLMASK(x) (((x)&0x0F)<<0) | ||
1660 | |||
1661 | /* Bit definitions and macros for MCF_INTC_SLMASK */ | ||
1662 | #define MCF_INTC_SLMASK_SLMASK(x) (((x)&0x0F)<<0) | ||
1663 | |||
1664 | /* Bit definitions and macros for MCF_INTC_ICR */ | ||
1665 | #define MCF_INTC_ICR_IL(x) (((x)&0x07)<<0) | ||
1666 | |||
1667 | /* Bit definitions and macros for MCF_INTC_SWIACK */ | ||
1668 | #define MCF_INTC_SWIACK_VECTOR(x) (((x)&0xFF)<<0) | ||
1669 | |||
1670 | /* Bit definitions and macros for MCF_INTC_LIACK */ | ||
1671 | #define MCF_INTC_LIACK_VECTOR(x) (((x)&0xFF)<<0) | ||
1672 | |||
1673 | /********************************************************************/ | ||
1674 | /********************************************************************* | ||
1675 | * | ||
1676 | * LCD Controller (LCDC) | ||
1677 | * | ||
1678 | *********************************************************************/ | ||
1679 | |||
1680 | /* Register read/write macros */ | ||
1681 | #define MCF_LCDC_LSSAR MCF_REG32(0xFC0AC000) | ||
1682 | #define MCF_LCDC_LSR MCF_REG32(0xFC0AC004) | ||
1683 | #define MCF_LCDC_LVPWR MCF_REG32(0xFC0AC008) | ||
1684 | #define MCF_LCDC_LCPR MCF_REG32(0xFC0AC00C) | ||
1685 | #define MCF_LCDC_LCWHBR MCF_REG32(0xFC0AC010) | ||
1686 | #define MCF_LCDC_LCCMR MCF_REG32(0xFC0AC014) | ||
1687 | #define MCF_LCDC_LPCR MCF_REG32(0xFC0AC018) | ||
1688 | #define MCF_LCDC_LHCR MCF_REG32(0xFC0AC01C) | ||
1689 | #define MCF_LCDC_LVCR MCF_REG32(0xFC0AC020) | ||
1690 | #define MCF_LCDC_LPOR MCF_REG32(0xFC0AC024) | ||
1691 | #define MCF_LCDC_LSCR MCF_REG32(0xFC0AC028) | ||
1692 | #define MCF_LCDC_LPCCR MCF_REG32(0xFC0AC02C) | ||
1693 | #define MCF_LCDC_LDCR MCF_REG32(0xFC0AC030) | ||
1694 | #define MCF_LCDC_LRMCR MCF_REG32(0xFC0AC034) | ||
1695 | #define MCF_LCDC_LICR MCF_REG32(0xFC0AC038) | ||
1696 | #define MCF_LCDC_LIER MCF_REG32(0xFC0AC03C) | ||
1697 | #define MCF_LCDC_LISR MCF_REG32(0xFC0AC040) | ||
1698 | #define MCF_LCDC_LGWSAR MCF_REG32(0xFC0AC050) | ||
1699 | #define MCF_LCDC_LGWSR MCF_REG32(0xFC0AC054) | ||
1700 | #define MCF_LCDC_LGWVPWR MCF_REG32(0xFC0AC058) | ||
1701 | #define MCF_LCDC_LGWPOR MCF_REG32(0xFC0AC05C) | ||
1702 | #define MCF_LCDC_LGWPR MCF_REG32(0xFC0AC060) | ||
1703 | #define MCF_LCDC_LGWCR MCF_REG32(0xFC0AC064) | ||
1704 | #define MCF_LCDC_LGWDCR MCF_REG32(0xFC0AC068) | ||
1705 | #define MCF_LCDC_BPLUT_BASE MCF_REG32(0xFC0AC800) | ||
1706 | #define MCF_LCDC_GWLUT_BASE MCF_REG32(0xFC0ACC00) | ||
1707 | |||
1708 | /* Bit definitions and macros for MCF_LCDC_LSSAR */ | ||
1709 | #define MCF_LCDC_LSSAR_SSA(x) (((x)&0x3FFFFFFF)<<2) | ||
1710 | |||
1711 | /* Bit definitions and macros for MCF_LCDC_LSR */ | ||
1712 | #define MCF_LCDC_LSR_YMAX(x) (((x)&0x000003FF)<<0) | ||
1713 | #define MCF_LCDC_LSR_XMAX(x) (((x)&0x0000003F)<<20) | ||
1714 | |||
1715 | /* Bit definitions and macros for MCF_LCDC_LVPWR */ | ||
1716 | #define MCF_LCDC_LVPWR_VPW(x) (((x)&0x000003FF)<<0) | ||
1717 | |||
1718 | /* Bit definitions and macros for MCF_LCDC_LCPR */ | ||
1719 | #define MCF_LCDC_LCPR_CYP(x) (((x)&0x000003FF)<<0) | ||
1720 | #define MCF_LCDC_LCPR_CXP(x) (((x)&0x000003FF)<<16) | ||
1721 | #define MCF_LCDC_LCPR_OP (0x10000000) | ||
1722 | #define MCF_LCDC_LCPR_CC(x) (((x)&0x00000003)<<30) | ||
1723 | #define MCF_LCDC_LCPR_CC_TRANSPARENT (0x00000000) | ||
1724 | #define MCF_LCDC_LCPR_CC_OR (0x40000000) | ||
1725 | #define MCF_LCDC_LCPR_CC_XOR (0x80000000) | ||
1726 | #define MCF_LCDC_LCPR_CC_AND (0xC0000000) | ||
1727 | #define MCF_LCDC_LCPR_OP_ON (0x10000000) | ||
1728 | #define MCF_LCDC_LCPR_OP_OFF (0x00000000) | ||
1729 | |||
1730 | /* Bit definitions and macros for MCF_LCDC_LCWHBR */ | ||
1731 | #define MCF_LCDC_LCWHBR_BD(x) (((x)&0x000000FF)<<0) | ||
1732 | #define MCF_LCDC_LCWHBR_CH(x) (((x)&0x0000001F)<<16) | ||
1733 | #define MCF_LCDC_LCWHBR_CW(x) (((x)&0x0000001F)<<24) | ||
1734 | #define MCF_LCDC_LCWHBR_BK_EN (0x80000000) | ||
1735 | #define MCF_LCDC_LCWHBR_BK_EN_ON (0x80000000) | ||
1736 | #define MCF_LCDC_LCWHBR_BK_EN_OFF (0x00000000) | ||
1737 | |||
1738 | /* Bit definitions and macros for MCF_LCDC_LCCMR */ | ||
1739 | #define MCF_LCDC_LCCMR_CUR_COL_B(x) (((x)&0x0000003F)<<0) | ||
1740 | #define MCF_LCDC_LCCMR_CUR_COL_G(x) (((x)&0x0000003F)<<6) | ||
1741 | #define MCF_LCDC_LCCMR_CUR_COL_R(x) (((x)&0x0000003F)<<12) | ||
1742 | |||
1743 | /* Bit definitions and macros for MCF_LCDC_LPCR */ | ||
1744 | #define MCF_LCDC_LPCR_PCD(x) (((x)&0x0000003F)<<0) | ||
1745 | #define MCF_LCDC_LPCR_SHARP (0x00000040) | ||
1746 | #define MCF_LCDC_LPCR_SCLKSEL (0x00000080) | ||
1747 | #define MCF_LCDC_LPCR_ACD(x) (((x)&0x0000007F)<<8) | ||
1748 | #define MCF_LCDC_LPCR_ACDSEL (0x00008000) | ||
1749 | #define MCF_LCDC_LPCR_REV_VS (0x00010000) | ||
1750 | #define MCF_LCDC_LPCR_SWAP_SEL (0x00020000) | ||
1751 | #define MCF_LCDC_LPCR_ENDSEL (0x00040000) | ||
1752 | #define MCF_LCDC_LPCR_SCLKIDLE (0x00080000) | ||
1753 | #define MCF_LCDC_LPCR_OEPOL (0x00100000) | ||
1754 | #define MCF_LCDC_LPCR_CLKPOL (0x00200000) | ||
1755 | #define MCF_LCDC_LPCR_LPPOL (0x00400000) | ||
1756 | #define MCF_LCDC_LPCR_FLM (0x00800000) | ||
1757 | #define MCF_LCDC_LPCR_PIXPOL (0x01000000) | ||
1758 | #define MCF_LCDC_LPCR_BPIX(x) (((x)&0x00000007)<<25) | ||
1759 | #define MCF_LCDC_LPCR_PBSIZ(x) (((x)&0x00000003)<<28) | ||
1760 | #define MCF_LCDC_LPCR_COLOR (0x40000000) | ||
1761 | #define MCF_LCDC_LPCR_TFT (0x80000000) | ||
1762 | #define MCF_LCDC_LPCR_MODE_MONOCGROME (0x00000000) | ||
1763 | #define MCF_LCDC_LPCR_MODE_CSTN (0x40000000) | ||
1764 | #define MCF_LCDC_LPCR_MODE_TFT (0xC0000000) | ||
1765 | #define MCF_LCDC_LPCR_PBSIZ_1 (0x00000000) | ||
1766 | #define MCF_LCDC_LPCR_PBSIZ_2 (0x10000000) | ||
1767 | #define MCF_LCDC_LPCR_PBSIZ_4 (0x20000000) | ||
1768 | #define MCF_LCDC_LPCR_PBSIZ_8 (0x30000000) | ||
1769 | #define MCF_LCDC_LPCR_BPIX_1bpp (0x00000000) | ||
1770 | #define MCF_LCDC_LPCR_BPIX_2bpp (0x02000000) | ||
1771 | #define MCF_LCDC_LPCR_BPIX_4bpp (0x04000000) | ||
1772 | #define MCF_LCDC_LPCR_BPIX_8bpp (0x06000000) | ||
1773 | #define MCF_LCDC_LPCR_BPIX_12bpp (0x08000000) | ||
1774 | #define MCF_LCDC_LPCR_BPIX_16bpp (0x0A000000) | ||
1775 | #define MCF_LCDC_LPCR_BPIX_18bpp (0x0C000000) | ||
1776 | |||
1777 | #define MCF_LCDC_LPCR_PANEL_TYPE(x) (((x)&0x00000003)<<30) | ||
1778 | |||
1779 | /* Bit definitions and macros for MCF_LCDC_LHCR */ | ||
1780 | #define MCF_LCDC_LHCR_H_WAIT_2(x) (((x)&0x000000FF)<<0) | ||
1781 | #define MCF_LCDC_LHCR_H_WAIT_1(x) (((x)&0x000000FF)<<8) | ||
1782 | #define MCF_LCDC_LHCR_H_WIDTH(x) (((x)&0x0000003F)<<26) | ||
1783 | |||
1784 | /* Bit definitions and macros for MCF_LCDC_LVCR */ | ||
1785 | #define MCF_LCDC_LVCR_V_WAIT_2(x) (((x)&0x000000FF)<<0) | ||
1786 | #define MCF_LCDC_LVCR_V_WAIT_1(x) (((x)&0x000000FF)<<8) | ||
1787 | #define MCF_LCDC_LVCR_V_WIDTH(x) (((x)&0x0000003F)<<26) | ||
1788 | |||
1789 | /* Bit definitions and macros for MCF_LCDC_LPOR */ | ||
1790 | #define MCF_LCDC_LPOR_POS(x) (((x)&0x0000001F)<<0) | ||
1791 | |||
1792 | /* Bit definitions and macros for MCF_LCDC_LPCCR */ | ||
1793 | #define MCF_LCDC_LPCCR_PW(x) (((x)&0x000000FF)<<0) | ||
1794 | #define MCF_LCDC_LPCCR_CC_EN (0x00000100) | ||
1795 | #define MCF_LCDC_LPCCR_SCR(x) (((x)&0x00000003)<<9) | ||
1796 | #define MCF_LCDC_LPCCR_LDMSK (0x00008000) | ||
1797 | #define MCF_LCDC_LPCCR_CLS_HI_WIDTH(x) (((x)&0x000001FF)<<16) | ||
1798 | #define MCF_LCDC_LPCCR_SCR_LINEPULSE (0x00000000) | ||
1799 | #define MCF_LCDC_LPCCR_SCR_PIXELCLK (0x00002000) | ||
1800 | #define MCF_LCDC_LPCCR_SCR_LCDCLOCK (0x00004000) | ||
1801 | |||
1802 | /* Bit definitions and macros for MCF_LCDC_LDCR */ | ||
1803 | #define MCF_LCDC_LDCR_TM(x) (((x)&0x0000001F)<<0) | ||
1804 | #define MCF_LCDC_LDCR_HM(x) (((x)&0x0000001F)<<16) | ||
1805 | #define MCF_LCDC_LDCR_BURST (0x80000000) | ||
1806 | |||
1807 | /* Bit definitions and macros for MCF_LCDC_LRMCR */ | ||
1808 | #define MCF_LCDC_LRMCR_SEL_REF (0x00000001) | ||
1809 | |||
1810 | /* Bit definitions and macros for MCF_LCDC_LICR */ | ||
1811 | #define MCF_LCDC_LICR_INTCON (0x00000001) | ||
1812 | #define MCF_LCDC_LICR_INTSYN (0x00000004) | ||
1813 | #define MCF_LCDC_LICR_GW_INT_CON (0x00000010) | ||
1814 | |||
1815 | /* Bit definitions and macros for MCF_LCDC_LIER */ | ||
1816 | #define MCF_LCDC_LIER_BOF_EN (0x00000001) | ||
1817 | #define MCF_LCDC_LIER_EOF_EN (0x00000002) | ||
1818 | #define MCF_LCDC_LIER_ERR_RES_EN (0x00000004) | ||
1819 | #define MCF_LCDC_LIER_UDR_ERR_EN (0x00000008) | ||
1820 | #define MCF_LCDC_LIER_GW_BOF_EN (0x00000010) | ||
1821 | #define MCF_LCDC_LIER_GW_EOF_EN (0x00000020) | ||
1822 | #define MCF_LCDC_LIER_GW_ERR_RES_EN (0x00000040) | ||
1823 | #define MCF_LCDC_LIER_GW_UDR_ERR_EN (0x00000080) | ||
1824 | |||
1825 | /* Bit definitions and macros for MCF_LCDC_LISR */ | ||
1826 | #define MCF_LCDC_LISR_BOF (0x00000001) | ||
1827 | #define MCF_LCDC_LISR_EOF (0x00000002) | ||
1828 | #define MCF_LCDC_LISR_ERR_RES (0x00000004) | ||
1829 | #define MCF_LCDC_LISR_UDR_ERR (0x00000008) | ||
1830 | #define MCF_LCDC_LISR_GW_BOF (0x00000010) | ||
1831 | #define MCF_LCDC_LISR_GW_EOF (0x00000020) | ||
1832 | #define MCF_LCDC_LISR_GW_ERR_RES (0x00000040) | ||
1833 | #define MCF_LCDC_LISR_GW_UDR_ERR (0x00000080) | ||
1834 | |||
1835 | /* Bit definitions and macros for MCF_LCDC_LGWSAR */ | ||
1836 | #define MCF_LCDC_LGWSAR_GWSA(x) (((x)&0x3FFFFFFF)<<2) | ||
1837 | |||
1838 | /* Bit definitions and macros for MCF_LCDC_LGWSR */ | ||
1839 | #define MCF_LCDC_LGWSR_GWH(x) (((x)&0x000003FF)<<0) | ||
1840 | #define MCF_LCDC_LGWSR_GWW(x) (((x)&0x0000003F)<<20) | ||
1841 | |||
1842 | /* Bit definitions and macros for MCF_LCDC_LGWVPWR */ | ||
1843 | #define MCF_LCDC_LGWVPWR_GWVPW(x) (((x)&0x000003FF)<<0) | ||
1844 | |||
1845 | /* Bit definitions and macros for MCF_LCDC_LGWPOR */ | ||
1846 | #define MCF_LCDC_LGWPOR_GWPO(x) (((x)&0x0000001F)<<0) | ||
1847 | |||
1848 | /* Bit definitions and macros for MCF_LCDC_LGWPR */ | ||
1849 | #define MCF_LCDC_LGWPR_GWYP(x) (((x)&0x000003FF)<<0) | ||
1850 | #define MCF_LCDC_LGWPR_GWXP(x) (((x)&0x000003FF)<<16) | ||
1851 | |||
1852 | /* Bit definitions and macros for MCF_LCDC_LGWCR */ | ||
1853 | #define MCF_LCDC_LGWCR_GWCKB(x) (((x)&0x0000003F)<<0) | ||
1854 | #define MCF_LCDC_LGWCR_GWCKG(x) (((x)&0x0000003F)<<6) | ||
1855 | #define MCF_LCDC_LGWCR_GWCKR(x) (((x)&0x0000003F)<<12) | ||
1856 | #define MCF_LCDC_LGWCR_GW_RVS (0x00200000) | ||
1857 | #define MCF_LCDC_LGWCR_GWE (0x00400000) | ||
1858 | #define MCF_LCDC_LGWCR_GWCKE (0x00800000) | ||
1859 | #define MCF_LCDC_LGWCR_GWAV(x) (((x)&0x000000FF)<<24) | ||
1860 | |||
1861 | /* Bit definitions and macros for MCF_LCDC_LGWDCR */ | ||
1862 | #define MCF_LCDC_LGWDCR_GWTM(x) (((x)&0x0000001F)<<0) | ||
1863 | #define MCF_LCDC_LGWDCR_GWHM(x) (((x)&0x0000001F)<<16) | ||
1864 | #define MCF_LCDC_LGWDCR_GWBT (0x80000000) | ||
1865 | |||
1866 | /* Bit definitions and macros for MCF_LCDC_LSCR */ | ||
1867 | #define MCF_LCDC_LSCR_PS_RISE_DELAY(x) (((x)&0x0000003F)<<26) | ||
1868 | #define MCF_LCDC_LSCR_CLS_RISE_DELAY(x) (((x)&0x000000FF)<<16) | ||
1869 | #define MCF_LCDC_LSCR_REV_TOGGLE_DELAY(x) (((x)&0x0000000F)<<8) | ||
1870 | #define MCF_LCDC_LSCR_GRAY_2(x) (((x)&0x0000000F)<<4) | ||
1871 | #define MCF_LCDC_LSCR_GRAY_1(x) (((x)&0x0000000F)<<0) | ||
1872 | |||
1873 | /* Bit definitions and macros for MCF_LCDC_BPLUT_BASE */ | ||
1874 | #define MCF_LCDC_BPLUT_BASE_BASE(x) (((x)&0xFFFFFFFF)<<0) | ||
1875 | |||
1876 | /* Bit definitions and macros for MCF_LCDC_GWLUT_BASE */ | ||
1877 | #define MCF_LCDC_GWLUT_BASE_BASE(x) (((x)&0xFFFFFFFF)<<0) | ||
1878 | |||
1879 | /********************************************************************* | ||
1880 | * | ||
1881 | * Phase Locked Loop (PLL) | ||
1882 | * | ||
1883 | *********************************************************************/ | ||
1884 | |||
1885 | /* Register read/write macros */ | ||
1886 | #define MCF_PLL_PODR MCF_REG08(0xFC0C0000) | ||
1887 | #define MCF_PLL_PLLCR MCF_REG08(0xFC0C0004) | ||
1888 | #define MCF_PLL_PMDR MCF_REG08(0xFC0C0008) | ||
1889 | #define MCF_PLL_PFDR MCF_REG08(0xFC0C000C) | ||
1890 | |||
1891 | /* Bit definitions and macros for MCF_PLL_PODR */ | ||
1892 | #define MCF_PLL_PODR_BUSDIV(x) (((x)&0x0F)<<0) | ||
1893 | #define MCF_PLL_PODR_CPUDIV(x) (((x)&0x0F)<<4) | ||
1894 | |||
1895 | /* Bit definitions and macros for MCF_PLL_PLLCR */ | ||
1896 | #define MCF_PLL_PLLCR_DITHDEV(x) (((x)&0x07)<<0) | ||
1897 | #define MCF_PLL_PLLCR_DITHEN (0x80) | ||
1898 | |||
1899 | /* Bit definitions and macros for MCF_PLL_PMDR */ | ||
1900 | #define MCF_PLL_PMDR_MODDIV(x) (((x)&0xFF)<<0) | ||
1901 | |||
1902 | /* Bit definitions and macros for MCF_PLL_PFDR */ | ||
1903 | #define MCF_PLL_PFDR_MFD(x) (((x)&0xFF)<<0) | ||
1904 | |||
1905 | /********************************************************************* | ||
1906 | * | ||
1907 | * System Control Module Registers (SCM) | ||
1908 | * | ||
1909 | *********************************************************************/ | ||
1910 | |||
1911 | /* Register read/write macros */ | ||
1912 | #define MCF_SCM_MPR MCF_REG32(0xFC000000) | ||
1913 | #define MCF_SCM_PACRA MCF_REG32(0xFC000020) | ||
1914 | #define MCF_SCM_PACRB MCF_REG32(0xFC000024) | ||
1915 | #define MCF_SCM_PACRC MCF_REG32(0xFC000028) | ||
1916 | #define MCF_SCM_PACRD MCF_REG32(0xFC00002C) | ||
1917 | #define MCF_SCM_PACRE MCF_REG32(0xFC000040) | ||
1918 | #define MCF_SCM_PACRF MCF_REG32(0xFC000044) | ||
1919 | |||
1920 | #define MCF_SCM_BCR MCF_REG32(0xFC040024) | ||
1921 | |||
1922 | /********************************************************************* | ||
1923 | * | ||
1924 | * SDRAM Controller (SDRAMC) | ||
1925 | * | ||
1926 | *********************************************************************/ | ||
1927 | |||
1928 | /* Register read/write macros */ | ||
1929 | #define MCF_SDRAMC_SDMR MCF_REG32(0xFC0B8000) | ||
1930 | #define MCF_SDRAMC_SDCR MCF_REG32(0xFC0B8004) | ||
1931 | #define MCF_SDRAMC_SDCFG1 MCF_REG32(0xFC0B8008) | ||
1932 | #define MCF_SDRAMC_SDCFG2 MCF_REG32(0xFC0B800C) | ||
1933 | #define MCF_SDRAMC_LIMP_FIX MCF_REG32(0xFC0B8080) | ||
1934 | #define MCF_SDRAMC_SDDS MCF_REG32(0xFC0B8100) | ||
1935 | #define MCF_SDRAMC_SDCS0 MCF_REG32(0xFC0B8110) | ||
1936 | #define MCF_SDRAMC_SDCS1 MCF_REG32(0xFC0B8114) | ||
1937 | #define MCF_SDRAMC_SDCS2 MCF_REG32(0xFC0B8118) | ||
1938 | #define MCF_SDRAMC_SDCS3 MCF_REG32(0xFC0B811C) | ||
1939 | #define MCF_SDRAMC_SDCS(x) MCF_REG32(0xFC0B8110+((x)*0x004)) | ||
1940 | |||
1941 | /* Bit definitions and macros for MCF_SDRAMC_SDMR */ | ||
1942 | #define MCF_SDRAMC_SDMR_CMD (0x00010000) | ||
1943 | #define MCF_SDRAMC_SDMR_AD(x) (((x)&0x00000FFF)<<18) | ||
1944 | #define MCF_SDRAMC_SDMR_BNKAD(x) (((x)&0x00000003)<<30) | ||
1945 | #define MCF_SDRAMC_SDMR_BNKAD_LMR (0x00000000) | ||
1946 | #define MCF_SDRAMC_SDMR_BNKAD_LEMR (0x40000000) | ||
1947 | |||
1948 | /* Bit definitions and macros for MCF_SDRAMC_SDCR */ | ||
1949 | #define MCF_SDRAMC_SDCR_IPALL (0x00000002) | ||
1950 | #define MCF_SDRAMC_SDCR_IREF (0x00000004) | ||
1951 | #define MCF_SDRAMC_SDCR_DQS_OE(x) (((x)&0x0000000F)<<8) | ||
1952 | #define MCF_SDRAMC_SDCR_PS(x) (((x)&0x00000003)<<12) | ||
1953 | #define MCF_SDRAMC_SDCR_RCNT(x) (((x)&0x0000003F)<<16) | ||
1954 | #define MCF_SDRAMC_SDCR_OE_RULE (0x00400000) | ||
1955 | #define MCF_SDRAMC_SDCR_MUX(x) (((x)&0x00000003)<<24) | ||
1956 | #define MCF_SDRAMC_SDCR_REF (0x10000000) | ||
1957 | #define MCF_SDRAMC_SDCR_DDR (0x20000000) | ||
1958 | #define MCF_SDRAMC_SDCR_CKE (0x40000000) | ||
1959 | #define MCF_SDRAMC_SDCR_MODE_EN (0x80000000) | ||
1960 | #define MCF_SDRAMC_SDCR_PS_16 (0x00002000) | ||
1961 | #define MCF_SDRAMC_SDCR_PS_32 (0x00000000) | ||
1962 | |||
1963 | /* Bit definitions and macros for MCF_SDRAMC_SDCFG1 */ | ||
1964 | #define MCF_SDRAMC_SDCFG1_WTLAT(x) (((x)&0x00000007)<<4) | ||
1965 | #define MCF_SDRAMC_SDCFG1_REF2ACT(x) (((x)&0x0000000F)<<8) | ||
1966 | #define MCF_SDRAMC_SDCFG1_PRE2ACT(x) (((x)&0x00000007)<<12) | ||
1967 | #define MCF_SDRAMC_SDCFG1_ACT2RW(x) (((x)&0x00000007)<<16) | ||
1968 | #define MCF_SDRAMC_SDCFG1_RDLAT(x) (((x)&0x0000000F)<<20) | ||
1969 | #define MCF_SDRAMC_SDCFG1_SWT2RD(x) (((x)&0x00000007)<<24) | ||
1970 | #define MCF_SDRAMC_SDCFG1_SRD2RW(x) (((x)&0x0000000F)<<28) | ||
1971 | |||
1972 | /* Bit definitions and macros for MCF_SDRAMC_SDCFG2 */ | ||
1973 | #define MCF_SDRAMC_SDCFG2_BL(x) (((x)&0x0000000F)<<16) | ||
1974 | #define MCF_SDRAMC_SDCFG2_BRD2WT(x) (((x)&0x0000000F)<<20) | ||
1975 | #define MCF_SDRAMC_SDCFG2_BWT2RW(x) (((x)&0x0000000F)<<24) | ||
1976 | #define MCF_SDRAMC_SDCFG2_BRD2PRE(x) (((x)&0x0000000F)<<28) | ||
1977 | |||
1978 | /* Device Errata - LIMP mode work around */ | ||
1979 | #define MCF_SDRAMC_REFRESH (0x40000000) | ||
1980 | |||
1981 | /* Bit definitions and macros for MCF_SDRAMC_SDDS */ | ||
1982 | #define MCF_SDRAMC_SDDS_SB_D(x) (((x)&0x00000003)<<0) | ||
1983 | #define MCF_SDRAMC_SDDS_SB_S(x) (((x)&0x00000003)<<2) | ||
1984 | #define MCF_SDRAMC_SDDS_SB_A(x) (((x)&0x00000003)<<4) | ||
1985 | #define MCF_SDRAMC_SDDS_SB_C(x) (((x)&0x00000003)<<6) | ||
1986 | #define MCF_SDRAMC_SDDS_SB_E(x) (((x)&0x00000003)<<8) | ||
1987 | |||
1988 | /* Bit definitions and macros for MCF_SDRAMC_SDCS */ | ||
1989 | #define MCF_SDRAMC_SDCS_CSSZ(x) (((x)&0x0000001F)<<0) | ||
1990 | #define MCF_SDRAMC_SDCS_BASE(x) (((x)&0x00000FFF)<<20) | ||
1991 | #define MCF_SDRAMC_SDCS_BA(x) ((x)&0xFFF00000) | ||
1992 | #define MCF_SDRAMC_SDCS_CSSZ_DIABLE (0x00000000) | ||
1993 | #define MCF_SDRAMC_SDCS_CSSZ_1MBYTE (0x00000013) | ||
1994 | #define MCF_SDRAMC_SDCS_CSSZ_2MBYTE (0x00000014) | ||
1995 | #define MCF_SDRAMC_SDCS_CSSZ_4MBYTE (0x00000015) | ||
1996 | #define MCF_SDRAMC_SDCS_CSSZ_8MBYTE (0x00000016) | ||
1997 | #define MCF_SDRAMC_SDCS_CSSZ_16MBYTE (0x00000017) | ||
1998 | #define MCF_SDRAMC_SDCS_CSSZ_32MBYTE (0x00000018) | ||
1999 | #define MCF_SDRAMC_SDCS_CSSZ_64MBYTE (0x00000019) | ||
2000 | #define MCF_SDRAMC_SDCS_CSSZ_128MBYTE (0x0000001A) | ||
2001 | #define MCF_SDRAMC_SDCS_CSSZ_256MBYTE (0x0000001B) | ||
2002 | #define MCF_SDRAMC_SDCS_CSSZ_512MBYTE (0x0000001C) | ||
2003 | #define MCF_SDRAMC_SDCS_CSSZ_1GBYTE (0x0000001D) | ||
2004 | #define MCF_SDRAMC_SDCS_CSSZ_2GBYTE (0x0000001E) | ||
2005 | #define MCF_SDRAMC_SDCS_CSSZ_4GBYTE (0x0000001F) | ||
2006 | |||
2007 | /********************************************************************* | ||
2008 | * | ||
2009 | * FlexCAN module registers | ||
2010 | * | ||
2011 | *********************************************************************/ | ||
2012 | #define MCF_FLEXCAN_BASEADDR(x) (0xFC020000+(x)*0x0800) | ||
2013 | #define MCF_FLEXCAN_CANMCR(x) MCF_REG32(0xFC020000+(x)*0x0800+0x00) | ||
2014 | #define MCF_FLEXCAN_CANCTRL(x) MCF_REG32(0xFC020000+(x)*0x0800+0x04) | ||
2015 | #define MCF_FLEXCAN_TIMER(x) MCF_REG32(0xFC020000+(x)*0x0800+0x08) | ||
2016 | #define MCF_FLEXCAN_RXGMASK(x) MCF_REG32(0xFC020000+(x)*0x0800+0x10) | ||
2017 | #define MCF_FLEXCAN_RX14MASK(x) MCF_REG32(0xFC020000+(x)*0x0800+0x14) | ||
2018 | #define MCF_FLEXCAN_RX15MASK(x) MCF_REG32(0xFC020000+(x)*0x0800+0x18) | ||
2019 | #define MCF_FLEXCAN_ERRCNT(x) MCF_REG32(0xFC020000+(x)*0x0800+0x1C) | ||
2020 | #define MCF_FLEXCAN_ERRSTAT(x) MCF_REG32(0xFC020000+(x)*0x0800+0x20) | ||
2021 | #define MCF_FLEXCAN_IMASK(x) MCF_REG32(0xFC020000+(x)*0x0800+0x28) | ||
2022 | #define MCF_FLEXCAN_IFLAG(x) MCF_REG32(0xFC020000+(x)*0x0800+0x30) | ||
2023 | |||
2024 | #define MCF_FLEXCAN_MB_CNT(x,y) MCF_REG32(0xFC020080+(x)*0x0800+(y)*0x10+0x0) | ||
2025 | #define MCF_FLEXCAN_MB_ID(x,y) MCF_REG32(0xFC020080+(x)*0x0800+(y)*0x10+0x4) | ||
2026 | #define MCF_FLEXCAN_MB_DB(x,y,z) MCF_REG08(0xFC020080+(x)*0x0800+(y)*0x10+0x8+(z)*0x1) | ||
2027 | |||
2028 | /* | ||
2029 | * FlexCAN Module Configuration Register | ||
2030 | */ | ||
2031 | #define CANMCR_MDIS (0x80000000) | ||
2032 | #define CANMCR_FRZ (0x40000000) | ||
2033 | #define CANMCR_HALT (0x10000000) | ||
2034 | #define CANMCR_SOFTRST (0x02000000) | ||
2035 | #define CANMCR_FRZACK (0x01000000) | ||
2036 | #define CANMCR_SUPV (0x00800000) | ||
2037 | #define CANMCR_MAXMB(x) ((x)&0x0F) | ||
2038 | |||
2039 | /* | ||
2040 | * FlexCAN Control Register | ||
2041 | */ | ||
2042 | #define CANCTRL_PRESDIV(x) (((x)&0xFF)<<24) | ||
2043 | #define CANCTRL_RJW(x) (((x)&0x03)<<22) | ||
2044 | #define CANCTRL_PSEG1(x) (((x)&0x07)<<19) | ||
2045 | #define CANCTRL_PSEG2(x) (((x)&0x07)<<16) | ||
2046 | #define CANCTRL_BOFFMSK (0x00008000) | ||
2047 | #define CANCTRL_ERRMSK (0x00004000) | ||
2048 | #define CANCTRL_CLKSRC (0x00002000) | ||
2049 | #define CANCTRL_LPB (0x00001000) | ||
2050 | #define CANCTRL_SAMP (0x00000080) | ||
2051 | #define CANCTRL_BOFFREC (0x00000040) | ||
2052 | #define CANCTRL_TSYNC (0x00000020) | ||
2053 | #define CANCTRL_LBUF (0x00000010) | ||
2054 | #define CANCTRL_LOM (0x00000008) | ||
2055 | #define CANCTRL_PROPSEG(x) ((x)&0x07) | ||
2056 | |||
2057 | /* | ||
2058 | * FlexCAN Error Counter Register | ||
2059 | */ | ||
2060 | #define ERRCNT_RXECTR(x) (((x)&0xFF)<<8) | ||
2061 | #define ERRCNT_TXECTR(x) ((x)&0xFF) | ||
2062 | |||
2063 | /* | ||
2064 | * FlexCAN Error and Status Register | ||
2065 | */ | ||
2066 | #define ERRSTAT_BITERR(x) (((x)&0x03)<<14) | ||
2067 | #define ERRSTAT_ACKERR (0x00002000) | ||
2068 | #define ERRSTAT_CRCERR (0x00001000) | ||
2069 | #define ERRSTAT_FRMERR (0x00000800) | ||
2070 | #define ERRSTAT_STFERR (0x00000400) | ||
2071 | #define ERRSTAT_TXWRN (0x00000200) | ||
2072 | #define ERRSTAT_RXWRN (0x00000100) | ||
2073 | #define ERRSTAT_IDLE (0x00000080) | ||
2074 | #define ERRSTAT_TXRX (0x00000040) | ||
2075 | #define ERRSTAT_FLTCONF(x) (((x)&0x03)<<4) | ||
2076 | #define ERRSTAT_BOFFINT (0x00000004) | ||
2077 | #define ERRSTAT_ERRINT (0x00000002) | ||
2078 | |||
2079 | /* | ||
2080 | * Interrupt Mask Register | ||
2081 | */ | ||
2082 | #define IMASK_BUF15M (0x8000) | ||
2083 | #define IMASK_BUF14M (0x4000) | ||
2084 | #define IMASK_BUF13M (0x2000) | ||
2085 | #define IMASK_BUF12M (0x1000) | ||
2086 | #define IMASK_BUF11M (0x0800) | ||
2087 | #define IMASK_BUF10M (0x0400) | ||
2088 | #define IMASK_BUF9M (0x0200) | ||
2089 | #define IMASK_BUF8M (0x0100) | ||
2090 | #define IMASK_BUF7M (0x0080) | ||
2091 | #define IMASK_BUF6M (0x0040) | ||
2092 | #define IMASK_BUF5M (0x0020) | ||
2093 | #define IMASK_BUF4M (0x0010) | ||
2094 | #define IMASK_BUF3M (0x0008) | ||
2095 | #define IMASK_BUF2M (0x0004) | ||
2096 | #define IMASK_BUF1M (0x0002) | ||
2097 | #define IMASK_BUF0M (0x0001) | ||
2098 | #define IMASK_BUFnM(x) (0x1<<(x)) | ||
2099 | #define IMASK_BUFF_ENABLE_ALL (0x1111) | ||
2100 | #define IMASK_BUFF_DISABLE_ALL (0x0000) | ||
2101 | |||
2102 | /* | ||
2103 | * Interrupt Flag Register | ||
2104 | */ | ||
2105 | #define IFLAG_BUF15M (0x8000) | ||
2106 | #define IFLAG_BUF14M (0x4000) | ||
2107 | #define IFLAG_BUF13M (0x2000) | ||
2108 | #define IFLAG_BUF12M (0x1000) | ||
2109 | #define IFLAG_BUF11M (0x0800) | ||
2110 | #define IFLAG_BUF10M (0x0400) | ||
2111 | #define IFLAG_BUF9M (0x0200) | ||
2112 | #define IFLAG_BUF8M (0x0100) | ||
2113 | #define IFLAG_BUF7M (0x0080) | ||
2114 | #define IFLAG_BUF6M (0x0040) | ||
2115 | #define IFLAG_BUF5M (0x0020) | ||
2116 | #define IFLAG_BUF4M (0x0010) | ||
2117 | #define IFLAG_BUF3M (0x0008) | ||
2118 | #define IFLAG_BUF2M (0x0004) | ||
2119 | #define IFLAG_BUF1M (0x0002) | ||
2120 | #define IFLAG_BUF0M (0x0001) | ||
2121 | #define IFLAG_BUFF_SET_ALL (0xFFFF) | ||
2122 | #define IFLAG_BUFF_CLEAR_ALL (0x0000) | ||
2123 | #define IFLAG_BUFnM(x) (0x1<<(x)) | ||
2124 | |||
2125 | /* | ||
2126 | * Message Buffers | ||
2127 | */ | ||
2128 | #define MB_CNT_CODE(x) (((x)&0x0F)<<24) | ||
2129 | #define MB_CNT_SRR (0x00400000) | ||
2130 | #define MB_CNT_IDE (0x00200000) | ||
2131 | #define MB_CNT_RTR (0x00100000) | ||
2132 | #define MB_CNT_LENGTH(x) (((x)&0x0F)<<16) | ||
2133 | #define MB_CNT_TIMESTAMP(x) ((x)&0xFFFF) | ||
2134 | #define MB_ID_STD(x) (((x)&0x07FF)<<18) | ||
2135 | #define MB_ID_EXT(x) ((x)&0x3FFFF) | ||
2136 | |||
2137 | /********************************************************************* | ||
2138 | * | ||
2139 | * Edge Port Module (EPORT) | ||
2140 | * | ||
2141 | *********************************************************************/ | ||
2142 | |||
2143 | /* Register read/write macros */ | ||
2144 | #define MCF_EPORT_EPPAR MCF_REG16(0xFC094000) | ||
2145 | #define MCF_EPORT_EPDDR MCF_REG08(0xFC094002) | ||
2146 | #define MCF_EPORT_EPIER MCF_REG08(0xFC094003) | ||
2147 | #define MCF_EPORT_EPDR MCF_REG08(0xFC094004) | ||
2148 | #define MCF_EPORT_EPPDR MCF_REG08(0xFC094005) | ||
2149 | #define MCF_EPORT_EPFR MCF_REG08(0xFC094006) | ||
2150 | |||
2151 | /* Bit definitions and macros for MCF_EPORT_EPPAR */ | ||
2152 | #define MCF_EPORT_EPPAR_EPPA1(x) (((x)&0x0003)<<2) | ||
2153 | #define MCF_EPORT_EPPAR_EPPA2(x) (((x)&0x0003)<<4) | ||
2154 | #define MCF_EPORT_EPPAR_EPPA3(x) (((x)&0x0003)<<6) | ||
2155 | #define MCF_EPORT_EPPAR_EPPA4(x) (((x)&0x0003)<<8) | ||
2156 | #define MCF_EPORT_EPPAR_EPPA5(x) (((x)&0x0003)<<10) | ||
2157 | #define MCF_EPORT_EPPAR_EPPA6(x) (((x)&0x0003)<<12) | ||
2158 | #define MCF_EPORT_EPPAR_EPPA7(x) (((x)&0x0003)<<14) | ||
2159 | #define MCF_EPORT_EPPAR_LEVEL (0) | ||
2160 | #define MCF_EPORT_EPPAR_RISING (1) | ||
2161 | #define MCF_EPORT_EPPAR_FALLING (2) | ||
2162 | #define MCF_EPORT_EPPAR_BOTH (3) | ||
2163 | #define MCF_EPORT_EPPAR_EPPA7_LEVEL (0x0000) | ||
2164 | #define MCF_EPORT_EPPAR_EPPA7_RISING (0x4000) | ||
2165 | #define MCF_EPORT_EPPAR_EPPA7_FALLING (0x8000) | ||
2166 | #define MCF_EPORT_EPPAR_EPPA7_BOTH (0xC000) | ||
2167 | #define MCF_EPORT_EPPAR_EPPA6_LEVEL (0x0000) | ||
2168 | #define MCF_EPORT_EPPAR_EPPA6_RISING (0x1000) | ||
2169 | #define MCF_EPORT_EPPAR_EPPA6_FALLING (0x2000) | ||
2170 | #define MCF_EPORT_EPPAR_EPPA6_BOTH (0x3000) | ||
2171 | #define MCF_EPORT_EPPAR_EPPA5_LEVEL (0x0000) | ||
2172 | #define MCF_EPORT_EPPAR_EPPA5_RISING (0x0400) | ||
2173 | #define MCF_EPORT_EPPAR_EPPA5_FALLING (0x0800) | ||
2174 | #define MCF_EPORT_EPPAR_EPPA5_BOTH (0x0C00) | ||
2175 | #define MCF_EPORT_EPPAR_EPPA4_LEVEL (0x0000) | ||
2176 | #define MCF_EPORT_EPPAR_EPPA4_RISING (0x0100) | ||
2177 | #define MCF_EPORT_EPPAR_EPPA4_FALLING (0x0200) | ||
2178 | #define MCF_EPORT_EPPAR_EPPA4_BOTH (0x0300) | ||
2179 | #define MCF_EPORT_EPPAR_EPPA3_LEVEL (0x0000) | ||
2180 | #define MCF_EPORT_EPPAR_EPPA3_RISING (0x0040) | ||
2181 | #define MCF_EPORT_EPPAR_EPPA3_FALLING (0x0080) | ||
2182 | #define MCF_EPORT_EPPAR_EPPA3_BOTH (0x00C0) | ||
2183 | #define MCF_EPORT_EPPAR_EPPA2_LEVEL (0x0000) | ||
2184 | #define MCF_EPORT_EPPAR_EPPA2_RISING (0x0010) | ||
2185 | #define MCF_EPORT_EPPAR_EPPA2_FALLING (0x0020) | ||
2186 | #define MCF_EPORT_EPPAR_EPPA2_BOTH (0x0030) | ||
2187 | #define MCF_EPORT_EPPAR_EPPA1_LEVEL (0x0000) | ||
2188 | #define MCF_EPORT_EPPAR_EPPA1_RISING (0x0004) | ||
2189 | #define MCF_EPORT_EPPAR_EPPA1_FALLING (0x0008) | ||
2190 | #define MCF_EPORT_EPPAR_EPPA1_BOTH (0x000C) | ||
2191 | |||
2192 | /* Bit definitions and macros for MCF_EPORT_EPDDR */ | ||
2193 | #define MCF_EPORT_EPDDR_EPDD1 (0x02) | ||
2194 | #define MCF_EPORT_EPDDR_EPDD2 (0x04) | ||
2195 | #define MCF_EPORT_EPDDR_EPDD3 (0x08) | ||
2196 | #define MCF_EPORT_EPDDR_EPDD4 (0x10) | ||
2197 | #define MCF_EPORT_EPDDR_EPDD5 (0x20) | ||
2198 | #define MCF_EPORT_EPDDR_EPDD6 (0x40) | ||
2199 | #define MCF_EPORT_EPDDR_EPDD7 (0x80) | ||
2200 | |||
2201 | /* Bit definitions and macros for MCF_EPORT_EPIER */ | ||
2202 | #define MCF_EPORT_EPIER_EPIE1 (0x02) | ||
2203 | #define MCF_EPORT_EPIER_EPIE2 (0x04) | ||
2204 | #define MCF_EPORT_EPIER_EPIE3 (0x08) | ||
2205 | #define MCF_EPORT_EPIER_EPIE4 (0x10) | ||
2206 | #define MCF_EPORT_EPIER_EPIE5 (0x20) | ||
2207 | #define MCF_EPORT_EPIER_EPIE6 (0x40) | ||
2208 | #define MCF_EPORT_EPIER_EPIE7 (0x80) | ||
2209 | |||
2210 | /* Bit definitions and macros for MCF_EPORT_EPDR */ | ||
2211 | #define MCF_EPORT_EPDR_EPD1 (0x02) | ||
2212 | #define MCF_EPORT_EPDR_EPD2 (0x04) | ||
2213 | #define MCF_EPORT_EPDR_EPD3 (0x08) | ||
2214 | #define MCF_EPORT_EPDR_EPD4 (0x10) | ||
2215 | #define MCF_EPORT_EPDR_EPD5 (0x20) | ||
2216 | #define MCF_EPORT_EPDR_EPD6 (0x40) | ||
2217 | #define MCF_EPORT_EPDR_EPD7 (0x80) | ||
2218 | |||
2219 | /* Bit definitions and macros for MCF_EPORT_EPPDR */ | ||
2220 | #define MCF_EPORT_EPPDR_EPPD1 (0x02) | ||
2221 | #define MCF_EPORT_EPPDR_EPPD2 (0x04) | ||
2222 | #define MCF_EPORT_EPPDR_EPPD3 (0x08) | ||
2223 | #define MCF_EPORT_EPPDR_EPPD4 (0x10) | ||
2224 | #define MCF_EPORT_EPPDR_EPPD5 (0x20) | ||
2225 | #define MCF_EPORT_EPPDR_EPPD6 (0x40) | ||
2226 | #define MCF_EPORT_EPPDR_EPPD7 (0x80) | ||
2227 | |||
2228 | /* Bit definitions and macros for MCF_EPORT_EPFR */ | ||
2229 | #define MCF_EPORT_EPFR_EPF1 (0x02) | ||
2230 | #define MCF_EPORT_EPFR_EPF2 (0x04) | ||
2231 | #define MCF_EPORT_EPFR_EPF3 (0x08) | ||
2232 | #define MCF_EPORT_EPFR_EPF4 (0x10) | ||
2233 | #define MCF_EPORT_EPFR_EPF5 (0x20) | ||
2234 | #define MCF_EPORT_EPFR_EPF6 (0x40) | ||
2235 | #define MCF_EPORT_EPFR_EPF7 (0x80) | ||
2236 | |||
2237 | /********************************************************************/ | ||
2238 | #endif /* m532xsim_h */ | ||
diff --git a/include/asm-m68knommu/mcfcache.h b/include/asm-m68knommu/mcfcache.h index 45d1ac57ea..7b61a8a529 100644 --- a/include/asm-m68knommu/mcfcache.h +++ b/include/asm-m68knommu/mcfcache.h | |||
@@ -92,6 +92,21 @@ | |||
92 | .endm | 92 | .endm |
93 | #endif /* CONFIG_M5249 || CONFIG_M5307 */ | 93 | #endif /* CONFIG_M5249 || CONFIG_M5307 */ |
94 | 94 | ||
95 | #if defined(CONFIG_M532x) | ||
96 | .macro CACHE_ENABLE | ||
97 | movel #0x01000000,%d0 /* invalidate cache cmd */ | ||
98 | movec %d0,%CACR /* do invalidate cache */ | ||
99 | nop | ||
100 | movel #0x4001C000,%d0 /* set SDRAM cached (write-thru) */ | ||
101 | movec %d0,%ACR0 | ||
102 | movel #0x00000000,%d0 /* no other regions cached */ | ||
103 | movec %d0,%ACR1 | ||
104 | movel #0x80000200,%d0 /* setup cache mask */ | ||
105 | movec %d0,%CACR /* enable cache */ | ||
106 | nop | ||
107 | .endm | ||
108 | #endif /* CONFIG_M532x */ | ||
109 | |||
95 | #if defined(CONFIG_M5407) | 110 | #if defined(CONFIG_M5407) |
96 | /* | 111 | /* |
97 | * Version 4 cores have a true harvard style separate instruction | 112 | * Version 4 cores have a true harvard style separate instruction |
diff --git a/include/asm-m68knommu/mcfpit.h b/include/asm-m68knommu/mcfpit.h index 0d2672dd51..f570cf64fd 100644 --- a/include/asm-m68knommu/mcfpit.h +++ b/include/asm-m68knommu/mcfpit.h | |||
@@ -28,11 +28,9 @@ | |||
28 | /* | 28 | /* |
29 | * Define the PIT timer register set addresses. | 29 | * Define the PIT timer register set addresses. |
30 | */ | 30 | */ |
31 | struct mcfpit { | 31 | #define MCFPIT_PCSR 0x0 /* PIT control register */ |
32 | unsigned short pcsr; /* PIT control and status */ | 32 | #define MCFPIT_PMR 0x2 /* PIT modulus register */ |
33 | unsigned short pmr; /* PIT modulus register */ | 33 | #define MCFPIT_PCNTR 0x4 /* PIT count register */ |
34 | unsigned short pcntr; /* PIT count register */ | ||
35 | } __attribute__((packed)); | ||
36 | 34 | ||
37 | /* | 35 | /* |
38 | * Bit definitions for the PIT Control and Status register. | 36 | * Bit definitions for the PIT Control and Status register. |
diff --git a/include/asm-m68knommu/mcfsim.h b/include/asm-m68knommu/mcfsim.h index 97a0c2734a..1074ae717f 100644 --- a/include/asm-m68knommu/mcfsim.h +++ b/include/asm-m68knommu/mcfsim.h | |||
@@ -35,6 +35,8 @@ | |||
35 | #include <asm/m528xsim.h> | 35 | #include <asm/m528xsim.h> |
36 | #elif defined(CONFIG_M5307) | 36 | #elif defined(CONFIG_M5307) |
37 | #include <asm/m5307sim.h> | 37 | #include <asm/m5307sim.h> |
38 | #elif defined(CONFIG_M532x) | ||
39 | #include <asm/m532xsim.h> | ||
38 | #elif defined(CONFIG_M5407) | 40 | #elif defined(CONFIG_M5407) |
39 | #include <asm/m5407sim.h> | 41 | #include <asm/m5407sim.h> |
40 | #endif | 42 | #endif |
@@ -100,6 +102,7 @@ | |||
100 | #define MCFSIM_IMR_MASKALL 0x3ffe /* All intr sources */ | 102 | #define MCFSIM_IMR_MASKALL 0x3ffe /* All intr sources */ |
101 | #endif | 103 | #endif |
102 | 104 | ||
105 | |||
103 | /* | 106 | /* |
104 | * PIT interrupt settings, if not found in mXXXXsim.h file. | 107 | * PIT interrupt settings, if not found in mXXXXsim.h file. |
105 | */ | 108 | */ |
diff --git a/include/asm-m68knommu/mcftimer.h b/include/asm-m68knommu/mcftimer.h index 68bf33ac10..6f4d796e03 100644 --- a/include/asm-m68knommu/mcftimer.h +++ b/include/asm-m68knommu/mcftimer.h | |||
@@ -3,7 +3,7 @@ | |||
3 | /* | 3 | /* |
4 | * mcftimer.h -- ColdFire internal TIMER support defines. | 4 | * mcftimer.h -- ColdFire internal TIMER support defines. |
5 | * | 5 | * |
6 | * (C) Copyright 1999-2002, Greg Ungerer (gerg@snapgear.com) | 6 | * (C) Copyright 1999-2006, Greg Ungerer <gerg@snapgear.com> |
7 | * (C) Copyright 2000, Lineo Inc. (www.lineo.com) | 7 | * (C) Copyright 2000, Lineo Inc. (www.lineo.com) |
8 | */ | 8 | */ |
9 | 9 | ||
@@ -27,6 +27,11 @@ | |||
27 | #elif defined(CONFIG_M5249) || defined(CONFIG_M5307) || defined(CONFIG_M5407) | 27 | #elif defined(CONFIG_M5249) || defined(CONFIG_M5307) || defined(CONFIG_M5407) |
28 | #define MCFTIMER_BASE1 0x140 /* Base address of TIMER1 */ | 28 | #define MCFTIMER_BASE1 0x140 /* Base address of TIMER1 */ |
29 | #define MCFTIMER_BASE2 0x180 /* Base address of TIMER2 */ | 29 | #define MCFTIMER_BASE2 0x180 /* Base address of TIMER2 */ |
30 | #elif defined(CONFIG_M532x) | ||
31 | #define MCFTIMER_BASE1 0xfc070000 /* Base address of TIMER1 */ | ||
32 | #define MCFTIMER_BASE2 0xfc074000 /* Base address of TIMER2 */ | ||
33 | #define MCFTIMER_BASE3 0xfc078000 /* Base address of TIMER3 */ | ||
34 | #define MCFTIMER_BASE4 0xfc07c000 /* Base address of TIMER4 */ | ||
30 | #endif | 35 | #endif |
31 | 36 | ||
32 | 37 | ||
@@ -34,23 +39,14 @@ | |||
34 | * Define the TIMER register set addresses. | 39 | * Define the TIMER register set addresses. |
35 | */ | 40 | */ |
36 | #define MCFTIMER_TMR 0x00 /* Timer Mode reg (r/w) */ | 41 | #define MCFTIMER_TMR 0x00 /* Timer Mode reg (r/w) */ |
37 | #define MCFTIMER_TRR 0x02 /* Timer Reference (r/w) */ | 42 | #define MCFTIMER_TRR 0x04 /* Timer Reference (r/w) */ |
38 | #define MCFTIMER_TCR 0x04 /* Timer Capture reg (r/w) */ | 43 | #define MCFTIMER_TCR 0x08 /* Timer Capture reg (r/w) */ |
39 | #define MCFTIMER_TCN 0x06 /* Timer Counter reg (r/w) */ | 44 | #define MCFTIMER_TCN 0x0C /* Timer Counter reg (r/w) */ |
45 | #if defined(CONFIG_M532x) | ||
46 | #define MCFTIMER_TER 0x03 /* Timer Event reg (r/w) */ | ||
47 | #else | ||
40 | #define MCFTIMER_TER 0x11 /* Timer Event reg (r/w) */ | 48 | #define MCFTIMER_TER 0x11 /* Timer Event reg (r/w) */ |
41 | 49 | #endif | |
42 | struct mcftimer { | ||
43 | unsigned short tmr; /* Timer Mode reg (r/w) */ | ||
44 | unsigned short reserved1; | ||
45 | unsigned short trr; /* Timer Reference (r/w) */ | ||
46 | unsigned short reserved2; | ||
47 | unsigned short tcr; /* Timer Capture reg (r/w) */ | ||
48 | unsigned short reserved3; | ||
49 | unsigned short tcn; /* Timer Counter reg (r/w) */ | ||
50 | unsigned short reserved4; | ||
51 | unsigned char reserved5; | ||
52 | unsigned char ter; /* Timer Event reg (r/w) */ | ||
53 | } __attribute__((packed)); | ||
54 | 50 | ||
55 | /* | 51 | /* |
56 | * Bit definitions for the Timer Mode Register (TMR). | 52 | * Bit definitions for the Timer Mode Register (TMR). |
diff --git a/include/asm-m68knommu/mcfuart.h b/include/asm-m68knommu/mcfuart.h index 8040e43786..dc0146c525 100644 --- a/include/asm-m68knommu/mcfuart.h +++ b/include/asm-m68knommu/mcfuart.h | |||
@@ -44,6 +44,10 @@ | |||
44 | #define MCFUART_BASE1 0x60000 /* Base address of UART1 */ | 44 | #define MCFUART_BASE1 0x60000 /* Base address of UART1 */ |
45 | #define MCFUART_BASE2 0x64000 /* Base address of UART2 */ | 45 | #define MCFUART_BASE2 0x64000 /* Base address of UART2 */ |
46 | #define MCFUART_BASE3 0x68000 /* Base address of UART2 */ | 46 | #define MCFUART_BASE3 0x68000 /* Base address of UART2 */ |
47 | #elif defined(CONFIG_M532x) | ||
48 | #define MCFUART_BASE1 0xfc060000 /* Base address of UART1 */ | ||
49 | #define MCFUART_BASE2 0xfc064000 /* Base address of UART2 */ | ||
50 | #define MCFUART_BASE3 0xfc068000 /* Base address of UART3 */ | ||
47 | #endif | 51 | #endif |
48 | 52 | ||
49 | 53 | ||
diff --git a/include/asm-m68knommu/page_offset.h b/include/asm-m68knommu/page_offset.h index 8ed6d7b7d9..d4e73e0ba6 100644 --- a/include/asm-m68knommu/page_offset.h +++ b/include/asm-m68knommu/page_offset.h | |||
@@ -1,46 +1,5 @@ | |||
1 | 1 | ||
2 | 2 | ||
3 | /* This handles the memory map.. */ | 3 | /* This handles the memory map.. */ |
4 | 4 | #define PAGE_OFFSET_RAW CONFIG_RAMBASE | |
5 | #ifdef CONFIG_COLDFIRE | ||
6 | #if defined(CONFIG_SMALL) | ||
7 | #define PAGE_OFFSET_RAW 0x30020000 | ||
8 | #elif defined(CONFIG_CFV240) | ||
9 | #define PAGE_OFFSET_RAW 0x02000000 | ||
10 | #else | ||
11 | #define PAGE_OFFSET_RAW 0x00000000 | ||
12 | #endif | ||
13 | #endif | ||
14 | |||
15 | #ifdef CONFIG_M68360 | ||
16 | #define PAGE_OFFSET_RAW 0x00000000 | ||
17 | #endif | ||
18 | |||
19 | #ifdef CONFIG_PILOT | ||
20 | #ifdef CONFIG_M68328 | ||
21 | #define PAGE_OFFSET_RAW 0x10000000 | ||
22 | #endif | ||
23 | #ifdef CONFIG_M68EZ328 | ||
24 | #define PAGE_OFFSET_RAW 0x00000000 | ||
25 | #endif | ||
26 | #endif | ||
27 | #ifdef CONFIG_UCSIMM | ||
28 | #define PAGE_OFFSET_RAW 0x00000000 | ||
29 | #endif | ||
30 | |||
31 | #if defined(CONFIG_UCDIMM) || defined(CONFIG_DRAGEN2) | ||
32 | #ifdef CONFIG_M68VZ328 | ||
33 | #define PAGE_OFFSET_RAW 0x00000000 | ||
34 | #endif /* CONFIG_M68VZ328 */ | ||
35 | #endif /* CONFIG_UCDIMM */ | ||
36 | |||
37 | #ifdef CONFIG_M68EZ328ADS | ||
38 | #define PAGE_OFFSET_RAW 0x00000000 | ||
39 | #endif | ||
40 | #ifdef CONFIG_ALMA_ANS | ||
41 | #define PAGE_OFFSET_RAW 0x00000000 | ||
42 | #endif | ||
43 | #ifdef CONFIG_M68EN302 | ||
44 | #define PAGE_OFFSET_RAW 0x00000000 | ||
45 | #endif | ||
46 | 5 | ||
diff --git a/include/asm-m68knommu/processor.h b/include/asm-m68knommu/processor.h index 278b00bc60..0ee158e09a 100644 --- a/include/asm-m68knommu/processor.h +++ b/include/asm-m68knommu/processor.h | |||
@@ -78,19 +78,31 @@ struct thread_struct { | |||
78 | } | 78 | } |
79 | 79 | ||
80 | /* | 80 | /* |
81 | * Coldfire stacks need to be re-aligned on trap exit, conventional | ||
82 | * 68k can handle this case cleanly. | ||
83 | */ | ||
84 | #if defined(CONFIG_COLDFIRE) | ||
85 | #define reformat(_regs) do { (_regs)->format = 0x4; } while(0) | ||
86 | #else | ||
87 | #define reformat(_regs) do { } while (0) | ||
88 | #endif | ||
89 | |||
90 | /* | ||
81 | * Do necessary setup to start up a newly executed thread. | 91 | * Do necessary setup to start up a newly executed thread. |
82 | * | 92 | * |
83 | * pass the data segment into user programs if it exists, | 93 | * pass the data segment into user programs if it exists, |
84 | * it can't hurt anything as far as I can tell | 94 | * it can't hurt anything as far as I can tell |
85 | */ | 95 | */ |
86 | #define start_thread(_regs, _pc, _usp) \ | 96 | #define start_thread(_regs, _pc, _usp) \ |
87 | do { \ | 97 | do { \ |
88 | set_fs(USER_DS); /* reads from user space */ \ | 98 | set_fs(USER_DS); /* reads from user space */ \ |
89 | (_regs)->pc = (_pc); \ | 99 | (_regs)->pc = (_pc); \ |
90 | if (current->mm) \ | 100 | ((struct switch_stack *)(_regs))[-1].a6 = 0; \ |
91 | (_regs)->d5 = current->mm->start_data; \ | 101 | reformat(_regs); \ |
92 | (_regs)->sr &= ~0x2000; \ | 102 | if (current->mm) \ |
93 | wrusp(_usp); \ | 103 | (_regs)->d5 = current->mm->start_data; \ |
104 | (_regs)->sr &= ~0x2000; \ | ||
105 | wrusp(_usp); \ | ||
94 | } while(0) | 106 | } while(0) |
95 | 107 | ||
96 | /* Forward declaration, a strange C thing */ | 108 | /* Forward declaration, a strange C thing */ |
diff --git a/include/asm-m68knommu/ptrace.h b/include/asm-m68knommu/ptrace.h index 1e19c457de..47258e86e8 100644 --- a/include/asm-m68knommu/ptrace.h +++ b/include/asm-m68knommu/ptrace.h | |||
@@ -46,11 +46,9 @@ struct pt_regs { | |||
46 | #else | 46 | #else |
47 | unsigned short sr; | 47 | unsigned short sr; |
48 | unsigned long pc; | 48 | unsigned long pc; |
49 | #ifndef NO_FORMAT_VEC | ||
50 | unsigned format : 4; /* frame format specifier */ | 49 | unsigned format : 4; /* frame format specifier */ |
51 | unsigned vector : 12; /* vector offset */ | 50 | unsigned vector : 12; /* vector offset */ |
52 | #endif | 51 | #endif |
53 | #endif | ||
54 | }; | 52 | }; |
55 | 53 | ||
56 | /* | 54 | /* |
diff --git a/include/asm-mips/hw_irq.h b/include/asm-mips/hw_irq.h index c854d017c0..458d9fdc76 100644 --- a/include/asm-mips/hw_irq.h +++ b/include/asm-mips/hw_irq.h | |||
@@ -19,9 +19,9 @@ extern void init_8259A(int aeoi); | |||
19 | 19 | ||
20 | extern atomic_t irq_err_count; | 20 | extern atomic_t irq_err_count; |
21 | 21 | ||
22 | /* This may not be apropriate for all machines, we'll see ... */ | 22 | /* |
23 | static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) | 23 | * interrupt-retrigger: NOP for now. This may not be apropriate for all |
24 | { | 24 | * machines, we'll see ... |
25 | } | 25 | */ |
26 | 26 | ||
27 | #endif /* __ASM_HW_IRQ_H */ | 27 | #endif /* __ASM_HW_IRQ_H */ |
diff --git a/include/asm-mips/mach-mips/irq.h b/include/asm-mips/mach-mips/irq.h index 083d9c512a..e994b0c012 100644 --- a/include/asm-mips/mach-mips/irq.h +++ b/include/asm-mips/mach-mips/irq.h | |||
@@ -4,10 +4,4 @@ | |||
4 | 4 | ||
5 | #define NR_IRQS 256 | 5 | #define NR_IRQS 256 |
6 | 6 | ||
7 | #ifdef CONFIG_SMP | ||
8 | |||
9 | #define ARCH_HAS_IRQ_PER_CPU | ||
10 | |||
11 | #endif | ||
12 | |||
13 | #endif /* __ASM_MACH_MIPS_IRQ_H */ | 7 | #endif /* __ASM_MACH_MIPS_IRQ_H */ |
diff --git a/include/asm-parisc/hw_irq.h b/include/asm-parisc/hw_irq.h index 151426e275..6707f7df39 100644 --- a/include/asm-parisc/hw_irq.h +++ b/include/asm-parisc/hw_irq.h | |||
@@ -3,15 +3,6 @@ | |||
3 | 3 | ||
4 | /* | 4 | /* |
5 | * linux/include/asm/hw_irq.h | 5 | * linux/include/asm/hw_irq.h |
6 | * | ||
7 | * (C) 1992, 1993 Linus Torvalds, (C) 1997 Ingo Molnar | ||
8 | * | ||
9 | * moved some of the old arch/i386/kernel/irq.h to here. VY | ||
10 | * | ||
11 | * IRQ/IPI changes taken from work by Thomas Radke | ||
12 | * <tomsoft@informatik.tu-chemnitz.de> | ||
13 | */ | 6 | */ |
14 | 7 | ||
15 | extern void hw_resend_irq(struct hw_interrupt_type *, unsigned int); | ||
16 | |||
17 | #endif | 8 | #endif |
diff --git a/include/asm-parisc/irq.h b/include/asm-parisc/irq.h index 377ba90c7d..5cae260615 100644 --- a/include/asm-parisc/irq.h +++ b/include/asm-parisc/irq.h | |||
@@ -26,11 +26,6 @@ | |||
26 | 26 | ||
27 | #define NR_IRQS (CPU_IRQ_MAX + 1) | 27 | #define NR_IRQS (CPU_IRQ_MAX + 1) |
28 | 28 | ||
29 | /* | ||
30 | * IRQ line status macro IRQ_PER_CPU is used | ||
31 | */ | ||
32 | #define ARCH_HAS_IRQ_PER_CPU | ||
33 | |||
34 | static __inline__ int irq_canonicalize(int irq) | 29 | static __inline__ int irq_canonicalize(int irq) |
35 | { | 30 | { |
36 | return (irq == 2) ? 9 : irq; | 31 | return (irq == 2) ? 9 : irq; |
diff --git a/include/asm-powerpc/hw_irq.h b/include/asm-powerpc/hw_irq.h index ce0f7db63c..d40359204a 100644 --- a/include/asm-powerpc/hw_irq.h +++ b/include/asm-powerpc/hw_irq.h | |||
@@ -86,27 +86,27 @@ static inline void local_irq_save_ptr(unsigned long *flags) | |||
86 | #define mask_irq(irq) \ | 86 | #define mask_irq(irq) \ |
87 | ({ \ | 87 | ({ \ |
88 | irq_desc_t *desc = get_irq_desc(irq); \ | 88 | irq_desc_t *desc = get_irq_desc(irq); \ |
89 | if (desc->handler && desc->handler->disable) \ | 89 | if (desc->chip && desc->chip->disable) \ |
90 | desc->handler->disable(irq); \ | 90 | desc->chip->disable(irq); \ |
91 | }) | 91 | }) |
92 | #define unmask_irq(irq) \ | 92 | #define unmask_irq(irq) \ |
93 | ({ \ | 93 | ({ \ |
94 | irq_desc_t *desc = get_irq_desc(irq); \ | 94 | irq_desc_t *desc = get_irq_desc(irq); \ |
95 | if (desc->handler && desc->handler->enable) \ | 95 | if (desc->chip && desc->chip->enable) \ |
96 | desc->handler->enable(irq); \ | 96 | desc->chip->enable(irq); \ |
97 | }) | 97 | }) |
98 | #define ack_irq(irq) \ | 98 | #define ack_irq(irq) \ |
99 | ({ \ | 99 | ({ \ |
100 | irq_desc_t *desc = get_irq_desc(irq); \ | 100 | irq_desc_t *desc = get_irq_desc(irq); \ |
101 | if (desc->handler && desc->handler->ack) \ | 101 | if (desc->chip && desc->chip->ack) \ |
102 | desc->handler->ack(irq); \ | 102 | desc->chip->ack(irq); \ |
103 | }) | 103 | }) |
104 | 104 | ||
105 | /* Should we handle this via lost interrupts and IPIs or should we don't care like | 105 | /* |
106 | * we do now ? --BenH. | 106 | * interrupt-retrigger: should we handle this via lost interrupts and IPIs |
107 | * or should we not care like we do now ? --BenH. | ||
107 | */ | 108 | */ |
108 | struct hw_interrupt_type; | 109 | struct hw_interrupt_type; |
109 | static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) {} | ||
110 | 110 | ||
111 | #endif /* __KERNEL__ */ | 111 | #endif /* __KERNEL__ */ |
112 | #endif /* _ASM_POWERPC_HW_IRQ_H */ | 112 | #endif /* _ASM_POWERPC_HW_IRQ_H */ |
diff --git a/include/asm-powerpc/irq.h b/include/asm-powerpc/irq.h index a10feec29d..eb5f33e197 100644 --- a/include/asm-powerpc/irq.h +++ b/include/asm-powerpc/irq.h | |||
@@ -30,11 +30,6 @@ | |||
30 | #define IRQ_POLARITY_POSITIVE 0x2 /* high level or low->high edge */ | 30 | #define IRQ_POLARITY_POSITIVE 0x2 /* high level or low->high edge */ |
31 | #define IRQ_POLARITY_NEGATIVE 0x0 /* low level or high->low edge */ | 31 | #define IRQ_POLARITY_NEGATIVE 0x0 /* low level or high->low edge */ |
32 | 32 | ||
33 | /* | ||
34 | * IRQ line status macro IRQ_PER_CPU is used | ||
35 | */ | ||
36 | #define ARCH_HAS_IRQ_PER_CPU | ||
37 | |||
38 | #define get_irq_desc(irq) (&irq_desc[(irq)]) | 33 | #define get_irq_desc(irq) (&irq_desc[(irq)]) |
39 | 34 | ||
40 | /* Define a way to iterate across irqs. */ | 35 | /* Define a way to iterate across irqs. */ |
diff --git a/include/asm-powerpc/kdebug.h b/include/asm-powerpc/kdebug.h index c01786ab5f..532bfee934 100644 --- a/include/asm-powerpc/kdebug.h +++ b/include/asm-powerpc/kdebug.h | |||
@@ -18,6 +18,8 @@ struct die_args { | |||
18 | 18 | ||
19 | extern int register_die_notifier(struct notifier_block *); | 19 | extern int register_die_notifier(struct notifier_block *); |
20 | extern int unregister_die_notifier(struct notifier_block *); | 20 | extern int unregister_die_notifier(struct notifier_block *); |
21 | extern int register_page_fault_notifier(struct notifier_block *); | ||
22 | extern int unregister_page_fault_notifier(struct notifier_block *); | ||
21 | extern struct atomic_notifier_head powerpc_die_chain; | 23 | extern struct atomic_notifier_head powerpc_die_chain; |
22 | 24 | ||
23 | /* Grossly misnamed. */ | 25 | /* Grossly misnamed. */ |
diff --git a/include/asm-powerpc/kprobes.h b/include/asm-powerpc/kprobes.h index f466bc804f..2d0af52c82 100644 --- a/include/asm-powerpc/kprobes.h +++ b/include/asm-powerpc/kprobes.h | |||
@@ -50,6 +50,8 @@ typedef unsigned int kprobe_opcode_t; | |||
50 | IS_TWI(instr) || IS_TDI(instr)) | 50 | IS_TWI(instr) || IS_TDI(instr)) |
51 | 51 | ||
52 | #define ARCH_SUPPORTS_KRETPROBES | 52 | #define ARCH_SUPPORTS_KRETPROBES |
53 | #define ARCH_INACTIVE_KPROBE_COUNT 1 | ||
54 | |||
53 | void kretprobe_trampoline(void); | 55 | void kretprobe_trampoline(void); |
54 | extern void arch_remove_kprobe(struct kprobe *p); | 56 | extern void arch_remove_kprobe(struct kprobe *p); |
55 | 57 | ||
diff --git a/include/asm-powerpc/pci.h b/include/asm-powerpc/pci.h index 5d2c9e6c4b..46afd29b90 100644 --- a/include/asm-powerpc/pci.h +++ b/include/asm-powerpc/pci.h | |||
@@ -242,7 +242,7 @@ extern pgprot_t pci_phys_mem_access_prot(struct file *file, | |||
242 | #define HAVE_ARCH_PCI_RESOURCE_TO_USER | 242 | #define HAVE_ARCH_PCI_RESOURCE_TO_USER |
243 | extern void pci_resource_to_user(const struct pci_dev *dev, int bar, | 243 | extern void pci_resource_to_user(const struct pci_dev *dev, int bar, |
244 | const struct resource *rsrc, | 244 | const struct resource *rsrc, |
245 | u64 *start, u64 *end); | 245 | resource_size_t *start, resource_size_t *end); |
246 | #endif /* CONFIG_PPC_MULTIPLATFORM || CONFIG_PPC32 */ | 246 | #endif /* CONFIG_PPC_MULTIPLATFORM || CONFIG_PPC32 */ |
247 | 247 | ||
248 | #endif /* __KERNEL__ */ | 248 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-powerpc/topology.h b/include/asm-powerpc/topology.h index 92f3e5507d..bbc3844b08 100644 --- a/include/asm-powerpc/topology.h +++ b/include/asm-powerpc/topology.h | |||
@@ -93,5 +93,10 @@ static inline void sysfs_remove_device_from_node(struct sys_device *dev, | |||
93 | 93 | ||
94 | #endif /* CONFIG_NUMA */ | 94 | #endif /* CONFIG_NUMA */ |
95 | 95 | ||
96 | #ifdef CONFIG_SMP | ||
97 | #include <asm/cputable.h> | ||
98 | #define smt_capable() (cpu_has_feature(CPU_FTR_SMT)) | ||
99 | #endif | ||
100 | |||
96 | #endif /* __KERNEL__ */ | 101 | #endif /* __KERNEL__ */ |
97 | #endif /* _ASM_POWERPC_TOPOLOGY_H */ | 102 | #endif /* _ASM_POWERPC_TOPOLOGY_H */ |
diff --git a/include/asm-ppc/pci.h b/include/asm-ppc/pci.h index 61434edbad..11ffaaa5da 100644 --- a/include/asm-ppc/pci.h +++ b/include/asm-ppc/pci.h | |||
@@ -133,7 +133,7 @@ extern pgprot_t pci_phys_mem_access_prot(struct file *file, | |||
133 | #define HAVE_ARCH_PCI_RESOURCE_TO_USER | 133 | #define HAVE_ARCH_PCI_RESOURCE_TO_USER |
134 | extern void pci_resource_to_user(const struct pci_dev *dev, int bar, | 134 | extern void pci_resource_to_user(const struct pci_dev *dev, int bar, |
135 | const struct resource *rsrc, | 135 | const struct resource *rsrc, |
136 | u64 *start, u64 *end); | 136 | resource_size_t *start, resource_size_t *end); |
137 | 137 | ||
138 | 138 | ||
139 | #endif /* __KERNEL__ */ | 139 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-s390/bitops.h b/include/asm-s390/bitops.h index 4d2b126ba1..0ddcdba79e 100644 --- a/include/asm-s390/bitops.h +++ b/include/asm-s390/bitops.h | |||
@@ -12,6 +12,9 @@ | |||
12 | * Copyright (C) 1992, Linus Torvalds | 12 | * Copyright (C) 1992, Linus Torvalds |
13 | * | 13 | * |
14 | */ | 14 | */ |
15 | |||
16 | #ifdef __KERNEL__ | ||
17 | |||
15 | #include <linux/compiler.h> | 18 | #include <linux/compiler.h> |
16 | 19 | ||
17 | /* | 20 | /* |
@@ -50,19 +53,6 @@ | |||
50 | * with operation of the form "set_bit(bitnr, flags)". | 53 | * with operation of the form "set_bit(bitnr, flags)". |
51 | */ | 54 | */ |
52 | 55 | ||
53 | /* set ALIGN_CS to 1 if the SMP safe bit operations should | ||
54 | * align the address to 4 byte boundary. It seems to work | ||
55 | * without the alignment. | ||
56 | */ | ||
57 | #ifdef __KERNEL__ | ||
58 | #define ALIGN_CS 0 | ||
59 | #else | ||
60 | #define ALIGN_CS 1 | ||
61 | #ifndef CONFIG_SMP | ||
62 | #error "bitops won't work without CONFIG_SMP" | ||
63 | #endif | ||
64 | #endif | ||
65 | |||
66 | /* bitmap tables from arch/S390/kernel/bitmap.S */ | 56 | /* bitmap tables from arch/S390/kernel/bitmap.S */ |
67 | extern const char _oi_bitmap[]; | 57 | extern const char _oi_bitmap[]; |
68 | extern const char _ni_bitmap[]; | 58 | extern const char _ni_bitmap[]; |
@@ -121,10 +111,6 @@ static inline void set_bit_cs(unsigned long nr, volatile unsigned long *ptr) | |||
121 | unsigned long addr, old, new, mask; | 111 | unsigned long addr, old, new, mask; |
122 | 112 | ||
123 | addr = (unsigned long) ptr; | 113 | addr = (unsigned long) ptr; |
124 | #if ALIGN_CS == 1 | ||
125 | nr += (addr & __BITOPS_ALIGN) << 3; /* add alignment to bit number */ | ||
126 | addr ^= addr & __BITOPS_ALIGN; /* align address to 8 */ | ||
127 | #endif | ||
128 | /* calculate address for CS */ | 114 | /* calculate address for CS */ |
129 | addr += (nr ^ (nr & (__BITOPS_WORDSIZE - 1))) >> 3; | 115 | addr += (nr ^ (nr & (__BITOPS_WORDSIZE - 1))) >> 3; |
130 | /* make OR mask */ | 116 | /* make OR mask */ |
@@ -141,10 +127,6 @@ static inline void clear_bit_cs(unsigned long nr, volatile unsigned long *ptr) | |||
141 | unsigned long addr, old, new, mask; | 127 | unsigned long addr, old, new, mask; |
142 | 128 | ||
143 | addr = (unsigned long) ptr; | 129 | addr = (unsigned long) ptr; |
144 | #if ALIGN_CS == 1 | ||
145 | nr += (addr & __BITOPS_ALIGN) << 3; /* add alignment to bit number */ | ||
146 | addr ^= addr & __BITOPS_ALIGN; /* align address to 8 */ | ||
147 | #endif | ||
148 | /* calculate address for CS */ | 130 | /* calculate address for CS */ |
149 | addr += (nr ^ (nr & (__BITOPS_WORDSIZE - 1))) >> 3; | 131 | addr += (nr ^ (nr & (__BITOPS_WORDSIZE - 1))) >> 3; |
150 | /* make AND mask */ | 132 | /* make AND mask */ |
@@ -161,10 +143,6 @@ static inline void change_bit_cs(unsigned long nr, volatile unsigned long *ptr) | |||
161 | unsigned long addr, old, new, mask; | 143 | unsigned long addr, old, new, mask; |
162 | 144 | ||
163 | addr = (unsigned long) ptr; | 145 | addr = (unsigned long) ptr; |
164 | #if ALIGN_CS == 1 | ||
165 | nr += (addr & __BITOPS_ALIGN) << 3; /* add alignment to bit number */ | ||
166 | addr ^= addr & __BITOPS_ALIGN; /* align address to 8 */ | ||
167 | #endif | ||
168 | /* calculate address for CS */ | 146 | /* calculate address for CS */ |
169 | addr += (nr ^ (nr & (__BITOPS_WORDSIZE - 1))) >> 3; | 147 | addr += (nr ^ (nr & (__BITOPS_WORDSIZE - 1))) >> 3; |
170 | /* make XOR mask */ | 148 | /* make XOR mask */ |
@@ -182,10 +160,6 @@ test_and_set_bit_cs(unsigned long nr, volatile unsigned long *ptr) | |||
182 | unsigned long addr, old, new, mask; | 160 | unsigned long addr, old, new, mask; |
183 | 161 | ||
184 | addr = (unsigned long) ptr; | 162 | addr = (unsigned long) ptr; |
185 | #if ALIGN_CS == 1 | ||
186 | nr += (addr & __BITOPS_ALIGN) << 3; /* add alignment to bit number */ | ||
187 | addr ^= addr & __BITOPS_ALIGN; /* align address to 8 */ | ||
188 | #endif | ||
189 | /* calculate address for CS */ | 163 | /* calculate address for CS */ |
190 | addr += (nr ^ (nr & (__BITOPS_WORDSIZE - 1))) >> 3; | 164 | addr += (nr ^ (nr & (__BITOPS_WORDSIZE - 1))) >> 3; |
191 | /* make OR/test mask */ | 165 | /* make OR/test mask */ |
@@ -205,10 +179,6 @@ test_and_clear_bit_cs(unsigned long nr, volatile unsigned long *ptr) | |||
205 | unsigned long addr, old, new, mask; | 179 | unsigned long addr, old, new, mask; |
206 | 180 | ||
207 | addr = (unsigned long) ptr; | 181 | addr = (unsigned long) ptr; |
208 | #if ALIGN_CS == 1 | ||
209 | nr += (addr & __BITOPS_ALIGN) << 3; /* add alignment to bit number */ | ||
210 | addr ^= addr & __BITOPS_ALIGN; /* align address to 8 */ | ||
211 | #endif | ||
212 | /* calculate address for CS */ | 182 | /* calculate address for CS */ |
213 | addr += (nr ^ (nr & (__BITOPS_WORDSIZE - 1))) >> 3; | 183 | addr += (nr ^ (nr & (__BITOPS_WORDSIZE - 1))) >> 3; |
214 | /* make AND/test mask */ | 184 | /* make AND/test mask */ |
@@ -228,10 +198,6 @@ test_and_change_bit_cs(unsigned long nr, volatile unsigned long *ptr) | |||
228 | unsigned long addr, old, new, mask; | 198 | unsigned long addr, old, new, mask; |
229 | 199 | ||
230 | addr = (unsigned long) ptr; | 200 | addr = (unsigned long) ptr; |
231 | #if ALIGN_CS == 1 | ||
232 | nr += (addr & __BITOPS_ALIGN) << 3; /* add alignment to bit number */ | ||
233 | addr ^= addr & __BITOPS_ALIGN; /* align address to 8 */ | ||
234 | #endif | ||
235 | /* calculate address for CS */ | 201 | /* calculate address for CS */ |
236 | addr += (nr ^ (nr & (__BITOPS_WORDSIZE - 1))) >> 3; | 202 | addr += (nr ^ (nr & (__BITOPS_WORDSIZE - 1))) >> 3; |
237 | /* make XOR/test mask */ | 203 | /* make XOR/test mask */ |
@@ -834,8 +800,6 @@ static inline int sched_find_first_bit(unsigned long *b) | |||
834 | 800 | ||
835 | #include <asm-generic/bitops/hweight.h> | 801 | #include <asm-generic/bitops/hweight.h> |
836 | 802 | ||
837 | #ifdef __KERNEL__ | ||
838 | |||
839 | /* | 803 | /* |
840 | * ATTENTION: intel byte ordering convention for ext2 and minix !! | 804 | * ATTENTION: intel byte ordering convention for ext2 and minix !! |
841 | * bit 0 is the LSB of addr; bit 31 is the MSB of addr; | 805 | * bit 0 is the LSB of addr; bit 31 is the MSB of addr; |
diff --git a/include/asm-s390/cio.h b/include/asm-s390/cio.h index 089cf567c3..2b16193063 100644 --- a/include/asm-s390/cio.h +++ b/include/asm-s390/cio.h | |||
@@ -276,6 +276,8 @@ extern void wait_cons_dev(void); | |||
276 | 276 | ||
277 | extern void clear_all_subchannels(void); | 277 | extern void clear_all_subchannels(void); |
278 | 278 | ||
279 | extern void css_schedule_reprobe(void); | ||
280 | |||
279 | #endif | 281 | #endif |
280 | 282 | ||
281 | #endif | 283 | #endif |
diff --git a/include/asm-s390/cmb.h b/include/asm-s390/cmb.h index 2d09950a9c..241756f80d 100644 --- a/include/asm-s390/cmb.h +++ b/include/asm-s390/cmb.h | |||
@@ -44,10 +44,6 @@ struct cmbdata { | |||
44 | #define BIODASDCMFENABLE _IO(DASD_IOCTL_LETTER,32) | 44 | #define BIODASDCMFENABLE _IO(DASD_IOCTL_LETTER,32) |
45 | /* enable channel measurement */ | 45 | /* enable channel measurement */ |
46 | #define BIODASDCMFDISABLE _IO(DASD_IOCTL_LETTER,33) | 46 | #define BIODASDCMFDISABLE _IO(DASD_IOCTL_LETTER,33) |
47 | /* reset channel measurement block */ | ||
48 | #define BIODASDRESETCMB _IO(DASD_IOCTL_LETTER,34) | ||
49 | /* read channel measurement data */ | ||
50 | #define BIODASDREADCMB _IOWR(DASD_IOCTL_LETTER,32,__u64) | ||
51 | /* read channel measurement data */ | 47 | /* read channel measurement data */ |
52 | #define BIODASDREADALLCMB _IOWR(DASD_IOCTL_LETTER,33,struct cmbdata) | 48 | #define BIODASDREADALLCMB _IOWR(DASD_IOCTL_LETTER,33,struct cmbdata) |
53 | 49 | ||
diff --git a/include/asm-s390/dasd.h b/include/asm-s390/dasd.h index 1630c26e8f..c042f95780 100644 --- a/include/asm-s390/dasd.h +++ b/include/asm-s390/dasd.h | |||
@@ -68,10 +68,12 @@ typedef struct dasd_information2_t { | |||
68 | * 0x00: default features | 68 | * 0x00: default features |
69 | * 0x01: readonly (ro) | 69 | * 0x01: readonly (ro) |
70 | * 0x02: use diag discipline (diag) | 70 | * 0x02: use diag discipline (diag) |
71 | * 0x04: set the device initially online (internal use only) | ||
71 | */ | 72 | */ |
72 | #define DASD_FEATURE_DEFAULT 0 | 73 | #define DASD_FEATURE_DEFAULT 0x00 |
73 | #define DASD_FEATURE_READONLY 1 | 74 | #define DASD_FEATURE_READONLY 0x01 |
74 | #define DASD_FEATURE_USEDIAG 2 | 75 | #define DASD_FEATURE_USEDIAG 0x02 |
76 | #define DASD_FEATURE_INITIAL_ONLINE 0x04 | ||
75 | 77 | ||
76 | #define DASD_PARTN_BITS 2 | 78 | #define DASD_PARTN_BITS 2 |
77 | 79 | ||
diff --git a/include/asm-s390/thread_info.h b/include/asm-s390/thread_info.h index 8e0c7ed73d..0a518915bf 100644 --- a/include/asm-s390/thread_info.h +++ b/include/asm-s390/thread_info.h | |||
@@ -63,6 +63,7 @@ struct thread_info { | |||
63 | .exec_domain = &default_exec_domain, \ | 63 | .exec_domain = &default_exec_domain, \ |
64 | .flags = 0, \ | 64 | .flags = 0, \ |
65 | .cpu = 0, \ | 65 | .cpu = 0, \ |
66 | .preempt_count = 1, \ | ||
66 | .restart_block = { \ | 67 | .restart_block = { \ |
67 | .fn = do_no_restart_syscall, \ | 68 | .fn = do_no_restart_syscall, \ |
68 | }, \ | 69 | }, \ |
diff --git a/include/asm-s390/unistd.h b/include/asm-s390/unistd.h index e21443d3ea..aa7a243862 100644 --- a/include/asm-s390/unistd.h +++ b/include/asm-s390/unistd.h | |||
@@ -394,11 +394,9 @@ | |||
394 | 394 | ||
395 | #ifdef __KERNEL__ | 395 | #ifdef __KERNEL__ |
396 | 396 | ||
397 | /* user-visible error numbers are in the range -1 - -122: see <asm-s390/errno.h> */ | ||
398 | |||
399 | #define __syscall_return(type, res) \ | 397 | #define __syscall_return(type, res) \ |
400 | do { \ | 398 | do { \ |
401 | if ((unsigned long)(res) >= (unsigned long)(-125)) { \ | 399 | if ((unsigned long)(res) >= (unsigned long)(-4095)) {\ |
402 | errno = -(res); \ | 400 | errno = -(res); \ |
403 | res = -1; \ | 401 | res = -1; \ |
404 | } \ | 402 | } \ |
diff --git a/include/asm-sh/hw_irq.h b/include/asm-sh/hw_irq.h index 1d934fb2c5..fed2661696 100644 --- a/include/asm-sh/hw_irq.h +++ b/include/asm-sh/hw_irq.h | |||
@@ -1,9 +1,4 @@ | |||
1 | #ifndef __ASM_SH_HW_IRQ_H | 1 | #ifndef __ASM_SH_HW_IRQ_H |
2 | #define __ASM_SH_HW_IRQ_H | 2 | #define __ASM_SH_HW_IRQ_H |
3 | 3 | ||
4 | static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) | ||
5 | { | ||
6 | /* Nothing to do */ | ||
7 | } | ||
8 | |||
9 | #endif /* __ASM_SH_HW_IRQ_H */ | 4 | #endif /* __ASM_SH_HW_IRQ_H */ |
diff --git a/include/asm-sh64/hw_irq.h b/include/asm-sh64/hw_irq.h index ae718d1f2d..ebb39089b0 100644 --- a/include/asm-sh64/hw_irq.h +++ b/include/asm-sh64/hw_irq.h | |||
@@ -11,6 +11,5 @@ | |||
11 | * Copyright (C) 2000, 2001 Paolo Alberelli | 11 | * Copyright (C) 2000, 2001 Paolo Alberelli |
12 | * | 12 | * |
13 | */ | 13 | */ |
14 | static __inline__ void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) { /* Nothing to do */ } | ||
15 | 14 | ||
16 | #endif /* __ASM_SH64_HW_IRQ_H */ | 15 | #endif /* __ASM_SH64_HW_IRQ_H */ |
diff --git a/include/asm-sparc/io.h b/include/asm-sparc/io.h index a42df208d5..cab0b851b8 100644 --- a/include/asm-sparc/io.h +++ b/include/asm-sparc/io.h | |||
@@ -249,6 +249,22 @@ extern void __iomem *ioremap(unsigned long offset, unsigned long size); | |||
249 | #define ioremap_nocache(X,Y) ioremap((X),(Y)) | 249 | #define ioremap_nocache(X,Y) ioremap((X),(Y)) |
250 | extern void iounmap(volatile void __iomem *addr); | 250 | extern void iounmap(volatile void __iomem *addr); |
251 | 251 | ||
252 | #define ioread8(X) readb(X) | ||
253 | #define ioread16(X) readw(X) | ||
254 | #define ioread32(X) readl(X) | ||
255 | #define iowrite8(val,X) writeb(val,X) | ||
256 | #define iowrite16(val,X) writew(val,X) | ||
257 | #define iowrite32(val,X) writel(val,X) | ||
258 | |||
259 | /* Create a virtual mapping cookie for an IO port range */ | ||
260 | extern void __iomem *ioport_map(unsigned long port, unsigned int nr); | ||
261 | extern void ioport_unmap(void __iomem *); | ||
262 | |||
263 | /* Create a virtual mapping cookie for a PCI BAR (memory or IO) */ | ||
264 | struct pci_dev; | ||
265 | extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max); | ||
266 | extern void pci_iounmap(struct pci_dev *dev, void __iomem *); | ||
267 | |||
252 | /* | 268 | /* |
253 | * Bus number may be in res->flags... somewhere. | 269 | * Bus number may be in res->flags... somewhere. |
254 | */ | 270 | */ |
diff --git a/include/asm-sparc/prom.h b/include/asm-sparc/prom.h index c5e3d26eab..f9cf44c071 100644 --- a/include/asm-sparc/prom.h +++ b/include/asm-sparc/prom.h | |||
@@ -35,6 +35,8 @@ struct property { | |||
35 | int length; | 35 | int length; |
36 | void *value; | 36 | void *value; |
37 | struct property *next; | 37 | struct property *next; |
38 | unsigned long _flags; | ||
39 | unsigned int unique_id; | ||
38 | }; | 40 | }; |
39 | 41 | ||
40 | struct device_node { | 42 | struct device_node { |
@@ -58,8 +60,15 @@ struct device_node { | |||
58 | struct kref kref; | 60 | struct kref kref; |
59 | unsigned long _flags; | 61 | unsigned long _flags; |
60 | void *data; | 62 | void *data; |
63 | unsigned int unique_id; | ||
61 | }; | 64 | }; |
62 | 65 | ||
66 | /* flag descriptions */ | ||
67 | #define OF_DYNAMIC 1 /* node and properties were allocated via kmalloc */ | ||
68 | |||
69 | #define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags) | ||
70 | #define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags) | ||
71 | |||
63 | static inline void set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de) | 72 | static inline void set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de) |
64 | { | 73 | { |
65 | dn->pde = de; | 74 | dn->pde = de; |
@@ -88,6 +97,7 @@ extern struct property *of_find_property(struct device_node *np, | |||
88 | extern int of_device_is_compatible(struct device_node *device, const char *); | 97 | extern int of_device_is_compatible(struct device_node *device, const char *); |
89 | extern void *of_get_property(struct device_node *node, const char *name, | 98 | extern void *of_get_property(struct device_node *node, const char *name, |
90 | int *lenp); | 99 | int *lenp); |
100 | extern int of_set_property(struct device_node *node, const char *name, void *val, int len); | ||
91 | extern int of_getintprop_default(struct device_node *np, | 101 | extern int of_getintprop_default(struct device_node *np, |
92 | const char *name, | 102 | const char *name, |
93 | int def); | 103 | int def); |
diff --git a/include/asm-sparc64/dma-mapping.h b/include/asm-sparc64/dma-mapping.h index 3c2b5bc865..0f5b89c932 100644 --- a/include/asm-sparc64/dma-mapping.h +++ b/include/asm-sparc64/dma-mapping.h | |||
@@ -162,4 +162,47 @@ static inline void dma_free_coherent(struct device *dev, size_t size, | |||
162 | 162 | ||
163 | #endif /* PCI */ | 163 | #endif /* PCI */ |
164 | 164 | ||
165 | |||
166 | /* Now for the API extensions over the pci_ one */ | ||
167 | |||
168 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) | ||
169 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) | ||
170 | #define dma_is_consistent(d) (1) | ||
171 | |||
172 | static inline int | ||
173 | dma_get_cache_alignment(void) | ||
174 | { | ||
175 | /* no easy way to get cache size on all processors, so return | ||
176 | * the maximum possible, to be safe */ | ||
177 | return (1 << INTERNODE_CACHE_SHIFT); | ||
178 | } | ||
179 | |||
180 | static inline void | ||
181 | dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t dma_handle, | ||
182 | unsigned long offset, size_t size, | ||
183 | enum dma_data_direction direction) | ||
184 | { | ||
185 | /* just sync everything, that's all the pci API can do */ | ||
186 | dma_sync_single_for_cpu(dev, dma_handle, offset+size, direction); | ||
187 | } | ||
188 | |||
189 | static inline void | ||
190 | dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle, | ||
191 | unsigned long offset, size_t size, | ||
192 | enum dma_data_direction direction) | ||
193 | { | ||
194 | /* just sync everything, that's all the pci API can do */ | ||
195 | dma_sync_single_for_device(dev, dma_handle, offset+size, direction); | ||
196 | } | ||
197 | |||
198 | static inline void | ||
199 | dma_cache_sync(void *vaddr, size_t size, | ||
200 | enum dma_data_direction direction) | ||
201 | { | ||
202 | /* could define this in terms of the dma_cache ... operations, | ||
203 | * but if you get this on a platform, you should convert the platform | ||
204 | * to using the generic device DMA API */ | ||
205 | BUG(); | ||
206 | } | ||
207 | |||
165 | #endif /* _ASM_SPARC64_DMA_MAPPING_H */ | 208 | #endif /* _ASM_SPARC64_DMA_MAPPING_H */ |
diff --git a/include/asm-sparc64/floppy.h b/include/asm-sparc64/floppy.h index f8d57bb557..b591d0e8d8 100644 --- a/include/asm-sparc64/floppy.h +++ b/include/asm-sparc64/floppy.h | |||
@@ -208,7 +208,55 @@ static void sun_fd_enable_dma(void) | |||
208 | pdma_areasize = pdma_size; | 208 | pdma_areasize = pdma_size; |
209 | } | 209 | } |
210 | 210 | ||
211 | extern irqreturn_t sparc_floppy_irq(int, void *, struct pt_regs *); | 211 | irqreturn_t sparc_floppy_irq(int irq, void *dev_cookie, struct pt_regs *regs) |
212 | { | ||
213 | if (likely(doing_pdma)) { | ||
214 | void __iomem *stat = (void __iomem *) fdc_status; | ||
215 | unsigned char *vaddr = pdma_vaddr; | ||
216 | unsigned long size = pdma_size; | ||
217 | u8 val; | ||
218 | |||
219 | while (size) { | ||
220 | val = readb(stat); | ||
221 | if (unlikely(!(val & 0x80))) { | ||
222 | pdma_vaddr = vaddr; | ||
223 | pdma_size = size; | ||
224 | return IRQ_HANDLED; | ||
225 | } | ||
226 | if (unlikely(!(val & 0x20))) { | ||
227 | pdma_vaddr = vaddr; | ||
228 | pdma_size = size; | ||
229 | doing_pdma = 0; | ||
230 | goto main_interrupt; | ||
231 | } | ||
232 | if (val & 0x40) { | ||
233 | /* read */ | ||
234 | *vaddr++ = readb(stat + 1); | ||
235 | } else { | ||
236 | unsigned char data = *vaddr++; | ||
237 | |||
238 | /* write */ | ||
239 | writeb(data, stat + 1); | ||
240 | } | ||
241 | size--; | ||
242 | } | ||
243 | |||
244 | pdma_vaddr = vaddr; | ||
245 | pdma_size = size; | ||
246 | |||
247 | /* Send Terminal Count pulse to floppy controller. */ | ||
248 | val = readb(auxio_register); | ||
249 | val |= AUXIO_AUX1_FTCNT; | ||
250 | writeb(val, auxio_register); | ||
251 | val &= ~AUXIO_AUX1_FTCNT; | ||
252 | writeb(val, auxio_register); | ||
253 | |||
254 | doing_pdma = 0; | ||
255 | } | ||
256 | |||
257 | main_interrupt: | ||
258 | return floppy_interrupt(irq, dev_cookie, regs); | ||
259 | } | ||
212 | 260 | ||
213 | static int sun_fd_request_irq(void) | 261 | static int sun_fd_request_irq(void) |
214 | { | 262 | { |
diff --git a/include/asm-sparc64/kdebug.h b/include/asm-sparc64/kdebug.h index 4040d127ac..11251bdd00 100644 --- a/include/asm-sparc64/kdebug.h +++ b/include/asm-sparc64/kdebug.h | |||
@@ -17,6 +17,8 @@ struct die_args { | |||
17 | 17 | ||
18 | extern int register_die_notifier(struct notifier_block *); | 18 | extern int register_die_notifier(struct notifier_block *); |
19 | extern int unregister_die_notifier(struct notifier_block *); | 19 | extern int unregister_die_notifier(struct notifier_block *); |
20 | extern int register_page_fault_notifier(struct notifier_block *); | ||
21 | extern int unregister_page_fault_notifier(struct notifier_block *); | ||
20 | extern struct atomic_notifier_head sparc64die_chain; | 22 | extern struct atomic_notifier_head sparc64die_chain; |
21 | 23 | ||
22 | extern void bad_trap(struct pt_regs *, long); | 24 | extern void bad_trap(struct pt_regs *, long); |
diff --git a/include/asm-sparc64/kprobes.h b/include/asm-sparc64/kprobes.h index e9bb26f770..15065af566 100644 --- a/include/asm-sparc64/kprobes.h +++ b/include/asm-sparc64/kprobes.h | |||
@@ -12,6 +12,7 @@ typedef u32 kprobe_opcode_t; | |||
12 | 12 | ||
13 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry | 13 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry |
14 | #define arch_remove_kprobe(p) do {} while (0) | 14 | #define arch_remove_kprobe(p) do {} while (0) |
15 | #define ARCH_INACTIVE_KPROBE_COUNT 0 | ||
15 | 16 | ||
16 | /* Architecture specific copy of original instruction*/ | 17 | /* Architecture specific copy of original instruction*/ |
17 | struct arch_specific_insn { | 18 | struct arch_specific_insn { |
diff --git a/include/asm-sparc64/prom.h b/include/asm-sparc64/prom.h index 6d1556c0c2..265614d497 100644 --- a/include/asm-sparc64/prom.h +++ b/include/asm-sparc64/prom.h | |||
@@ -35,6 +35,8 @@ struct property { | |||
35 | int length; | 35 | int length; |
36 | void *value; | 36 | void *value; |
37 | struct property *next; | 37 | struct property *next; |
38 | unsigned long _flags; | ||
39 | unsigned int unique_id; | ||
38 | }; | 40 | }; |
39 | 41 | ||
40 | struct device_node { | 42 | struct device_node { |
@@ -58,8 +60,15 @@ struct device_node { | |||
58 | struct kref kref; | 60 | struct kref kref; |
59 | unsigned long _flags; | 61 | unsigned long _flags; |
60 | void *data; | 62 | void *data; |
63 | unsigned int unique_id; | ||
61 | }; | 64 | }; |
62 | 65 | ||
66 | /* flag descriptions */ | ||
67 | #define OF_DYNAMIC 1 /* node and properties were allocated via kmalloc */ | ||
68 | |||
69 | #define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags) | ||
70 | #define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags) | ||
71 | |||
63 | static inline void set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de) | 72 | static inline void set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de) |
64 | { | 73 | { |
65 | dn->pde = de; | 74 | dn->pde = de; |
@@ -88,6 +97,7 @@ extern struct property *of_find_property(struct device_node *np, | |||
88 | extern int of_device_is_compatible(struct device_node *device, const char *); | 97 | extern int of_device_is_compatible(struct device_node *device, const char *); |
89 | extern void *of_get_property(struct device_node *node, const char *name, | 98 | extern void *of_get_property(struct device_node *node, const char *name, |
90 | int *lenp); | 99 | int *lenp); |
100 | extern int of_set_property(struct device_node *node, const char *name, void *val, int len); | ||
91 | extern int of_getintprop_default(struct device_node *np, | 101 | extern int of_getintprop_default(struct device_node *np, |
92 | const char *name, | 102 | const char *name, |
93 | int def); | 103 | int def); |
diff --git a/include/asm-sparc64/topology.h b/include/asm-sparc64/topology.h index 0e234e201b..98a6c61358 100644 --- a/include/asm-sparc64/topology.h +++ b/include/asm-sparc64/topology.h | |||
@@ -1,6 +1,9 @@ | |||
1 | #ifndef _ASM_SPARC64_TOPOLOGY_H | 1 | #ifndef _ASM_SPARC64_TOPOLOGY_H |
2 | #define _ASM_SPARC64_TOPOLOGY_H | 2 | #define _ASM_SPARC64_TOPOLOGY_H |
3 | 3 | ||
4 | #include <asm/spitfire.h> | ||
5 | #define smt_capable() (tlb_type == hypervisor) | ||
6 | |||
4 | #include <asm-generic/topology.h> | 7 | #include <asm-generic/topology.h> |
5 | 8 | ||
6 | #endif /* _ASM_SPARC64_TOPOLOGY_H */ | 9 | #endif /* _ASM_SPARC64_TOPOLOGY_H */ |
diff --git a/include/asm-um/hw_irq.h b/include/asm-um/hw_irq.h index 4ee38c0b6a..1cf84cf5f2 100644 --- a/include/asm-um/hw_irq.h +++ b/include/asm-um/hw_irq.h | |||
@@ -4,7 +4,4 @@ | |||
4 | #include "asm/irq.h" | 4 | #include "asm/irq.h" |
5 | #include "asm/archparam.h" | 5 | #include "asm/archparam.h" |
6 | 6 | ||
7 | static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) | ||
8 | {} | ||
9 | |||
10 | #endif | 7 | #endif |
diff --git a/include/asm-v850/hw_irq.h b/include/asm-v850/hw_irq.h index a8aab43427..043e94bb6b 100644 --- a/include/asm-v850/hw_irq.h +++ b/include/asm-v850/hw_irq.h | |||
@@ -1,8 +1,4 @@ | |||
1 | #ifndef __V850_HW_IRQ_H__ | 1 | #ifndef __V850_HW_IRQ_H__ |
2 | #define __V850_HW_IRQ_H__ | 2 | #define __V850_HW_IRQ_H__ |
3 | 3 | ||
4 | static inline void hw_resend_irq (struct hw_interrupt_type *h, unsigned int i) | ||
5 | { | ||
6 | } | ||
7 | |||
8 | #endif /* __V850_HW_IRQ_H__ */ | 4 | #endif /* __V850_HW_IRQ_H__ */ |
diff --git a/include/asm-x86_64/alternative.h b/include/asm-x86_64/alternative.h new file mode 100644 index 0000000000..387c8f66af --- /dev/null +++ b/include/asm-x86_64/alternative.h | |||
@@ -0,0 +1,146 @@ | |||
1 | #ifndef _X86_64_ALTERNATIVE_H | ||
2 | #define _X86_64_ALTERNATIVE_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | |||
6 | #include <linux/types.h> | ||
7 | |||
8 | struct alt_instr { | ||
9 | u8 *instr; /* original instruction */ | ||
10 | u8 *replacement; | ||
11 | u8 cpuid; /* cpuid bit set for replacement */ | ||
12 | u8 instrlen; /* length of original instruction */ | ||
13 | u8 replacementlen; /* length of new instruction, <= instrlen */ | ||
14 | u8 pad[5]; | ||
15 | }; | ||
16 | |||
17 | extern void apply_alternatives(struct alt_instr *start, struct alt_instr *end); | ||
18 | |||
19 | struct module; | ||
20 | extern void alternatives_smp_module_add(struct module *mod, char *name, | ||
21 | void *locks, void *locks_end, | ||
22 | void *text, void *text_end); | ||
23 | extern void alternatives_smp_module_del(struct module *mod); | ||
24 | extern void alternatives_smp_switch(int smp); | ||
25 | |||
26 | #endif | ||
27 | |||
28 | /* | ||
29 | * Alternative instructions for different CPU types or capabilities. | ||
30 | * | ||
31 | * This allows to use optimized instructions even on generic binary | ||
32 | * kernels. | ||
33 | * | ||
34 | * length of oldinstr must be longer or equal the length of newinstr | ||
35 | * It can be padded with nops as needed. | ||
36 | * | ||
37 | * For non barrier like inlines please define new variants | ||
38 | * without volatile and memory clobber. | ||
39 | */ | ||
40 | #define alternative(oldinstr, newinstr, feature) \ | ||
41 | asm volatile ("661:\n\t" oldinstr "\n662:\n" \ | ||
42 | ".section .altinstructions,\"a\"\n" \ | ||
43 | " .align 8\n" \ | ||
44 | " .quad 661b\n" /* label */ \ | ||
45 | " .quad 663f\n" /* new instruction */ \ | ||
46 | " .byte %c0\n" /* feature bit */ \ | ||
47 | " .byte 662b-661b\n" /* sourcelen */ \ | ||
48 | " .byte 664f-663f\n" /* replacementlen */ \ | ||
49 | ".previous\n" \ | ||
50 | ".section .altinstr_replacement,\"ax\"\n" \ | ||
51 | "663:\n\t" newinstr "\n664:\n" /* replacement */ \ | ||
52 | ".previous" :: "i" (feature) : "memory") | ||
53 | |||
54 | /* | ||
55 | * Alternative inline assembly with input. | ||
56 | * | ||
57 | * Pecularities: | ||
58 | * No memory clobber here. | ||
59 | * Argument numbers start with 1. | ||
60 | * Best is to use constraints that are fixed size (like (%1) ... "r") | ||
61 | * If you use variable sized constraints like "m" or "g" in the | ||
62 | * replacement make sure to pad to the worst case length. | ||
63 | */ | ||
64 | #define alternative_input(oldinstr, newinstr, feature, input...) \ | ||
65 | asm volatile ("661:\n\t" oldinstr "\n662:\n" \ | ||
66 | ".section .altinstructions,\"a\"\n" \ | ||
67 | " .align 8\n" \ | ||
68 | " .quad 661b\n" /* label */ \ | ||
69 | " .quad 663f\n" /* new instruction */ \ | ||
70 | " .byte %c0\n" /* feature bit */ \ | ||
71 | " .byte 662b-661b\n" /* sourcelen */ \ | ||
72 | " .byte 664f-663f\n" /* replacementlen */ \ | ||
73 | ".previous\n" \ | ||
74 | ".section .altinstr_replacement,\"ax\"\n" \ | ||
75 | "663:\n\t" newinstr "\n664:\n" /* replacement */ \ | ||
76 | ".previous" :: "i" (feature), ##input) | ||
77 | |||
78 | /* Like alternative_input, but with a single output argument */ | ||
79 | #define alternative_io(oldinstr, newinstr, feature, output, input...) \ | ||
80 | asm volatile ("661:\n\t" oldinstr "\n662:\n" \ | ||
81 | ".section .altinstructions,\"a\"\n" \ | ||
82 | " .align 8\n" \ | ||
83 | " .quad 661b\n" /* label */ \ | ||
84 | " .quad 663f\n" /* new instruction */ \ | ||
85 | " .byte %c[feat]\n" /* feature bit */ \ | ||
86 | " .byte 662b-661b\n" /* sourcelen */ \ | ||
87 | " .byte 664f-663f\n" /* replacementlen */ \ | ||
88 | ".previous\n" \ | ||
89 | ".section .altinstr_replacement,\"ax\"\n" \ | ||
90 | "663:\n\t" newinstr "\n664:\n" /* replacement */ \ | ||
91 | ".previous" : output : [feat] "i" (feature), ##input) | ||
92 | |||
93 | /* | ||
94 | * Alternative inline assembly for SMP. | ||
95 | * | ||
96 | * alternative_smp() takes two versions (SMP first, UP second) and is | ||
97 | * for more complex stuff such as spinlocks. | ||
98 | * | ||
99 | * The LOCK_PREFIX macro defined here replaces the LOCK and | ||
100 | * LOCK_PREFIX macros used everywhere in the source tree. | ||
101 | * | ||
102 | * SMP alternatives use the same data structures as the other | ||
103 | * alternatives and the X86_FEATURE_UP flag to indicate the case of a | ||
104 | * UP system running a SMP kernel. The existing apply_alternatives() | ||
105 | * works fine for patching a SMP kernel for UP. | ||
106 | * | ||
107 | * The SMP alternative tables can be kept after boot and contain both | ||
108 | * UP and SMP versions of the instructions to allow switching back to | ||
109 | * SMP at runtime, when hotplugging in a new CPU, which is especially | ||
110 | * useful in virtualized environments. | ||
111 | * | ||
112 | * The very common lock prefix is handled as special case in a | ||
113 | * separate table which is a pure address list without replacement ptr | ||
114 | * and size information. That keeps the table sizes small. | ||
115 | */ | ||
116 | |||
117 | #ifdef CONFIG_SMP | ||
118 | #define alternative_smp(smpinstr, upinstr, args...) \ | ||
119 | asm volatile ("661:\n\t" smpinstr "\n662:\n" \ | ||
120 | ".section .smp_altinstructions,\"a\"\n" \ | ||
121 | " .align 8\n" \ | ||
122 | " .quad 661b\n" /* label */ \ | ||
123 | " .quad 663f\n" /* new instruction */ \ | ||
124 | " .byte 0x66\n" /* X86_FEATURE_UP */ \ | ||
125 | " .byte 662b-661b\n" /* sourcelen */ \ | ||
126 | " .byte 664f-663f\n" /* replacementlen */ \ | ||
127 | ".previous\n" \ | ||
128 | ".section .smp_altinstr_replacement,\"awx\"\n" \ | ||
129 | "663:\n\t" upinstr "\n" /* replacement */ \ | ||
130 | "664:\n\t.fill 662b-661b,1,0x42\n" /* space for original */ \ | ||
131 | ".previous" : args) | ||
132 | |||
133 | #define LOCK_PREFIX \ | ||
134 | ".section .smp_locks,\"a\"\n" \ | ||
135 | " .align 8\n" \ | ||
136 | " .quad 661f\n" /* address */ \ | ||
137 | ".previous\n" \ | ||
138 | "661:\n\tlock; " | ||
139 | |||
140 | #else /* ! CONFIG_SMP */ | ||
141 | #define alternative_smp(smpinstr, upinstr, args...) \ | ||
142 | asm volatile (upinstr : args) | ||
143 | #define LOCK_PREFIX "" | ||
144 | #endif | ||
145 | |||
146 | #endif /* _X86_64_ALTERNATIVE_H */ | ||
diff --git a/include/asm-x86_64/apic.h b/include/asm-x86_64/apic.h index a731be2204..9c96a0a8d1 100644 --- a/include/asm-x86_64/apic.h +++ b/include/asm-x86_64/apic.h | |||
@@ -49,7 +49,8 @@ static __inline unsigned int apic_read(unsigned long reg) | |||
49 | 49 | ||
50 | static __inline__ void apic_wait_icr_idle(void) | 50 | static __inline__ void apic_wait_icr_idle(void) |
51 | { | 51 | { |
52 | while ( apic_read( APIC_ICR ) & APIC_ICR_BUSY ); | 52 | while (apic_read( APIC_ICR ) & APIC_ICR_BUSY) |
53 | cpu_relax(); | ||
53 | } | 54 | } |
54 | 55 | ||
55 | static inline void ack_APIC_irq(void) | 56 | static inline void ack_APIC_irq(void) |
@@ -79,30 +80,23 @@ extern void init_apic_mappings (void); | |||
79 | extern void smp_local_timer_interrupt (struct pt_regs * regs); | 80 | extern void smp_local_timer_interrupt (struct pt_regs * regs); |
80 | extern void setup_boot_APIC_clock (void); | 81 | extern void setup_boot_APIC_clock (void); |
81 | extern void setup_secondary_APIC_clock (void); | 82 | extern void setup_secondary_APIC_clock (void); |
82 | extern void setup_apic_nmi_watchdog (void); | ||
83 | extern int reserve_lapic_nmi(void); | ||
84 | extern void release_lapic_nmi(void); | ||
85 | extern void disable_timer_nmi_watchdog(void); | ||
86 | extern void enable_timer_nmi_watchdog(void); | ||
87 | extern void nmi_watchdog_tick (struct pt_regs * regs, unsigned reason); | ||
88 | extern int APIC_init_uniprocessor (void); | 83 | extern int APIC_init_uniprocessor (void); |
89 | extern void disable_APIC_timer(void); | 84 | extern void disable_APIC_timer(void); |
90 | extern void enable_APIC_timer(void); | 85 | extern void enable_APIC_timer(void); |
91 | extern void clustered_apic_check(void); | 86 | extern void clustered_apic_check(void); |
92 | 87 | ||
93 | extern void nmi_watchdog_default(void); | 88 | extern void setup_APIC_extened_lvt(unsigned char lvt_off, unsigned char vector, |
94 | extern int setup_nmi_watchdog(char *); | 89 | unsigned char msg_type, unsigned char mask); |
95 | 90 | ||
96 | extern unsigned int nmi_watchdog; | 91 | #define K8_APIC_EXT_LVT_BASE 0x500 |
97 | #define NMI_DEFAULT -1 | 92 | #define K8_APIC_EXT_INT_MSG_FIX 0x0 |
98 | #define NMI_NONE 0 | 93 | #define K8_APIC_EXT_INT_MSG_SMI 0x2 |
99 | #define NMI_IO_APIC 1 | 94 | #define K8_APIC_EXT_INT_MSG_NMI 0x4 |
100 | #define NMI_LOCAL_APIC 2 | 95 | #define K8_APIC_EXT_INT_MSG_EXT 0x7 |
101 | #define NMI_INVALID 3 | 96 | #define K8_APIC_EXT_LVT_ENTRY_THRESHOLD 0 |
102 | 97 | ||
103 | extern int disable_timer_pin_1; | 98 | extern int disable_timer_pin_1; |
104 | 99 | ||
105 | extern void setup_threshold_lvt(unsigned long lvt_off); | ||
106 | 100 | ||
107 | void smp_send_timer_broadcast_ipi(void); | 101 | void smp_send_timer_broadcast_ipi(void); |
108 | void switch_APIC_timer_to_ipi(void *cpumask); | 102 | void switch_APIC_timer_to_ipi(void *cpumask); |
diff --git a/include/asm-x86_64/atomic.h b/include/asm-x86_64/atomic.h index bd3fa67ed8..007e88d6d4 100644 --- a/include/asm-x86_64/atomic.h +++ b/include/asm-x86_64/atomic.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef __ARCH_X86_64_ATOMIC__ | 1 | #ifndef __ARCH_X86_64_ATOMIC__ |
2 | #define __ARCH_X86_64_ATOMIC__ | 2 | #define __ARCH_X86_64_ATOMIC__ |
3 | 3 | ||
4 | #include <asm/types.h> | 4 | #include <asm/alternative.h> |
5 | 5 | ||
6 | /* atomic_t should be 32 bit signed type */ | 6 | /* atomic_t should be 32 bit signed type */ |
7 | 7 | ||
@@ -52,7 +52,7 @@ typedef struct { volatile int counter; } atomic_t; | |||
52 | static __inline__ void atomic_add(int i, atomic_t *v) | 52 | static __inline__ void atomic_add(int i, atomic_t *v) |
53 | { | 53 | { |
54 | __asm__ __volatile__( | 54 | __asm__ __volatile__( |
55 | LOCK "addl %1,%0" | 55 | LOCK_PREFIX "addl %1,%0" |
56 | :"=m" (v->counter) | 56 | :"=m" (v->counter) |
57 | :"ir" (i), "m" (v->counter)); | 57 | :"ir" (i), "m" (v->counter)); |
58 | } | 58 | } |
@@ -67,7 +67,7 @@ static __inline__ void atomic_add(int i, atomic_t *v) | |||
67 | static __inline__ void atomic_sub(int i, atomic_t *v) | 67 | static __inline__ void atomic_sub(int i, atomic_t *v) |
68 | { | 68 | { |
69 | __asm__ __volatile__( | 69 | __asm__ __volatile__( |
70 | LOCK "subl %1,%0" | 70 | LOCK_PREFIX "subl %1,%0" |
71 | :"=m" (v->counter) | 71 | :"=m" (v->counter) |
72 | :"ir" (i), "m" (v->counter)); | 72 | :"ir" (i), "m" (v->counter)); |
73 | } | 73 | } |
@@ -86,7 +86,7 @@ static __inline__ int atomic_sub_and_test(int i, atomic_t *v) | |||
86 | unsigned char c; | 86 | unsigned char c; |
87 | 87 | ||
88 | __asm__ __volatile__( | 88 | __asm__ __volatile__( |
89 | LOCK "subl %2,%0; sete %1" | 89 | LOCK_PREFIX "subl %2,%0; sete %1" |
90 | :"=m" (v->counter), "=qm" (c) | 90 | :"=m" (v->counter), "=qm" (c) |
91 | :"ir" (i), "m" (v->counter) : "memory"); | 91 | :"ir" (i), "m" (v->counter) : "memory"); |
92 | return c; | 92 | return c; |
@@ -101,7 +101,7 @@ static __inline__ int atomic_sub_and_test(int i, atomic_t *v) | |||
101 | static __inline__ void atomic_inc(atomic_t *v) | 101 | static __inline__ void atomic_inc(atomic_t *v) |
102 | { | 102 | { |
103 | __asm__ __volatile__( | 103 | __asm__ __volatile__( |
104 | LOCK "incl %0" | 104 | LOCK_PREFIX "incl %0" |
105 | :"=m" (v->counter) | 105 | :"=m" (v->counter) |
106 | :"m" (v->counter)); | 106 | :"m" (v->counter)); |
107 | } | 107 | } |
@@ -115,7 +115,7 @@ static __inline__ void atomic_inc(atomic_t *v) | |||
115 | static __inline__ void atomic_dec(atomic_t *v) | 115 | static __inline__ void atomic_dec(atomic_t *v) |
116 | { | 116 | { |
117 | __asm__ __volatile__( | 117 | __asm__ __volatile__( |
118 | LOCK "decl %0" | 118 | LOCK_PREFIX "decl %0" |
119 | :"=m" (v->counter) | 119 | :"=m" (v->counter) |
120 | :"m" (v->counter)); | 120 | :"m" (v->counter)); |
121 | } | 121 | } |
@@ -133,7 +133,7 @@ static __inline__ int atomic_dec_and_test(atomic_t *v) | |||
133 | unsigned char c; | 133 | unsigned char c; |
134 | 134 | ||
135 | __asm__ __volatile__( | 135 | __asm__ __volatile__( |
136 | LOCK "decl %0; sete %1" | 136 | LOCK_PREFIX "decl %0; sete %1" |
137 | :"=m" (v->counter), "=qm" (c) | 137 | :"=m" (v->counter), "=qm" (c) |
138 | :"m" (v->counter) : "memory"); | 138 | :"m" (v->counter) : "memory"); |
139 | return c != 0; | 139 | return c != 0; |
@@ -152,7 +152,7 @@ static __inline__ int atomic_inc_and_test(atomic_t *v) | |||
152 | unsigned char c; | 152 | unsigned char c; |
153 | 153 | ||
154 | __asm__ __volatile__( | 154 | __asm__ __volatile__( |
155 | LOCK "incl %0; sete %1" | 155 | LOCK_PREFIX "incl %0; sete %1" |
156 | :"=m" (v->counter), "=qm" (c) | 156 | :"=m" (v->counter), "=qm" (c) |
157 | :"m" (v->counter) : "memory"); | 157 | :"m" (v->counter) : "memory"); |
158 | return c != 0; | 158 | return c != 0; |
@@ -172,7 +172,7 @@ static __inline__ int atomic_add_negative(int i, atomic_t *v) | |||
172 | unsigned char c; | 172 | unsigned char c; |
173 | 173 | ||
174 | __asm__ __volatile__( | 174 | __asm__ __volatile__( |
175 | LOCK "addl %2,%0; sets %1" | 175 | LOCK_PREFIX "addl %2,%0; sets %1" |
176 | :"=m" (v->counter), "=qm" (c) | 176 | :"=m" (v->counter), "=qm" (c) |
177 | :"ir" (i), "m" (v->counter) : "memory"); | 177 | :"ir" (i), "m" (v->counter) : "memory"); |
178 | return c; | 178 | return c; |
@@ -189,7 +189,7 @@ static __inline__ int atomic_add_return(int i, atomic_t *v) | |||
189 | { | 189 | { |
190 | int __i = i; | 190 | int __i = i; |
191 | __asm__ __volatile__( | 191 | __asm__ __volatile__( |
192 | LOCK "xaddl %0, %1;" | 192 | LOCK_PREFIX "xaddl %0, %1;" |
193 | :"=r"(i) | 193 | :"=r"(i) |
194 | :"m"(v->counter), "0"(i)); | 194 | :"m"(v->counter), "0"(i)); |
195 | return i + __i; | 195 | return i + __i; |
@@ -237,7 +237,7 @@ typedef struct { volatile long counter; } atomic64_t; | |||
237 | static __inline__ void atomic64_add(long i, atomic64_t *v) | 237 | static __inline__ void atomic64_add(long i, atomic64_t *v) |
238 | { | 238 | { |
239 | __asm__ __volatile__( | 239 | __asm__ __volatile__( |
240 | LOCK "addq %1,%0" | 240 | LOCK_PREFIX "addq %1,%0" |
241 | :"=m" (v->counter) | 241 | :"=m" (v->counter) |
242 | :"ir" (i), "m" (v->counter)); | 242 | :"ir" (i), "m" (v->counter)); |
243 | } | 243 | } |
@@ -252,7 +252,7 @@ static __inline__ void atomic64_add(long i, atomic64_t *v) | |||
252 | static __inline__ void atomic64_sub(long i, atomic64_t *v) | 252 | static __inline__ void atomic64_sub(long i, atomic64_t *v) |
253 | { | 253 | { |
254 | __asm__ __volatile__( | 254 | __asm__ __volatile__( |
255 | LOCK "subq %1,%0" | 255 | LOCK_PREFIX "subq %1,%0" |
256 | :"=m" (v->counter) | 256 | :"=m" (v->counter) |
257 | :"ir" (i), "m" (v->counter)); | 257 | :"ir" (i), "m" (v->counter)); |
258 | } | 258 | } |
@@ -271,7 +271,7 @@ static __inline__ int atomic64_sub_and_test(long i, atomic64_t *v) | |||
271 | unsigned char c; | 271 | unsigned char c; |
272 | 272 | ||
273 | __asm__ __volatile__( | 273 | __asm__ __volatile__( |
274 | LOCK "subq %2,%0; sete %1" | 274 | LOCK_PREFIX "subq %2,%0; sete %1" |
275 | :"=m" (v->counter), "=qm" (c) | 275 | :"=m" (v->counter), "=qm" (c) |
276 | :"ir" (i), "m" (v->counter) : "memory"); | 276 | :"ir" (i), "m" (v->counter) : "memory"); |
277 | return c; | 277 | return c; |
@@ -286,7 +286,7 @@ static __inline__ int atomic64_sub_and_test(long i, atomic64_t *v) | |||
286 | static __inline__ void atomic64_inc(atomic64_t *v) | 286 | static __inline__ void atomic64_inc(atomic64_t *v) |
287 | { | 287 | { |
288 | __asm__ __volatile__( | 288 | __asm__ __volatile__( |
289 | LOCK "incq %0" | 289 | LOCK_PREFIX "incq %0" |
290 | :"=m" (v->counter) | 290 | :"=m" (v->counter) |
291 | :"m" (v->counter)); | 291 | :"m" (v->counter)); |
292 | } | 292 | } |
@@ -300,7 +300,7 @@ static __inline__ void atomic64_inc(atomic64_t *v) | |||
300 | static __inline__ void atomic64_dec(atomic64_t *v) | 300 | static __inline__ void atomic64_dec(atomic64_t *v) |
301 | { | 301 | { |
302 | __asm__ __volatile__( | 302 | __asm__ __volatile__( |
303 | LOCK "decq %0" | 303 | LOCK_PREFIX "decq %0" |
304 | :"=m" (v->counter) | 304 | :"=m" (v->counter) |
305 | :"m" (v->counter)); | 305 | :"m" (v->counter)); |
306 | } | 306 | } |
@@ -318,7 +318,7 @@ static __inline__ int atomic64_dec_and_test(atomic64_t *v) | |||
318 | unsigned char c; | 318 | unsigned char c; |
319 | 319 | ||
320 | __asm__ __volatile__( | 320 | __asm__ __volatile__( |
321 | LOCK "decq %0; sete %1" | 321 | LOCK_PREFIX "decq %0; sete %1" |
322 | :"=m" (v->counter), "=qm" (c) | 322 | :"=m" (v->counter), "=qm" (c) |
323 | :"m" (v->counter) : "memory"); | 323 | :"m" (v->counter) : "memory"); |
324 | return c != 0; | 324 | return c != 0; |
@@ -337,7 +337,7 @@ static __inline__ int atomic64_inc_and_test(atomic64_t *v) | |||
337 | unsigned char c; | 337 | unsigned char c; |
338 | 338 | ||
339 | __asm__ __volatile__( | 339 | __asm__ __volatile__( |
340 | LOCK "incq %0; sete %1" | 340 | LOCK_PREFIX "incq %0; sete %1" |
341 | :"=m" (v->counter), "=qm" (c) | 341 | :"=m" (v->counter), "=qm" (c) |
342 | :"m" (v->counter) : "memory"); | 342 | :"m" (v->counter) : "memory"); |
343 | return c != 0; | 343 | return c != 0; |
@@ -357,7 +357,7 @@ static __inline__ int atomic64_add_negative(long i, atomic64_t *v) | |||
357 | unsigned char c; | 357 | unsigned char c; |
358 | 358 | ||
359 | __asm__ __volatile__( | 359 | __asm__ __volatile__( |
360 | LOCK "addq %2,%0; sets %1" | 360 | LOCK_PREFIX "addq %2,%0; sets %1" |
361 | :"=m" (v->counter), "=qm" (c) | 361 | :"=m" (v->counter), "=qm" (c) |
362 | :"ir" (i), "m" (v->counter) : "memory"); | 362 | :"ir" (i), "m" (v->counter) : "memory"); |
363 | return c; | 363 | return c; |
@@ -374,7 +374,7 @@ static __inline__ long atomic64_add_return(long i, atomic64_t *v) | |||
374 | { | 374 | { |
375 | long __i = i; | 375 | long __i = i; |
376 | __asm__ __volatile__( | 376 | __asm__ __volatile__( |
377 | LOCK "xaddq %0, %1;" | 377 | LOCK_PREFIX "xaddq %0, %1;" |
378 | :"=r"(i) | 378 | :"=r"(i) |
379 | :"m"(v->counter), "0"(i)); | 379 | :"m"(v->counter), "0"(i)); |
380 | return i + __i; | 380 | return i + __i; |
@@ -418,11 +418,11 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t *v) | |||
418 | 418 | ||
419 | /* These are x86-specific, used by some header files */ | 419 | /* These are x86-specific, used by some header files */ |
420 | #define atomic_clear_mask(mask, addr) \ | 420 | #define atomic_clear_mask(mask, addr) \ |
421 | __asm__ __volatile__(LOCK "andl %0,%1" \ | 421 | __asm__ __volatile__(LOCK_PREFIX "andl %0,%1" \ |
422 | : : "r" (~(mask)),"m" (*addr) : "memory") | 422 | : : "r" (~(mask)),"m" (*addr) : "memory") |
423 | 423 | ||
424 | #define atomic_set_mask(mask, addr) \ | 424 | #define atomic_set_mask(mask, addr) \ |
425 | __asm__ __volatile__(LOCK "orl %0,%1" \ | 425 | __asm__ __volatile__(LOCK_PREFIX "orl %0,%1" \ |
426 | : : "r" ((unsigned)mask),"m" (*(addr)) : "memory") | 426 | : : "r" ((unsigned)mask),"m" (*(addr)) : "memory") |
427 | 427 | ||
428 | /* Atomic operations are already serializing on x86 */ | 428 | /* Atomic operations are already serializing on x86 */ |
diff --git a/include/asm-x86_64/bitops.h b/include/asm-x86_64/bitops.h index e9bf933d25..f7ba57b1cc 100644 --- a/include/asm-x86_64/bitops.h +++ b/include/asm-x86_64/bitops.h | |||
@@ -5,12 +5,7 @@ | |||
5 | * Copyright 1992, Linus Torvalds. | 5 | * Copyright 1992, Linus Torvalds. |
6 | */ | 6 | */ |
7 | 7 | ||
8 | 8 | #include <asm/alternative.h> | |
9 | #ifdef CONFIG_SMP | ||
10 | #define LOCK_PREFIX "lock ; " | ||
11 | #else | ||
12 | #define LOCK_PREFIX "" | ||
13 | #endif | ||
14 | 9 | ||
15 | #define ADDR (*(volatile long *) addr) | 10 | #define ADDR (*(volatile long *) addr) |
16 | 11 | ||
diff --git a/include/asm-x86_64/calgary.h b/include/asm-x86_64/calgary.h new file mode 100644 index 0000000000..6e1654f309 --- /dev/null +++ b/include/asm-x86_64/calgary.h | |||
@@ -0,0 +1,66 @@ | |||
1 | /* | ||
2 | * Derived from include/asm-powerpc/iommu.h | ||
3 | * | ||
4 | * Copyright (C) 2006 Jon Mason <jdmason@us.ibm.com>, IBM Corporation | ||
5 | * Copyright (C) 2006 Muli Ben-Yehuda <muli@il.ibm.com>, IBM Corporation | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | |||
22 | #ifndef _ASM_X86_64_CALGARY_H | ||
23 | #define _ASM_X86_64_CALGARY_H | ||
24 | |||
25 | #include <linux/config.h> | ||
26 | #include <linux/spinlock.h> | ||
27 | #include <linux/device.h> | ||
28 | #include <linux/dma-mapping.h> | ||
29 | #include <asm/types.h> | ||
30 | |||
31 | struct iommu_table { | ||
32 | unsigned long it_base; /* mapped address of tce table */ | ||
33 | unsigned long it_hint; /* Hint for next alloc */ | ||
34 | unsigned long *it_map; /* A simple allocation bitmap for now */ | ||
35 | spinlock_t it_lock; /* Protects it_map */ | ||
36 | unsigned int it_size; /* Size of iommu table in entries */ | ||
37 | unsigned char it_busno; /* Bus number this table belongs to */ | ||
38 | void __iomem *bbar; | ||
39 | u64 tar_val; | ||
40 | struct timer_list watchdog_timer; | ||
41 | }; | ||
42 | |||
43 | #define TCE_TABLE_SIZE_UNSPECIFIED ~0 | ||
44 | #define TCE_TABLE_SIZE_64K 0 | ||
45 | #define TCE_TABLE_SIZE_128K 1 | ||
46 | #define TCE_TABLE_SIZE_256K 2 | ||
47 | #define TCE_TABLE_SIZE_512K 3 | ||
48 | #define TCE_TABLE_SIZE_1M 4 | ||
49 | #define TCE_TABLE_SIZE_2M 5 | ||
50 | #define TCE_TABLE_SIZE_4M 6 | ||
51 | #define TCE_TABLE_SIZE_8M 7 | ||
52 | |||
53 | #ifdef CONFIG_CALGARY_IOMMU | ||
54 | extern int calgary_iommu_init(void); | ||
55 | extern void detect_calgary(void); | ||
56 | #else | ||
57 | static inline int calgary_iommu_init(void) { return 1; } | ||
58 | static inline void detect_calgary(void) { return; } | ||
59 | #endif | ||
60 | |||
61 | static inline unsigned int bus_to_phb(unsigned char busno) | ||
62 | { | ||
63 | return ((busno % 15 == 0) ? 0 : busno / 2 + 1); | ||
64 | } | ||
65 | |||
66 | #endif /* _ASM_X86_64_CALGARY_H */ | ||
diff --git a/include/asm-x86_64/cpufeature.h b/include/asm-x86_64/cpufeature.h index 662964b74e..ee792faaca 100644 --- a/include/asm-x86_64/cpufeature.h +++ b/include/asm-x86_64/cpufeature.h | |||
@@ -46,6 +46,7 @@ | |||
46 | #define X86_FEATURE_SYSCALL (1*32+11) /* SYSCALL/SYSRET */ | 46 | #define X86_FEATURE_SYSCALL (1*32+11) /* SYSCALL/SYSRET */ |
47 | #define X86_FEATURE_MMXEXT (1*32+22) /* AMD MMX extensions */ | 47 | #define X86_FEATURE_MMXEXT (1*32+22) /* AMD MMX extensions */ |
48 | #define X86_FEATURE_FXSR_OPT (1*32+25) /* FXSR optimizations */ | 48 | #define X86_FEATURE_FXSR_OPT (1*32+25) /* FXSR optimizations */ |
49 | #define X86_FEATURE_RDTSCP (1*32+27) /* RDTSCP */ | ||
49 | #define X86_FEATURE_LM (1*32+29) /* Long Mode (x86-64) */ | 50 | #define X86_FEATURE_LM (1*32+29) /* Long Mode (x86-64) */ |
50 | #define X86_FEATURE_3DNOWEXT (1*32+30) /* AMD 3DNow! extensions */ | 51 | #define X86_FEATURE_3DNOWEXT (1*32+30) /* AMD 3DNow! extensions */ |
51 | #define X86_FEATURE_3DNOW (1*32+31) /* 3DNow! */ | 52 | #define X86_FEATURE_3DNOW (1*32+31) /* 3DNow! */ |
@@ -65,6 +66,8 @@ | |||
65 | #define X86_FEATURE_CONSTANT_TSC (3*32+5) /* TSC runs at constant rate */ | 66 | #define X86_FEATURE_CONSTANT_TSC (3*32+5) /* TSC runs at constant rate */ |
66 | #define X86_FEATURE_SYNC_RDTSC (3*32+6) /* RDTSC syncs CPU core */ | 67 | #define X86_FEATURE_SYNC_RDTSC (3*32+6) /* RDTSC syncs CPU core */ |
67 | #define X86_FEATURE_FXSAVE_LEAK (3*32+7) /* FIP/FOP/FDP leaks through FXSAVE */ | 68 | #define X86_FEATURE_FXSAVE_LEAK (3*32+7) /* FIP/FOP/FDP leaks through FXSAVE */ |
69 | #define X86_FEATURE_UP (3*32+8) /* SMP kernel running on UP */ | ||
70 | #define X86_FEATURE_ARCH_PERFMON (3*32+9) /* Intel Architectural PerfMon */ | ||
68 | 71 | ||
69 | /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ | 72 | /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */ |
70 | #define X86_FEATURE_XMM3 (4*32+ 0) /* Streaming SIMD Extensions-3 */ | 73 | #define X86_FEATURE_XMM3 (4*32+ 0) /* Streaming SIMD Extensions-3 */ |
diff --git a/include/asm-x86_64/dma-mapping.h b/include/asm-x86_64/dma-mapping.h index 498f66df36..b6da83dcc7 100644 --- a/include/asm-x86_64/dma-mapping.h +++ b/include/asm-x86_64/dma-mapping.h | |||
@@ -55,6 +55,13 @@ extern dma_addr_t bad_dma_address; | |||
55 | extern struct dma_mapping_ops* dma_ops; | 55 | extern struct dma_mapping_ops* dma_ops; |
56 | extern int iommu_merge; | 56 | extern int iommu_merge; |
57 | 57 | ||
58 | static inline int valid_dma_direction(int dma_direction) | ||
59 | { | ||
60 | return ((dma_direction == DMA_BIDIRECTIONAL) || | ||
61 | (dma_direction == DMA_TO_DEVICE) || | ||
62 | (dma_direction == DMA_FROM_DEVICE)); | ||
63 | } | ||
64 | |||
58 | static inline int dma_mapping_error(dma_addr_t dma_addr) | 65 | static inline int dma_mapping_error(dma_addr_t dma_addr) |
59 | { | 66 | { |
60 | if (dma_ops->mapping_error) | 67 | if (dma_ops->mapping_error) |
@@ -72,6 +79,7 @@ static inline dma_addr_t | |||
72 | dma_map_single(struct device *hwdev, void *ptr, size_t size, | 79 | dma_map_single(struct device *hwdev, void *ptr, size_t size, |
73 | int direction) | 80 | int direction) |
74 | { | 81 | { |
82 | BUG_ON(!valid_dma_direction(direction)); | ||
75 | return dma_ops->map_single(hwdev, ptr, size, direction); | 83 | return dma_ops->map_single(hwdev, ptr, size, direction); |
76 | } | 84 | } |
77 | 85 | ||
@@ -79,6 +87,7 @@ static inline void | |||
79 | dma_unmap_single(struct device *dev, dma_addr_t addr,size_t size, | 87 | dma_unmap_single(struct device *dev, dma_addr_t addr,size_t size, |
80 | int direction) | 88 | int direction) |
81 | { | 89 | { |
90 | BUG_ON(!valid_dma_direction(direction)); | ||
82 | dma_ops->unmap_single(dev, addr, size, direction); | 91 | dma_ops->unmap_single(dev, addr, size, direction); |
83 | } | 92 | } |
84 | 93 | ||
@@ -91,6 +100,7 @@ static inline void | |||
91 | dma_sync_single_for_cpu(struct device *hwdev, dma_addr_t dma_handle, | 100 | dma_sync_single_for_cpu(struct device *hwdev, dma_addr_t dma_handle, |
92 | size_t size, int direction) | 101 | size_t size, int direction) |
93 | { | 102 | { |
103 | BUG_ON(!valid_dma_direction(direction)); | ||
94 | if (dma_ops->sync_single_for_cpu) | 104 | if (dma_ops->sync_single_for_cpu) |
95 | dma_ops->sync_single_for_cpu(hwdev, dma_handle, size, | 105 | dma_ops->sync_single_for_cpu(hwdev, dma_handle, size, |
96 | direction); | 106 | direction); |
@@ -101,6 +111,7 @@ static inline void | |||
101 | dma_sync_single_for_device(struct device *hwdev, dma_addr_t dma_handle, | 111 | dma_sync_single_for_device(struct device *hwdev, dma_addr_t dma_handle, |
102 | size_t size, int direction) | 112 | size_t size, int direction) |
103 | { | 113 | { |
114 | BUG_ON(!valid_dma_direction(direction)); | ||
104 | if (dma_ops->sync_single_for_device) | 115 | if (dma_ops->sync_single_for_device) |
105 | dma_ops->sync_single_for_device(hwdev, dma_handle, size, | 116 | dma_ops->sync_single_for_device(hwdev, dma_handle, size, |
106 | direction); | 117 | direction); |
@@ -111,6 +122,7 @@ static inline void | |||
111 | dma_sync_single_range_for_cpu(struct device *hwdev, dma_addr_t dma_handle, | 122 | dma_sync_single_range_for_cpu(struct device *hwdev, dma_addr_t dma_handle, |
112 | unsigned long offset, size_t size, int direction) | 123 | unsigned long offset, size_t size, int direction) |
113 | { | 124 | { |
125 | BUG_ON(!valid_dma_direction(direction)); | ||
114 | if (dma_ops->sync_single_range_for_cpu) { | 126 | if (dma_ops->sync_single_range_for_cpu) { |
115 | dma_ops->sync_single_range_for_cpu(hwdev, dma_handle, offset, size, direction); | 127 | dma_ops->sync_single_range_for_cpu(hwdev, dma_handle, offset, size, direction); |
116 | } | 128 | } |
@@ -122,6 +134,7 @@ static inline void | |||
122 | dma_sync_single_range_for_device(struct device *hwdev, dma_addr_t dma_handle, | 134 | dma_sync_single_range_for_device(struct device *hwdev, dma_addr_t dma_handle, |
123 | unsigned long offset, size_t size, int direction) | 135 | unsigned long offset, size_t size, int direction) |
124 | { | 136 | { |
137 | BUG_ON(!valid_dma_direction(direction)); | ||
125 | if (dma_ops->sync_single_range_for_device) | 138 | if (dma_ops->sync_single_range_for_device) |
126 | dma_ops->sync_single_range_for_device(hwdev, dma_handle, | 139 | dma_ops->sync_single_range_for_device(hwdev, dma_handle, |
127 | offset, size, direction); | 140 | offset, size, direction); |
@@ -133,6 +146,7 @@ static inline void | |||
133 | dma_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg, | 146 | dma_sync_sg_for_cpu(struct device *hwdev, struct scatterlist *sg, |
134 | int nelems, int direction) | 147 | int nelems, int direction) |
135 | { | 148 | { |
149 | BUG_ON(!valid_dma_direction(direction)); | ||
136 | if (dma_ops->sync_sg_for_cpu) | 150 | if (dma_ops->sync_sg_for_cpu) |
137 | dma_ops->sync_sg_for_cpu(hwdev, sg, nelems, direction); | 151 | dma_ops->sync_sg_for_cpu(hwdev, sg, nelems, direction); |
138 | flush_write_buffers(); | 152 | flush_write_buffers(); |
@@ -142,6 +156,7 @@ static inline void | |||
142 | dma_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg, | 156 | dma_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg, |
143 | int nelems, int direction) | 157 | int nelems, int direction) |
144 | { | 158 | { |
159 | BUG_ON(!valid_dma_direction(direction)); | ||
145 | if (dma_ops->sync_sg_for_device) { | 160 | if (dma_ops->sync_sg_for_device) { |
146 | dma_ops->sync_sg_for_device(hwdev, sg, nelems, direction); | 161 | dma_ops->sync_sg_for_device(hwdev, sg, nelems, direction); |
147 | } | 162 | } |
@@ -152,6 +167,7 @@ dma_sync_sg_for_device(struct device *hwdev, struct scatterlist *sg, | |||
152 | static inline int | 167 | static inline int |
153 | dma_map_sg(struct device *hwdev, struct scatterlist *sg, int nents, int direction) | 168 | dma_map_sg(struct device *hwdev, struct scatterlist *sg, int nents, int direction) |
154 | { | 169 | { |
170 | BUG_ON(!valid_dma_direction(direction)); | ||
155 | return dma_ops->map_sg(hwdev, sg, nents, direction); | 171 | return dma_ops->map_sg(hwdev, sg, nents, direction); |
156 | } | 172 | } |
157 | 173 | ||
@@ -159,6 +175,7 @@ static inline void | |||
159 | dma_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nents, | 175 | dma_unmap_sg(struct device *hwdev, struct scatterlist *sg, int nents, |
160 | int direction) | 176 | int direction) |
161 | { | 177 | { |
178 | BUG_ON(!valid_dma_direction(direction)); | ||
162 | dma_ops->unmap_sg(hwdev, sg, nents, direction); | 179 | dma_ops->unmap_sg(hwdev, sg, nents, direction); |
163 | } | 180 | } |
164 | 181 | ||
diff --git a/include/asm-x86_64/dma.h b/include/asm-x86_64/dma.h index c556208d3d..a37c16f062 100644 --- a/include/asm-x86_64/dma.h +++ b/include/asm-x86_64/dma.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $Id: dma.h,v 1.1.1.1 2001/04/19 20:00:38 ak Exp $ | 1 | /* |
2 | * linux/include/asm/dma.h: Defines for using and allocating dma channels. | 2 | * linux/include/asm/dma.h: Defines for using and allocating dma channels. |
3 | * Written by Hennus Bergman, 1992. | 3 | * Written by Hennus Bergman, 1992. |
4 | * High DMA channel support & info by Hannu Savolainen | 4 | * High DMA channel support & info by Hannu Savolainen |
diff --git a/include/asm-x86_64/gart-mapping.h b/include/asm-x86_64/gart-mapping.h deleted file mode 100644 index ada497b0b5..0000000000 --- a/include/asm-x86_64/gart-mapping.h +++ /dev/null | |||
@@ -1,16 +0,0 @@ | |||
1 | #ifndef _X8664_GART_MAPPING_H | ||
2 | #define _X8664_GART_MAPPING_H 1 | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | #include <asm/types.h> | ||
6 | |||
7 | struct device; | ||
8 | |||
9 | extern void* | ||
10 | gart_alloc_coherent(struct device *dev, size_t size, | ||
11 | dma_addr_t *dma_handle, gfp_t gfp); | ||
12 | |||
13 | extern int | ||
14 | gart_dma_supported(struct device *hwdev, u64 mask); | ||
15 | |||
16 | #endif /* _X8664_GART_MAPPING_H */ | ||
diff --git a/include/asm-x86_64/hpet.h b/include/asm-x86_64/hpet.h index 18ff7ee9e7..b39098408b 100644 --- a/include/asm-x86_64/hpet.h +++ b/include/asm-x86_64/hpet.h | |||
@@ -55,7 +55,7 @@ | |||
55 | 55 | ||
56 | extern int is_hpet_enabled(void); | 56 | extern int is_hpet_enabled(void); |
57 | extern int hpet_rtc_timer_init(void); | 57 | extern int hpet_rtc_timer_init(void); |
58 | extern int oem_force_hpet_timer(void); | 58 | extern int apic_is_clustered_box(void); |
59 | 59 | ||
60 | extern int hpet_use_timer; | 60 | extern int hpet_use_timer; |
61 | 61 | ||
diff --git a/include/asm-x86_64/hw_irq.h b/include/asm-x86_64/hw_irq.h index 3de96fd86a..48a4a5364e 100644 --- a/include/asm-x86_64/hw_irq.h +++ b/include/asm-x86_64/hw_irq.h | |||
@@ -12,8 +12,6 @@ | |||
12 | * <tomsoft@informatik.tu-chemnitz.de> | 12 | * <tomsoft@informatik.tu-chemnitz.de> |
13 | * | 13 | * |
14 | * hacked by Andi Kleen for x86-64. | 14 | * hacked by Andi Kleen for x86-64. |
15 | * | ||
16 | * $Id: hw_irq.h,v 1.24 2001/09/14 20:55:03 vojtech Exp $ | ||
17 | */ | 15 | */ |
18 | 16 | ||
19 | #ifndef __ASSEMBLY__ | 17 | #ifndef __ASSEMBLY__ |
@@ -126,18 +124,9 @@ asmlinkage void IRQ_NAME(nr); \ | |||
126 | __asm__( \ | 124 | __asm__( \ |
127 | "\n.p2align\n" \ | 125 | "\n.p2align\n" \ |
128 | "IRQ" #nr "_interrupt:\n\t" \ | 126 | "IRQ" #nr "_interrupt:\n\t" \ |
129 | "push $" #nr "-256 ; " \ | 127 | "push $~(" #nr ") ; " \ |
130 | "jmp common_interrupt"); | 128 | "jmp common_interrupt"); |
131 | 129 | ||
132 | #if defined(CONFIG_X86_IO_APIC) | ||
133 | static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) { | ||
134 | if (IO_APIC_IRQ(i)) | ||
135 | send_IPI_self(IO_APIC_VECTOR(i)); | ||
136 | } | ||
137 | #else | ||
138 | static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) {} | ||
139 | #endif | ||
140 | |||
141 | #define platform_legacy_irq(irq) ((irq) < 16) | 130 | #define platform_legacy_irq(irq) ((irq) < 16) |
142 | 131 | ||
143 | #endif | 132 | #endif |
diff --git a/include/asm-x86_64/ia32_unistd.h b/include/asm-x86_64/ia32_unistd.h index b4f4b172b1..5b52ce5073 100644 --- a/include/asm-x86_64/ia32_unistd.h +++ b/include/asm-x86_64/ia32_unistd.h | |||
@@ -4,317 +4,15 @@ | |||
4 | /* | 4 | /* |
5 | * This file contains the system call numbers of the ia32 port, | 5 | * This file contains the system call numbers of the ia32 port, |
6 | * this is for the kernel only. | 6 | * this is for the kernel only. |
7 | * Only add syscalls here where some part of the kernel needs to know | ||
8 | * the number. This should be otherwise in sync with asm-i386/unistd.h. -AK | ||
7 | */ | 9 | */ |
8 | 10 | ||
9 | #define __NR_ia32_restart_syscall 0 | 11 | #define __NR_ia32_restart_syscall 0 |
10 | #define __NR_ia32_exit 1 | 12 | #define __NR_ia32_exit 1 |
11 | #define __NR_ia32_fork 2 | ||
12 | #define __NR_ia32_read 3 | 13 | #define __NR_ia32_read 3 |
13 | #define __NR_ia32_write 4 | 14 | #define __NR_ia32_write 4 |
14 | #define __NR_ia32_open 5 | 15 | #define __NR_ia32_sigreturn 119 |
15 | #define __NR_ia32_close 6 | ||
16 | #define __NR_ia32_waitpid 7 | ||
17 | #define __NR_ia32_creat 8 | ||
18 | #define __NR_ia32_link 9 | ||
19 | #define __NR_ia32_unlink 10 | ||
20 | #define __NR_ia32_execve 11 | ||
21 | #define __NR_ia32_chdir 12 | ||
22 | #define __NR_ia32_time 13 | ||
23 | #define __NR_ia32_mknod 14 | ||
24 | #define __NR_ia32_chmod 15 | ||
25 | #define __NR_ia32_lchown 16 | ||
26 | #define __NR_ia32_break 17 | ||
27 | #define __NR_ia32_oldstat 18 | ||
28 | #define __NR_ia32_lseek 19 | ||
29 | #define __NR_ia32_getpid 20 | ||
30 | #define __NR_ia32_mount 21 | ||
31 | #define __NR_ia32_umount 22 | ||
32 | #define __NR_ia32_setuid 23 | ||
33 | #define __NR_ia32_getuid 24 | ||
34 | #define __NR_ia32_stime 25 | ||
35 | #define __NR_ia32_ptrace 26 | ||
36 | #define __NR_ia32_alarm 27 | ||
37 | #define __NR_ia32_oldfstat 28 | ||
38 | #define __NR_ia32_pause 29 | ||
39 | #define __NR_ia32_utime 30 | ||
40 | #define __NR_ia32_stty 31 | ||
41 | #define __NR_ia32_gtty 32 | ||
42 | #define __NR_ia32_access 33 | ||
43 | #define __NR_ia32_nice 34 | ||
44 | #define __NR_ia32_ftime 35 | ||
45 | #define __NR_ia32_sync 36 | ||
46 | #define __NR_ia32_kill 37 | ||
47 | #define __NR_ia32_rename 38 | ||
48 | #define __NR_ia32_mkdir 39 | ||
49 | #define __NR_ia32_rmdir 40 | ||
50 | #define __NR_ia32_dup 41 | ||
51 | #define __NR_ia32_pipe 42 | ||
52 | #define __NR_ia32_times 43 | ||
53 | #define __NR_ia32_prof 44 | ||
54 | #define __NR_ia32_brk 45 | ||
55 | #define __NR_ia32_setgid 46 | ||
56 | #define __NR_ia32_getgid 47 | ||
57 | #define __NR_ia32_signal 48 | ||
58 | #define __NR_ia32_geteuid 49 | ||
59 | #define __NR_ia32_getegid 50 | ||
60 | #define __NR_ia32_acct 51 | ||
61 | #define __NR_ia32_umount2 52 | ||
62 | #define __NR_ia32_lock 53 | ||
63 | #define __NR_ia32_ioctl 54 | ||
64 | #define __NR_ia32_fcntl 55 | ||
65 | #define __NR_ia32_mpx 56 | ||
66 | #define __NR_ia32_setpgid 57 | ||
67 | #define __NR_ia32_ulimit 58 | ||
68 | #define __NR_ia32_oldolduname 59 | ||
69 | #define __NR_ia32_umask 60 | ||
70 | #define __NR_ia32_chroot 61 | ||
71 | #define __NR_ia32_ustat 62 | ||
72 | #define __NR_ia32_dup2 63 | ||
73 | #define __NR_ia32_getppid 64 | ||
74 | #define __NR_ia32_getpgrp 65 | ||
75 | #define __NR_ia32_setsid 66 | ||
76 | #define __NR_ia32_sigaction 67 | ||
77 | #define __NR_ia32_sgetmask 68 | ||
78 | #define __NR_ia32_ssetmask 69 | ||
79 | #define __NR_ia32_setreuid 70 | ||
80 | #define __NR_ia32_setregid 71 | ||
81 | #define __NR_ia32_sigsuspend 72 | ||
82 | #define __NR_ia32_sigpending 73 | ||
83 | #define __NR_ia32_sethostname 74 | ||
84 | #define __NR_ia32_setrlimit 75 | ||
85 | #define __NR_ia32_getrlimit 76 /* Back compatible 2Gig limited rlimit */ | ||
86 | #define __NR_ia32_getrusage 77 | ||
87 | #define __NR_ia32_gettimeofday 78 | ||
88 | #define __NR_ia32_settimeofday 79 | ||
89 | #define __NR_ia32_getgroups 80 | ||
90 | #define __NR_ia32_setgroups 81 | ||
91 | #define __NR_ia32_select 82 | ||
92 | #define __NR_ia32_symlink 83 | ||
93 | #define __NR_ia32_oldlstat 84 | ||
94 | #define __NR_ia32_readlink 85 | ||
95 | #define __NR_ia32_uselib 86 | ||
96 | #define __NR_ia32_swapon 87 | ||
97 | #define __NR_ia32_reboot 88 | ||
98 | #define __NR_ia32_readdir 89 | ||
99 | #define __NR_ia32_mmap 90 | ||
100 | #define __NR_ia32_munmap 91 | ||
101 | #define __NR_ia32_truncate 92 | ||
102 | #define __NR_ia32_ftruncate 93 | ||
103 | #define __NR_ia32_fchmod 94 | ||
104 | #define __NR_ia32_fchown 95 | ||
105 | #define __NR_ia32_getpriority 96 | ||
106 | #define __NR_ia32_setpriority 97 | ||
107 | #define __NR_ia32_profil 98 | ||
108 | #define __NR_ia32_statfs 99 | ||
109 | #define __NR_ia32_fstatfs 100 | ||
110 | #define __NR_ia32_ioperm 101 | ||
111 | #define __NR_ia32_socketcall 102 | ||
112 | #define __NR_ia32_syslog 103 | ||
113 | #define __NR_ia32_setitimer 104 | ||
114 | #define __NR_ia32_getitimer 105 | ||
115 | #define __NR_ia32_stat 106 | ||
116 | #define __NR_ia32_lstat 107 | ||
117 | #define __NR_ia32_fstat 108 | ||
118 | #define __NR_ia32_olduname 109 | ||
119 | #define __NR_ia32_iopl 110 | ||
120 | #define __NR_ia32_vhangup 111 | ||
121 | #define __NR_ia32_idle 112 | ||
122 | #define __NR_ia32_vm86old 113 | ||
123 | #define __NR_ia32_wait4 114 | ||
124 | #define __NR_ia32_swapoff 115 | ||
125 | #define __NR_ia32_sysinfo 116 | ||
126 | #define __NR_ia32_ipc 117 | ||
127 | #define __NR_ia32_fsync 118 | ||
128 | #define __NR_ia32_sigreturn 119 | ||
129 | #define __NR_ia32_clone 120 | ||
130 | #define __NR_ia32_setdomainname 121 | ||
131 | #define __NR_ia32_uname 122 | ||
132 | #define __NR_ia32_modify_ldt 123 | ||
133 | #define __NR_ia32_adjtimex 124 | ||
134 | #define __NR_ia32_mprotect 125 | ||
135 | #define __NR_ia32_sigprocmask 126 | ||
136 | #define __NR_ia32_create_module 127 | ||
137 | #define __NR_ia32_init_module 128 | ||
138 | #define __NR_ia32_delete_module 129 | ||
139 | #define __NR_ia32_get_kernel_syms 130 | ||
140 | #define __NR_ia32_quotactl 131 | ||
141 | #define __NR_ia32_getpgid 132 | ||
142 | #define __NR_ia32_fchdir 133 | ||
143 | #define __NR_ia32_bdflush 134 | ||
144 | #define __NR_ia32_sysfs 135 | ||
145 | #define __NR_ia32_personality 136 | ||
146 | #define __NR_ia32_afs_syscall 137 /* Syscall for Andrew File System */ | ||
147 | #define __NR_ia32_setfsuid 138 | ||
148 | #define __NR_ia32_setfsgid 139 | ||
149 | #define __NR_ia32__llseek 140 | ||
150 | #define __NR_ia32_getdents 141 | ||
151 | #define __NR_ia32__newselect 142 | ||
152 | #define __NR_ia32_flock 143 | ||
153 | #define __NR_ia32_msync 144 | ||
154 | #define __NR_ia32_readv 145 | ||
155 | #define __NR_ia32_writev 146 | ||
156 | #define __NR_ia32_getsid 147 | ||
157 | #define __NR_ia32_fdatasync 148 | ||
158 | #define __NR_ia32__sysctl 149 | ||
159 | #define __NR_ia32_mlock 150 | ||
160 | #define __NR_ia32_munlock 151 | ||
161 | #define __NR_ia32_mlockall 152 | ||
162 | #define __NR_ia32_munlockall 153 | ||
163 | #define __NR_ia32_sched_setparam 154 | ||
164 | #define __NR_ia32_sched_getparam 155 | ||
165 | #define __NR_ia32_sched_setscheduler 156 | ||
166 | #define __NR_ia32_sched_getscheduler 157 | ||
167 | #define __NR_ia32_sched_yield 158 | ||
168 | #define __NR_ia32_sched_get_priority_max 159 | ||
169 | #define __NR_ia32_sched_get_priority_min 160 | ||
170 | #define __NR_ia32_sched_rr_get_interval 161 | ||
171 | #define __NR_ia32_nanosleep 162 | ||
172 | #define __NR_ia32_mremap 163 | ||
173 | #define __NR_ia32_setresuid 164 | ||
174 | #define __NR_ia32_getresuid 165 | ||
175 | #define __NR_ia32_vm86 166 | ||
176 | #define __NR_ia32_query_module 167 | ||
177 | #define __NR_ia32_poll 168 | ||
178 | #define __NR_ia32_nfsservctl 169 | ||
179 | #define __NR_ia32_setresgid 170 | ||
180 | #define __NR_ia32_getresgid 171 | ||
181 | #define __NR_ia32_prctl 172 | ||
182 | #define __NR_ia32_rt_sigreturn 173 | 16 | #define __NR_ia32_rt_sigreturn 173 |
183 | #define __NR_ia32_rt_sigaction 174 | ||
184 | #define __NR_ia32_rt_sigprocmask 175 | ||
185 | #define __NR_ia32_rt_sigpending 176 | ||
186 | #define __NR_ia32_rt_sigtimedwait 177 | ||
187 | #define __NR_ia32_rt_sigqueueinfo 178 | ||
188 | #define __NR_ia32_rt_sigsuspend 179 | ||
189 | #define __NR_ia32_pread 180 | ||
190 | #define __NR_ia32_pwrite 181 | ||
191 | #define __NR_ia32_chown 182 | ||
192 | #define __NR_ia32_getcwd 183 | ||
193 | #define __NR_ia32_capget 184 | ||
194 | #define __NR_ia32_capset 185 | ||
195 | #define __NR_ia32_sigaltstack 186 | ||
196 | #define __NR_ia32_sendfile 187 | ||
197 | #define __NR_ia32_getpmsg 188 /* some people actually want streams */ | ||
198 | #define __NR_ia32_putpmsg 189 /* some people actually want streams */ | ||
199 | #define __NR_ia32_vfork 190 | ||
200 | #define __NR_ia32_ugetrlimit 191 /* SuS compliant getrlimit */ | ||
201 | #define __NR_ia32_mmap2 192 | ||
202 | #define __NR_ia32_truncate64 193 | ||
203 | #define __NR_ia32_ftruncate64 194 | ||
204 | #define __NR_ia32_stat64 195 | ||
205 | #define __NR_ia32_lstat64 196 | ||
206 | #define __NR_ia32_fstat64 197 | ||
207 | #define __NR_ia32_lchown32 198 | ||
208 | #define __NR_ia32_getuid32 199 | ||
209 | #define __NR_ia32_getgid32 200 | ||
210 | #define __NR_ia32_geteuid32 201 | ||
211 | #define __NR_ia32_getegid32 202 | ||
212 | #define __NR_ia32_setreuid32 203 | ||
213 | #define __NR_ia32_setregid32 204 | ||
214 | #define __NR_ia32_getgroups32 205 | ||
215 | #define __NR_ia32_setgroups32 206 | ||
216 | #define __NR_ia32_fchown32 207 | ||
217 | #define __NR_ia32_setresuid32 208 | ||
218 | #define __NR_ia32_getresuid32 209 | ||
219 | #define __NR_ia32_setresgid32 210 | ||
220 | #define __NR_ia32_getresgid32 211 | ||
221 | #define __NR_ia32_chown32 212 | ||
222 | #define __NR_ia32_setuid32 213 | ||
223 | #define __NR_ia32_setgid32 214 | ||
224 | #define __NR_ia32_setfsuid32 215 | ||
225 | #define __NR_ia32_setfsgid32 216 | ||
226 | #define __NR_ia32_pivot_root 217 | ||
227 | #define __NR_ia32_mincore 218 | ||
228 | #define __NR_ia32_madvise 219 | ||
229 | #define __NR_ia32_madvise1 219 /* delete when C lib stub is removed */ | ||
230 | #define __NR_ia32_getdents64 220 | ||
231 | #define __NR_ia32_fcntl64 221 | ||
232 | #define __NR_ia32_tuxcall 222 | ||
233 | #define __NR_ia32_security 223 | ||
234 | #define __NR_ia32_gettid 224 | ||
235 | #define __NR_ia32_readahead 225 | ||
236 | #define __NR_ia32_setxattr 226 | ||
237 | #define __NR_ia32_lsetxattr 227 | ||
238 | #define __NR_ia32_fsetxattr 228 | ||
239 | #define __NR_ia32_getxattr 229 | ||
240 | #define __NR_ia32_lgetxattr 230 | ||
241 | #define __NR_ia32_fgetxattr 231 | ||
242 | #define __NR_ia32_listxattr 232 | ||
243 | #define __NR_ia32_llistxattr 233 | ||
244 | #define __NR_ia32_flistxattr 234 | ||
245 | #define __NR_ia32_removexattr 235 | ||
246 | #define __NR_ia32_lremovexattr 236 | ||
247 | #define __NR_ia32_fremovexattr 237 | ||
248 | #define __NR_ia32_tkill 238 | ||
249 | #define __NR_ia32_sendfile64 239 | ||
250 | #define __NR_ia32_futex 240 | ||
251 | #define __NR_ia32_sched_setaffinity 241 | ||
252 | #define __NR_ia32_sched_getaffinity 242 | ||
253 | #define __NR_ia32_set_thread_area 243 | ||
254 | #define __NR_ia32_get_thread_area 244 | ||
255 | #define __NR_ia32_io_setup 245 | ||
256 | #define __NR_ia32_io_destroy 246 | ||
257 | #define __NR_ia32_io_getevents 247 | ||
258 | #define __NR_ia32_io_submit 248 | ||
259 | #define __NR_ia32_io_cancel 249 | ||
260 | #define __NR_ia32_exit_group 252 | ||
261 | #define __NR_ia32_lookup_dcookie 253 | ||
262 | #define __NR_ia32_sys_epoll_create 254 | ||
263 | #define __NR_ia32_sys_epoll_ctl 255 | ||
264 | #define __NR_ia32_sys_epoll_wait 256 | ||
265 | #define __NR_ia32_remap_file_pages 257 | ||
266 | #define __NR_ia32_set_tid_address 258 | ||
267 | #define __NR_ia32_timer_create 259 | ||
268 | #define __NR_ia32_timer_settime (__NR_ia32_timer_create+1) | ||
269 | #define __NR_ia32_timer_gettime (__NR_ia32_timer_create+2) | ||
270 | #define __NR_ia32_timer_getoverrun (__NR_ia32_timer_create+3) | ||
271 | #define __NR_ia32_timer_delete (__NR_ia32_timer_create+4) | ||
272 | #define __NR_ia32_clock_settime (__NR_ia32_timer_create+5) | ||
273 | #define __NR_ia32_clock_gettime (__NR_ia32_timer_create+6) | ||
274 | #define __NR_ia32_clock_getres (__NR_ia32_timer_create+7) | ||
275 | #define __NR_ia32_clock_nanosleep (__NR_ia32_timer_create+8) | ||
276 | #define __NR_ia32_statfs64 268 | ||
277 | #define __NR_ia32_fstatfs64 269 | ||
278 | #define __NR_ia32_tgkill 270 | ||
279 | #define __NR_ia32_utimes 271 | ||
280 | #define __NR_ia32_fadvise64_64 272 | ||
281 | #define __NR_ia32_vserver 273 | ||
282 | #define __NR_ia32_mbind 274 | ||
283 | #define __NR_ia32_get_mempolicy 275 | ||
284 | #define __NR_ia32_set_mempolicy 276 | ||
285 | #define __NR_ia32_mq_open 277 | ||
286 | #define __NR_ia32_mq_unlink (__NR_ia32_mq_open+1) | ||
287 | #define __NR_ia32_mq_timedsend (__NR_ia32_mq_open+2) | ||
288 | #define __NR_ia32_mq_timedreceive (__NR_ia32_mq_open+3) | ||
289 | #define __NR_ia32_mq_notify (__NR_ia32_mq_open+4) | ||
290 | #define __NR_ia32_mq_getsetattr (__NR_ia32_mq_open+5) | ||
291 | #define __NR_ia32_kexec 283 | ||
292 | #define __NR_ia32_waitid 284 | ||
293 | /* #define __NR_sys_setaltroot 285 */ | ||
294 | #define __NR_ia32_add_key 286 | ||
295 | #define __NR_ia32_request_key 287 | ||
296 | #define __NR_ia32_keyctl 288 | ||
297 | #define __NR_ia32_ioprio_set 289 | ||
298 | #define __NR_ia32_ioprio_get 290 | ||
299 | #define __NR_ia32_inotify_init 291 | ||
300 | #define __NR_ia32_inotify_add_watch 292 | ||
301 | #define __NR_ia32_inotify_rm_watch 293 | ||
302 | #define __NR_ia32_migrate_pages 294 | ||
303 | #define __NR_ia32_openat 295 | ||
304 | #define __NR_ia32_mkdirat 296 | ||
305 | #define __NR_ia32_mknodat 297 | ||
306 | #define __NR_ia32_fchownat 298 | ||
307 | #define __NR_ia32_futimesat 299 | ||
308 | #define __NR_ia32_fstatat64 300 | ||
309 | #define __NR_ia32_unlinkat 301 | ||
310 | #define __NR_ia32_renameat 302 | ||
311 | #define __NR_ia32_linkat 303 | ||
312 | #define __NR_ia32_symlinkat 304 | ||
313 | #define __NR_ia32_readlinkat 305 | ||
314 | #define __NR_ia32_fchmodat 306 | ||
315 | #define __NR_ia32_faccessat 307 | ||
316 | #define __NR_ia32_pselect6 308 | ||
317 | #define __NR_ia32_ppoll 309 | ||
318 | #define __NR_ia32_unshare 310 | ||
319 | 17 | ||
320 | #endif /* _ASM_X86_64_IA32_UNISTD_H_ */ | 18 | #endif /* _ASM_X86_64_IA32_UNISTD_H_ */ |
diff --git a/include/asm-x86_64/intel_arch_perfmon.h b/include/asm-x86_64/intel_arch_perfmon.h new file mode 100644 index 0000000000..59c3964315 --- /dev/null +++ b/include/asm-x86_64/intel_arch_perfmon.h | |||
@@ -0,0 +1,19 @@ | |||
1 | #ifndef X86_64_INTEL_ARCH_PERFMON_H | ||
2 | #define X86_64_INTEL_ARCH_PERFMON_H 1 | ||
3 | |||
4 | #define MSR_ARCH_PERFMON_PERFCTR0 0xc1 | ||
5 | #define MSR_ARCH_PERFMON_PERFCTR1 0xc2 | ||
6 | |||
7 | #define MSR_ARCH_PERFMON_EVENTSEL0 0x186 | ||
8 | #define MSR_ARCH_PERFMON_EVENTSEL1 0x187 | ||
9 | |||
10 | #define ARCH_PERFMON_EVENTSEL0_ENABLE (1 << 22) | ||
11 | #define ARCH_PERFMON_EVENTSEL_INT (1 << 20) | ||
12 | #define ARCH_PERFMON_EVENTSEL_OS (1 << 17) | ||
13 | #define ARCH_PERFMON_EVENTSEL_USR (1 << 16) | ||
14 | |||
15 | #define ARCH_PERFMON_UNHALTED_CORE_CYCLES_SEL (0x3c) | ||
16 | #define ARCH_PERFMON_UNHALTED_CORE_CYCLES_UMASK (0x00 << 8) | ||
17 | #define ARCH_PERFMON_UNHALTED_CORE_CYCLES_PRESENT (1 << 0) | ||
18 | |||
19 | #endif /* X86_64_INTEL_ARCH_PERFMON_H */ | ||
diff --git a/include/asm-x86_64/k8.h b/include/asm-x86_64/k8.h new file mode 100644 index 0000000000..699dd6961e --- /dev/null +++ b/include/asm-x86_64/k8.h | |||
@@ -0,0 +1,14 @@ | |||
1 | #ifndef _ASM_K8_H | ||
2 | #define _ASM_K8_H 1 | ||
3 | |||
4 | #include <linux/pci.h> | ||
5 | |||
6 | extern struct pci_device_id k8_nb_ids[]; | ||
7 | |||
8 | extern int early_is_k8_nb(u32 value); | ||
9 | extern struct pci_dev **k8_northbridges; | ||
10 | extern int num_k8_northbridges; | ||
11 | extern int cache_k8_northbridges(void); | ||
12 | extern void k8_flush_garts(void); | ||
13 | |||
14 | #endif | ||
diff --git a/include/asm-x86_64/kdebug.h b/include/asm-x86_64/kdebug.h index cf795631d9..cd52c7f33b 100644 --- a/include/asm-x86_64/kdebug.h +++ b/include/asm-x86_64/kdebug.h | |||
@@ -15,6 +15,8 @@ struct die_args { | |||
15 | 15 | ||
16 | extern int register_die_notifier(struct notifier_block *); | 16 | extern int register_die_notifier(struct notifier_block *); |
17 | extern int unregister_die_notifier(struct notifier_block *); | 17 | extern int unregister_die_notifier(struct notifier_block *); |
18 | extern int register_page_fault_notifier(struct notifier_block *); | ||
19 | extern int unregister_page_fault_notifier(struct notifier_block *); | ||
18 | extern struct atomic_notifier_head die_chain; | 20 | extern struct atomic_notifier_head die_chain; |
19 | 21 | ||
20 | /* Grossly misnamed. */ | 22 | /* Grossly misnamed. */ |
diff --git a/include/asm-x86_64/kprobes.h b/include/asm-x86_64/kprobes.h index 98a1e95ddb..d36febd9bb 100644 --- a/include/asm-x86_64/kprobes.h +++ b/include/asm-x86_64/kprobes.h | |||
@@ -43,6 +43,7 @@ typedef u8 kprobe_opcode_t; | |||
43 | 43 | ||
44 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry | 44 | #define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry |
45 | #define ARCH_SUPPORTS_KRETPROBES | 45 | #define ARCH_SUPPORTS_KRETPROBES |
46 | #define ARCH_INACTIVE_KPROBE_COUNT 1 | ||
46 | 47 | ||
47 | void kretprobe_trampoline(void); | 48 | void kretprobe_trampoline(void); |
48 | extern void arch_remove_kprobe(struct kprobe *p); | 49 | extern void arch_remove_kprobe(struct kprobe *p); |
diff --git a/include/asm-x86_64/local.h b/include/asm-x86_64/local.h index cd17945bf2..e769e62002 100644 --- a/include/asm-x86_64/local.h +++ b/include/asm-x86_64/local.h | |||
@@ -59,12 +59,26 @@ static inline void local_sub(long i, local_t *v) | |||
59 | * This could be done better if we moved the per cpu data directly | 59 | * This could be done better if we moved the per cpu data directly |
60 | * after GS. | 60 | * after GS. |
61 | */ | 61 | */ |
62 | #define cpu_local_read(v) local_read(&__get_cpu_var(v)) | 62 | |
63 | #define cpu_local_set(v, i) local_set(&__get_cpu_var(v), (i)) | 63 | /* Need to disable preemption for the cpu local counters otherwise we could |
64 | #define cpu_local_inc(v) local_inc(&__get_cpu_var(v)) | 64 | still access a variable of a previous CPU in a non atomic way. */ |
65 | #define cpu_local_dec(v) local_dec(&__get_cpu_var(v)) | 65 | #define cpu_local_wrap_v(v) \ |
66 | #define cpu_local_add(i, v) local_add((i), &__get_cpu_var(v)) | 66 | ({ local_t res__; \ |
67 | #define cpu_local_sub(i, v) local_sub((i), &__get_cpu_var(v)) | 67 | preempt_disable(); \ |
68 | res__ = (v); \ | ||
69 | preempt_enable(); \ | ||
70 | res__; }) | ||
71 | #define cpu_local_wrap(v) \ | ||
72 | ({ preempt_disable(); \ | ||
73 | v; \ | ||
74 | preempt_enable(); }) \ | ||
75 | |||
76 | #define cpu_local_read(v) cpu_local_wrap_v(local_read(&__get_cpu_var(v))) | ||
77 | #define cpu_local_set(v, i) cpu_local_wrap(local_set(&__get_cpu_var(v), (i))) | ||
78 | #define cpu_local_inc(v) cpu_local_wrap(local_inc(&__get_cpu_var(v))) | ||
79 | #define cpu_local_dec(v) cpu_local_wrap(local_dec(&__get_cpu_var(v))) | ||
80 | #define cpu_local_add(i, v) cpu_local_wrap(local_add((i), &__get_cpu_var(v))) | ||
81 | #define cpu_local_sub(i, v) cpu_local_wrap(local_sub((i), &__get_cpu_var(v))) | ||
68 | 82 | ||
69 | #define __cpu_local_inc(v) cpu_local_inc(v) | 83 | #define __cpu_local_inc(v) cpu_local_inc(v) |
70 | #define __cpu_local_dec(v) cpu_local_dec(v) | 84 | #define __cpu_local_dec(v) cpu_local_dec(v) |
diff --git a/include/asm-x86_64/mce.h b/include/asm-x86_64/mce.h index 7229785094..d13687dfd6 100644 --- a/include/asm-x86_64/mce.h +++ b/include/asm-x86_64/mce.h | |||
@@ -67,13 +67,22 @@ struct mce_log { | |||
67 | /* Software defined banks */ | 67 | /* Software defined banks */ |
68 | #define MCE_EXTENDED_BANK 128 | 68 | #define MCE_EXTENDED_BANK 128 |
69 | #define MCE_THERMAL_BANK MCE_EXTENDED_BANK + 0 | 69 | #define MCE_THERMAL_BANK MCE_EXTENDED_BANK + 0 |
70 | #define MCE_THRESHOLD_BASE MCE_EXTENDED_BANK + 1 /* MCE_AMD */ | 70 | |
71 | #define MCE_THRESHOLD_DRAM_ECC MCE_THRESHOLD_BASE + 4 | 71 | #define K8_MCE_THRESHOLD_BASE (MCE_EXTENDED_BANK + 1) /* MCE_AMD */ |
72 | #define K8_MCE_THRESHOLD_BANK_0 (MCE_THRESHOLD_BASE + 0 * 9) | ||
73 | #define K8_MCE_THRESHOLD_BANK_1 (MCE_THRESHOLD_BASE + 1 * 9) | ||
74 | #define K8_MCE_THRESHOLD_BANK_2 (MCE_THRESHOLD_BASE + 2 * 9) | ||
75 | #define K8_MCE_THRESHOLD_BANK_3 (MCE_THRESHOLD_BASE + 3 * 9) | ||
76 | #define K8_MCE_THRESHOLD_BANK_4 (MCE_THRESHOLD_BASE + 4 * 9) | ||
77 | #define K8_MCE_THRESHOLD_BANK_5 (MCE_THRESHOLD_BASE + 5 * 9) | ||
78 | #define K8_MCE_THRESHOLD_DRAM_ECC (MCE_THRESHOLD_BANK_4 + 0) | ||
72 | 79 | ||
73 | #ifdef __KERNEL__ | 80 | #ifdef __KERNEL__ |
74 | #include <asm/atomic.h> | 81 | #include <asm/atomic.h> |
75 | 82 | ||
76 | void mce_log(struct mce *m); | 83 | void mce_log(struct mce *m); |
84 | DECLARE_PER_CPU(struct sys_device, device_mce); | ||
85 | |||
77 | #ifdef CONFIG_X86_MCE_INTEL | 86 | #ifdef CONFIG_X86_MCE_INTEL |
78 | void mce_intel_feature_init(struct cpuinfo_x86 *c); | 87 | void mce_intel_feature_init(struct cpuinfo_x86 *c); |
79 | #else | 88 | #else |
diff --git a/include/asm-x86_64/mutex.h b/include/asm-x86_64/mutex.h index 11fbee2bd6..06fab6de2a 100644 --- a/include/asm-x86_64/mutex.h +++ b/include/asm-x86_64/mutex.h | |||
@@ -24,7 +24,7 @@ do { \ | |||
24 | typecheck_fn(fastcall void (*)(atomic_t *), fail_fn); \ | 24 | typecheck_fn(fastcall void (*)(atomic_t *), fail_fn); \ |
25 | \ | 25 | \ |
26 | __asm__ __volatile__( \ | 26 | __asm__ __volatile__( \ |
27 | LOCK " decl (%%rdi) \n" \ | 27 | LOCK_PREFIX " decl (%%rdi) \n" \ |
28 | " js 2f \n" \ | 28 | " js 2f \n" \ |
29 | "1: \n" \ | 29 | "1: \n" \ |
30 | \ | 30 | \ |
@@ -74,7 +74,7 @@ do { \ | |||
74 | typecheck_fn(fastcall void (*)(atomic_t *), fail_fn); \ | 74 | typecheck_fn(fastcall void (*)(atomic_t *), fail_fn); \ |
75 | \ | 75 | \ |
76 | __asm__ __volatile__( \ | 76 | __asm__ __volatile__( \ |
77 | LOCK " incl (%%rdi) \n" \ | 77 | LOCK_PREFIX " incl (%%rdi) \n" \ |
78 | " jle 2f \n" \ | 78 | " jle 2f \n" \ |
79 | "1: \n" \ | 79 | "1: \n" \ |
80 | \ | 80 | \ |
diff --git a/include/asm-x86_64/nmi.h b/include/asm-x86_64/nmi.h index d3abfc6a8f..efb45c894d 100644 --- a/include/asm-x86_64/nmi.h +++ b/include/asm-x86_64/nmi.h | |||
@@ -5,26 +5,27 @@ | |||
5 | #define ASM_NMI_H | 5 | #define ASM_NMI_H |
6 | 6 | ||
7 | #include <linux/pm.h> | 7 | #include <linux/pm.h> |
8 | #include <asm/io.h> | ||
8 | 9 | ||
9 | struct pt_regs; | 10 | struct pt_regs; |
10 | 11 | ||
11 | typedef int (*nmi_callback_t)(struct pt_regs * regs, int cpu); | 12 | typedef int (*nmi_callback_t)(struct pt_regs * regs, int cpu); |
12 | 13 | ||
13 | /** | 14 | /** |
14 | * set_nmi_callback | 15 | * set_nmi_callback |
15 | * | 16 | * |
16 | * Set a handler for an NMI. Only one handler may be | 17 | * Set a handler for an NMI. Only one handler may be |
17 | * set. Return 1 if the NMI was handled. | 18 | * set. Return 1 if the NMI was handled. |
18 | */ | 19 | */ |
19 | void set_nmi_callback(nmi_callback_t callback); | 20 | void set_nmi_callback(nmi_callback_t callback); |
20 | 21 | ||
21 | /** | 22 | /** |
22 | * unset_nmi_callback | 23 | * unset_nmi_callback |
23 | * | 24 | * |
24 | * Remove the handler previously set. | 25 | * Remove the handler previously set. |
25 | */ | 26 | */ |
26 | void unset_nmi_callback(void); | 27 | void unset_nmi_callback(void); |
27 | 28 | ||
28 | #ifdef CONFIG_PM | 29 | #ifdef CONFIG_PM |
29 | 30 | ||
30 | /** Replace the PM callback routine for NMI. */ | 31 | /** Replace the PM callback routine for NMI. */ |
@@ -56,4 +57,21 @@ extern int unknown_nmi_panic; | |||
56 | 57 | ||
57 | extern int check_nmi_watchdog(void); | 58 | extern int check_nmi_watchdog(void); |
58 | 59 | ||
60 | extern void setup_apic_nmi_watchdog (void); | ||
61 | extern int reserve_lapic_nmi(void); | ||
62 | extern void release_lapic_nmi(void); | ||
63 | extern void disable_timer_nmi_watchdog(void); | ||
64 | extern void enable_timer_nmi_watchdog(void); | ||
65 | extern void nmi_watchdog_tick (struct pt_regs * regs, unsigned reason); | ||
66 | |||
67 | extern void nmi_watchdog_default(void); | ||
68 | extern int setup_nmi_watchdog(char *); | ||
69 | |||
70 | extern unsigned int nmi_watchdog; | ||
71 | #define NMI_DEFAULT -1 | ||
72 | #define NMI_NONE 0 | ||
73 | #define NMI_IO_APIC 1 | ||
74 | #define NMI_LOCAL_APIC 2 | ||
75 | #define NMI_INVALID 3 | ||
76 | |||
59 | #endif /* ASM_NMI_H */ | 77 | #endif /* ASM_NMI_H */ |
diff --git a/include/asm-x86_64/pci.h b/include/asm-x86_64/pci.h index 2db0620d54..49c5e92805 100644 --- a/include/asm-x86_64/pci.h +++ b/include/asm-x86_64/pci.h | |||
@@ -39,8 +39,8 @@ int pcibios_set_irq_routing(struct pci_dev *dev, int pin, int irq); | |||
39 | #include <asm/scatterlist.h> | 39 | #include <asm/scatterlist.h> |
40 | #include <linux/string.h> | 40 | #include <linux/string.h> |
41 | #include <asm/page.h> | 41 | #include <asm/page.h> |
42 | #include <linux/dma-mapping.h> /* for have_iommu */ | ||
43 | 42 | ||
43 | extern void pci_iommu_alloc(void); | ||
44 | extern int iommu_setup(char *opt); | 44 | extern int iommu_setup(char *opt); |
45 | 45 | ||
46 | /* The PCI address space does equal the physical memory | 46 | /* The PCI address space does equal the physical memory |
@@ -52,7 +52,7 @@ extern int iommu_setup(char *opt); | |||
52 | */ | 52 | */ |
53 | #define PCI_DMA_BUS_IS_PHYS (dma_ops->is_phys) | 53 | #define PCI_DMA_BUS_IS_PHYS (dma_ops->is_phys) |
54 | 54 | ||
55 | #ifdef CONFIG_GART_IOMMU | 55 | #if defined(CONFIG_IOMMU) || defined(CONFIG_CALGARY_IOMMU) |
56 | 56 | ||
57 | /* | 57 | /* |
58 | * x86-64 always supports DAC, but sometimes it is useful to force | 58 | * x86-64 always supports DAC, but sometimes it is useful to force |
diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h index 31e83c3bd0..a31ab4e68a 100644 --- a/include/asm-x86_64/pgtable.h +++ b/include/asm-x86_64/pgtable.h | |||
@@ -337,14 +337,8 @@ static inline int pmd_large(pmd_t pte) { | |||
337 | /* to find an entry in a page-table-directory. */ | 337 | /* to find an entry in a page-table-directory. */ |
338 | #define pud_index(address) (((address) >> PUD_SHIFT) & (PTRS_PER_PUD-1)) | 338 | #define pud_index(address) (((address) >> PUD_SHIFT) & (PTRS_PER_PUD-1)) |
339 | #define pud_offset(pgd, address) ((pud_t *) pgd_page(*(pgd)) + pud_index(address)) | 339 | #define pud_offset(pgd, address) ((pud_t *) pgd_page(*(pgd)) + pud_index(address)) |
340 | #define pud_offset_k(pgd, addr) pud_offset(pgd, addr) | ||
341 | #define pud_present(pud) (pud_val(pud) & _PAGE_PRESENT) | 340 | #define pud_present(pud) (pud_val(pud) & _PAGE_PRESENT) |
342 | 341 | ||
343 | static inline pud_t *__pud_offset_k(pud_t *pud, unsigned long address) | ||
344 | { | ||
345 | return pud + pud_index(address); | ||
346 | } | ||
347 | |||
348 | /* PMD - Level 2 access */ | 342 | /* PMD - Level 2 access */ |
349 | #define pmd_page_kernel(pmd) ((unsigned long) __va(pmd_val(pmd) & PTE_MASK)) | 343 | #define pmd_page_kernel(pmd) ((unsigned long) __va(pmd_val(pmd) & PTE_MASK)) |
350 | #define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)) | 344 | #define pmd_page(pmd) (pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT)) |
diff --git a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h index 3061a38a3b..3b3c1217fe 100644 --- a/include/asm-x86_64/processor.h +++ b/include/asm-x86_64/processor.h | |||
@@ -69,7 +69,11 @@ struct cpuinfo_x86 { | |||
69 | cpumask_t llc_shared_map; /* cpus sharing the last level cache */ | 69 | cpumask_t llc_shared_map; /* cpus sharing the last level cache */ |
70 | #endif | 70 | #endif |
71 | __u8 apicid; | 71 | __u8 apicid; |
72 | #ifdef CONFIG_SMP | ||
72 | __u8 booted_cores; /* number of cores as seen by OS */ | 73 | __u8 booted_cores; /* number of cores as seen by OS */ |
74 | __u8 phys_proc_id; /* Physical Processor id. */ | ||
75 | __u8 cpu_core_id; /* Core id. */ | ||
76 | #endif | ||
73 | } ____cacheline_aligned; | 77 | } ____cacheline_aligned; |
74 | 78 | ||
75 | #define X86_VENDOR_INTEL 0 | 79 | #define X86_VENDOR_INTEL 0 |
@@ -96,6 +100,7 @@ extern char ignore_irq13; | |||
96 | extern void identify_cpu(struct cpuinfo_x86 *); | 100 | extern void identify_cpu(struct cpuinfo_x86 *); |
97 | extern void print_cpu_info(struct cpuinfo_x86 *); | 101 | extern void print_cpu_info(struct cpuinfo_x86 *); |
98 | extern unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c); | 102 | extern unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c); |
103 | extern unsigned short num_cache_leaves; | ||
99 | 104 | ||
100 | /* | 105 | /* |
101 | * EFLAGS bits | 106 | * EFLAGS bits |
diff --git a/include/asm-x86_64/proto.h b/include/asm-x86_64/proto.h index 8abf2a43c9..038fe1f47e 100644 --- a/include/asm-x86_64/proto.h +++ b/include/asm-x86_64/proto.h | |||
@@ -37,7 +37,6 @@ extern void ia32_sysenter_target(void); | |||
37 | 37 | ||
38 | extern void config_acpi_tables(void); | 38 | extern void config_acpi_tables(void); |
39 | extern void ia32_syscall(void); | 39 | extern void ia32_syscall(void); |
40 | extern void iommu_hole_init(void); | ||
41 | 40 | ||
42 | extern int pmtimer_mark_offset(void); | 41 | extern int pmtimer_mark_offset(void); |
43 | extern void pmtimer_resume(void); | 42 | extern void pmtimer_resume(void); |
@@ -75,7 +74,7 @@ extern void main_timer_handler(struct pt_regs *regs); | |||
75 | 74 | ||
76 | extern unsigned long end_pfn_map; | 75 | extern unsigned long end_pfn_map; |
77 | 76 | ||
78 | extern void show_trace(unsigned long * rsp); | 77 | extern void show_trace(struct task_struct *, struct pt_regs *, unsigned long * rsp); |
79 | extern void show_registers(struct pt_regs *regs); | 78 | extern void show_registers(struct pt_regs *regs); |
80 | 79 | ||
81 | extern void exception_table_check(void); | 80 | extern void exception_table_check(void); |
@@ -101,13 +100,9 @@ extern int unsynchronized_tsc(void); | |||
101 | 100 | ||
102 | extern void select_idle_routine(const struct cpuinfo_x86 *c); | 101 | extern void select_idle_routine(const struct cpuinfo_x86 *c); |
103 | 102 | ||
104 | extern void gart_parse_options(char *); | ||
105 | extern void __init no_iommu_init(void); | ||
106 | |||
107 | extern unsigned long table_start, table_end; | 103 | extern unsigned long table_start, table_end; |
108 | 104 | ||
109 | extern int exception_trace; | 105 | extern int exception_trace; |
110 | extern int force_iommu, no_iommu; | ||
111 | extern int using_apic_timer; | 106 | extern int using_apic_timer; |
112 | extern int disable_apic; | 107 | extern int disable_apic; |
113 | extern unsigned cpu_khz; | 108 | extern unsigned cpu_khz; |
@@ -116,7 +111,13 @@ extern int skip_ioapic_setup; | |||
116 | extern int acpi_ht; | 111 | extern int acpi_ht; |
117 | extern int acpi_disabled; | 112 | extern int acpi_disabled; |
118 | 113 | ||
119 | #ifdef CONFIG_GART_IOMMU | 114 | extern void no_iommu_init(void); |
115 | extern int force_iommu, no_iommu; | ||
116 | extern int iommu_detected; | ||
117 | #ifdef CONFIG_IOMMU | ||
118 | extern void gart_iommu_init(void); | ||
119 | extern void gart_parse_options(char *); | ||
120 | extern void iommu_hole_init(void); | ||
120 | extern int fallback_aper_order; | 121 | extern int fallback_aper_order; |
121 | extern int fallback_aper_force; | 122 | extern int fallback_aper_force; |
122 | extern int iommu_aperture; | 123 | extern int iommu_aperture; |
diff --git a/include/asm-x86_64/rwlock.h b/include/asm-x86_64/rwlock.h index 9942cc3930..dea0e94592 100644 --- a/include/asm-x86_64/rwlock.h +++ b/include/asm-x86_64/rwlock.h | |||
@@ -24,7 +24,7 @@ | |||
24 | #define RW_LOCK_BIAS_STR "0x01000000" | 24 | #define RW_LOCK_BIAS_STR "0x01000000" |
25 | 25 | ||
26 | #define __build_read_lock_ptr(rw, helper) \ | 26 | #define __build_read_lock_ptr(rw, helper) \ |
27 | asm volatile(LOCK "subl $1,(%0)\n\t" \ | 27 | asm volatile(LOCK_PREFIX "subl $1,(%0)\n\t" \ |
28 | "js 2f\n" \ | 28 | "js 2f\n" \ |
29 | "1:\n" \ | 29 | "1:\n" \ |
30 | LOCK_SECTION_START("") \ | 30 | LOCK_SECTION_START("") \ |
@@ -34,7 +34,7 @@ | |||
34 | ::"a" (rw) : "memory") | 34 | ::"a" (rw) : "memory") |
35 | 35 | ||
36 | #define __build_read_lock_const(rw, helper) \ | 36 | #define __build_read_lock_const(rw, helper) \ |
37 | asm volatile(LOCK "subl $1,%0\n\t" \ | 37 | asm volatile(LOCK_PREFIX "subl $1,%0\n\t" \ |
38 | "js 2f\n" \ | 38 | "js 2f\n" \ |
39 | "1:\n" \ | 39 | "1:\n" \ |
40 | LOCK_SECTION_START("") \ | 40 | LOCK_SECTION_START("") \ |
@@ -54,7 +54,7 @@ | |||
54 | } while (0) | 54 | } while (0) |
55 | 55 | ||
56 | #define __build_write_lock_ptr(rw, helper) \ | 56 | #define __build_write_lock_ptr(rw, helper) \ |
57 | asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \ | 57 | asm volatile(LOCK_PREFIX "subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \ |
58 | "jnz 2f\n" \ | 58 | "jnz 2f\n" \ |
59 | "1:\n" \ | 59 | "1:\n" \ |
60 | LOCK_SECTION_START("") \ | 60 | LOCK_SECTION_START("") \ |
@@ -64,7 +64,7 @@ | |||
64 | ::"a" (rw) : "memory") | 64 | ::"a" (rw) : "memory") |
65 | 65 | ||
66 | #define __build_write_lock_const(rw, helper) \ | 66 | #define __build_write_lock_const(rw, helper) \ |
67 | asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",%0\n\t" \ | 67 | asm volatile(LOCK_PREFIX "subl $" RW_LOCK_BIAS_STR ",%0\n\t" \ |
68 | "jnz 2f\n" \ | 68 | "jnz 2f\n" \ |
69 | "1:\n" \ | 69 | "1:\n" \ |
70 | LOCK_SECTION_START("") \ | 70 | LOCK_SECTION_START("") \ |
diff --git a/include/asm-x86_64/semaphore.h b/include/asm-x86_64/semaphore.h index a389aa6fe8..064df08b9a 100644 --- a/include/asm-x86_64/semaphore.h +++ b/include/asm-x86_64/semaphore.h | |||
@@ -106,7 +106,7 @@ static inline void down(struct semaphore * sem) | |||
106 | 106 | ||
107 | __asm__ __volatile__( | 107 | __asm__ __volatile__( |
108 | "# atomic down operation\n\t" | 108 | "# atomic down operation\n\t" |
109 | LOCK "decl %0\n\t" /* --sem->count */ | 109 | LOCK_PREFIX "decl %0\n\t" /* --sem->count */ |
110 | "js 2f\n" | 110 | "js 2f\n" |
111 | "1:\n" | 111 | "1:\n" |
112 | LOCK_SECTION_START("") | 112 | LOCK_SECTION_START("") |
@@ -130,7 +130,7 @@ static inline int down_interruptible(struct semaphore * sem) | |||
130 | 130 | ||
131 | __asm__ __volatile__( | 131 | __asm__ __volatile__( |
132 | "# atomic interruptible down operation\n\t" | 132 | "# atomic interruptible down operation\n\t" |
133 | LOCK "decl %1\n\t" /* --sem->count */ | 133 | LOCK_PREFIX "decl %1\n\t" /* --sem->count */ |
134 | "js 2f\n\t" | 134 | "js 2f\n\t" |
135 | "xorl %0,%0\n" | 135 | "xorl %0,%0\n" |
136 | "1:\n" | 136 | "1:\n" |
@@ -154,7 +154,7 @@ static inline int down_trylock(struct semaphore * sem) | |||
154 | 154 | ||
155 | __asm__ __volatile__( | 155 | __asm__ __volatile__( |
156 | "# atomic interruptible down operation\n\t" | 156 | "# atomic interruptible down operation\n\t" |
157 | LOCK "decl %1\n\t" /* --sem->count */ | 157 | LOCK_PREFIX "decl %1\n\t" /* --sem->count */ |
158 | "js 2f\n\t" | 158 | "js 2f\n\t" |
159 | "xorl %0,%0\n" | 159 | "xorl %0,%0\n" |
160 | "1:\n" | 160 | "1:\n" |
@@ -178,7 +178,7 @@ static inline void up(struct semaphore * sem) | |||
178 | { | 178 | { |
179 | __asm__ __volatile__( | 179 | __asm__ __volatile__( |
180 | "# atomic up operation\n\t" | 180 | "# atomic up operation\n\t" |
181 | LOCK "incl %0\n\t" /* ++sem->count */ | 181 | LOCK_PREFIX "incl %0\n\t" /* ++sem->count */ |
182 | "jle 2f\n" | 182 | "jle 2f\n" |
183 | "1:\n" | 183 | "1:\n" |
184 | LOCK_SECTION_START("") | 184 | LOCK_SECTION_START("") |
diff --git a/include/asm-x86_64/smp.h b/include/asm-x86_64/smp.h index 7686b9b25a..6805e1feb3 100644 --- a/include/asm-x86_64/smp.h +++ b/include/asm-x86_64/smp.h | |||
@@ -53,8 +53,6 @@ extern int smp_call_function_single(int cpuid, void (*func) (void *info), | |||
53 | 53 | ||
54 | extern cpumask_t cpu_sibling_map[NR_CPUS]; | 54 | extern cpumask_t cpu_sibling_map[NR_CPUS]; |
55 | extern cpumask_t cpu_core_map[NR_CPUS]; | 55 | extern cpumask_t cpu_core_map[NR_CPUS]; |
56 | extern u8 phys_proc_id[NR_CPUS]; | ||
57 | extern u8 cpu_core_id[NR_CPUS]; | ||
58 | extern u8 cpu_llc_id[NR_CPUS]; | 56 | extern u8 cpu_llc_id[NR_CPUS]; |
59 | 57 | ||
60 | #define SMP_TRAMPOLINE_BASE 0x6000 | 58 | #define SMP_TRAMPOLINE_BASE 0x6000 |
diff --git a/include/asm-x86_64/spinlock.h b/include/asm-x86_64/spinlock.h index 5d8a5e3589..8d3421996f 100644 --- a/include/asm-x86_64/spinlock.h +++ b/include/asm-x86_64/spinlock.h | |||
@@ -31,15 +31,19 @@ | |||
31 | "jmp 1b\n" \ | 31 | "jmp 1b\n" \ |
32 | LOCK_SECTION_END | 32 | LOCK_SECTION_END |
33 | 33 | ||
34 | #define __raw_spin_lock_string_up \ | ||
35 | "\n\tdecl %0" | ||
36 | |||
34 | #define __raw_spin_unlock_string \ | 37 | #define __raw_spin_unlock_string \ |
35 | "movl $1,%0" \ | 38 | "movl $1,%0" \ |
36 | :"=m" (lock->slock) : : "memory" | 39 | :"=m" (lock->slock) : : "memory" |
37 | 40 | ||
38 | static inline void __raw_spin_lock(raw_spinlock_t *lock) | 41 | static inline void __raw_spin_lock(raw_spinlock_t *lock) |
39 | { | 42 | { |
40 | __asm__ __volatile__( | 43 | alternative_smp( |
41 | __raw_spin_lock_string | 44 | __raw_spin_lock_string, |
42 | :"=m" (lock->slock) : : "memory"); | 45 | __raw_spin_lock_string_up, |
46 | "=m" (lock->slock) : : "memory"); | ||
43 | } | 47 | } |
44 | 48 | ||
45 | #define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock) | 49 | #define __raw_spin_lock_flags(lock, flags) __raw_spin_lock(lock) |
diff --git a/include/asm-x86_64/string.h b/include/asm-x86_64/string.h index ee6bf27534..9505d9f4be 100644 --- a/include/asm-x86_64/string.h +++ b/include/asm-x86_64/string.h | |||
@@ -6,7 +6,8 @@ | |||
6 | /* Written 2002 by Andi Kleen */ | 6 | /* Written 2002 by Andi Kleen */ |
7 | 7 | ||
8 | /* Only used for special circumstances. Stolen from i386/string.h */ | 8 | /* Only used for special circumstances. Stolen from i386/string.h */ |
9 | static inline void * __inline_memcpy(void * to, const void * from, size_t n) | 9 | static __always_inline void * |
10 | __inline_memcpy(void * to, const void * from, size_t n) | ||
10 | { | 11 | { |
11 | unsigned long d0, d1, d2; | 12 | unsigned long d0, d1, d2; |
12 | __asm__ __volatile__( | 13 | __asm__ __volatile__( |
diff --git a/include/asm-x86_64/system.h b/include/asm-x86_64/system.h index f48e0dad8b..68e559f363 100644 --- a/include/asm-x86_64/system.h +++ b/include/asm-x86_64/system.h | |||
@@ -3,15 +3,10 @@ | |||
3 | 3 | ||
4 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
5 | #include <asm/segment.h> | 5 | #include <asm/segment.h> |
6 | #include <asm/alternative.h> | ||
6 | 7 | ||
7 | #ifdef __KERNEL__ | 8 | #ifdef __KERNEL__ |
8 | 9 | ||
9 | #ifdef CONFIG_SMP | ||
10 | #define LOCK_PREFIX "lock ; " | ||
11 | #else | ||
12 | #define LOCK_PREFIX "" | ||
13 | #endif | ||
14 | |||
15 | #define __STR(x) #x | 10 | #define __STR(x) #x |
16 | #define STR(x) __STR(x) | 11 | #define STR(x) __STR(x) |
17 | 12 | ||
@@ -34,7 +29,7 @@ | |||
34 | "thread_return:\n\t" \ | 29 | "thread_return:\n\t" \ |
35 | "movq %%gs:%P[pda_pcurrent],%%rsi\n\t" \ | 30 | "movq %%gs:%P[pda_pcurrent],%%rsi\n\t" \ |
36 | "movq %P[thread_info](%%rsi),%%r8\n\t" \ | 31 | "movq %P[thread_info](%%rsi),%%r8\n\t" \ |
37 | LOCK "btr %[tif_fork],%P[ti_flags](%%r8)\n\t" \ | 32 | LOCK_PREFIX "btr %[tif_fork],%P[ti_flags](%%r8)\n\t" \ |
38 | "movq %%rax,%%rdi\n\t" \ | 33 | "movq %%rax,%%rdi\n\t" \ |
39 | "jc ret_from_fork\n\t" \ | 34 | "jc ret_from_fork\n\t" \ |
40 | RESTORE_CONTEXT \ | 35 | RESTORE_CONTEXT \ |
@@ -69,82 +64,6 @@ extern void load_gs_index(unsigned); | |||
69 | ".previous" \ | 64 | ".previous" \ |
70 | : :"r" (value), "r" (0)) | 65 | : :"r" (value), "r" (0)) |
71 | 66 | ||
72 | #ifdef __KERNEL__ | ||
73 | struct alt_instr { | ||
74 | __u8 *instr; /* original instruction */ | ||
75 | __u8 *replacement; | ||
76 | __u8 cpuid; /* cpuid bit set for replacement */ | ||
77 | __u8 instrlen; /* length of original instruction */ | ||
78 | __u8 replacementlen; /* length of new instruction, <= instrlen */ | ||
79 | __u8 pad[5]; | ||
80 | }; | ||
81 | #endif | ||
82 | |||
83 | /* | ||
84 | * Alternative instructions for different CPU types or capabilities. | ||
85 | * | ||
86 | * This allows to use optimized instructions even on generic binary | ||
87 | * kernels. | ||
88 | * | ||
89 | * length of oldinstr must be longer or equal the length of newinstr | ||
90 | * It can be padded with nops as needed. | ||
91 | * | ||
92 | * For non barrier like inlines please define new variants | ||
93 | * without volatile and memory clobber. | ||
94 | */ | ||
95 | #define alternative(oldinstr, newinstr, feature) \ | ||
96 | asm volatile ("661:\n\t" oldinstr "\n662:\n" \ | ||
97 | ".section .altinstructions,\"a\"\n" \ | ||
98 | " .align 8\n" \ | ||
99 | " .quad 661b\n" /* label */ \ | ||
100 | " .quad 663f\n" /* new instruction */ \ | ||
101 | " .byte %c0\n" /* feature bit */ \ | ||
102 | " .byte 662b-661b\n" /* sourcelen */ \ | ||
103 | " .byte 664f-663f\n" /* replacementlen */ \ | ||
104 | ".previous\n" \ | ||
105 | ".section .altinstr_replacement,\"ax\"\n" \ | ||
106 | "663:\n\t" newinstr "\n664:\n" /* replacement */ \ | ||
107 | ".previous" :: "i" (feature) : "memory") | ||
108 | |||
109 | /* | ||
110 | * Alternative inline assembly with input. | ||
111 | * | ||
112 | * Peculiarities: | ||
113 | * No memory clobber here. | ||
114 | * Argument numbers start with 1. | ||
115 | * Best is to use constraints that are fixed size (like (%1) ... "r") | ||
116 | * If you use variable sized constraints like "m" or "g" in the | ||
117 | * replacement make sure to pad to the worst case length. | ||
118 | */ | ||
119 | #define alternative_input(oldinstr, newinstr, feature, input...) \ | ||
120 | asm volatile ("661:\n\t" oldinstr "\n662:\n" \ | ||
121 | ".section .altinstructions,\"a\"\n" \ | ||
122 | " .align 8\n" \ | ||
123 | " .quad 661b\n" /* label */ \ | ||
124 | " .quad 663f\n" /* new instruction */ \ | ||
125 | " .byte %c0\n" /* feature bit */ \ | ||
126 | " .byte 662b-661b\n" /* sourcelen */ \ | ||
127 | " .byte 664f-663f\n" /* replacementlen */ \ | ||
128 | ".previous\n" \ | ||
129 | ".section .altinstr_replacement,\"ax\"\n" \ | ||
130 | "663:\n\t" newinstr "\n664:\n" /* replacement */ \ | ||
131 | ".previous" :: "i" (feature), ##input) | ||
132 | |||
133 | /* Like alternative_input, but with a single output argument */ | ||
134 | #define alternative_io(oldinstr, newinstr, feature, output, input...) \ | ||
135 | asm volatile ("661:\n\t" oldinstr "\n662:\n" \ | ||
136 | ".section .altinstructions,\"a\"\n" \ | ||
137 | " .align 8\n" \ | ||
138 | " .quad 661b\n" /* label */ \ | ||
139 | " .quad 663f\n" /* new instruction */ \ | ||
140 | " .byte %c[feat]\n" /* feature bit */ \ | ||
141 | " .byte 662b-661b\n" /* sourcelen */ \ | ||
142 | " .byte 664f-663f\n" /* replacementlen */ \ | ||
143 | ".previous\n" \ | ||
144 | ".section .altinstr_replacement,\"ax\"\n" \ | ||
145 | "663:\n\t" newinstr "\n664:\n" /* replacement */ \ | ||
146 | ".previous" : output : [feat] "i" (feature), ##input) | ||
147 | |||
148 | /* | 67 | /* |
149 | * Clear and set 'TS' bit respectively | 68 | * Clear and set 'TS' bit respectively |
150 | */ | 69 | */ |
@@ -366,5 +285,6 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, | |||
366 | void cpu_idle_wait(void); | 285 | void cpu_idle_wait(void); |
367 | 286 | ||
368 | extern unsigned long arch_align_stack(unsigned long sp); | 287 | extern unsigned long arch_align_stack(unsigned long sp); |
288 | extern void free_init_pages(char *what, unsigned long begin, unsigned long end); | ||
369 | 289 | ||
370 | #endif | 290 | #endif |
diff --git a/include/asm-x86_64/tce.h b/include/asm-x86_64/tce.h new file mode 100644 index 0000000000..ee51d31528 --- /dev/null +++ b/include/asm-x86_64/tce.h | |||
@@ -0,0 +1,47 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2006 Muli Ben-Yehuda <muli@il.ibm.com>, IBM Corporation | ||
3 | * Copyright (C) 2006 Jon Mason <jdmason@us.ibm.com>, IBM Corporation | ||
4 | * | ||
5 | * This file is derived from asm-powerpc/tce.h. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | ||
21 | |||
22 | #ifndef _ASM_X86_64_TCE_H | ||
23 | #define _ASM_X86_64_TCE_H | ||
24 | |||
25 | extern void* tce_table_kva[]; | ||
26 | extern unsigned int specified_table_size; | ||
27 | struct iommu_table; | ||
28 | |||
29 | #define TCE_ENTRY_SIZE 8 /* in bytes */ | ||
30 | |||
31 | #define TCE_READ_SHIFT 0 | ||
32 | #define TCE_WRITE_SHIFT 1 | ||
33 | #define TCE_HUBID_SHIFT 2 /* unused */ | ||
34 | #define TCE_RSVD_SHIFT 8 /* unused */ | ||
35 | #define TCE_RPN_SHIFT 12 | ||
36 | #define TCE_UNUSED_SHIFT 48 /* unused */ | ||
37 | |||
38 | #define TCE_RPN_MASK 0x0000fffffffff000ULL | ||
39 | |||
40 | extern void tce_build(struct iommu_table *tbl, unsigned long index, | ||
41 | unsigned int npages, unsigned long uaddr, int direction); | ||
42 | extern void tce_free(struct iommu_table *tbl, long index, unsigned int npages); | ||
43 | extern void* alloc_tce_table(void); | ||
44 | extern void free_tce_table(void *tbl); | ||
45 | extern int build_tce_table(struct pci_dev *dev, void __iomem *bbar); | ||
46 | |||
47 | #endif /* _ASM_X86_64_TCE_H */ | ||
diff --git a/include/asm-x86_64/thread_info.h b/include/asm-x86_64/thread_info.h index 4ac0e0a369..2029b00351 100644 --- a/include/asm-x86_64/thread_info.h +++ b/include/asm-x86_64/thread_info.h | |||
@@ -73,8 +73,21 @@ static inline struct thread_info *stack_thread_info(void) | |||
73 | } | 73 | } |
74 | 74 | ||
75 | /* thread information allocation */ | 75 | /* thread information allocation */ |
76 | #ifdef CONFIG_DEBUG_STACK_USAGE | ||
77 | #define alloc_thread_info(tsk) \ | ||
78 | ({ \ | ||
79 | struct thread_info *ret; \ | ||
80 | \ | ||
81 | ret = ((struct thread_info *) __get_free_pages(GFP_KERNEL,THREAD_ORDER)); \ | ||
82 | if (ret) \ | ||
83 | memset(ret, 0, THREAD_SIZE); \ | ||
84 | ret; \ | ||
85 | }) | ||
86 | #else | ||
76 | #define alloc_thread_info(tsk) \ | 87 | #define alloc_thread_info(tsk) \ |
77 | ((struct thread_info *) __get_free_pages(GFP_KERNEL,THREAD_ORDER)) | 88 | ((struct thread_info *) __get_free_pages(GFP_KERNEL,THREAD_ORDER)) |
89 | #endif | ||
90 | |||
78 | #define free_thread_info(ti) free_pages((unsigned long) (ti), THREAD_ORDER) | 91 | #define free_thread_info(ti) free_pages((unsigned long) (ti), THREAD_ORDER) |
79 | 92 | ||
80 | #else /* !__ASSEMBLY__ */ | 93 | #else /* !__ASSEMBLY__ */ |
@@ -101,7 +114,7 @@ static inline struct thread_info *stack_thread_info(void) | |||
101 | #define TIF_IRET 5 /* force IRET */ | 114 | #define TIF_IRET 5 /* force IRET */ |
102 | #define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */ | 115 | #define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */ |
103 | #define TIF_SECCOMP 8 /* secure computing */ | 116 | #define TIF_SECCOMP 8 /* secure computing */ |
104 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 117 | /* 16 free */ |
105 | #define TIF_IA32 17 /* 32bit process */ | 118 | #define TIF_IA32 17 /* 32bit process */ |
106 | #define TIF_FORK 18 /* ret_from_fork */ | 119 | #define TIF_FORK 18 /* ret_from_fork */ |
107 | #define TIF_ABI_PENDING 19 | 120 | #define TIF_ABI_PENDING 19 |
@@ -115,7 +128,6 @@ static inline struct thread_info *stack_thread_info(void) | |||
115 | #define _TIF_IRET (1<<TIF_IRET) | 128 | #define _TIF_IRET (1<<TIF_IRET) |
116 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) | 129 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) |
117 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) | 130 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) |
118 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | ||
119 | #define _TIF_IA32 (1<<TIF_IA32) | 131 | #define _TIF_IA32 (1<<TIF_IA32) |
120 | #define _TIF_FORK (1<<TIF_FORK) | 132 | #define _TIF_FORK (1<<TIF_FORK) |
121 | #define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING) | 133 | #define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING) |
@@ -137,6 +149,9 @@ static inline struct thread_info *stack_thread_info(void) | |||
137 | */ | 149 | */ |
138 | #define TS_USEDFPU 0x0001 /* FPU was used by this task this quantum (SMP) */ | 150 | #define TS_USEDFPU 0x0001 /* FPU was used by this task this quantum (SMP) */ |
139 | #define TS_COMPAT 0x0002 /* 32bit syscall active */ | 151 | #define TS_COMPAT 0x0002 /* 32bit syscall active */ |
152 | #define TS_POLLING 0x0004 /* true if in idle loop and not sleeping */ | ||
153 | |||
154 | #define tsk_is_polling(t) ((t)->thread_info->status & TS_POLLING) | ||
140 | 155 | ||
141 | #endif /* __KERNEL__ */ | 156 | #endif /* __KERNEL__ */ |
142 | 157 | ||
diff --git a/include/asm-x86_64/topology.h b/include/asm-x86_64/topology.h index 80c4e44d01..6e7a2e976b 100644 --- a/include/asm-x86_64/topology.h +++ b/include/asm-x86_64/topology.h | |||
@@ -7,8 +7,6 @@ | |||
7 | #include <asm/mpspec.h> | 7 | #include <asm/mpspec.h> |
8 | #include <asm/bitops.h> | 8 | #include <asm/bitops.h> |
9 | 9 | ||
10 | /* Map the K8 CPU local memory controllers to a simple 1:1 CPU:NODE topology */ | ||
11 | |||
12 | extern cpumask_t cpu_online_map; | 10 | extern cpumask_t cpu_online_map; |
13 | 11 | ||
14 | extern unsigned char cpu_to_node[]; | 12 | extern unsigned char cpu_to_node[]; |
@@ -57,12 +55,12 @@ extern int __node_distance(int, int); | |||
57 | #endif | 55 | #endif |
58 | 56 | ||
59 | #ifdef CONFIG_SMP | 57 | #ifdef CONFIG_SMP |
60 | #define topology_physical_package_id(cpu) \ | 58 | #define topology_physical_package_id(cpu) (cpu_data[cpu].phys_proc_id) |
61 | (phys_proc_id[cpu] == BAD_APICID ? -1 : phys_proc_id[cpu]) | 59 | #define topology_core_id(cpu) (cpu_data[cpu].cpu_core_id) |
62 | #define topology_core_id(cpu) \ | ||
63 | (cpu_core_id[cpu] == BAD_APICID ? 0 : cpu_core_id[cpu]) | ||
64 | #define topology_core_siblings(cpu) (cpu_core_map[cpu]) | 60 | #define topology_core_siblings(cpu) (cpu_core_map[cpu]) |
65 | #define topology_thread_siblings(cpu) (cpu_sibling_map[cpu]) | 61 | #define topology_thread_siblings(cpu) (cpu_sibling_map[cpu]) |
62 | #define mc_capable() (boot_cpu_data.x86_max_cores > 1) | ||
63 | #define smt_capable() (smp_num_siblings > 1) | ||
66 | #endif | 64 | #endif |
67 | 65 | ||
68 | #include <asm-generic/topology.h> | 66 | #include <asm-generic/topology.h> |
diff --git a/include/asm-x86_64/unwind.h b/include/asm-x86_64/unwind.h new file mode 100644 index 0000000000..f3e7124eff --- /dev/null +++ b/include/asm-x86_64/unwind.h | |||
@@ -0,0 +1,106 @@ | |||
1 | #ifndef _ASM_X86_64_UNWIND_H | ||
2 | #define _ASM_X86_64_UNWIND_H | ||
3 | |||
4 | /* | ||
5 | * Copyright (C) 2002-2006 Novell, Inc. | ||
6 | * Jan Beulich <jbeulich@novell.com> | ||
7 | * This code is released under version 2 of the GNU GPL. | ||
8 | */ | ||
9 | |||
10 | #ifdef CONFIG_STACK_UNWIND | ||
11 | |||
12 | #include <linux/sched.h> | ||
13 | #include <asm/ptrace.h> | ||
14 | #include <asm/uaccess.h> | ||
15 | #include <asm/vsyscall.h> | ||
16 | |||
17 | struct unwind_frame_info | ||
18 | { | ||
19 | struct pt_regs regs; | ||
20 | struct task_struct *task; | ||
21 | }; | ||
22 | |||
23 | #define UNW_PC(frame) (frame)->regs.rip | ||
24 | #define UNW_SP(frame) (frame)->regs.rsp | ||
25 | #ifdef CONFIG_FRAME_POINTER | ||
26 | #define UNW_FP(frame) (frame)->regs.rbp | ||
27 | #define FRAME_RETADDR_OFFSET 8 | ||
28 | #define FRAME_LINK_OFFSET 0 | ||
29 | #define STACK_BOTTOM(tsk) (((tsk)->thread.rsp0 - 1) & ~(THREAD_SIZE - 1)) | ||
30 | #define STACK_TOP(tsk) ((tsk)->thread.rsp0) | ||
31 | #endif | ||
32 | /* Might need to account for the special exception and interrupt handling | ||
33 | stacks here, since normally | ||
34 | EXCEPTION_STACK_ORDER < THREAD_ORDER < IRQSTACK_ORDER, | ||
35 | but the construct is needed only for getting across the stack switch to | ||
36 | the interrupt stack - thus considering the IRQ stack itself is unnecessary, | ||
37 | and the overhead of comparing against all exception handling stacks seems | ||
38 | not desirable. */ | ||
39 | #define STACK_LIMIT(ptr) (((ptr) - 1) & ~(THREAD_SIZE - 1)) | ||
40 | |||
41 | #define UNW_REGISTER_INFO \ | ||
42 | PTREGS_INFO(rax), \ | ||
43 | PTREGS_INFO(rdx), \ | ||
44 | PTREGS_INFO(rcx), \ | ||
45 | PTREGS_INFO(rbx), \ | ||
46 | PTREGS_INFO(rsi), \ | ||
47 | PTREGS_INFO(rdi), \ | ||
48 | PTREGS_INFO(rbp), \ | ||
49 | PTREGS_INFO(rsp), \ | ||
50 | PTREGS_INFO(r8), \ | ||
51 | PTREGS_INFO(r9), \ | ||
52 | PTREGS_INFO(r10), \ | ||
53 | PTREGS_INFO(r11), \ | ||
54 | PTREGS_INFO(r12), \ | ||
55 | PTREGS_INFO(r13), \ | ||
56 | PTREGS_INFO(r14), \ | ||
57 | PTREGS_INFO(r15), \ | ||
58 | PTREGS_INFO(rip) | ||
59 | |||
60 | static inline void arch_unw_init_frame_info(struct unwind_frame_info *info, | ||
61 | /*const*/ struct pt_regs *regs) | ||
62 | { | ||
63 | info->regs = *regs; | ||
64 | } | ||
65 | |||
66 | static inline void arch_unw_init_blocked(struct unwind_frame_info *info) | ||
67 | { | ||
68 | extern const char thread_return[]; | ||
69 | |||
70 | memset(&info->regs, 0, sizeof(info->regs)); | ||
71 | info->regs.rip = (unsigned long)thread_return; | ||
72 | info->regs.cs = __KERNEL_CS; | ||
73 | __get_user(info->regs.rbp, (unsigned long *)info->task->thread.rsp); | ||
74 | info->regs.rsp = info->task->thread.rsp; | ||
75 | info->regs.ss = __KERNEL_DS; | ||
76 | } | ||
77 | |||
78 | extern int arch_unwind_init_running(struct unwind_frame_info *, | ||
79 | int (*callback)(struct unwind_frame_info *, | ||
80 | void *arg), | ||
81 | void *arg); | ||
82 | |||
83 | static inline int arch_unw_user_mode(const struct unwind_frame_info *info) | ||
84 | { | ||
85 | #if 0 /* This can only work when selector register saves/restores | ||
86 | are properly annotated (and tracked in UNW_REGISTER_INFO). */ | ||
87 | return user_mode(&info->regs); | ||
88 | #else | ||
89 | return (long)info->regs.rip >= 0 | ||
90 | || (info->regs.rip >= VSYSCALL_START && info->regs.rip < VSYSCALL_END) | ||
91 | || (long)info->regs.rsp >= 0; | ||
92 | #endif | ||
93 | } | ||
94 | |||
95 | #else | ||
96 | |||
97 | #define UNW_PC(frame) ((void)(frame), 0) | ||
98 | |||
99 | static inline int arch_unw_user_mode(const void *info) | ||
100 | { | ||
101 | return 0; | ||
102 | } | ||
103 | |||
104 | #endif | ||
105 | |||
106 | #endif /* _ASM_X86_64_UNWIND_H */ | ||
diff --git a/include/asm-xtensa/hw_irq.h b/include/asm-xtensa/hw_irq.h index ccf436249e..3ddbea759b 100644 --- a/include/asm-xtensa/hw_irq.h +++ b/include/asm-xtensa/hw_irq.h | |||
@@ -11,8 +11,4 @@ | |||
11 | #ifndef _XTENSA_HW_IRQ_H | 11 | #ifndef _XTENSA_HW_IRQ_H |
12 | #define _XTENSA_HW_IRQ_H | 12 | #define _XTENSA_HW_IRQ_H |
13 | 13 | ||
14 | static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) | ||
15 | { | ||
16 | } | ||
17 | |||
18 | #endif | 14 | #endif |
diff --git a/include/keys/user-type.h b/include/keys/user-type.h index a3dae1803f..c37c34275a 100644 --- a/include/keys/user-type.h +++ b/include/keys/user-type.h | |||
@@ -37,6 +37,7 @@ extern struct key_type key_type_user; | |||
37 | extern int user_instantiate(struct key *key, const void *data, size_t datalen); | 37 | extern int user_instantiate(struct key *key, const void *data, size_t datalen); |
38 | extern int user_update(struct key *key, const void *data, size_t datalen); | 38 | extern int user_update(struct key *key, const void *data, size_t datalen); |
39 | extern int user_match(const struct key *key, const void *criterion); | 39 | extern int user_match(const struct key *key, const void *criterion); |
40 | extern void user_revoke(struct key *key); | ||
40 | extern void user_destroy(struct key *key); | 41 | extern void user_destroy(struct key *key); |
41 | extern void user_describe(const struct key *user, struct seq_file *m); | 42 | extern void user_describe(const struct key *user, struct seq_file *m); |
42 | extern long user_read(const struct key *key, | 43 | extern long user_read(const struct key *key, |
diff --git a/include/linux/ac97_codec.h b/include/linux/ac97_codec.h index c35833824e..2ed2fd8551 100644 --- a/include/linux/ac97_codec.h +++ b/include/linux/ac97_codec.h | |||
@@ -259,7 +259,7 @@ struct ac97_codec { | |||
259 | int type; | 259 | int type; |
260 | u32 model; | 260 | u32 model; |
261 | 261 | ||
262 | int modem:1; | 262 | unsigned int modem:1; |
263 | 263 | ||
264 | struct ac97_ops *codec_ops; | 264 | struct ac97_ops *codec_ops; |
265 | 265 | ||
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 90d6df1551..88b5dfd8ee 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -528,12 +528,18 @@ static inline void acpi_set_cstate_limit(unsigned int new_limit) { return; } | |||
528 | 528 | ||
529 | #ifdef CONFIG_ACPI_NUMA | 529 | #ifdef CONFIG_ACPI_NUMA |
530 | int acpi_get_pxm(acpi_handle handle); | 530 | int acpi_get_pxm(acpi_handle handle); |
531 | int acpi_get_node(acpi_handle *handle); | ||
531 | #else | 532 | #else |
532 | static inline int acpi_get_pxm(acpi_handle handle) | 533 | static inline int acpi_get_pxm(acpi_handle handle) |
533 | { | 534 | { |
534 | return 0; | 535 | return 0; |
535 | } | 536 | } |
537 | static inline int acpi_get_node(acpi_handle *handle) | ||
538 | { | ||
539 | return 0; | ||
540 | } | ||
536 | #endif | 541 | #endif |
542 | extern int acpi_paddr_to_node(u64 start_addr, u64 size); | ||
537 | 543 | ||
538 | extern int pnpacpi_disabled; | 544 | extern int pnpacpi_disabled; |
539 | 545 | ||
diff --git a/include/linux/bitmap.h b/include/linux/bitmap.h index d9ed279698..dcc5de7cc4 100644 --- a/include/linux/bitmap.h +++ b/include/linux/bitmap.h | |||
@@ -24,6 +24,9 @@ | |||
24 | * The available bitmap operations and their rough meaning in the | 24 | * The available bitmap operations and their rough meaning in the |
25 | * case that the bitmap is a single unsigned long are thus: | 25 | * case that the bitmap is a single unsigned long are thus: |
26 | * | 26 | * |
27 | * Note that nbits should be always a compile time evaluable constant. | ||
28 | * Otherwise many inlines will generate horrible code. | ||
29 | * | ||
27 | * bitmap_zero(dst, nbits) *dst = 0UL | 30 | * bitmap_zero(dst, nbits) *dst = 0UL |
28 | * bitmap_fill(dst, nbits) *dst = ~0UL | 31 | * bitmap_fill(dst, nbits) *dst = ~0UL |
29 | * bitmap_copy(dst, src, nbits) *dst = *src | 32 | * bitmap_copy(dst, src, nbits) *dst = *src |
@@ -244,6 +247,8 @@ static inline int bitmap_full(const unsigned long *src, int nbits) | |||
244 | 247 | ||
245 | static inline int bitmap_weight(const unsigned long *src, int nbits) | 248 | static inline int bitmap_weight(const unsigned long *src, int nbits) |
246 | { | 249 | { |
250 | if (nbits <= BITS_PER_LONG) | ||
251 | return hweight_long(*src & BITMAP_LAST_WORD_MASK(nbits)); | ||
247 | return __bitmap_weight(src, nbits); | 252 | return __bitmap_weight(src, nbits); |
248 | } | 253 | } |
249 | 254 | ||
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index fb7e9b7ccb..737e407d0c 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h | |||
@@ -149,7 +149,6 @@ void create_empty_buffers(struct page *, unsigned long, | |||
149 | unsigned long b_state); | 149 | unsigned long b_state); |
150 | void end_buffer_read_sync(struct buffer_head *bh, int uptodate); | 150 | void end_buffer_read_sync(struct buffer_head *bh, int uptodate); |
151 | void end_buffer_write_sync(struct buffer_head *bh, int uptodate); | 151 | void end_buffer_write_sync(struct buffer_head *bh, int uptodate); |
152 | void end_buffer_async_write(struct buffer_head *bh, int uptodate); | ||
153 | 152 | ||
154 | /* Things to do with buffers at mapping->private_list */ | 153 | /* Things to do with buffers at mapping->private_list */ |
155 | void mark_buffer_dirty_inode(struct buffer_head *bh, struct inode *inode); | 154 | void mark_buffer_dirty_inode(struct buffer_head *bh, struct inode *inode); |
@@ -214,6 +213,7 @@ int nobh_truncate_page(struct address_space *, loff_t); | |||
214 | int nobh_writepage(struct page *page, get_block_t *get_block, | 213 | int nobh_writepage(struct page *page, get_block_t *get_block, |
215 | struct writeback_control *wbc); | 214 | struct writeback_control *wbc); |
216 | 215 | ||
216 | void buffer_init(void); | ||
217 | 217 | ||
218 | /* | 218 | /* |
219 | * inline definitions | 219 | * inline definitions |
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h new file mode 100644 index 0000000000..d852024ed0 --- /dev/null +++ b/include/linux/clocksource.h | |||
@@ -0,0 +1,185 @@ | |||
1 | /* linux/include/linux/clocksource.h | ||
2 | * | ||
3 | * This file contains the structure definitions for clocksources. | ||
4 | * | ||
5 | * If you are not a clocksource, or timekeeping code, you should | ||
6 | * not be including this file! | ||
7 | */ | ||
8 | #ifndef _LINUX_CLOCKSOURCE_H | ||
9 | #define _LINUX_CLOCKSOURCE_H | ||
10 | |||
11 | #include <linux/types.h> | ||
12 | #include <linux/timex.h> | ||
13 | #include <linux/time.h> | ||
14 | #include <linux/list.h> | ||
15 | #include <asm/div64.h> | ||
16 | #include <asm/io.h> | ||
17 | |||
18 | /* clocksource cycle base type */ | ||
19 | typedef u64 cycle_t; | ||
20 | |||
21 | /** | ||
22 | * struct clocksource - hardware abstraction for a free running counter | ||
23 | * Provides mostly state-free accessors to the underlying hardware. | ||
24 | * | ||
25 | * @name: ptr to clocksource name | ||
26 | * @list: list head for registration | ||
27 | * @rating: rating value for selection (higher is better) | ||
28 | * To avoid rating inflation the following | ||
29 | * list should give you a guide as to how | ||
30 | * to assign your clocksource a rating | ||
31 | * 1-99: Unfit for real use | ||
32 | * Only available for bootup and testing purposes. | ||
33 | * 100-199: Base level usability. | ||
34 | * Functional for real use, but not desired. | ||
35 | * 200-299: Good. | ||
36 | * A correct and usable clocksource. | ||
37 | * 300-399: Desired. | ||
38 | * A reasonably fast and accurate clocksource. | ||
39 | * 400-499: Perfect | ||
40 | * The ideal clocksource. A must-use where | ||
41 | * available. | ||
42 | * @read: returns a cycle value | ||
43 | * @mask: bitmask for two's complement | ||
44 | * subtraction of non 64 bit counters | ||
45 | * @mult: cycle to nanosecond multiplier | ||
46 | * @shift: cycle to nanosecond divisor (power of two) | ||
47 | * @update_callback: called when safe to alter clocksource values | ||
48 | * @is_continuous: defines if clocksource is free-running. | ||
49 | * @cycle_interval: Used internally by timekeeping core, please ignore. | ||
50 | * @xtime_interval: Used internally by timekeeping core, please ignore. | ||
51 | */ | ||
52 | struct clocksource { | ||
53 | char *name; | ||
54 | struct list_head list; | ||
55 | int rating; | ||
56 | cycle_t (*read)(void); | ||
57 | cycle_t mask; | ||
58 | u32 mult; | ||
59 | u32 shift; | ||
60 | int (*update_callback)(void); | ||
61 | int is_continuous; | ||
62 | |||
63 | /* timekeeping specific data, ignore */ | ||
64 | cycle_t cycle_last, cycle_interval; | ||
65 | u64 xtime_nsec, xtime_interval; | ||
66 | s64 error; | ||
67 | }; | ||
68 | |||
69 | /* simplify initialization of mask field */ | ||
70 | #define CLOCKSOURCE_MASK(bits) (cycle_t)(bits<64 ? ((1ULL<<bits)-1) : -1) | ||
71 | |||
72 | /** | ||
73 | * clocksource_khz2mult - calculates mult from khz and shift | ||
74 | * @khz: Clocksource frequency in KHz | ||
75 | * @shift_constant: Clocksource shift factor | ||
76 | * | ||
77 | * Helper functions that converts a khz counter frequency to a timsource | ||
78 | * multiplier, given the clocksource shift value | ||
79 | */ | ||
80 | static inline u32 clocksource_khz2mult(u32 khz, u32 shift_constant) | ||
81 | { | ||
82 | /* khz = cyc/(Million ns) | ||
83 | * mult/2^shift = ns/cyc | ||
84 | * mult = ns/cyc * 2^shift | ||
85 | * mult = 1Million/khz * 2^shift | ||
86 | * mult = 1000000 * 2^shift / khz | ||
87 | * mult = (1000000<<shift) / khz | ||
88 | */ | ||
89 | u64 tmp = ((u64)1000000) << shift_constant; | ||
90 | |||
91 | tmp += khz/2; /* round for do_div */ | ||
92 | do_div(tmp, khz); | ||
93 | |||
94 | return (u32)tmp; | ||
95 | } | ||
96 | |||
97 | /** | ||
98 | * clocksource_hz2mult - calculates mult from hz and shift | ||
99 | * @hz: Clocksource frequency in Hz | ||
100 | * @shift_constant: Clocksource shift factor | ||
101 | * | ||
102 | * Helper functions that converts a hz counter | ||
103 | * frequency to a timsource multiplier, given the | ||
104 | * clocksource shift value | ||
105 | */ | ||
106 | static inline u32 clocksource_hz2mult(u32 hz, u32 shift_constant) | ||
107 | { | ||
108 | /* hz = cyc/(Billion ns) | ||
109 | * mult/2^shift = ns/cyc | ||
110 | * mult = ns/cyc * 2^shift | ||
111 | * mult = 1Billion/hz * 2^shift | ||
112 | * mult = 1000000000 * 2^shift / hz | ||
113 | * mult = (1000000000<<shift) / hz | ||
114 | */ | ||
115 | u64 tmp = ((u64)1000000000) << shift_constant; | ||
116 | |||
117 | tmp += hz/2; /* round for do_div */ | ||
118 | do_div(tmp, hz); | ||
119 | |||
120 | return (u32)tmp; | ||
121 | } | ||
122 | |||
123 | /** | ||
124 | * clocksource_read: - Access the clocksource's current cycle value | ||
125 | * @cs: pointer to clocksource being read | ||
126 | * | ||
127 | * Uses the clocksource to return the current cycle_t value | ||
128 | */ | ||
129 | static inline cycle_t clocksource_read(struct clocksource *cs) | ||
130 | { | ||
131 | return cs->read(); | ||
132 | } | ||
133 | |||
134 | /** | ||
135 | * cyc2ns - converts clocksource cycles to nanoseconds | ||
136 | * @cs: Pointer to clocksource | ||
137 | * @cycles: Cycles | ||
138 | * | ||
139 | * Uses the clocksource and ntp ajdustment to convert cycle_ts to nanoseconds. | ||
140 | * | ||
141 | * XXX - This could use some mult_lxl_ll() asm optimization | ||
142 | */ | ||
143 | static inline s64 cyc2ns(struct clocksource *cs, cycle_t cycles) | ||
144 | { | ||
145 | u64 ret = (u64)cycles; | ||
146 | ret = (ret * cs->mult) >> cs->shift; | ||
147 | return ret; | ||
148 | } | ||
149 | |||
150 | /** | ||
151 | * clocksource_calculate_interval - Calculates a clocksource interval struct | ||
152 | * | ||
153 | * @c: Pointer to clocksource. | ||
154 | * @length_nsec: Desired interval length in nanoseconds. | ||
155 | * | ||
156 | * Calculates a fixed cycle/nsec interval for a given clocksource/adjustment | ||
157 | * pair and interval request. | ||
158 | * | ||
159 | * Unless you're the timekeeping code, you should not be using this! | ||
160 | */ | ||
161 | static inline void clocksource_calculate_interval(struct clocksource *c, | ||
162 | unsigned long length_nsec) | ||
163 | { | ||
164 | u64 tmp; | ||
165 | |||
166 | /* XXX - All of this could use a whole lot of optimization */ | ||
167 | tmp = length_nsec; | ||
168 | tmp <<= c->shift; | ||
169 | tmp += c->mult/2; | ||
170 | do_div(tmp, c->mult); | ||
171 | |||
172 | c->cycle_interval = (cycle_t)tmp; | ||
173 | if (c->cycle_interval == 0) | ||
174 | c->cycle_interval = 1; | ||
175 | |||
176 | c->xtime_interval = (u64)c->cycle_interval * c->mult; | ||
177 | } | ||
178 | |||
179 | |||
180 | /* used to install a new clocksource */ | ||
181 | int clocksource_register(struct clocksource*); | ||
182 | void clocksource_reselect(void); | ||
183 | struct clocksource* clocksource_get_next(void); | ||
184 | |||
185 | #endif /* _LINUX_CLOCKSOURCE_H */ | ||
diff --git a/include/linux/coda_linux.h b/include/linux/coda_linux.h index 7b5c5df5cb..be512cc987 100644 --- a/include/linux/coda_linux.h +++ b/include/linux/coda_linux.h | |||
@@ -27,8 +27,8 @@ extern struct inode_operations coda_dir_inode_operations; | |||
27 | extern struct inode_operations coda_file_inode_operations; | 27 | extern struct inode_operations coda_file_inode_operations; |
28 | extern struct inode_operations coda_ioctl_inode_operations; | 28 | extern struct inode_operations coda_ioctl_inode_operations; |
29 | 29 | ||
30 | extern struct address_space_operations coda_file_aops; | 30 | extern const struct address_space_operations coda_file_aops; |
31 | extern struct address_space_operations coda_symlink_aops; | 31 | extern const struct address_space_operations coda_symlink_aops; |
32 | 32 | ||
33 | extern const struct file_operations coda_dir_operations; | 33 | extern const struct file_operations coda_dir_operations; |
34 | extern const struct file_operations coda_file_operations; | 34 | extern const struct file_operations coda_file_operations; |
diff --git a/include/linux/compat.h b/include/linux/compat.h index dda1697ec7..9760753e66 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h | |||
@@ -226,5 +226,7 @@ static inline int compat_timespec_compare(struct compat_timespec *lhs, | |||
226 | 226 | ||
227 | asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp); | 227 | asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp); |
228 | 228 | ||
229 | extern int compat_printk(const char *fmt, ...); | ||
230 | |||
229 | #endif /* CONFIG_COMPAT */ | 231 | #endif /* CONFIG_COMPAT */ |
230 | #endif /* _LINUX_COMPAT_H */ | 232 | #endif /* _LINUX_COMPAT_H */ |
diff --git a/include/linux/compat_ioctl.h b/include/linux/compat_ioctl.h index 89ab677cb9..917d62e414 100644 --- a/include/linux/compat_ioctl.h +++ b/include/linux/compat_ioctl.h | |||
@@ -673,6 +673,11 @@ COMPATIBLE_IOCTL(CAPI_SET_FLAGS) | |||
673 | COMPATIBLE_IOCTL(CAPI_CLR_FLAGS) | 673 | COMPATIBLE_IOCTL(CAPI_CLR_FLAGS) |
674 | COMPATIBLE_IOCTL(CAPI_NCCI_OPENCOUNT) | 674 | COMPATIBLE_IOCTL(CAPI_NCCI_OPENCOUNT) |
675 | COMPATIBLE_IOCTL(CAPI_NCCI_GETUNIT) | 675 | COMPATIBLE_IOCTL(CAPI_NCCI_GETUNIT) |
676 | /* Siemens Gigaset */ | ||
677 | COMPATIBLE_IOCTL(GIGASET_REDIR) | ||
678 | COMPATIBLE_IOCTL(GIGASET_CONFIG) | ||
679 | COMPATIBLE_IOCTL(GIGASET_BRKCHARS) | ||
680 | COMPATIBLE_IOCTL(GIGASET_VERSION) | ||
676 | /* Misc. */ | 681 | /* Misc. */ |
677 | COMPATIBLE_IOCTL(0x41545900) /* ATYIO_CLKR */ | 682 | COMPATIBLE_IOCTL(0x41545900) /* ATYIO_CLKR */ |
678 | COMPATIBLE_IOCTL(0x41545901) /* ATYIO_CLKW */ | 683 | COMPATIBLE_IOCTL(0x41545901) /* ATYIO_CLKW */ |
diff --git a/include/linux/console.h b/include/linux/console.h index d0f8a80094..3bdf2155e5 100644 --- a/include/linux/console.h +++ b/include/linux/console.h | |||
@@ -63,9 +63,11 @@ extern const struct consw vga_con; /* VGA text console */ | |||
63 | extern const struct consw newport_con; /* SGI Newport console */ | 63 | extern const struct consw newport_con; /* SGI Newport console */ |
64 | extern const struct consw prom_con; /* SPARC PROM console */ | 64 | extern const struct consw prom_con; /* SPARC PROM console */ |
65 | 65 | ||
66 | int con_is_bound(const struct consw *csw); | ||
67 | int register_con_driver(const struct consw *csw, int first, int last); | ||
68 | int unregister_con_driver(const struct consw *csw); | ||
66 | int take_over_console(const struct consw *sw, int first, int last, int deflt); | 69 | int take_over_console(const struct consw *sw, int first, int last, int deflt); |
67 | void give_up_console(const struct consw *sw); | 70 | void give_up_console(const struct consw *sw); |
68 | |||
69 | /* scroll */ | 71 | /* scroll */ |
70 | #define SM_UP (1) | 72 | #define SM_UP (1) |
71 | #define SM_DOWN (2) | 73 | #define SM_DOWN (2) |
diff --git a/include/linux/cpu.h b/include/linux/cpu.h index 08d50c53aa..a3caf6866b 100644 --- a/include/linux/cpu.h +++ b/include/linux/cpu.h | |||
@@ -31,17 +31,23 @@ struct cpu { | |||
31 | struct sys_device sysdev; | 31 | struct sys_device sysdev; |
32 | }; | 32 | }; |
33 | 33 | ||
34 | extern int register_cpu(struct cpu *, int, struct node *); | 34 | extern int register_cpu(struct cpu *cpu, int num); |
35 | extern struct sys_device *get_cpu_sysdev(unsigned cpu); | 35 | extern struct sys_device *get_cpu_sysdev(unsigned cpu); |
36 | #ifdef CONFIG_HOTPLUG_CPU | 36 | #ifdef CONFIG_HOTPLUG_CPU |
37 | extern void unregister_cpu(struct cpu *, struct node *); | 37 | extern void unregister_cpu(struct cpu *cpu); |
38 | #endif | 38 | #endif |
39 | struct notifier_block; | 39 | struct notifier_block; |
40 | 40 | ||
41 | #ifdef CONFIG_SMP | 41 | #ifdef CONFIG_SMP |
42 | /* Need to know about CPUs going up/down? */ | 42 | /* Need to know about CPUs going up/down? */ |
43 | extern int register_cpu_notifier(struct notifier_block *nb); | 43 | extern int register_cpu_notifier(struct notifier_block *nb); |
44 | #ifdef CONFIG_HOTPLUG_CPU | ||
44 | extern void unregister_cpu_notifier(struct notifier_block *nb); | 45 | extern void unregister_cpu_notifier(struct notifier_block *nb); |
46 | #else | ||
47 | static inline void unregister_cpu_notifier(struct notifier_block *nb) | ||
48 | { | ||
49 | } | ||
50 | #endif | ||
45 | extern int current_in_cpu_hotplug(void); | 51 | extern int current_in_cpu_hotplug(void); |
46 | 52 | ||
47 | int cpu_up(unsigned int cpu); | 53 | int cpu_up(unsigned int cpu); |
@@ -73,6 +79,8 @@ extern int lock_cpu_hotplug_interruptible(void); | |||
73 | { .notifier_call = fn, .priority = pri }; \ | 79 | { .notifier_call = fn, .priority = pri }; \ |
74 | register_cpu_notifier(&fn##_nb); \ | 80 | register_cpu_notifier(&fn##_nb); \ |
75 | } | 81 | } |
82 | #define register_hotcpu_notifier(nb) register_cpu_notifier(nb) | ||
83 | #define unregister_hotcpu_notifier(nb) unregister_cpu_notifier(nb) | ||
76 | int cpu_down(unsigned int cpu); | 84 | int cpu_down(unsigned int cpu); |
77 | #define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) | 85 | #define cpu_is_offline(cpu) unlikely(!cpu_online(cpu)) |
78 | #else | 86 | #else |
@@ -80,6 +88,8 @@ int cpu_down(unsigned int cpu); | |||
80 | #define unlock_cpu_hotplug() do { } while (0) | 88 | #define unlock_cpu_hotplug() do { } while (0) |
81 | #define lock_cpu_hotplug_interruptible() 0 | 89 | #define lock_cpu_hotplug_interruptible() 0 |
82 | #define hotcpu_notifier(fn, pri) | 90 | #define hotcpu_notifier(fn, pri) |
91 | #define register_hotcpu_notifier(nb) | ||
92 | #define unregister_hotcpu_notifier(nb) | ||
83 | 93 | ||
84 | /* CPUs don't go offline once they're online w/o CONFIG_HOTPLUG_CPU */ | 94 | /* CPUs don't go offline once they're online w/o CONFIG_HOTPLUG_CPU */ |
85 | static inline int cpu_is_offline(int cpu) { return 0; } | 95 | static inline int cpu_is_offline(int cpu) { return 0; } |
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 5a0470e361..7f946241b8 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
@@ -66,7 +66,7 @@ struct crypto_tfm; | |||
66 | 66 | ||
67 | struct cipher_desc { | 67 | struct cipher_desc { |
68 | struct crypto_tfm *tfm; | 68 | struct crypto_tfm *tfm; |
69 | void (*crfn)(void *ctx, u8 *dst, const u8 *src); | 69 | void (*crfn)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); |
70 | unsigned int (*prfn)(const struct cipher_desc *desc, u8 *dst, | 70 | unsigned int (*prfn)(const struct cipher_desc *desc, u8 *dst, |
71 | const u8 *src, unsigned int nbytes); | 71 | const u8 *src, unsigned int nbytes); |
72 | void *info; | 72 | void *info; |
@@ -79,10 +79,10 @@ struct cipher_desc { | |||
79 | struct cipher_alg { | 79 | struct cipher_alg { |
80 | unsigned int cia_min_keysize; | 80 | unsigned int cia_min_keysize; |
81 | unsigned int cia_max_keysize; | 81 | unsigned int cia_max_keysize; |
82 | int (*cia_setkey)(void *ctx, const u8 *key, | 82 | int (*cia_setkey)(struct crypto_tfm *tfm, const u8 *key, |
83 | unsigned int keylen, u32 *flags); | 83 | unsigned int keylen, u32 *flags); |
84 | void (*cia_encrypt)(void *ctx, u8 *dst, const u8 *src); | 84 | void (*cia_encrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); |
85 | void (*cia_decrypt)(void *ctx, u8 *dst, const u8 *src); | 85 | void (*cia_decrypt)(struct crypto_tfm *tfm, u8 *dst, const u8 *src); |
86 | 86 | ||
87 | unsigned int (*cia_encrypt_ecb)(const struct cipher_desc *desc, | 87 | unsigned int (*cia_encrypt_ecb)(const struct cipher_desc *desc, |
88 | u8 *dst, const u8 *src, | 88 | u8 *dst, const u8 *src, |
@@ -100,20 +100,19 @@ struct cipher_alg { | |||
100 | 100 | ||
101 | struct digest_alg { | 101 | struct digest_alg { |
102 | unsigned int dia_digestsize; | 102 | unsigned int dia_digestsize; |
103 | void (*dia_init)(void *ctx); | 103 | void (*dia_init)(struct crypto_tfm *tfm); |
104 | void (*dia_update)(void *ctx, const u8 *data, unsigned int len); | 104 | void (*dia_update)(struct crypto_tfm *tfm, const u8 *data, |
105 | void (*dia_final)(void *ctx, u8 *out); | 105 | unsigned int len); |
106 | int (*dia_setkey)(void *ctx, const u8 *key, | 106 | void (*dia_final)(struct crypto_tfm *tfm, u8 *out); |
107 | int (*dia_setkey)(struct crypto_tfm *tfm, const u8 *key, | ||
107 | unsigned int keylen, u32 *flags); | 108 | unsigned int keylen, u32 *flags); |
108 | }; | 109 | }; |
109 | 110 | ||
110 | struct compress_alg { | 111 | struct compress_alg { |
111 | int (*coa_init)(void *ctx); | 112 | int (*coa_compress)(struct crypto_tfm *tfm, const u8 *src, |
112 | void (*coa_exit)(void *ctx); | 113 | unsigned int slen, u8 *dst, unsigned int *dlen); |
113 | int (*coa_compress)(void *ctx, const u8 *src, unsigned int slen, | 114 | int (*coa_decompress)(struct crypto_tfm *tfm, const u8 *src, |
114 | u8 *dst, unsigned int *dlen); | 115 | unsigned int slen, u8 *dst, unsigned int *dlen); |
115 | int (*coa_decompress)(void *ctx, const u8 *src, unsigned int slen, | ||
116 | u8 *dst, unsigned int *dlen); | ||
117 | }; | 116 | }; |
118 | 117 | ||
119 | #define cra_cipher cra_u.cipher | 118 | #define cra_cipher cra_u.cipher |
@@ -129,14 +128,17 @@ struct crypto_alg { | |||
129 | 128 | ||
130 | int cra_priority; | 129 | int cra_priority; |
131 | 130 | ||
132 | const char cra_name[CRYPTO_MAX_ALG_NAME]; | 131 | char cra_name[CRYPTO_MAX_ALG_NAME]; |
133 | const char cra_driver_name[CRYPTO_MAX_ALG_NAME]; | 132 | char cra_driver_name[CRYPTO_MAX_ALG_NAME]; |
134 | 133 | ||
135 | union { | 134 | union { |
136 | struct cipher_alg cipher; | 135 | struct cipher_alg cipher; |
137 | struct digest_alg digest; | 136 | struct digest_alg digest; |
138 | struct compress_alg compress; | 137 | struct compress_alg compress; |
139 | } cra_u; | 138 | } cra_u; |
139 | |||
140 | int (*cra_init)(struct crypto_tfm *tfm); | ||
141 | void (*cra_exit)(struct crypto_tfm *tfm); | ||
140 | 142 | ||
141 | struct module *cra_module; | 143 | struct module *cra_module; |
142 | }; | 144 | }; |
diff --git a/include/linux/device-mapper.h b/include/linux/device-mapper.h index aee10b2ea4..e3d1c33d15 100644 --- a/include/linux/device-mapper.h +++ b/include/linux/device-mapper.h | |||
@@ -8,9 +8,12 @@ | |||
8 | #ifndef _LINUX_DEVICE_MAPPER_H | 8 | #ifndef _LINUX_DEVICE_MAPPER_H |
9 | #define _LINUX_DEVICE_MAPPER_H | 9 | #define _LINUX_DEVICE_MAPPER_H |
10 | 10 | ||
11 | #ifdef __KERNEL__ | ||
12 | |||
11 | struct dm_target; | 13 | struct dm_target; |
12 | struct dm_table; | 14 | struct dm_table; |
13 | struct dm_dev; | 15 | struct dm_dev; |
16 | struct mapped_device; | ||
14 | 17 | ||
15 | typedef enum { STATUSTYPE_INFO, STATUSTYPE_TABLE } status_type_t; | 18 | typedef enum { STATUSTYPE_INFO, STATUSTYPE_TABLE } status_type_t; |
16 | 19 | ||
@@ -78,7 +81,7 @@ void dm_put_device(struct dm_target *ti, struct dm_dev *d); | |||
78 | struct target_type { | 81 | struct target_type { |
79 | const char *name; | 82 | const char *name; |
80 | struct module *module; | 83 | struct module *module; |
81 | unsigned version[3]; | 84 | unsigned version[3]; |
82 | dm_ctr_fn ctr; | 85 | dm_ctr_fn ctr; |
83 | dm_dtr_fn dtr; | 86 | dm_dtr_fn dtr; |
84 | dm_map_fn map; | 87 | dm_map_fn map; |
@@ -128,4 +131,108 @@ struct dm_target { | |||
128 | int dm_register_target(struct target_type *t); | 131 | int dm_register_target(struct target_type *t); |
129 | int dm_unregister_target(struct target_type *t); | 132 | int dm_unregister_target(struct target_type *t); |
130 | 133 | ||
131 | #endif /* _LINUX_DEVICE_MAPPER_H */ | 134 | |
135 | /*----------------------------------------------------------------- | ||
136 | * Functions for creating and manipulating mapped devices. | ||
137 | * Drop the reference with dm_put when you finish with the object. | ||
138 | *---------------------------------------------------------------*/ | ||
139 | |||
140 | /* | ||
141 | * DM_ANY_MINOR chooses the next available minor number. | ||
142 | */ | ||
143 | #define DM_ANY_MINOR (-1) | ||
144 | int dm_create(int minor, struct mapped_device **md); | ||
145 | |||
146 | /* | ||
147 | * Reference counting for md. | ||
148 | */ | ||
149 | struct mapped_device *dm_get_md(dev_t dev); | ||
150 | void dm_get(struct mapped_device *md); | ||
151 | void dm_put(struct mapped_device *md); | ||
152 | |||
153 | /* | ||
154 | * An arbitrary pointer may be stored alongside a mapped device. | ||
155 | */ | ||
156 | void dm_set_mdptr(struct mapped_device *md, void *ptr); | ||
157 | void *dm_get_mdptr(struct mapped_device *md); | ||
158 | |||
159 | /* | ||
160 | * A device can still be used while suspended, but I/O is deferred. | ||
161 | */ | ||
162 | int dm_suspend(struct mapped_device *md, int with_lockfs); | ||
163 | int dm_resume(struct mapped_device *md); | ||
164 | |||
165 | /* | ||
166 | * Event functions. | ||
167 | */ | ||
168 | uint32_t dm_get_event_nr(struct mapped_device *md); | ||
169 | int dm_wait_event(struct mapped_device *md, int event_nr); | ||
170 | |||
171 | /* | ||
172 | * Info functions. | ||
173 | */ | ||
174 | const char *dm_device_name(struct mapped_device *md); | ||
175 | struct gendisk *dm_disk(struct mapped_device *md); | ||
176 | int dm_suspended(struct mapped_device *md); | ||
177 | |||
178 | /* | ||
179 | * Geometry functions. | ||
180 | */ | ||
181 | int dm_get_geometry(struct mapped_device *md, struct hd_geometry *geo); | ||
182 | int dm_set_geometry(struct mapped_device *md, struct hd_geometry *geo); | ||
183 | |||
184 | |||
185 | /*----------------------------------------------------------------- | ||
186 | * Functions for manipulating device-mapper tables. | ||
187 | *---------------------------------------------------------------*/ | ||
188 | |||
189 | /* | ||
190 | * First create an empty table. | ||
191 | */ | ||
192 | int dm_table_create(struct dm_table **result, int mode, | ||
193 | unsigned num_targets, struct mapped_device *md); | ||
194 | |||
195 | /* | ||
196 | * Then call this once for each target. | ||
197 | */ | ||
198 | int dm_table_add_target(struct dm_table *t, const char *type, | ||
199 | sector_t start, sector_t len, char *params); | ||
200 | |||
201 | /* | ||
202 | * Finally call this to make the table ready for use. | ||
203 | */ | ||
204 | int dm_table_complete(struct dm_table *t); | ||
205 | |||
206 | /* | ||
207 | * Table reference counting. | ||
208 | */ | ||
209 | struct dm_table *dm_get_table(struct mapped_device *md); | ||
210 | void dm_table_get(struct dm_table *t); | ||
211 | void dm_table_put(struct dm_table *t); | ||
212 | |||
213 | /* | ||
214 | * Queries | ||
215 | */ | ||
216 | sector_t dm_table_get_size(struct dm_table *t); | ||
217 | unsigned int dm_table_get_num_targets(struct dm_table *t); | ||
218 | int dm_table_get_mode(struct dm_table *t); | ||
219 | struct mapped_device *dm_table_get_md(struct dm_table *t); | ||
220 | |||
221 | /* | ||
222 | * Trigger an event. | ||
223 | */ | ||
224 | void dm_table_event(struct dm_table *t); | ||
225 | |||
226 | /* | ||
227 | * The device must be suspended before calling this method. | ||
228 | */ | ||
229 | int dm_swap_table(struct mapped_device *md, struct dm_table *t); | ||
230 | |||
231 | /* | ||
232 | * Prepare a table for a device that will error all I/O. | ||
233 | * To make it active, call dm_suspend(), dm_swap_table() then dm_resume(). | ||
234 | */ | ||
235 | int dm_create_error_table(struct dm_table **result, struct mapped_device *md); | ||
236 | |||
237 | #endif /* __KERNEL__ */ | ||
238 | #endif /* _LINUX_DEVICE_MAPPER_H */ | ||
diff --git a/include/linux/dm-ioctl.h b/include/linux/dm-ioctl.h index c67c678661..9623bb6250 100644 --- a/include/linux/dm-ioctl.h +++ b/include/linux/dm-ioctl.h | |||
@@ -285,9 +285,9 @@ typedef char ioctl_struct[308]; | |||
285 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) | 285 | #define DM_DEV_SET_GEOMETRY _IOWR(DM_IOCTL, DM_DEV_SET_GEOMETRY_CMD, struct dm_ioctl) |
286 | 286 | ||
287 | #define DM_VERSION_MAJOR 4 | 287 | #define DM_VERSION_MAJOR 4 |
288 | #define DM_VERSION_MINOR 6 | 288 | #define DM_VERSION_MINOR 7 |
289 | #define DM_VERSION_PATCHLEVEL 0 | 289 | #define DM_VERSION_PATCHLEVEL 0 |
290 | #define DM_VERSION_EXTRA "-ioctl (2006-02-17)" | 290 | #define DM_VERSION_EXTRA "-ioctl (2006-06-24)" |
291 | 291 | ||
292 | /* Status bits */ | 292 | /* Status bits */ |
293 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ | 293 | #define DM_READONLY_FLAG (1 << 0) /* In/Out */ |
@@ -314,7 +314,7 @@ typedef char ioctl_struct[308]; | |||
314 | #define DM_BUFFER_FULL_FLAG (1 << 8) /* Out */ | 314 | #define DM_BUFFER_FULL_FLAG (1 << 8) /* Out */ |
315 | 315 | ||
316 | /* | 316 | /* |
317 | * Set this to improve performance when you aren't going to use open_count. | 317 | * This flag is now ignored. |
318 | */ | 318 | */ |
319 | #define DM_SKIP_BDGET_FLAG (1 << 9) /* In */ | 319 | #define DM_SKIP_BDGET_FLAG (1 << 9) /* In */ |
320 | 320 | ||
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 78b236ca04..272010a607 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -20,7 +20,7 @@ | |||
20 | */ | 20 | */ |
21 | #ifndef DMAENGINE_H | 21 | #ifndef DMAENGINE_H |
22 | #define DMAENGINE_H | 22 | #define DMAENGINE_H |
23 | #include <linux/config.h> | 23 | |
24 | #ifdef CONFIG_DMA_ENGINE | 24 | #ifdef CONFIG_DMA_ENGINE |
25 | 25 | ||
26 | #include <linux/device.h> | 26 | #include <linux/device.h> |
diff --git a/include/linux/efs_fs.h b/include/linux/efs_fs.h index fbfa6b52e2..278ef44958 100644 --- a/include/linux/efs_fs.h +++ b/include/linux/efs_fs.h | |||
@@ -38,7 +38,7 @@ struct statfs; | |||
38 | 38 | ||
39 | extern struct inode_operations efs_dir_inode_operations; | 39 | extern struct inode_operations efs_dir_inode_operations; |
40 | extern const struct file_operations efs_dir_operations; | 40 | extern const struct file_operations efs_dir_operations; |
41 | extern struct address_space_operations efs_symlink_aops; | 41 | extern const struct address_space_operations efs_symlink_aops; |
42 | 42 | ||
43 | extern void efs_read_inode(struct inode *); | 43 | extern void efs_read_inode(struct inode *); |
44 | extern efs_block_t efs_map_block(struct inode *, efs_block_t); | 44 | extern efs_block_t efs_map_block(struct inode *, efs_block_t); |
diff --git a/include/linux/fb.h b/include/linux/fb.h index f1281687e5..07a08e92bc 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h | |||
@@ -504,23 +504,19 @@ struct fb_cursor_user { | |||
504 | #define FB_EVENT_MODE_DELETE 0x04 | 504 | #define FB_EVENT_MODE_DELETE 0x04 |
505 | /* A driver registered itself */ | 505 | /* A driver registered itself */ |
506 | #define FB_EVENT_FB_REGISTERED 0x05 | 506 | #define FB_EVENT_FB_REGISTERED 0x05 |
507 | /* A driver unregistered itself */ | ||
508 | #define FB_EVENT_FB_UNREGISTERED 0x06 | ||
507 | /* CONSOLE-SPECIFIC: get console to framebuffer mapping */ | 509 | /* CONSOLE-SPECIFIC: get console to framebuffer mapping */ |
508 | #define FB_EVENT_GET_CONSOLE_MAP 0x06 | 510 | #define FB_EVENT_GET_CONSOLE_MAP 0x07 |
509 | /* CONSOLE-SPECIFIC: set console to framebuffer mapping */ | 511 | /* CONSOLE-SPECIFIC: set console to framebuffer mapping */ |
510 | #define FB_EVENT_SET_CONSOLE_MAP 0x07 | 512 | #define FB_EVENT_SET_CONSOLE_MAP 0x08 |
511 | /* A display blank is requested */ | 513 | /* A display blank is requested */ |
512 | #define FB_EVENT_BLANK 0x08 | 514 | #define FB_EVENT_BLANK 0x09 |
513 | /* Private modelist is to be replaced */ | 515 | /* Private modelist is to be replaced */ |
514 | #define FB_EVENT_NEW_MODELIST 0x09 | 516 | #define FB_EVENT_NEW_MODELIST 0x0A |
515 | /* The resolution of the passed in fb_info about to change and | 517 | /* The resolution of the passed in fb_info about to change and |
516 | all vc's should be changed */ | 518 | all vc's should be changed */ |
517 | #define FB_EVENT_MODE_CHANGE_ALL 0x0A | 519 | #define FB_EVENT_MODE_CHANGE_ALL 0x0B |
518 | /* CONSOLE-SPECIFIC: set console rotation */ | ||
519 | #define FB_EVENT_SET_CON_ROTATE 0x0B | ||
520 | /* CONSOLE-SPECIFIC: get console rotation */ | ||
521 | #define FB_EVENT_GET_CON_ROTATE 0x0C | ||
522 | /* CONSOLE-SPECIFIC: rotate all consoles */ | ||
523 | #define FB_EVENT_SET_CON_ROTATE_ALL 0x0D | ||
524 | 520 | ||
525 | struct fb_event { | 521 | struct fb_event { |
526 | struct fb_info *info; | 522 | struct fb_info *info; |
@@ -892,7 +888,6 @@ extern int fb_get_color_depth(struct fb_var_screeninfo *var, | |||
892 | struct fb_fix_screeninfo *fix); | 888 | struct fb_fix_screeninfo *fix); |
893 | extern int fb_get_options(char *name, char **option); | 889 | extern int fb_get_options(char *name, char **option); |
894 | extern int fb_new_modelist(struct fb_info *info); | 890 | extern int fb_new_modelist(struct fb_info *info); |
895 | extern int fb_con_duit(struct fb_info *info, int event, void *data); | ||
896 | 891 | ||
897 | extern struct fb_info *registered_fb[FB_MAX]; | 892 | extern struct fb_info *registered_fb[FB_MAX]; |
898 | extern int num_registered_fb; | 893 | extern int num_registered_fb; |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 2d8b348c11..e04a5cfe87 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -392,7 +392,7 @@ struct address_space { | |||
392 | unsigned int truncate_count; /* Cover race condition with truncate */ | 392 | unsigned int truncate_count; /* Cover race condition with truncate */ |
393 | unsigned long nrpages; /* number of total pages */ | 393 | unsigned long nrpages; /* number of total pages */ |
394 | pgoff_t writeback_index;/* writeback starts here */ | 394 | pgoff_t writeback_index;/* writeback starts here */ |
395 | struct address_space_operations *a_ops; /* methods */ | 395 | const struct address_space_operations *a_ops; /* methods */ |
396 | unsigned long flags; /* error bits/gfp mask */ | 396 | unsigned long flags; /* error bits/gfp mask */ |
397 | struct backing_dev_info *backing_dev_info; /* device readahead, etc */ | 397 | struct backing_dev_info *backing_dev_info; /* device readahead, etc */ |
398 | spinlock_t private_lock; /* for use by the address_space */ | 398 | spinlock_t private_lock; /* for use by the address_space */ |
@@ -1405,7 +1405,7 @@ extern void bd_forget(struct inode *inode); | |||
1405 | extern void bdput(struct block_device *); | 1405 | extern void bdput(struct block_device *); |
1406 | extern struct block_device *open_by_devnum(dev_t, unsigned); | 1406 | extern struct block_device *open_by_devnum(dev_t, unsigned); |
1407 | extern const struct file_operations def_blk_fops; | 1407 | extern const struct file_operations def_blk_fops; |
1408 | extern struct address_space_operations def_blk_aops; | 1408 | extern const struct address_space_operations def_blk_aops; |
1409 | extern const struct file_operations def_chr_fops; | 1409 | extern const struct file_operations def_chr_fops; |
1410 | extern const struct file_operations bad_sock_fops; | 1410 | extern const struct file_operations bad_sock_fops; |
1411 | extern const struct file_operations def_fifo_fops; | 1411 | extern const struct file_operations def_fifo_fops; |
diff --git a/include/linux/futex.h b/include/linux/futex.h index 966a5b3da4..34c3a215f2 100644 --- a/include/linux/futex.h +++ b/include/linux/futex.h | |||
@@ -12,6 +12,9 @@ | |||
12 | #define FUTEX_REQUEUE 3 | 12 | #define FUTEX_REQUEUE 3 |
13 | #define FUTEX_CMP_REQUEUE 4 | 13 | #define FUTEX_CMP_REQUEUE 4 |
14 | #define FUTEX_WAKE_OP 5 | 14 | #define FUTEX_WAKE_OP 5 |
15 | #define FUTEX_LOCK_PI 6 | ||
16 | #define FUTEX_UNLOCK_PI 7 | ||
17 | #define FUTEX_TRYLOCK_PI 8 | ||
15 | 18 | ||
16 | /* | 19 | /* |
17 | * Support for robust futexes: the kernel cleans up held futexes at | 20 | * Support for robust futexes: the kernel cleans up held futexes at |
@@ -90,18 +93,21 @@ struct robust_list_head { | |||
90 | */ | 93 | */ |
91 | #define ROBUST_LIST_LIMIT 2048 | 94 | #define ROBUST_LIST_LIMIT 2048 |
92 | 95 | ||
93 | long do_futex(unsigned long uaddr, int op, int val, | 96 | long do_futex(u32 __user *uaddr, int op, u32 val, unsigned long timeout, |
94 | unsigned long timeout, unsigned long uaddr2, int val2, | 97 | u32 __user *uaddr2, u32 val2, u32 val3); |
95 | int val3); | ||
96 | 98 | ||
97 | extern int handle_futex_death(u32 __user *uaddr, struct task_struct *curr); | 99 | extern int handle_futex_death(u32 __user *uaddr, struct task_struct *curr); |
98 | 100 | ||
99 | #ifdef CONFIG_FUTEX | 101 | #ifdef CONFIG_FUTEX |
100 | extern void exit_robust_list(struct task_struct *curr); | 102 | extern void exit_robust_list(struct task_struct *curr); |
103 | extern void exit_pi_state_list(struct task_struct *curr); | ||
101 | #else | 104 | #else |
102 | static inline void exit_robust_list(struct task_struct *curr) | 105 | static inline void exit_robust_list(struct task_struct *curr) |
103 | { | 106 | { |
104 | } | 107 | } |
108 | static inline void exit_pi_state_list(struct task_struct *curr) | ||
109 | { | ||
110 | } | ||
105 | #endif | 111 | #endif |
106 | 112 | ||
107 | #define FUTEX_OP_SET 0 /* *(int *)UADDR2 = OPARG; */ | 113 | #define FUTEX_OP_SET 0 /* *(int *)UADDR2 = OPARG; */ |
diff --git a/include/linux/hw_random.h b/include/linux/hw_random.h new file mode 100644 index 0000000000..21ea7610e1 --- /dev/null +++ b/include/linux/hw_random.h | |||
@@ -0,0 +1,50 @@ | |||
1 | /* | ||
2 | Hardware Random Number Generator | ||
3 | |||
4 | Please read Documentation/hw_random.txt for details on use. | ||
5 | |||
6 | ---------------------------------------------------------- | ||
7 | This software may be used and distributed according to the terms | ||
8 | of the GNU General Public License, incorporated herein by reference. | ||
9 | |||
10 | */ | ||
11 | |||
12 | #ifndef LINUX_HWRANDOM_H_ | ||
13 | #define LINUX_HWRANDOM_H_ | ||
14 | #ifdef __KERNEL__ | ||
15 | |||
16 | #include <linux/types.h> | ||
17 | #include <linux/list.h> | ||
18 | |||
19 | /** | ||
20 | * struct hwrng - Hardware Random Number Generator driver | ||
21 | * @name: Unique RNG name. | ||
22 | * @init: Initialization callback (can be NULL). | ||
23 | * @cleanup: Cleanup callback (can be NULL). | ||
24 | * @data_present: Callback to determine if data is available | ||
25 | * on the RNG. If NULL, it is assumed that | ||
26 | * there is always data available. | ||
27 | * @data_read: Read data from the RNG device. | ||
28 | * Returns the number of lower random bytes in "data". | ||
29 | * Must not be NULL. | ||
30 | * @priv: Private data, for use by the RNG driver. | ||
31 | */ | ||
32 | struct hwrng { | ||
33 | const char *name; | ||
34 | int (*init)(struct hwrng *rng); | ||
35 | void (*cleanup)(struct hwrng *rng); | ||
36 | int (*data_present)(struct hwrng *rng); | ||
37 | int (*data_read)(struct hwrng *rng, u32 *data); | ||
38 | unsigned long priv; | ||
39 | |||
40 | /* internal. */ | ||
41 | struct list_head list; | ||
42 | }; | ||
43 | |||
44 | /** Register a new Hardware Random Number Generator driver. */ | ||
45 | extern int hwrng_register(struct hwrng *rng); | ||
46 | /** Unregister a Hardware Random Number Generator driver. */ | ||
47 | extern void hwrng_unregister(struct hwrng *rng); | ||
48 | |||
49 | #endif /* __KERNEL__ */ | ||
50 | #endif /* LINUX_HWRANDOM_H_ */ | ||
diff --git a/include/linux/ide.h b/include/linux/ide.h index ef7bef207f..0c100168c0 100644 --- a/include/linux/ide.h +++ b/include/linux/ide.h | |||
@@ -793,6 +793,7 @@ typedef struct hwif_s { | |||
793 | unsigned auto_poll : 1; /* supports nop auto-poll */ | 793 | unsigned auto_poll : 1; /* supports nop auto-poll */ |
794 | unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */ | 794 | unsigned sg_mapped : 1; /* sg_table and sg_nents are ready */ |
795 | unsigned no_io_32bit : 1; /* 1 = can not do 32-bit IO ops */ | 795 | unsigned no_io_32bit : 1; /* 1 = can not do 32-bit IO ops */ |
796 | unsigned err_stops_fifo : 1; /* 1=data FIFO is cleared by an error */ | ||
796 | 797 | ||
797 | struct device gendev; | 798 | struct device gendev; |
798 | struct completion gendev_rel_comp; /* To deal with device release() */ | 799 | struct completion gendev_rel_comp; /* To deal with device release() */ |
diff --git a/include/linux/idr.h b/include/linux/idr.h index d37c8d808b..f559a719db 100644 --- a/include/linux/idr.h +++ b/include/linux/idr.h | |||
@@ -78,6 +78,7 @@ void *idr_find(struct idr *idp, int id); | |||
78 | int idr_pre_get(struct idr *idp, gfp_t gfp_mask); | 78 | int idr_pre_get(struct idr *idp, gfp_t gfp_mask); |
79 | int idr_get_new(struct idr *idp, void *ptr, int *id); | 79 | int idr_get_new(struct idr *idp, void *ptr, int *id); |
80 | int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id); | 80 | int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id); |
81 | void *idr_replace(struct idr *idp, void *ptr, int id); | ||
81 | void idr_remove(struct idr *idp, int id); | 82 | void idr_remove(struct idr *idp, int id); |
82 | void idr_destroy(struct idr *idp); | 83 | void idr_destroy(struct idr *idp); |
83 | void idr_init(struct idr *idp); | 84 | void idr_init(struct idr *idp); |
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 41ecbb847f..3a256957fb 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -87,6 +87,7 @@ extern struct group_info init_groups; | |||
87 | .lock_depth = -1, \ | 87 | .lock_depth = -1, \ |
88 | .prio = MAX_PRIO-20, \ | 88 | .prio = MAX_PRIO-20, \ |
89 | .static_prio = MAX_PRIO-20, \ | 89 | .static_prio = MAX_PRIO-20, \ |
90 | .normal_prio = MAX_PRIO-20, \ | ||
90 | .policy = SCHED_NORMAL, \ | 91 | .policy = SCHED_NORMAL, \ |
91 | .cpus_allowed = CPU_MASK_ALL, \ | 92 | .cpus_allowed = CPU_MASK_ALL, \ |
92 | .mm = NULL, \ | 93 | .mm = NULL, \ |
@@ -119,10 +120,11 @@ extern struct group_info init_groups; | |||
119 | .signal = {{0}}}, \ | 120 | .signal = {{0}}}, \ |
120 | .blocked = {{0}}, \ | 121 | .blocked = {{0}}, \ |
121 | .alloc_lock = SPIN_LOCK_UNLOCKED, \ | 122 | .alloc_lock = SPIN_LOCK_UNLOCKED, \ |
122 | .proc_lock = SPIN_LOCK_UNLOCKED, \ | ||
123 | .journal_info = NULL, \ | 123 | .journal_info = NULL, \ |
124 | .cpu_timers = INIT_CPU_TIMERS(tsk.cpu_timers), \ | 124 | .cpu_timers = INIT_CPU_TIMERS(tsk.cpu_timers), \ |
125 | .fs_excl = ATOMIC_INIT(0), \ | 125 | .fs_excl = ATOMIC_INIT(0), \ |
126 | .pi_lock = SPIN_LOCK_UNLOCKED, \ | ||
127 | INIT_RT_MUTEXES(tsk) \ | ||
126 | } | 128 | } |
127 | 129 | ||
128 | 130 | ||
diff --git a/include/linux/input.h b/include/linux/input.h index b32c2b6e53..56f1e0e1e5 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -232,7 +232,8 @@ struct input_absinfo { | |||
232 | #define KEY_PAUSE 119 | 232 | #define KEY_PAUSE 119 |
233 | 233 | ||
234 | #define KEY_KPCOMMA 121 | 234 | #define KEY_KPCOMMA 121 |
235 | #define KEY_HANGUEL 122 | 235 | #define KEY_HANGEUL 122 |
236 | #define KEY_HANGUEL KEY_HANGEUL | ||
236 | #define KEY_HANJA 123 | 237 | #define KEY_HANJA 123 |
237 | #define KEY_YEN 124 | 238 | #define KEY_YEN 124 |
238 | #define KEY_LEFTMETA 125 | 239 | #define KEY_LEFTMETA 125 |
@@ -1005,6 +1006,7 @@ static inline void init_input_dev(struct input_dev *dev) | |||
1005 | } | 1006 | } |
1006 | 1007 | ||
1007 | struct input_dev *input_allocate_device(void); | 1008 | struct input_dev *input_allocate_device(void); |
1009 | void input_free_device(struct input_dev *dev); | ||
1008 | 1010 | ||
1009 | static inline struct input_dev *input_get_device(struct input_dev *dev) | 1011 | static inline struct input_dev *input_get_device(struct input_dev *dev) |
1010 | { | 1012 | { |
@@ -1016,12 +1018,6 @@ static inline void input_put_device(struct input_dev *dev) | |||
1016 | class_device_put(&dev->cdev); | 1018 | class_device_put(&dev->cdev); |
1017 | } | 1019 | } |
1018 | 1020 | ||
1019 | static inline void input_free_device(struct input_dev *dev) | ||
1020 | { | ||
1021 | if (dev) | ||
1022 | input_put_device(dev); | ||
1023 | } | ||
1024 | |||
1025 | int input_register_device(struct input_dev *); | 1021 | int input_register_device(struct input_dev *); |
1026 | void input_unregister_device(struct input_dev *); | 1022 | void input_unregister_device(struct input_dev *); |
1027 | 1023 | ||
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 70741e1701..db2a63a116 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
@@ -36,6 +36,20 @@ extern void free_irq(unsigned int, void *); | |||
36 | extern void disable_irq_nosync(unsigned int irq); | 36 | extern void disable_irq_nosync(unsigned int irq); |
37 | extern void disable_irq(unsigned int irq); | 37 | extern void disable_irq(unsigned int irq); |
38 | extern void enable_irq(unsigned int irq); | 38 | extern void enable_irq(unsigned int irq); |
39 | |||
40 | /* IRQ wakeup (PM) control: */ | ||
41 | extern int set_irq_wake(unsigned int irq, unsigned int on); | ||
42 | |||
43 | static inline int enable_irq_wake(unsigned int irq) | ||
44 | { | ||
45 | return set_irq_wake(irq, 1); | ||
46 | } | ||
47 | |||
48 | static inline int disable_irq_wake(unsigned int irq) | ||
49 | { | ||
50 | return set_irq_wake(irq, 0); | ||
51 | } | ||
52 | |||
39 | #endif | 53 | #endif |
40 | 54 | ||
41 | #ifndef __ARCH_SET_SOFTIRQ_PENDING | 55 | #ifndef __ARCH_SET_SOFTIRQ_PENDING |
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index cd6bd001ba..87a9fc039b 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
@@ -9,13 +9,15 @@ | |||
9 | #define _LINUX_IOPORT_H | 9 | #define _LINUX_IOPORT_H |
10 | 10 | ||
11 | #include <linux/compiler.h> | 11 | #include <linux/compiler.h> |
12 | #include <linux/types.h> | ||
12 | /* | 13 | /* |
13 | * Resources are tree-like, allowing | 14 | * Resources are tree-like, allowing |
14 | * nesting etc.. | 15 | * nesting etc.. |
15 | */ | 16 | */ |
16 | struct resource { | 17 | struct resource { |
18 | resource_size_t start; | ||
19 | resource_size_t end; | ||
17 | const char *name; | 20 | const char *name; |
18 | unsigned long start, end; | ||
19 | unsigned long flags; | 21 | unsigned long flags; |
20 | struct resource *parent, *sibling, *child; | 22 | struct resource *parent, *sibling, *child; |
21 | }; | 23 | }; |
@@ -96,31 +98,37 @@ extern struct resource * ____request_resource(struct resource *root, struct reso | |||
96 | extern int release_resource(struct resource *new); | 98 | extern int release_resource(struct resource *new); |
97 | extern __deprecated_for_modules int insert_resource(struct resource *parent, struct resource *new); | 99 | extern __deprecated_for_modules int insert_resource(struct resource *parent, struct resource *new); |
98 | extern int allocate_resource(struct resource *root, struct resource *new, | 100 | extern int allocate_resource(struct resource *root, struct resource *new, |
99 | unsigned long size, | 101 | resource_size_t size, resource_size_t min, |
100 | unsigned long min, unsigned long max, | 102 | resource_size_t max, resource_size_t align, |
101 | unsigned long align, | ||
102 | void (*alignf)(void *, struct resource *, | 103 | void (*alignf)(void *, struct resource *, |
103 | unsigned long, unsigned long), | 104 | resource_size_t, resource_size_t), |
104 | void *alignf_data); | 105 | void *alignf_data); |
105 | int adjust_resource(struct resource *res, unsigned long start, | 106 | int adjust_resource(struct resource *res, resource_size_t start, |
106 | unsigned long size); | 107 | resource_size_t size); |
108 | |||
109 | /* get registered SYSTEM_RAM resources in specified area */ | ||
110 | extern int find_next_system_ram(struct resource *res); | ||
107 | 111 | ||
108 | /* Convenience shorthand with allocation */ | 112 | /* Convenience shorthand with allocation */ |
109 | #define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name)) | 113 | #define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name)) |
110 | #define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name)) | 114 | #define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name)) |
111 | #define rename_region(region, newname) do { (region)->name = (newname); } while (0) | 115 | #define rename_region(region, newname) do { (region)->name = (newname); } while (0) |
112 | 116 | ||
113 | extern struct resource * __request_region(struct resource *, unsigned long start, unsigned long n, const char *name); | 117 | extern struct resource * __request_region(struct resource *, |
118 | resource_size_t start, | ||
119 | resource_size_t n, const char *name); | ||
114 | 120 | ||
115 | /* Compatibility cruft */ | 121 | /* Compatibility cruft */ |
116 | #define release_region(start,n) __release_region(&ioport_resource, (start), (n)) | 122 | #define release_region(start,n) __release_region(&ioport_resource, (start), (n)) |
117 | #define check_mem_region(start,n) __check_region(&iomem_resource, (start), (n)) | 123 | #define check_mem_region(start,n) __check_region(&iomem_resource, (start), (n)) |
118 | #define release_mem_region(start,n) __release_region(&iomem_resource, (start), (n)) | 124 | #define release_mem_region(start,n) __release_region(&iomem_resource, (start), (n)) |
119 | 125 | ||
120 | extern int __check_region(struct resource *, unsigned long, unsigned long); | 126 | extern int __check_region(struct resource *, resource_size_t, resource_size_t); |
121 | extern void __release_region(struct resource *, unsigned long, unsigned long); | 127 | extern void __release_region(struct resource *, resource_size_t, |
128 | resource_size_t); | ||
122 | 129 | ||
123 | static inline int __deprecated check_region(unsigned long s, unsigned long n) | 130 | static inline int __deprecated check_region(resource_size_t s, |
131 | resource_size_t n) | ||
124 | { | 132 | { |
125 | return __check_region(&ioport_resource, s, n); | 133 | return __check_region(&ioport_resource, s, n); |
126 | } | 134 | } |
diff --git a/include/linux/ipmi.h b/include/linux/ipmi.h index 5653b2f23b..d09fbeabf1 100644 --- a/include/linux/ipmi.h +++ b/include/linux/ipmi.h | |||
@@ -210,11 +210,7 @@ struct kernel_ipmi_msg | |||
210 | #include <linux/list.h> | 210 | #include <linux/list.h> |
211 | #include <linux/module.h> | 211 | #include <linux/module.h> |
212 | #include <linux/device.h> | 212 | #include <linux/device.h> |
213 | |||
214 | #ifdef CONFIG_PROC_FS | ||
215 | #include <linux/proc_fs.h> | 213 | #include <linux/proc_fs.h> |
216 | extern struct proc_dir_entry *proc_ipmi_root; | ||
217 | #endif /* CONFIG_PROC_FS */ | ||
218 | 214 | ||
219 | /* Opaque type for a IPMI message user. One of these is needed to | 215 | /* Opaque type for a IPMI message user. One of these is needed to |
220 | send and receive messages. */ | 216 | send and receive messages. */ |
diff --git a/include/linux/irq.h b/include/linux/irq.h index 676e00dfb2..0832149cdb 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -1,5 +1,5 @@ | |||
1 | #ifndef __irq_h | 1 | #ifndef _LINUX_IRQ_H |
2 | #define __irq_h | 2 | #define _LINUX_IRQ_H |
3 | 3 | ||
4 | /* | 4 | /* |
5 | * Please do not include this file in generic code. There is currently | 5 | * Please do not include this file in generic code. There is currently |
@@ -11,7 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/smp.h> | 12 | #include <linux/smp.h> |
13 | 13 | ||
14 | #if !defined(CONFIG_S390) | 14 | #ifndef CONFIG_S390 |
15 | 15 | ||
16 | #include <linux/linkage.h> | 16 | #include <linux/linkage.h> |
17 | #include <linux/cache.h> | 17 | #include <linux/cache.h> |
@@ -33,75 +33,160 @@ | |||
33 | #define IRQ_WAITING 32 /* IRQ not yet seen - for autodetection */ | 33 | #define IRQ_WAITING 32 /* IRQ not yet seen - for autodetection */ |
34 | #define IRQ_LEVEL 64 /* IRQ level triggered */ | 34 | #define IRQ_LEVEL 64 /* IRQ level triggered */ |
35 | #define IRQ_MASKED 128 /* IRQ masked - shouldn't be seen again */ | 35 | #define IRQ_MASKED 128 /* IRQ masked - shouldn't be seen again */ |
36 | #if defined(ARCH_HAS_IRQ_PER_CPU) | 36 | #ifdef CONFIG_IRQ_PER_CPU |
37 | # define IRQ_PER_CPU 256 /* IRQ is per CPU */ | 37 | # define IRQ_PER_CPU 256 /* IRQ is per CPU */ |
38 | # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) | 38 | # define CHECK_IRQ_PER_CPU(var) ((var) & IRQ_PER_CPU) |
39 | #else | 39 | #else |
40 | # define CHECK_IRQ_PER_CPU(var) 0 | 40 | # define CHECK_IRQ_PER_CPU(var) 0 |
41 | #endif | 41 | #endif |
42 | 42 | ||
43 | #define IRQ_NOPROBE 512 /* IRQ is not valid for probing */ | ||
44 | #define IRQ_NOREQUEST 1024 /* IRQ cannot be requested */ | ||
45 | #define IRQ_NOAUTOEN 2048 /* IRQ will not be enabled on request irq */ | ||
46 | #define IRQ_DELAYED_DISABLE \ | ||
47 | 4096 /* IRQ disable (masking) happens delayed. */ | ||
48 | |||
43 | /* | 49 | /* |
44 | * Interrupt controller descriptor. This is all we need | 50 | * IRQ types, see also include/linux/interrupt.h |
45 | * to describe about the low-level hardware. | ||
46 | */ | 51 | */ |
47 | struct hw_interrupt_type { | 52 | #define IRQ_TYPE_NONE 0x0000 /* Default, unspecified type */ |
48 | const char * typename; | 53 | #define IRQ_TYPE_EDGE_RISING 0x0001 /* Edge rising type */ |
49 | unsigned int (*startup)(unsigned int irq); | 54 | #define IRQ_TYPE_EDGE_FALLING 0x0002 /* Edge falling type */ |
50 | void (*shutdown)(unsigned int irq); | 55 | #define IRQ_TYPE_EDGE_BOTH (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING) |
51 | void (*enable)(unsigned int irq); | 56 | #define IRQ_TYPE_LEVEL_HIGH 0x0004 /* Level high type */ |
52 | void (*disable)(unsigned int irq); | 57 | #define IRQ_TYPE_LEVEL_LOW 0x0008 /* Level low type */ |
53 | void (*ack)(unsigned int irq); | 58 | #define IRQ_TYPE_SENSE_MASK 0x000f /* Mask of the above */ |
54 | void (*end)(unsigned int irq); | 59 | #define IRQ_TYPE_SIMPLE 0x0010 /* Simple type */ |
55 | void (*set_affinity)(unsigned int irq, cpumask_t dest); | 60 | #define IRQ_TYPE_PERCPU 0x0020 /* Per CPU type */ |
61 | #define IRQ_TYPE_PROBE 0x0040 /* Probing in progress */ | ||
62 | |||
63 | struct proc_dir_entry; | ||
64 | |||
65 | /** | ||
66 | * struct irq_chip - hardware interrupt chip descriptor | ||
67 | * | ||
68 | * @name: name for /proc/interrupts | ||
69 | * @startup: start up the interrupt (defaults to ->enable if NULL) | ||
70 | * @shutdown: shut down the interrupt (defaults to ->disable if NULL) | ||
71 | * @enable: enable the interrupt (defaults to chip->unmask if NULL) | ||
72 | * @disable: disable the interrupt (defaults to chip->mask if NULL) | ||
73 | * @ack: start of a new interrupt | ||
74 | * @mask: mask an interrupt source | ||
75 | * @mask_ack: ack and mask an interrupt source | ||
76 | * @unmask: unmask an interrupt source | ||
77 | * @eoi: end of interrupt - chip level | ||
78 | * @end: end of interrupt - flow level | ||
79 | * @set_affinity: set the CPU affinity on SMP machines | ||
80 | * @retrigger: resend an IRQ to the CPU | ||
81 | * @set_type: set the flow type (IRQ_TYPE_LEVEL/etc.) of an IRQ | ||
82 | * @set_wake: enable/disable power-management wake-on of an IRQ | ||
83 | * | ||
84 | * @release: release function solely used by UML | ||
85 | * @typename: obsoleted by name, kept as migration helper | ||
86 | */ | ||
87 | struct irq_chip { | ||
88 | const char *name; | ||
89 | unsigned int (*startup)(unsigned int irq); | ||
90 | void (*shutdown)(unsigned int irq); | ||
91 | void (*enable)(unsigned int irq); | ||
92 | void (*disable)(unsigned int irq); | ||
93 | |||
94 | void (*ack)(unsigned int irq); | ||
95 | void (*mask)(unsigned int irq); | ||
96 | void (*mask_ack)(unsigned int irq); | ||
97 | void (*unmask)(unsigned int irq); | ||
98 | void (*eoi)(unsigned int irq); | ||
99 | |||
100 | void (*end)(unsigned int irq); | ||
101 | void (*set_affinity)(unsigned int irq, cpumask_t dest); | ||
102 | int (*retrigger)(unsigned int irq); | ||
103 | int (*set_type)(unsigned int irq, unsigned int flow_type); | ||
104 | int (*set_wake)(unsigned int irq, unsigned int on); | ||
105 | |||
56 | /* Currently used only by UML, might disappear one day.*/ | 106 | /* Currently used only by UML, might disappear one day.*/ |
57 | #ifdef CONFIG_IRQ_RELEASE_METHOD | 107 | #ifdef CONFIG_IRQ_RELEASE_METHOD |
58 | void (*release)(unsigned int irq, void *dev_id); | 108 | void (*release)(unsigned int irq, void *dev_id); |
59 | #endif | 109 | #endif |
110 | /* | ||
111 | * For compatibility, ->typename is copied into ->name. | ||
112 | * Will disappear. | ||
113 | */ | ||
114 | const char *typename; | ||
60 | }; | 115 | }; |
61 | 116 | ||
62 | typedef struct hw_interrupt_type hw_irq_controller; | 117 | /** |
63 | 118 | * struct irq_desc - interrupt descriptor | |
64 | /* | 119 | * |
65 | * This is the "IRQ descriptor", which contains various information | 120 | * @handle_irq: highlevel irq-events handler [if NULL, __do_IRQ()] |
66 | * about the irq, including what kind of hardware handling it has, | 121 | * @chip: low level interrupt hardware access |
67 | * whether it is disabled etc etc. | 122 | * @handler_data: per-IRQ data for the irq_chip methods |
123 | * @chip_data: platform-specific per-chip private data for the chip | ||
124 | * methods, to allow shared chip implementations | ||
125 | * @action: the irq action chain | ||
126 | * @status: status information | ||
127 | * @depth: disable-depth, for nested irq_disable() calls | ||
128 | * @irq_count: stats field to detect stalled irqs | ||
129 | * @irqs_unhandled: stats field for spurious unhandled interrupts | ||
130 | * @lock: locking for SMP | ||
131 | * @affinity: IRQ affinity on SMP | ||
132 | * @cpu: cpu index useful for balancing | ||
133 | * @pending_mask: pending rebalanced interrupts | ||
134 | * @move_irq: need to re-target IRQ destination | ||
135 | * @dir: /proc/irq/ procfs entry | ||
136 | * @affinity_entry: /proc/irq/smp_affinity procfs entry on SMP | ||
68 | * | 137 | * |
69 | * Pad this out to 32 bytes for cache and indexing reasons. | 138 | * Pad this out to 32 bytes for cache and indexing reasons. |
70 | */ | 139 | */ |
71 | typedef struct irq_desc { | 140 | struct irq_desc { |
72 | hw_irq_controller *handler; | 141 | void fastcall (*handle_irq)(unsigned int irq, |
73 | void *handler_data; | 142 | struct irq_desc *desc, |
74 | struct irqaction *action; /* IRQ action list */ | 143 | struct pt_regs *regs); |
75 | unsigned int status; /* IRQ status */ | 144 | struct irq_chip *chip; |
76 | unsigned int depth; /* nested irq disables */ | 145 | void *handler_data; |
77 | unsigned int irq_count; /* For detecting broken interrupts */ | 146 | void *chip_data; |
78 | unsigned int irqs_unhandled; | 147 | struct irqaction *action; /* IRQ action list */ |
79 | spinlock_t lock; | 148 | unsigned int status; /* IRQ status */ |
80 | #if defined (CONFIG_GENERIC_PENDING_IRQ) || defined (CONFIG_IRQBALANCE) | 149 | |
81 | unsigned int move_irq; /* Flag need to re-target intr dest*/ | 150 | unsigned int depth; /* nested irq disables */ |
151 | unsigned int irq_count; /* For detecting broken IRQs */ | ||
152 | unsigned int irqs_unhandled; | ||
153 | spinlock_t lock; | ||
154 | #ifdef CONFIG_SMP | ||
155 | cpumask_t affinity; | ||
156 | unsigned int cpu; | ||
157 | #endif | ||
158 | #if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE) | ||
159 | cpumask_t pending_mask; | ||
160 | unsigned int move_irq; /* need to re-target IRQ dest */ | ||
82 | #endif | 161 | #endif |
83 | } ____cacheline_aligned irq_desc_t; | 162 | #ifdef CONFIG_PROC_FS |
163 | struct proc_dir_entry *dir; | ||
164 | #endif | ||
165 | } ____cacheline_aligned; | ||
84 | 166 | ||
85 | extern irq_desc_t irq_desc [NR_IRQS]; | 167 | extern struct irq_desc irq_desc[NR_IRQS]; |
86 | 168 | ||
87 | /* Return a pointer to the irq descriptor for IRQ. */ | 169 | /* |
88 | static inline irq_desc_t * | 170 | * Migration helpers for obsolete names, they will go away: |
89 | irq_descp (int irq) | 171 | */ |
90 | { | 172 | #define hw_interrupt_type irq_chip |
91 | return irq_desc + irq; | 173 | typedef struct irq_chip hw_irq_controller; |
92 | } | 174 | #define no_irq_type no_irq_chip |
175 | typedef struct irq_desc irq_desc_t; | ||
93 | 176 | ||
94 | #include <asm/hw_irq.h> /* the arch dependent stuff */ | 177 | /* |
178 | * Pick up the arch-dependent methods: | ||
179 | */ | ||
180 | #include <asm/hw_irq.h> | ||
95 | 181 | ||
96 | extern int setup_irq(unsigned int irq, struct irqaction * new); | 182 | extern int setup_irq(unsigned int irq, struct irqaction *new); |
97 | 183 | ||
98 | #ifdef CONFIG_GENERIC_HARDIRQS | 184 | #ifdef CONFIG_GENERIC_HARDIRQS |
99 | extern cpumask_t irq_affinity[NR_IRQS]; | ||
100 | 185 | ||
101 | #ifdef CONFIG_SMP | 186 | #ifdef CONFIG_SMP |
102 | static inline void set_native_irq_info(int irq, cpumask_t mask) | 187 | static inline void set_native_irq_info(int irq, cpumask_t mask) |
103 | { | 188 | { |
104 | irq_affinity[irq] = mask; | 189 | irq_desc[irq].affinity = mask; |
105 | } | 190 | } |
106 | #else | 191 | #else |
107 | static inline void set_native_irq_info(int irq, cpumask_t mask) | 192 | static inline void set_native_irq_info(int irq, cpumask_t mask) |
@@ -111,8 +196,7 @@ static inline void set_native_irq_info(int irq, cpumask_t mask) | |||
111 | 196 | ||
112 | #ifdef CONFIG_SMP | 197 | #ifdef CONFIG_SMP |
113 | 198 | ||
114 | #if defined (CONFIG_GENERIC_PENDING_IRQ) || defined (CONFIG_IRQBALANCE) | 199 | #if defined(CONFIG_GENERIC_PENDING_IRQ) || defined(CONFIG_IRQBALANCE) |
115 | extern cpumask_t pending_irq_cpumask[NR_IRQS]; | ||
116 | 200 | ||
117 | void set_pending_irq(unsigned int irq, cpumask_t mask); | 201 | void set_pending_irq(unsigned int irq, cpumask_t mask); |
118 | void move_native_irq(int irq); | 202 | void move_native_irq(int irq); |
@@ -133,7 +217,7 @@ static inline void set_irq_info(int irq, cpumask_t mask) | |||
133 | { | 217 | { |
134 | } | 218 | } |
135 | 219 | ||
136 | #else // CONFIG_PCI_MSI | 220 | #else /* CONFIG_PCI_MSI */ |
137 | 221 | ||
138 | static inline void move_irq(int irq) | 222 | static inline void move_irq(int irq) |
139 | { | 223 | { |
@@ -144,26 +228,36 @@ static inline void set_irq_info(int irq, cpumask_t mask) | |||
144 | { | 228 | { |
145 | set_native_irq_info(irq, mask); | 229 | set_native_irq_info(irq, mask); |
146 | } | 230 | } |
147 | #endif // CONFIG_PCI_MSI | ||
148 | 231 | ||
149 | #else // CONFIG_GENERIC_PENDING_IRQ || CONFIG_IRQBALANCE | 232 | #endif /* CONFIG_PCI_MSI */ |
233 | |||
234 | #else /* CONFIG_GENERIC_PENDING_IRQ || CONFIG_IRQBALANCE */ | ||
235 | |||
236 | static inline void move_irq(int irq) | ||
237 | { | ||
238 | } | ||
239 | |||
240 | static inline void move_native_irq(int irq) | ||
241 | { | ||
242 | } | ||
243 | |||
244 | static inline void set_pending_irq(unsigned int irq, cpumask_t mask) | ||
245 | { | ||
246 | } | ||
150 | 247 | ||
151 | #define move_irq(x) | ||
152 | #define move_native_irq(x) | ||
153 | #define set_pending_irq(x,y) | ||
154 | static inline void set_irq_info(int irq, cpumask_t mask) | 248 | static inline void set_irq_info(int irq, cpumask_t mask) |
155 | { | 249 | { |
156 | set_native_irq_info(irq, mask); | 250 | set_native_irq_info(irq, mask); |
157 | } | 251 | } |
158 | 252 | ||
159 | #endif // CONFIG_GENERIC_PENDING_IRQ | 253 | #endif /* CONFIG_GENERIC_PENDING_IRQ */ |
160 | 254 | ||
161 | #else // CONFIG_SMP | 255 | #else /* CONFIG_SMP */ |
162 | 256 | ||
163 | #define move_irq(x) | 257 | #define move_irq(x) |
164 | #define move_native_irq(x) | 258 | #define move_native_irq(x) |
165 | 259 | ||
166 | #endif // CONFIG_SMP | 260 | #endif /* CONFIG_SMP */ |
167 | 261 | ||
168 | #ifdef CONFIG_IRQBALANCE | 262 | #ifdef CONFIG_IRQBALANCE |
169 | extern void set_balance_irq_affinity(unsigned int irq, cpumask_t mask); | 263 | extern void set_balance_irq_affinity(unsigned int irq, cpumask_t mask); |
@@ -173,32 +267,138 @@ static inline void set_balance_irq_affinity(unsigned int irq, cpumask_t mask) | |||
173 | } | 267 | } |
174 | #endif | 268 | #endif |
175 | 269 | ||
270 | #ifdef CONFIG_AUTO_IRQ_AFFINITY | ||
271 | extern int select_smp_affinity(unsigned int irq); | ||
272 | #else | ||
273 | static inline int select_smp_affinity(unsigned int irq) | ||
274 | { | ||
275 | return 1; | ||
276 | } | ||
277 | #endif | ||
278 | |||
176 | extern int no_irq_affinity; | 279 | extern int no_irq_affinity; |
177 | extern int noirqdebug_setup(char *str); | ||
178 | 280 | ||
179 | extern fastcall irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs, | 281 | /* Handle irq action chains: */ |
180 | struct irqaction *action); | 282 | extern int handle_IRQ_event(unsigned int irq, struct pt_regs *regs, |
283 | struct irqaction *action); | ||
284 | |||
285 | /* | ||
286 | * Built-in IRQ handlers for various IRQ types, | ||
287 | * callable via desc->chip->handle_irq() | ||
288 | */ | ||
289 | extern void fastcall | ||
290 | handle_level_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs); | ||
291 | extern void fastcall | ||
292 | handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc, | ||
293 | struct pt_regs *regs); | ||
294 | extern void fastcall | ||
295 | handle_edge_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs); | ||
296 | extern void fastcall | ||
297 | handle_simple_irq(unsigned int irq, struct irq_desc *desc, | ||
298 | struct pt_regs *regs); | ||
299 | extern void fastcall | ||
300 | handle_percpu_irq(unsigned int irq, struct irq_desc *desc, | ||
301 | struct pt_regs *regs); | ||
302 | extern void fastcall | ||
303 | handle_bad_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs); | ||
304 | |||
305 | /* | ||
306 | * Get a descriptive string for the highlevel handler, for | ||
307 | * /proc/interrupts output: | ||
308 | */ | ||
309 | extern const char * | ||
310 | handle_irq_name(void fastcall (*handle)(unsigned int, struct irq_desc *, | ||
311 | struct pt_regs *)); | ||
312 | |||
313 | /* | ||
314 | * Monolithic do_IRQ implementation. | ||
315 | * (is an explicit fastcall, because i386 4KSTACKS calls it from assembly) | ||
316 | */ | ||
181 | extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs); | 317 | extern fastcall unsigned int __do_IRQ(unsigned int irq, struct pt_regs *regs); |
182 | extern void note_interrupt(unsigned int irq, irq_desc_t *desc, | ||
183 | int action_ret, struct pt_regs *regs); | ||
184 | extern int can_request_irq(unsigned int irq, unsigned long irqflags); | ||
185 | 318 | ||
319 | /* | ||
320 | * Architectures call this to let the generic IRQ layer | ||
321 | * handle an interrupt. If the descriptor is attached to an | ||
322 | * irqchip-style controller then we call the ->handle_irq() handler, | ||
323 | * and it calls __do_IRQ() if it's attached to an irqtype-style controller. | ||
324 | */ | ||
325 | static inline void generic_handle_irq(unsigned int irq, struct pt_regs *regs) | ||
326 | { | ||
327 | struct irq_desc *desc = irq_desc + irq; | ||
328 | |||
329 | if (likely(desc->handle_irq)) | ||
330 | desc->handle_irq(irq, desc, regs); | ||
331 | else | ||
332 | __do_IRQ(irq, regs); | ||
333 | } | ||
334 | |||
335 | /* Handling of unhandled and spurious interrupts: */ | ||
336 | extern void note_interrupt(unsigned int irq, struct irq_desc *desc, | ||
337 | int action_ret, struct pt_regs *regs); | ||
338 | |||
339 | /* Resending of interrupts :*/ | ||
340 | void check_irq_resend(struct irq_desc *desc, unsigned int irq); | ||
341 | |||
342 | /* Initialize /proc/irq/ */ | ||
186 | extern void init_irq_proc(void); | 343 | extern void init_irq_proc(void); |
187 | 344 | ||
188 | #ifdef CONFIG_AUTO_IRQ_AFFINITY | 345 | /* Enable/disable irq debugging output: */ |
189 | extern int select_smp_affinity(unsigned int irq); | 346 | extern int noirqdebug_setup(char *str); |
190 | #else | 347 | |
191 | static inline int | 348 | /* Checks whether the interrupt can be requested by request_irq(): */ |
192 | select_smp_affinity(unsigned int irq) | 349 | extern int can_request_irq(unsigned int irq, unsigned long irqflags); |
350 | |||
351 | /* Dummy irq-chip implementation: */ | ||
352 | extern struct irq_chip no_irq_chip; | ||
353 | |||
354 | extern void | ||
355 | set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip, | ||
356 | void fastcall (*handle)(unsigned int, | ||
357 | struct irq_desc *, | ||
358 | struct pt_regs *)); | ||
359 | extern void | ||
360 | __set_irq_handler(unsigned int irq, | ||
361 | void fastcall (*handle)(unsigned int, struct irq_desc *, | ||
362 | struct pt_regs *), | ||
363 | int is_chained); | ||
364 | |||
365 | /* | ||
366 | * Set a highlevel flow handler for a given IRQ: | ||
367 | */ | ||
368 | static inline void | ||
369 | set_irq_handler(unsigned int irq, | ||
370 | void fastcall (*handle)(unsigned int, struct irq_desc *, | ||
371 | struct pt_regs *)) | ||
193 | { | 372 | { |
194 | return 1; | 373 | __set_irq_handler(irq, handle, 0); |
195 | } | 374 | } |
196 | #endif | ||
197 | 375 | ||
198 | #endif | 376 | /* |
377 | * Set a highlevel chained flow handler for a given IRQ. | ||
378 | * (a chained handler is automatically enabled and set to | ||
379 | * IRQ_NOREQUEST and IRQ_NOPROBE) | ||
380 | */ | ||
381 | static inline void | ||
382 | set_irq_chained_handler(unsigned int irq, | ||
383 | void fastcall (*handle)(unsigned int, struct irq_desc *, | ||
384 | struct pt_regs *)) | ||
385 | { | ||
386 | __set_irq_handler(irq, handle, 1); | ||
387 | } | ||
199 | 388 | ||
200 | extern hw_irq_controller no_irq_type; /* needed in every arch ? */ | 389 | /* Set/get chip/data for an IRQ: */ |
201 | 390 | ||
202 | #endif | 391 | extern int set_irq_chip(unsigned int irq, struct irq_chip *chip); |
392 | extern int set_irq_data(unsigned int irq, void *data); | ||
393 | extern int set_irq_chip_data(unsigned int irq, void *data); | ||
394 | extern int set_irq_type(unsigned int irq, unsigned int type); | ||
395 | |||
396 | #define get_irq_chip(irq) (irq_desc[irq].chip) | ||
397 | #define get_irq_chip_data(irq) (irq_desc[irq].chip_data) | ||
398 | #define get_irq_data(irq) (irq_desc[irq].handler_data) | ||
399 | |||
400 | #endif /* CONFIG_GENERIC_HARDIRQS */ | ||
401 | |||
402 | #endif /* !CONFIG_S390 */ | ||
203 | 403 | ||
204 | #endif /* __irq_h */ | 404 | #endif /* _LINUX_IRQ_H */ |
diff --git a/include/linux/isdn/tpam.h b/include/linux/isdn/tpam.h deleted file mode 100644 index d18dd0dc57..0000000000 --- a/include/linux/isdn/tpam.h +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | /* $Id: tpam.h,v 1.1.2.1 2001/06/08 08:23:46 kai Exp $ | ||
2 | * | ||
3 | * Turbo PAM ISDN driver for Linux. (Kernel Driver) | ||
4 | * | ||
5 | * Copyright 2001 Stelian Pop <stelian.pop@fr.alcove.com>, Alcôve | ||
6 | * | ||
7 | * For all support questions please contact: <support@auvertech.fr> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2, or (at your option) | ||
12 | * any later version. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | #ifndef _TPAM_H_ | ||
26 | #define _TPAM_H_ | ||
27 | |||
28 | #include <linux/types.h> | ||
29 | |||
30 | /* IOCTL commands */ | ||
31 | #define TPAM_CMD_DSPLOAD 0x0001 | ||
32 | #define TPAM_CMD_DSPSAVE 0x0002 | ||
33 | #define TPAM_CMD_DSPRUN 0x0003 | ||
34 | #define TPAM_CMD_LOOPMODEON 0x0004 | ||
35 | #define TPAM_CMD_LOOPMODEOFF 0x0005 | ||
36 | |||
37 | /* addresses of debug information zones on board */ | ||
38 | #define TPAM_TRAPAUDIT_REGISTER 0x005493e4 | ||
39 | #define TPAM_NCOAUDIT_REGISTER 0x00500000 | ||
40 | #define TPAM_MSGAUDIT_REGISTER 0x008E30F0 | ||
41 | |||
42 | /* length of debug information zones on board */ | ||
43 | #define TPAM_TRAPAUDIT_LENGTH 10000 | ||
44 | #define TPAM_NCOAUDIT_LENGTH 300000 | ||
45 | #define TPAM_NCOAUDIT_COUNT 30 | ||
46 | #define TPAM_MSGAUDIT_LENGTH 60000 | ||
47 | |||
48 | /* IOCTL load/save parameter */ | ||
49 | typedef struct tpam_dsp_ioctl { | ||
50 | __u32 address; /* address to load/save data */ | ||
51 | __u32 data_len; /* size of data to be loaded/saved */ | ||
52 | __u8 data[0]; /* data */ | ||
53 | } tpam_dsp_ioctl; | ||
54 | |||
55 | #endif /* _TPAM_H_ */ | ||
diff --git a/include/linux/jffs2.h b/include/linux/jffs2.h index c6f70660b3..c9c760700b 100644 --- a/include/linux/jffs2.h +++ b/include/linux/jffs2.h | |||
@@ -186,6 +186,7 @@ struct jffs2_raw_xref | |||
186 | jint32_t hdr_crc; | 186 | jint32_t hdr_crc; |
187 | jint32_t ino; /* inode number */ | 187 | jint32_t ino; /* inode number */ |
188 | jint32_t xid; /* XATTR identifier number */ | 188 | jint32_t xid; /* XATTR identifier number */ |
189 | jint32_t xseqno; /* xref sequencial number */ | ||
189 | jint32_t node_crc; | 190 | jint32_t node_crc; |
190 | } __attribute__((packed)); | 191 | } __attribute__((packed)); |
191 | 192 | ||
diff --git a/include/linux/kbd_kern.h b/include/linux/kbd_kern.h index 4eb851ece0..efe0ee4cc8 100644 --- a/include/linux/kbd_kern.h +++ b/include/linux/kbd_kern.h | |||
@@ -155,10 +155,8 @@ static inline void con_schedule_flip(struct tty_struct *t) | |||
155 | { | 155 | { |
156 | unsigned long flags; | 156 | unsigned long flags; |
157 | spin_lock_irqsave(&t->buf.lock, flags); | 157 | spin_lock_irqsave(&t->buf.lock, flags); |
158 | if (t->buf.tail != NULL) { | 158 | if (t->buf.tail != NULL) |
159 | t->buf.tail->active = 0; | ||
160 | t->buf.tail->commit = t->buf.tail->used; | 159 | t->buf.tail->commit = t->buf.tail->used; |
161 | } | ||
162 | spin_unlock_irqrestore(&t->buf.lock, flags); | 160 | spin_unlock_irqrestore(&t->buf.lock, flags); |
163 | schedule_work(&t->buf.work); | 161 | schedule_work(&t->buf.work); |
164 | } | 162 | } |
diff --git a/include/linux/kernel.h b/include/linux/kernel.h index 3c5e4c2e51..5c1ec1f84e 100644 --- a/include/linux/kernel.h +++ b/include/linux/kernel.h | |||
@@ -32,6 +32,7 @@ extern const char linux_banner[]; | |||
32 | 32 | ||
33 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) | 33 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) |
34 | #define ALIGN(x,a) (((x)+(a)-1)&~((a)-1)) | 34 | #define ALIGN(x,a) (((x)+(a)-1)&~((a)-1)) |
35 | #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) | ||
35 | 36 | ||
36 | #define KERN_EMERG "<0>" /* system is unusable */ | 37 | #define KERN_EMERG "<0>" /* system is unusable */ |
37 | #define KERN_ALERT "<1>" /* action must be taken immediately */ | 38 | #define KERN_ALERT "<1>" /* action must be taken immediately */ |
@@ -336,6 +337,12 @@ struct sysinfo { | |||
336 | /* Force a compilation error if condition is true */ | 337 | /* Force a compilation error if condition is true */ |
337 | #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) | 338 | #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) |
338 | 339 | ||
340 | /* Force a compilation error if condition is true, but also produce a | ||
341 | result (of value 0 and type size_t), so the expression can be used | ||
342 | e.g. in a structure initializer (or where-ever else comma expressions | ||
343 | aren't permitted). */ | ||
344 | #define BUILD_BUG_ON_ZERO(e) (sizeof(char[1 - 2 * !!(e)]) - 1) | ||
345 | |||
339 | /* Trap pasters of __FUNCTION__ at compile-time */ | 346 | /* Trap pasters of __FUNCTION__ at compile-time */ |
340 | #define __FUNCTION__ (__func__) | 347 | #define __FUNCTION__ (__func__) |
341 | 348 | ||
diff --git a/include/linux/key.h b/include/linux/key.h index e81ebf910d..169f05e486 100644 --- a/include/linux/key.h +++ b/include/linux/key.h | |||
@@ -177,7 +177,8 @@ struct key { | |||
177 | /* | 177 | /* |
178 | * kernel managed key type definition | 178 | * kernel managed key type definition |
179 | */ | 179 | */ |
180 | typedef int (*request_key_actor_t)(struct key *key, struct key *authkey, const char *op); | 180 | typedef int (*request_key_actor_t)(struct key *key, struct key *authkey, |
181 | const char *op, void *aux); | ||
181 | 182 | ||
182 | struct key_type { | 183 | struct key_type { |
183 | /* name of the type */ | 184 | /* name of the type */ |
@@ -248,7 +249,14 @@ extern struct key *key_alloc(struct key_type *type, | |||
248 | const char *desc, | 249 | const char *desc, |
249 | uid_t uid, gid_t gid, | 250 | uid_t uid, gid_t gid, |
250 | struct task_struct *ctx, | 251 | struct task_struct *ctx, |
251 | key_perm_t perm, int not_in_quota); | 252 | key_perm_t perm, |
253 | unsigned long flags); | ||
254 | |||
255 | |||
256 | #define KEY_ALLOC_IN_QUOTA 0x0000 /* add to quota, reject if would overrun */ | ||
257 | #define KEY_ALLOC_QUOTA_OVERRUN 0x0001 /* add to quota, permit even if overrun */ | ||
258 | #define KEY_ALLOC_NOT_IN_QUOTA 0x0002 /* not in quota */ | ||
259 | |||
252 | extern int key_payload_reserve(struct key *key, size_t datalen); | 260 | extern int key_payload_reserve(struct key *key, size_t datalen); |
253 | extern int key_instantiate_and_link(struct key *key, | 261 | extern int key_instantiate_and_link(struct key *key, |
254 | const void *data, | 262 | const void *data, |
@@ -278,6 +286,11 @@ extern struct key *request_key(struct key_type *type, | |||
278 | const char *description, | 286 | const char *description, |
279 | const char *callout_info); | 287 | const char *callout_info); |
280 | 288 | ||
289 | extern struct key *request_key_with_auxdata(struct key_type *type, | ||
290 | const char *description, | ||
291 | const char *callout_info, | ||
292 | void *aux); | ||
293 | |||
281 | extern int key_validate(struct key *key); | 294 | extern int key_validate(struct key *key); |
282 | 295 | ||
283 | extern key_ref_t key_create_or_update(key_ref_t keyring, | 296 | extern key_ref_t key_create_or_update(key_ref_t keyring, |
@@ -285,7 +298,7 @@ extern key_ref_t key_create_or_update(key_ref_t keyring, | |||
285 | const char *description, | 298 | const char *description, |
286 | const void *payload, | 299 | const void *payload, |
287 | size_t plen, | 300 | size_t plen, |
288 | int not_in_quota); | 301 | unsigned long flags); |
289 | 302 | ||
290 | extern int key_update(key_ref_t key, | 303 | extern int key_update(key_ref_t key, |
291 | const void *payload, | 304 | const void *payload, |
@@ -299,7 +312,7 @@ extern int key_unlink(struct key *keyring, | |||
299 | 312 | ||
300 | extern struct key *keyring_alloc(const char *description, uid_t uid, gid_t gid, | 313 | extern struct key *keyring_alloc(const char *description, uid_t uid, gid_t gid, |
301 | struct task_struct *ctx, | 314 | struct task_struct *ctx, |
302 | int not_in_quota, | 315 | unsigned long flags, |
303 | struct key *dest); | 316 | struct key *dest); |
304 | 317 | ||
305 | extern int keyring_clear(struct key *keyring); | 318 | extern int keyring_clear(struct key *keyring); |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 20b1cf527c..f4284bf897 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/interrupt.h> | 30 | #include <linux/interrupt.h> |
31 | #include <linux/pci.h> | 31 | #include <linux/pci.h> |
32 | #include <linux/dma-mapping.h> | 32 | #include <linux/dma-mapping.h> |
33 | #include <asm/scatterlist.h> | ||
33 | #include <asm/io.h> | 34 | #include <asm/io.h> |
34 | #include <linux/ata.h> | 35 | #include <linux/ata.h> |
35 | #include <linux/workqueue.h> | 36 | #include <linux/workqueue.h> |
@@ -887,6 +888,9 @@ static inline unsigned int ata_tag_internal(unsigned int tag) | |||
887 | return tag == ATA_MAX_QUEUE - 1; | 888 | return tag == ATA_MAX_QUEUE - 1; |
888 | } | 889 | } |
889 | 890 | ||
891 | /* | ||
892 | * device helpers | ||
893 | */ | ||
890 | static inline unsigned int ata_class_enabled(unsigned int class) | 894 | static inline unsigned int ata_class_enabled(unsigned int class) |
891 | { | 895 | { |
892 | return class == ATA_DEV_ATA || class == ATA_DEV_ATAPI; | 896 | return class == ATA_DEV_ATA || class == ATA_DEV_ATAPI; |
@@ -917,6 +921,17 @@ static inline unsigned int ata_dev_absent(const struct ata_device *dev) | |||
917 | return ata_class_absent(dev->class); | 921 | return ata_class_absent(dev->class); |
918 | } | 922 | } |
919 | 923 | ||
924 | /* | ||
925 | * port helpers | ||
926 | */ | ||
927 | static inline int ata_port_max_devices(const struct ata_port *ap) | ||
928 | { | ||
929 | if (ap->flags & ATA_FLAG_SLAVE_POSS) | ||
930 | return 2; | ||
931 | return 1; | ||
932 | } | ||
933 | |||
934 | |||
920 | static inline u8 ata_chk_status(struct ata_port *ap) | 935 | static inline u8 ata_chk_status(struct ata_port *ap) |
921 | { | 936 | { |
922 | return ap->ops->check_status(ap); | 937 | return ap->ops->check_status(ap); |
diff --git a/include/linux/license.h b/include/linux/license.h new file mode 100644 index 0000000000..decdbf43cb --- /dev/null +++ b/include/linux/license.h | |||
@@ -0,0 +1,14 @@ | |||
1 | #ifndef __LICENSE_H | ||
2 | #define __LICENSE_H | ||
3 | |||
4 | static inline int license_is_gpl_compatible(const char *license) | ||
5 | { | ||
6 | return (strcmp(license, "GPL") == 0 | ||
7 | || strcmp(license, "GPL v2") == 0 | ||
8 | || strcmp(license, "GPL and additional rights") == 0 | ||
9 | || strcmp(license, "Dual BSD/GPL") == 0 | ||
10 | || strcmp(license, "Dual MIT/GPL") == 0 | ||
11 | || strcmp(license, "Dual MPL/GPL") == 0); | ||
12 | } | ||
13 | |||
14 | #endif | ||
diff --git a/include/linux/list.h b/include/linux/list.h index 37ca31b21b..6b74adf529 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
@@ -4,18 +4,11 @@ | |||
4 | #ifdef __KERNEL__ | 4 | #ifdef __KERNEL__ |
5 | 5 | ||
6 | #include <linux/stddef.h> | 6 | #include <linux/stddef.h> |
7 | #include <linux/poison.h> | ||
7 | #include <linux/prefetch.h> | 8 | #include <linux/prefetch.h> |
8 | #include <asm/system.h> | 9 | #include <asm/system.h> |
9 | 10 | ||
10 | /* | 11 | /* |
11 | * These are non-NULL pointers that will result in page faults | ||
12 | * under normal circumstances, used to verify that nobody uses | ||
13 | * non-initialized list entries. | ||
14 | */ | ||
15 | #define LIST_POISON1 ((void *) 0x00100100) | ||
16 | #define LIST_POISON2 ((void *) 0x00200200) | ||
17 | |||
18 | /* | ||
19 | * Simple doubly linked list implementation. | 12 | * Simple doubly linked list implementation. |
20 | * | 13 | * |
21 | * Some of the internal functions ("__xxx") are useful when | 14 | * Some of the internal functions ("__xxx") are useful when |
diff --git a/include/linux/loop.h b/include/linux/loop.h index bf3d2345ce..e76c7611d6 100644 --- a/include/linux/loop.h +++ b/include/linux/loop.h | |||
@@ -59,7 +59,7 @@ struct loop_device { | |||
59 | struct bio *lo_bio; | 59 | struct bio *lo_bio; |
60 | struct bio *lo_biotail; | 60 | struct bio *lo_biotail; |
61 | int lo_state; | 61 | int lo_state; |
62 | struct task_struct *lo_thread; | 62 | struct completion lo_done; |
63 | struct completion lo_bh_done; | 63 | struct completion lo_bh_done; |
64 | struct mutex lo_ctl_mutex; | 64 | struct mutex lo_ctl_mutex; |
65 | int lo_pending; | 65 | int lo_pending; |
diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h index 9112063861..218501cfae 100644 --- a/include/linux/memory_hotplug.h +++ b/include/linux/memory_hotplug.h | |||
@@ -63,6 +63,76 @@ extern int online_pages(unsigned long, unsigned long); | |||
63 | /* reasonably generic interface to expand the physical pages in a zone */ | 63 | /* reasonably generic interface to expand the physical pages in a zone */ |
64 | extern int __add_pages(struct zone *zone, unsigned long start_pfn, | 64 | extern int __add_pages(struct zone *zone, unsigned long start_pfn, |
65 | unsigned long nr_pages); | 65 | unsigned long nr_pages); |
66 | |||
67 | #ifdef CONFIG_NUMA | ||
68 | extern int memory_add_physaddr_to_nid(u64 start); | ||
69 | #else | ||
70 | static inline int memory_add_physaddr_to_nid(u64 start) | ||
71 | { | ||
72 | return 0; | ||
73 | } | ||
74 | #endif | ||
75 | |||
76 | #ifdef CONFIG_HAVE_ARCH_NODEDATA_EXTENSION | ||
77 | /* | ||
78 | * For supporting node-hotadd, we have to allocate a new pgdat. | ||
79 | * | ||
80 | * If an arch has generic style NODE_DATA(), | ||
81 | * node_data[nid] = kzalloc() works well. But it depends on the architecture. | ||
82 | * | ||
83 | * In general, generic_alloc_nodedata() is used. | ||
84 | * Now, arch_free_nodedata() is just defined for error path of node_hot_add. | ||
85 | * | ||
86 | */ | ||
87 | extern pg_data_t *arch_alloc_nodedata(int nid); | ||
88 | extern void arch_free_nodedata(pg_data_t *pgdat); | ||
89 | extern void arch_refresh_nodedata(int nid, pg_data_t *pgdat); | ||
90 | |||
91 | #else /* CONFIG_HAVE_ARCH_NODEDATA_EXTENSION */ | ||
92 | |||
93 | #define arch_alloc_nodedata(nid) generic_alloc_nodedata(nid) | ||
94 | #define arch_free_nodedata(pgdat) generic_free_nodedata(pgdat) | ||
95 | |||
96 | #ifdef CONFIG_NUMA | ||
97 | /* | ||
98 | * If ARCH_HAS_NODEDATA_EXTENSION=n, this func is used to allocate pgdat. | ||
99 | * XXX: kmalloc_node() can't work well to get new node's memory at this time. | ||
100 | * Because, pgdat for the new node is not allocated/initialized yet itself. | ||
101 | * To use new node's memory, more consideration will be necessary. | ||
102 | */ | ||
103 | #define generic_alloc_nodedata(nid) \ | ||
104 | ({ \ | ||
105 | kzalloc(sizeof(pg_data_t), GFP_KERNEL); \ | ||
106 | }) | ||
107 | /* | ||
108 | * This definition is just for error path in node hotadd. | ||
109 | * For node hotremove, we have to replace this. | ||
110 | */ | ||
111 | #define generic_free_nodedata(pgdat) kfree(pgdat) | ||
112 | |||
113 | extern pg_data_t *node_data[]; | ||
114 | static inline void arch_refresh_nodedata(int nid, pg_data_t *pgdat) | ||
115 | { | ||
116 | node_data[nid] = pgdat; | ||
117 | } | ||
118 | |||
119 | #else /* !CONFIG_NUMA */ | ||
120 | |||
121 | /* never called */ | ||
122 | static inline pg_data_t *generic_alloc_nodedata(int nid) | ||
123 | { | ||
124 | BUG(); | ||
125 | return NULL; | ||
126 | } | ||
127 | static inline void generic_free_nodedata(pg_data_t *pgdat) | ||
128 | { | ||
129 | } | ||
130 | static inline void arch_refresh_nodedata(int nid, pg_data_t *pgdat) | ||
131 | { | ||
132 | } | ||
133 | #endif /* CONFIG_NUMA */ | ||
134 | #endif /* CONFIG_HAVE_ARCH_NODEDATA_EXTENSION */ | ||
135 | |||
66 | #else /* ! CONFIG_MEMORY_HOTPLUG */ | 136 | #else /* ! CONFIG_MEMORY_HOTPLUG */ |
67 | /* | 137 | /* |
68 | * Stub functions for when hotplug is off | 138 | * Stub functions for when hotplug is off |
@@ -99,7 +169,8 @@ static inline int __remove_pages(struct zone *zone, unsigned long start_pfn, | |||
99 | return -ENOSYS; | 169 | return -ENOSYS; |
100 | } | 170 | } |
101 | 171 | ||
102 | extern int add_memory(u64 start, u64 size); | 172 | extern int add_memory(int nid, u64 start, u64 size); |
173 | extern int arch_add_memory(int nid, u64 start, u64 size); | ||
103 | extern int remove_memory(u64 start, u64 size); | 174 | extern int remove_memory(u64 start, u64 size); |
104 | 175 | ||
105 | #endif /* __LINUX_MEMORY_HOTPLUG_H */ | 176 | #endif /* __LINUX_MEMORY_HOTPLUG_H */ |
diff --git a/include/linux/mm.h b/include/linux/mm.h index a929ea197e..c41a1299b8 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -1030,13 +1030,20 @@ static inline void vm_stat_account(struct mm_struct *mm, | |||
1030 | } | 1030 | } |
1031 | #endif /* CONFIG_PROC_FS */ | 1031 | #endif /* CONFIG_PROC_FS */ |
1032 | 1032 | ||
1033 | static inline void | ||
1034 | debug_check_no_locks_freed(const void *from, unsigned long len) | ||
1035 | { | ||
1036 | mutex_debug_check_no_locks_freed(from, len); | ||
1037 | rt_mutex_debug_check_no_locks_freed(from, len); | ||
1038 | } | ||
1039 | |||
1033 | #ifndef CONFIG_DEBUG_PAGEALLOC | 1040 | #ifndef CONFIG_DEBUG_PAGEALLOC |
1034 | static inline void | 1041 | static inline void |
1035 | kernel_map_pages(struct page *page, int numpages, int enable) | 1042 | kernel_map_pages(struct page *page, int numpages, int enable) |
1036 | { | 1043 | { |
1037 | if (!PageHighMem(page) && !enable) | 1044 | if (!PageHighMem(page) && !enable) |
1038 | mutex_debug_check_no_locks_freed(page_address(page), | 1045 | debug_check_no_locks_freed(page_address(page), |
1039 | numpages * PAGE_SIZE); | 1046 | numpages * PAGE_SIZE); |
1040 | } | 1047 | } |
1041 | #endif | 1048 | #endif |
1042 | 1049 | ||
@@ -1065,5 +1072,7 @@ void drop_slab(void); | |||
1065 | extern int randomize_va_space; | 1072 | extern int randomize_va_space; |
1066 | #endif | 1073 | #endif |
1067 | 1074 | ||
1075 | const char *arch_vma_name(struct vm_area_struct *vma); | ||
1076 | |||
1068 | #endif /* __KERNEL__ */ | 1077 | #endif /* __KERNEL__ */ |
1069 | #endif /* _LINUX_MM_H */ | 1078 | #endif /* _LINUX_MM_H */ |
diff --git a/include/linux/module.h b/include/linux/module.h index 2d366098ea..9e9dc7c24d 100644 --- a/include/linux/module.h +++ b/include/linux/module.h | |||
@@ -203,6 +203,15 @@ void *__symbol_get_gpl(const char *symbol); | |||
203 | #define EXPORT_SYMBOL_GPL_FUTURE(sym) \ | 203 | #define EXPORT_SYMBOL_GPL_FUTURE(sym) \ |
204 | __EXPORT_SYMBOL(sym, "_gpl_future") | 204 | __EXPORT_SYMBOL(sym, "_gpl_future") |
205 | 205 | ||
206 | |||
207 | #ifdef CONFIG_UNUSED_SYMBOLS | ||
208 | #define EXPORT_UNUSED_SYMBOL(sym) __EXPORT_SYMBOL(sym, "_unused") | ||
209 | #define EXPORT_UNUSED_SYMBOL_GPL(sym) __EXPORT_SYMBOL(sym, "_unused_gpl") | ||
210 | #else | ||
211 | #define EXPORT_UNUSED_SYMBOL(sym) | ||
212 | #define EXPORT_UNUSED_SYMBOL_GPL(sym) | ||
213 | #endif | ||
214 | |||
206 | #endif | 215 | #endif |
207 | 216 | ||
208 | struct module_ref | 217 | struct module_ref |
@@ -261,6 +270,15 @@ struct module | |||
261 | unsigned int num_gpl_syms; | 270 | unsigned int num_gpl_syms; |
262 | const unsigned long *gpl_crcs; | 271 | const unsigned long *gpl_crcs; |
263 | 272 | ||
273 | /* unused exported symbols. */ | ||
274 | const struct kernel_symbol *unused_syms; | ||
275 | unsigned int num_unused_syms; | ||
276 | const unsigned long *unused_crcs; | ||
277 | /* GPL-only, unused exported symbols. */ | ||
278 | const struct kernel_symbol *unused_gpl_syms; | ||
279 | unsigned int num_unused_gpl_syms; | ||
280 | const unsigned long *unused_gpl_crcs; | ||
281 | |||
264 | /* symbols that will be GPL-only in the near future. */ | 282 | /* symbols that will be GPL-only in the near future. */ |
265 | const struct kernel_symbol *gpl_future_syms; | 283 | const struct kernel_symbol *gpl_future_syms; |
266 | unsigned int num_gpl_future_syms; | 284 | unsigned int num_gpl_future_syms; |
@@ -285,6 +303,9 @@ struct module | |||
285 | /* The size of the executable code in each section. */ | 303 | /* The size of the executable code in each section. */ |
286 | unsigned long init_text_size, core_text_size; | 304 | unsigned long init_text_size, core_text_size; |
287 | 305 | ||
306 | /* The handle returned from unwind_add_table. */ | ||
307 | void *unwind_info; | ||
308 | |||
288 | /* Arch-specific module values */ | 309 | /* Arch-specific module values */ |
289 | struct mod_arch_specific arch; | 310 | struct mod_arch_specific arch; |
290 | 311 | ||
@@ -453,6 +474,8 @@ void module_remove_driver(struct device_driver *); | |||
453 | #define EXPORT_SYMBOL(sym) | 474 | #define EXPORT_SYMBOL(sym) |
454 | #define EXPORT_SYMBOL_GPL(sym) | 475 | #define EXPORT_SYMBOL_GPL(sym) |
455 | #define EXPORT_SYMBOL_GPL_FUTURE(sym) | 476 | #define EXPORT_SYMBOL_GPL_FUTURE(sym) |
477 | #define EXPORT_UNUSED_SYMBOL(sym) | ||
478 | #define EXPORT_UNUSED_SYMBOL_GPL(sym) | ||
456 | 479 | ||
457 | /* Given an address, look for it in the exception tables. */ | 480 | /* Given an address, look for it in the exception tables. */ |
458 | static inline const struct exception_table_entry * | 481 | static inline const struct exception_table_entry * |
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index bc747e5d71..03cd7551a7 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -699,7 +699,6 @@ extern int dev_hard_start_xmit(struct sk_buff *skb, | |||
699 | 699 | ||
700 | extern void dev_init(void); | 700 | extern void dev_init(void); |
701 | 701 | ||
702 | extern int netdev_nit; | ||
703 | extern int netdev_budget; | 702 | extern int netdev_budget; |
704 | 703 | ||
705 | /* Called by rtnetlink.c:rtnl_unlock() */ | 704 | /* Called by rtnetlink.c:rtnl_unlock() */ |
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index ca5a873300..1efe60c5c0 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h | |||
@@ -31,6 +31,7 @@ struct netpoll_info { | |||
31 | int rx_flags; | 31 | int rx_flags; |
32 | spinlock_t rx_lock; | 32 | spinlock_t rx_lock; |
33 | struct netpoll *rx_np; /* netpoll that registered an rx_hook */ | 33 | struct netpoll *rx_np; /* netpoll that registered an rx_hook */ |
34 | struct sk_buff_head arp_tx; /* list of arp requests to reply to */ | ||
34 | }; | 35 | }; |
35 | 36 | ||
36 | void netpoll_poll(struct netpoll *np); | 37 | void netpoll_poll(struct netpoll *np); |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 0a1740b253..d90b1bb375 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -335,7 +335,7 @@ extern struct inode_operations nfs_file_inode_operations; | |||
335 | extern struct inode_operations nfs3_file_inode_operations; | 335 | extern struct inode_operations nfs3_file_inode_operations; |
336 | #endif /* CONFIG_NFS_V3 */ | 336 | #endif /* CONFIG_NFS_V3 */ |
337 | extern const struct file_operations nfs_file_operations; | 337 | extern const struct file_operations nfs_file_operations; |
338 | extern struct address_space_operations nfs_file_aops; | 338 | extern const struct address_space_operations nfs_file_aops; |
339 | 339 | ||
340 | static inline struct rpc_cred *nfs_file_cred(struct file *file) | 340 | static inline struct rpc_cred *nfs_file_cred(struct file *file) |
341 | { | 341 | { |
diff --git a/include/linux/node.h b/include/linux/node.h index 254dc3de65..81dcec84cd 100644 --- a/include/linux/node.h +++ b/include/linux/node.h | |||
@@ -26,8 +26,25 @@ struct node { | |||
26 | struct sys_device sysdev; | 26 | struct sys_device sysdev; |
27 | }; | 27 | }; |
28 | 28 | ||
29 | extern struct node node_devices[]; | ||
30 | |||
29 | extern int register_node(struct node *, int, struct node *); | 31 | extern int register_node(struct node *, int, struct node *); |
30 | extern void unregister_node(struct node *node); | 32 | extern void unregister_node(struct node *node); |
33 | extern int register_one_node(int nid); | ||
34 | extern void unregister_one_node(int nid); | ||
35 | #ifdef CONFIG_NUMA | ||
36 | extern int register_cpu_under_node(unsigned int cpu, unsigned int nid); | ||
37 | extern int unregister_cpu_under_node(unsigned int cpu, unsigned int nid); | ||
38 | #else | ||
39 | static inline int register_cpu_under_node(unsigned int cpu, unsigned int nid) | ||
40 | { | ||
41 | return 0; | ||
42 | } | ||
43 | static inline int unregister_cpu_under_node(unsigned int cpu, unsigned int nid) | ||
44 | { | ||
45 | return 0; | ||
46 | } | ||
47 | #endif | ||
31 | 48 | ||
32 | #define to_node(sys_device) container_of(sys_device, struct node, sysdev) | 49 | #define to_node(sys_device) container_of(sys_device, struct node, sysdev) |
33 | 50 | ||
diff --git a/include/linux/nsc_gpio.h b/include/linux/nsc_gpio.h new file mode 100644 index 0000000000..135742cfad --- /dev/null +++ b/include/linux/nsc_gpio.h | |||
@@ -0,0 +1,42 @@ | |||
1 | /** | ||
2 | nsc_gpio.c | ||
3 | |||
4 | National Semiconductor GPIO common access methods. | ||
5 | |||
6 | struct nsc_gpio_ops abstracts the low-level access | ||
7 | operations for the GPIO units on 2 NSC chip families; the GEODE | ||
8 | integrated CPU, and the PC-8736[03456] integrated PC-peripheral | ||
9 | chips. | ||
10 | |||
11 | The GPIO units on these chips have the same pin architecture, but | ||
12 | the access methods differ. Thus, scx200_gpio and pc8736x_gpio | ||
13 | implement their own versions of these routines; and use the common | ||
14 | file-operations routines implemented in nsc_gpio module. | ||
15 | |||
16 | Copyright (c) 2005 Jim Cromie <jim.cromie@gmail.com> | ||
17 | |||
18 | NB: this work was tested on the Geode SC-1100 and PC-87366 chips. | ||
19 | NSC sold the GEODE line to AMD, and the PC-8736x line to Winbond. | ||
20 | */ | ||
21 | |||
22 | struct nsc_gpio_ops { | ||
23 | struct module* owner; | ||
24 | u32 (*gpio_config) (unsigned iminor, u32 mask, u32 bits); | ||
25 | void (*gpio_dump) (struct nsc_gpio_ops *amp, unsigned iminor); | ||
26 | int (*gpio_get) (unsigned iminor); | ||
27 | void (*gpio_set) (unsigned iminor, int state); | ||
28 | void (*gpio_set_high)(unsigned iminor); | ||
29 | void (*gpio_set_low) (unsigned iminor); | ||
30 | void (*gpio_change) (unsigned iminor); | ||
31 | int (*gpio_current) (unsigned iminor); | ||
32 | struct device* dev; /* for dev_dbg() support, set in init */ | ||
33 | }; | ||
34 | |||
35 | extern ssize_t nsc_gpio_write(struct file *file, const char __user *data, | ||
36 | size_t len, loff_t *ppos); | ||
37 | |||
38 | extern ssize_t nsc_gpio_read(struct file *file, char __user *buf, | ||
39 | size_t len, loff_t *ppos); | ||
40 | |||
41 | extern void nsc_gpio_dump(struct nsc_gpio_ops *amp, unsigned index); | ||
42 | |||
diff --git a/include/linux/pci.h b/include/linux/pci.h index 62a8c22f5f..983fca251b 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -404,8 +404,8 @@ int pcibios_enable_device(struct pci_dev *, int mask); | |||
404 | char *pcibios_setup (char *str); | 404 | char *pcibios_setup (char *str); |
405 | 405 | ||
406 | /* Used only when drivers/pci/setup.c is used */ | 406 | /* Used only when drivers/pci/setup.c is used */ |
407 | void pcibios_align_resource(void *, struct resource *, | 407 | void pcibios_align_resource(void *, struct resource *, resource_size_t, |
408 | unsigned long, unsigned long); | 408 | resource_size_t); |
409 | void pcibios_update_irq(struct pci_dev *, int irq); | 409 | void pcibios_update_irq(struct pci_dev *, int irq); |
410 | 410 | ||
411 | /* Generic PCI functions used internally */ | 411 | /* Generic PCI functions used internally */ |
@@ -532,10 +532,10 @@ void pci_release_region(struct pci_dev *, int); | |||
532 | 532 | ||
533 | /* drivers/pci/bus.c */ | 533 | /* drivers/pci/bus.c */ |
534 | int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, | 534 | int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, |
535 | unsigned long size, unsigned long align, | 535 | resource_size_t size, resource_size_t align, |
536 | unsigned long min, unsigned int type_mask, | 536 | resource_size_t min, unsigned int type_mask, |
537 | void (*alignf)(void *, struct resource *, | 537 | void (*alignf)(void *, struct resource *, |
538 | unsigned long, unsigned long), | 538 | resource_size_t, resource_size_t), |
539 | void *alignf_data); | 539 | void *alignf_data); |
540 | void pci_enable_bridges(struct pci_bus *bus); | 540 | void pci_enable_bridges(struct pci_bus *bus); |
541 | 541 | ||
@@ -730,7 +730,8 @@ static inline char *pci_name(struct pci_dev *pdev) | |||
730 | */ | 730 | */ |
731 | #ifndef HAVE_ARCH_PCI_RESOURCE_TO_USER | 731 | #ifndef HAVE_ARCH_PCI_RESOURCE_TO_USER |
732 | static inline void pci_resource_to_user(const struct pci_dev *dev, int bar, | 732 | static inline void pci_resource_to_user(const struct pci_dev *dev, int bar, |
733 | const struct resource *rsrc, u64 *start, u64 *end) | 733 | const struct resource *rsrc, resource_size_t *start, |
734 | resource_size_t *end) | ||
734 | { | 735 | { |
735 | *start = rsrc->start; | 736 | *start = rsrc->start; |
736 | *end = rsrc->end; | 737 | *end = rsrc->end; |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index c2fd2d1993..9ae6b1a753 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1202,6 +1202,7 @@ | |||
1202 | #define PCI_DEVICE_ID_NVIDIA_NVENET_19 0x03EF | 1202 | #define PCI_DEVICE_ID_NVIDIA_NVENET_19 0x03EF |
1203 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA2 0x03F6 | 1203 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA2 0x03F6 |
1204 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA3 0x03F7 | 1204 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA3 0x03F7 |
1205 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP65_IDE 0x0448 | ||
1205 | #define PCI_DEVICE_ID_NVIDIA_NVENET_20 0x0450 | 1206 | #define PCI_DEVICE_ID_NVIDIA_NVENET_20 0x0450 |
1206 | #define PCI_DEVICE_ID_NVIDIA_NVENET_21 0x0451 | 1207 | #define PCI_DEVICE_ID_NVIDIA_NVENET_21 0x0451 |
1207 | #define PCI_DEVICE_ID_NVIDIA_NVENET_22 0x0452 | 1208 | #define PCI_DEVICE_ID_NVIDIA_NVENET_22 0x0452 |
@@ -2170,7 +2171,6 @@ | |||
2170 | #define PCI_DEVICE_ID_INTEL_ICH8_4 0x2815 | 2171 | #define PCI_DEVICE_ID_INTEL_ICH8_4 0x2815 |
2171 | #define PCI_DEVICE_ID_INTEL_ICH8_5 0x283e | 2172 | #define PCI_DEVICE_ID_INTEL_ICH8_5 0x283e |
2172 | #define PCI_DEVICE_ID_INTEL_ICH8_6 0x2850 | 2173 | #define PCI_DEVICE_ID_INTEL_ICH8_6 0x2850 |
2173 | #define PCI_DEVICE_ID_INTEL_GD31244 0x3200 | ||
2174 | #define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340 | 2174 | #define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340 |
2175 | #define PCI_DEVICE_ID_INTEL_82830_HB 0x3575 | 2175 | #define PCI_DEVICE_ID_INTEL_82830_HB 0x3575 |
2176 | #define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577 | 2176 | #define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577 |
diff --git a/include/linux/plist.h b/include/linux/plist.h new file mode 100644 index 0000000000..b95818a037 --- /dev/null +++ b/include/linux/plist.h | |||
@@ -0,0 +1,248 @@ | |||
1 | /* | ||
2 | * Descending-priority-sorted double-linked list | ||
3 | * | ||
4 | * (C) 2002-2003 Intel Corp | ||
5 | * Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>. | ||
6 | * | ||
7 | * 2001-2005 (c) MontaVista Software, Inc. | ||
8 | * Daniel Walker <dwalker@mvista.com> | ||
9 | * | ||
10 | * (C) 2005 Thomas Gleixner <tglx@linutronix.de> | ||
11 | * | ||
12 | * Simplifications of the original code by | ||
13 | * Oleg Nesterov <oleg@tv-sign.ru> | ||
14 | * | ||
15 | * Licensed under the FSF's GNU Public License v2 or later. | ||
16 | * | ||
17 | * Based on simple lists (include/linux/list.h). | ||
18 | * | ||
19 | * This is a priority-sorted list of nodes; each node has a | ||
20 | * priority from INT_MIN (highest) to INT_MAX (lowest). | ||
21 | * | ||
22 | * Addition is O(K), removal is O(1), change of priority of a node is | ||
23 | * O(K) and K is the number of RT priority levels used in the system. | ||
24 | * (1 <= K <= 99) | ||
25 | * | ||
26 | * This list is really a list of lists: | ||
27 | * | ||
28 | * - The tier 1 list is the prio_list, different priority nodes. | ||
29 | * | ||
30 | * - The tier 2 list is the node_list, serialized nodes. | ||
31 | * | ||
32 | * Simple ASCII art explanation: | ||
33 | * | ||
34 | * |HEAD | | ||
35 | * | | | ||
36 | * |prio_list.prev|<------------------------------------| | ||
37 | * |prio_list.next|<->|pl|<->|pl|<--------------->|pl|<-| | ||
38 | * |10 | |10| |21| |21| |21| |40| (prio) | ||
39 | * | | | | | | | | | | | | | ||
40 | * | | | | | | | | | | | | | ||
41 | * |node_list.next|<->|nl|<->|nl|<->|nl|<->|nl|<->|nl|<-| | ||
42 | * |node_list.prev|<------------------------------------| | ||
43 | * | ||
44 | * The nodes on the prio_list list are sorted by priority to simplify | ||
45 | * the insertion of new nodes. There are no nodes with duplicate | ||
46 | * priorites on the list. | ||
47 | * | ||
48 | * The nodes on the node_list is ordered by priority and can contain | ||
49 | * entries which have the same priority. Those entries are ordered | ||
50 | * FIFO | ||
51 | * | ||
52 | * Addition means: look for the prio_list node in the prio_list | ||
53 | * for the priority of the node and insert it before the node_list | ||
54 | * entry of the next prio_list node. If it is the first node of | ||
55 | * that priority, add it to the prio_list in the right position and | ||
56 | * insert it into the serialized node_list list | ||
57 | * | ||
58 | * Removal means remove it from the node_list and remove it from | ||
59 | * the prio_list if the node_list list_head is non empty. In case | ||
60 | * of removal from the prio_list it must be checked whether other | ||
61 | * entries of the same priority are on the list or not. If there | ||
62 | * is another entry of the same priority then this entry has to | ||
63 | * replace the removed entry on the prio_list. If the entry which | ||
64 | * is removed is the only entry of this priority then a simple | ||
65 | * remove from both list is sufficient. | ||
66 | * | ||
67 | * INT_MIN is the highest priority, 0 is the medium highest, INT_MAX | ||
68 | * is lowest priority. | ||
69 | * | ||
70 | * No locking is done, up to the caller. | ||
71 | * | ||
72 | */ | ||
73 | #ifndef _LINUX_PLIST_H_ | ||
74 | #define _LINUX_PLIST_H_ | ||
75 | |||
76 | #include <linux/kernel.h> | ||
77 | #include <linux/list.h> | ||
78 | #include <linux/spinlock_types.h> | ||
79 | |||
80 | struct plist_head { | ||
81 | struct list_head prio_list; | ||
82 | struct list_head node_list; | ||
83 | #ifdef CONFIG_DEBUG_PI_LIST | ||
84 | spinlock_t *lock; | ||
85 | #endif | ||
86 | }; | ||
87 | |||
88 | struct plist_node { | ||
89 | int prio; | ||
90 | struct plist_head plist; | ||
91 | }; | ||
92 | |||
93 | #ifdef CONFIG_DEBUG_PI_LIST | ||
94 | # define PLIST_HEAD_LOCK_INIT(_lock) .lock = _lock | ||
95 | #else | ||
96 | # define PLIST_HEAD_LOCK_INIT(_lock) | ||
97 | #endif | ||
98 | |||
99 | /** | ||
100 | * #PLIST_HEAD_INIT - static struct plist_head initializer | ||
101 | * | ||
102 | * @head: struct plist_head variable name | ||
103 | */ | ||
104 | #define PLIST_HEAD_INIT(head, _lock) \ | ||
105 | { \ | ||
106 | .prio_list = LIST_HEAD_INIT((head).prio_list), \ | ||
107 | .node_list = LIST_HEAD_INIT((head).node_list), \ | ||
108 | PLIST_HEAD_LOCK_INIT(&(_lock)) \ | ||
109 | } | ||
110 | |||
111 | /** | ||
112 | * #PLIST_NODE_INIT - static struct plist_node initializer | ||
113 | * | ||
114 | * @node: struct plist_node variable name | ||
115 | * @__prio: initial node priority | ||
116 | */ | ||
117 | #define PLIST_NODE_INIT(node, __prio) \ | ||
118 | { \ | ||
119 | .prio = (__prio), \ | ||
120 | .plist = PLIST_HEAD_INIT((node).plist, NULL), \ | ||
121 | } | ||
122 | |||
123 | /** | ||
124 | * plist_head_init - dynamic struct plist_head initializer | ||
125 | * | ||
126 | * @head: &struct plist_head pointer | ||
127 | */ | ||
128 | static inline void | ||
129 | plist_head_init(struct plist_head *head, spinlock_t *lock) | ||
130 | { | ||
131 | INIT_LIST_HEAD(&head->prio_list); | ||
132 | INIT_LIST_HEAD(&head->node_list); | ||
133 | #ifdef CONFIG_DEBUG_PI_LIST | ||
134 | head->lock = lock; | ||
135 | #endif | ||
136 | } | ||
137 | |||
138 | /** | ||
139 | * plist_node_init - Dynamic struct plist_node initializer | ||
140 | * | ||
141 | * @node: &struct plist_node pointer | ||
142 | * @prio: initial node priority | ||
143 | */ | ||
144 | static inline void plist_node_init(struct plist_node *node, int prio) | ||
145 | { | ||
146 | node->prio = prio; | ||
147 | plist_head_init(&node->plist, NULL); | ||
148 | } | ||
149 | |||
150 | extern void plist_add(struct plist_node *node, struct plist_head *head); | ||
151 | extern void plist_del(struct plist_node *node, struct plist_head *head); | ||
152 | |||
153 | /** | ||
154 | * plist_for_each - iterate over the plist | ||
155 | * | ||
156 | * @pos1: the type * to use as a loop counter. | ||
157 | * @head: the head for your list. | ||
158 | */ | ||
159 | #define plist_for_each(pos, head) \ | ||
160 | list_for_each_entry(pos, &(head)->node_list, plist.node_list) | ||
161 | |||
162 | /** | ||
163 | * plist_for_each_entry_safe - iterate over a plist of given type safe | ||
164 | * against removal of list entry | ||
165 | * | ||
166 | * @pos1: the type * to use as a loop counter. | ||
167 | * @n1: another type * to use as temporary storage | ||
168 | * @head: the head for your list. | ||
169 | */ | ||
170 | #define plist_for_each_safe(pos, n, head) \ | ||
171 | list_for_each_entry_safe(pos, n, &(head)->node_list, plist.node_list) | ||
172 | |||
173 | /** | ||
174 | * plist_for_each_entry - iterate over list of given type | ||
175 | * | ||
176 | * @pos: the type * to use as a loop counter. | ||
177 | * @head: the head for your list. | ||
178 | * @member: the name of the list_struct within the struct. | ||
179 | */ | ||
180 | #define plist_for_each_entry(pos, head, mem) \ | ||
181 | list_for_each_entry(pos, &(head)->node_list, mem.plist.node_list) | ||
182 | |||
183 | /** | ||
184 | * plist_for_each_entry_safe - iterate over list of given type safe against | ||
185 | * removal of list entry | ||
186 | * | ||
187 | * @pos: the type * to use as a loop counter. | ||
188 | * @n: another type * to use as temporary storage | ||
189 | * @head: the head for your list. | ||
190 | * @m: the name of the list_struct within the struct. | ||
191 | */ | ||
192 | #define plist_for_each_entry_safe(pos, n, head, m) \ | ||
193 | list_for_each_entry_safe(pos, n, &(head)->node_list, m.plist.node_list) | ||
194 | |||
195 | /** | ||
196 | * plist_head_empty - return !0 if a plist_head is empty | ||
197 | * | ||
198 | * @head: &struct plist_head pointer | ||
199 | */ | ||
200 | static inline int plist_head_empty(const struct plist_head *head) | ||
201 | { | ||
202 | return list_empty(&head->node_list); | ||
203 | } | ||
204 | |||
205 | /** | ||
206 | * plist_node_empty - return !0 if plist_node is not on a list | ||
207 | * | ||
208 | * @node: &struct plist_node pointer | ||
209 | */ | ||
210 | static inline int plist_node_empty(const struct plist_node *node) | ||
211 | { | ||
212 | return plist_head_empty(&node->plist); | ||
213 | } | ||
214 | |||
215 | /* All functions below assume the plist_head is not empty. */ | ||
216 | |||
217 | /** | ||
218 | * plist_first_entry - get the struct for the first entry | ||
219 | * | ||
220 | * @ptr: the &struct plist_head pointer. | ||
221 | * @type: the type of the struct this is embedded in. | ||
222 | * @member: the name of the list_struct within the struct. | ||
223 | */ | ||
224 | #ifdef CONFIG_DEBUG_PI_LIST | ||
225 | # define plist_first_entry(head, type, member) \ | ||
226 | ({ \ | ||
227 | WARN_ON(plist_head_empty(head)); \ | ||
228 | container_of(plist_first(head), type, member); \ | ||
229 | }) | ||
230 | #else | ||
231 | # define plist_first_entry(head, type, member) \ | ||
232 | container_of(plist_first(head), type, member) | ||
233 | #endif | ||
234 | |||
235 | /** | ||
236 | * plist_first - return the first node (and thus, highest priority) | ||
237 | * | ||
238 | * @head: the &struct plist_head pointer | ||
239 | * | ||
240 | * Assumes the plist is _not_ empty. | ||
241 | */ | ||
242 | static inline struct plist_node* plist_first(const struct plist_head *head) | ||
243 | { | ||
244 | return list_entry(head->node_list.next, | ||
245 | struct plist_node, plist.node_list); | ||
246 | } | ||
247 | |||
248 | #endif | ||
diff --git a/include/linux/pnp.h b/include/linux/pnp.h index 93b0959eb4..ab8a8dd8d6 100644 --- a/include/linux/pnp.h +++ b/include/linux/pnp.h | |||
@@ -389,7 +389,8 @@ int pnp_start_dev(struct pnp_dev *dev); | |||
389 | int pnp_stop_dev(struct pnp_dev *dev); | 389 | int pnp_stop_dev(struct pnp_dev *dev); |
390 | int pnp_activate_dev(struct pnp_dev *dev); | 390 | int pnp_activate_dev(struct pnp_dev *dev); |
391 | int pnp_disable_dev(struct pnp_dev *dev); | 391 | int pnp_disable_dev(struct pnp_dev *dev); |
392 | void pnp_resource_change(struct resource *resource, unsigned long start, unsigned long size); | 392 | void pnp_resource_change(struct resource *resource, resource_size_t start, |
393 | resource_size_t size); | ||
393 | 394 | ||
394 | /* protocol helpers */ | 395 | /* protocol helpers */ |
395 | int pnp_is_active(struct pnp_dev * dev); | 396 | int pnp_is_active(struct pnp_dev * dev); |
@@ -434,7 +435,9 @@ static inline int pnp_start_dev(struct pnp_dev *dev) { return -ENODEV; } | |||
434 | static inline int pnp_stop_dev(struct pnp_dev *dev) { return -ENODEV; } | 435 | static inline int pnp_stop_dev(struct pnp_dev *dev) { return -ENODEV; } |
435 | static inline int pnp_activate_dev(struct pnp_dev *dev) { return -ENODEV; } | 436 | static inline int pnp_activate_dev(struct pnp_dev *dev) { return -ENODEV; } |
436 | static inline int pnp_disable_dev(struct pnp_dev *dev) { return -ENODEV; } | 437 | static inline int pnp_disable_dev(struct pnp_dev *dev) { return -ENODEV; } |
437 | static inline void pnp_resource_change(struct resource *resource, unsigned long start, unsigned long size) { } | 438 | static inline void pnp_resource_change(struct resource *resource, |
439 | resource_size_t start, | ||
440 | resource_size_t size) { } | ||
438 | 441 | ||
439 | /* protocol helpers */ | 442 | /* protocol helpers */ |
440 | static inline int pnp_is_active(struct pnp_dev * dev) { return 0; } | 443 | static inline int pnp_is_active(struct pnp_dev * dev) { return 0; } |
diff --git a/include/linux/poison.h b/include/linux/poison.h new file mode 100644 index 0000000000..a5347c0243 --- /dev/null +++ b/include/linux/poison.h | |||
@@ -0,0 +1,58 @@ | |||
1 | #ifndef _LINUX_POISON_H | ||
2 | #define _LINUX_POISON_H | ||
3 | |||
4 | /********** include/linux/list.h **********/ | ||
5 | /* | ||
6 | * These are non-NULL pointers that will result in page faults | ||
7 | * under normal circumstances, used to verify that nobody uses | ||
8 | * non-initialized list entries. | ||
9 | */ | ||
10 | #define LIST_POISON1 ((void *) 0x00100100) | ||
11 | #define LIST_POISON2 ((void *) 0x00200200) | ||
12 | |||
13 | /********** mm/slab.c **********/ | ||
14 | /* | ||
15 | * Magic nums for obj red zoning. | ||
16 | * Placed in the first word before and the first word after an obj. | ||
17 | */ | ||
18 | #define RED_INACTIVE 0x5A2CF071UL /* when obj is inactive */ | ||
19 | #define RED_ACTIVE 0x170FC2A5UL /* when obj is active */ | ||
20 | |||
21 | /* ...and for poisoning */ | ||
22 | #define POISON_INUSE 0x5a /* for use-uninitialised poisoning */ | ||
23 | #define POISON_FREE 0x6b /* for use-after-free poisoning */ | ||
24 | #define POISON_END 0xa5 /* end-byte of poisoning */ | ||
25 | |||
26 | /********** arch/$ARCH/mm/init.c **********/ | ||
27 | #define POISON_FREE_INITMEM 0xcc | ||
28 | |||
29 | /********** arch/x86_64/mm/init.c **********/ | ||
30 | #define POISON_FREE_INITDATA 0xba | ||
31 | |||
32 | /********** arch/ia64/hp/common/sba_iommu.c **********/ | ||
33 | /* | ||
34 | * arch/ia64/hp/common/sba_iommu.c uses a 16-byte poison string with a | ||
35 | * value of "SBAIOMMU POISON\0" for spill-over poisoning. | ||
36 | */ | ||
37 | |||
38 | /********** fs/jbd/journal.c **********/ | ||
39 | #define JBD_POISON_FREE 0x5b | ||
40 | |||
41 | /********** drivers/base/dmapool.c **********/ | ||
42 | #define POOL_POISON_FREED 0xa7 /* !inuse */ | ||
43 | #define POOL_POISON_ALLOCATED 0xa9 /* !initted */ | ||
44 | |||
45 | /********** drivers/atm/ **********/ | ||
46 | #define ATM_POISON_FREE 0x12 | ||
47 | |||
48 | /********** kernel/mutexes **********/ | ||
49 | #define MUTEX_DEBUG_INIT 0x11 | ||
50 | #define MUTEX_DEBUG_FREE 0x22 | ||
51 | |||
52 | /********** security/ **********/ | ||
53 | #define KEY_DESTROY 0xbd | ||
54 | |||
55 | /********** sound/oss/ **********/ | ||
56 | #define OSS_POISON_FREE 0xAB | ||
57 | |||
58 | #endif | ||
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 5810d28fbe..17e75783e3 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -99,9 +99,8 @@ extern void proc_misc_init(void); | |||
99 | 99 | ||
100 | struct mm_struct; | 100 | struct mm_struct; |
101 | 101 | ||
102 | void proc_flush_task(struct task_struct *task); | ||
102 | struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *); | 103 | struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *); |
103 | struct dentry *proc_pid_unhash(struct task_struct *p); | ||
104 | void proc_pid_flush(struct dentry *proc_dentry); | ||
105 | int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir); | 104 | int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir); |
106 | unsigned long task_vsize(struct mm_struct *); | 105 | unsigned long task_vsize(struct mm_struct *); |
107 | int task_statm(struct mm_struct *, int *, int *, int *, int *); | 106 | int task_statm(struct mm_struct *, int *, int *, int *, int *); |
@@ -211,8 +210,7 @@ static inline void proc_net_remove(const char *name) | |||
211 | #define proc_net_create(name, mode, info) ({ (void)(mode), NULL; }) | 210 | #define proc_net_create(name, mode, info) ({ (void)(mode), NULL; }) |
212 | static inline void proc_net_remove(const char *name) {} | 211 | static inline void proc_net_remove(const char *name) {} |
213 | 212 | ||
214 | static inline struct dentry *proc_pid_unhash(struct task_struct *p) { return NULL; } | 213 | static inline void proc_flush_task(struct task_struct *task) { } |
215 | static inline void proc_pid_flush(struct dentry *proc_dentry) { } | ||
216 | 214 | ||
217 | static inline struct proc_dir_entry *create_proc_entry(const char *name, | 215 | static inline struct proc_dir_entry *create_proc_entry(const char *name, |
218 | mode_t mode, struct proc_dir_entry *parent) { return NULL; } | 216 | mode_t mode, struct proc_dir_entry *parent) { return NULL; } |
@@ -248,8 +246,8 @@ extern void kclist_add(struct kcore_list *, void *, size_t); | |||
248 | #endif | 246 | #endif |
249 | 247 | ||
250 | struct proc_inode { | 248 | struct proc_inode { |
251 | struct task_struct *task; | 249 | struct pid *pid; |
252 | int type; | 250 | int fd; |
253 | union { | 251 | union { |
254 | int (*proc_get_link)(struct inode *, struct dentry **, struct vfsmount **); | 252 | int (*proc_get_link)(struct inode *, struct dentry **, struct vfsmount **); |
255 | int (*proc_read)(struct task_struct *task, char *page); | 253 | int (*proc_read)(struct task_struct *task, char *page); |
@@ -268,4 +266,10 @@ static inline struct proc_dir_entry *PDE(const struct inode *inode) | |||
268 | return PROC_I(inode)->pde; | 266 | return PROC_I(inode)->pde; |
269 | } | 267 | } |
270 | 268 | ||
269 | struct proc_maps_private { | ||
270 | struct pid *pid; | ||
271 | struct task_struct *task; | ||
272 | struct vm_area_struct *tail_vma; | ||
273 | }; | ||
274 | |||
271 | #endif /* _LINUX_PROC_FS_H */ | 275 | #endif /* _LINUX_PROC_FS_H */ |
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index ee918bc6e1..8b2749a259 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
@@ -88,7 +88,6 @@ extern int ptrace_readdata(struct task_struct *tsk, unsigned long src, char __us | |||
88 | extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len); | 88 | extern int ptrace_writedata(struct task_struct *tsk, char __user *src, unsigned long dst, int len); |
89 | extern int ptrace_attach(struct task_struct *tsk); | 89 | extern int ptrace_attach(struct task_struct *tsk); |
90 | extern int ptrace_detach(struct task_struct *, unsigned int); | 90 | extern int ptrace_detach(struct task_struct *, unsigned int); |
91 | extern void __ptrace_detach(struct task_struct *, unsigned int); | ||
92 | extern void ptrace_disable(struct task_struct *); | 91 | extern void ptrace_disable(struct task_struct *); |
93 | extern int ptrace_check_attach(struct task_struct *task, int kill); | 92 | extern int ptrace_check_attach(struct task_struct *task, int kill); |
94 | extern int ptrace_request(struct task_struct *child, long request, long addr, long data); | 93 | extern int ptrace_request(struct task_struct *child, long request, long addr, long data); |
diff --git a/include/linux/raid/bitmap.h b/include/linux/raid/bitmap.h index 899437802a..63df898fe2 100644 --- a/include/linux/raid/bitmap.h +++ b/include/linux/raid/bitmap.h | |||
@@ -140,6 +140,7 @@ typedef __u16 bitmap_counter_t; | |||
140 | enum bitmap_state { | 140 | enum bitmap_state { |
141 | BITMAP_ACTIVE = 0x001, /* the bitmap is in use */ | 141 | BITMAP_ACTIVE = 0x001, /* the bitmap is in use */ |
142 | BITMAP_STALE = 0x002, /* the bitmap file is out of date or had -EIO */ | 142 | BITMAP_STALE = 0x002, /* the bitmap file is out of date or had -EIO */ |
143 | BITMAP_WRITE_ERROR = 0x004, /* A write error has occurred */ | ||
143 | BITMAP_HOSTENDIAN = 0x8000, | 144 | BITMAP_HOSTENDIAN = 0x8000, |
144 | }; | 145 | }; |
145 | 146 | ||
@@ -244,15 +245,9 @@ struct bitmap { | |||
244 | unsigned long daemon_lastrun; /* jiffies of last run */ | 245 | unsigned long daemon_lastrun; /* jiffies of last run */ |
245 | unsigned long daemon_sleep; /* how many seconds between updates? */ | 246 | unsigned long daemon_sleep; /* how many seconds between updates? */ |
246 | 247 | ||
247 | /* | 248 | atomic_t pending_writes; /* pending writes to the bitmap file */ |
248 | * bitmap_writeback_daemon waits for file-pages that have been written, | ||
249 | * as there is no way to get a call-back when a page write completes. | ||
250 | */ | ||
251 | mdk_thread_t *writeback_daemon; | ||
252 | spinlock_t write_lock; | ||
253 | wait_queue_head_t write_wait; | 249 | wait_queue_head_t write_wait; |
254 | struct list_head complete_pages; | 250 | |
255 | mempool_t *write_pool; | ||
256 | }; | 251 | }; |
257 | 252 | ||
258 | /* the bitmap API */ | 253 | /* the bitmap API */ |
diff --git a/include/linux/raid/linear.h b/include/linux/raid/linear.h index 7eaf290e10..ba15469daf 100644 --- a/include/linux/raid/linear.h +++ b/include/linux/raid/linear.h | |||
@@ -13,8 +13,10 @@ typedef struct dev_info dev_info_t; | |||
13 | 13 | ||
14 | struct linear_private_data | 14 | struct linear_private_data |
15 | { | 15 | { |
16 | struct linear_private_data *prev; /* earlier version */ | ||
16 | dev_info_t **hash_table; | 17 | dev_info_t **hash_table; |
17 | sector_t hash_spacing; | 18 | sector_t hash_spacing; |
19 | sector_t array_size; | ||
18 | int preshift; /* shift before dividing by hash_spacing */ | 20 | int preshift; /* shift before dividing by hash_spacing */ |
19 | dev_info_t disks[0]; | 21 | dev_info_t disks[0]; |
20 | }; | 22 | }; |
diff --git a/include/linux/raid/md.h b/include/linux/raid/md.h index 66b44e5e0d..eb3e547c8f 100644 --- a/include/linux/raid/md.h +++ b/include/linux/raid/md.h | |||
@@ -85,8 +85,6 @@ extern void md_done_sync(mddev_t *mddev, int blocks, int ok); | |||
85 | extern void md_error (mddev_t *mddev, mdk_rdev_t *rdev); | 85 | extern void md_error (mddev_t *mddev, mdk_rdev_t *rdev); |
86 | extern void md_unplug_mddev(mddev_t *mddev); | 86 | extern void md_unplug_mddev(mddev_t *mddev); |
87 | 87 | ||
88 | extern void md_print_devices (void); | ||
89 | |||
90 | extern void md_super_write(mddev_t *mddev, mdk_rdev_t *rdev, | 88 | extern void md_super_write(mddev_t *mddev, mdk_rdev_t *rdev, |
91 | sector_t sector, int size, struct page *page); | 89 | sector_t sector, int size, struct page *page); |
92 | extern void md_super_wait(mddev_t *mddev); | 90 | extern void md_super_wait(mddev_t *mddev); |
@@ -97,7 +95,5 @@ extern void md_new_event(mddev_t *mddev); | |||
97 | 95 | ||
98 | extern void md_update_sb(mddev_t * mddev); | 96 | extern void md_update_sb(mddev_t * mddev); |
99 | 97 | ||
100 | #define MD_BUG(x...) { printk("md: bug in file %s, line %d\n", __FILE__, __LINE__); md_print_devices(); } | ||
101 | |||
102 | #endif | 98 | #endif |
103 | 99 | ||
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index e2df61f5b0..c1e0ac55ba 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h | |||
@@ -40,7 +40,8 @@ typedef struct mdk_rdev_s mdk_rdev_t; | |||
40 | * options passed in raidrun: | 40 | * options passed in raidrun: |
41 | */ | 41 | */ |
42 | 42 | ||
43 | #define MAX_CHUNK_SIZE (4096*1024) | 43 | /* Currently this must fix in an 'int' */ |
44 | #define MAX_CHUNK_SIZE (1<<30) | ||
44 | 45 | ||
45 | /* | 46 | /* |
46 | * MD's 'extended' device | 47 | * MD's 'extended' device |
@@ -57,6 +58,7 @@ struct mdk_rdev_s | |||
57 | 58 | ||
58 | struct page *sb_page; | 59 | struct page *sb_page; |
59 | int sb_loaded; | 60 | int sb_loaded; |
61 | __u64 sb_events; | ||
60 | sector_t data_offset; /* start of data in array */ | 62 | sector_t data_offset; /* start of data in array */ |
61 | sector_t sb_offset; | 63 | sector_t sb_offset; |
62 | int sb_size; /* bytes in the superblock */ | 64 | int sb_size; /* bytes in the superblock */ |
@@ -87,6 +89,10 @@ struct mdk_rdev_s | |||
87 | * array and could again if we did a partial | 89 | * array and could again if we did a partial |
88 | * resync from the bitmap | 90 | * resync from the bitmap |
89 | */ | 91 | */ |
92 | sector_t recovery_offset;/* If this device has been partially | ||
93 | * recovered, this is where we were | ||
94 | * up to. | ||
95 | */ | ||
90 | 96 | ||
91 | atomic_t nr_pending; /* number of pending requests. | 97 | atomic_t nr_pending; /* number of pending requests. |
92 | * only maintained for arrays that | 98 | * only maintained for arrays that |
@@ -182,6 +188,8 @@ struct mddev_s | |||
182 | #define MD_RECOVERY_REQUESTED 6 | 188 | #define MD_RECOVERY_REQUESTED 6 |
183 | #define MD_RECOVERY_CHECK 7 | 189 | #define MD_RECOVERY_CHECK 7 |
184 | #define MD_RECOVERY_RESHAPE 8 | 190 | #define MD_RECOVERY_RESHAPE 8 |
191 | #define MD_RECOVERY_FROZEN 9 | ||
192 | |||
185 | unsigned long recovery; | 193 | unsigned long recovery; |
186 | 194 | ||
187 | int in_sync; /* know to not need resync */ | 195 | int in_sync; /* know to not need resync */ |
diff --git a/include/linux/raid/md_p.h b/include/linux/raid/md_p.h index f1fbae7e39..b6ebc69bae 100644 --- a/include/linux/raid/md_p.h +++ b/include/linux/raid/md_p.h | |||
@@ -265,9 +265,12 @@ struct mdp_superblock_1 { | |||
265 | 265 | ||
266 | /* feature_map bits */ | 266 | /* feature_map bits */ |
267 | #define MD_FEATURE_BITMAP_OFFSET 1 | 267 | #define MD_FEATURE_BITMAP_OFFSET 1 |
268 | #define MD_FEATURE_RECOVERY_OFFSET 2 /* recovery_offset is present and | ||
269 | * must be honoured | ||
270 | */ | ||
268 | #define MD_FEATURE_RESHAPE_ACTIVE 4 | 271 | #define MD_FEATURE_RESHAPE_ACTIVE 4 |
269 | 272 | ||
270 | #define MD_FEATURE_ALL 5 | 273 | #define MD_FEATURE_ALL (1|2|4) |
271 | 274 | ||
272 | #endif | 275 | #endif |
273 | 276 | ||
diff --git a/include/linux/raid/raid10.h b/include/linux/raid/raid10.h index b1103298a8..c41e56a7c0 100644 --- a/include/linux/raid/raid10.h +++ b/include/linux/raid/raid10.h | |||
@@ -24,11 +24,16 @@ struct r10_private_data_s { | |||
24 | int far_copies; /* number of copies layed out | 24 | int far_copies; /* number of copies layed out |
25 | * at large strides across drives | 25 | * at large strides across drives |
26 | */ | 26 | */ |
27 | int far_offset; /* far_copies are offset by 1 stripe | ||
28 | * instead of many | ||
29 | */ | ||
27 | int copies; /* near_copies * far_copies. | 30 | int copies; /* near_copies * far_copies. |
28 | * must be <= raid_disks | 31 | * must be <= raid_disks |
29 | */ | 32 | */ |
30 | sector_t stride; /* distance between far copies. | 33 | sector_t stride; /* distance between far copies. |
31 | * This is size / far_copies | 34 | * This is size / far_copies unless |
35 | * far_offset, in which case it is | ||
36 | * 1 stripe. | ||
32 | */ | 37 | */ |
33 | 38 | ||
34 | int chunk_shift; /* shift from chunks to sectors */ | 39 | int chunk_shift; /* shift from chunks to sectors */ |
diff --git a/include/linux/raid/raid5.h b/include/linux/raid/raid5.h index 914af66704..20ed4c9976 100644 --- a/include/linux/raid/raid5.h +++ b/include/linux/raid/raid5.h | |||
@@ -212,6 +212,7 @@ struct raid5_private_data { | |||
212 | mddev_t *mddev; | 212 | mddev_t *mddev; |
213 | struct disk_info *spare; | 213 | struct disk_info *spare; |
214 | int chunk_size, level, algorithm; | 214 | int chunk_size, level, algorithm; |
215 | int max_degraded; | ||
215 | int raid_disks, working_disks, failed_disks; | 216 | int raid_disks, working_disks, failed_disks; |
216 | int max_nr_stripes; | 217 | int max_nr_stripes; |
217 | 218 | ||
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 6312758393..48dfe00070 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -258,6 +258,7 @@ extern void rcu_init(void); | |||
258 | extern void rcu_check_callbacks(int cpu, int user); | 258 | extern void rcu_check_callbacks(int cpu, int user); |
259 | extern void rcu_restart_cpu(int cpu); | 259 | extern void rcu_restart_cpu(int cpu); |
260 | extern long rcu_batches_completed(void); | 260 | extern long rcu_batches_completed(void); |
261 | extern long rcu_batches_completed_bh(void); | ||
261 | 262 | ||
262 | /* Exported interfaces */ | 263 | /* Exported interfaces */ |
263 | extern void FASTCALL(call_rcu(struct rcu_head *head, | 264 | extern void FASTCALL(call_rcu(struct rcu_head *head, |
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index 5676c4210e..daa2d83cef 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -1973,7 +1973,7 @@ void reiserfs_unmap_buffer(struct buffer_head *); | |||
1973 | /* file.c */ | 1973 | /* file.c */ |
1974 | extern struct inode_operations reiserfs_file_inode_operations; | 1974 | extern struct inode_operations reiserfs_file_inode_operations; |
1975 | extern const struct file_operations reiserfs_file_operations; | 1975 | extern const struct file_operations reiserfs_file_operations; |
1976 | extern struct address_space_operations reiserfs_address_space_operations; | 1976 | extern const struct address_space_operations reiserfs_address_space_operations; |
1977 | 1977 | ||
1978 | /* fix_nodes.c */ | 1978 | /* fix_nodes.c */ |
1979 | 1979 | ||
diff --git a/include/linux/rtmutex.h b/include/linux/rtmutex.h new file mode 100644 index 0000000000..fa4a3b82ba --- /dev/null +++ b/include/linux/rtmutex.h | |||
@@ -0,0 +1,117 @@ | |||
1 | /* | ||
2 | * RT Mutexes: blocking mutual exclusion locks with PI support | ||
3 | * | ||
4 | * started by Ingo Molnar and Thomas Gleixner: | ||
5 | * | ||
6 | * Copyright (C) 2004-2006 Red Hat, Inc., Ingo Molnar <mingo@redhat.com> | ||
7 | * Copyright (C) 2006, Timesys Corp., Thomas Gleixner <tglx@timesys.com> | ||
8 | * | ||
9 | * This file contains the public data structure and API definitions. | ||
10 | */ | ||
11 | |||
12 | #ifndef __LINUX_RT_MUTEX_H | ||
13 | #define __LINUX_RT_MUTEX_H | ||
14 | |||
15 | #include <linux/linkage.h> | ||
16 | #include <linux/plist.h> | ||
17 | #include <linux/spinlock_types.h> | ||
18 | |||
19 | /* | ||
20 | * The rt_mutex structure | ||
21 | * | ||
22 | * @wait_lock: spinlock to protect the structure | ||
23 | * @wait_list: pilist head to enqueue waiters in priority order | ||
24 | * @owner: the mutex owner | ||
25 | */ | ||
26 | struct rt_mutex { | ||
27 | spinlock_t wait_lock; | ||
28 | struct plist_head wait_list; | ||
29 | struct task_struct *owner; | ||
30 | #ifdef CONFIG_DEBUG_RT_MUTEXES | ||
31 | int save_state; | ||
32 | struct list_head held_list_entry; | ||
33 | unsigned long acquire_ip; | ||
34 | const char *name, *file; | ||
35 | int line; | ||
36 | void *magic; | ||
37 | #endif | ||
38 | }; | ||
39 | |||
40 | struct rt_mutex_waiter; | ||
41 | struct hrtimer_sleeper; | ||
42 | |||
43 | #ifdef CONFIG_DEBUG_RT_MUTEXES | ||
44 | extern int rt_mutex_debug_check_no_locks_freed(const void *from, | ||
45 | unsigned long len); | ||
46 | extern void rt_mutex_debug_check_no_locks_held(struct task_struct *task); | ||
47 | #else | ||
48 | static inline int rt_mutex_debug_check_no_locks_freed(const void *from, | ||
49 | unsigned long len) | ||
50 | { | ||
51 | return 0; | ||
52 | } | ||
53 | # define rt_mutex_debug_check_no_locks_held(task) do { } while (0) | ||
54 | #endif | ||
55 | |||
56 | #ifdef CONFIG_DEBUG_RT_MUTEXES | ||
57 | # define __DEBUG_RT_MUTEX_INITIALIZER(mutexname) \ | ||
58 | , .name = #mutexname, .file = __FILE__, .line = __LINE__ | ||
59 | # define rt_mutex_init(mutex) __rt_mutex_init(mutex, __FUNCTION__) | ||
60 | extern void rt_mutex_debug_task_free(struct task_struct *tsk); | ||
61 | #else | ||
62 | # define __DEBUG_RT_MUTEX_INITIALIZER(mutexname) | ||
63 | # define rt_mutex_init(mutex) __rt_mutex_init(mutex, NULL) | ||
64 | # define rt_mutex_debug_task_free(t) do { } while (0) | ||
65 | #endif | ||
66 | |||
67 | #define __RT_MUTEX_INITIALIZER(mutexname) \ | ||
68 | { .wait_lock = SPIN_LOCK_UNLOCKED \ | ||
69 | , .wait_list = PLIST_HEAD_INIT(mutexname.wait_list, mutexname.wait_lock) \ | ||
70 | , .owner = NULL \ | ||
71 | __DEBUG_RT_MUTEX_INITIALIZER(mutexname)} | ||
72 | |||
73 | #define DEFINE_RT_MUTEX(mutexname) \ | ||
74 | struct rt_mutex mutexname = __RT_MUTEX_INITIALIZER(mutexname) | ||
75 | |||
76 | /*** | ||
77 | * rt_mutex_is_locked - is the mutex locked | ||
78 | * @lock: the mutex to be queried | ||
79 | * | ||
80 | * Returns 1 if the mutex is locked, 0 if unlocked. | ||
81 | */ | ||
82 | static inline int rt_mutex_is_locked(struct rt_mutex *lock) | ||
83 | { | ||
84 | return lock->owner != NULL; | ||
85 | } | ||
86 | |||
87 | extern void __rt_mutex_init(struct rt_mutex *lock, const char *name); | ||
88 | extern void rt_mutex_destroy(struct rt_mutex *lock); | ||
89 | |||
90 | extern void rt_mutex_lock(struct rt_mutex *lock); | ||
91 | extern int rt_mutex_lock_interruptible(struct rt_mutex *lock, | ||
92 | int detect_deadlock); | ||
93 | extern int rt_mutex_timed_lock(struct rt_mutex *lock, | ||
94 | struct hrtimer_sleeper *timeout, | ||
95 | int detect_deadlock); | ||
96 | |||
97 | extern int rt_mutex_trylock(struct rt_mutex *lock); | ||
98 | |||
99 | extern void rt_mutex_unlock(struct rt_mutex *lock); | ||
100 | |||
101 | #ifdef CONFIG_DEBUG_RT_MUTEXES | ||
102 | # define INIT_RT_MUTEX_DEBUG(tsk) \ | ||
103 | .held_list_head = LIST_HEAD_INIT(tsk.held_list_head), \ | ||
104 | .held_list_lock = SPIN_LOCK_UNLOCKED | ||
105 | #else | ||
106 | # define INIT_RT_MUTEX_DEBUG(tsk) | ||
107 | #endif | ||
108 | |||
109 | #ifdef CONFIG_RT_MUTEXES | ||
110 | # define INIT_RT_MUTEXES(tsk) \ | ||
111 | .pi_waiters = PLIST_HEAD_INIT(tsk.pi_waiters, tsk.pi_lock), \ | ||
112 | INIT_RT_MUTEX_DEBUG(tsk) | ||
113 | #else | ||
114 | # define INIT_RT_MUTEXES(tsk) | ||
115 | #endif | ||
116 | |||
117 | #endif | ||
diff --git a/include/linux/sched.h b/include/linux/sched.h index 8d11d9310d..821f0481eb 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -73,6 +73,7 @@ struct sched_param { | |||
73 | #include <linux/seccomp.h> | 73 | #include <linux/seccomp.h> |
74 | #include <linux/rcupdate.h> | 74 | #include <linux/rcupdate.h> |
75 | #include <linux/futex.h> | 75 | #include <linux/futex.h> |
76 | #include <linux/rtmutex.h> | ||
76 | 77 | ||
77 | #include <linux/time.h> | 78 | #include <linux/time.h> |
78 | #include <linux/param.h> | 79 | #include <linux/param.h> |
@@ -83,6 +84,7 @@ struct sched_param { | |||
83 | #include <asm/processor.h> | 84 | #include <asm/processor.h> |
84 | 85 | ||
85 | struct exec_domain; | 86 | struct exec_domain; |
87 | struct futex_pi_state; | ||
86 | 88 | ||
87 | /* | 89 | /* |
88 | * List of flags we want to share for kernel threads, | 90 | * List of flags we want to share for kernel threads, |
@@ -123,6 +125,7 @@ extern unsigned long nr_running(void); | |||
123 | extern unsigned long nr_uninterruptible(void); | 125 | extern unsigned long nr_uninterruptible(void); |
124 | extern unsigned long nr_active(void); | 126 | extern unsigned long nr_active(void); |
125 | extern unsigned long nr_iowait(void); | 127 | extern unsigned long nr_iowait(void); |
128 | extern unsigned long weighted_cpuload(const int cpu); | ||
126 | 129 | ||
127 | 130 | ||
128 | /* | 131 | /* |
@@ -494,8 +497,11 @@ struct signal_struct { | |||
494 | 497 | ||
495 | #define MAX_PRIO (MAX_RT_PRIO + 40) | 498 | #define MAX_PRIO (MAX_RT_PRIO + 40) |
496 | 499 | ||
497 | #define rt_task(p) (unlikely((p)->prio < MAX_RT_PRIO)) | 500 | #define rt_prio(prio) unlikely((prio) < MAX_RT_PRIO) |
501 | #define rt_task(p) rt_prio((p)->prio) | ||
498 | #define batch_task(p) (unlikely((p)->policy == SCHED_BATCH)) | 502 | #define batch_task(p) (unlikely((p)->policy == SCHED_BATCH)) |
503 | #define has_rt_policy(p) \ | ||
504 | unlikely((p)->policy != SCHED_NORMAL && (p)->policy != SCHED_BATCH) | ||
499 | 505 | ||
500 | /* | 506 | /* |
501 | * Some day this will be a full-fledged user tracking system.. | 507 | * Some day this will be a full-fledged user tracking system.. |
@@ -558,9 +564,9 @@ enum idle_type | |||
558 | /* | 564 | /* |
559 | * sched-domains (multiprocessor balancing) declarations: | 565 | * sched-domains (multiprocessor balancing) declarations: |
560 | */ | 566 | */ |
561 | #ifdef CONFIG_SMP | ||
562 | #define SCHED_LOAD_SCALE 128UL /* increase resolution of load */ | 567 | #define SCHED_LOAD_SCALE 128UL /* increase resolution of load */ |
563 | 568 | ||
569 | #ifdef CONFIG_SMP | ||
564 | #define SD_LOAD_BALANCE 1 /* Do load balancing on this domain. */ | 570 | #define SD_LOAD_BALANCE 1 /* Do load balancing on this domain. */ |
565 | #define SD_BALANCE_NEWIDLE 2 /* Balance when about to become idle */ | 571 | #define SD_BALANCE_NEWIDLE 2 /* Balance when about to become idle */ |
566 | #define SD_BALANCE_EXEC 4 /* Balance on exec */ | 572 | #define SD_BALANCE_EXEC 4 /* Balance on exec */ |
@@ -569,6 +575,11 @@ enum idle_type | |||
569 | #define SD_WAKE_AFFINE 32 /* Wake task to waking CPU */ | 575 | #define SD_WAKE_AFFINE 32 /* Wake task to waking CPU */ |
570 | #define SD_WAKE_BALANCE 64 /* Perform balancing at task wakeup */ | 576 | #define SD_WAKE_BALANCE 64 /* Perform balancing at task wakeup */ |
571 | #define SD_SHARE_CPUPOWER 128 /* Domain members share cpu power */ | 577 | #define SD_SHARE_CPUPOWER 128 /* Domain members share cpu power */ |
578 | #define SD_POWERSAVINGS_BALANCE 256 /* Balance for power savings */ | ||
579 | |||
580 | #define BALANCE_FOR_POWER ((sched_mc_power_savings || sched_smt_power_savings) \ | ||
581 | ? SD_POWERSAVINGS_BALANCE : 0) | ||
582 | |||
572 | 583 | ||
573 | struct sched_group { | 584 | struct sched_group { |
574 | struct sched_group *next; /* Must be a circular list */ | 585 | struct sched_group *next; /* Must be a circular list */ |
@@ -638,7 +649,7 @@ struct sched_domain { | |||
638 | #endif | 649 | #endif |
639 | }; | 650 | }; |
640 | 651 | ||
641 | extern void partition_sched_domains(cpumask_t *partition1, | 652 | extern int partition_sched_domains(cpumask_t *partition1, |
642 | cpumask_t *partition2); | 653 | cpumask_t *partition2); |
643 | 654 | ||
644 | /* | 655 | /* |
@@ -713,10 +724,13 @@ struct task_struct { | |||
713 | 724 | ||
714 | int lock_depth; /* BKL lock depth */ | 725 | int lock_depth; /* BKL lock depth */ |
715 | 726 | ||
716 | #if defined(CONFIG_SMP) && defined(__ARCH_WANT_UNLOCKED_CTXSW) | 727 | #ifdef CONFIG_SMP |
728 | #ifdef __ARCH_WANT_UNLOCKED_CTXSW | ||
717 | int oncpu; | 729 | int oncpu; |
718 | #endif | 730 | #endif |
719 | int prio, static_prio; | 731 | #endif |
732 | int load_weight; /* for niceness load balancing purposes */ | ||
733 | int prio, static_prio, normal_prio; | ||
720 | struct list_head run_list; | 734 | struct list_head run_list; |
721 | prio_array_t *array; | 735 | prio_array_t *array; |
722 | 736 | ||
@@ -842,8 +856,20 @@ struct task_struct { | |||
842 | u32 self_exec_id; | 856 | u32 self_exec_id; |
843 | /* Protection of (de-)allocation: mm, files, fs, tty, keyrings */ | 857 | /* Protection of (de-)allocation: mm, files, fs, tty, keyrings */ |
844 | spinlock_t alloc_lock; | 858 | spinlock_t alloc_lock; |
845 | /* Protection of proc_dentry: nesting proc_lock, dcache_lock, write_lock_irq(&tasklist_lock); */ | 859 | |
846 | spinlock_t proc_lock; | 860 | /* Protection of the PI data structures: */ |
861 | spinlock_t pi_lock; | ||
862 | |||
863 | #ifdef CONFIG_RT_MUTEXES | ||
864 | /* PI waiters blocked on a rt_mutex held by this task */ | ||
865 | struct plist_head pi_waiters; | ||
866 | /* Deadlock detection and priority inheritance handling */ | ||
867 | struct rt_mutex_waiter *pi_blocked_on; | ||
868 | # ifdef CONFIG_DEBUG_RT_MUTEXES | ||
869 | spinlock_t held_list_lock; | ||
870 | struct list_head held_list_head; | ||
871 | # endif | ||
872 | #endif | ||
847 | 873 | ||
848 | #ifdef CONFIG_DEBUG_MUTEXES | 874 | #ifdef CONFIG_DEBUG_MUTEXES |
849 | /* mutex deadlock detection */ | 875 | /* mutex deadlock detection */ |
@@ -856,7 +882,6 @@ struct task_struct { | |||
856 | /* VM state */ | 882 | /* VM state */ |
857 | struct reclaim_state *reclaim_state; | 883 | struct reclaim_state *reclaim_state; |
858 | 884 | ||
859 | struct dentry *proc_dentry; | ||
860 | struct backing_dev_info *backing_dev_info; | 885 | struct backing_dev_info *backing_dev_info; |
861 | 886 | ||
862 | struct io_context *io_context; | 887 | struct io_context *io_context; |
@@ -891,6 +916,8 @@ struct task_struct { | |||
891 | #ifdef CONFIG_COMPAT | 916 | #ifdef CONFIG_COMPAT |
892 | struct compat_robust_list_head __user *compat_robust_list; | 917 | struct compat_robust_list_head __user *compat_robust_list; |
893 | #endif | 918 | #endif |
919 | struct list_head pi_state_list; | ||
920 | struct futex_pi_state *pi_state_cache; | ||
894 | 921 | ||
895 | atomic_t fs_excl; /* holding fs exclusive resources */ | 922 | atomic_t fs_excl; /* holding fs exclusive resources */ |
896 | struct rcu_head rcu; | 923 | struct rcu_head rcu; |
@@ -958,6 +985,7 @@ static inline void put_task_struct(struct task_struct *t) | |||
958 | #define PF_SPREAD_PAGE 0x01000000 /* Spread page cache over cpuset */ | 985 | #define PF_SPREAD_PAGE 0x01000000 /* Spread page cache over cpuset */ |
959 | #define PF_SPREAD_SLAB 0x02000000 /* Spread some slab caches over cpuset */ | 986 | #define PF_SPREAD_SLAB 0x02000000 /* Spread some slab caches over cpuset */ |
960 | #define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */ | 987 | #define PF_MEMPOLICY 0x10000000 /* Non-default NUMA mempolicy */ |
988 | #define PF_MUTEX_TESTER 0x20000000 /* Thread belongs to the rt mutex tester */ | ||
961 | 989 | ||
962 | /* | 990 | /* |
963 | * Only the _current_ task can read/write to tsk->flags, but other | 991 | * Only the _current_ task can read/write to tsk->flags, but other |
@@ -1012,6 +1040,19 @@ static inline void idle_task_exit(void) {} | |||
1012 | #endif | 1040 | #endif |
1013 | 1041 | ||
1014 | extern void sched_idle_next(void); | 1042 | extern void sched_idle_next(void); |
1043 | |||
1044 | #ifdef CONFIG_RT_MUTEXES | ||
1045 | extern int rt_mutex_getprio(task_t *p); | ||
1046 | extern void rt_mutex_setprio(task_t *p, int prio); | ||
1047 | extern void rt_mutex_adjust_pi(task_t *p); | ||
1048 | #else | ||
1049 | static inline int rt_mutex_getprio(task_t *p) | ||
1050 | { | ||
1051 | return p->normal_prio; | ||
1052 | } | ||
1053 | # define rt_mutex_adjust_pi(p) do { } while (0) | ||
1054 | #endif | ||
1055 | |||
1015 | extern void set_user_nice(task_t *p, long nice); | 1056 | extern void set_user_nice(task_t *p, long nice); |
1016 | extern int task_prio(const task_t *p); | 1057 | extern int task_prio(const task_t *p); |
1017 | extern int task_nice(const task_t *p); | 1058 | extern int task_nice(const task_t *p); |
@@ -1411,6 +1452,11 @@ static inline void arch_pick_mmap_layout(struct mm_struct *mm) | |||
1411 | extern long sched_setaffinity(pid_t pid, cpumask_t new_mask); | 1452 | extern long sched_setaffinity(pid_t pid, cpumask_t new_mask); |
1412 | extern long sched_getaffinity(pid_t pid, cpumask_t *mask); | 1453 | extern long sched_getaffinity(pid_t pid, cpumask_t *mask); |
1413 | 1454 | ||
1455 | #include <linux/sysdev.h> | ||
1456 | extern int sched_mc_power_savings, sched_smt_power_savings; | ||
1457 | extern struct sysdev_attribute attr_sched_mc_power_savings, attr_sched_smt_power_savings; | ||
1458 | extern int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls); | ||
1459 | |||
1414 | extern void normalize_rt_tasks(void); | 1460 | extern void normalize_rt_tasks(void); |
1415 | 1461 | ||
1416 | #ifdef CONFIG_PM | 1462 | #ifdef CONFIG_PM |
diff --git a/include/linux/scx200.h b/include/linux/scx200.h index a22f9e173a..693c0557e7 100644 --- a/include/linux/scx200.h +++ b/include/linux/scx200.h | |||
@@ -49,10 +49,3 @@ extern unsigned scx200_cb_base; | |||
49 | #define SCx200_REV 0x3d /* Revision Register */ | 49 | #define SCx200_REV 0x3d /* Revision Register */ |
50 | #define SCx200_CBA 0x3e /* Configuration Base Address Register */ | 50 | #define SCx200_CBA 0x3e /* Configuration Base Address Register */ |
51 | #define SCx200_CBA_SCRATCH 0x64 /* Configuration Base Address Scratchpad */ | 51 | #define SCx200_CBA_SCRATCH 0x64 /* Configuration Base Address Scratchpad */ |
52 | |||
53 | /* | ||
54 | Local variables: | ||
55 | compile-command: "make -C ../.. bzImage modules" | ||
56 | c-basic-offset: 8 | ||
57 | End: | ||
58 | */ | ||
diff --git a/include/linux/scx200_gpio.h b/include/linux/scx200_gpio.h index 30cdd648ba..90dd069cc1 100644 --- a/include/linux/scx200_gpio.h +++ b/include/linux/scx200_gpio.h | |||
@@ -1,6 +1,6 @@ | |||
1 | #include <linux/spinlock.h> | 1 | #include <linux/spinlock.h> |
2 | 2 | ||
3 | u32 scx200_gpio_configure(int index, u32 set, u32 clear); | 3 | u32 scx200_gpio_configure(unsigned index, u32 set, u32 clear); |
4 | 4 | ||
5 | extern unsigned scx200_gpio_base; | 5 | extern unsigned scx200_gpio_base; |
6 | extern long scx200_gpio_shadow[2]; | 6 | extern long scx200_gpio_shadow[2]; |
@@ -17,7 +17,7 @@ extern long scx200_gpio_shadow[2]; | |||
17 | 17 | ||
18 | /* returns the value of the GPIO pin */ | 18 | /* returns the value of the GPIO pin */ |
19 | 19 | ||
20 | static inline int scx200_gpio_get(int index) { | 20 | static inline int scx200_gpio_get(unsigned index) { |
21 | __SCx200_GPIO_BANK; | 21 | __SCx200_GPIO_BANK; |
22 | __SCx200_GPIO_IOADDR + 0x04; | 22 | __SCx200_GPIO_IOADDR + 0x04; |
23 | __SCx200_GPIO_INDEX; | 23 | __SCx200_GPIO_INDEX; |
@@ -29,7 +29,7 @@ static inline int scx200_gpio_get(int index) { | |||
29 | driven if the GPIO is configured as an output, it might not be the | 29 | driven if the GPIO is configured as an output, it might not be the |
30 | state of the GPIO right now if the GPIO is configured as an input) */ | 30 | state of the GPIO right now if the GPIO is configured as an input) */ |
31 | 31 | ||
32 | static inline int scx200_gpio_current(int index) { | 32 | static inline int scx200_gpio_current(unsigned index) { |
33 | __SCx200_GPIO_BANK; | 33 | __SCx200_GPIO_BANK; |
34 | __SCx200_GPIO_INDEX; | 34 | __SCx200_GPIO_INDEX; |
35 | 35 | ||
@@ -38,7 +38,7 @@ static inline int scx200_gpio_current(int index) { | |||
38 | 38 | ||
39 | /* drive the GPIO signal high */ | 39 | /* drive the GPIO signal high */ |
40 | 40 | ||
41 | static inline void scx200_gpio_set_high(int index) { | 41 | static inline void scx200_gpio_set_high(unsigned index) { |
42 | __SCx200_GPIO_BANK; | 42 | __SCx200_GPIO_BANK; |
43 | __SCx200_GPIO_IOADDR; | 43 | __SCx200_GPIO_IOADDR; |
44 | __SCx200_GPIO_SHADOW; | 44 | __SCx200_GPIO_SHADOW; |
@@ -49,7 +49,7 @@ static inline void scx200_gpio_set_high(int index) { | |||
49 | 49 | ||
50 | /* drive the GPIO signal low */ | 50 | /* drive the GPIO signal low */ |
51 | 51 | ||
52 | static inline void scx200_gpio_set_low(int index) { | 52 | static inline void scx200_gpio_set_low(unsigned index) { |
53 | __SCx200_GPIO_BANK; | 53 | __SCx200_GPIO_BANK; |
54 | __SCx200_GPIO_IOADDR; | 54 | __SCx200_GPIO_IOADDR; |
55 | __SCx200_GPIO_SHADOW; | 55 | __SCx200_GPIO_SHADOW; |
@@ -60,7 +60,7 @@ static inline void scx200_gpio_set_low(int index) { | |||
60 | 60 | ||
61 | /* drive the GPIO signal to state */ | 61 | /* drive the GPIO signal to state */ |
62 | 62 | ||
63 | static inline void scx200_gpio_set(int index, int state) { | 63 | static inline void scx200_gpio_set(unsigned index, int state) { |
64 | __SCx200_GPIO_BANK; | 64 | __SCx200_GPIO_BANK; |
65 | __SCx200_GPIO_IOADDR; | 65 | __SCx200_GPIO_IOADDR; |
66 | __SCx200_GPIO_SHADOW; | 66 | __SCx200_GPIO_SHADOW; |
@@ -73,7 +73,7 @@ static inline void scx200_gpio_set(int index, int state) { | |||
73 | } | 73 | } |
74 | 74 | ||
75 | /* toggle the GPIO signal */ | 75 | /* toggle the GPIO signal */ |
76 | static inline void scx200_gpio_change(int index) { | 76 | static inline void scx200_gpio_change(unsigned index) { |
77 | __SCx200_GPIO_BANK; | 77 | __SCx200_GPIO_BANK; |
78 | __SCx200_GPIO_IOADDR; | 78 | __SCx200_GPIO_IOADDR; |
79 | __SCx200_GPIO_SHADOW; | 79 | __SCx200_GPIO_SHADOW; |
@@ -87,10 +87,3 @@ static inline void scx200_gpio_change(int index) { | |||
87 | #undef __SCx200_GPIO_SHADOW | 87 | #undef __SCx200_GPIO_SHADOW |
88 | #undef __SCx200_GPIO_INDEX | 88 | #undef __SCx200_GPIO_INDEX |
89 | #undef __SCx200_GPIO_OUT | 89 | #undef __SCx200_GPIO_OUT |
90 | |||
91 | /* | ||
92 | Local variables: | ||
93 | compile-command: "make -C ../.. bzImage modules" | ||
94 | c-basic-offset: 8 | ||
95 | End: | ||
96 | */ | ||
diff --git a/include/linux/security.h b/include/linux/security.h index d2c17bd91a..51805806f9 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -862,6 +862,7 @@ struct swap_info_struct; | |||
862 | * Permit allocation of a key and assign security data. Note that key does | 862 | * Permit allocation of a key and assign security data. Note that key does |
863 | * not have a serial number assigned at this point. | 863 | * not have a serial number assigned at this point. |
864 | * @key points to the key. | 864 | * @key points to the key. |
865 | * @flags is the allocation flags | ||
865 | * Return 0 if permission is granted, -ve error otherwise. | 866 | * Return 0 if permission is granted, -ve error otherwise. |
866 | * @key_free: | 867 | * @key_free: |
867 | * Notification of destruction; free security data. | 868 | * Notification of destruction; free security data. |
@@ -1324,7 +1325,7 @@ struct security_operations { | |||
1324 | 1325 | ||
1325 | /* key management security hooks */ | 1326 | /* key management security hooks */ |
1326 | #ifdef CONFIG_KEYS | 1327 | #ifdef CONFIG_KEYS |
1327 | int (*key_alloc)(struct key *key, struct task_struct *tsk); | 1328 | int (*key_alloc)(struct key *key, struct task_struct *tsk, unsigned long flags); |
1328 | void (*key_free)(struct key *key); | 1329 | void (*key_free)(struct key *key); |
1329 | int (*key_permission)(key_ref_t key_ref, | 1330 | int (*key_permission)(key_ref_t key_ref, |
1330 | struct task_struct *context, | 1331 | struct task_struct *context, |
@@ -3040,9 +3041,10 @@ static inline int security_xfrm_policy_lookup(struct xfrm_policy *xp, u32 sk_sid | |||
3040 | #ifdef CONFIG_KEYS | 3041 | #ifdef CONFIG_KEYS |
3041 | #ifdef CONFIG_SECURITY | 3042 | #ifdef CONFIG_SECURITY |
3042 | static inline int security_key_alloc(struct key *key, | 3043 | static inline int security_key_alloc(struct key *key, |
3043 | struct task_struct *tsk) | 3044 | struct task_struct *tsk, |
3045 | unsigned long flags) | ||
3044 | { | 3046 | { |
3045 | return security_ops->key_alloc(key, tsk); | 3047 | return security_ops->key_alloc(key, tsk, flags); |
3046 | } | 3048 | } |
3047 | 3049 | ||
3048 | static inline void security_key_free(struct key *key) | 3050 | static inline void security_key_free(struct key *key) |
@@ -3060,7 +3062,8 @@ static inline int security_key_permission(key_ref_t key_ref, | |||
3060 | #else | 3062 | #else |
3061 | 3063 | ||
3062 | static inline int security_key_alloc(struct key *key, | 3064 | static inline int security_key_alloc(struct key *key, |
3063 | struct task_struct *tsk) | 3065 | struct task_struct *tsk, |
3066 | unsigned long flags) | ||
3064 | { | 3067 | { |
3065 | return 0; | 3068 | return 0; |
3066 | } | 3069 | } |
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h index e928c0dcc2..c8bb68099e 100644 --- a/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h | |||
@@ -642,10 +642,14 @@ struct spi_board_info { | |||
642 | u16 bus_num; | 642 | u16 bus_num; |
643 | u16 chip_select; | 643 | u16 chip_select; |
644 | 644 | ||
645 | /* mode becomes spi_device.mode, and is essential for chips | ||
646 | * where the default of SPI_CS_HIGH = 0 is wrong. | ||
647 | */ | ||
648 | u8 mode; | ||
649 | |||
645 | /* ... may need additional spi_device chip config data here. | 650 | /* ... may need additional spi_device chip config data here. |
646 | * avoid stuff protocol drivers can set; but include stuff | 651 | * avoid stuff protocol drivers can set; but include stuff |
647 | * needed to behave without being bound to a driver: | 652 | * needed to behave without being bound to a driver: |
648 | * - chipselect polarity | ||
649 | * - quirks like clock rate mattering when not selected | 653 | * - quirks like clock rate mattering when not selected |
650 | */ | 654 | */ |
651 | }; | 655 | }; |
diff --git a/include/linux/sunrpc/gss_api.h b/include/linux/sunrpc/gss_api.h index 9b8bcf125c..6e112cc5cd 100644 --- a/include/linux/sunrpc/gss_api.h +++ b/include/linux/sunrpc/gss_api.h | |||
@@ -126,7 +126,7 @@ struct gss_api_mech *gss_mech_get_by_pseudoflavor(u32); | |||
126 | /* Just increments the mechanism's reference count and returns its input: */ | 126 | /* Just increments the mechanism's reference count and returns its input: */ |
127 | struct gss_api_mech * gss_mech_get(struct gss_api_mech *); | 127 | struct gss_api_mech * gss_mech_get(struct gss_api_mech *); |
128 | 128 | ||
129 | /* For every succesful gss_mech_get or gss_mech_get_by_* call there must be a | 129 | /* For every successful gss_mech_get or gss_mech_get_by_* call there must be a |
130 | * corresponding call to gss_mech_put. */ | 130 | * corresponding call to gss_mech_put. */ |
131 | void gss_mech_put(struct gss_api_mech *); | 131 | void gss_mech_put(struct gss_api_mech *); |
132 | 132 | ||
diff --git a/include/linux/suspend.h b/include/linux/suspend.h index e82cb10fb3..96e31aa64c 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h | |||
@@ -71,7 +71,6 @@ struct saved_context; | |||
71 | void __save_processor_state(struct saved_context *ctxt); | 71 | void __save_processor_state(struct saved_context *ctxt); |
72 | void __restore_processor_state(struct saved_context *ctxt); | 72 | void __restore_processor_state(struct saved_context *ctxt); |
73 | unsigned long get_safe_page(gfp_t gfp_mask); | 73 | unsigned long get_safe_page(gfp_t gfp_mask); |
74 | int swsusp_add_arch_pages(unsigned long start, unsigned long end); | ||
75 | 74 | ||
76 | /* | 75 | /* |
77 | * XXX: We try to keep some more pages free so that I/O operations succeed | 76 | * XXX: We try to keep some more pages free so that I/O operations succeed |
diff --git a/include/linux/swap.h b/include/linux/swap.h index dc3f3aa0c8..c41e2d6d1a 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -199,6 +199,8 @@ static inline int zone_reclaim(struct zone *z, gfp_t mask, unsigned int order) | |||
199 | } | 199 | } |
200 | #endif | 200 | #endif |
201 | 201 | ||
202 | extern int kswapd_run(int nid); | ||
203 | |||
202 | #ifdef CONFIG_MMU | 204 | #ifdef CONFIG_MMU |
203 | /* linux/mm/shmem.c */ | 205 | /* linux/mm/shmem.c */ |
204 | extern int shmem_unuse(swp_entry_t entry, struct page *page); | 206 | extern int shmem_unuse(swp_entry_t entry, struct page *page); |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 33785b79d5..008f04c567 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -174,9 +174,9 @@ asmlinkage long sys_waitid(int which, pid_t pid, | |||
174 | int options, struct rusage __user *ru); | 174 | int options, struct rusage __user *ru); |
175 | asmlinkage long sys_waitpid(pid_t pid, int __user *stat_addr, int options); | 175 | asmlinkage long sys_waitpid(pid_t pid, int __user *stat_addr, int options); |
176 | asmlinkage long sys_set_tid_address(int __user *tidptr); | 176 | asmlinkage long sys_set_tid_address(int __user *tidptr); |
177 | asmlinkage long sys_futex(u32 __user *uaddr, int op, int val, | 177 | asmlinkage long sys_futex(u32 __user *uaddr, int op, u32 val, |
178 | struct timespec __user *utime, u32 __user *uaddr2, | 178 | struct timespec __user *utime, u32 __user *uaddr2, |
179 | int val3); | 179 | u32 val3); |
180 | 180 | ||
181 | asmlinkage long sys_init_module(void __user *umod, unsigned long len, | 181 | asmlinkage long sys_init_module(void __user *umod, unsigned long len, |
182 | const char __user *uargs); | 182 | const char __user *uargs); |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 6a60770984..46e4d8f277 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -148,9 +148,12 @@ enum | |||
148 | KERN_SPIN_RETRY=70, /* int: number of spinlock retries */ | 148 | KERN_SPIN_RETRY=70, /* int: number of spinlock retries */ |
149 | KERN_ACPI_VIDEO_FLAGS=71, /* int: flags for setting up video after ACPI sleep */ | 149 | KERN_ACPI_VIDEO_FLAGS=71, /* int: flags for setting up video after ACPI sleep */ |
150 | KERN_IA64_UNALIGNED=72, /* int: ia64 unaligned userland trap enable */ | 150 | KERN_IA64_UNALIGNED=72, /* int: ia64 unaligned userland trap enable */ |
151 | KERN_COMPAT_LOG=73, /* int: print compat layer messages */ | ||
152 | KERN_MAX_LOCK_DEPTH=74, | ||
151 | }; | 153 | }; |
152 | 154 | ||
153 | 155 | ||
156 | |||
154 | /* CTL_VM names: */ | 157 | /* CTL_VM names: */ |
155 | enum | 158 | enum |
156 | { | 159 | { |
@@ -187,6 +190,7 @@ enum | |||
187 | VM_ZONE_RECLAIM_MODE=31, /* reclaim local zone memory before going off node */ | 190 | VM_ZONE_RECLAIM_MODE=31, /* reclaim local zone memory before going off node */ |
188 | VM_ZONE_RECLAIM_INTERVAL=32, /* time period to wait after reclaim failure */ | 191 | VM_ZONE_RECLAIM_INTERVAL=32, /* time period to wait after reclaim failure */ |
189 | VM_PANIC_ON_OOM=33, /* panic at out-of-memory */ | 192 | VM_PANIC_ON_OOM=33, /* panic at out-of-memory */ |
193 | VM_VDSO_ENABLED=34, /* map VDSO into new processes? */ | ||
190 | }; | 194 | }; |
191 | 195 | ||
192 | 196 | ||
diff --git a/include/linux/time.h b/include/linux/time.h index 0cd696cee9..c05f8bb9a3 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -28,10 +28,13 @@ struct timezone { | |||
28 | #ifdef __KERNEL__ | 28 | #ifdef __KERNEL__ |
29 | 29 | ||
30 | /* Parameters used to convert the timespec values: */ | 30 | /* Parameters used to convert the timespec values: */ |
31 | #define MSEC_PER_SEC 1000L | 31 | #define MSEC_PER_SEC 1000L |
32 | #define USEC_PER_SEC 1000000L | 32 | #define USEC_PER_MSEC 1000L |
33 | #define NSEC_PER_SEC 1000000000L | 33 | #define NSEC_PER_USEC 1000L |
34 | #define NSEC_PER_USEC 1000L | 34 | #define NSEC_PER_MSEC 1000000L |
35 | #define USEC_PER_SEC 1000000L | ||
36 | #define NSEC_PER_SEC 1000000000L | ||
37 | #define FSEC_PER_SEC 1000000000000000L | ||
35 | 38 | ||
36 | static inline int timespec_equal(struct timespec *a, struct timespec *b) | 39 | static inline int timespec_equal(struct timespec *a, struct timespec *b) |
37 | { | 40 | { |
@@ -77,6 +80,8 @@ extern struct timespec xtime; | |||
77 | extern struct timespec wall_to_monotonic; | 80 | extern struct timespec wall_to_monotonic; |
78 | extern seqlock_t xtime_lock; | 81 | extern seqlock_t xtime_lock; |
79 | 82 | ||
83 | void timekeeping_init(void); | ||
84 | |||
80 | static inline unsigned long get_seconds(void) | 85 | static inline unsigned long get_seconds(void) |
81 | { | 86 | { |
82 | return xtime.tv_sec; | 87 | return xtime.tv_sec; |
@@ -100,6 +105,7 @@ extern int do_getitimer(int which, struct itimerval *value); | |||
100 | extern void getnstimeofday(struct timespec *tv); | 105 | extern void getnstimeofday(struct timespec *tv); |
101 | 106 | ||
102 | extern struct timespec timespec_trunc(struct timespec t, unsigned gran); | 107 | extern struct timespec timespec_trunc(struct timespec t, unsigned gran); |
108 | extern int timekeeping_is_continuous(void); | ||
103 | 109 | ||
104 | /** | 110 | /** |
105 | * timespec_to_ns - Convert timespec to nanoseconds | 111 | * timespec_to_ns - Convert timespec to nanoseconds |
@@ -142,6 +148,20 @@ extern struct timespec ns_to_timespec(const s64 nsec); | |||
142 | */ | 148 | */ |
143 | extern struct timeval ns_to_timeval(const s64 nsec); | 149 | extern struct timeval ns_to_timeval(const s64 nsec); |
144 | 150 | ||
151 | /** | ||
152 | * timespec_add_ns - Adds nanoseconds to a timespec | ||
153 | * @a: pointer to timespec to be incremented | ||
154 | * @ns: unsigned nanoseconds value to be added | ||
155 | */ | ||
156 | static inline void timespec_add_ns(struct timespec *a, u64 ns) | ||
157 | { | ||
158 | ns += a->tv_nsec; | ||
159 | while(unlikely(ns >= NSEC_PER_SEC)) { | ||
160 | ns -= NSEC_PER_SEC; | ||
161 | a->tv_sec++; | ||
162 | } | ||
163 | a->tv_nsec = ns; | ||
164 | } | ||
145 | #endif /* __KERNEL__ */ | 165 | #endif /* __KERNEL__ */ |
146 | 166 | ||
147 | #define NFDBITS __NFDBITS | 167 | #define NFDBITS __NFDBITS |
diff --git a/include/linux/timex.h b/include/linux/timex.h index 34d3ccff7b..19bb6538b4 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h | |||
@@ -303,6 +303,8 @@ time_interpolator_reset(void) | |||
303 | 303 | ||
304 | #endif /* !CONFIG_TIME_INTERPOLATION */ | 304 | #endif /* !CONFIG_TIME_INTERPOLATION */ |
305 | 305 | ||
306 | #define TICK_LENGTH_SHIFT 32 | ||
307 | |||
306 | /* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */ | 308 | /* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */ |
307 | extern u64 current_tick_length(void); | 309 | extern u64 current_tick_length(void); |
308 | 310 | ||
diff --git a/include/linux/topology.h b/include/linux/topology.h index a305ae2e44..ec1eca8529 100644 --- a/include/linux/topology.h +++ b/include/linux/topology.h | |||
@@ -134,7 +134,8 @@ | |||
134 | .flags = SD_LOAD_BALANCE \ | 134 | .flags = SD_LOAD_BALANCE \ |
135 | | SD_BALANCE_NEWIDLE \ | 135 | | SD_BALANCE_NEWIDLE \ |
136 | | SD_BALANCE_EXEC \ | 136 | | SD_BALANCE_EXEC \ |
137 | | SD_WAKE_AFFINE, \ | 137 | | SD_WAKE_AFFINE \ |
138 | | BALANCE_FOR_POWER, \ | ||
138 | .last_balance = jiffies, \ | 139 | .last_balance = jiffies, \ |
139 | .balance_interval = 1, \ | 140 | .balance_interval = 1, \ |
140 | .nr_balance_failed = 0, \ | 141 | .nr_balance_failed = 0, \ |
diff --git a/include/linux/tty.h b/include/linux/tty.h index cb35ca50a0..b3b807e4b0 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -57,7 +57,6 @@ struct tty_buffer { | |||
57 | unsigned char *flag_buf_ptr; | 57 | unsigned char *flag_buf_ptr; |
58 | int used; | 58 | int used; |
59 | int size; | 59 | int size; |
60 | int active; | ||
61 | int commit; | 60 | int commit; |
62 | int read; | 61 | int read; |
63 | /* Data points here */ | 62 | /* Data points here */ |
@@ -259,7 +258,6 @@ struct tty_struct { | |||
259 | #define TTY_DO_WRITE_WAKEUP 5 /* Call write_wakeup after queuing new */ | 258 | #define TTY_DO_WRITE_WAKEUP 5 /* Call write_wakeup after queuing new */ |
260 | #define TTY_PUSH 6 /* n_tty private */ | 259 | #define TTY_PUSH 6 /* n_tty private */ |
261 | #define TTY_CLOSING 7 /* ->close() in progress */ | 260 | #define TTY_CLOSING 7 /* ->close() in progress */ |
262 | #define TTY_DONT_FLIP 8 /* Defer buffer flip */ | ||
263 | #define TTY_LDISC 9 /* Line discipline attached */ | 261 | #define TTY_LDISC 9 /* Line discipline attached */ |
264 | #define TTY_HW_COOK_OUT 14 /* Hardware can do output cooking */ | 262 | #define TTY_HW_COOK_OUT 14 /* Hardware can do output cooking */ |
265 | #define TTY_HW_COOK_IN 15 /* Hardware can do input cooking */ | 263 | #define TTY_HW_COOK_IN 15 /* Hardware can do input cooking */ |
diff --git a/include/linux/tty_flip.h b/include/linux/tty_flip.h index 31548303ee..eb677cf561 100644 --- a/include/linux/tty_flip.h +++ b/include/linux/tty_flip.h | |||
@@ -12,7 +12,7 @@ static inline int tty_insert_flip_char(struct tty_struct *tty, | |||
12 | unsigned char ch, char flag) | 12 | unsigned char ch, char flag) |
13 | { | 13 | { |
14 | struct tty_buffer *tb = tty->buf.tail; | 14 | struct tty_buffer *tb = tty->buf.tail; |
15 | if (tb && tb->active && tb->used < tb->size) { | 15 | if (tb && tb->used < tb->size) { |
16 | tb->flag_buf_ptr[tb->used] = flag; | 16 | tb->flag_buf_ptr[tb->used] = flag; |
17 | tb->char_buf_ptr[tb->used++] = ch; | 17 | tb->char_buf_ptr[tb->used++] = ch; |
18 | return 1; | 18 | return 1; |
diff --git a/include/linux/types.h b/include/linux/types.h index a5e46e783f..3f235660a3 100644 --- a/include/linux/types.h +++ b/include/linux/types.h | |||
@@ -177,8 +177,15 @@ typedef __u64 __bitwise __be64; | |||
177 | 177 | ||
178 | #ifdef __KERNEL__ | 178 | #ifdef __KERNEL__ |
179 | typedef unsigned __bitwise__ gfp_t; | 179 | typedef unsigned __bitwise__ gfp_t; |
180 | |||
181 | #ifdef CONFIG_RESOURCES_64BIT | ||
182 | typedef u64 resource_size_t; | ||
183 | #else | ||
184 | typedef u32 resource_size_t; | ||
180 | #endif | 185 | #endif |
181 | 186 | ||
187 | #endif /* __KERNEL__ */ | ||
188 | |||
182 | struct ustat { | 189 | struct ustat { |
183 | __kernel_daddr_t f_tfree; | 190 | __kernel_daddr_t f_tfree; |
184 | __kernel_ino_t f_tinode; | 191 | __kernel_ino_t f_tinode; |
diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h index 914f911325..e39b7cc433 100644 --- a/include/linux/ufs_fs.h +++ b/include/linux/ufs_fs.h | |||
@@ -966,7 +966,7 @@ extern void ufs_set_link(struct inode *dir, struct ufs_dir_entry *de, | |||
966 | extern struct inode_operations ufs_file_inode_operations; | 966 | extern struct inode_operations ufs_file_inode_operations; |
967 | extern const struct file_operations ufs_file_operations; | 967 | extern const struct file_operations ufs_file_operations; |
968 | 968 | ||
969 | extern struct address_space_operations ufs_aops; | 969 | extern const struct address_space_operations ufs_aops; |
970 | 970 | ||
971 | /* ialloc.c */ | 971 | /* ialloc.c */ |
972 | extern void ufs_free_inode (struct inode *inode); | 972 | extern void ufs_free_inode (struct inode *inode); |
diff --git a/include/linux/unwind.h b/include/linux/unwind.h new file mode 100644 index 0000000000..ce48e2cd37 --- /dev/null +++ b/include/linux/unwind.h | |||
@@ -0,0 +1,127 @@ | |||
1 | #ifndef _LINUX_UNWIND_H | ||
2 | #define _LINUX_UNWIND_H | ||
3 | |||
4 | /* | ||
5 | * Copyright (C) 2002-2006 Novell, Inc. | ||
6 | * Jan Beulich <jbeulich@novell.com> | ||
7 | * This code is released under version 2 of the GNU GPL. | ||
8 | * | ||
9 | * A simple API for unwinding kernel stacks. This is used for | ||
10 | * debugging and error reporting purposes. The kernel doesn't need | ||
11 | * full-blown stack unwinding with all the bells and whistles, so there | ||
12 | * is not much point in implementing the full Dwarf2 unwind API. | ||
13 | */ | ||
14 | |||
15 | #include <linux/config.h> | ||
16 | |||
17 | struct module; | ||
18 | |||
19 | #ifdef CONFIG_STACK_UNWIND | ||
20 | |||
21 | #include <asm/unwind.h> | ||
22 | |||
23 | #ifndef ARCH_UNWIND_SECTION_NAME | ||
24 | #define ARCH_UNWIND_SECTION_NAME ".eh_frame" | ||
25 | #endif | ||
26 | |||
27 | /* | ||
28 | * Initialize unwind support. | ||
29 | */ | ||
30 | extern void unwind_init(void); | ||
31 | |||
32 | #ifdef CONFIG_MODULES | ||
33 | |||
34 | extern void *unwind_add_table(struct module *, | ||
35 | const void *table_start, | ||
36 | unsigned long table_size); | ||
37 | |||
38 | extern void unwind_remove_table(void *handle, int init_only); | ||
39 | |||
40 | #endif | ||
41 | |||
42 | extern int unwind_init_frame_info(struct unwind_frame_info *, | ||
43 | struct task_struct *, | ||
44 | /*const*/ struct pt_regs *); | ||
45 | |||
46 | /* | ||
47 | * Prepare to unwind a blocked task. | ||
48 | */ | ||
49 | extern int unwind_init_blocked(struct unwind_frame_info *, | ||
50 | struct task_struct *); | ||
51 | |||
52 | /* | ||
53 | * Prepare to unwind the currently running thread. | ||
54 | */ | ||
55 | extern int unwind_init_running(struct unwind_frame_info *, | ||
56 | asmlinkage int (*callback)(struct unwind_frame_info *, | ||
57 | void *arg), | ||
58 | void *arg); | ||
59 | |||
60 | /* | ||
61 | * Unwind to previous to frame. Returns 0 if successful, negative | ||
62 | * number in case of an error. | ||
63 | */ | ||
64 | extern int unwind(struct unwind_frame_info *); | ||
65 | |||
66 | /* | ||
67 | * Unwind until the return pointer is in user-land (or until an error | ||
68 | * occurs). Returns 0 if successful, negative number in case of | ||
69 | * error. | ||
70 | */ | ||
71 | extern int unwind_to_user(struct unwind_frame_info *); | ||
72 | |||
73 | #else | ||
74 | |||
75 | struct unwind_frame_info {}; | ||
76 | |||
77 | static inline void unwind_init(void) {} | ||
78 | |||
79 | #ifdef CONFIG_MODULES | ||
80 | |||
81 | static inline void *unwind_add_table(struct module *mod, | ||
82 | const void *table_start, | ||
83 | unsigned long table_size) | ||
84 | { | ||
85 | return NULL; | ||
86 | } | ||
87 | |||
88 | #endif | ||
89 | |||
90 | static inline void unwind_remove_table(void *handle, int init_only) | ||
91 | { | ||
92 | } | ||
93 | |||
94 | static inline int unwind_init_frame_info(struct unwind_frame_info *info, | ||
95 | struct task_struct *tsk, | ||
96 | const struct pt_regs *regs) | ||
97 | { | ||
98 | return -ENOSYS; | ||
99 | } | ||
100 | |||
101 | static inline int unwind_init_blocked(struct unwind_frame_info *info, | ||
102 | struct task_struct *tsk) | ||
103 | { | ||
104 | return -ENOSYS; | ||
105 | } | ||
106 | |||
107 | static inline int unwind_init_running(struct unwind_frame_info *info, | ||
108 | asmlinkage int (*cb)(struct unwind_frame_info *, | ||
109 | void *arg), | ||
110 | void *arg) | ||
111 | { | ||
112 | return -ENOSYS; | ||
113 | } | ||
114 | |||
115 | static inline int unwind(struct unwind_frame_info *info) | ||
116 | { | ||
117 | return -ENOSYS; | ||
118 | } | ||
119 | |||
120 | static inline int unwind_to_user(struct unwind_frame_info *info) | ||
121 | { | ||
122 | return -ENOSYS; | ||
123 | } | ||
124 | |||
125 | #endif | ||
126 | |||
127 | #endif /* _LINUX_UNWIND_H */ | ||
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 4f428547ec..a62673dad7 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -245,6 +245,7 @@ struct v4l2_pix_format | |||
245 | #define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y','U','1','2') /* 12 YUV 4:2:0 */ | 245 | #define V4L2_PIX_FMT_YUV420 v4l2_fourcc('Y','U','1','2') /* 12 YUV 4:2:0 */ |
246 | #define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y','Y','U','V') /* 16 YUV 4:2:2 */ | 246 | #define V4L2_PIX_FMT_YYUV v4l2_fourcc('Y','Y','U','V') /* 16 YUV 4:2:2 */ |
247 | #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H','I','2','4') /* 8 8-bit color */ | 247 | #define V4L2_PIX_FMT_HI240 v4l2_fourcc('H','I','2','4') /* 8 8-bit color */ |
248 | #define V4L2_PIX_FMT_HM12 v4l2_fourcc('H','M','1','2') /* 8 YUV 4:1:1 16x16 macroblocks */ | ||
248 | 249 | ||
249 | /* see http://www.siliconimaging.com/RGB%20Bayer.htm */ | 250 | /* see http://www.siliconimaging.com/RGB%20Bayer.htm */ |
250 | #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1') /* 8 BGBG.. GRGR.. */ | 251 | #define V4L2_PIX_FMT_SBGGR8 v4l2_fourcc('B','A','8','1') /* 8 BGBG.. GRGR.. */ |
@@ -821,6 +822,11 @@ enum v4l2_mpeg_stream_type { | |||
821 | #define V4L2_CID_MPEG_STREAM_PID_PCR (V4L2_CID_MPEG_BASE+4) | 822 | #define V4L2_CID_MPEG_STREAM_PID_PCR (V4L2_CID_MPEG_BASE+4) |
822 | #define V4L2_CID_MPEG_STREAM_PES_ID_AUDIO (V4L2_CID_MPEG_BASE+5) | 823 | #define V4L2_CID_MPEG_STREAM_PES_ID_AUDIO (V4L2_CID_MPEG_BASE+5) |
823 | #define V4L2_CID_MPEG_STREAM_PES_ID_VIDEO (V4L2_CID_MPEG_BASE+6) | 824 | #define V4L2_CID_MPEG_STREAM_PES_ID_VIDEO (V4L2_CID_MPEG_BASE+6) |
825 | #define V4L2_CID_MPEG_STREAM_VBI_FMT (V4L2_CID_MPEG_BASE+7) | ||
826 | enum v4l2_mpeg_stream_vbi_fmt { | ||
827 | V4L2_MPEG_STREAM_VBI_FMT_NONE = 0, /* No VBI in the MPEG stream */ | ||
828 | V4L2_MPEG_STREAM_VBI_FMT_IVTV = 1, /* VBI in private packets, IVTV format */ | ||
829 | }; | ||
824 | 830 | ||
825 | /* MPEG audio */ | 831 | /* MPEG audio */ |
826 | #define V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ (V4L2_CID_MPEG_BASE+100) | 832 | #define V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ (V4L2_CID_MPEG_BASE+100) |
diff --git a/include/linux/watchdog.h b/include/linux/watchdog.h index 1192ed8f4f..011bcfeb9f 100644 --- a/include/linux/watchdog.h +++ b/include/linux/watchdog.h | |||
@@ -28,6 +28,9 @@ struct watchdog_info { | |||
28 | #define WDIOC_KEEPALIVE _IOR(WATCHDOG_IOCTL_BASE, 5, int) | 28 | #define WDIOC_KEEPALIVE _IOR(WATCHDOG_IOCTL_BASE, 5, int) |
29 | #define WDIOC_SETTIMEOUT _IOWR(WATCHDOG_IOCTL_BASE, 6, int) | 29 | #define WDIOC_SETTIMEOUT _IOWR(WATCHDOG_IOCTL_BASE, 6, int) |
30 | #define WDIOC_GETTIMEOUT _IOR(WATCHDOG_IOCTL_BASE, 7, int) | 30 | #define WDIOC_GETTIMEOUT _IOR(WATCHDOG_IOCTL_BASE, 7, int) |
31 | #define WDIOC_SETPRETIMEOUT _IOWR(WATCHDOG_IOCTL_BASE, 8, int) | ||
32 | #define WDIOC_GETPRETIMEOUT _IOR(WATCHDOG_IOCTL_BASE, 9, int) | ||
33 | #define WDIOC_GETTIMELEFT _IOR(WATCHDOG_IOCTL_BASE, 10, int) | ||
31 | 34 | ||
32 | #define WDIOF_UNKNOWN -1 /* Unknown flag error */ | 35 | #define WDIOF_UNKNOWN -1 /* Unknown flag error */ |
33 | #define WDIOS_UNKNOWN -1 /* Unknown status error */ | 36 | #define WDIOS_UNKNOWN -1 /* Unknown status error */ |
@@ -38,9 +41,10 @@ struct watchdog_info { | |||
38 | #define WDIOF_EXTERN2 0x0008 /* External relay 2 */ | 41 | #define WDIOF_EXTERN2 0x0008 /* External relay 2 */ |
39 | #define WDIOF_POWERUNDER 0x0010 /* Power bad/power fault */ | 42 | #define WDIOF_POWERUNDER 0x0010 /* Power bad/power fault */ |
40 | #define WDIOF_CARDRESET 0x0020 /* Card previously reset the CPU */ | 43 | #define WDIOF_CARDRESET 0x0020 /* Card previously reset the CPU */ |
41 | #define WDIOF_POWEROVER 0x0040 /* Power over voltage */ | 44 | #define WDIOF_POWEROVER 0x0040 /* Power over voltage */ |
42 | #define WDIOF_SETTIMEOUT 0x0080 /* Set timeout (in seconds) */ | 45 | #define WDIOF_SETTIMEOUT 0x0080 /* Set timeout (in seconds) */ |
43 | #define WDIOF_MAGICCLOSE 0x0100 /* Supports magic close char */ | 46 | #define WDIOF_MAGICCLOSE 0x0100 /* Supports magic close char */ |
47 | #define WDIOF_PRETIMEOUT 0x0200 /* Pretimeout (in seconds), get/set */ | ||
44 | #define WDIOF_KEEPALIVEPING 0x8000 /* Keep alive ping reply */ | 48 | #define WDIOF_KEEPALIVEPING 0x8000 /* Keep alive ping reply */ |
45 | 49 | ||
46 | #define WDIOS_DISABLECARD 0x0001 /* Turn off the watchdog timer */ | 50 | #define WDIOS_DISABLECARD 0x0001 /* Turn off the watchdog timer */ |
diff --git a/include/media/cx2341x.h b/include/media/cx2341x.h index 51fb06b4c3..d91d88f93c 100644 --- a/include/media/cx2341x.h +++ b/include/media/cx2341x.h | |||
@@ -25,8 +25,13 @@ enum cx2341x_port { | |||
25 | CX2341X_PORT_SERIAL = 2 | 25 | CX2341X_PORT_SERIAL = 2 |
26 | }; | 26 | }; |
27 | 27 | ||
28 | enum cx2341x_cap { | ||
29 | CX2341X_CAP_HAS_SLICED_VBI = 1 << 0, | ||
30 | }; | ||
31 | |||
28 | struct cx2341x_mpeg_params { | 32 | struct cx2341x_mpeg_params { |
29 | /* misc */ | 33 | /* misc */ |
34 | u32 capabilities; | ||
30 | enum cx2341x_port port; | 35 | enum cx2341x_port port; |
31 | u16 width; | 36 | u16 width; |
32 | u16 height; | 37 | u16 height; |
@@ -34,6 +39,7 @@ struct cx2341x_mpeg_params { | |||
34 | 39 | ||
35 | /* stream */ | 40 | /* stream */ |
36 | enum v4l2_mpeg_stream_type stream_type; | 41 | enum v4l2_mpeg_stream_type stream_type; |
42 | enum v4l2_mpeg_stream_vbi_fmt stream_vbi_fmt; | ||
37 | 43 | ||
38 | /* audio */ | 44 | /* audio */ |
39 | enum v4l2_mpeg_audio_sampling_freq audio_sampling_freq; | 45 | enum v4l2_mpeg_audio_sampling_freq audio_sampling_freq; |
@@ -83,9 +89,9 @@ int cx2341x_ctrl_query(struct cx2341x_mpeg_params *params, | |||
83 | struct v4l2_queryctrl *qctrl); | 89 | struct v4l2_queryctrl *qctrl); |
84 | const char **cx2341x_ctrl_get_menu(u32 id); | 90 | const char **cx2341x_ctrl_get_menu(u32 id); |
85 | int cx2341x_ext_ctrls(struct cx2341x_mpeg_params *params, | 91 | int cx2341x_ext_ctrls(struct cx2341x_mpeg_params *params, |
86 | struct v4l2_ext_controls *ctrls, int cmd); | 92 | struct v4l2_ext_controls *ctrls, unsigned int cmd); |
87 | void cx2341x_fill_defaults(struct cx2341x_mpeg_params *p); | 93 | void cx2341x_fill_defaults(struct cx2341x_mpeg_params *p); |
88 | void cx2341x_log_status(struct cx2341x_mpeg_params *p, int cardid); | 94 | void cx2341x_log_status(struct cx2341x_mpeg_params *p, const char *prefix); |
89 | 95 | ||
90 | /* Firmware names */ | 96 | /* Firmware names */ |
91 | #define CX2341X_FIRM_ENC_FILENAME "v4l-cx2341x-enc.fw" | 97 | #define CX2341X_FIRM_ENC_FILENAME "v4l-cx2341x-enc.fw" |
diff --git a/include/net/tipc/tipc_bearer.h b/include/net/tipc/tipc_bearer.h index 098607cd4b..e07136d74c 100644 --- a/include/net/tipc/tipc_bearer.h +++ b/include/net/tipc/tipc_bearer.h | |||
@@ -49,10 +49,18 @@ | |||
49 | 49 | ||
50 | #define TIPC_MEDIA_TYPE_ETH 1 | 50 | #define TIPC_MEDIA_TYPE_ETH 1 |
51 | 51 | ||
52 | /* | ||
53 | * Destination address structure used by TIPC bearers when sending messages | ||
54 | * | ||
55 | * IMPORTANT: The fields of this structure MUST be stored using the specified | ||
56 | * byte order indicated below, as the structure is exchanged between nodes | ||
57 | * as part of a link setup process. | ||
58 | */ | ||
59 | |||
52 | struct tipc_media_addr { | 60 | struct tipc_media_addr { |
53 | __u32 type; | 61 | __u32 type; /* bearer type (network byte order) */ |
54 | union { | 62 | union { |
55 | __u8 eth_addr[6]; /* Ethernet bearer */ | 63 | __u8 eth_addr[6]; /* 48 bit Ethernet addr (byte array) */ |
56 | #if 0 | 64 | #if 0 |
57 | /* Prototypes for other possible bearer types */ | 65 | /* Prototypes for other possible bearer types */ |
58 | 66 | ||