aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2007-05-10 07:08:37 -0400
committerPaul Mackerras <paulus@samba.org>2007-05-10 07:08:37 -0400
commit2ecf042ef530dd0943e41d84b6344f507941af3e (patch)
tree73100361dd74e3f80f14c7c81ba4675948983f44 /include
parent32a56ebb24f23da1bbaf24292acf85b6c04526ab (diff)
parentde5603748af8bf7deac403e6ba92887f8d18e812 (diff)
Merge branch 'linux-2.6'
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/smp.h1
-rw-r--r--include/asm-alpha/thread_info.h8
-rw-r--r--include/asm-arm/arch-at91/at91rm9200.h181
-rw-r--r--include/asm-arm/arch-at91/at91sam9260.h9
-rw-r--r--include/asm-arm/arch-at91/at91sam9261.h191
-rw-r--r--include/asm-arm/arch-at91/at91sam9263.h8
-rw-r--r--include/asm-arm/arch-at91/board.h2
-rw-r--r--include/asm-arm/arch-at91/cpu.h6
-rw-r--r--include/asm-arm/arch-imx/imx-regs.h2
-rw-r--r--include/asm-arm/arch-integrator/platform.h2
-rw-r--r--include/asm-arm/arch-iop32x/glantank.h2
-rw-r--r--include/asm-arm/arch-iop32x/n2100.h2
-rw-r--r--include/asm-arm/arch-omap/aic23.h4
-rw-r--r--include/asm-arm/arch-omap/board-apollon.h9
-rw-r--r--include/asm-arm/arch-omap/board-h4.h3
-rw-r--r--include/asm-arm/arch-omap/board.h43
-rw-r--r--include/asm-arm/arch-omap/dma.h2
-rw-r--r--include/asm-arm/arch-omap/dsp.h250
-rw-r--r--include/asm-arm/arch-omap/dsp_common.h32
-rw-r--r--include/asm-arm/arch-omap/gpio-switch.h54
-rw-r--r--include/asm-arm/arch-omap/gpio.h2
-rw-r--r--include/asm-arm/arch-omap/gpmc.h2
-rw-r--r--include/asm-arm/arch-omap/hardware.h9
-rw-r--r--include/asm-arm/arch-omap/hwa742.h12
-rw-r--r--include/asm-arm/arch-omap/io.h11
-rw-r--r--include/asm-arm/arch-omap/irqs.h20
-rw-r--r--include/asm-arm/arch-omap/lcd_lph8923.h14
-rw-r--r--include/asm-arm/arch-omap/lcd_mipid.h24
-rw-r--r--include/asm-arm/arch-omap/led.h24
-rw-r--r--include/asm-arm/arch-omap/mailbox.h73
-rw-r--r--include/asm-arm/arch-omap/mcspi.h1
-rw-r--r--include/asm-arm/arch-omap/memory.h13
-rw-r--r--include/asm-arm/arch-omap/menelaus.h17
-rw-r--r--include/asm-arm/arch-omap/omap16xx.h12
-rw-r--r--include/asm-arm/arch-omap/omap24xx.h9
-rw-r--r--include/asm-arm/arch-omap/omapfb.h188
-rw-r--r--include/asm-arm/arch-omap/sram.h3
-rw-r--r--include/asm-arm/arch-omap/usb.h40
-rw-r--r--include/asm-arm/arch-s3c2410/regs-power.h2
-rw-r--r--include/asm-arm/arch-s3c2410/regs-s3c2443-clock.h2
-rw-r--r--include/asm-arm/arch-s3c2410/regs-watchdog.h2
-rw-r--r--include/asm-arm/arch-s3c2410/udc.h2
-rw-r--r--include/asm-arm/cacheflush.h40
-rw-r--r--include/asm-arm/dma-mapping.h2
-rw-r--r--include/asm-arm/glue.h9
-rw-r--r--include/asm-arm/mmu_context.h8
-rw-r--r--include/asm-arm/proc-fns.h8
-rw-r--r--include/asm-arm/system.h7
-rw-r--r--include/asm-arm26/io.h2
-rw-r--r--include/asm-arm26/memory.h4
-rw-r--r--include/asm-arm26/setup.h2
-rw-r--r--include/asm-avr32/arch-at32ap/cpu.h33
-rw-r--r--include/asm-avr32/setup.h2
-rw-r--r--include/asm-avr32/unistd.h4
-rw-r--r--include/asm-blackfin/processor.h6
-rw-r--r--include/asm-blackfin/system.h4
-rw-r--r--include/asm-frv/tlb.h4
-rw-r--r--include/asm-generic/bitops/atomic.h2
-rw-r--r--include/asm-i386/bitops.h2
-rw-r--r--include/asm-i386/boot.h2
-rw-r--r--include/asm-i386/mmzone.h6
-rw-r--r--include/asm-i386/msr.h56
-rw-r--r--include/asm-i386/paravirt.h5
-rw-r--r--include/asm-i386/smp.h37
-rw-r--r--include/asm-i386/sync_bitops.h2
-rw-r--r--include/asm-i386/thread_info.h2
-rw-r--r--include/asm-ia64/hw_irq.h1
-rw-r--r--include/asm-ia64/iosapic.h2
-rw-r--r--include/asm-ia64/smp.h6
-rw-r--r--include/asm-ia64/sn/sn_sal.h1
-rw-r--r--include/asm-ia64/thread_info.h6
-rw-r--r--include/asm-ia64/tlbflush.h11
-rw-r--r--include/asm-ia64/unistd.h5
-rw-r--r--include/asm-m32r/smp.h6
-rw-r--r--include/asm-m32r/system.h2
-rw-r--r--include/asm-m68k/atarihw.h2
-rw-r--r--include/asm-m68k/atariints.h2
-rw-r--r--include/asm-m68k/thread_info.h6
-rw-r--r--include/asm-mips/bootinfo.h2
-rw-r--r--include/asm-mips/system.h2
-rw-r--r--include/asm-parisc/compat.h2
-rw-r--r--include/asm-powerpc/ppc-pci.h2
-rw-r--r--include/asm-powerpc/smp.h1
-rw-r--r--include/asm-ppc/hydra.h2
-rw-r--r--include/asm-s390/smp.h1
-rw-r--r--include/asm-sh/bug.h4
-rw-r--r--include/asm-sh/cpu-features.h1
-rw-r--r--include/asm-sh/cpu-sh3/dma.h2
-rw-r--r--include/asm-sh/cpu-sh4/dma-sh7780.h2
-rw-r--r--include/asm-sh/cpu-sh4/dma.h2
-rw-r--r--include/asm-sh/dmabrg.h23
-rw-r--r--include/asm-sh/edosk7705.h2
-rw-r--r--include/asm-sh/kdebug.h25
-rw-r--r--include/asm-sh/pgalloc.h44
-rw-r--r--include/asm-sh/snapgear.h2
-rw-r--r--include/asm-sh/system.h9
-rw-r--r--include/asm-sh/timer.h25
-rw-r--r--include/asm-sh/unistd.h5
-rw-r--r--include/asm-sparc/smp.h1
-rw-r--r--include/asm-sparc64/smp.h1
-rw-r--r--include/asm-um/required-features.h9
-rw-r--r--include/asm-um/smp.h4
-rw-r--r--include/asm-x86_64/smp.h14
-rw-r--r--include/asm-x86_64/system.h2
-rw-r--r--include/asm-x86_64/thread_info.h2
-rw-r--r--include/asm-xtensa/platform-iss/simcall.h2
-rw-r--r--include/linux/aio.h3
-rw-r--r--include/linux/blkdev.h2
-rw-r--r--include/linux/clocksource.h3
-rw-r--r--include/linux/compat.h3
-rw-r--r--include/linux/compiler-gcc.h1
-rw-r--r--include/linux/compiler-gcc3.h6
-rw-r--r--include/linux/compiler-gcc4.h3
-rw-r--r--include/linux/compiler.h21
-rw-r--r--include/linux/ext3_fs_i.h2
-rw-r--r--include/linux/ext4_fs_i.h2
-rw-r--r--include/linux/fb.h2
-rw-r--r--include/linux/futex.h42
-rw-r--r--include/linux/generic_acl.h2
-rw-r--r--include/linux/genhd.h1
-rw-r--r--include/linux/gfp.h6
-rw-r--r--include/linux/highmem.h27
-rw-r--r--include/linux/i2c-algo-bit.h2
-rw-r--r--include/linux/i2c-algo-pcf.h2
-rw-r--r--include/linux/ide.h93
-rw-r--r--include/linux/init_task.h2
-rw-r--r--include/linux/irda.h2
-rw-r--r--include/linux/kthread.h3
-rw-r--r--include/linux/ktime.h6
-rw-r--r--include/linux/mca.h2
-rw-r--r--include/linux/meye.h2
-rw-r--r--include/linux/mlx4/cmd.h178
-rw-r--r--include/linux/mlx4/cq.h123
-rw-r--r--include/linux/mlx4/device.h331
-rw-r--r--include/linux/mlx4/doorbell.h97
-rw-r--r--include/linux/mlx4/driver.h59
-rw-r--r--include/linux/mlx4/qp.h288
-rw-r--r--include/linux/mlx4/srq.h42
-rw-r--r--include/linux/mmzone.h3
-rw-r--r--include/linux/module.h3
-rw-r--r--include/linux/mount.h2
-rw-r--r--include/linux/mtd/mtd.h7
-rw-r--r--include/linux/mtd/nand.h16
-rw-r--r--include/linux/mutex.h5
-rw-r--r--include/linux/nfs4_acl.h1
-rw-r--r--include/linux/notifier.h66
-rw-r--r--include/linux/pm.h31
-rw-r--r--include/linux/radix-tree.h4
-rw-r--r--include/linux/relay.h3
-rw-r--r--include/linux/rslib.h4
-rw-r--r--include/linux/sched.h9
-rw-r--r--include/linux/security.h2
-rw-r--r--include/linux/signal.h125
-rw-r--r--include/linux/smp.h1
-rw-r--r--include/linux/sonypi.h2
-rw-r--r--include/linux/sunrpc/svc.h19
-rw-r--r--include/linux/sunrpc/svcsock.h3
-rw-r--r--include/linux/suspend.h24
-rw-r--r--include/linux/svga.h2
-rw-r--r--include/linux/syscalls.h2
-rw-r--r--include/linux/usb.h2
-rw-r--r--include/linux/vmstat.h3
-rw-r--r--include/linux/workqueue.h95
-rw-r--r--include/net/ieee80211.h2
-rw-r--r--include/net/irda/af_irda.h2
-rw-r--r--include/net/irda/irda.h2
-rw-r--r--include/net/irda/iriap.h2
-rw-r--r--include/net/irda/iriap_event.h2
-rw-r--r--include/net/irda/irias_object.h2
-rw-r--r--include/net/irda/irlan_client.h2
-rw-r--r--include/net/irda/irlan_common.h2
-rw-r--r--include/net/irda/irlan_eth.h2
-rw-r--r--include/net/irda/irlan_event.h2
-rw-r--r--include/net/irda/irlan_filter.h2
-rw-r--r--include/net/irda/irlan_provider.h2
-rw-r--r--include/net/irda/irlap.h2
-rw-r--r--include/net/irda/irlmp.h2
-rw-r--r--include/net/irda/irlmp_event.h2
-rw-r--r--include/net/irda/irlmp_frame.h2
-rw-r--r--include/net/irda/irmod.h2
-rw-r--r--include/net/irda/irqueue.h2
-rw-r--r--include/net/irda/irttp.h2
-rw-r--r--include/net/irda/parameters.h2
-rw-r--r--include/net/irda/timer.h2
-rw-r--r--include/net/irda/wrapper.h2
-rw-r--r--include/rdma/ib_umem.h81
-rw-r--r--include/rdma/ib_verbs.h28
187 files changed, 2477 insertions, 1253 deletions
diff --git a/include/asm-alpha/smp.h b/include/asm-alpha/smp.h
index a1a1eca6be45..286e1d844f63 100644
--- a/include/asm-alpha/smp.h
+++ b/include/asm-alpha/smp.h
@@ -51,6 +51,7 @@ int smp_call_function_on_cpu(void (*func) (void *info), void *info,int retry, in
51 51
52#else /* CONFIG_SMP */ 52#else /* CONFIG_SMP */
53 53
54#define hard_smp_processor_id() 0
54#define smp_call_function_on_cpu(func,info,retry,wait,cpu) ({ 0; }) 55#define smp_call_function_on_cpu(func,info,retry,wait,cpu) ({ 0; })
55 56
56#endif /* CONFIG_SMP */ 57#endif /* CONFIG_SMP */
diff --git a/include/asm-alpha/thread_info.h b/include/asm-alpha/thread_info.h
index eeb3bef91e11..f4defc2bd3fb 100644
--- a/include/asm-alpha/thread_info.h
+++ b/include/asm-alpha/thread_info.h
@@ -97,7 +97,7 @@ register struct thread_info *__current_thread_info __asm__("$8");
97 1 << TIF_UAC_SIGBUS) 97 1 << TIF_UAC_SIGBUS)
98 98
99#define SET_UNALIGN_CTL(task,value) ({ \ 99#define SET_UNALIGN_CTL(task,value) ({ \
100 (task)->thread_info->flags = (((task)->thread_info->flags & \ 100 task_thread_info(task)->flags = ((task_thread_info(task)->flags & \
101 ~ALPHA_UAC_MASK) \ 101 ~ALPHA_UAC_MASK) \
102 | (((value) << ALPHA_UAC_SHIFT) & (1<<TIF_UAC_NOPRINT))\ 102 | (((value) << ALPHA_UAC_SHIFT) & (1<<TIF_UAC_NOPRINT))\
103 | (((value) << (ALPHA_UAC_SHIFT + 1)) & (1<<TIF_UAC_SIGBUS)) \ 103 | (((value) << (ALPHA_UAC_SHIFT + 1)) & (1<<TIF_UAC_SIGBUS)) \
@@ -105,11 +105,11 @@ register struct thread_info *__current_thread_info __asm__("$8");
105 0; }) 105 0; })
106 106
107#define GET_UNALIGN_CTL(task,value) ({ \ 107#define GET_UNALIGN_CTL(task,value) ({ \
108 put_user(((task)->thread_info->flags & (1 << TIF_UAC_NOPRINT)) \ 108 put_user((task_thread_info(task)->flags & (1 << TIF_UAC_NOPRINT))\
109 >> ALPHA_UAC_SHIFT \ 109 >> ALPHA_UAC_SHIFT \
110 | ((task)->thread_info->flags & (1 << TIF_UAC_SIGBUS)) \ 110 | (task_thread_info(task)->flags & (1 << TIF_UAC_SIGBUS))\
111 >> (ALPHA_UAC_SHIFT + 1) \ 111 >> (ALPHA_UAC_SHIFT + 1) \
112 | ((task)->thread_info->flags & (1 << TIF_UAC_NOFIX)) \ 112 | (task_thread_info(task)->flags & (1 << TIF_UAC_NOFIX))\
113 >> (ALPHA_UAC_SHIFT - 1), \ 113 >> (ALPHA_UAC_SHIFT - 1), \
114 (int __user *)(value)); \ 114 (int __user *)(value)); \
115 }) 115 })
diff --git a/include/asm-arm/arch-at91/at91rm9200.h b/include/asm-arm/arch-at91/at91rm9200.h
index a12ac8ab2ad0..802891a9cd81 100644
--- a/include/asm-arm/arch-at91/at91rm9200.h
+++ b/include/asm-arm/arch-at91/at91rm9200.h
@@ -107,185 +107,4 @@
107#define AT91RM9200_UHP_BASE 0x00300000 /* USB Host controller */ 107#define AT91RM9200_UHP_BASE 0x00300000 /* USB Host controller */
108 108
109 109
110#if 0
111/*
112 * PIO pin definitions (peripheral A/B multiplexing).
113 */
114#define AT91_PA0_MISO (1 << 0) /* A: SPI Master-In Slave-Out */
115#define AT91_PA0_PCK3 (1 << 0) /* B: PMC Programmable Clock Output 3 */
116#define AT91_PA1_MOSI (1 << 1) /* A: SPI Master-Out Slave-In */
117#define AT91_PA1_PCK0 (1 << 1) /* B: PMC Programmable Clock Output 0 */
118#define AT91_PA2_SPCK (1 << 2) /* A: SPI Serial Clock */
119#define AT91_PA2_IRQ4 (1 << 2) /* B: External Interrupt 4 */
120#define AT91_PA3_NPCS0 (1 << 3) /* A: SPI Peripheral Chip Select 0 */
121#define AT91_PA3_IRQ5 (1 << 3) /* B: External Interrupt 5 */
122#define AT91_PA4_NPCS1 (1 << 4) /* A: SPI Peripheral Chip Select 1 */
123#define AT91_PA4_PCK1 (1 << 4) /* B: PMC Programmable Clock Output 1 */
124#define AT91_PA5_NPCS2 (1 << 5) /* A: SPI Peripheral Chip Select 2 */
125#define AT91_PA5_TXD3 (1 << 5) /* B: USART Transmit Data 3 */
126#define AT91_PA6_NPCS3 (1 << 6) /* A: SPI Peripheral Chip Select 3 */
127#define AT91_PA6_RXD3 (1 << 6) /* B: USART Receive Data 3 */
128#define AT91_PA7_ETXCK_EREFCK (1 << 7) /* A: Ethernet Reference Clock / Transmit Clock */
129#define AT91_PA7_PCK2 (1 << 7) /* B: PMC Programmable Clock Output 2 */
130#define AT91_PA8_ETXEN (1 << 8) /* A: Ethernet Transmit Enable */
131#define AT91_PA8_MCCDB (1 << 8) /* B: MMC Multimedia Card B Command */
132#define AT91_PA9_ETX0 (1 << 9) /* A: Ethernet Transmit Data 0 */
133#define AT91_PA9_MCDB0 (1 << 9) /* B: MMC Multimedia Card B Data 0 */
134#define AT91_PA10_ETX1 (1 << 10) /* A: Ethernet Transmit Data 1 */
135#define AT91_PA10_MCDB1 (1 << 10) /* B: MMC Multimedia Card B Data 1 */
136#define AT91_PA11_ECRS_ECRSDV (1 << 11) /* A: Ethernet Carrier Sense / Data Valid */
137#define AT91_PA11_MCDB2 (1 << 11) /* B: MMC Multimedia Card B Data 2 */
138#define AT91_PA12_ERX0 (1 << 12) /* A: Ethernet Receive Data 0 */
139#define AT91_PA12_MCDB3 (1 << 12) /* B: MMC Multimedia Card B Data 3 */
140#define AT91_PA13_ERX1 (1 << 13) /* A: Ethernet Receive Data 1 */
141#define AT91_PA13_TCLK0 (1 << 13) /* B: TC External Clock Input 0 */
142#define AT91_PA14_ERXER (1 << 14) /* A: Ethernet Receive Error */
143#define AT91_PA14_TCLK1 (1 << 14) /* B: TC External Clock Input 1 */
144#define AT91_PA15_EMDC (1 << 15) /* A: Ethernet Management Data Clock */
145#define AT91_PA15_TCLK2 (1 << 15) /* B: TC External Clock Input 2 */
146#define AT91_PA16_EMDIO (1 << 16) /* A: Ethernet Management Data I/O */
147#define AT91_PA16_IRQ6 (1 << 16) /* B: External Interrupt 6 */
148#define AT91_PA17_TXD0 (1 << 17) /* A: USART Transmit Data 0 */
149#define AT91_PA17_TIOA0 (1 << 17) /* B: TC I/O Line A 0 */
150#define AT91_PA18_RXD0 (1 << 18) /* A: USART Receive Data 0 */
151#define AT91_PA18_TIOB0 (1 << 18) /* B: TC I/O Line B 0 */
152#define AT91_PA19_SCK0 (1 << 19) /* A: USART Serial Clock 0 */
153#define AT91_PA19_TIOA1 (1 << 19) /* B: TC I/O Line A 1 */
154#define AT91_PA20_CTS0 (1 << 20) /* A: USART Clear To Send 0 */
155#define AT91_PA20_TIOB1 (1 << 20) /* B: TC I/O Line B 1 */
156#define AT91_PA21_RTS0 (1 << 21) /* A: USART Ready To Send 0 */
157#define AT91_PA21_TIOA2 (1 << 21) /* B: TC I/O Line A 2 */
158#define AT91_PA22_RXD2 (1 << 22) /* A: USART Receive Data 2 */
159#define AT91_PA22_TIOB2 (1 << 22) /* B: TC I/O Line B 2 */
160#define AT91_PA23_TXD2 (1 << 23) /* A: USART Transmit Data 2 */
161#define AT91_PA23_IRQ3 (1 << 23) /* B: External Interrupt 3 */
162#define AT91_PA24_SCK2 (1 << 24) /* A: USART Serial Clock 2 */
163#define AT91_PA24_PCK1 (1 << 24) /* B: PMC Programmable Clock Output 1 */
164#define AT91_PA25_TWD (1 << 25) /* A: TWI Two-wire Serial Data */
165#define AT91_PA25_IRQ2 (1 << 25) /* B: External Interrupt 2 */
166#define AT91_PA26_TWCK (1 << 26) /* A: TWI Two-wire Serial Clock */
167#define AT91_PA26_IRQ1 (1 << 26) /* B: External Interrupt 1 */
168#define AT91_PA27_MCCK (1 << 27) /* A: MMC Multimedia Card Clock */
169#define AT91_PA27_TCLK3 (1 << 27) /* B: TC External Clock Input 3 */
170#define AT91_PA28_MCCDA (1 << 28) /* A: MMC Multimedia Card A Command */
171#define AT91_PA28_TCLK4 (1 << 28) /* B: TC External Clock Input 4 */
172#define AT91_PA29_MCDA0 (1 << 29) /* A: MMC Multimedia Card A Data 0 */
173#define AT91_PA29_TCLK5 (1 << 29) /* B: TC External Clock Input 5 */
174#define AT91_PA30_DRXD (1 << 30) /* A: DBGU Receive Data */
175#define AT91_PA30_CTS2 (1 << 30) /* B: USART Clear To Send 2 */
176#define AT91_PA31_DTXD (1 << 31) /* A: DBGU Transmit Data */
177#define AT91_PA31_RTS2 (1 << 31) /* B: USART Ready To Send 2 */
178
179#define AT91_PB0_TF0 (1 << 0) /* A: SSC Transmit Frame Sync 0 */
180#define AT91_PB0_RTS3 (1 << 0) /* B: USART Ready To Send 3 */
181#define AT91_PB1_TK0 (1 << 1) /* A: SSC Transmit Clock 0 */
182#define AT91_PB1_CTS3 (1 << 1) /* B: USART Clear To Send 3 */
183#define AT91_PB2_TD0 (1 << 2) /* A: SSC Transmit Data 0 */
184#define AT91_PB2_SCK3 (1 << 2) /* B: USART Serial Clock 3 */
185#define AT91_PB3_RD0 (1 << 3) /* A: SSC Receive Data 0 */
186#define AT91_PB3_MCDA1 (1 << 3) /* B: MMC Multimedia Card A Data 1 */
187#define AT91_PB4_RK0 (1 << 4) /* A: SSC Receive Clock 0 */
188#define AT91_PB4_MCDA2 (1 << 4) /* B: MMC Multimedia Card A Data 2 */
189#define AT91_PB5_RF0 (1 << 5) /* A: SSC Receive Frame Sync 0 */
190#define AT91_PB5_MCDA3 (1 << 5) /* B: MMC Multimedia Card A Data 3 */
191#define AT91_PB6_TF1 (1 << 6) /* A: SSC Transmit Frame Sync 1 */
192#define AT91_PB6_TIOA3 (1 << 6) /* B: TC I/O Line A 3 */
193#define AT91_PB7_TK1 (1 << 7) /* A: SSC Transmit Clock 1 */
194#define AT91_PB7_TIOB3 (1 << 7) /* B: TC I/O Line B 3 */
195#define AT91_PB8_TD1 (1 << 8) /* A: SSC Transmit Data 1 */
196#define AT91_PB8_TIOA4 (1 << 8) /* B: TC I/O Line A 4 */
197#define AT91_PB9_RD1 (1 << 9) /* A: SSC Receive Data 1 */
198#define AT91_PB9_TIOB4 (1 << 9) /* B: TC I/O Line B 4 */
199#define AT91_PB10_RK1 (1 << 10) /* A: SSC Receive Clock 1 */
200#define AT91_PB10_TIOA5 (1 << 10) /* B: TC I/O Line A 5 */
201#define AT91_PB11_RF1 (1 << 11) /* A: SSC Receive Frame Sync 1 */
202#define AT91_PB11_TIOB5 (1 << 11) /* B: TC I/O Line B 5 */
203#define AT91_PB12_TF2 (1 << 12) /* A: SSC Transmit Frame Sync 2 */
204#define AT91_PB12_ETX2 (1 << 12) /* B: Ethernet Transmit Data 2 */
205#define AT91_PB13_TK2 (1 << 13) /* A: SSC Transmit Clock 3 */
206#define AT91_PB13_ETX3 (1 << 13) /* B: Ethernet Transmit Data 3 */
207#define AT91_PB14_TD2 (1 << 14) /* A: SSC Transmit Data 2 */
208#define AT91_PB14_ETXER (1 << 14) /* B: Ethernet Transmit Coding Error */
209#define AT91_PB15_RD2 (1 << 15) /* A: SSC Receive Data 2 */
210#define AT91_PB15_ERX2 (1 << 15) /* B: Ethernet Receive Data 2 */
211#define AT91_PB16_RK2 (1 << 16) /* A: SSC Receive Clock 2 */
212#define AT91_PB16_ERX3 (1 << 16) /* B: Ethernet Receive Data 3 */
213#define AT91_PB17_RF2 (1 << 17) /* A: SSC Receive Frame Sync 2 */
214#define AT91_PB17_ERXDV (1 << 17) /* B: Ethernet Receive Data Valid */
215#define AT91_PB18_RI1 (1 << 18) /* A: USART Ring Indicator 1 */
216#define AT91_PB18_ECOL (1 << 18) /* B: Ethernet Collision Detected */
217#define AT91_PB19_DTR1 (1 << 19) /* A: USART Data Terminal Ready 1 */
218#define AT91_PB19_ERXCK (1 << 19) /* B: Ethernet Receive Clock */
219#define AT91_PB20_TXD1 (1 << 20) /* A: USART Transmit Data 1 */
220#define AT91_PB21_RXD1 (1 << 21) /* A: USART Receive Data 1 */
221#define AT91_PB22_SCK1 (1 << 22) /* A: USART Serial Clock 1 */
222#define AT91_PB23_DCD1 (1 << 23) /* A: USART Data Carrier Detect 1 */
223#define AT91_PB24_CTS1 (1 << 24) /* A: USART Clear To Send 1 */
224#define AT91_PB25_DSR1 (1 << 25) /* A: USART Data Set Ready 1 */
225#define AT91_PB25_EF100 (1 << 25) /* B: Ethernet Force 100 Mbit */
226#define AT91_PB26_RTS1 (1 << 26) /* A: USART Ready To Send 1 */
227#define AT91_PB27_PCK0 (1 << 27) /* B: PMC Programmable Clock Output 0 */
228#define AT91_PB28_FIQ (1 << 28) /* A: Fast Interrupt */
229#define AT91_PB29_IRQ0 (1 << 29) /* A: External Interrupt 0 */
230
231#define AT91_PC0_BFCK (1 << 0) /* A: Burst Flash Clock */
232#define AT91_PC1_BFRDY_SMOE (1 << 1) /* A: Burst Flash Ready / SmartMedia Output Enable */
233#define AT91_PC2_BFAVD (1 << 2) /* A: Burst Flash Address Valid */
234#define AT91_PC3_BFBAA_SMWE (1 << 3) /* A: Burst Flash Address Advance / SmartMedia Write Enable */
235#define AT91_PC4_BFOE (1 << 4) /* A: Burst Flash Output Enable */
236#define AT91_PC5_BFWE (1 << 5) /* A: Burst Flash Write Enable */
237#define AT91_PC6_NWAIT (1 << 6) /* A: SMC Wait Signal */
238#define AT91_PC7_A23 (1 << 7) /* A: Address Bus 23 */
239#define AT91_PC8_A24 (1 << 8) /* A: Address Bus 24 */
240#define AT91_PC9_A25_CFRNW (1 << 9) /* A: Address Bus 25 / Compact Flash Read Not Write */
241#define AT91_PC10_NCS4_CFCS (1 << 10) /* A: SMC Chip Select 4 / Compact Flash Chip Select */
242#define AT91_PC11_NCS5_CFCE1 (1 << 11) /* A: SMC Chip Select 5 / Compact Flash Chip Enable 1 */
243#define AT91_PC12_NCS6_CFCE2 (1 << 12) /* A: SMC Chip Select 6 / Compact Flash Chip Enable 2 */
244#define AT91_PC13_NCS7 (1 << 13) /* A: Chip Select 7 */
245
246#define AT91_PD0_ETX0 (1 << 0) /* A: Ethernet Transmit Data 0 */
247#define AT91_PD1_ETX1 (1 << 1) /* A: Ethernet Transmit Data 1 */
248#define AT91_PD2_ETX2 (1 << 2) /* A: Ethernet Transmit Data 2 */
249#define AT91_PD3_ETX3 (1 << 3) /* A: Ethernet Transmit Data 3 */
250#define AT91_PD4_ETXEN (1 << 4) /* A: Ethernet Transmit Enable */
251#define AT91_PD5_ETXER (1 << 5) /* A: Ethernet Transmit Coding Error */
252#define AT91_PD6_DTXD (1 << 6) /* A: DBGU Transmit Data */
253#define AT91_PD7_PCK0 (1 << 7) /* A: PMC Programmable Clock Output 0 */
254#define AT91_PD7_TSYNC (1 << 7) /* B: ETM Trace Synchronization Signal */
255#define AT91_PD8_PCK1 (1 << 8) /* A: PMC Programmable Clock Output 1 */
256#define AT91_PD8_TCLK (1 << 8) /* B: ETM Trace Clock */
257#define AT91_PD9_PCK2 (1 << 9) /* A: PMC Programmable Clock Output 2 */
258#define AT91_PD9_TPS0 (1 << 9) /* B: ETM Trace ARM Pipeline Status 0 */
259#define AT91_PD10_PCK3 (1 << 10) /* A: PMC Programmable Clock Output 3 */
260#define AT91_PD10_TPS1 (1 << 10) /* B: ETM Trace ARM Pipeline Status 1 */
261#define AT91_PD11_TPS2 (1 << 11) /* B: ETM Trace ARM Pipeline Status 2 */
262#define AT91_PD12_TPK0 (1 << 12) /* B: ETM Trace Packet Port 0 */
263#define AT91_PD13_TPK1 (1 << 13) /* B: ETM Trace Packet Port 1 */
264#define AT91_PD14_TPK2 (1 << 14) /* B: ETM Trace Packet Port 2 */
265#define AT91_PD15_TD0 (1 << 15) /* A: SSC Transmit Data 0 */
266#define AT91_PD15_TPK3 (1 << 15) /* B: ETM Trace Packet Port 3 */
267#define AT91_PD16_TD1 (1 << 16) /* A: SSC Transmit Data 1 */
268#define AT91_PD16_TPK4 (1 << 16) /* B: ETM Trace Packet Port 4 */
269#define AT91_PD17_TD2 (1 << 17) /* A: SSC Transmit Data 2 */
270#define AT91_PD17_TPK5 (1 << 17) /* B: ETM Trace Packet Port 5 */
271#define AT91_PD18_NPCS1 (1 << 18) /* A: SPI Peripheral Chip Select 1 */
272#define AT91_PD18_TPK6 (1 << 18) /* B: ETM Trace Packet Port 6 */
273#define AT91_PD19_NPCS2 (1 << 19) /* A: SPI Peripheral Chip Select 2 */
274#define AT91_PD19_TPK7 (1 << 19) /* B: ETM Trace Packet Port 7 */
275#define AT91_PD20_NPCS3 (1 << 20) /* A: SPI Peripheral Chip Select 3 */
276#define AT91_PD20_TPK8 (1 << 20) /* B: ETM Trace Packet Port 8 */
277#define AT91_PD21_RTS0 (1 << 21) /* A: USART Ready To Send 0 */
278#define AT91_PD21_TPK9 (1 << 21) /* B: ETM Trace Packet Port 9 */
279#define AT91_PD22_RTS1 (1 << 22) /* A: USART Ready To Send 1 */
280#define AT91_PD22_TPK10 (1 << 22) /* B: ETM Trace Packet Port 10 */
281#define AT91_PD23_RTS2 (1 << 23) /* A: USART Ready To Send 2 */
282#define AT91_PD23_TPK11 (1 << 23) /* B: ETM Trace Packet Port 11 */
283#define AT91_PD24_RTS3 (1 << 24) /* A: USART Ready To Send 3 */
284#define AT91_PD24_TPK12 (1 << 24) /* B: ETM Trace Packet Port 12 */
285#define AT91_PD25_DTR1 (1 << 25) /* A: USART Data Terminal Ready 1 */
286#define AT91_PD25_TPK13 (1 << 25) /* B: ETM Trace Packet Port 13 */
287#define AT91_PD26_TPK14 (1 << 26) /* B: ETM Trace Packet Port 14 */
288#define AT91_PD27_TPK15 (1 << 27) /* B: ETM Trace Packet Port 15 */
289#endif
290
291#endif 110#endif
diff --git a/include/asm-arm/arch-at91/at91sam9260.h b/include/asm-arm/arch-at91/at91sam9260.h
index 2cadebc36af7..0427f8698c07 100644
--- a/include/asm-arm/arch-at91/at91sam9260.h
+++ b/include/asm-arm/arch-at91/at91sam9260.h
@@ -117,13 +117,4 @@
117#define AT91SAM9XE_SRAM_BASE 0x00300000 /* Internal SRAM base address */ 117#define AT91SAM9XE_SRAM_BASE 0x00300000 /* Internal SRAM base address */
118 118
119 119
120#if 0
121/*
122 * PIO pin definitions (peripheral A/B multiplexing).
123 */
124
125// TODO: Add
126
127#endif
128
129#endif 120#endif
diff --git a/include/asm-arm/arch-at91/at91sam9261.h b/include/asm-arm/arch-at91/at91sam9261.h
index 01b58ffe2e27..9eb459570330 100644
--- a/include/asm-arm/arch-at91/at91sam9261.h
+++ b/include/asm-arm/arch-at91/at91sam9261.h
@@ -98,195 +98,4 @@
98#define AT91SAM9261_LCDC_BASE 0x00600000 /* LDC controller */ 98#define AT91SAM9261_LCDC_BASE 0x00600000 /* LDC controller */
99 99
100 100
101#if 0
102/*
103 * PIO pin definitions (peripheral A/B multiplexing).
104 */
105#define AT91_PA0_SPI0_MISO (1 << 0) /* A: SPI0 Master In Slave */
106#define AT91_PA0_MCDA0 (1 << 0) /* B: Multimedia Card A Data 0 */
107#define AT91_PA1_SPI0_MOSI (1 << 1) /* A: SPI0 Master Out Slave */
108#define AT91_PA1_MCCDA (1 << 1) /* B: Multimedia Card A Command */
109#define AT91_PA2_SPI0_SPCK (1 << 2) /* A: SPI0 Serial Clock */
110#define AT91_PA2_MCCK (1 << 2) /* B: Multimedia Card Clock */
111#define AT91_PA3_SPI0_NPCS0 (1 << 3) /* A: SPI0 Peripheral Chip Select 0 */
112#define AT91_PA4_SPI0_NPCS1 (1 << 4) /* A: SPI0 Peripheral Chip Select 1 */
113#define AT91_PA4_MCDA1 (1 << 4) /* B: Multimedia Card A Data 1 */
114#define AT91_PA5_SPI0_NPCS2 (1 << 5) /* A: SPI0 Peripheral Chip Select 2 */
115#define AT91_PA5_MCDA2 (1 << 5) /* B: Multimedia Card A Data 2 */
116#define AT91_PA6_SPI0_NPCS3 (1 << 6) /* A: SPI0 Peripheral Chip Select 3 */
117#define AT91_PA6_MCDA3 (1 << 6) /* B: Multimedia Card A Data 3 */
118#define AT91_PA7_TWD (1 << 7) /* A: TWI Two-wire Serial Data */
119#define AT91_PA7_PCK0 (1 << 7) /* B: PMC Programmable clock Output 0 */
120#define AT91_PA8_TWCK (1 << 8) /* A: TWI Two-wire Serial Clock */
121#define AT91_PA8_PCK1 (1 << 8) /* B: PMC Programmable clock Output 1 */
122#define AT91_PA9_DRXD (1 << 9) /* A: DBGU Debug Receive Data */
123#define AT91_PA9_PCK2 (1 << 9) /* B: PMC Programmable clock Output 2 */
124#define AT91_PA10_DTXD (1 << 10) /* A: DBGU Debug Transmit Data */
125#define AT91_PA10_PCK3 (1 << 10) /* B: PMC Programmable clock Output 3 */
126#define AT91_PA11_TSYNC (1 << 11) /* A: Trace Synchronization Signal */
127#define AT91_PA11_SCK1 (1 << 11) /* B: USART1 Serial Clock */
128#define AT91_PA12_TCLK (1 << 12) /* A: Trace Clock */
129#define AT91_PA12_RTS1 (1 << 12) /* B: USART1 Ready To Send */
130#define AT91_PA13_TPS0 (1 << 13) /* A: Trace ARM Pipeline Status 0 */
131#define AT91_PA13_CTS1 (1 << 13) /* B: USART1 Clear To Send */
132#define AT91_PA14_TPS1 (1 << 14) /* A: Trace ARM Pipeline Status 1 */
133#define AT91_PA14_SCK2 (1 << 14) /* B: USART2 Serial Clock */
134#define AT91_PA15_TPS2 (1 << 15) /* A: Trace ARM Pipeline Status 2 */
135#define AT91_PA15_RTS2 (1 << 15) /* B: USART2 Ready To Send */
136#define AT91_PA16_TPK0 (1 << 16) /* A: Trace Packet Port 0 */
137#define AT91_PA16_CTS2 (1 << 16) /* B: USART2 Clear To Send */
138#define AT91_PA17_TPK1 (1 << 17) /* A: Trace Packet Port 1 */
139#define AT91_PA17_TF1 (1 << 17) /* B: SSC1 Transmit Frame Sync */
140#define AT91_PA18_TPK2 (1 << 18) /* A: Trace Packet Port 2 */
141#define AT91_PA18_TK1 (1 << 18) /* B: SSC1 Transmit Clock */
142#define AT91_PA19_TPK3 (1 << 19) /* A: Trace Packet Port 3 */
143#define AT91_PA19_TD1 (1 << 19) /* B: SSC1 Transmit Data */
144#define AT91_PA20_TPK4 (1 << 20) /* A: Trace Packet Port 4 */
145#define AT91_PA20_RD1 (1 << 20) /* B: SSC1 Receive Data */
146#define AT91_PA21_TPK5 (1 << 21) /* A: Trace Packet Port 5 */
147#define AT91_PA21_RK1 (1 << 21) /* B: SSC1 Receive Clock */
148#define AT91_PA22_TPK6 (1 << 22) /* A: Trace Packet Port 6 */
149#define AT91_PA22_RF1 (1 << 22) /* B: SSC1 Receive Frame Sync */
150#define AT91_PA23_TPK7 (1 << 23) /* A: Trace Packet Port 7 */
151#define AT91_PA23_RTS0 (1 << 23) /* B: USART0 Ready To Send */
152#define AT91_PA24_TPK8 (1 << 24) /* A: Trace Packet Port 8 */
153#define AT91_PA24_SPI1_NPCS1 (1 << 24) /* B: SPI1 Peripheral Chip Select 1 */
154#define AT91_PA25_TPK9 (1 << 25) /* A: Trace Packet Port 9 */
155#define AT91_PA25_SPI1_NPCS2 (1 << 25) /* B: SPI1 Peripheral Chip Select 2 */
156#define AT91_PA26_TPK10 (1 << 26) /* A: Trace Packet Port 10 */
157#define AT91_PA26_SPI1_NPCS3 (1 << 26) /* B: SPI1 Peripheral Chip Select 3 */
158#define AT91_PA27_TPK11 (1 << 27) /* A: Trace Packet Port 11 */
159#define AT91_PA27_SPI0_NPCS1 (1 << 27) /* B: SPI0 Peripheral Chip Select 1 */
160#define AT91_PA28_TPK12 (1 << 28) /* A: Trace Packet Port 12 */
161#define AT91_PA28_SPI0_NPCS2 (1 << 28) /* B: SPI0 Peripheral Chip Select 2 */
162#define AT91_PA29_TPK13 (1 << 29) /* A: Trace Packet Port 13 */
163#define AT91_PA29_SPI0_NPCS3 (1 << 29) /* B: SPI0 Peripheral Chip Select 3 */
164#define AT91_PA30_TPK14 (1 << 30) /* A: Trace Packet Port 14 */
165#define AT91_PA30_A23 (1 << 30) /* B: Address Bus bit 23 */
166#define AT91_PA31_TPK15 (1 << 31) /* A: Trace Packet Port 15 */
167#define AT91_PA31_A24 (1 << 31) /* B: Address Bus bit 24 */
168
169#define AT91_PB0_LCDVSYNC (1 << 0) /* A: LCD Vertical Synchronization */
170#define AT91_PB1_LCDHSYNC (1 << 1) /* A: LCD Horizontal Synchronization */
171#define AT91_PB2_LCDDOTCK (1 << 2) /* A: LCD Dot Clock */
172#define AT91_PB2_PCK0 (1 << 2) /* B: PMC Programmable clock Output 0 */
173#define AT91_PB3_LCDDEN (1 << 3) /* A: LCD Data Enable */
174#define AT91_PB4_LCDCC (1 << 4) /* A: LCD Contrast Control */
175#define AT91_PB4_LCDD2 (1 << 4) /* B: LCD Data Bus Bit 2 */
176#define AT91_PB5_LCDD0 (1 << 5) /* A: LCD Data Bus Bit 0 */
177#define AT91_PB5_LCDD3 (1 << 5) /* B: LCD Data Bus Bit 3 */
178#define AT91_PB6_LCDD1 (1 << 6) /* A: LCD Data Bus Bit 1 */
179#define AT91_PB6_LCDD4 (1 << 6) /* B: LCD Data Bus Bit 4 */
180#define AT91_PB7_LCDD2 (1 << 7) /* A: LCD Data Bus Bit 2 */
181#define AT91_PB7_LCDD5 (1 << 7) /* B: LCD Data Bus Bit 5 */
182#define AT91_PB8_LCDD3 (1 << 8) /* A: LCD Data Bus Bit 3 */
183#define AT91_PB8_LCDD6 (1 << 8) /* B: LCD Data Bus Bit 6 */
184#define AT91_PB9_LCDD4 (1 << 9) /* A: LCD Data Bus Bit 4 */
185#define AT91_PB9_LCDD7 (1 << 9) /* B: LCD Data Bus Bit 7 */
186#define AT91_PB10_LCDD5 (1 << 10) /* A: LCD Data Bus Bit 5 */
187#define AT91_PB10_LCDD10 (1 << 10) /* B: LCD Data Bus Bit 10 */
188#define AT91_PB11_LCDD6 (1 << 11) /* A: LCD Data Bus Bit 6 */
189#define AT91_PB11_LCDD11 (1 << 11) /* B: LCD Data Bus Bit 11 */
190#define AT91_PB12_LCDD7 (1 << 12) /* A: LCD Data Bus Bit 7 */
191#define AT91_PB12_LCDD12 (1 << 12) /* B: LCD Data Bus Bit 12 */
192#define AT91_PB13_LCDD8 (1 << 13) /* A: LCD Data Bus Bit 8 */
193#define AT91_PB13_LCDD13 (1 << 13) /* B: LCD Data Bus Bit 13 */
194#define AT91_PB14_LCDD9 (1 << 14) /* A: LCD Data Bus Bit 9 */
195#define AT91_PB14_LCDD14 (1 << 14) /* B: LCD Data Bus Bit 14 */
196#define AT91_PB15_LCDD10 (1 << 15) /* A: LCD Data Bus Bit 10 */
197#define AT91_PB15_LCDD15 (1 << 15) /* B: LCD Data Bus Bit 15 */
198#define AT91_PB16_LCDD11 (1 << 16) /* A: LCD Data Bus Bit 11 */
199#define AT91_PB16_LCDD19 (1 << 16) /* B: LCD Data Bus Bit 19 */
200#define AT91_PB17_LCDD12 (1 << 17) /* A: LCD Data Bus Bit 12 */
201#define AT91_PB17_LCDD20 (1 << 17) /* B: LCD Data Bus Bit 20 */
202#define AT91_PB18_LCDD13 (1 << 18) /* A: LCD Data Bus Bit 13 */
203#define AT91_PB18_LCDD21 (1 << 18) /* B: LCD Data Bus Bit 21 */
204#define AT91_PB19_LCDD14 (1 << 19) /* A: LCD Data Bus Bit 14 */
205#define AT91_PB19_LCDD22 (1 << 19) /* B: LCD Data Bus Bit 22 */
206#define AT91_PB20_LCDD15 (1 << 20) /* A: LCD Data Bus Bit 15 */
207#define AT91_PB20_LCDD23 (1 << 20) /* B: LCD Data Bus Bit 23 */
208#define AT91_PB21_TF0 (1 << 21) /* A: SSC0 Transmit Frame Sync */
209#define AT91_PB21_LCDD16 (1 << 21) /* B: LCD Data Bus Bit 16 */
210#define AT91_PB22_TK0 (1 << 22) /* A: SSC0 Transmit Clock */
211#define AT91_PB22_LCDD17 (1 << 22) /* B: LCD Data Bus Bit 17 */
212#define AT91_PB23_TD0 (1 << 23) /* A: SSC0 Transmit Data */
213#define AT91_PB23_LCDD18 (1 << 23) /* B: LCD Data Bus Bit 18 */
214#define AT91_PB24_RD0 (1 << 24) /* A: SSC0 Receive Data */
215#define AT91_PB24_LCDD19 (1 << 24) /* B: LCD Data Bus Bit 19 */
216#define AT91_PB25_RK0 (1 << 25) /* A: SSC0 Receive Clock */
217#define AT91_PB25_LCDD20 (1 << 25) /* B: LCD Data Bus Bit 20 */
218#define AT91_PB26_RF0 (1 << 26) /* A: SSC0 Receive Frame Sync */
219#define AT91_PB26_LCDD21 (1 << 26) /* B: LCD Data Bus Bit 21 */
220#define AT91_PB27_SPI1_NPCS1 (1 << 27) /* A: SPI1 Peripheral Chip Select 1 */
221#define AT91_PB27_LCDD22 (1 << 27) /* B: LCD Data Bus Bit 22 */
222#define AT91_PB28_SPI1_NPCS0 (1 << 28) /* A: SPI1 Peripheral Chip Select 0 */
223#define AT91_PB28_LCDD23 (1 << 28) /* B: LCD Data Bus Bit 23 */
224#define AT91_PB29_SPI1_SPCK (1 << 29) /* A: SPI1 Serial Clock */
225#define AT91_PB29_IRQ2 (1 << 29) /* B: Interrupt input 2 */
226#define AT91_PB30_SPI1_MISO (1 << 30) /* A: SPI1 Master In Slave */
227#define AT91_PB30_IRQ1 (1 << 30) /* B: Interrupt input 1 */
228#define AT91_PB31_SPI1_MOSI (1 << 31) /* A: SPI1 Master Out Slave */
229#define AT91_PB31_PCK2 (1 << 31) /* B: PMC Programmable clock Output 2 */
230
231#define AT91_PC0_SMOE (1 << 0) /* A: SmartMedia Output Enable */
232#define AT91_PC0_NCS6 (1 << 0) /* B: Chip Select 6 */
233#define AT91_PC1_SMWE (1 << 1) /* A: SmartMedia Write Enable */
234#define AT91_PC1_NCS7 (1 << 1) /* B: Chip Select 7 */
235#define AT91_PC2_NWAIT (1 << 2) /* A: NWAIT */
236#define AT91_PC2_IRQ0 (1 << 2) /* B: Interrupt input 0 */
237#define AT91_PC3_A25_CFRNW (1 << 3) /* A: Address Bus[25] / Compact Flash Read Not Write */
238#define AT91_PC4_NCS4_CFCS0 (1 << 4) /* A: Chip Select 4 / CompactFlash Chip Select 0 */
239#define AT91_PC5_NCS5_CFCS1 (1 << 5) /* A: Chip Select 5 / CompactFlash Chip Select 1 */
240#define AT91_PC6_CFCE1 (1 << 6) /* A: CompactFlash Chip Enable 1 */
241#define AT91_PC7_CFCE2 (1 << 7) /* A: CompactFlash Chip Enable 2 */
242#define AT91_PC8_TXD0 (1 << 8) /* A: USART0 Transmit Data */
243#define AT91_PC8_PCK2 (1 << 8) /* B: PMC Programmable clock Output 2 */
244#define AT91_PC9_RXD0 (1 << 9) /* A: USART0 Receive Data */
245#define AT91_PC9_PCK3 (1 << 9) /* B: PMC Programmable clock Output 3 */
246#define AT91_PC10_RTS0 (1 << 10) /* A: USART0 Ready To Send */
247#define AT91_PC10_SCK0 (1 << 10) /* B: USART0 Serial Clock */
248#define AT91_PC11_CTS0 (1 << 11) /* A: USART0 Clear To Send */
249#define AT91_PC11_FIQ (1 << 11) /* B: AIC Fast Interrupt Input */
250#define AT91_PC12_TXD1 (1 << 12) /* A: USART1 Transmit Data */
251#define AT91_PC12_NCS6 (1 << 12) /* B: Chip Select 6 */
252#define AT91_PC13_RXD1 (1 << 13) /* A: USART1 Receive Data */
253#define AT91_PC13_NCS7 (1 << 13) /* B: Chip Select 7 */
254#define AT91_PC14_TXD2 (1 << 14) /* A: USART2 Transmit Data */
255#define AT91_PC14_SPI1_NPCS2 (1 << 14) /* B: SPI1 Peripheral Chip Select 2 */
256#define AT91_PC15_RXD2 (1 << 15) /* A: USART2 Receive Data */
257#define AT91_PC15_SPI1_NPCS3 (1 << 15) /* B: SPI1 Peripheral Chip Select 3 */
258#define AT91_PC16_D16 (1 << 16) /* A: Data Bus [16] */
259#define AT91_PC16_TCLK0 (1 << 16) /* B: Timer Counter 0 external clock input */
260#define AT91_PC17_D17 (1 << 17) /* A: Data Bus [17] */
261#define AT91_PC17_TCLK1 (1 << 17) /* B: Timer Counter 1 external clock input */
262#define AT91_PC18_D18 (1 << 18) /* A: Data Bus [18] */
263#define AT91_PC18_TCLK2 (1 << 18) /* B: Timer Counter 2 external clock input */
264#define AT91_PC19_D19 (1 << 19) /* A: Data Bus [19] */
265#define AT91_PC19_TIOA0 (1 << 19) /* B: Timer Counter 0 Multipurpose Timer I/O Pin A */
266#define AT91_PC20_D20 (1 << 20) /* A: Data Bus [20] */
267#define AT91_PC20_TIOB0 (1 << 20) /* B: Timer Counter 0 Multipurpose Timer I/O Pin B */
268#define AT91_PC21_D21 (1 << 21) /* A: Data Bus [21] */
269#define AT91_PC21_TIOA1 (1 << 21) /* B: Timer Counter 1 Multipurpose Timer I/O Pin A */
270#define AT91_PC22_D22 (1 << 22) /* A: Data Bus [22] */
271#define AT91_PC22_TIOB1 (1 << 22) /* B: Timer Counter 1 Multipurpose Timer I/O Pin B */
272#define AT91_PC23_D23 (1 << 23) /* A: Data Bus [23] */
273#define AT91_PC23_TIOA2 (1 << 23) /* B: Timer Counter 2 Multipurpose Timer I/O Pin A */
274#define AT91_PC24_D24 (1 << 24) /* A: Data Bus [24] */
275#define AT91_PC24_TIOB2 (1 << 24) /* B: Timer Counter 2 Multipurpose Timer I/O Pin B */
276#define AT91_PC25_D25 (1 << 25) /* A: Data Bus [25] */
277#define AT91_PC25_TF2 (1 << 25) /* B: SSC2 Transmit Frame Sync */
278#define AT91_PC26_D26 (1 << 26) /* A: Data Bus [26] */
279#define AT91_PC26_TK2 (1 << 26) /* B: SSC2 Transmit Clock */
280#define AT91_PC27_D27 (1 << 27) /* A: Data Bus [27] */
281#define AT91_PC27_TD2 (1 << 27) /* B: SSC2 Transmit Data */
282#define AT91_PC28_D28 (1 << 28) /* A: Data Bus [28] */
283#define AT91_PC28_RD2 (1 << 28) /* B: SSC2 Receive Data */
284#define AT91_PC29_D29 (1 << 29) /* A: Data Bus [29] */
285#define AT91_PC29_RK2 (1 << 29) /* B: SSC2 Receive Clock */
286#define AT91_PC30_D30 (1 << 30) /* A: Data Bus [30] */
287#define AT91_PC30_RF2 (1 << 30) /* B: SSC2 Receive Frame Sync */
288#define AT91_PC31_D31 (1 << 31) /* A: Data Bus [31] */
289#define AT91_PC31_PCK1 (1 << 31) /* B: PMC Programmable clock Output 1 */
290#endif
291
292#endif 101#endif
diff --git a/include/asm-arm/arch-at91/at91sam9263.h b/include/asm-arm/arch-at91/at91sam9263.h
index f4af68ae0ea9..115c47ac7ebb 100644
--- a/include/asm-arm/arch-at91/at91sam9263.h
+++ b/include/asm-arm/arch-at91/at91sam9263.h
@@ -119,13 +119,5 @@
119#define AT91SAM9263_DMAC_BASE 0x00800000 /* DMA Controller */ 119#define AT91SAM9263_DMAC_BASE 0x00800000 /* DMA Controller */
120#define AT91SAM9263_UHP_BASE 0x00a00000 /* USB Host controller */ 120#define AT91SAM9263_UHP_BASE 0x00a00000 /* USB Host controller */
121 121
122#if 0
123/*
124 * PIO pin definitions (peripheral A/B multiplexing).
125 */
126
127// TODO: Add
128
129#endif
130 122
131#endif 123#endif
diff --git a/include/asm-arm/arch-at91/board.h b/include/asm-arm/arch-at91/board.h
index 7a34a5b1fed0..0ce6ee98ed0b 100644
--- a/include/asm-arm/arch-at91/board.h
+++ b/include/asm-arm/arch-at91/board.h
@@ -121,7 +121,7 @@ extern void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data);
121 /* AC97 */ 121 /* AC97 */
122struct atmel_ac97_data { 122struct atmel_ac97_data {
123 u8 reset_pin; /* reset */ 123 u8 reset_pin; /* reset */
124} 124};
125extern void __init at91_add_device_ac97(struct atmel_ac97_data *data); 125extern void __init at91_add_device_ac97(struct atmel_ac97_data *data);
126 126
127 /* LEDs */ 127 /* LEDs */
diff --git a/include/asm-arm/arch-at91/cpu.h b/include/asm-arm/arch-at91/cpu.h
index d464ca58cdbc..7ef4eebe9f8e 100644
--- a/include/asm-arm/arch-at91/cpu.h
+++ b/include/asm-arm/arch-at91/cpu.h
@@ -68,4 +68,10 @@ static inline unsigned long at91_arch_identify(void)
68#define cpu_is_at91sam9263() (0) 68#define cpu_is_at91sam9263() (0)
69#endif 69#endif
70 70
71/*
72 * Since this is ARM, we will never run on any AVR32 CPU. But these
73 * definitions may reduce clutter in common drivers.
74 */
75#define cpu_is_at32ap7000() (0)
76
71#endif 77#endif
diff --git a/include/asm-arm/arch-imx/imx-regs.h b/include/asm-arm/arch-imx/imx-regs.h
index de6494a4dc6b..30de404c61f5 100644
--- a/include/asm-arm/arch-imx/imx-regs.h
+++ b/include/asm-arm/arch-imx/imx-regs.h
@@ -297,7 +297,7 @@
297#define SAR(x) __REG2( IMX_DMAC_BASE + 0x80, (x) << 6) /* Source Address Registers */ 297#define SAR(x) __REG2( IMX_DMAC_BASE + 0x80, (x) << 6) /* Source Address Registers */
298#define DAR(x) __REG2( IMX_DMAC_BASE + 0x84, (x) << 6) /* Destination Address Registers */ 298#define DAR(x) __REG2( IMX_DMAC_BASE + 0x84, (x) << 6) /* Destination Address Registers */
299#define CNTR(x) __REG2( IMX_DMAC_BASE + 0x88, (x) << 6) /* Count Registers */ 299#define CNTR(x) __REG2( IMX_DMAC_BASE + 0x88, (x) << 6) /* Count Registers */
300#define CCR(x) __REG2( IMX_DMAC_BASE + 0x8c, (x) << 6) /* Control Registers */ 300#define CCR(x) __REG2( IMX_DMAC_BASE + 0x8c, (x) << 6) /* Control Registers */
301#define RSSR(x) __REG2( IMX_DMAC_BASE + 0x90, (x) << 6) /* Request source select Registers */ 301#define RSSR(x) __REG2( IMX_DMAC_BASE + 0x90, (x) << 6) /* Request source select Registers */
302#define BLR(x) __REG2( IMX_DMAC_BASE + 0x94, (x) << 6) /* Burst length Registers */ 302#define BLR(x) __REG2( IMX_DMAC_BASE + 0x94, (x) << 6) /* Burst length Registers */
303#define RTOR(x) __REG2( IMX_DMAC_BASE + 0x98, (x) << 6) /* Request timeout Registers */ 303#define RTOR(x) __REG2( IMX_DMAC_BASE + 0x98, (x) << 6) /* Request timeout Registers */
diff --git a/include/asm-arm/arch-integrator/platform.h b/include/asm-arm/arch-integrator/platform.h
index 96ad3d2a66d1..83c4c1ceb411 100644
--- a/include/asm-arm/arch-integrator/platform.h
+++ b/include/asm-arm/arch-integrator/platform.h
@@ -17,7 +17,7 @@
17 * from .s file by awk -f s2h.awk 17 * from .s file by awk -f s2h.awk
18 */ 18 */
19/************************************************************************** 19/**************************************************************************
20 * * Copyright © ARM Limited 1998. All rights reserved. 20 * * Copyright © ARM Limited 1998. All rights reserved.
21 * ***********************************************************************/ 21 * ***********************************************************************/
22/* ************************************************************************ 22/* ************************************************************************
23 * 23 *
diff --git a/include/asm-arm/arch-iop32x/glantank.h b/include/asm-arm/arch-iop32x/glantank.h
index 3b065618dd00..bf0665acc1c1 100644
--- a/include/asm-arm/arch-iop32x/glantank.h
+++ b/include/asm-arm/arch-iop32x/glantank.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * include/asm/arch-iop32x/glantank.h 2 * include/asm-arm/arch-iop32x/glantank.h
3 * 3 *
4 * IO-Data GLAN Tank board registers 4 * IO-Data GLAN Tank board registers
5 */ 5 */
diff --git a/include/asm-arm/arch-iop32x/n2100.h b/include/asm-arm/arch-iop32x/n2100.h
index fed31a648425..77a8af476629 100644
--- a/include/asm-arm/arch-iop32x/n2100.h
+++ b/include/asm-arm/arch-iop32x/n2100.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * include/asm/arch-iop32x/n2100.h 2 * include/asm-arm/arch-iop32x/n2100.h
3 * 3 *
4 * Thecus N2100 board registers 4 * Thecus N2100 board registers
5 */ 5 */
diff --git a/include/asm-arm/arch-omap/aic23.h b/include/asm-arm/arch-omap/aic23.h
index 6513065941d0..aec2d6563622 100644
--- a/include/asm-arm/arch-omap/aic23.h
+++ b/include/asm-arm/arch-omap/aic23.h
@@ -110,7 +110,7 @@
110#define TLV320AIC23ID1 (0x1a) // cs low 110#define TLV320AIC23ID1 (0x1a) // cs low
111#define TLV320AIC23ID2 (0x1b) // cs high 111#define TLV320AIC23ID2 (0x1b) // cs high
112 112
113void tlv320aic23_power_up(void); 113void aic23_power_up(void);
114void tlv320aic23_power_down(void); 114void aic23_power_down(void);
115 115
116#endif /* __ASM_ARCH_AIC23_H */ 116#endif /* __ASM_ARCH_AIC23_H */
diff --git a/include/asm-arm/arch-omap/board-apollon.h b/include/asm-arm/arch-omap/board-apollon.h
index de0c5b792c58..dcb587b311f1 100644
--- a/include/asm-arm/arch-omap/board-apollon.h
+++ b/include/asm-arm/arch-omap/board-apollon.h
@@ -30,16 +30,7 @@
30#define __ASM_ARCH_OMAP_APOLLON_H 30#define __ASM_ARCH_OMAP_APOLLON_H
31 31
32/* Placeholder for APOLLON specific defines */ 32/* Placeholder for APOLLON specific defines */
33/* GPMC CS0 */
34#define APOLLON_CS0_BASE 0x00000000
35/* GPMC CS1 */
36#define APOLLON_CS1_BASE 0x08000000
37#define APOLLON_ETHR_START (APOLLON_CS1_BASE + 0x300)
38#define APOLLON_ETHR_GPIO_IRQ 74 33#define APOLLON_ETHR_GPIO_IRQ 74
39/* GPMC CS2 - reserved for OneNAND */
40#define APOLLON_CS2_BASE 0x10000000
41/* GPMC CS3 - reserved for NOR or NAND */
42#define APOLLON_CS3_BASE 0x18000000
43 34
44#endif /* __ASM_ARCH_OMAP_APOLLON_H */ 35#endif /* __ASM_ARCH_OMAP_APOLLON_H */
45 36
diff --git a/include/asm-arm/arch-omap/board-h4.h b/include/asm-arm/arch-omap/board-h4.h
index 7ef664bc9e33..7e0efef4bb65 100644
--- a/include/asm-arm/arch-omap/board-h4.h
+++ b/include/asm-arm/arch-omap/board-h4.h
@@ -30,9 +30,6 @@
30#define __ASM_ARCH_OMAP_H4_H 30#define __ASM_ARCH_OMAP_H4_H
31 31
32/* Placeholder for H4 specific defines */ 32/* Placeholder for H4 specific defines */
33/* GPMC CS1 */
34#define OMAP24XX_ETHR_START 0x08000300
35#define OMAP24XX_ETHR_GPIO_IRQ 92 33#define OMAP24XX_ETHR_GPIO_IRQ 92
36#define H4_CS0_BASE 0x04000000
37#endif /* __ASM_ARCH_OMAP_H4_H */ 34#endif /* __ASM_ARCH_OMAP_H4_H */
38 35
diff --git a/include/asm-arm/arch-omap/board.h b/include/asm-arm/arch-omap/board.h
index edf1dc6ad919..031672c56377 100644
--- a/include/asm-arm/arch-omap/board.h
+++ b/include/asm-arm/arch-omap/board.h
@@ -4,7 +4,7 @@
4 * Information structures for board-specific data 4 * Information structures for board-specific data
5 * 5 *
6 * Copyright (C) 2004 Nokia Corporation 6 * Copyright (C) 2004 Nokia Corporation
7 * Written by Juha Yrjölä <juha.yrjola@nokia.com> 7 * Written by Juha Yrjölä <juha.yrjola@nokia.com>
8 */ 8 */
9 9
10#ifndef _OMAP_BOARD_H 10#ifndef _OMAP_BOARD_H
@@ -12,6 +12,8 @@
12 12
13#include <linux/types.h> 13#include <linux/types.h>
14 14
15#include <asm/arch/gpio-switch.h>
16
15/* Different peripheral ids */ 17/* Different peripheral ids */
16#define OMAP_TAG_CLOCK 0x4f01 18#define OMAP_TAG_CLOCK 0x4f01
17#define OMAP_TAG_MMC 0x4f02 19#define OMAP_TAG_MMC 0x4f02
@@ -99,26 +101,31 @@ struct omap_usb_config {
99struct omap_lcd_config { 101struct omap_lcd_config {
100 char panel_name[16]; 102 char panel_name[16];
101 char ctrl_name[16]; 103 char ctrl_name[16];
104 s16 nreset_gpio;
105 u8 data_lines;
106};
107
108struct device;
109struct fb_info;
110struct omap_backlight_config {
111 int default_intensity;
112 int (*set_power)(struct device *dev, int state);
113 int (*check_fb)(struct fb_info *fb);
102}; 114};
103 115
104struct omap_fbmem_config { 116struct omap_fbmem_config {
105 u32 fb_sram_start; 117 u32 start;
106 u32 fb_sram_size; 118 u32 size;
107 u32 fb_sdram_start; 119};
108 u32 fb_sdram_size; 120
109}; 121struct omap_pwm_led_platform_data {
110 122 const char *name;
111/* Cover: 123 int intensity_timer;
112 * high -> closed 124 int blink_timer;
113 * low -> open 125 void (*set_power)(struct omap_pwm_led_platform_data *self, int on_off);
114 * Connection: 126};
115 * high -> connected 127
116 * low -> disconnected 128/* See include/asm-arm/arch-omap/gpio-switch.h for definitions */
117 */
118#define OMAP_GPIO_SWITCH_TYPE_COVER 0x0000
119#define OMAP_GPIO_SWITCH_TYPE_CONNECTION 0x0001
120#define OMAP_GPIO_SWITCH_FLAG_INVERTED 0x0001
121#define OMAP_GPIO_SWITCH_FLAG_OUTPUT 0x0002
122struct omap_gpio_switch_config { 129struct omap_gpio_switch_config {
123 char name[12]; 130 char name[12];
124 u16 gpio; 131 u16 gpio;
diff --git a/include/asm-arm/arch-omap/dma.h b/include/asm-arm/arch-omap/dma.h
index d591d0585bba..f7774192a41e 100644
--- a/include/asm-arm/arch-omap/dma.h
+++ b/include/asm-arm/arch-omap/dma.h
@@ -2,7 +2,7 @@
2 * linux/include/asm-arm/arch-omap/dma.h 2 * linux/include/asm-arm/arch-omap/dma.h
3 * 3 *
4 * Copyright (C) 2003 Nokia Corporation 4 * Copyright (C) 2003 Nokia Corporation
5 * Author: Juha Yrjölä <juha.yrjola@nokia.com> 5 * Author: Juha Yrjölä <juha.yrjola@nokia.com>
6 * 6 *
7 * 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
8 * it under the terms of the GNU General Public License as published by 8 * it under the terms of the GNU General Public License as published by
diff --git a/include/asm-arm/arch-omap/dsp.h b/include/asm-arm/arch-omap/dsp.h
deleted file mode 100644
index 06dad83dd41f..000000000000
--- a/include/asm-arm/arch-omap/dsp.h
+++ /dev/null
@@ -1,250 +0,0 @@
1/*
2 * linux/include/asm-arm/arch-omap/dsp.h
3 *
4 * Header for OMAP DSP driver
5 *
6 * Copyright (C) 2002-2005 Nokia Corporation
7 *
8 * Written by Toshihiro Kobayashi <toshihiro.kobayashi@nokia.com>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 *
24 * 2005/06/01: DSP Gateway version 3.3
25 */
26
27#ifndef ASM_ARCH_DSP_H
28#define ASM_ARCH_DSP_H
29
30
31/*
32 * for /dev/dspctl/ctl
33 */
34#define OMAP_DSP_IOCTL_RESET 1
35#define OMAP_DSP_IOCTL_RUN 2
36#define OMAP_DSP_IOCTL_SETRSTVECT 3
37#define OMAP_DSP_IOCTL_CPU_IDLE 4
38#define OMAP_DSP_IOCTL_MPUI_WORDSWAP_ON 5
39#define OMAP_DSP_IOCTL_MPUI_WORDSWAP_OFF 6
40#define OMAP_DSP_IOCTL_MPUI_BYTESWAP_ON 7
41#define OMAP_DSP_IOCTL_MPUI_BYTESWAP_OFF 8
42#define OMAP_DSP_IOCTL_GBL_IDLE 9
43#define OMAP_DSP_IOCTL_DSPCFG 10
44#define OMAP_DSP_IOCTL_DSPUNCFG 11
45#define OMAP_DSP_IOCTL_TASKCNT 12
46#define OMAP_DSP_IOCTL_POLL 13
47#define OMAP_DSP_IOCTL_REGMEMR 40
48#define OMAP_DSP_IOCTL_REGMEMW 41
49#define OMAP_DSP_IOCTL_REGIOR 42
50#define OMAP_DSP_IOCTL_REGIOW 43
51#define OMAP_DSP_IOCTL_GETVAR 44
52#define OMAP_DSP_IOCTL_SETVAR 45
53#define OMAP_DSP_IOCTL_RUNLEVEL 50
54#define OMAP_DSP_IOCTL_SUSPEND 51
55#define OMAP_DSP_IOCTL_RESUME 52
56#define OMAP_DSP_IOCTL_FBEN 53
57#define OMAP_DSP_IOCTL_FBDIS 54
58#define OMAP_DSP_IOCTL_MBSEND 99
59
60/*
61 * for taskdev
62 * (ioctls below should be >= 0x10000)
63 */
64#define OMAP_DSP_TASK_IOCTL_BFLSH 0x10000
65#define OMAP_DSP_TASK_IOCTL_SETBSZ 0x10001
66#define OMAP_DSP_TASK_IOCTL_LOCK 0x10002
67#define OMAP_DSP_TASK_IOCTL_UNLOCK 0x10003
68#define OMAP_DSP_TASK_IOCTL_GETNAME 0x10004
69
70/*
71 * for /dev/dspctl/mem
72 */
73#define OMAP_DSP_MEM_IOCTL_EXMAP 1
74#define OMAP_DSP_MEM_IOCTL_EXUNMAP 2
75#define OMAP_DSP_MEM_IOCTL_EXMAP_FLUSH 3
76#define OMAP_DSP_MEM_IOCTL_FBEXPORT 5
77#define OMAP_DSP_MEM_IOCTL_MMUITACK 7
78#define OMAP_DSP_MEM_IOCTL_MMUINIT 9
79#define OMAP_DSP_MEM_IOCTL_KMEM_RESERVE 11
80#define OMAP_DSP_MEM_IOCTL_KMEM_RELEASE 12
81
82struct omap_dsp_mapinfo {
83 unsigned long dspadr;
84 unsigned long size;
85};
86
87/*
88 * for /dev/dspctl/twch
89 */
90#define OMAP_DSP_TWCH_IOCTL_MKDEV 1
91#define OMAP_DSP_TWCH_IOCTL_RMDEV 2
92#define OMAP_DSP_TWCH_IOCTL_TADD 11
93#define OMAP_DSP_TWCH_IOCTL_TDEL 12
94#define OMAP_DSP_TWCH_IOCTL_TKILL 13
95
96#define OMAP_DSP_DEVSTATE_NOTASK 0x00000001
97#define OMAP_DSP_DEVSTATE_ATTACHED 0x00000002
98#define OMAP_DSP_DEVSTATE_GARBAGE 0x00000004
99#define OMAP_DSP_DEVSTATE_INVALID 0x00000008
100#define OMAP_DSP_DEVSTATE_ADDREQ 0x00000100
101#define OMAP_DSP_DEVSTATE_DELREQ 0x00000200
102#define OMAP_DSP_DEVSTATE_ADDFAIL 0x00001000
103#define OMAP_DSP_DEVSTATE_ADDING 0x00010000
104#define OMAP_DSP_DEVSTATE_DELING 0x00020000
105#define OMAP_DSP_DEVSTATE_KILLING 0x00040000
106#define OMAP_DSP_DEVSTATE_STATE_MASK 0x7fffffff
107#define OMAP_DSP_DEVSTATE_STALE 0x80000000
108
109struct omap_dsp_taddinfo {
110 unsigned char minor;
111 unsigned long taskadr;
112};
113#define OMAP_DSP_TADD_ABORTADR 0xffffffff
114
115
116/*
117 * error cause definition (for error detection device)
118 */
119#define OMAP_DSP_ERRDT_WDT 0x00000001
120#define OMAP_DSP_ERRDT_MMU 0x00000002
121
122
123/*
124 * mailbox protocol definitions
125 */
126
127struct omap_dsp_mailbox_cmd {
128 unsigned short cmd;
129 unsigned short data;
130};
131
132struct omap_dsp_reginfo {
133 unsigned short adr;
134 unsigned short val;
135};
136
137struct omap_dsp_varinfo {
138 unsigned char varid;
139 unsigned short val[0];
140};
141
142#define OMAP_DSP_MBPROT_REVISION 0x0019
143
144#define OMAP_DSP_MBCMD_WDSND 0x10
145#define OMAP_DSP_MBCMD_WDREQ 0x11
146#define OMAP_DSP_MBCMD_BKSND 0x20
147#define OMAP_DSP_MBCMD_BKREQ 0x21
148#define OMAP_DSP_MBCMD_BKYLD 0x23
149#define OMAP_DSP_MBCMD_BKSNDP 0x24
150#define OMAP_DSP_MBCMD_BKREQP 0x25
151#define OMAP_DSP_MBCMD_TCTL 0x30
152#define OMAP_DSP_MBCMD_TCTLDATA 0x31
153#define OMAP_DSP_MBCMD_POLL 0x32
154#define OMAP_DSP_MBCMD_WDT 0x50 /* v3.3: obsolete */
155#define OMAP_DSP_MBCMD_RUNLEVEL 0x51
156#define OMAP_DSP_MBCMD_PM 0x52
157#define OMAP_DSP_MBCMD_SUSPEND 0x53
158#define OMAP_DSP_MBCMD_KFUNC 0x54
159#define OMAP_DSP_MBCMD_TCFG 0x60
160#define OMAP_DSP_MBCMD_TADD 0x62
161#define OMAP_DSP_MBCMD_TDEL 0x63
162#define OMAP_DSP_MBCMD_TSTOP 0x65
163#define OMAP_DSP_MBCMD_DSPCFG 0x70
164#define OMAP_DSP_MBCMD_REGRW 0x72
165#define OMAP_DSP_MBCMD_GETVAR 0x74
166#define OMAP_DSP_MBCMD_SETVAR 0x75
167#define OMAP_DSP_MBCMD_ERR 0x78
168#define OMAP_DSP_MBCMD_DBG 0x79
169
170#define OMAP_DSP_MBCMD_TCTL_TINIT 0x0000
171#define OMAP_DSP_MBCMD_TCTL_TEN 0x0001
172#define OMAP_DSP_MBCMD_TCTL_TDIS 0x0002
173#define OMAP_DSP_MBCMD_TCTL_TCLR 0x0003
174#define OMAP_DSP_MBCMD_TCTL_TCLR_FORCE 0x0004
175
176#define OMAP_DSP_MBCMD_RUNLEVEL_USER 0x01
177#define OMAP_DSP_MBCMD_RUNLEVEL_SUPER 0x0e
178#define OMAP_DSP_MBCMD_RUNLEVEL_RECOVERY 0x10
179
180#define OMAP_DSP_MBCMD_PM_DISABLE 0x00
181#define OMAP_DSP_MBCMD_PM_ENABLE 0x01
182
183#define OMAP_DSP_MBCMD_KFUNC_FBCTL 0x00
184#define OMAP_DSP_MBCMD_KFUNC_AUDIO_PWR 0x01
185
186#define OMAP_DSP_MBCMD_FBCTL_UPD 0x0000
187#define OMAP_DSP_MBCMD_FBCTL_ENABLE 0x0002
188#define OMAP_DSP_MBCMD_FBCTL_DISABLE 0x0003
189
190#define OMAP_DSP_MBCMD_AUDIO_PWR_UP 0x0000
191#define OMAP_DSP_MBCMD_AUDIO_PWR_DOWN1 0x0001
192#define OMAP_DSP_MBCMD_AUDIO_PWR_DOWN2 0x0002
193
194#define OMAP_DSP_MBCMD_TDEL_SAFE 0x0000
195#define OMAP_DSP_MBCMD_TDEL_KILL 0x0001
196
197#define OMAP_DSP_MBCMD_DSPCFG_REQ 0x00
198#define OMAP_DSP_MBCMD_DSPCFG_SYSADRH 0x28
199#define OMAP_DSP_MBCMD_DSPCFG_SYSADRL 0x29
200#define OMAP_DSP_MBCMD_DSPCFG_PROTREV 0x70
201#define OMAP_DSP_MBCMD_DSPCFG_ABORT 0x78
202#define OMAP_DSP_MBCMD_DSPCFG_LAST 0x80
203
204#define OMAP_DSP_MBCMD_REGRW_MEMR 0x00
205#define OMAP_DSP_MBCMD_REGRW_MEMW 0x01
206#define OMAP_DSP_MBCMD_REGRW_IOR 0x02
207#define OMAP_DSP_MBCMD_REGRW_IOW 0x03
208#define OMAP_DSP_MBCMD_REGRW_DATA 0x04
209
210#define OMAP_DSP_MBCMD_VARID_ICRMASK 0x00
211#define OMAP_DSP_MBCMD_VARID_LOADINFO 0x01
212
213#define OMAP_DSP_TTYP_ARCV 0x0001
214#define OMAP_DSP_TTYP_ASND 0x0002
215#define OMAP_DSP_TTYP_BKMD 0x0004
216#define OMAP_DSP_TTYP_BKDM 0x0008
217#define OMAP_DSP_TTYP_PVMD 0x0010
218#define OMAP_DSP_TTYP_PVDM 0x0020
219
220#define OMAP_DSP_EID_BADTID 0x10
221#define OMAP_DSP_EID_BADTCN 0x11
222#define OMAP_DSP_EID_BADBID 0x20
223#define OMAP_DSP_EID_BADCNT 0x21
224#define OMAP_DSP_EID_NOTLOCKED 0x22
225#define OMAP_DSP_EID_STVBUF 0x23
226#define OMAP_DSP_EID_BADADR 0x24
227#define OMAP_DSP_EID_BADTCTL 0x30
228#define OMAP_DSP_EID_BADPARAM 0x50
229#define OMAP_DSP_EID_FATAL 0x58
230#define OMAP_DSP_EID_NOMEM 0xc0
231#define OMAP_DSP_EID_NORES 0xc1
232#define OMAP_DSP_EID_IPBFULL 0xc2
233#define OMAP_DSP_EID_WDT 0xd0
234#define OMAP_DSP_EID_TASKNOTRDY 0xe0
235#define OMAP_DSP_EID_TASKBSY 0xe1
236#define OMAP_DSP_EID_TASKERR 0xef
237#define OMAP_DSP_EID_BADCFGTYP 0xf0
238#define OMAP_DSP_EID_DEBUG 0xf8
239#define OMAP_DSP_EID_BADSEQ 0xfe
240#define OMAP_DSP_EID_BADCMD 0xff
241
242#define OMAP_DSP_TNM_LEN 16
243
244#define OMAP_DSP_TID_FREE 0xff
245#define OMAP_DSP_TID_ANON 0xfe
246
247#define OMAP_DSP_BID_NULL 0xffff
248#define OMAP_DSP_BID_PVT 0xfffe
249
250#endif /* ASM_ARCH_DSP_H */
diff --git a/include/asm-arm/arch-omap/dsp_common.h b/include/asm-arm/arch-omap/dsp_common.h
index 16a459dfa714..c61f868f24ee 100644
--- a/include/asm-arm/arch-omap/dsp_common.h
+++ b/include/asm-arm/arch-omap/dsp_common.h
@@ -1,38 +1,34 @@
1/* 1/*
2 * linux/include/asm-arm/arch-omap/dsp_common.h 2 * This file is part of OMAP DSP driver (DSP Gateway version 3.3.1)
3 * 3 *
4 * Header for OMAP DSP subsystem control 4 * Copyright (C) 2004-2006 Nokia Corporation. All rights reserved.
5 * 5 *
6 * Copyright (C) 2004,2005 Nokia Corporation 6 * Contact: Toshihiro Kobayashi <toshihiro.kobayashi@nokia.com>
7 * 7 *
8 * Written by Toshihiro Kobayashi <toshihiro.kobayashi@nokia.com> 8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * version 2 as published by the Free Software Foundation.
9 * 11 *
10 * This program is free software; you can redistribute it and/or modify 12 * This program is distributed in the hope that it will be useful, but
11 * it under the terms of the GNU General Public License as published by 13 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * the Free Software Foundation; either version 2 of the License, or 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * (at your option) any later version. 15 * General Public License for more details.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 * 16 *
20 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA
23 * 21 *
24 * 2005/06/03: DSP Gateway version 3.3
25 */ 22 */
26 23
27#ifndef ASM_ARCH_DSP_COMMON_H 24#ifndef ASM_ARCH_DSP_COMMON_H
28#define ASM_ARCH_DSP_COMMON_H 25#define ASM_ARCH_DSP_COMMON_H
29 26
27#ifdef CONFIG_ARCH_OMAP1
30extern void omap_dsp_request_mpui(void); 28extern void omap_dsp_request_mpui(void);
31extern void omap_dsp_release_mpui(void); 29extern void omap_dsp_release_mpui(void);
32extern int omap_dsp_request_mem(void); 30extern int omap_dsp_request_mem(void);
33extern int omap_dsp_release_mem(void); 31extern int omap_dsp_release_mem(void);
34 32#endif
35extern void (*omap_dsp_audio_pwr_up_request)(int stage);
36extern void (*omap_dsp_audio_pwr_down_request)(int stage);
37 33
38#endif /* ASM_ARCH_DSP_COMMON_H */ 34#endif /* ASM_ARCH_DSP_COMMON_H */
diff --git a/include/asm-arm/arch-omap/gpio-switch.h b/include/asm-arm/arch-omap/gpio-switch.h
new file mode 100644
index 000000000000..10da0e07c0cf
--- /dev/null
+++ b/include/asm-arm/arch-omap/gpio-switch.h
@@ -0,0 +1,54 @@
1/*
2 * GPIO switch definitions
3 *
4 * Copyright (C) 2006 Nokia Corporation
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
11#ifndef __ASM_ARCH_OMAP_GPIO_SWITCH_H
12#define __ASM_ARCH_OMAP_GPIO_SWITCH_H
13
14#include <linux/types.h>
15
16/* Cover:
17 * high -> closed
18 * low -> open
19 * Connection:
20 * high -> connected
21 * low -> disconnected
22 * Activity:
23 * high -> active
24 * low -> inactive
25 *
26 */
27#define OMAP_GPIO_SWITCH_TYPE_COVER 0x0000
28#define OMAP_GPIO_SWITCH_TYPE_CONNECTION 0x0001
29#define OMAP_GPIO_SWITCH_TYPE_ACTIVITY 0x0002
30#define OMAP_GPIO_SWITCH_FLAG_INVERTED 0x0001
31#define OMAP_GPIO_SWITCH_FLAG_OUTPUT 0x0002
32
33struct omap_gpio_switch {
34 const char *name;
35 s16 gpio;
36 unsigned flags:4;
37 unsigned type:4;
38
39 /* Time in ms to debounce when transitioning from
40 * inactive state to active state. */
41 u16 debounce_rising;
42 /* Same for transition from active to inactive state. */
43 u16 debounce_falling;
44
45 /* notify board-specific code about state changes */
46 void (* notify)(void *data, int state);
47 void *notify_data;
48};
49
50/* Call at init time only */
51extern void omap_register_gpio_switches(const struct omap_gpio_switch *tbl,
52 int count);
53
54#endif
diff --git a/include/asm-arm/arch-omap/gpio.h b/include/asm-arm/arch-omap/gpio.h
index 590917efc94a..97b397dd7e87 100644
--- a/include/asm-arm/arch-omap/gpio.h
+++ b/include/asm-arm/arch-omap/gpio.h
@@ -5,7 +5,7 @@
5 * 5 *
6 * Copyright (C) 2003-2005 Nokia Corporation 6 * Copyright (C) 2003-2005 Nokia Corporation
7 * 7 *
8 * Written by Juha Yrjölä <juha.yrjola@nokia.com> 8 * Written by Juha Yrjölä <juha.yrjola@nokia.com>
9 * 9 *
10 * This program is free software; you can redistribute it and/or modify 10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by 11 * it under the terms of the GNU General Public License as published by
diff --git a/include/asm-arm/arch-omap/gpmc.h b/include/asm-arm/arch-omap/gpmc.h
index 7c03ef6c14c4..995cc83482eb 100644
--- a/include/asm-arm/arch-omap/gpmc.h
+++ b/include/asm-arm/arch-omap/gpmc.h
@@ -87,5 +87,7 @@ extern int gpmc_cs_calc_divider(int cs, unsigned int sync_clk);
87extern int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t); 87extern int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t);
88extern int gpmc_cs_request(int cs, unsigned long size, unsigned long *base); 88extern int gpmc_cs_request(int cs, unsigned long size, unsigned long *base);
89extern void gpmc_cs_free(int cs); 89extern void gpmc_cs_free(int cs);
90extern int gpmc_cs_set_reserved(int cs, int reserved);
91extern int gpmc_cs_reserved(int cs);
90 92
91#endif 93#endif
diff --git a/include/asm-arm/arch-omap/hardware.h b/include/asm-arm/arch-omap/hardware.h
index 481048d65214..e225f4f39b34 100644
--- a/include/asm-arm/arch-omap/hardware.h
+++ b/include/asm-arm/arch-omap/hardware.h
@@ -267,6 +267,15 @@
267#define OMAP_LPG2_PMR (OMAP_LPG2_BASE + 0x04) 267#define OMAP_LPG2_PMR (OMAP_LPG2_BASE + 0x04)
268 268
269/* 269/*
270 * ----------------------------------------------------------------------------
271 * Pulse-Width Light
272 * ----------------------------------------------------------------------------
273 */
274#define OMAP_PWL_BASE 0xfffb5800
275#define OMAP_PWL_ENABLE (OMAP_PWL_BASE + 0x00)
276#define OMAP_PWL_CLK_ENABLE (OMAP_PWL_BASE + 0x04)
277
278/*
270 * --------------------------------------------------------------------------- 279 * ---------------------------------------------------------------------------
271 * Processor specific defines 280 * Processor specific defines
272 * --------------------------------------------------------------------------- 281 * ---------------------------------------------------------------------------
diff --git a/include/asm-arm/arch-omap/hwa742.h b/include/asm-arm/arch-omap/hwa742.h
new file mode 100644
index 000000000000..577f492f2d3c
--- /dev/null
+++ b/include/asm-arm/arch-omap/hwa742.h
@@ -0,0 +1,12 @@
1#ifndef _HWA742_H
2#define _HWA742_H
3
4struct hwa742_platform_data {
5 void (*power_up)(struct device *dev);
6 void (*power_down)(struct device *dev);
7 unsigned long (*get_clock_rate)(struct device *dev);
8
9 unsigned te_connected:1;
10};
11
12#endif
diff --git a/include/asm-arm/arch-omap/io.h b/include/asm-arm/arch-omap/io.h
index 78f68e6a4f0c..4aca7e3d7566 100644
--- a/include/asm-arm/arch-omap/io.h
+++ b/include/asm-arm/arch-omap/io.h
@@ -77,6 +77,17 @@
77#define io_p2v(pa) ((pa) + IO_OFFSET) /* Works for L3 and L4 */ 77#define io_p2v(pa) ((pa) + IO_OFFSET) /* Works for L3 and L4 */
78#define io_v2p(va) ((va) - IO_OFFSET) /* Works for L3 and L4 */ 78#define io_v2p(va) ((va) - IO_OFFSET) /* Works for L3 and L4 */
79 79
80/* DSP */
81#define DSP_MEM_24XX_PHYS OMAP24XX_DSP_MEM_BASE /* 0x58000000 */
82#define DSP_MEM_24XX_VIRT 0xe0000000
83#define DSP_MEM_24XX_SIZE 0x28000
84#define DSP_IPI_24XX_PHYS OMAP24XX_DSP_IPI_BASE /* 0x59000000 */
85#define DSP_IPI_24XX_VIRT 0xe1000000
86#define DSP_IPI_24XX_SIZE SZ_4K
87#define DSP_MMU_24XX_PHYS OMAP24XX_DSP_MMU_BASE /* 0x5a000000 */
88#define DSP_MMU_24XX_VIRT 0xe2000000
89#define DSP_MMU_24XX_SIZE SZ_4K
90
80#endif 91#endif
81 92
82#ifndef __ASSEMBLER__ 93#ifndef __ASSEMBLER__
diff --git a/include/asm-arm/arch-omap/irqs.h b/include/asm-arm/arch-omap/irqs.h
index c5bb05a69b81..3ede58b51db2 100644
--- a/include/asm-arm/arch-omap/irqs.h
+++ b/include/asm-arm/arch-omap/irqs.h
@@ -37,8 +37,6 @@
37#define INT_DSP_MMU_ABORT 7 37#define INT_DSP_MMU_ABORT 7
38#define INT_HOST 8 38#define INT_HOST 8
39#define INT_ABORT 9 39#define INT_ABORT 9
40#define INT_DSP_MAILBOX1 10
41#define INT_DSP_MAILBOX2 11
42#define INT_BRIDGE_PRIV 13 40#define INT_BRIDGE_PRIV 13
43#define INT_GPIO_BANK1 14 41#define INT_GPIO_BANK1 14
44#define INT_UART3 15 42#define INT_UART3 15
@@ -63,6 +61,8 @@
63#define INT_1510_RES2 2 61#define INT_1510_RES2 2
64#define INT_1510_SPI_TX 4 62#define INT_1510_SPI_TX 4
65#define INT_1510_SPI_RX 5 63#define INT_1510_SPI_RX 5
64#define INT_1510_DSP_MAILBOX1 10
65#define INT_1510_DSP_MAILBOX2 11
66#define INT_1510_RES12 12 66#define INT_1510_RES12 12
67#define INT_1510_LB_MMU 17 67#define INT_1510_LB_MMU 17
68#define INT_1510_RES18 18 68#define INT_1510_RES18 18
@@ -75,6 +75,8 @@
75#define INT_1610_IH2_FIQ 2 75#define INT_1610_IH2_FIQ 2
76#define INT_1610_McBSP2_TX 4 76#define INT_1610_McBSP2_TX 4
77#define INT_1610_McBSP2_RX 5 77#define INT_1610_McBSP2_RX 5
78#define INT_1610_DSP_MAILBOX1 10
79#define INT_1610_DSP_MAILBOX2 11
78#define INT_1610_LCD_LINE 12 80#define INT_1610_LCD_LINE 12
79#define INT_1610_GPTIMER1 17 81#define INT_1610_GPTIMER1 17
80#define INT_1610_GPTIMER2 18 82#define INT_1610_GPTIMER2 18
@@ -131,11 +133,11 @@
131#define INT_RTC_TIMER (25 + IH2_BASE) 133#define INT_RTC_TIMER (25 + IH2_BASE)
132#define INT_RTC_ALARM (26 + IH2_BASE) 134#define INT_RTC_ALARM (26 + IH2_BASE)
133#define INT_MEM_STICK (27 + IH2_BASE) 135#define INT_MEM_STICK (27 + IH2_BASE)
134#define INT_DSP_MMU (28 + IH2_BASE)
135 136
136/* 137/*
137 * OMAP-1510 specific IRQ numbers for interrupt handler 2 138 * OMAP-1510 specific IRQ numbers for interrupt handler 2
138 */ 139 */
140#define INT_1510_DSP_MMU (28 + IH2_BASE)
139#define INT_1510_COM_SPI_RO (31 + IH2_BASE) 141#define INT_1510_COM_SPI_RO (31 + IH2_BASE)
140 142
141/* 143/*
@@ -146,6 +148,7 @@
146#define INT_1610_USB_OTG (8 + IH2_BASE) 148#define INT_1610_USB_OTG (8 + IH2_BASE)
147#define INT_1610_SoSSI (9 + IH2_BASE) 149#define INT_1610_SoSSI (9 + IH2_BASE)
148#define INT_1610_SoSSI_MATCH (19 + IH2_BASE) 150#define INT_1610_SoSSI_MATCH (19 + IH2_BASE)
151#define INT_1610_DSP_MMU (28 + IH2_BASE)
149#define INT_1610_McBSP2RX_OF (31 + IH2_BASE) 152#define INT_1610_McBSP2RX_OF (31 + IH2_BASE)
150#define INT_1610_STI (32 + IH2_BASE) 153#define INT_1610_STI (32 + IH2_BASE)
151#define INT_1610_STI_WAKEUP (33 + IH2_BASE) 154#define INT_1610_STI_WAKEUP (33 + IH2_BASE)
@@ -239,10 +242,15 @@
239#define INT_24XX_SDMA_IRQ3 15 242#define INT_24XX_SDMA_IRQ3 15
240#define INT_24XX_CAM_IRQ 24 243#define INT_24XX_CAM_IRQ 24
241#define INT_24XX_DSS_IRQ 25 244#define INT_24XX_DSS_IRQ 25
245#define INT_24XX_MAIL_U0_MPU 26
246#define INT_24XX_DSP_UMA 27
247#define INT_24XX_DSP_MMU 28
242#define INT_24XX_GPIO_BANK1 29 248#define INT_24XX_GPIO_BANK1 29
243#define INT_24XX_GPIO_BANK2 30 249#define INT_24XX_GPIO_BANK2 30
244#define INT_24XX_GPIO_BANK3 31 250#define INT_24XX_GPIO_BANK3 31
245#define INT_24XX_GPIO_BANK4 32 251#define INT_24XX_GPIO_BANK4 32
252#define INT_24XX_GPIO_BANK5 33
253#define INT_24XX_MAIL_U3_MPU 34
246#define INT_24XX_GPTIMER1 37 254#define INT_24XX_GPTIMER1 37
247#define INT_24XX_GPTIMER2 38 255#define INT_24XX_GPTIMER2 38
248#define INT_24XX_GPTIMER3 39 256#define INT_24XX_GPTIMER3 39
@@ -262,6 +270,12 @@
262#define INT_24XX_UART1_IRQ 72 270#define INT_24XX_UART1_IRQ 72
263#define INT_24XX_UART2_IRQ 73 271#define INT_24XX_UART2_IRQ 73
264#define INT_24XX_UART3_IRQ 74 272#define INT_24XX_UART3_IRQ 74
273#define INT_24XX_USB_IRQ_GEN 75
274#define INT_24XX_USB_IRQ_NISO 76
275#define INT_24XX_USB_IRQ_ISO 77
276#define INT_24XX_USB_IRQ_HGEN 78
277#define INT_24XX_USB_IRQ_HSOF 79
278#define INT_24XX_USB_IRQ_OTG 80
265#define INT_24XX_MMC_IRQ 83 279#define INT_24XX_MMC_IRQ 83
266 280
267/* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730) and 281/* Max. 128 level 2 IRQs (OMAP1610), 192 GPIOs (OMAP730) and
diff --git a/include/asm-arm/arch-omap/lcd_lph8923.h b/include/asm-arm/arch-omap/lcd_lph8923.h
deleted file mode 100644
index 004e67e22ca7..000000000000
--- a/include/asm-arm/arch-omap/lcd_lph8923.h
+++ /dev/null
@@ -1,14 +0,0 @@
1#ifndef __LCD_LPH8923_H
2#define __LCD_LPH8923_H
3
4enum lcd_lph8923_test_num {
5 LCD_LPH8923_TEST_RGB_LINES,
6};
7
8enum lcd_lph8923_test_result {
9 LCD_LPH8923_TEST_SUCCESS,
10 LCD_LPH8923_TEST_INVALID,
11 LCD_LPH8923_TEST_FAILED,
12};
13
14#endif
diff --git a/include/asm-arm/arch-omap/lcd_mipid.h b/include/asm-arm/arch-omap/lcd_mipid.h
new file mode 100644
index 000000000000..f8fbc4801e52
--- /dev/null
+++ b/include/asm-arm/arch-omap/lcd_mipid.h
@@ -0,0 +1,24 @@
1#ifndef __LCD_MIPID_H
2#define __LCD_MIPID_H
3
4enum mipid_test_num {
5 MIPID_TEST_RGB_LINES,
6};
7
8enum mipid_test_result {
9 MIPID_TEST_SUCCESS,
10 MIPID_TEST_INVALID,
11 MIPID_TEST_FAILED,
12};
13
14#ifdef __KERNEL__
15
16struct mipid_platform_data {
17 int nreset_gpio;
18 int data_lines;
19 void (*shutdown)(struct mipid_platform_data *pdata);
20};
21
22#endif
23
24#endif
diff --git a/include/asm-arm/arch-omap/led.h b/include/asm-arm/arch-omap/led.h
new file mode 100644
index 000000000000..f3acae28e2da
--- /dev/null
+++ b/include/asm-arm/arch-omap/led.h
@@ -0,0 +1,24 @@
1/*
2 * linux/include/asm-arm/arch-omap/led.h
3 *
4 * Copyright (C) 2006 Samsung Electronics
5 * Kyungmin Park <kyungmin.park@samsung.com>
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_ARCH_LED_H
12#define ASMARM_ARCH_LED_H
13
14struct omap_led_config {
15 struct led_classdev cdev;
16 s16 gpio;
17};
18
19struct omap_led_platform_data {
20 s16 nr_leds;
21 struct omap_led_config *leds;
22};
23
24#endif
diff --git a/include/asm-arm/arch-omap/mailbox.h b/include/asm-arm/arch-omap/mailbox.h
new file mode 100644
index 000000000000..4bf0909461f2
--- /dev/null
+++ b/include/asm-arm/arch-omap/mailbox.h
@@ -0,0 +1,73 @@
1/* mailbox.h */
2
3#ifndef MAILBOX_H
4#define MAILBOX_H
5
6#include <linux/wait.h>
7#include <linux/workqueue.h>
8#include <linux/blkdev.h>
9
10typedef u32 mbox_msg_t;
11typedef void (mbox_receiver_t)(mbox_msg_t msg);
12struct omap_mbox;
13
14typedef int __bitwise omap_mbox_irq_t;
15#define IRQ_TX ((__force omap_mbox_irq_t) 1)
16#define IRQ_RX ((__force omap_mbox_irq_t) 2)
17
18typedef int __bitwise omap_mbox_type_t;
19#define OMAP_MBOX_TYPE1 ((__force omap_mbox_type_t) 1)
20#define OMAP_MBOX_TYPE2 ((__force omap_mbox_type_t) 2)
21
22struct omap_mbox_ops {
23 omap_mbox_type_t type;
24 int (*startup)(struct omap_mbox *mbox);
25 void (*shutdown)(struct omap_mbox *mbox);
26 /* fifo */
27 mbox_msg_t (*fifo_read)(struct omap_mbox *mbox);
28 void (*fifo_write)(struct omap_mbox *mbox, mbox_msg_t msg);
29 int (*fifo_empty)(struct omap_mbox *mbox);
30 int (*fifo_full)(struct omap_mbox *mbox);
31 /* irq */
32 void (*enable_irq)(struct omap_mbox *mbox, omap_mbox_irq_t irq);
33 void (*disable_irq)(struct omap_mbox *mbox, omap_mbox_irq_t irq);
34 void (*ack_irq)(struct omap_mbox *mbox, omap_mbox_irq_t irq);
35 int (*is_irq)(struct omap_mbox *mbox, omap_mbox_irq_t irq);
36};
37
38struct omap_mbox_queue {
39 spinlock_t lock;
40 request_queue_t *queue;
41 struct work_struct work;
42 int (*callback)(void *);
43 struct omap_mbox *mbox;
44};
45
46struct omap_mbox {
47 char *name;
48 unsigned int irq;
49
50 struct omap_mbox_queue *txq, *rxq;
51
52 struct omap_mbox_ops *ops;
53
54 mbox_msg_t seq_snd, seq_rcv;
55
56 struct device dev;
57
58 struct omap_mbox *next;
59 void *priv;
60
61 void (*err_notify)(void);
62};
63
64int omap_mbox_msg_send(struct omap_mbox *, mbox_msg_t msg, void *);
65void omap_mbox_init_seq(struct omap_mbox *);
66
67struct omap_mbox *omap_mbox_get(const char *);
68void omap_mbox_put(struct omap_mbox *);
69
70int omap_mbox_register(struct omap_mbox *);
71int omap_mbox_unregister(struct omap_mbox *);
72
73#endif /* MAILBOX_H */
diff --git a/include/asm-arm/arch-omap/mcspi.h b/include/asm-arm/arch-omap/mcspi.h
index 9e7f40a88e1b..1254e4945b6f 100644
--- a/include/asm-arm/arch-omap/mcspi.h
+++ b/include/asm-arm/arch-omap/mcspi.h
@@ -2,7 +2,6 @@
2#define _OMAP2_MCSPI_H 2#define _OMAP2_MCSPI_H
3 3
4struct omap2_mcspi_platform_config { 4struct omap2_mcspi_platform_config {
5 unsigned long base;
6 unsigned short num_cs; 5 unsigned short num_cs;
7}; 6};
8 7
diff --git a/include/asm-arm/arch-omap/memory.h b/include/asm-arm/arch-omap/memory.h
index 48fabc493163..14cba97c18ad 100644
--- a/include/asm-arm/arch-omap/memory.h
+++ b/include/asm-arm/arch-omap/memory.h
@@ -86,5 +86,18 @@
86 86
87#endif /* CONFIG_ARCH_OMAP15XX */ 87#endif /* CONFIG_ARCH_OMAP15XX */
88 88
89/* Override the ARM default */
90#ifdef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE
91
92#if (CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE == 0)
93#undef CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE
94#define CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE 2
95#endif
96
97#define CONSISTENT_DMA_SIZE \
98 (((CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE + 1) & ~1) * 1024 * 1024)
99
100#endif
101
89#endif 102#endif
90 103
diff --git a/include/asm-arm/arch-omap/menelaus.h b/include/asm-arm/arch-omap/menelaus.h
index 88cd4c87f0de..82d276a6bd95 100644
--- a/include/asm-arm/arch-omap/menelaus.h
+++ b/include/asm-arm/arch-omap/menelaus.h
@@ -7,10 +7,19 @@
7#ifndef __ASM_ARCH_MENELAUS_H 7#ifndef __ASM_ARCH_MENELAUS_H
8#define __ASM_ARCH_MENELAUS_H 8#define __ASM_ARCH_MENELAUS_H
9 9
10extern void menelaus_mmc_register(void (*callback)(unsigned long data, u8 card_mask), 10extern int menelaus_register_mmc_callback(void (*callback)(void *data, u8 card_mask),
11 unsigned long data); 11 void *data);
12extern void menelaus_mmc_remove(void); 12extern void menelaus_unregister_mmc_callback(void);
13extern void menelaus_mmc_opendrain(int enable); 13extern int menelaus_set_mmc_opendrain(int slot, int enable);
14extern int menelaus_set_mmc_slot(int slot, int enable, int power, int cd_on);
15
16extern int menelaus_set_vmem(unsigned int mV);
17extern int menelaus_set_vio(unsigned int mV);
18extern int menelaus_set_vmmc(unsigned int mV);
19extern int menelaus_set_vaux(unsigned int mV);
20extern int menelaus_set_vdcdc(int dcdc, unsigned int mV);
21extern int menelaus_set_slot_sel(int enable);
22extern int menelaus_get_slot_pin_states(void);
14 23
15#if defined(CONFIG_ARCH_OMAP24XX) && defined(CONFIG_MENELAUS) 24#if defined(CONFIG_ARCH_OMAP24XX) && defined(CONFIG_MENELAUS)
16#define omap_has_menelaus() 1 25#define omap_has_menelaus() 1
diff --git a/include/asm-arm/arch-omap/omap16xx.h b/include/asm-arm/arch-omap/omap16xx.h
index f0c7f0fb4dc0..f7f5cdfdccce 100644
--- a/include/asm-arm/arch-omap/omap16xx.h
+++ b/include/asm-arm/arch-omap/omap16xx.h
@@ -159,15 +159,6 @@
159#define UART3_MVR (OMAP_UART3_BASE + 0x50) 159#define UART3_MVR (OMAP_UART3_BASE + 0x50)
160 160
161/* 161/*
162 * ----------------------------------------------------------------------------
163 * Pulse-Width Light
164 * ----------------------------------------------------------------------------
165 */
166#define OMAP16XX_PWL_BASE (0xfffb5800)
167#define OMAP16XX_PWL_ENABLE (OMAP16XX_PWL_BASE + 0x00)
168#define OMAP16XX_PWL_CLK_ENABLE (OMAP16XX_PWL_BASE + 0x04)
169
170/*
171 * --------------------------------------------------------------------------- 162 * ---------------------------------------------------------------------------
172 * Watchdog timer 163 * Watchdog timer
173 * --------------------------------------------------------------------------- 164 * ---------------------------------------------------------------------------
@@ -199,5 +190,8 @@
199#define WSPR_DISABLE_0 (0x0000aaaa) 190#define WSPR_DISABLE_0 (0x0000aaaa)
200#define WSPR_DISABLE_1 (0x00005555) 191#define WSPR_DISABLE_1 (0x00005555)
201 192
193/* Mailbox */
194#define OMAP16XX_MAILBOX_BASE (0xfffcf000)
195
202#endif /* __ASM_ARCH_OMAP16XX_H */ 196#endif /* __ASM_ARCH_OMAP16XX_H */
203 197
diff --git a/include/asm-arm/arch-omap/omap24xx.h b/include/asm-arm/arch-omap/omap24xx.h
index 6e59805fa654..708b2fac77f2 100644
--- a/include/asm-arm/arch-omap/omap24xx.h
+++ b/include/asm-arm/arch-omap/omap24xx.h
@@ -20,5 +20,14 @@
20#define OMAP24XX_PRCM_BASE (L4_24XX_BASE + 0x8000) 20#define OMAP24XX_PRCM_BASE (L4_24XX_BASE + 0x8000)
21#define OMAP24XX_SDRC_BASE (L3_24XX_BASE + 0x9000) 21#define OMAP24XX_SDRC_BASE (L3_24XX_BASE + 0x9000)
22 22
23/* DSP SS */
24#define OMAP24XX_DSP_BASE 0x58000000
25#define OMAP24XX_DSP_MEM_BASE (OMAP24XX_DSP_BASE + 0x0)
26#define OMAP24XX_DSP_IPI_BASE (OMAP24XX_DSP_BASE + 0x1000000)
27#define OMAP24XX_DSP_MMU_BASE (OMAP24XX_DSP_BASE + 0x2000000)
28
29/* Mailbox */
30#define OMAP24XX_MAILBOX_BASE (L4_24XX_BASE + 0x94000)
31
23#endif /* __ASM_ARCH_OMAP24XX_H */ 32#endif /* __ASM_ARCH_OMAP24XX_H */
24 33
diff --git a/include/asm-arm/arch-omap/omapfb.h b/include/asm-arm/arch-omap/omapfb.h
index fccdb3db025f..46d7a4f60854 100644
--- a/include/asm-arm/arch-omap/omapfb.h
+++ b/include/asm-arm/arch-omap/omapfb.h
@@ -24,6 +24,9 @@
24#ifndef __OMAPFB_H 24#ifndef __OMAPFB_H
25#define __OMAPFB_H 25#define __OMAPFB_H
26 26
27#include <asm/ioctl.h>
28#include <asm/types.h>
29
27/* IOCTL commands. */ 30/* IOCTL commands. */
28 31
29#define OMAP_IOW(num, dtype) _IOW('O', num, dtype) 32#define OMAP_IOW(num, dtype) _IOW('O', num, dtype)
@@ -35,26 +38,46 @@
35#define OMAPFB_SYNC_GFX OMAP_IO(37) 38#define OMAPFB_SYNC_GFX OMAP_IO(37)
36#define OMAPFB_VSYNC OMAP_IO(38) 39#define OMAPFB_VSYNC OMAP_IO(38)
37#define OMAPFB_SET_UPDATE_MODE OMAP_IOW(40, int) 40#define OMAPFB_SET_UPDATE_MODE OMAP_IOW(40, int)
38#define OMAPFB_UPDATE_WINDOW_OLD OMAP_IOW(41, struct omapfb_update_window_old) 41#define OMAPFB_GET_CAPS OMAP_IOR(42, struct omapfb_caps)
39#define OMAPFB_GET_CAPS OMAP_IOR(42, unsigned long)
40#define OMAPFB_GET_UPDATE_MODE OMAP_IOW(43, int) 42#define OMAPFB_GET_UPDATE_MODE OMAP_IOW(43, int)
41#define OMAPFB_LCD_TEST OMAP_IOW(45, int) 43#define OMAPFB_LCD_TEST OMAP_IOW(45, int)
42#define OMAPFB_CTRL_TEST OMAP_IOW(46, int) 44#define OMAPFB_CTRL_TEST OMAP_IOW(46, int)
43#define OMAPFB_UPDATE_WINDOW OMAP_IOW(47, struct omapfb_update_window) 45#define OMAPFB_UPDATE_WINDOW_OLD OMAP_IOW(47, struct omapfb_update_window_old)
44#define OMAPFB_SETUP_PLANE OMAP_IOW(48, struct omapfb_setup_plane)
45#define OMAPFB_ENABLE_PLANE OMAP_IOW(49, struct omapfb_enable_plane)
46#define OMAPFB_SET_COLOR_KEY OMAP_IOW(50, struct omapfb_color_key) 46#define OMAPFB_SET_COLOR_KEY OMAP_IOW(50, struct omapfb_color_key)
47#define OMAPFB_GET_COLOR_KEY OMAP_IOW(51, struct omapfb_color_key)
48#define OMAPFB_SETUP_PLANE OMAP_IOW(52, struct omapfb_plane_info)
49#define OMAPFB_QUERY_PLANE OMAP_IOW(53, struct omapfb_plane_info)
50#define OMAPFB_UPDATE_WINDOW OMAP_IOW(54, struct omapfb_update_window)
51#define OMAPFB_SETUP_MEM OMAP_IOW(55, struct omapfb_mem_info)
52#define OMAPFB_QUERY_MEM OMAP_IOW(56, struct omapfb_mem_info)
47 53
48#define OMAPFB_CAPS_GENERIC_MASK 0x00000fff 54#define OMAPFB_CAPS_GENERIC_MASK 0x00000fff
49#define OMAPFB_CAPS_LCDC_MASK 0x00fff000 55#define OMAPFB_CAPS_LCDC_MASK 0x00fff000
50#define OMAPFB_CAPS_PANEL_MASK 0xff000000 56#define OMAPFB_CAPS_PANEL_MASK 0xff000000
51 57
52#define OMAPFB_CAPS_MANUAL_UPDATE 0x00001000 58#define OMAPFB_CAPS_MANUAL_UPDATE 0x00001000
59#define OMAPFB_CAPS_TEARSYNC 0x00002000
60#define OMAPFB_CAPS_PLANE_RELOCATE_MEM 0x00004000
61#define OMAPFB_CAPS_PLANE_SCALE 0x00008000
62#define OMAPFB_CAPS_WINDOW_PIXEL_DOUBLE 0x00010000
63#define OMAPFB_CAPS_WINDOW_SCALE 0x00020000
64#define OMAPFB_CAPS_WINDOW_OVERLAY 0x00040000
53#define OMAPFB_CAPS_SET_BACKLIGHT 0x01000000 65#define OMAPFB_CAPS_SET_BACKLIGHT 0x01000000
54 66
55/* Values from DSP must map to lower 16-bits */ 67/* Values from DSP must map to lower 16-bits */
56#define OMAPFB_FORMAT_MASK 0x00ff 68#define OMAPFB_FORMAT_MASK 0x00ff
57#define OMAPFB_FORMAT_FLAG_DOUBLE 0x0100 69#define OMAPFB_FORMAT_FLAG_DOUBLE 0x0100
70#define OMAPFB_FORMAT_FLAG_TEARSYNC 0x0200
71#define OMAPFB_FORMAT_FLAG_FORCE_VSYNC 0x0400
72#define OMAPFB_FORMAT_FLAG_ENABLE_OVERLAY 0x0800
73#define OMAPFB_FORMAT_FLAG_DISABLE_OVERLAY 0x1000
74
75#define OMAPFB_EVENT_READY 1
76#define OMAPFB_EVENT_DISABLED 2
77
78#define OMAPFB_MEMTYPE_SDRAM 0
79#define OMAPFB_MEMTYPE_SRAM 1
80#define OMAPFB_MEMTYPE_MAX 1
58 81
59enum omapfb_color_format { 82enum omapfb_color_format {
60 OMAPFB_COLOR_RGB565 = 0, 83 OMAPFB_COLOR_RGB565 = 0,
@@ -64,17 +87,23 @@ enum omapfb_color_format {
64 OMAPFB_COLOR_CLUT_4BPP, 87 OMAPFB_COLOR_CLUT_4BPP,
65 OMAPFB_COLOR_CLUT_2BPP, 88 OMAPFB_COLOR_CLUT_2BPP,
66 OMAPFB_COLOR_CLUT_1BPP, 89 OMAPFB_COLOR_CLUT_1BPP,
90 OMAPFB_COLOR_RGB444,
91 OMAPFB_COLOR_YUY422,
67}; 92};
68 93
69struct omapfb_update_window { 94struct omapfb_update_window {
70 __u32 x, y; 95 __u32 x, y;
71 __u32 width, height; 96 __u32 width, height;
72 __u32 format; 97 __u32 format;
98 __u32 out_x, out_y;
99 __u32 out_width, out_height;
100 __u32 reserved[8];
73}; 101};
74 102
75struct omapfb_update_window_old { 103struct omapfb_update_window_old {
76 __u32 x, y; 104 __u32 x, y;
77 __u32 width, height; 105 __u32 width, height;
106 __u32 format;
78}; 107};
79 108
80enum omapfb_plane { 109enum omapfb_plane {
@@ -88,18 +117,28 @@ enum omapfb_channel_out {
88 OMAPFB_CHANNEL_OUT_DIGIT, 117 OMAPFB_CHANNEL_OUT_DIGIT,
89}; 118};
90 119
91struct omapfb_setup_plane { 120struct omapfb_plane_info {
92 __u8 plane; 121 __u32 pos_x;
122 __u32 pos_y;
123 __u8 enabled;
93 __u8 channel_out; 124 __u8 channel_out;
94 __u32 offset; 125 __u8 mirror;
95 __u32 pos_x, pos_y; 126 __u8 reserved1;
96 __u32 width, height; 127 __u32 out_width;
97 __u32 color_mode; 128 __u32 out_height;
129 __u32 reserved2[12];
98}; 130};
99 131
100struct omapfb_enable_plane { 132struct omapfb_mem_info {
101 __u8 plane; 133 __u32 size;
102 __u8 enable; 134 __u8 type;
135 __u8 reserved[3];
136};
137
138struct omapfb_caps {
139 __u32 ctrl;
140 __u32 plane_color;
141 __u32 wnd_color;
103}; 142};
104 143
105enum omapfb_color_key_type { 144enum omapfb_color_key_type {
@@ -141,6 +180,9 @@ enum omapfb_update_mode {
141 180
142#define OMAP_LCDC_PANEL_TFT 0x0100 181#define OMAP_LCDC_PANEL_TFT 0x0100
143 182
183#define OMAPFB_PLANE_XRES_MIN 8
184#define OMAPFB_PLANE_YRES_MIN 8
185
144#ifdef CONFIG_ARCH_OMAP1 186#ifdef CONFIG_ARCH_OMAP1
145#define OMAPFB_PLANE_NUM 1 187#define OMAPFB_PLANE_NUM 1
146#else 188#else
@@ -169,19 +211,19 @@ struct lcd_panel {
169 int pcd; /* pixel clock divider. 211 int pcd; /* pixel clock divider.
170 Obsolete use pixel_clock instead */ 212 Obsolete use pixel_clock instead */
171 213
172 int (*init) (struct omapfb_device *fbdev); 214 int (*init) (struct lcd_panel *panel,
173 void (*cleanup) (void); 215 struct omapfb_device *fbdev);
174 int (*enable) (void); 216 void (*cleanup) (struct lcd_panel *panel);
175 void (*disable) (void); 217 int (*enable) (struct lcd_panel *panel);
176 unsigned long (*get_caps) (void); 218 void (*disable) (struct lcd_panel *panel);
177 int (*set_bklight_level)(unsigned int level); 219 unsigned long (*get_caps) (struct lcd_panel *panel);
178 unsigned int (*get_bklight_level)(void); 220 int (*set_bklight_level)(struct lcd_panel *panel,
179 unsigned int (*get_bklight_max) (void); 221 unsigned int level);
180 int (*run_test) (int test_num); 222 unsigned int (*get_bklight_level)(struct lcd_panel *panel);
223 unsigned int (*get_bklight_max) (struct lcd_panel *panel);
224 int (*run_test) (struct lcd_panel *panel, int test_num);
181}; 225};
182 226
183struct omapfb_device;
184
185struct extif_timings { 227struct extif_timings {
186 int cs_on_time; 228 int cs_on_time;
187 int cs_off_time; 229 int cs_off_time;
@@ -202,9 +244,10 @@ struct extif_timings {
202}; 244};
203 245
204struct lcd_ctrl_extif { 246struct lcd_ctrl_extif {
205 int (*init) (void); 247 int (*init) (struct omapfb_device *fbdev);
206 void (*cleanup) (void); 248 void (*cleanup) (void);
207 void (*get_clk_info) (u32 *clk_period, u32 *max_clk_div); 249 void (*get_clk_info) (u32 *clk_period, u32 *max_clk_div);
250 unsigned long (*get_max_tx_rate)(void);
208 int (*convert_timings) (struct extif_timings *timings); 251 int (*convert_timings) (struct extif_timings *timings);
209 void (*set_timings) (const struct extif_timings *timings); 252 void (*set_timings) (const struct extif_timings *timings);
210 void (*set_bits_per_cycle)(int bpc); 253 void (*set_bits_per_cycle)(int bpc);
@@ -213,31 +256,48 @@ struct lcd_ctrl_extif {
213 void (*write_data) (const void *buf, unsigned int len); 256 void (*write_data) (const void *buf, unsigned int len);
214 void (*transfer_area) (int width, int height, 257 void (*transfer_area) (int width, int height,
215 void (callback)(void * data), void *data); 258 void (callback)(void * data), void *data);
259 int (*setup_tearsync) (unsigned pin_cnt,
260 unsigned hs_pulse_time, unsigned vs_pulse_time,
261 int hs_pol_inv, int vs_pol_inv, int div);
262 int (*enable_tearsync) (int enable, unsigned line);
263
216 unsigned long max_transmit_size; 264 unsigned long max_transmit_size;
217}; 265};
218 266
219struct omapfb_notifier_block { 267struct omapfb_notifier_block {
220 struct notifier_block nb; 268 struct notifier_block nb;
221 void *data; 269 void *data;
270 int plane_idx;
222}; 271};
223 272
224typedef int (*omapfb_notifier_callback_t)(struct omapfb_notifier_block *, 273typedef int (*omapfb_notifier_callback_t)(struct notifier_block *,
225 unsigned long event, 274 unsigned long event,
226 struct omapfb_device *fbdev); 275 void *fbi);
276
277struct omapfb_mem_region {
278 dma_addr_t paddr;
279 void *vaddr;
280 unsigned long size;
281 u8 type; /* OMAPFB_PLANE_MEM_* */
282 unsigned alloc:1; /* allocated by the driver */
283 unsigned map:1; /* kernel mapped by the driver */
284};
285
286struct omapfb_mem_desc {
287 int region_cnt;
288 struct omapfb_mem_region region[OMAPFB_PLANE_NUM];
289};
227 290
228struct lcd_ctrl { 291struct lcd_ctrl {
229 const char *name; 292 const char *name;
230 void *data; 293 void *data;
231 294
232 int (*init) (struct omapfb_device *fbdev, 295 int (*init) (struct omapfb_device *fbdev,
233 int ext_mode, int req_vram_size); 296 int ext_mode,
297 struct omapfb_mem_desc *req_md);
234 void (*cleanup) (void); 298 void (*cleanup) (void);
235 void (*bind_client) (struct omapfb_notifier_block *nb); 299 void (*bind_client) (struct omapfb_notifier_block *nb);
236 void (*get_vram_layout)(unsigned long *size, 300 void (*get_caps) (int plane, struct omapfb_caps *caps);
237 void **virt_base,
238 dma_addr_t *phys_base);
239 int (*mmap) (struct vm_area_struct *vma);
240 unsigned long (*get_caps) (void);
241 int (*set_update_mode)(enum omapfb_update_mode mode); 301 int (*set_update_mode)(enum omapfb_update_mode mode);
242 enum omapfb_update_mode (*get_update_mode)(void); 302 enum omapfb_update_mode (*get_update_mode)(void);
243 int (*setup_plane) (int plane, int channel_out, 303 int (*setup_plane) (int plane, int channel_out,
@@ -245,8 +305,16 @@ struct lcd_ctrl {
245 int screen_width, 305 int screen_width,
246 int pos_x, int pos_y, int width, 306 int pos_x, int pos_y, int width,
247 int height, int color_mode); 307 int height, int color_mode);
308 int (*setup_mem) (int plane, size_t size,
309 int mem_type, unsigned long *paddr);
310 int (*mmap) (struct fb_info *info,
311 struct vm_area_struct *vma);
312 int (*set_scale) (int plane,
313 int orig_width, int orig_height,
314 int out_width, int out_height);
248 int (*enable_plane) (int plane, int enable); 315 int (*enable_plane) (int plane, int enable);
249 int (*update_window) (struct omapfb_update_window *win, 316 int (*update_window) (struct fb_info *fbi,
317 struct omapfb_update_window *win,
250 void (*callback)(void *), 318 void (*callback)(void *),
251 void *callback_data); 319 void *callback_data);
252 void (*sync) (void); 320 void (*sync) (void);
@@ -257,7 +325,7 @@ struct lcd_ctrl {
257 u16 blue, u16 transp, 325 u16 blue, u16 transp,
258 int update_hw_mem); 326 int update_hw_mem);
259 int (*set_color_key) (struct omapfb_color_key *ck); 327 int (*set_color_key) (struct omapfb_color_key *ck);
260 328 int (*get_color_key) (struct omapfb_color_key *ck);
261}; 329};
262 330
263enum omapfb_state { 331enum omapfb_state {
@@ -266,19 +334,20 @@ enum omapfb_state {
266 OMAPFB_ACTIVE = 100 334 OMAPFB_ACTIVE = 100
267}; 335};
268 336
337struct omapfb_plane_struct {
338 int idx;
339 struct omapfb_plane_info info;
340 enum omapfb_color_format color_mode;
341 struct omapfb_device *fbdev;
342};
343
269struct omapfb_device { 344struct omapfb_device {
270 int state; 345 int state;
271 int ext_lcdc; /* Using external 346 int ext_lcdc; /* Using external
272 LCD controller */ 347 LCD controller */
273 struct mutex rqueue_mutex; 348 struct mutex rqueue_mutex;
274 349
275 void *vram_virt_base;
276 dma_addr_t vram_phys_base;
277 unsigned long vram_size;
278
279 int color_mode;
280 int palette_size; 350 int palette_size;
281 int mirror;
282 u32 pseudo_palette[17]; 351 u32 pseudo_palette[17];
283 352
284 struct lcd_panel *panel; /* LCD panel */ 353 struct lcd_panel *panel; /* LCD panel */
@@ -286,19 +355,19 @@ struct omapfb_device {
286 struct lcd_ctrl *int_ctrl; /* internal LCD ctrl */ 355 struct lcd_ctrl *int_ctrl; /* internal LCD ctrl */
287 struct lcd_ctrl_extif *ext_if; /* LCD ctrl external 356 struct lcd_ctrl_extif *ext_if; /* LCD ctrl external
288 interface */ 357 interface */
289 struct fb_info *fb_info;
290
291 struct device *dev; 358 struct device *dev;
359 struct fb_var_screeninfo new_var; /* for mode changes */
360
361 struct omapfb_mem_desc mem_desc;
362 struct fb_info *fb_info[OMAPFB_PLANE_NUM];
292}; 363};
293 364
294struct omapfb_platform_data { 365struct omapfb_platform_data {
295 struct omap_lcd_config lcd; 366 struct omap_lcd_config lcd;
296 struct omap_fbmem_config fbmem; 367 struct omapfb_mem_desc mem_desc;
368 void *ctrl_platform_data;
297}; 369};
298 370
299#define OMAPFB_EVENT_READY 1
300#define OMAPFB_EVENT_DISABLED 2
301
302#ifdef CONFIG_ARCH_OMAP1 371#ifdef CONFIG_ARCH_OMAP1
303extern struct lcd_ctrl omap1_lcd_ctrl; 372extern struct lcd_ctrl omap1_lcd_ctrl;
304#else 373#else
@@ -310,15 +379,16 @@ extern void omapfb_write_first_pixel(struct omapfb_device *fbdev, u16 pixval);
310extern void omapfb_notify_clients(struct omapfb_device *fbdev, 379extern void omapfb_notify_clients(struct omapfb_device *fbdev,
311 unsigned long event); 380 unsigned long event);
312extern int omapfb_register_client(struct omapfb_notifier_block *nb, 381extern int omapfb_register_client(struct omapfb_notifier_block *nb,
313 omapfb_notifier_callback_t callback, 382 omapfb_notifier_callback_t callback,
314 void *callback_data); 383 void *callback_data);
315extern int omapfb_unregister_client(struct omapfb_notifier_block *nb); 384extern int omapfb_unregister_client(struct omapfb_notifier_block *nb);
316extern int omapfb_update_window_async(struct omapfb_update_window *win, 385extern int omapfb_update_window_async(struct fb_info *fbi,
317 void (*callback)(void *), 386 struct omapfb_update_window *win,
318 void *callback_data); 387 void (*callback)(void *),
388 void *callback_data);
319 389
320/* in arch/arm/plat-omap/devices.c */ 390/* in arch/arm/plat-omap/fb.c */
321extern void omapfb_reserve_mem(void); 391extern void omapfb_set_ctrl_platform_data(void *pdata);
322 392
323#endif /* __KERNEL__ */ 393#endif /* __KERNEL__ */
324 394
diff --git a/include/asm-arm/arch-omap/sram.h b/include/asm-arm/arch-omap/sram.h
index 6fc0dd57b7c3..bb9bb3fd532f 100644
--- a/include/asm-arm/arch-omap/sram.h
+++ b/include/asm-arm/arch-omap/sram.h
@@ -20,9 +20,6 @@ extern void omap2_sram_reprogram_sdrc(u32 perf_level, u32 dll_val,
20 u32 mem_type); 20 u32 mem_type);
21extern u32 omap2_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val, int bypass); 21extern u32 omap2_set_prcm(u32 dpll_ctrl_val, u32 sdrc_rfr_val, int bypass);
22 22
23extern unsigned long omap_fb_sram_start;
24extern unsigned long omap_fb_sram_size;
25
26/* Do not use these */ 23/* Do not use these */
27extern void sram_reprogram_clock(u32 ckctl, u32 dpllctl); 24extern void sram_reprogram_clock(u32 ckctl, u32 dpllctl);
28extern unsigned long sram_reprogram_clock_sz; 25extern unsigned long sram_reprogram_clock_sz;
diff --git a/include/asm-arm/arch-omap/usb.h b/include/asm-arm/arch-omap/usb.h
index 054fb9a8e0c6..99ae9eabaf71 100644
--- a/include/asm-arm/arch-omap/usb.h
+++ b/include/asm-arm/arch-omap/usb.h
@@ -7,9 +7,27 @@
7 7
8/*-------------------------------------------------------------------------*/ 8/*-------------------------------------------------------------------------*/
9 9
10#define OTG_BASE 0xfffb0400 10#define OMAP1_OTG_BASE 0xfffb0400
11#define UDC_BASE 0xfffb4000 11#define OMAP1_UDC_BASE 0xfffb4000
12#define OMAP_OHCI_BASE 0xfffba000 12#define OMAP1_OHCI_BASE 0xfffba000
13
14#define OMAP2_OHCI_BASE 0x4805e000
15#define OMAP2_UDC_BASE 0x4805e200
16#define OMAP2_OTG_BASE 0x4805e300
17
18#ifdef CONFIG_ARCH_OMAP1
19
20#define OTG_BASE OMAP1_OTG_BASE
21#define UDC_BASE OMAP1_UDC_BASE
22#define OMAP_OHCI_BASE OMAP1_OHCI_BASE
23
24#else
25
26#define OTG_BASE OMAP2_OTG_BASE
27#define UDC_BASE OMAP2_UDC_BASE
28#define OMAP_OHCI_BASE OMAP2_OHCI_BASE
29
30#endif
13 31
14/*-------------------------------------------------------------------------*/ 32/*-------------------------------------------------------------------------*/
15 33
@@ -28,6 +46,7 @@
28# define HST_IDLE_EN (1 << 14) 46# define HST_IDLE_EN (1 << 14)
29# define DEV_IDLE_EN (1 << 13) 47# define DEV_IDLE_EN (1 << 13)
30# define OTG_RESET_DONE (1 << 2) 48# define OTG_RESET_DONE (1 << 2)
49# define OTG_SOFT_RESET (1 << 1)
31#define OTG_SYSCON_2_REG OTG_REG32(0x08) 50#define OTG_SYSCON_2_REG OTG_REG32(0x08)
32# define OTG_EN (1 << 31) 51# define OTG_EN (1 << 31)
33# define USBX_SYNCHRO (1 << 30) 52# define USBX_SYNCHRO (1 << 30)
@@ -103,6 +122,7 @@
103 122
104/*-------------------------------------------------------------------------*/ 123/*-------------------------------------------------------------------------*/
105 124
125/* OMAP1 */
106#define USB_TRANSCEIVER_CTRL_REG __REG32(0xfffe1000 + 0x0064) 126#define USB_TRANSCEIVER_CTRL_REG __REG32(0xfffe1000 + 0x0064)
107# define CONF_USB2_UNI_R (1 << 8) 127# define CONF_USB2_UNI_R (1 << 8)
108# define CONF_USB1_UNI_R (1 << 7) 128# define CONF_USB1_UNI_R (1 << 7)
@@ -111,7 +131,17 @@
111# define CONF_USB_PWRDN_DM_R (1 << 2) 131# define CONF_USB_PWRDN_DM_R (1 << 2)
112# define CONF_USB_PWRDN_DP_R (1 << 1) 132# define CONF_USB_PWRDN_DP_R (1 << 1)
113 133
114 134/* OMAP2 */
115 135#define CONTROL_DEVCONF_REG __REG32(L4_24XX_BASE + 0x0274)
136# define USB_UNIDIR 0x0
137# define USB_UNIDIR_TLL 0x1
138# define USB_BIDIR 0x2
139# define USB_BIDIR_TLL 0x3
140# define USBT0WRMODEI(x) ((x) << 22)
141# define USBT1WRMODEI(x) ((x) << 20)
142# define USBT2WRMODEI(x) ((x) << 18)
143# define USBT2TLL5PI (1 << 17)
144# define USB0PUENACTLOI (1 << 16)
145# define USBSTANDBYCTRL (1 << 15)
116 146
117#endif /* __ASM_ARCH_OMAP_USB_H */ 147#endif /* __ASM_ARCH_OMAP_USB_H */
diff --git a/include/asm-arm/arch-s3c2410/regs-power.h b/include/asm-arm/arch-s3c2410/regs-power.h
index 6c319ea2afac..94ff96505b6a 100644
--- a/include/asm-arm/arch-s3c2410/regs-power.h
+++ b/include/asm-arm/arch-s3c2410/regs-power.h
@@ -1,4 +1,4 @@
1/* linux/include/asm/arch-s3c2410/regs-power.h 1/* linux/include/asm-arm/arch-s3c2410/regs-power.h
2 * 2 *
3 * Copyright (c) 2003,2004,2005,2006 Simtec Electronics <linux@simtec.co.uk> 3 * Copyright (c) 2003,2004,2005,2006 Simtec Electronics <linux@simtec.co.uk>
4 * http://armlinux.simtec.co.uk/ 4 * http://armlinux.simtec.co.uk/
diff --git a/include/asm-arm/arch-s3c2410/regs-s3c2443-clock.h b/include/asm-arm/arch-s3c2410/regs-s3c2443-clock.h
index ff0536d2de42..cd9e26568f85 100644
--- a/include/asm-arm/arch-s3c2410/regs-s3c2443-clock.h
+++ b/include/asm-arm/arch-s3c2410/regs-s3c2443-clock.h
@@ -1,4 +1,4 @@
1/* linux/include/asm-arm/arch-s3c2410/regs-clock.h 1/* linux/include/asm-arm/arch-s3c2410/regs-s3c2443-clock.h
2 * 2 *
3 * Copyright (c) 2007 Simtec Electronics 3 * Copyright (c) 2007 Simtec Electronics
4 * Ben Dooks <ben@simtec.co.uk> 4 * Ben Dooks <ben@simtec.co.uk>
diff --git a/include/asm-arm/arch-s3c2410/regs-watchdog.h b/include/asm-arm/arch-s3c2410/regs-watchdog.h
index f4fff448c7bd..a9c5d491bdb6 100644
--- a/include/asm-arm/arch-s3c2410/regs-watchdog.h
+++ b/include/asm-arm/arch-s3c2410/regs-watchdog.h
@@ -1,4 +1,4 @@
1/* linux/include/asm/arch-s3c2410/regs-watchdog.h 1/* linux/include/asm-arm/arch-s3c2410/regs-watchdog.h
2 * 2 *
3 * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk> 3 * Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk>
4 * http://www.simtec.co.uk/products/SWLINUX/ 4 * http://www.simtec.co.uk/products/SWLINUX/
diff --git a/include/asm-arm/arch-s3c2410/udc.h b/include/asm-arm/arch-s3c2410/udc.h
index e59ec339d614..b8aa6cb69b58 100644
--- a/include/asm-arm/arch-s3c2410/udc.h
+++ b/include/asm-arm/arch-s3c2410/udc.h
@@ -1,4 +1,4 @@
1/* linux/include/asm/arch-s3c2410/udc.h 1/* linux/include/asm-arm/arch-s3c2410/udc.h
2 * 2 *
3 * Copyright (c) 2005 Arnaud Patard <arnaud.patard@rtp-net.org> 3 * Copyright (c) 2005 Arnaud Patard <arnaud.patard@rtp-net.org>
4 * 4 *
diff --git a/include/asm-arm/cacheflush.h b/include/asm-arm/cacheflush.h
index afad32c76e6c..d1294a46c70c 100644
--- a/include/asm-arm/cacheflush.h
+++ b/include/asm-arm/cacheflush.h
@@ -102,6 +102,14 @@
102//# endif 102//# endif
103#endif 103#endif
104 104
105#if defined(CONFIG_CPU_V7)
106//# ifdef _CACHE
107# define MULTI_CACHE 1
108//# else
109//# define _CACHE v7
110//# endif
111#endif
112
105#if !defined(_CACHE) && !defined(MULTI_CACHE) 113#if !defined(_CACHE) && !defined(MULTI_CACHE)
106#error Unknown cache maintainence model 114#error Unknown cache maintainence model
107#endif 115#endif
@@ -418,11 +426,19 @@ static inline void flush_anon_page(struct vm_area_struct *vma,
418 */ 426 */
419#define flush_icache_page(vma,page) do { } while (0) 427#define flush_icache_page(vma,page) do { } while (0)
420 428
421#define __cacheid_present(val) (val != read_cpuid(CPUID_ID)) 429#define __cacheid_present(val) (val != read_cpuid(CPUID_ID))
422#define __cacheid_vivt(val) ((val & (15 << 25)) != (14 << 25)) 430#define __cacheid_type_v7(val) ((val & (7 << 29)) == (4 << 29))
423#define __cacheid_vipt(val) ((val & (15 << 25)) == (14 << 25)) 431
424#define __cacheid_vipt_nonaliasing(val) ((val & (15 << 25 | 1 << 23)) == (14 << 25)) 432#define __cacheid_vivt_prev7(val) ((val & (15 << 25)) != (14 << 25))
425#define __cacheid_vipt_aliasing(val) ((val & (15 << 25 | 1 << 23)) == (14 << 25 | 1 << 23)) 433#define __cacheid_vipt_prev7(val) ((val & (15 << 25)) == (14 << 25))
434#define __cacheid_vipt_nonaliasing_prev7(val) ((val & (15 << 25 | 1 << 23)) == (14 << 25))
435#define __cacheid_vipt_aliasing_prev7(val) ((val & (15 << 25 | 1 << 23)) == (14 << 25 | 1 << 23))
436
437#define __cacheid_vivt(val) (__cacheid_type_v7(val) ? 0 : __cacheid_vivt_prev7(val))
438#define __cacheid_vipt(val) (__cacheid_type_v7(val) ? 1 : __cacheid_vipt_prev7(val))
439#define __cacheid_vipt_nonaliasing(val) (__cacheid_type_v7(val) ? 1 : __cacheid_vipt_nonaliasing_prev7(val))
440#define __cacheid_vipt_aliasing(val) (__cacheid_type_v7(val) ? 0 : __cacheid_vipt_aliasing_prev7(val))
441#define __cacheid_vivt_asid_tagged_instr(val) (__cacheid_type_v7(val) ? ((val & (3 << 14)) == (1 << 14)) : 0)
426 442
427#if defined(CONFIG_CPU_CACHE_VIVT) && !defined(CONFIG_CPU_CACHE_VIPT) 443#if defined(CONFIG_CPU_CACHE_VIVT) && !defined(CONFIG_CPU_CACHE_VIPT)
428 444
@@ -430,6 +446,7 @@ static inline void flush_anon_page(struct vm_area_struct *vma,
430#define cache_is_vipt() 0 446#define cache_is_vipt() 0
431#define cache_is_vipt_nonaliasing() 0 447#define cache_is_vipt_nonaliasing() 0
432#define cache_is_vipt_aliasing() 0 448#define cache_is_vipt_aliasing() 0
449#define icache_is_vivt_asid_tagged() 0
433 450
434#elif defined(CONFIG_CPU_CACHE_VIPT) 451#elif defined(CONFIG_CPU_CACHE_VIPT)
435 452
@@ -447,6 +464,12 @@ static inline void flush_anon_page(struct vm_area_struct *vma,
447 __cacheid_vipt_aliasing(__val); \ 464 __cacheid_vipt_aliasing(__val); \
448 }) 465 })
449 466
467#define icache_is_vivt_asid_tagged() \
468 ({ \
469 unsigned int __val = read_cpuid(CPUID_CACHETYPE); \
470 __cacheid_vivt_asid_tagged_instr(__val); \
471 })
472
450#else 473#else
451 474
452#define cache_is_vivt() \ 475#define cache_is_vivt() \
@@ -475,6 +498,13 @@ static inline void flush_anon_page(struct vm_area_struct *vma,
475 __cacheid_vipt_aliasing(__val); \ 498 __cacheid_vipt_aliasing(__val); \
476 }) 499 })
477 500
501#define icache_is_vivt_asid_tagged() \
502 ({ \
503 unsigned int __val = read_cpuid(CPUID_CACHETYPE); \
504 __cacheid_present(__val) && \
505 __cacheid_vivt_asid_tagged_instr(__val); \
506 })
507
478#endif 508#endif
479 509
480#endif 510#endif
diff --git a/include/asm-arm/dma-mapping.h b/include/asm-arm/dma-mapping.h
index abfb75b654c7..c8b5d0db0cf0 100644
--- a/include/asm-arm/dma-mapping.h
+++ b/include/asm-arm/dma-mapping.h
@@ -445,7 +445,7 @@ extern void dmabounce_unregister_dev(struct device *);
445 * 445 *
446 * The dmabounce routines call this function whenever a dma-mapping 446 * The dmabounce routines call this function whenever a dma-mapping
447 * is requested to determine whether a given buffer needs to be bounced 447 * is requested to determine whether a given buffer needs to be bounced
448 * or not. The function must return 0 if the the buffer is OK for 448 * or not. The function must return 0 if the buffer is OK for
449 * DMA access and 1 if the buffer needs to be bounced. 449 * DMA access and 1 if the buffer needs to be bounced.
450 * 450 *
451 */ 451 */
diff --git a/include/asm-arm/glue.h b/include/asm-arm/glue.h
index 0cc5d3b10ce2..22274ce81375 100644
--- a/include/asm-arm/glue.h
+++ b/include/asm-arm/glue.h
@@ -38,6 +38,7 @@
38 * v5tej_early - ARMv5 with Thumb and Java early abort handler 38 * v5tej_early - ARMv5 with Thumb and Java early abort handler
39 * xscale - ARMv5 with Thumb with Xscale extensions 39 * xscale - ARMv5 with Thumb with Xscale extensions
40 * v6_early - ARMv6 generic early abort handler 40 * v6_early - ARMv6 generic early abort handler
41 * v7_early - ARMv7 generic early abort handler
41 */ 42 */
42#undef CPU_ABORT_HANDLER 43#undef CPU_ABORT_HANDLER
43#undef MULTI_ABORT 44#undef MULTI_ABORT
@@ -106,6 +107,14 @@
106# endif 107# endif
107#endif 108#endif
108 109
110#ifdef CONFIG_CPU_ABRT_EV7
111# ifdef CPU_ABORT_HANDLER
112# define MULTI_ABORT 1
113# else
114# define CPU_ABORT_HANDLER v7_early_abort
115# endif
116#endif
117
109#ifndef CPU_ABORT_HANDLER 118#ifndef CPU_ABORT_HANDLER
110#error Unknown data abort handler type 119#error Unknown data abort handler type
111#endif 120#endif
diff --git a/include/asm-arm/mmu_context.h b/include/asm-arm/mmu_context.h
index f8755c818b54..4981ad419198 100644
--- a/include/asm-arm/mmu_context.h
+++ b/include/asm-arm/mmu_context.h
@@ -36,8 +36,9 @@ void __check_kvm_seq(struct mm_struct *mm);
36 * The context ID is used by debuggers and trace logic, and 36 * The context ID is used by debuggers and trace logic, and
37 * should be unique within all running processes. 37 * should be unique within all running processes.
38 */ 38 */
39#define ASID_BITS 8 39#define ASID_BITS 8
40#define ASID_MASK ((~0) << ASID_BITS) 40#define ASID_MASK ((~0) << ASID_BITS)
41#define ASID_FIRST_VERSION (1 << ASID_BITS)
41 42
42extern unsigned int cpu_last_asid; 43extern unsigned int cpu_last_asid;
43 44
@@ -96,8 +97,7 @@ switch_mm(struct mm_struct *prev, struct mm_struct *next,
96#ifdef CONFIG_MMU 97#ifdef CONFIG_MMU
97 unsigned int cpu = smp_processor_id(); 98 unsigned int cpu = smp_processor_id();
98 99
99 if (prev != next) { 100 if (!cpu_test_and_set(cpu, next->cpu_vm_mask) || prev != next) {
100 cpu_set(cpu, next->cpu_vm_mask);
101 check_context(next); 101 check_context(next);
102 cpu_switch_mm(next->pgd, next); 102 cpu_switch_mm(next->pgd, next);
103 if (cache_is_vivt()) 103 if (cache_is_vivt())
diff --git a/include/asm-arm/proc-fns.h b/include/asm-arm/proc-fns.h
index ea7e54c319be..5599d4e5e708 100644
--- a/include/asm-arm/proc-fns.h
+++ b/include/asm-arm/proc-fns.h
@@ -193,6 +193,14 @@
193# define CPU_NAME cpu_v6 193# define CPU_NAME cpu_v6
194# endif 194# endif
195# endif 195# endif
196# ifdef CONFIG_CPU_V7
197# ifdef CPU_NAME
198# undef MULTI_CPU
199# define MULTI_CPU
200# else
201# define CPU_NAME cpu_v7
202# endif
203# endif
196#endif 204#endif
197 205
198#ifndef __ASSEMBLY__ 206#ifndef __ASSEMBLY__
diff --git a/include/asm-arm/system.h b/include/asm-arm/system.h
index f2da3b6e3a83..6f8e6a69dc5f 100644
--- a/include/asm-arm/system.h
+++ b/include/asm-arm/system.h
@@ -14,6 +14,7 @@
14#define CPU_ARCH_ARMv5TE 6 14#define CPU_ARCH_ARMv5TE 6
15#define CPU_ARCH_ARMv5TEJ 7 15#define CPU_ARCH_ARMv5TEJ 7
16#define CPU_ARCH_ARMv6 8 16#define CPU_ARCH_ARMv6 8
17#define CPU_ARCH_ARMv7 9
17 18
18/* 19/*
19 * CR1 bits (CP#15 CR1) 20 * CR1 bits (CP#15 CR1)
@@ -155,7 +156,11 @@ extern unsigned int user_debug;
155#define vectors_high() (0) 156#define vectors_high() (0)
156#endif 157#endif
157 158
158#if defined(CONFIG_CPU_XSC3) || __LINUX_ARM_ARCH__ >= 6 159#if __LINUX_ARM_ARCH__ >= 7
160#define isb() __asm__ __volatile__ ("isb" : : : "memory")
161#define dsb() __asm__ __volatile__ ("dsb" : : : "memory")
162#define dmb() __asm__ __volatile__ ("dmb" : : : "memory")
163#elif defined(CONFIG_CPU_XSC3) || __LINUX_ARM_ARCH__ == 6
159#define isb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c5, 4" \ 164#define isb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c5, 4" \
160 : : "r" (0) : "memory") 165 : : "r" (0) : "memory")
161#define dsb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \ 166#define dsb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 4" \
diff --git a/include/asm-arm26/io.h b/include/asm-arm26/io.h
index 2aa033bd0678..a5a7a4d5e09c 100644
--- a/include/asm-arm26/io.h
+++ b/include/asm-arm26/io.h
@@ -321,7 +321,7 @@ DECLARE_IO(int,l,"")
321 321
322#define mmiowb() 322#define mmiowb()
323 323
324/* the following macro is depreciated */ 324/* the following macro is deprecated */
325#define ioaddr(port) __ioaddr((port)) 325#define ioaddr(port) __ioaddr((port))
326 326
327/* 327/*
diff --git a/include/asm-arm26/memory.h b/include/asm-arm26/memory.h
index a65f10b80dfb..7c1e5be39060 100644
--- a/include/asm-arm26/memory.h
+++ b/include/asm-arm26/memory.h
@@ -60,7 +60,7 @@ static inline void *phys_to_virt(unsigned long x)
60/* 60/*
61 * Virtual <-> DMA view memory address translations 61 * Virtual <-> DMA view memory address translations
62 * Again, these are *only* valid on the kernel direct mapped RAM 62 * Again, these are *only* valid on the kernel direct mapped RAM
63 * memory. Use of these is *depreciated*. 63 * memory. Use of these is *deprecated*.
64 */ 64 */
65#define virt_to_bus(x) ((unsigned long)(x)) 65#define virt_to_bus(x) ((unsigned long)(x))
66#define bus_to_virt(x) ((void *)((unsigned long)(x))) 66#define bus_to_virt(x) ((void *)((unsigned long)(x)))
@@ -93,7 +93,7 @@ static inline void *phys_to_virt(unsigned long x)
93#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) 93#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
94 94
95/* 95/*
96 * We should really eliminate virt_to_bus() here - it's depreciated. 96 * We should really eliminate virt_to_bus() here - it's deprecated.
97 */ 97 */
98#define page_to_bus(page) (page_address(page)) 98#define page_to_bus(page) (page_address(page))
99 99
diff --git a/include/asm-arm26/setup.h b/include/asm-arm26/setup.h
index 1a867b4e8d53..10fd07c76662 100644
--- a/include/asm-arm26/setup.h
+++ b/include/asm-arm26/setup.h
@@ -70,7 +70,7 @@ struct tag_ramdisk {
70/* describes where the compressed ramdisk image lives */ 70/* describes where the compressed ramdisk image lives */
71/* 71/*
72 * this one accidentally used virtual addresses - as such, 72 * this one accidentally used virtual addresses - as such,
73 * its depreciated. 73 * it's deprecated.
74 */ 74 */
75#define ATAG_INITRD 0x54410005 75#define ATAG_INITRD 0x54410005
76 76
diff --git a/include/asm-avr32/arch-at32ap/cpu.h b/include/asm-avr32/arch-at32ap/cpu.h
new file mode 100644
index 000000000000..2bdc5bd6f793
--- /dev/null
+++ b/include/asm-avr32/arch-at32ap/cpu.h
@@ -0,0 +1,33 @@
1/*
2 * AVR32 and (fake) AT91 CPU identification
3 *
4 * Copyright (C) 2007 Atmel Corporation
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 __ASM_ARCH_CPU_H
11#define __ASM_ARCH_CPU_H
12
13/*
14 * Only AT32AP7000 is defined for now. We can identify the specific
15 * chip at runtime, but I'm not sure if it's really worth it.
16 */
17#ifdef CONFIG_CPU_AT32AP7000
18# define cpu_is_at32ap7000() (1)
19#else
20# define cpu_is_at32ap7000() (0)
21#endif
22
23/*
24 * Since this is AVR32, we will never run on any AT91 CPU. But these
25 * definitions may reduce clutter in common drivers.
26 */
27#define cpu_is_at91rm9200() (0)
28#define cpu_is_at91sam9xe() (0)
29#define cpu_is_at91sam9260() (0)
30#define cpu_is_at91sam9261() (0)
31#define cpu_is_at91sam9263() (0)
32
33#endif /* __ASM_ARCH_CPU_H */
diff --git a/include/asm-avr32/setup.h b/include/asm-avr32/setup.h
index 1ff1a217015d..b0828d43e110 100644
--- a/include/asm-avr32/setup.h
+++ b/include/asm-avr32/setup.h
@@ -110,7 +110,7 @@ struct tagtable {
110 int (*parse)(struct tag *); 110 int (*parse)(struct tag *);
111}; 111};
112 112
113#define __tag __attribute_used__ __attribute__((__section__(".taglist"))) 113#define __tag __attribute_used__ __attribute__((__section__(".taglist.init")))
114#define __tagtable(tag, fn) \ 114#define __tagtable(tag, fn) \
115 static struct tagtable __tagtable_##fn __tag = { tag, fn } 115 static struct tagtable __tagtable_##fn __tag = { tag, fn }
116 116
diff --git a/include/asm-avr32/unistd.h b/include/asm-avr32/unistd.h
index 8f5120471819..2418cce624cc 100644
--- a/include/asm-avr32/unistd.h
+++ b/include/asm-avr32/unistd.h
@@ -295,8 +295,10 @@
295#define __NR_shmdt 276 295#define __NR_shmdt 276
296#define __NR_shmctl 277 296#define __NR_shmctl 277
297 297
298#define __NR_utimensat 278
299
298#ifdef __KERNEL__ 300#ifdef __KERNEL__
299#define NR_syscalls 278 301#define NR_syscalls 279
300 302
301 303
302#define __ARCH_WANT_IPC_PARSE_VERSION 304#define __ARCH_WANT_IPC_PARSE_VERSION
diff --git a/include/asm-blackfin/processor.h b/include/asm-blackfin/processor.h
index 997465c93e82..0336ff132c16 100644
--- a/include/asm-blackfin/processor.h
+++ b/include/asm-blackfin/processor.h
@@ -58,10 +58,10 @@ do { \
58 (_regs)->pc = (_pc); \ 58 (_regs)->pc = (_pc); \
59 if (current->mm) \ 59 if (current->mm) \
60 (_regs)->p5 = current->mm->start_data; \ 60 (_regs)->p5 = current->mm->start_data; \
61 current->thread_info->l1_task_info.stack_start \ 61 task_thread_info(current)->l1_task_info.stack_start \
62 = (void *)current->mm->context.stack_start; \ 62 = (void *)current->mm->context.stack_start; \
63 current->thread_info->l1_task_info.lowest_sp = (void *)(_usp); \ 63 task_thread_info(current)->l1_task_info.lowest_sp = (void *)(_usp); \
64 memcpy(L1_SCRATCH_TASK_INFO, &current->thread_info->l1_task_info, \ 64 memcpy(L1_SCRATCH_TASK_INFO, &task_thread_info(current)->l1_task_info, \
65 sizeof(*L1_SCRATCH_TASK_INFO)); \ 65 sizeof(*L1_SCRATCH_TASK_INFO)); \
66 wrusp(_usp); \ 66 wrusp(_usp); \
67} while(0) 67} while(0)
diff --git a/include/asm-blackfin/system.h b/include/asm-blackfin/system.h
index b5bf6e7cb5e8..5e5f1a0566c0 100644
--- a/include/asm-blackfin/system.h
+++ b/include/asm-blackfin/system.h
@@ -239,9 +239,9 @@ asmlinkage struct task_struct *resume(struct task_struct *prev, struct task_stru
239 239
240#define switch_to(prev,next,last) \ 240#define switch_to(prev,next,last) \
241do { \ 241do { \
242 memcpy (&prev->thread_info->l1_task_info, L1_SCRATCH_TASK_INFO, \ 242 memcpy (&task_thread_info(prev)->l1_task_info, L1_SCRATCH_TASK_INFO, \
243 sizeof *L1_SCRATCH_TASK_INFO); \ 243 sizeof *L1_SCRATCH_TASK_INFO); \
244 memcpy (L1_SCRATCH_TASK_INFO, &next->thread_info->l1_task_info, \ 244 memcpy (L1_SCRATCH_TASK_INFO, &task_thread_info(next)->l1_task_info, \
245 sizeof *L1_SCRATCH_TASK_INFO); \ 245 sizeof *L1_SCRATCH_TASK_INFO); \
246 (last) = resume (prev, next); \ 246 (last) = resume (prev, next); \
247} while (0) 247} while (0)
diff --git a/include/asm-frv/tlb.h b/include/asm-frv/tlb.h
index f94fe5cb9b3a..cd458eb6d75e 100644
--- a/include/asm-frv/tlb.h
+++ b/include/asm-frv/tlb.h
@@ -3,7 +3,11 @@
3 3
4#include <asm/tlbflush.h> 4#include <asm/tlbflush.h>
5 5
6#ifdef CONFIG_MMU
7extern void check_pgt_cache(void);
8#else
6#define check_pgt_cache() do {} while(0) 9#define check_pgt_cache() do {} while(0)
10#endif
7 11
8/* 12/*
9 * we don't need any special per-pte or per-vma handling... 13 * we don't need any special per-pte or per-vma handling...
diff --git a/include/asm-generic/bitops/atomic.h b/include/asm-generic/bitops/atomic.h
index 78339319ba02..cd8a9641bd66 100644
--- a/include/asm-generic/bitops/atomic.h
+++ b/include/asm-generic/bitops/atomic.h
@@ -58,7 +58,7 @@ extern raw_spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] __lock_aligned;
58 * if you do not require the atomic guarantees. 58 * if you do not require the atomic guarantees.
59 * 59 *
60 * Note: there are no guarantees that this function will not be reordered 60 * Note: there are no guarantees that this function will not be reordered
61 * on non x86 architectures, so if you are writting portable code, 61 * on non x86 architectures, so if you are writing portable code,
62 * make sure not to rely on its reordering guarantees. 62 * make sure not to rely on its reordering guarantees.
63 * 63 *
64 * Note that @nr may be almost arbitrarily large; this function is not 64 * Note that @nr may be almost arbitrarily large; this function is not
diff --git a/include/asm-i386/bitops.h b/include/asm-i386/bitops.h
index 273b50629357..a20fe9822f60 100644
--- a/include/asm-i386/bitops.h
+++ b/include/asm-i386/bitops.h
@@ -27,7 +27,7 @@
27 * if you do not require the atomic guarantees. 27 * if you do not require the atomic guarantees.
28 * 28 *
29 * Note: there are no guarantees that this function will not be reordered 29 * Note: there are no guarantees that this function will not be reordered
30 * on non x86 architectures, so if you are writting portable code, 30 * on non x86 architectures, so if you are writing portable code,
31 * make sure not to rely on its reordering guarantees. 31 * make sure not to rely on its reordering guarantees.
32 * 32 *
33 * Note that @nr may be almost arbitrarily large; this function is not 33 * Note that @nr may be almost arbitrarily large; this function is not
diff --git a/include/asm-i386/boot.h b/include/asm-i386/boot.h
index e7686d0a8413..bd024ab4fe53 100644
--- a/include/asm-i386/boot.h
+++ b/include/asm-i386/boot.h
@@ -12,7 +12,7 @@
12#define EXTENDED_VGA 0xfffe /* 80x50 mode */ 12#define EXTENDED_VGA 0xfffe /* 80x50 mode */
13#define ASK_VGA 0xfffd /* ask for it at bootup */ 13#define ASK_VGA 0xfffd /* ask for it at bootup */
14 14
15/* Physical address where kenrel should be loaded. */ 15/* Physical address where kernel should be loaded. */
16#define LOAD_PHYSICAL_ADDR ((CONFIG_PHYSICAL_START \ 16#define LOAD_PHYSICAL_ADDR ((CONFIG_PHYSICAL_START \
17 + (CONFIG_PHYSICAL_ALIGN - 1)) \ 17 + (CONFIG_PHYSICAL_ALIGN - 1)) \
18 & ~(CONFIG_PHYSICAL_ALIGN - 1)) 18 & ~(CONFIG_PHYSICAL_ALIGN - 1))
diff --git a/include/asm-i386/mmzone.h b/include/asm-i386/mmzone.h
index 3503ad66945e..118e9812778f 100644
--- a/include/asm-i386/mmzone.h
+++ b/include/asm-i386/mmzone.h
@@ -122,21 +122,21 @@ static inline int pfn_valid(int pfn)
122 __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, 0) 122 __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, 0)
123#define alloc_bootmem_node(pgdat, x) \ 123#define alloc_bootmem_node(pgdat, x) \
124({ \ 124({ \
125 struct pglist_data __attribute__ ((unused)) \ 125 struct pglist_data __maybe_unused \
126 *__alloc_bootmem_node__pgdat = (pgdat); \ 126 *__alloc_bootmem_node__pgdat = (pgdat); \
127 __alloc_bootmem_node(NODE_DATA(0), (x), SMP_CACHE_BYTES, \ 127 __alloc_bootmem_node(NODE_DATA(0), (x), SMP_CACHE_BYTES, \
128 __pa(MAX_DMA_ADDRESS)); \ 128 __pa(MAX_DMA_ADDRESS)); \
129}) 129})
130#define alloc_bootmem_pages_node(pgdat, x) \ 130#define alloc_bootmem_pages_node(pgdat, x) \
131({ \ 131({ \
132 struct pglist_data __attribute__ ((unused)) \ 132 struct pglist_data __maybe_unused \
133 *__alloc_bootmem_node__pgdat = (pgdat); \ 133 *__alloc_bootmem_node__pgdat = (pgdat); \
134 __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, \ 134 __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, \
135 __pa(MAX_DMA_ADDRESS)) \ 135 __pa(MAX_DMA_ADDRESS)) \
136}) 136})
137#define alloc_bootmem_low_pages_node(pgdat, x) \ 137#define alloc_bootmem_low_pages_node(pgdat, x) \
138({ \ 138({ \
139 struct pglist_data __attribute__ ((unused)) \ 139 struct pglist_data __maybe_unused \
140 *__alloc_bootmem_node__pgdat = (pgdat); \ 140 *__alloc_bootmem_node__pgdat = (pgdat); \
141 __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, 0); \ 141 __alloc_bootmem_node(NODE_DATA(0), (x), PAGE_SIZE, 0); \
142}) 142})
diff --git a/include/asm-i386/msr.h b/include/asm-i386/msr.h
index 26861df52cc4..df21ea049369 100644
--- a/include/asm-i386/msr.h
+++ b/include/asm-i386/msr.h
@@ -86,62 +86,50 @@ static inline unsigned long long native_read_pmc(void)
86 86
87#define rdmsr(msr,val1,val2) \ 87#define rdmsr(msr,val1,val2) \
88 do { \ 88 do { \
89 unsigned long long __val = native_read_msr(msr); \ 89 u64 __val = native_read_msr(msr); \
90 val1 = __val; \ 90 (val1) = (u32)__val; \
91 val2 = __val >> 32; \ 91 (val2) = (u32)(__val >> 32); \
92 } while(0) 92 } while(0)
93 93
94#define wrmsr(msr,val1,val2) \ 94static inline void wrmsr(u32 __msr, u32 __low, u32 __high)
95 native_write_msr(msr, ((unsigned long long)val2 << 32) | val1)
96
97#define rdmsrl(msr,val) \
98 do { \
99 (val) = native_read_msr(msr); \
100 } while(0)
101
102static inline void wrmsrl (unsigned long msr, unsigned long long val)
103{ 95{
104 unsigned long lo, hi; 96 native_write_msr(__msr, ((u64)__high << 32) | __low);
105 lo = (unsigned long) val;
106 hi = val >> 32;
107 wrmsr (msr, lo, hi);
108} 97}
109 98
99#define rdmsrl(msr,val) \
100 ((val) = native_read_msr(msr))
101
102#define wrmsrl(msr,val) native_write_msr(msr, val)
103
110/* wrmsr with exception handling */ 104/* wrmsr with exception handling */
111#define wrmsr_safe(msr,val1,val2) \ 105static inline int wrmsr_safe(u32 __msr, u32 __low, u32 __high)
112 (native_write_msr_safe(msr, ((unsigned long long)val2 << 32) | val1)) 106{
107 return native_write_msr_safe(__msr, ((u64)__high << 32) | __low);
108}
113 109
114/* rdmsr with exception handling */ 110/* rdmsr with exception handling */
115#define rdmsr_safe(msr,p1,p2) \ 111#define rdmsr_safe(msr,p1,p2) \
116 ({ \ 112 ({ \
117 int __err; \ 113 int __err; \
118 unsigned long long __val = native_read_msr_safe(msr, &__err);\ 114 u64 __val = native_read_msr_safe(msr, &__err); \
119 (*p1) = __val; \ 115 (*p1) = (u32)__val; \
120 (*p2) = __val >> 32; \ 116 (*p2) = (u32)(__val >> 32); \
121 __err; \ 117 __err; \
122 }) 118 })
123 119
124#define rdtsc(low,high) \
125 do { \
126 u64 _l = native_read_tsc(); \
127 (low) = (u32)_l; \
128 (high) = _l >> 32; \
129 } while(0)
130
131#define rdtscl(low) \ 120#define rdtscl(low) \
132 do { \ 121 ((low) = (u32)native_read_tsc())
133 (low) = native_read_tsc(); \
134 } while(0)
135 122
136#define rdtscll(val) ((val) = native_read_tsc()) 123#define rdtscll(val) \
124 ((val) = native_read_tsc())
137 125
138#define write_tsc(val1,val2) wrmsr(0x10, val1, val2) 126#define write_tsc(val1,val2) wrmsr(0x10, val1, val2)
139 127
140#define rdpmc(counter,low,high) \ 128#define rdpmc(counter,low,high) \
141 do { \ 129 do { \
142 u64 _l = native_read_pmc(); \ 130 u64 _l = native_read_pmc(); \
143 low = (u32)_l; \ 131 (low) = (u32)_l; \
144 high = _l >> 32; \ 132 (high) = (u32)(_l >> 32); \
145 } while(0) 133 } while(0)
146#endif /* !CONFIG_PARAVIRT */ 134#endif /* !CONFIG_PARAVIRT */
147 135
diff --git a/include/asm-i386/paravirt.h b/include/asm-i386/paravirt.h
index e2e7f98723c5..bc5c12c13581 100644
--- a/include/asm-i386/paravirt.h
+++ b/include/asm-i386/paravirt.h
@@ -560,11 +560,6 @@ static inline u64 paravirt_read_tsc(void)
560{ 560{
561 return PVOP_CALL0(u64, read_tsc); 561 return PVOP_CALL0(u64, read_tsc);
562} 562}
563#define rdtsc(low,high) do { \
564 u64 _l = paravirt_read_tsc(); \
565 low = (u32)_l; \
566 high = _l >> 32; \
567} while(0)
568 563
569#define rdtscl(low) do { \ 564#define rdtscl(low) do { \
570 u64 _l = paravirt_read_tsc(); \ 565 u64 _l = paravirt_read_tsc(); \
diff --git a/include/asm-i386/smp.h b/include/asm-i386/smp.h
index 090abc1da32a..0c7132787062 100644
--- a/include/asm-i386/smp.h
+++ b/include/asm-i386/smp.h
@@ -124,20 +124,6 @@ static inline int num_booting_cpus(void)
124 return cpus_weight(cpu_callout_map); 124 return cpus_weight(cpu_callout_map);
125} 125}
126 126
127#ifdef CONFIG_X86_LOCAL_APIC
128
129#ifdef APIC_DEFINITION
130extern int hard_smp_processor_id(void);
131#else
132#include <mach_apicdef.h>
133static inline int hard_smp_processor_id(void)
134{
135 /* we don't want to mark this access volatile - bad code generation */
136 return GET_APIC_ID(*(unsigned long *)(APIC_BASE+APIC_ID));
137}
138#endif
139#endif
140
141extern int safe_smp_processor_id(void); 127extern int safe_smp_processor_id(void);
142extern int __cpu_disable(void); 128extern int __cpu_disable(void);
143extern void __cpu_die(unsigned int cpu); 129extern void __cpu_die(unsigned int cpu);
@@ -152,10 +138,31 @@ extern unsigned int num_processors;
152 138
153#define NO_PROC_ID 0xFF /* No processor magic marker */ 139#define NO_PROC_ID 0xFF /* No processor magic marker */
154 140
155#endif 141#endif /* CONFIG_SMP */
156 142
157#ifndef __ASSEMBLY__ 143#ifndef __ASSEMBLY__
158 144
145#ifdef CONFIG_X86_LOCAL_APIC
146
147#ifdef APIC_DEFINITION
148extern int hard_smp_processor_id(void);
149#else
150#include <mach_apicdef.h>
151static inline int hard_smp_processor_id(void)
152{
153 /* we don't want to mark this access volatile - bad code generation */
154 return GET_APIC_ID(*(unsigned long *)(APIC_BASE+APIC_ID));
155}
156#endif /* APIC_DEFINITION */
157
158#else /* CONFIG_X86_LOCAL_APIC */
159
160#ifndef CONFIG_SMP
161#define hard_smp_processor_id() 0
162#endif
163
164#endif /* CONFIG_X86_LOCAL_APIC */
165
159extern u8 apicid_2_node[]; 166extern u8 apicid_2_node[];
160 167
161#ifdef CONFIG_X86_LOCAL_APIC 168#ifdef CONFIG_X86_LOCAL_APIC
diff --git a/include/asm-i386/sync_bitops.h b/include/asm-i386/sync_bitops.h
index 7d72351bea75..cbce08a2d135 100644
--- a/include/asm-i386/sync_bitops.h
+++ b/include/asm-i386/sync_bitops.h
@@ -24,7 +24,7 @@
24 * if you do not require the atomic guarantees. 24 * if you do not require the atomic guarantees.
25 * 25 *
26 * Note: there are no guarantees that this function will not be reordered 26 * Note: there are no guarantees that this function will not be reordered
27 * on non x86 architectures, so if you are writting portable code, 27 * on non-x86 architectures, so if you are writing portable code,
28 * make sure not to rely on its reordering guarantees. 28 * make sure not to rely on its reordering guarantees.
29 * 29 *
30 * Note that @nr may be almost arbitrarily large; this function is not 30 * Note that @nr may be almost arbitrarily large; this function is not
diff --git a/include/asm-i386/thread_info.h b/include/asm-i386/thread_info.h
index bf01d4b342bd..4cb0f91ae64f 100644
--- a/include/asm-i386/thread_info.h
+++ b/include/asm-i386/thread_info.h
@@ -172,7 +172,7 @@ static inline struct thread_info *current_thread_info(void)
172#define TS_USEDFPU 0x0001 /* FPU was used by this task this quantum (SMP) */ 172#define TS_USEDFPU 0x0001 /* FPU was used by this task this quantum (SMP) */
173#define TS_POLLING 0x0002 /* True if in idle loop and not sleeping */ 173#define TS_POLLING 0x0002 /* True if in idle loop and not sleeping */
174 174
175#define tsk_is_polling(t) ((t)->thread_info->status & TS_POLLING) 175#define tsk_is_polling(t) (task_thread_info(t)->status & TS_POLLING)
176 176
177#endif /* __KERNEL__ */ 177#endif /* __KERNEL__ */
178 178
diff --git a/include/asm-ia64/hw_irq.h b/include/asm-ia64/hw_irq.h
index 27f9df6b9145..c054d7a9aaa7 100644
--- a/include/asm-ia64/hw_irq.h
+++ b/include/asm-ia64/hw_irq.h
@@ -66,6 +66,7 @@ extern int ia64_last_device_vector;
66#define IA64_PERFMON_VECTOR 0xee /* performanc monitor interrupt vector */ 66#define IA64_PERFMON_VECTOR 0xee /* performanc monitor interrupt vector */
67#define IA64_TIMER_VECTOR 0xef /* use highest-prio group 15 interrupt for timer */ 67#define IA64_TIMER_VECTOR 0xef /* use highest-prio group 15 interrupt for timer */
68#define IA64_MCA_WAKEUP_VECTOR 0xf0 /* MCA wakeup (must be >MCA_RENDEZ_VECTOR) */ 68#define IA64_MCA_WAKEUP_VECTOR 0xf0 /* MCA wakeup (must be >MCA_RENDEZ_VECTOR) */
69#define IA64_IPI_LOCAL_TLB_FLUSH 0xfc /* SMP flush local TLB */
69#define IA64_IPI_RESCHEDULE 0xfd /* SMP reschedule */ 70#define IA64_IPI_RESCHEDULE 0xfd /* SMP reschedule */
70#define IA64_IPI_VECTOR 0xfe /* inter-processor interrupt vector */ 71#define IA64_IPI_VECTOR 0xfe /* inter-processor interrupt vector */
71 72
diff --git a/include/asm-ia64/iosapic.h b/include/asm-ia64/iosapic.h
index 20f98f1751a1..421cb6b62a7c 100644
--- a/include/asm-ia64/iosapic.h
+++ b/include/asm-ia64/iosapic.h
@@ -83,7 +83,7 @@ extern int gsi_to_irq (unsigned int gsi);
83extern int iosapic_register_intr (unsigned int gsi, unsigned long polarity, 83extern int iosapic_register_intr (unsigned int gsi, unsigned long polarity,
84 unsigned long trigger); 84 unsigned long trigger);
85extern void iosapic_unregister_intr (unsigned int irq); 85extern void iosapic_unregister_intr (unsigned int irq);
86extern void __init iosapic_override_isa_irq (unsigned int isa_irq, unsigned int gsi, 86extern void __devinit iosapic_override_isa_irq (unsigned int isa_irq, unsigned int gsi,
87 unsigned long polarity, 87 unsigned long polarity,
88 unsigned long trigger); 88 unsigned long trigger);
89extern int __init iosapic_register_platform_intr (u32 int_type, 89extern int __init iosapic_register_platform_intr (u32 int_type,
diff --git a/include/asm-ia64/smp.h b/include/asm-ia64/smp.h
index 60fd4ae014f6..c60024989ebd 100644
--- a/include/asm-ia64/smp.h
+++ b/include/asm-ia64/smp.h
@@ -38,6 +38,8 @@ ia64_get_lid (void)
38 return lid.f.id << 8 | lid.f.eid; 38 return lid.f.id << 8 | lid.f.eid;
39} 39}
40 40
41#define hard_smp_processor_id() ia64_get_lid()
42
41#ifdef CONFIG_SMP 43#ifdef CONFIG_SMP
42 44
43#define XTP_OFFSET 0x1e0008 45#define XTP_OFFSET 0x1e0008
@@ -110,8 +112,6 @@ max_xtp (void)
110 writeb(0x0f, ipi_base_addr + XTP_OFFSET); /* Set XTP to max */ 112 writeb(0x0f, ipi_base_addr + XTP_OFFSET); /* Set XTP to max */
111} 113}
112 114
113#define hard_smp_processor_id() ia64_get_lid()
114
115/* Upping and downing of CPUs */ 115/* Upping and downing of CPUs */
116extern int __cpu_disable (void); 116extern int __cpu_disable (void);
117extern void __cpu_die (unsigned int cpu); 117extern void __cpu_die (unsigned int cpu);
@@ -128,7 +128,7 @@ extern void unlock_ipi_calllock(void);
128extern void identify_siblings (struct cpuinfo_ia64 *); 128extern void identify_siblings (struct cpuinfo_ia64 *);
129extern int is_multithreading_enabled(void); 129extern int is_multithreading_enabled(void);
130 130
131#else 131#else /* CONFIG_SMP */
132 132
133#define cpu_logical_id(i) 0 133#define cpu_logical_id(i) 0
134#define cpu_physical_id(i) ia64_get_lid() 134#define cpu_physical_id(i) ia64_get_lid()
diff --git a/include/asm-ia64/sn/sn_sal.h b/include/asm-ia64/sn/sn_sal.h
index 2c4004eb5a68..291e8ceed6e6 100644
--- a/include/asm-ia64/sn/sn_sal.h
+++ b/include/asm-ia64/sn/sn_sal.h
@@ -106,6 +106,7 @@
106/* interrupt handling */ 106/* interrupt handling */
107#define SAL_INTR_ALLOC 1 107#define SAL_INTR_ALLOC 1
108#define SAL_INTR_FREE 2 108#define SAL_INTR_FREE 2
109#define SAL_INTR_REDIRECT 3
109 110
110/* 111/*
111 * operations available on the generic SN_SAL_SYSCTL_OP 112 * operations available on the generic SN_SAL_SYSCTL_OP
diff --git a/include/asm-ia64/thread_info.h b/include/asm-ia64/thread_info.h
index 91698599f918..7d0241db622b 100644
--- a/include/asm-ia64/thread_info.h
+++ b/include/asm-ia64/thread_info.h
@@ -85,6 +85,7 @@ struct thread_info {
85#define TIF_SYSCALL_TRACE 3 /* syscall trace active */ 85#define TIF_SYSCALL_TRACE 3 /* syscall trace active */
86#define TIF_SYSCALL_AUDIT 4 /* syscall auditing active */ 86#define TIF_SYSCALL_AUDIT 4 /* syscall auditing active */
87#define TIF_SINGLESTEP 5 /* restore singlestep on return to user mode */ 87#define TIF_SINGLESTEP 5 /* restore singlestep on return to user mode */
88#define TIF_RESTORE_SIGMASK 6 /* restore signal mask in do_signal() */
88#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ 89#define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */
89#define TIF_MEMDIE 17 90#define TIF_MEMDIE 17
90#define TIF_MCA_INIT 18 /* this task is processing MCA or INIT */ 91#define TIF_MCA_INIT 18 /* this task is processing MCA or INIT */
@@ -96,6 +97,7 @@ struct thread_info {
96#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP) 97#define _TIF_SINGLESTEP (1 << TIF_SINGLESTEP)
97#define _TIF_SYSCALL_TRACEAUDIT (_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP) 98#define _TIF_SYSCALL_TRACEAUDIT (_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP)
98#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME) 99#define _TIF_NOTIFY_RESUME (1 << TIF_NOTIFY_RESUME)
100#define _TIF_RESTORE_SIGMASK (1 << TIF_RESTORE_SIGMASK)
99#define _TIF_SIGPENDING (1 << TIF_SIGPENDING) 101#define _TIF_SIGPENDING (1 << TIF_SIGPENDING)
100#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED) 102#define _TIF_NEED_RESCHED (1 << TIF_NEED_RESCHED)
101#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG) 103#define _TIF_POLLING_NRFLAG (1 << TIF_POLLING_NRFLAG)
@@ -104,12 +106,12 @@ struct thread_info {
104#define _TIF_FREEZE (1 << TIF_FREEZE) 106#define _TIF_FREEZE (1 << TIF_FREEZE)
105 107
106/* "work to do on user-return" bits */ 108/* "work to do on user-return" bits */
107#define TIF_ALLWORK_MASK (_TIF_NOTIFY_RESUME|_TIF_SIGPENDING|_TIF_NEED_RESCHED|_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT) 109#define TIF_ALLWORK_MASK (_TIF_NOTIFY_RESUME|_TIF_SIGPENDING|_TIF_NEED_RESCHED|_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_RESTORE_SIGMASK)
108/* like TIF_ALLWORK_BITS but sans TIF_SYSCALL_TRACE or TIF_SYSCALL_AUDIT */ 110/* like TIF_ALLWORK_BITS but sans TIF_SYSCALL_TRACE or TIF_SYSCALL_AUDIT */
109#define TIF_WORK_MASK (TIF_ALLWORK_MASK&~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT)) 111#define TIF_WORK_MASK (TIF_ALLWORK_MASK&~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT))
110 112
111#define TS_POLLING 1 /* true if in idle loop and not sleeping */ 113#define TS_POLLING 1 /* true if in idle loop and not sleeping */
112 114
113#define tsk_is_polling(t) ((t)->thread_info->status & TS_POLLING) 115#define tsk_is_polling(t) (task_thread_info(t)->status & TS_POLLING)
114 116
115#endif /* _ASM_IA64_THREAD_INFO_H */ 117#endif /* _ASM_IA64_THREAD_INFO_H */
diff --git a/include/asm-ia64/tlbflush.h b/include/asm-ia64/tlbflush.h
index cf9acb9bb1fb..e37f9fbf33af 100644
--- a/include/asm-ia64/tlbflush.h
+++ b/include/asm-ia64/tlbflush.h
@@ -27,9 +27,11 @@ extern void local_flush_tlb_all (void);
27#ifdef CONFIG_SMP 27#ifdef CONFIG_SMP
28 extern void smp_flush_tlb_all (void); 28 extern void smp_flush_tlb_all (void);
29 extern void smp_flush_tlb_mm (struct mm_struct *mm); 29 extern void smp_flush_tlb_mm (struct mm_struct *mm);
30 extern void smp_flush_tlb_cpumask (cpumask_t xcpumask);
30# define flush_tlb_all() smp_flush_tlb_all() 31# define flush_tlb_all() smp_flush_tlb_all()
31#else 32#else
32# define flush_tlb_all() local_flush_tlb_all() 33# define flush_tlb_all() local_flush_tlb_all()
34# define smp_flush_tlb_cpumask(m) local_flush_tlb_all()
33#endif 35#endif
34 36
35static inline void 37static inline void
@@ -94,6 +96,15 @@ flush_tlb_pgtables (struct mm_struct *mm, unsigned long start, unsigned long end
94 */ 96 */
95} 97}
96 98
99/*
100 * Flush the local TLB. Invoked from another cpu using an IPI.
101 */
102#ifdef CONFIG_SMP
103void smp_local_flush_tlb(void);
104#else
105#define smp_local_flush_tlb()
106#endif
107
97#define flush_tlb_kernel_range(start, end) flush_tlb_all() /* XXX fix me */ 108#define flush_tlb_kernel_range(start, end) flush_tlb_all() /* XXX fix me */
98 109
99#endif /* _ASM_IA64_TLBFLUSH_H */ 110#endif /* _ASM_IA64_TLBFLUSH_H */
diff --git a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h
index a9e1fa4cac4d..861c8ec87b09 100644
--- a/include/asm-ia64/unistd.h
+++ b/include/asm-ia64/unistd.h
@@ -283,7 +283,8 @@
283#define __NR_readlinkat 1291 283#define __NR_readlinkat 1291
284#define __NR_fchmodat 1292 284#define __NR_fchmodat 1292
285#define __NR_faccessat 1293 285#define __NR_faccessat 1293
286/* 1294, 1295 reserved for pselect/ppoll */ 286#define __NR_pselect6 1294
287#define __NR_ppoll 1295
287#define __NR_unshare 1296 288#define __NR_unshare 1296
288#define __NR_splice 1297 289#define __NR_splice 1297
289#define __NR_set_robust_list 1298 290#define __NR_set_robust_list 1298
@@ -300,6 +301,7 @@
300#define NR_syscalls 281 /* length of syscall table */ 301#define NR_syscalls 281 /* length of syscall table */
301 302
302#define __ARCH_WANT_SYS_RT_SIGACTION 303#define __ARCH_WANT_SYS_RT_SIGACTION
304#define __ARCH_WANT_SYS_RT_SIGSUSPEND
303 305
304#ifdef CONFIG_IA32_SUPPORT 306#ifdef CONFIG_IA32_SUPPORT
305# define __ARCH_WANT_SYS_FADVISE64 307# define __ARCH_WANT_SYS_FADVISE64
@@ -310,6 +312,7 @@
310# define __ARCH_WANT_SYS_OLDUMOUNT 312# define __ARCH_WANT_SYS_OLDUMOUNT
311# define __ARCH_WANT_SYS_SIGPENDING 313# define __ARCH_WANT_SYS_SIGPENDING
312# define __ARCH_WANT_SYS_SIGPROCMASK 314# define __ARCH_WANT_SYS_SIGPROCMASK
315# define __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND
313# define __ARCH_WANT_COMPAT_SYS_TIME 316# define __ARCH_WANT_COMPAT_SYS_TIME
314#endif 317#endif
315 318
diff --git a/include/asm-m32r/smp.h b/include/asm-m32r/smp.h
index abd937ac5239..078e1a51a042 100644
--- a/include/asm-m32r/smp.h
+++ b/include/asm-m32r/smp.h
@@ -108,6 +108,10 @@ extern unsigned long send_IPI_mask_phys(cpumask_t, int, int);
108#define IPI_SHIFT (0) 108#define IPI_SHIFT (0)
109#define NR_IPIS (8) 109#define NR_IPIS (8)
110 110
111#endif /* CONFIG_SMP */ 111#else /* CONFIG_SMP */
112
113#define hard_smp_processor_id() 0
114
115#endif /* CONFIG_SMP */
112 116
113#endif /* _ASM_M32R_SMP_H */ 117#endif /* _ASM_M32R_SMP_H */
diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h
index 06cdece35865..f62f5c9abba6 100644
--- a/include/asm-m32r/system.h
+++ b/include/asm-m32r/system.h
@@ -136,7 +136,7 @@ extern void __xchg_called_with_bad_pointer(void);
136 "add3 "reg0", "addr", #0x2000; \n\t" \ 136 "add3 "reg0", "addr", #0x2000; \n\t" \
137 "ld "reg0", @"reg0"; \n\t" \ 137 "ld "reg0", @"reg0"; \n\t" \
138 "unlock "reg0", @"reg1"; \n\t" 138 "unlock "reg0", @"reg1"; \n\t"
139 /* FIXME: This workaround code cannot handle kenrel modules 139 /* FIXME: This workaround code cannot handle kernel modules
140 * correctly under SMP environment. 140 * correctly under SMP environment.
141 */ 141 */
142#else /* CONFIG_CHIP_M32700_TS1 */ 142#else /* CONFIG_CHIP_M32700_TS1 */
diff --git a/include/asm-m68k/atarihw.h b/include/asm-m68k/atarihw.h
index f28acd0fd689..6211363a345f 100644
--- a/include/asm-m68k/atarihw.h
+++ b/include/asm-m68k/atarihw.h
@@ -2,7 +2,7 @@
2** linux/atarihw.h -- This header defines some macros and pointers for 2** linux/atarihw.h -- This header defines some macros and pointers for
3** the various Atari custom hardware registers. 3** the various Atari custom hardware registers.
4** 4**
5** Copyright 1994 by Bj”rn Brauel 5** Copyright 1994 by Bj”rn Brauel
6** 6**
7** 5/1/94 Roman Hodek: 7** 5/1/94 Roman Hodek:
8** Added definitions for TT specific chips. 8** Added definitions for TT specific chips.
diff --git a/include/asm-m68k/atariints.h b/include/asm-m68k/atariints.h
index 0ed454fc24bb..ce6c445805bd 100644
--- a/include/asm-m68k/atariints.h
+++ b/include/asm-m68k/atariints.h
@@ -1,7 +1,7 @@
1/* 1/*
2** atariints.h -- Atari Linux interrupt handling structs and prototypes 2** atariints.h -- Atari Linux interrupt handling structs and prototypes
3** 3**
4** Copyright 1994 by Bj”rn Brauel 4** Copyright 1994 by Bj”rn Brauel
5** 5**
6** 5/2/94 Roman Hodek: 6** 5/2/94 Roman Hodek:
7** TT interrupt definitions added. 7** TT interrupt definitions added.
diff --git a/include/asm-m68k/thread_info.h b/include/asm-m68k/thread_info.h
index c4d622a57dfb..d635a3752488 100644
--- a/include/asm-m68k/thread_info.h
+++ b/include/asm-m68k/thread_info.h
@@ -37,17 +37,17 @@ struct thread_info {
37#define init_stack (init_thread_union.stack) 37#define init_stack (init_thread_union.stack)
38 38
39#define task_thread_info(tsk) (&(tsk)->thread.info) 39#define task_thread_info(tsk) (&(tsk)->thread.info)
40#define task_stack_page(tsk) ((void *)(tsk)->thread_info) 40#define task_stack_page(tsk) ((tsk)->stack)
41#define current_thread_info() task_thread_info(current) 41#define current_thread_info() task_thread_info(current)
42 42
43#define __HAVE_THREAD_FUNCTIONS 43#define __HAVE_THREAD_FUNCTIONS
44 44
45#define setup_thread_stack(p, org) ({ \ 45#define setup_thread_stack(p, org) ({ \
46 *(struct task_struct **)(p)->thread_info = (p); \ 46 *(struct task_struct **)(p)->stack = (p); \
47 task_thread_info(p)->task = (p); \ 47 task_thread_info(p)->task = (p); \
48}) 48})
49 49
50#define end_of_stack(p) ((unsigned long *)(p)->thread_info + 1) 50#define end_of_stack(p) ((unsigned long *)(p)->stack + 1)
51 51
52/* entry.S relies on these definitions! 52/* entry.S relies on these definitions!
53 * bits 0-7 are tested at every exception exit 53 * bits 0-7 are tested at every exception exit
diff --git a/include/asm-mips/bootinfo.h b/include/asm-mips/bootinfo.h
index c7c945baf1ee..dbf834f4dac4 100644
--- a/include/asm-mips/bootinfo.h
+++ b/include/asm-mips/bootinfo.h
@@ -254,7 +254,7 @@ extern void free_init_pages(const char *what,
254extern char arcs_cmdline[CL_SIZE]; 254extern char arcs_cmdline[CL_SIZE];
255 255
256/* 256/*
257 * Registers a0, a1, a3 and a4 as passed to the kenrel entry by firmware 257 * Registers a0, a1, a3 and a4 as passed to the kernel entry by firmware
258 */ 258 */
259extern unsigned long fw_arg0, fw_arg1, fw_arg2, fw_arg3; 259extern unsigned long fw_arg0, fw_arg1, fw_arg2, fw_arg3;
260 260
diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h
index 30f23a2b46ca..3713d256d369 100644
--- a/include/asm-mips/system.h
+++ b/include/asm-mips/system.h
@@ -55,7 +55,7 @@ do { \
55 if (cpu_has_dsp) \ 55 if (cpu_has_dsp) \
56 __save_dsp(prev); \ 56 __save_dsp(prev); \
57 next->thread.emulated_fp = 0; \ 57 next->thread.emulated_fp = 0; \
58 (last) = resume(prev, next, next->thread_info); \ 58 (last) = resume(prev, next, task_thread_info(next)); \
59 if (cpu_has_dsp) \ 59 if (cpu_has_dsp) \
60 __restore_dsp(current); \ 60 __restore_dsp(current); \
61} while(0) 61} while(0)
diff --git a/include/asm-parisc/compat.h b/include/asm-parisc/compat.h
index fe8579023531..11f4222597a0 100644
--- a/include/asm-parisc/compat.h
+++ b/include/asm-parisc/compat.h
@@ -152,7 +152,7 @@ static __inline__ void __user *compat_alloc_user_space(long len)
152 152
153static inline int __is_compat_task(struct task_struct *t) 153static inline int __is_compat_task(struct task_struct *t)
154{ 154{
155 return test_ti_thread_flag(t->thread_info, TIF_32BIT); 155 return test_ti_thread_flag(task_thread_info(t), TIF_32BIT);
156} 156}
157 157
158static inline int is_compat_task(void) 158static inline int is_compat_task(void)
diff --git a/include/asm-powerpc/ppc-pci.h b/include/asm-powerpc/ppc-pci.h
index d74b2965bb82..6dcd7a811fe1 100644
--- a/include/asm-powerpc/ppc-pci.h
+++ b/include/asm-powerpc/ppc-pci.h
@@ -64,7 +64,7 @@ struct pci_dev *pci_get_device_by_addr(unsigned long addr);
64 * eeh_slot_error_detail -- record and EEH error condition to the log 64 * eeh_slot_error_detail -- record and EEH error condition to the log
65 * @severity: 1 if temporary, 2 if permanent failure. 65 * @severity: 1 if temporary, 2 if permanent failure.
66 * 66 *
67 * Obtains the the EEH error details from the RTAS subsystem, 67 * Obtains the EEH error details from the RTAS subsystem,
68 * and then logs these details with the RTAS error log system. 68 * and then logs these details with the RTAS error log system.
69 */ 69 */
70void eeh_slot_error_detail (struct pci_dn *pdn, int severity); 70void eeh_slot_error_detail (struct pci_dn *pdn, int severity);
diff --git a/include/asm-powerpc/smp.h b/include/asm-powerpc/smp.h
index 01717f266dc9..d037f50580e2 100644
--- a/include/asm-powerpc/smp.h
+++ b/include/asm-powerpc/smp.h
@@ -83,6 +83,7 @@ extern void __cpu_die(unsigned int cpu);
83 83
84#else 84#else
85/* for UP */ 85/* for UP */
86#define hard_smp_processor_id() 0
86#define smp_setup_cpu_maps() 87#define smp_setup_cpu_maps()
87 88
88#endif /* CONFIG_SMP */ 89#endif /* CONFIG_SMP */
diff --git a/include/asm-ppc/hydra.h b/include/asm-ppc/hydra.h
index 833a8aff2a80..1ad4eed07fbe 100644
--- a/include/asm-ppc/hydra.h
+++ b/include/asm-ppc/hydra.h
@@ -8,7 +8,7 @@
8 * Macintosh Technology in the Common Hardware Reference Platform 8 * Macintosh Technology in the Common Hardware Reference Platform
9 * Apple Computer, Inc. 9 * Apple Computer, Inc.
10 * 10 *
11 * © Copyright 1995 Apple Computer, Inc. All rights reserved. 11 * © Copyright 1995 Apple Computer, Inc. All rights reserved.
12 * 12 *
13 * It's available online from http://chrp.apple.com/MacTech.pdf. 13 * It's available online from http://chrp.apple.com/MacTech.pdf.
14 * You can obtain paper copies of this book from computer bookstores or by 14 * You can obtain paper copies of this book from computer bookstores or by
diff --git a/include/asm-s390/smp.h b/include/asm-s390/smp.h
index 0a28e6d6ef40..76e424f718c6 100644
--- a/include/asm-s390/smp.h
+++ b/include/asm-s390/smp.h
@@ -110,6 +110,7 @@ static inline void smp_send_stop(void)
110 __load_psw_mask(psw_kernel_bits & ~PSW_MASK_MCHECK); 110 __load_psw_mask(psw_kernel_bits & ~PSW_MASK_MCHECK);
111} 111}
112 112
113#define hard_smp_processor_id() 0
113#define smp_cpu_not_running(cpu) 1 114#define smp_cpu_not_running(cpu) 1
114#define smp_setup_cpu_possible_map() do { } while (0) 115#define smp_setup_cpu_possible_map() do { } while (0)
115#endif 116#endif
diff --git a/include/asm-sh/bug.h b/include/asm-sh/bug.h
index 794c36daf06d..46f925c815ac 100644
--- a/include/asm-sh/bug.h
+++ b/include/asm-sh/bug.h
@@ -1,12 +1,12 @@
1#ifndef __ASM_SH_BUG_H 1#ifndef __ASM_SH_BUG_H
2#define __ASM_SH_BUG_H 2#define __ASM_SH_BUG_H
3 3
4#define TRAPA_BUG_OPCODE 0xc33e /* trapa #0x3e */
5
4#ifdef CONFIG_BUG 6#ifdef CONFIG_BUG
5#define HAVE_ARCH_BUG 7#define HAVE_ARCH_BUG
6#define HAVE_ARCH_WARN_ON 8#define HAVE_ARCH_WARN_ON
7 9
8#define TRAPA_BUG_OPCODE 0xc33e /* trapa #0x3e */
9
10/** 10/**
11 * _EMIT_BUG_ENTRY 11 * _EMIT_BUG_ENTRY
12 * %1 - __FILE__ 12 * %1 - __FILE__
diff --git a/include/asm-sh/cpu-features.h b/include/asm-sh/cpu-features.h
index 4bccd7c032f9..86308aa39731 100644
--- a/include/asm-sh/cpu-features.h
+++ b/include/asm-sh/cpu-features.h
@@ -20,5 +20,6 @@
20#define CPU_HAS_PTEA 0x0020 /* PTEA register */ 20#define CPU_HAS_PTEA 0x0020 /* PTEA register */
21#define CPU_HAS_LLSC 0x0040 /* movli.l/movco.l */ 21#define CPU_HAS_LLSC 0x0040 /* movli.l/movco.l */
22#define CPU_HAS_L2_CACHE 0x0080 /* Secondary cache / URAM */ 22#define CPU_HAS_L2_CACHE 0x0080 /* Secondary cache / URAM */
23#define CPU_HAS_OP32 0x0100 /* 32-bit instruction support */
23 24
24#endif /* __ASM_SH_CPU_FEATURES_H */ 25#endif /* __ASM_SH_CPU_FEATURES_H */
diff --git a/include/asm-sh/cpu-sh3/dma.h b/include/asm-sh/cpu-sh3/dma.h
index 954801b46022..3a66dc458023 100644
--- a/include/asm-sh/cpu-sh3/dma.h
+++ b/include/asm-sh/cpu-sh3/dma.h
@@ -26,7 +26,7 @@ enum {
26 XMIT_SZ_128BIT, 26 XMIT_SZ_128BIT,
27}; 27};
28 28
29static unsigned int ts_shift[] __attribute__ ((used)) = { 29static unsigned int ts_shift[] __maybe_unused = {
30 [XMIT_SZ_8BIT] = 0, 30 [XMIT_SZ_8BIT] = 0,
31 [XMIT_SZ_16BIT] = 1, 31 [XMIT_SZ_16BIT] = 1,
32 [XMIT_SZ_32BIT] = 2, 32 [XMIT_SZ_32BIT] = 2,
diff --git a/include/asm-sh/cpu-sh4/dma-sh7780.h b/include/asm-sh/cpu-sh4/dma-sh7780.h
index 6c90d28331b2..71b426a6e482 100644
--- a/include/asm-sh/cpu-sh4/dma-sh7780.h
+++ b/include/asm-sh/cpu-sh4/dma-sh7780.h
@@ -28,7 +28,7 @@ enum {
28/* 28/*
29 * The DMA count is defined as the number of bytes to transfer. 29 * The DMA count is defined as the number of bytes to transfer.
30 */ 30 */
31static unsigned int __attribute__ ((used)) ts_shift[] = { 31static unsigned int ts_shift[] __maybe_unused = {
32 [XMIT_SZ_8BIT] = 0, 32 [XMIT_SZ_8BIT] = 0,
33 [XMIT_SZ_16BIT] = 1, 33 [XMIT_SZ_16BIT] = 1,
34 [XMIT_SZ_32BIT] = 2, 34 [XMIT_SZ_32BIT] = 2,
diff --git a/include/asm-sh/cpu-sh4/dma.h b/include/asm-sh/cpu-sh4/dma.h
index c135e9cebd9c..36e26a964765 100644
--- a/include/asm-sh/cpu-sh4/dma.h
+++ b/include/asm-sh/cpu-sh4/dma.h
@@ -53,7 +53,7 @@ enum {
53/* 53/*
54 * The DMA count is defined as the number of bytes to transfer. 54 * The DMA count is defined as the number of bytes to transfer.
55 */ 55 */
56static unsigned int ts_shift[] __attribute__ ((used)) = { 56static unsigned int ts_shift[] __maybe_unused = {
57 [XMIT_SZ_64BIT] = 3, 57 [XMIT_SZ_64BIT] = 3,
58 [XMIT_SZ_8BIT] = 0, 58 [XMIT_SZ_8BIT] = 0,
59 [XMIT_SZ_16BIT] = 1, 59 [XMIT_SZ_16BIT] = 1,
diff --git a/include/asm-sh/dmabrg.h b/include/asm-sh/dmabrg.h
new file mode 100644
index 000000000000..c5edba216cf1
--- /dev/null
+++ b/include/asm-sh/dmabrg.h
@@ -0,0 +1,23 @@
1/*
2 * SH7760 DMABRG (USB/Audio) support
3 */
4
5#ifndef _DMABRG_H_
6#define _DMABRG_H_
7
8/* IRQ sources */
9#define DMABRGIRQ_USBDMA 0
10#define DMABRGIRQ_USBDMAERR 1
11#define DMABRGIRQ_A0TXF 2
12#define DMABRGIRQ_A0TXH 3
13#define DMABRGIRQ_A0RXF 4
14#define DMABRGIRQ_A0RXH 5
15#define DMABRGIRQ_A1TXF 6
16#define DMABRGIRQ_A1TXH 7
17#define DMABRGIRQ_A1RXF 8
18#define DMABRGIRQ_A1RXH 9
19
20extern int dmabrg_request_irq(unsigned int, void(*)(void *), void *);
21extern void dmabrg_free_irq(unsigned int);
22
23#endif
diff --git a/include/asm-sh/edosk7705.h b/include/asm-sh/edosk7705.h
index a1089a65bc36..5bdc9d9be3de 100644
--- a/include/asm-sh/edosk7705.h
+++ b/include/asm-sh/edosk7705.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * include/asm-sh/edosk7705/io.h 2 * include/asm-sh/edosk7705.h
3 * 3 *
4 * Modified version of io_se.h for the EDOSK7705 specific functions. 4 * Modified version of io_se.h for the EDOSK7705 specific functions.
5 * 5 *
diff --git a/include/asm-sh/kdebug.h b/include/asm-sh/kdebug.h
index 493c20629747..16578b7c9da1 100644
--- a/include/asm-sh/kdebug.h
+++ b/include/asm-sh/kdebug.h
@@ -2,20 +2,6 @@
2#define __ASM_SH_KDEBUG_H 2#define __ASM_SH_KDEBUG_H
3 3
4#include <linux/notifier.h> 4#include <linux/notifier.h>
5#include <asm-generic/kdebug.h>
6
7struct pt_regs;
8
9struct die_args {
10 struct pt_regs *regs;
11 int trapnr;
12};
13
14int register_die_notifier(struct notifier_block *nb);
15int unregister_die_notifier(struct notifier_block *nb);
16int register_page_fault_notifier(struct notifier_block *nb);
17int unregister_page_fault_notifier(struct notifier_block *nb);
18extern struct atomic_notifier_head shdie_chain;
19 5
20/* Grossly misnamed. */ 6/* Grossly misnamed. */
21enum die_val { 7enum die_val {
@@ -23,14 +9,7 @@ enum die_val {
23 DIE_PAGE_FAULT, 9 DIE_PAGE_FAULT,
24}; 10};
25 11
26static inline int notify_die(enum die_val val, struct pt_regs *regs, 12int register_page_fault_notifier(struct notifier_block *nb);
27 int trap, int sig) 13int unregister_page_fault_notifier(struct notifier_block *nb);
28{
29 struct die_args args = {
30 .regs = regs,
31 .trapnr = trap,
32 };
33 14
34 return atomic_notifier_call_chain(&shdie_chain, val, &args);
35}
36#endif /* __ASM_SH_KDEBUG_H */ 15#endif /* __ASM_SH_KDEBUG_H */
diff --git a/include/asm-sh/pgalloc.h b/include/asm-sh/pgalloc.h
index 888e4529e6fe..18b613c57cf5 100644
--- a/include/asm-sh/pgalloc.h
+++ b/include/asm-sh/pgalloc.h
@@ -1,6 +1,12 @@
1#ifndef __ASM_SH_PGALLOC_H 1#ifndef __ASM_SH_PGALLOC_H
2#define __ASM_SH_PGALLOC_H 2#define __ASM_SH_PGALLOC_H
3 3
4#include <linux/quicklist.h>
5#include <asm/page.h>
6
7#define QUICK_PGD 0 /* We preserve special mappings over free */
8#define QUICK_PT 1 /* Other page table pages that are zero on free */
9
4static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd, 10static inline void pmd_populate_kernel(struct mm_struct *mm, pmd_t *pmd,
5 pte_t *pte) 11 pte_t *pte)
6{ 12{
@@ -13,48 +19,49 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd,
13 set_pmd(pmd, __pmd((unsigned long)page_address(pte))); 19 set_pmd(pmd, __pmd((unsigned long)page_address(pte)));
14} 20}
15 21
22static inline void pgd_ctor(void *x)
23{
24 pgd_t *pgd = x;
25
26 memcpy(pgd + USER_PTRS_PER_PGD,
27 swapper_pg_dir + USER_PTRS_PER_PGD,
28 (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t));
29}
30
16/* 31/*
17 * Allocate and free page tables. 32 * Allocate and free page tables.
18 */ 33 */
19static inline pgd_t *pgd_alloc(struct mm_struct *mm) 34static inline pgd_t *pgd_alloc(struct mm_struct *mm)
20{ 35{
21 pgd_t *pgd = (pgd_t *)__get_free_page(GFP_KERNEL | __GFP_REPEAT); 36 return quicklist_alloc(QUICK_PGD, GFP_KERNEL | __GFP_REPEAT, pgd_ctor);
22
23 if (pgd) {
24 memset(pgd, 0, USER_PTRS_PER_PGD * sizeof(pgd_t));
25 memcpy(pgd + USER_PTRS_PER_PGD,
26 swapper_pg_dir + USER_PTRS_PER_PGD,
27 (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t));
28 }
29
30 return pgd;
31} 37}
32 38
33static inline void pgd_free(pgd_t *pgd) 39static inline void pgd_free(pgd_t *pgd)
34{ 40{
35 free_page((unsigned long)pgd); 41 quicklist_free(QUICK_PGD, NULL, pgd);
36} 42}
37 43
38static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, 44static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm,
39 unsigned long address) 45 unsigned long address)
40{ 46{
41 return (pte_t *)__get_free_page(GFP_KERNEL | __GFP_REPEAT | __GFP_ZERO); 47 return quicklist_alloc(QUICK_PT, GFP_KERNEL | __GFP_REPEAT, NULL);
42} 48}
43 49
44static inline struct page *pte_alloc_one(struct mm_struct *mm, 50static inline struct page *pte_alloc_one(struct mm_struct *mm,
45 unsigned long address) 51 unsigned long address)
46{ 52{
47 return alloc_page(GFP_KERNEL | __GFP_REPEAT | __GFP_ZERO); 53 void *pg = quicklist_alloc(QUICK_PT, GFP_KERNEL | __GFP_REPEAT, NULL);
54 return pg ? virt_to_page(pg) : NULL;
48} 55}
49 56
50static inline void pte_free_kernel(pte_t *pte) 57static inline void pte_free_kernel(pte_t *pte)
51{ 58{
52 free_page((unsigned long)pte); 59 quicklist_free(QUICK_PT, NULL, pte);
53} 60}
54 61
55static inline void pte_free(struct page *pte) 62static inline void pte_free(struct page *pte)
56{ 63{
57 __free_page(pte); 64 quicklist_free_page(QUICK_PT, NULL, pte);
58} 65}
59 66
60#define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte)) 67#define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte))
@@ -66,6 +73,11 @@ static inline void pte_free(struct page *pte)
66 73
67#define pmd_free(x) do { } while (0) 74#define pmd_free(x) do { } while (0)
68#define __pmd_free_tlb(tlb,x) do { } while (0) 75#define __pmd_free_tlb(tlb,x) do { } while (0)
69#define check_pgt_cache() do { } while (0) 76
77static inline void check_pgt_cache(void)
78{
79 quicklist_trim(QUICK_PGD, NULL, 25, 16);
80 quicklist_trim(QUICK_PT, NULL, 25, 16);
81}
70 82
71#endif /* __ASM_SH_PGALLOC_H */ 83#endif /* __ASM_SH_PGALLOC_H */
diff --git a/include/asm-sh/snapgear.h b/include/asm-sh/snapgear.h
index 6b5e4ddc073a..2d712e72c9e5 100644
--- a/include/asm-sh/snapgear.h
+++ b/include/asm-sh/snapgear.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * include/asm-sh/snapgear/io.h 2 * include/asm-sh/snapgear.h
3 * 3 *
4 * Modified version of io_se.h for the snapgear-specific functions. 4 * Modified version of io_se.h for the snapgear-specific functions.
5 * 5 *
diff --git a/include/asm-sh/system.h b/include/asm-sh/system.h
index e7e96ee0c8a5..82f3e229e621 100644
--- a/include/asm-sh/system.h
+++ b/include/asm-sh/system.h
@@ -255,6 +255,15 @@ static inline void *set_exception_table_evt(unsigned int evt, void *handler)
255 return set_exception_table_vec(evt >> 5, handler); 255 return set_exception_table_vec(evt >> 5, handler);
256} 256}
257 257
258/*
259 * SH-2A has both 16 and 32-bit opcodes, do lame encoding checks.
260 */
261#ifdef CONFIG_CPU_SH2A
262extern unsigned int instruction_size(unsigned int insn);
263#else
264#define instruction_size(insn) (2)
265#endif
266
258/* XXX 267/* XXX
259 * disable hlt during certain critical i/o operations 268 * disable hlt during certain critical i/o operations
260 */ 269 */
diff --git a/include/asm-sh/timer.h b/include/asm-sh/timer.h
index 17b5e76a4c31..701ba84c7049 100644
--- a/include/asm-sh/timer.h
+++ b/include/asm-sh/timer.h
@@ -2,12 +2,14 @@
2#define __ASM_SH_TIMER_H 2#define __ASM_SH_TIMER_H
3 3
4#include <linux/sysdev.h> 4#include <linux/sysdev.h>
5#include <linux/clocksource.h>
5#include <asm/cpu/timer.h> 6#include <asm/cpu/timer.h>
6 7
7struct sys_timer_ops { 8struct sys_timer_ops {
8 int (*init)(void); 9 int (*init)(void);
9 int (*start)(void); 10 int (*start)(void);
10 int (*stop)(void); 11 int (*stop)(void);
12 cycle_t (*read)(void);
11#ifndef CONFIG_GENERIC_TIME 13#ifndef CONFIG_GENERIC_TIME
12 unsigned long (*get_offset)(void); 14 unsigned long (*get_offset)(void);
13#endif 15#endif
@@ -18,29 +20,8 @@ struct sys_timer {
18 20
19 struct sys_device dev; 21 struct sys_device dev;
20 struct sys_timer_ops *ops; 22 struct sys_timer_ops *ops;
21
22#ifdef CONFIG_NO_IDLE_HZ
23 struct dyn_tick_timer *dyn_tick;
24#endif
25}; 23};
26 24
27#ifdef CONFIG_NO_IDLE_HZ
28#define DYN_TICK_ENABLED (1 << 1)
29
30struct dyn_tick_timer {
31 spinlock_t lock;
32 unsigned int state; /* Current state */
33 int (*enable)(void); /* Enables dynamic tick */
34 int (*disable)(void); /* Disables dynamic tick */
35 void (*reprogram)(unsigned long); /* Reprograms the timer */
36 int (*handler)(int, void *);
37};
38
39void timer_dyn_reprogram(void);
40#else
41#define timer_dyn_reprogram() do { } while (0)
42#endif
43
44#define TICK_SIZE (tick_nsec / 1000) 25#define TICK_SIZE (tick_nsec / 1000)
45 26
46extern struct sys_timer tmu_timer, cmt_timer, mtu2_timer; 27extern struct sys_timer tmu_timer, cmt_timer, mtu2_timer;
@@ -58,5 +39,7 @@ struct sys_timer *get_sys_timer(void);
58 39
59/* arch/sh/kernel/time.c */ 40/* arch/sh/kernel/time.c */
60void handle_timer_tick(void); 41void handle_timer_tick(void);
42extern unsigned long sh_hpt_frequency;
43extern struct clocksource clocksource_sh;
61 44
62#endif /* __ASM_SH_TIMER_H */ 45#endif /* __ASM_SH_TIMER_H */
diff --git a/include/asm-sh/unistd.h b/include/asm-sh/unistd.h
index 49be50a36b77..af71e379a5ee 100644
--- a/include/asm-sh/unistd.h
+++ b/include/asm-sh/unistd.h
@@ -85,7 +85,7 @@
85#define __NR_sigpending 73 85#define __NR_sigpending 73
86#define __NR_sethostname 74 86#define __NR_sethostname 74
87#define __NR_setrlimit 75 87#define __NR_setrlimit 75
88#define __NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */ 88#define __NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */
89#define __NR_getrusage 77 89#define __NR_getrusage 77
90#define __NR_gettimeofday 78 90#define __NR_gettimeofday 78
91#define __NR_settimeofday 79 91#define __NR_settimeofday 79
@@ -328,8 +328,9 @@
328#define __NR_move_pages 317 328#define __NR_move_pages 317
329#define __NR_getcpu 318 329#define __NR_getcpu 318
330#define __NR_epoll_pwait 319 330#define __NR_epoll_pwait 319
331#define __NR_utimensat 320
331 332
332#define NR_syscalls 320 333#define NR_syscalls 321
333 334
334#ifdef __KERNEL__ 335#ifdef __KERNEL__
335 336
diff --git a/include/asm-sparc/smp.h b/include/asm-sparc/smp.h
index b9da9a600e35..b3f492208fd2 100644
--- a/include/asm-sparc/smp.h
+++ b/include/asm-sparc/smp.h
@@ -165,6 +165,7 @@ void smp_setup_cpu_possible_map(void);
165 165
166#else /* SMP */ 166#else /* SMP */
167 167
168#define hard_smp_processor_id() 0
168#define smp_setup_cpu_possible_map() do { } while (0) 169#define smp_setup_cpu_possible_map() do { } while (0)
169 170
170#endif /* !(SMP) */ 171#endif /* !(SMP) */
diff --git a/include/asm-sparc64/smp.h b/include/asm-sparc64/smp.h
index cca54804b722..869d16fb907b 100644
--- a/include/asm-sparc64/smp.h
+++ b/include/asm-sparc64/smp.h
@@ -48,6 +48,7 @@ extern unsigned char boot_cpu_id;
48 48
49#else 49#else
50 50
51#define hard_smp_processor_id() 0
51#define smp_setup_cpu_possible_map() do { } while (0) 52#define smp_setup_cpu_possible_map() do { } while (0)
52#define boot_cpu_id (0) 53#define boot_cpu_id (0)
53 54
diff --git a/include/asm-um/required-features.h b/include/asm-um/required-features.h
new file mode 100644
index 000000000000..dfb967b2d2f3
--- /dev/null
+++ b/include/asm-um/required-features.h
@@ -0,0 +1,9 @@
1#ifndef __UM_REQUIRED_FEATURES_H
2#define __UM_REQUIRED_FEATURES_H
3
4/*
5 * Nothing to see, just need something for the i386 and x86_64 asm
6 * headers to include.
7 */
8
9#endif
diff --git a/include/asm-um/smp.h b/include/asm-um/smp.h
index ca552261ed1f..84f8cf29324e 100644
--- a/include/asm-um/smp.h
+++ b/include/asm-um/smp.h
@@ -24,6 +24,10 @@ extern inline void smp_cpus_done(unsigned int maxcpus)
24 24
25extern struct task_struct *idle_threads[NR_CPUS]; 25extern struct task_struct *idle_threads[NR_CPUS];
26 26
27#else
28
29#define hard_smp_processor_id() 0
30
27#endif 31#endif
28 32
29#endif 33#endif
diff --git a/include/asm-x86_64/smp.h b/include/asm-x86_64/smp.h
index d5704421456b..3f303d2365ed 100644
--- a/include/asm-x86_64/smp.h
+++ b/include/asm-x86_64/smp.h
@@ -57,12 +57,6 @@ static inline int num_booting_cpus(void)
57 57
58#define raw_smp_processor_id() read_pda(cpunumber) 58#define raw_smp_processor_id() read_pda(cpunumber)
59 59
60static inline int hard_smp_processor_id(void)
61{
62 /* we don't want to mark this access volatile - bad code generation */
63 return GET_APIC_ID(*(unsigned int *)(APIC_BASE+APIC_ID));
64}
65
66extern int __cpu_disable(void); 60extern int __cpu_disable(void);
67extern void __cpu_die(unsigned int cpu); 61extern void __cpu_die(unsigned int cpu);
68extern void prefill_possible_map(void); 62extern void prefill_possible_map(void);
@@ -71,7 +65,13 @@ extern unsigned __cpuinitdata disabled_cpus;
71 65
72#define NO_PROC_ID 0xFF /* No processor magic marker */ 66#define NO_PROC_ID 0xFF /* No processor magic marker */
73 67
74#endif 68#endif /* CONFIG_SMP */
69
70static inline int hard_smp_processor_id(void)
71{
72 /* we don't want to mark this access volatile - bad code generation */
73 return GET_APIC_ID(*(unsigned int *)(APIC_BASE+APIC_ID));
74}
75 75
76/* 76/*
77 * Some lowlevel functions might want to know about 77 * Some lowlevel functions might want to know about
diff --git a/include/asm-x86_64/system.h b/include/asm-x86_64/system.h
index b7b8021e8c43..ead9f9a56234 100644
--- a/include/asm-x86_64/system.h
+++ b/include/asm-x86_64/system.h
@@ -39,7 +39,7 @@
39 [threadrsp] "i" (offsetof(struct task_struct, thread.rsp)), \ 39 [threadrsp] "i" (offsetof(struct task_struct, thread.rsp)), \
40 [ti_flags] "i" (offsetof(struct thread_info, flags)),\ 40 [ti_flags] "i" (offsetof(struct thread_info, flags)),\
41 [tif_fork] "i" (TIF_FORK), \ 41 [tif_fork] "i" (TIF_FORK), \
42 [thread_info] "i" (offsetof(struct task_struct, thread_info)), \ 42 [thread_info] "i" (offsetof(struct task_struct, stack)), \
43 [pda_pcurrent] "i" (offsetof(struct x8664_pda, pcurrent)) \ 43 [pda_pcurrent] "i" (offsetof(struct x8664_pda, pcurrent)) \
44 : "memory", "cc" __EXTRA_CLOBBER) 44 : "memory", "cc" __EXTRA_CLOBBER)
45 45
diff --git a/include/asm-x86_64/thread_info.h b/include/asm-x86_64/thread_info.h
index 74a6c74397f7..10bb5a8ed688 100644
--- a/include/asm-x86_64/thread_info.h
+++ b/include/asm-x86_64/thread_info.h
@@ -162,7 +162,7 @@ static inline struct thread_info *stack_thread_info(void)
162#define TS_COMPAT 0x0002 /* 32bit syscall active */ 162#define TS_COMPAT 0x0002 /* 32bit syscall active */
163#define TS_POLLING 0x0004 /* true if in idle loop and not sleeping */ 163#define TS_POLLING 0x0004 /* true if in idle loop and not sleeping */
164 164
165#define tsk_is_polling(t) ((t)->thread_info->status & TS_POLLING) 165#define tsk_is_polling(t) (task_thread_info(t)->status & TS_POLLING)
166 166
167#endif /* __KERNEL__ */ 167#endif /* __KERNEL__ */
168 168
diff --git a/include/asm-xtensa/platform-iss/simcall.h b/include/asm-xtensa/platform-iss/simcall.h
index 6acb572759a6..b7952c06a2b7 100644
--- a/include/asm-xtensa/platform-iss/simcall.h
+++ b/include/asm-xtensa/platform-iss/simcall.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * include/asm-xtensa/platform-iss/hardware.h 2 * include/asm-xtensa/platform-iss/simcall.h
3 * 3 *
4 * This file is subject to the terms and conditions of the GNU General Public 4 * This file is subject to the terms and conditions of the GNU General Public
5 * License. See the file "COPYING" in the main directory of this archive 5 * License. See the file "COPYING" in the main directory of this archive
diff --git a/include/linux/aio.h b/include/linux/aio.h
index a30ef13c9e62..43dc2ebfaa0e 100644
--- a/include/linux/aio.h
+++ b/include/linux/aio.h
@@ -226,7 +226,8 @@ int FASTCALL(io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb,
226 __put_ioctx(kioctx); \ 226 __put_ioctx(kioctx); \
227} while (0) 227} while (0)
228 228
229#define in_aio() !is_sync_wait(current->io_wait) 229#define in_aio() (unlikely(!is_sync_wait(current->io_wait)))
230
230/* may be used for debugging */ 231/* may be used for debugging */
231#define warn_if_async() \ 232#define warn_if_async() \
232do { \ 233do { \
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index a686eabe22d6..db5b00a792f5 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -854,7 +854,7 @@ static inline void put_dev_sector(Sector p)
854 854
855struct work_struct; 855struct work_struct;
856int kblockd_schedule_work(struct work_struct *work); 856int kblockd_schedule_work(struct work_struct *work);
857void kblockd_flush(void); 857void kblockd_flush_work(struct work_struct *work);
858 858
859#define MODULE_ALIAS_BLOCKDEV(major,minor) \ 859#define MODULE_ALIAS_BLOCKDEV(major,minor) \
860 MODULE_ALIAS("block-major-" __stringify(major) "-" __stringify(minor)) 860 MODULE_ALIAS("block-major-" __stringify(major) "-" __stringify(minor))
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index 2665ca04cf8f..bf297b03a4e4 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -49,6 +49,7 @@ struct clocksource;
49 * @shift: cycle to nanosecond divisor (power of two) 49 * @shift: cycle to nanosecond divisor (power of two)
50 * @flags: flags describing special properties 50 * @flags: flags describing special properties
51 * @vread: vsyscall based read 51 * @vread: vsyscall based read
52 * @resume: resume function for the clocksource, if necessary
52 * @cycle_interval: Used internally by timekeeping core, please ignore. 53 * @cycle_interval: Used internally by timekeeping core, please ignore.
53 * @xtime_interval: Used internally by timekeeping core, please ignore. 54 * @xtime_interval: Used internally by timekeeping core, please ignore.
54 */ 55 */
@@ -65,6 +66,7 @@ struct clocksource {
65 u32 shift; 66 u32 shift;
66 unsigned long flags; 67 unsigned long flags;
67 cycle_t (*vread)(void); 68 cycle_t (*vread)(void);
69 void (*resume)(void);
68 70
69 /* timekeeping specific data, ignore */ 71 /* timekeeping specific data, ignore */
70 cycle_t cycle_interval; 72 cycle_t cycle_interval;
@@ -209,6 +211,7 @@ static inline void clocksource_calculate_interval(struct clocksource *c,
209extern int clocksource_register(struct clocksource*); 211extern int clocksource_register(struct clocksource*);
210extern struct clocksource* clocksource_get_next(void); 212extern struct clocksource* clocksource_get_next(void);
211extern void clocksource_change_rating(struct clocksource *cs, int rating); 213extern void clocksource_change_rating(struct clocksource *cs, int rating);
214extern void clocksource_resume(void);
212 215
213#ifdef CONFIG_GENERIC_TIME_VSYSCALL 216#ifdef CONFIG_GENERIC_TIME_VSYSCALL
214extern void update_vsyscall(struct timespec *ts, struct clocksource *c); 217extern void update_vsyscall(struct timespec *ts, struct clocksource *c);
diff --git a/include/linux/compat.h b/include/linux/compat.h
index ccd863dd77fa..70a157a130bb 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -253,5 +253,8 @@ asmlinkage long compat_sys_epoll_pwait(int epfd,
253 const compat_sigset_t __user *sigmask, 253 const compat_sigset_t __user *sigmask,
254 compat_size_t sigsetsize); 254 compat_size_t sigsetsize);
255 255
256asmlinkage long compat_sys_utimensat(unsigned int dfd, char __user *filename,
257 struct compat_timespec __user *t, int flags);
258
256#endif /* CONFIG_COMPAT */ 259#endif /* CONFIG_COMPAT */
257#endif /* _LINUX_COMPAT_H */ 260#endif /* _LINUX_COMPAT_H */
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index a9f794716a81..03ec2311fb29 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -40,3 +40,4 @@
40#define noinline __attribute__((noinline)) 40#define noinline __attribute__((noinline))
41#define __attribute_pure__ __attribute__((pure)) 41#define __attribute_pure__ __attribute__((pure))
42#define __attribute_const__ __attribute__((__const__)) 42#define __attribute_const__ __attribute__((__const__))
43#define __maybe_unused __attribute__((unused))
diff --git a/include/linux/compiler-gcc3.h b/include/linux/compiler-gcc3.h
index ecd621fd27d2..a9e2863c2dbf 100644
--- a/include/linux/compiler-gcc3.h
+++ b/include/linux/compiler-gcc3.h
@@ -4,9 +4,11 @@
4#include <linux/compiler-gcc.h> 4#include <linux/compiler-gcc.h>
5 5
6#if __GNUC_MINOR__ >= 3 6#if __GNUC_MINOR__ >= 3
7# define __attribute_used__ __attribute__((__used__)) 7# define __used __attribute__((__used__))
8# define __attribute_used__ __used /* deprecated */
8#else 9#else
9# define __attribute_used__ __attribute__((__unused__)) 10# define __used __attribute__((__unused__))
11# define __attribute_used__ __used /* deprecated */
10#endif 12#endif
11 13
12#if __GNUC_MINOR__ >= 4 14#if __GNUC_MINOR__ >= 4
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h
index fd0cc7c4a636..a03e9398a6c2 100644
--- a/include/linux/compiler-gcc4.h
+++ b/include/linux/compiler-gcc4.h
@@ -12,7 +12,8 @@
12# define __inline __inline __attribute__((always_inline)) 12# define __inline __inline __attribute__((always_inline))
13#endif 13#endif
14 14
15#define __attribute_used__ __attribute__((__used__)) 15#define __used __attribute__((__used__))
16#define __attribute_used__ __used /* deprecated */
16#define __must_check __attribute__((warn_unused_result)) 17#define __must_check __attribute__((warn_unused_result))
17#define __compiler_offsetof(a,b) __builtin_offsetof(a,b) 18#define __compiler_offsetof(a,b) __builtin_offsetof(a,b)
18#define __always_inline inline __attribute__((always_inline)) 19#define __always_inline inline __attribute__((always_inline))
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 3b6949b41745..498c35920762 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -108,15 +108,30 @@ extern void __chk_io_ptr(const void __iomem *);
108 * Allow us to avoid 'defined but not used' warnings on functions and data, 108 * Allow us to avoid 'defined but not used' warnings on functions and data,
109 * as well as force them to be emitted to the assembly file. 109 * as well as force them to be emitted to the assembly file.
110 * 110 *
111 * As of gcc 3.3, static functions that are not marked with attribute((used)) 111 * As of gcc 3.4, static functions that are not marked with attribute((used))
112 * may be elided from the assembly file. As of gcc 3.3, static data not so 112 * may be elided from the assembly file. As of gcc 3.4, static data not so
113 * marked will not be elided, but this may change in a future gcc version. 113 * marked will not be elided, but this may change in a future gcc version.
114 * 114 *
115 * NOTE: Because distributions shipped with a backported unit-at-a-time
116 * compiler in gcc 3.3, we must define __used to be __attribute__((used))
117 * for gcc >=3.3 instead of 3.4.
118 *
115 * In prior versions of gcc, such functions and data would be emitted, but 119 * In prior versions of gcc, such functions and data would be emitted, but
116 * would be warned about except with attribute((unused)). 120 * would be warned about except with attribute((unused)).
121 *
122 * Mark functions that are referenced only in inline assembly as __used so
123 * the code is emitted even though it appears to be unreferenced.
117 */ 124 */
118#ifndef __attribute_used__ 125#ifndef __attribute_used__
119# define __attribute_used__ /* unimplemented */ 126# define __attribute_used__ /* deprecated */
127#endif
128
129#ifndef __used
130# define __used /* unimplemented */
131#endif
132
133#ifndef __maybe_unused
134# define __maybe_unused /* unimplemented */
120#endif 135#endif
121 136
122/* 137/*
diff --git a/include/linux/ext3_fs_i.h b/include/linux/ext3_fs_i.h
index 4395e5206746..7894dd0f3b77 100644
--- a/include/linux/ext3_fs_i.h
+++ b/include/linux/ext3_fs_i.h
@@ -54,7 +54,7 @@ struct ext3_block_alloc_info {
54 /* 54 /*
55 * Was i_next_alloc_goal in ext3_inode_info 55 * Was i_next_alloc_goal in ext3_inode_info
56 * is the *physical* companion to i_next_alloc_block. 56 * is the *physical* companion to i_next_alloc_block.
57 * it the the physical block number of the block which was most-recentl 57 * it the physical block number of the block which was most-recentl
58 * allocated to this file. This give us the goal (target) for the next 58 * allocated to this file. This give us the goal (target) for the next
59 * allocation when we detect linearly ascending requests. 59 * allocation when we detect linearly ascending requests.
60 */ 60 */
diff --git a/include/linux/ext4_fs_i.h b/include/linux/ext4_fs_i.h
index bb42379cb7fd..d5b177e5b395 100644
--- a/include/linux/ext4_fs_i.h
+++ b/include/linux/ext4_fs_i.h
@@ -52,7 +52,7 @@ struct ext4_block_alloc_info {
52 /* 52 /*
53 * Was i_next_alloc_goal in ext4_inode_info 53 * Was i_next_alloc_goal in ext4_inode_info
54 * is the *physical* companion to i_next_alloc_block. 54 * is the *physical* companion to i_next_alloc_block.
55 * it the the physical block number of the block which was most-recentl 55 * it the physical block number of the block which was most-recentl
56 * allocated to this file. This give us the goal (target) for the next 56 * allocated to this file. This give us the goal (target) for the next
57 * allocation when we detect linearly ascending requests. 57 * allocation when we detect linearly ascending requests.
58 */ 58 */
diff --git a/include/linux/fb.h b/include/linux/fb.h
index dff7a728948c..c654d0e9ce33 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -868,7 +868,7 @@ struct fb_info {
868#define fb_writeq sbus_writeq 868#define fb_writeq sbus_writeq
869#define fb_memset sbus_memset_io 869#define fb_memset sbus_memset_io
870 870
871#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || (defined(__sh__) && !defined(__SH5__)) || defined(__powerpc__) 871#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || (defined(__sh__) && !defined(__SH5__)) || defined(__powerpc__) || defined(__avr32__)
872 872
873#define fb_readb __raw_readb 873#define fb_readb __raw_readb
874#define fb_readw __raw_readw 874#define fb_readw __raw_readw
diff --git a/include/linux/futex.h b/include/linux/futex.h
index 820125c628c1..899fc7f20edd 100644
--- a/include/linux/futex.h
+++ b/include/linux/futex.h
@@ -3,6 +3,8 @@
3 3
4#include <linux/sched.h> 4#include <linux/sched.h>
5 5
6union ktime;
7
6/* Second argument to futex syscall */ 8/* Second argument to futex syscall */
7 9
8 10
@@ -15,6 +17,19 @@
15#define FUTEX_LOCK_PI 6 17#define FUTEX_LOCK_PI 6
16#define FUTEX_UNLOCK_PI 7 18#define FUTEX_UNLOCK_PI 7
17#define FUTEX_TRYLOCK_PI 8 19#define FUTEX_TRYLOCK_PI 8
20#define FUTEX_CMP_REQUEUE_PI 9
21
22#define FUTEX_PRIVATE_FLAG 128
23#define FUTEX_CMD_MASK ~FUTEX_PRIVATE_FLAG
24
25#define FUTEX_WAIT_PRIVATE (FUTEX_WAIT | FUTEX_PRIVATE_FLAG)
26#define FUTEX_WAKE_PRIVATE (FUTEX_WAKE | FUTEX_PRIVATE_FLAG)
27#define FUTEX_REQUEUE_PRIVATE (FUTEX_REQUEUE | FUTEX_PRIVATE_FLAG)
28#define FUTEX_CMP_REQUEUE_PRIVATE (FUTEX_CMP_REQUEUE | FUTEX_PRIVATE_FLAG)
29#define FUTEX_WAKE_OP_PRIVATE (FUTEX_WAKE_OP | FUTEX_PRIVATE_FLAG)
30#define FUTEX_LOCK_PI_PRIVATE (FUTEX_LOCK_PI | FUTEX_PRIVATE_FLAG)
31#define FUTEX_UNLOCK_PI_PRIVATE (FUTEX_UNLOCK_PI | FUTEX_PRIVATE_FLAG)
32#define FUTEX_TRYLOCK_PI_PRIVATE (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG)
18 33
19/* 34/*
20 * Support for robust futexes: the kernel cleans up held futexes at 35 * Support for robust futexes: the kernel cleans up held futexes at
@@ -83,9 +98,14 @@ struct robust_list_head {
83#define FUTEX_OWNER_DIED 0x40000000 98#define FUTEX_OWNER_DIED 0x40000000
84 99
85/* 100/*
101 * Some processes have been requeued on this PI-futex
102 */
103#define FUTEX_WAITER_REQUEUED 0x20000000
104
105/*
86 * The rest of the robust-futex field is for the TID: 106 * The rest of the robust-futex field is for the TID:
87 */ 107 */
88#define FUTEX_TID_MASK 0x3fffffff 108#define FUTEX_TID_MASK 0x0fffffff
89 109
90/* 110/*
91 * This limit protects against a deliberately circular list. 111 * This limit protects against a deliberately circular list.
@@ -94,7 +114,7 @@ struct robust_list_head {
94#define ROBUST_LIST_LIMIT 2048 114#define ROBUST_LIST_LIMIT 2048
95 115
96#ifdef __KERNEL__ 116#ifdef __KERNEL__
97long do_futex(u32 __user *uaddr, int op, u32 val, unsigned long timeout, 117long do_futex(u32 __user *uaddr, int op, u32 val, union ktime *timeout,
98 u32 __user *uaddr2, u32 val2, u32 val3); 118 u32 __user *uaddr2, u32 val2, u32 val3);
99 119
100extern int 120extern int
@@ -106,9 +126,20 @@ handle_futex_death(u32 __user *uaddr, struct task_struct *curr, int pi);
106 * Don't rearrange members without looking at hash_futex(). 126 * Don't rearrange members without looking at hash_futex().
107 * 127 *
108 * offset is aligned to a multiple of sizeof(u32) (== 4) by definition. 128 * offset is aligned to a multiple of sizeof(u32) (== 4) by definition.
109 * We set bit 0 to indicate if it's an inode-based key. 129 * We use the two low order bits of offset to tell what is the kind of key :
110 */ 130 * 00 : Private process futex (PTHREAD_PROCESS_PRIVATE)
131 * (no reference on an inode or mm)
132 * 01 : Shared futex (PTHREAD_PROCESS_SHARED)
133 * mapped on a file (reference on the underlying inode)
134 * 10 : Shared futex (PTHREAD_PROCESS_SHARED)
135 * (but private mapping on an mm, and reference taken on it)
136*/
137
138#define FUT_OFF_INODE 1 /* We set bit 0 if key has a reference on inode */
139#define FUT_OFF_MMSHARED 2 /* We set bit 1 if key has a reference on mm */
140
111union futex_key { 141union futex_key {
142 u32 __user *uaddr;
112 struct { 143 struct {
113 unsigned long pgoff; 144 unsigned long pgoff;
114 struct inode *inode; 145 struct inode *inode;
@@ -125,7 +156,8 @@ union futex_key {
125 int offset; 156 int offset;
126 } both; 157 } both;
127}; 158};
128int get_futex_key(u32 __user *uaddr, union futex_key *key); 159int get_futex_key(u32 __user *uaddr, struct rw_semaphore *shared,
160 union futex_key *key);
129void get_futex_key_refs(union futex_key *key); 161void get_futex_key_refs(union futex_key *key);
130void drop_futex_key_refs(union futex_key *key); 162void drop_futex_key_refs(union futex_key *key);
131 163
diff --git a/include/linux/generic_acl.h b/include/linux/generic_acl.h
index 80764f40be75..886f5faa08cb 100644
--- a/include/linux/generic_acl.h
+++ b/include/linux/generic_acl.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * fs/generic_acl.c 2 * include/linux/generic_acl.h
3 * 3 *
4 * (C) 2005 Andreas Gruenbacher <agruen@suse.de> 4 * (C) 2005 Andreas Gruenbacher <agruen@suse.de>
5 * 5 *
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index 2c65da7cabb2..f589559cf070 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -413,6 +413,7 @@ char *disk_name (struct gendisk *hd, int part, char *buf);
413extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); 413extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev);
414extern void add_partition(struct gendisk *, int, sector_t, sector_t, int); 414extern void add_partition(struct gendisk *, int, sector_t, sector_t, int);
415extern void delete_partition(struct gendisk *, int); 415extern void delete_partition(struct gendisk *, int);
416extern void printk_all_partitions(void);
416 417
417extern struct gendisk *alloc_disk_node(int minors, int node_id); 418extern struct gendisk *alloc_disk_node(int minors, int node_id);
418extern struct gendisk *alloc_disk(int minors); 419extern struct gendisk *alloc_disk(int minors);
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index 97a36c3d96e2..0d2ef0b082a6 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -176,10 +176,6 @@ extern void FASTCALL(free_cold_page(struct page *page));
176#define free_page(addr) free_pages((addr),0) 176#define free_page(addr) free_pages((addr),0)
177 177
178void page_alloc_init(void); 178void page_alloc_init(void);
179#ifdef CONFIG_NUMA 179void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp);
180void drain_node_pages(int node);
181#else
182static inline void drain_node_pages(int node) { };
183#endif
184 180
185#endif /* __LINUX_GFP_H */ 181#endif /* __LINUX_GFP_H */
diff --git a/include/linux/highmem.h b/include/linux/highmem.h
index a515eb0afdfb..98e2cce996a4 100644
--- a/include/linux/highmem.h
+++ b/include/linux/highmem.h
@@ -94,17 +94,26 @@ static inline void clear_highpage(struct page *page)
94 94
95/* 95/*
96 * Same but also flushes aliased cache contents to RAM. 96 * Same but also flushes aliased cache contents to RAM.
97 *
98 * This must be a macro because KM_USER0 and friends aren't defined if
99 * !CONFIG_HIGHMEM
97 */ 100 */
98static inline void memclear_highpage_flush(struct page *page, unsigned int offset, unsigned int size) 101#define zero_user_page(page, offset, size, km_type) \
102 do { \
103 void *kaddr; \
104 \
105 BUG_ON((offset) + (size) > PAGE_SIZE); \
106 \
107 kaddr = kmap_atomic(page, km_type); \
108 memset((char *)kaddr + (offset), 0, (size)); \
109 flush_dcache_page(page); \
110 kunmap_atomic(kaddr, (km_type)); \
111 } while (0)
112
113static inline void __deprecated memclear_highpage_flush(struct page *page,
114 unsigned int offset, unsigned int size)
99{ 115{
100 void *kaddr; 116 zero_user_page(page, offset, size, KM_USER0);
101
102 BUG_ON(offset + size > PAGE_SIZE);
103
104 kaddr = kmap_atomic(page, KM_USER0);
105 memset((char *)kaddr + offset, 0, size);
106 flush_dcache_page(page);
107 kunmap_atomic(kaddr, KM_USER0);
108} 117}
109 118
110#ifndef __HAVE_ARCH_COPY_USER_HIGHPAGE 119#ifndef __HAVE_ARCH_COPY_USER_HIGHPAGE
diff --git a/include/linux/i2c-algo-bit.h b/include/linux/i2c-algo-bit.h
index 9ee0f800592f..111334f5b922 100644
--- a/include/linux/i2c-algo-bit.h
+++ b/include/linux/i2c-algo-bit.h
@@ -18,7 +18,7 @@
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
19/* ------------------------------------------------------------------------- */ 19/* ------------------------------------------------------------------------- */
20 20
21/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even 21/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even
22 Frodo Looijaard <frodol@dds.nl> */ 22 Frodo Looijaard <frodol@dds.nl> */
23 23
24#ifndef _LINUX_I2C_ALGO_BIT_H 24#ifndef _LINUX_I2C_ALGO_BIT_H
diff --git a/include/linux/i2c-algo-pcf.h b/include/linux/i2c-algo-pcf.h
index 994eb86f882c..77afbb60fd11 100644
--- a/include/linux/i2c-algo-pcf.h
+++ b/include/linux/i2c-algo-pcf.h
@@ -19,7 +19,7 @@
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
20/* ------------------------------------------------------------------------- */ 20/* ------------------------------------------------------------------------- */
21 21
22/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even 22/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even
23 Frodo Looijaard <frodol@dds.nl> */ 23 Frodo Looijaard <frodol@dds.nl> */
24 24
25#ifndef _LINUX_I2C_ALGO_PCF_H 25#ifndef _LINUX_I2C_ALGO_PCF_H
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 418dfb5adadd..df4e6a510310 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -223,8 +223,9 @@ typedef struct hw_regs_s {
223/* 223/*
224 * Register new hardware with ide 224 * Register new hardware with ide
225 */ 225 */
226int ide_register_hw(hw_regs_t *hw, struct hwif_s **hwifp); 226int ide_register_hw(hw_regs_t *, int, struct hwif_s **);
227int ide_register_hw_with_fixup(hw_regs_t *, struct hwif_s **, void (*)(struct hwif_s *)); 227int ide_register_hw_with_fixup(hw_regs_t *, int, struct hwif_s **,
228 void (*)(struct hwif_s *));
228 229
229/* 230/*
230 * Set up hw_regs_t structure before calling ide_register_hw (optional) 231 * Set up hw_regs_t structure before calling ide_register_hw (optional)
@@ -559,9 +560,10 @@ typedef struct ide_drive_s {
559 struct ide_drive_s *next; /* circular list of hwgroup drives */ 560 struct ide_drive_s *next; /* circular list of hwgroup drives */
560 void *driver_data; /* extra driver data */ 561 void *driver_data; /* extra driver data */
561 struct hd_driveid *id; /* drive model identification info */ 562 struct hd_driveid *id; /* drive model identification info */
563#ifdef CONFIG_IDE_PROC_FS
562 struct proc_dir_entry *proc; /* /proc/ide/ directory entry */ 564 struct proc_dir_entry *proc; /* /proc/ide/ directory entry */
563 struct ide_settings_s *settings;/* /proc/ide/ drive settings */ 565 struct ide_settings_s *settings;/* /proc/ide/ drive settings */
564 566#endif
565 struct hwif_s *hwif; /* actually (ide_hwif_t *) */ 567 struct hwif_s *hwif; /* actually (ide_hwif_t *) */
566 568
567 unsigned long sleep; /* sleep until this time */ 569 unsigned long sleep; /* sleep until this time */
@@ -601,16 +603,12 @@ typedef struct ide_drive_s {
601 unsigned remap_0_to_1 : 1; /* 0=noremap, 1=remap 0->1 (for EZDrive) */ 603 unsigned remap_0_to_1 : 1; /* 0=noremap, 1=remap 0->1 (for EZDrive) */
602 unsigned blocked : 1; /* 1=powermanagment told us not to do anything, so sleep nicely */ 604 unsigned blocked : 1; /* 1=powermanagment told us not to do anything, so sleep nicely */
603 unsigned vdma : 1; /* 1=doing PIO over DMA 0=doing normal DMA */ 605 unsigned vdma : 1; /* 1=doing PIO over DMA 0=doing normal DMA */
604 unsigned addressing; /* : 3;
605 * 0=28-bit
606 * 1=48-bit
607 * 2=48-bit doing 28-bit
608 * 3=64-bit
609 */
610 unsigned scsi : 1; /* 0=default, 1=ide-scsi emulation */ 606 unsigned scsi : 1; /* 0=default, 1=ide-scsi emulation */
611 unsigned sleeping : 1; /* 1=sleeping & sleep field valid */ 607 unsigned sleeping : 1; /* 1=sleeping & sleep field valid */
612 unsigned post_reset : 1; 608 unsigned post_reset : 1;
609 unsigned udma33_warned : 1;
613 610
611 u8 addressing; /* 0=28-bit, 1=48-bit, 2=48-bit doing 28-bit */
614 u8 quirk_list; /* considered quirky, set for a specific host */ 612 u8 quirk_list; /* considered quirky, set for a specific host */
615 u8 init_speed; /* transfer rate set at boot */ 613 u8 init_speed; /* transfer rate set at boot */
616 u8 current_speed; /* current transfer rate set */ 614 u8 current_speed; /* current transfer rate set */
@@ -717,11 +715,8 @@ typedef struct hwif_s {
717 int (*quirkproc)(ide_drive_t *); 715 int (*quirkproc)(ide_drive_t *);
718 /* driver soft-power interface */ 716 /* driver soft-power interface */
719 int (*busproc)(ide_drive_t *, int); 717 int (*busproc)(ide_drive_t *, int);
720// /* host rate limiter */
721// u8 (*ratemask)(ide_drive_t *);
722// /* device rate limiter */
723// u8 (*ratefilter)(ide_drive_t *, u8);
724#endif 718#endif
719 u8 (*udma_filter)(ide_drive_t *);
725 720
726 void (*ata_input_data)(ide_drive_t *, void *, u32); 721 void (*ata_input_data)(ide_drive_t *, void *, u32);
727 void (*ata_output_data)(ide_drive_t *, void *, u32); 722 void (*ata_output_data)(ide_drive_t *, void *, u32);
@@ -866,16 +861,22 @@ typedef struct hwgroup_s {
866 unsigned char cmd_buf[4]; 861 unsigned char cmd_buf[4];
867} ide_hwgroup_t; 862} ide_hwgroup_t;
868 863
869/* structure attached to the request for IDE_TASK_CMDS */ 864typedef struct ide_driver_s ide_driver_t;
865
866extern struct semaphore ide_setting_sem;
867
868int set_io_32bit(ide_drive_t *, int);
869int set_pio_mode(ide_drive_t *, int);
870int set_using_dma(ide_drive_t *, int);
870 871
872#ifdef CONFIG_IDE_PROC_FS
871/* 873/*
872 * configurable drive settings 874 * configurable drive settings
873 */ 875 */
874 876
875#define TYPE_INT 0 877#define TYPE_INT 0
876#define TYPE_INTA 1 878#define TYPE_BYTE 1
877#define TYPE_BYTE 2 879#define TYPE_SHORT 2
878#define TYPE_SHORT 3
879 880
880#define SETTING_READ (1 << 0) 881#define SETTING_READ (1 << 0)
881#define SETTING_WRITE (1 << 1) 882#define SETTING_WRITE (1 << 1)
@@ -885,8 +886,6 @@ typedef int (ide_procset_t)(ide_drive_t *, int);
885typedef struct ide_settings_s { 886typedef struct ide_settings_s {
886 char *name; 887 char *name;
887 int rw; 888 int rw;
888 int read_ioctl;
889 int write_ioctl;
890 int data_type; 889 int data_type;
891 int min; 890 int min;
892 int max; 891 int max;
@@ -898,12 +897,7 @@ typedef struct ide_settings_s {
898 struct ide_settings_s *next; 897 struct ide_settings_s *next;
899} ide_settings_t; 898} ide_settings_t;
900 899
901extern struct semaphore ide_setting_sem; 900int ide_add_setting(ide_drive_t *, const char *, int, int, int, int, int, int, void *, ide_procset_t *set);
902extern int ide_add_setting(ide_drive_t *drive, const char *name, int rw, int read_ioctl, int write_ioctl, int data_type, int min, int max, int mul_factor, int div_factor, void *data, ide_procset_t *set);
903extern ide_settings_t *ide_find_setting_by_name(ide_drive_t *drive, char *name);
904extern int ide_read_setting(ide_drive_t *t, ide_settings_t *setting);
905extern int ide_write_setting(ide_drive_t *drive, ide_settings_t *setting, int val);
906extern void ide_add_generic_settings(ide_drive_t *drive);
907 901
908/* 902/*
909 * /proc/ide interface 903 * /proc/ide interface
@@ -915,15 +909,15 @@ typedef struct {
915 write_proc_t *write_proc; 909 write_proc_t *write_proc;
916} ide_proc_entry_t; 910} ide_proc_entry_t;
917 911
918#ifdef CONFIG_PROC_FS 912void proc_ide_create(void);
919extern struct proc_dir_entry *proc_ide_root; 913void proc_ide_destroy(void);
914void ide_proc_register_port(ide_hwif_t *);
915void ide_proc_unregister_port(ide_hwif_t *);
916void ide_proc_register_driver(ide_drive_t *, ide_driver_t *);
917void ide_proc_unregister_driver(ide_drive_t *, ide_driver_t *);
918
919void ide_add_generic_settings(ide_drive_t *);
920 920
921extern void proc_ide_create(void);
922extern void proc_ide_destroy(void);
923extern void create_proc_ide_interfaces(void);
924void destroy_proc_ide_interface(ide_hwif_t *);
925extern void ide_add_proc_entries(struct proc_dir_entry *, ide_proc_entry_t *, void *);
926extern void ide_remove_proc_entries(struct proc_dir_entry *, ide_proc_entry_t *);
927read_proc_t proc_ide_read_capacity; 921read_proc_t proc_ide_read_capacity;
928read_proc_t proc_ide_read_geometry; 922read_proc_t proc_ide_read_geometry;
929 923
@@ -947,8 +941,13 @@ void ide_pci_create_host_proc(const char *, get_info_t *);
947 return len; \ 941 return len; \
948} 942}
949#else 943#else
950static inline void create_proc_ide_interfaces(void) { ; } 944static inline void proc_ide_create(void) { ; }
951static inline void destroy_proc_ide_interface(ide_hwif_t *hwif) { ; } 945static inline void proc_ide_destroy(void) { ; }
946static inline void ide_proc_register_port(ide_hwif_t *hwif) { ; }
947static inline void ide_proc_unregister_port(ide_hwif_t *hwif) { ; }
948static inline void ide_proc_register_driver(ide_drive_t *drive, ide_driver_t *driver) { ; }
949static inline void ide_proc_unregister_driver(ide_drive_t *drive, ide_driver_t *driver) { ; }
950static inline void ide_add_generic_settings(ide_drive_t *drive) { ; }
952#define PROC_IDE_READ_RETURN(page,start,off,count,eof,len) return 0; 951#define PROC_IDE_READ_RETURN(page,start,off,count,eof,len) return 0;
953#endif 952#endif
954 953
@@ -991,7 +990,7 @@ enum {
991 * The gendriver.owner field should be set to the module owner of this driver. 990 * The gendriver.owner field should be set to the module owner of this driver.
992 * The gendriver.name field should be set to the name of this driver 991 * The gendriver.name field should be set to the name of this driver
993 */ 992 */
994typedef struct ide_driver_s { 993struct ide_driver_s {
995 const char *version; 994 const char *version;
996 u8 media; 995 u8 media;
997 unsigned supports_dsc_overlap : 1; 996 unsigned supports_dsc_overlap : 1;
@@ -999,12 +998,14 @@ typedef struct ide_driver_s {
999 int (*end_request)(ide_drive_t *, int, int); 998 int (*end_request)(ide_drive_t *, int, int);
1000 ide_startstop_t (*error)(ide_drive_t *, struct request *rq, u8, u8); 999 ide_startstop_t (*error)(ide_drive_t *, struct request *rq, u8, u8);
1001 ide_startstop_t (*abort)(ide_drive_t *, struct request *rq); 1000 ide_startstop_t (*abort)(ide_drive_t *, struct request *rq);
1002 ide_proc_entry_t *proc;
1003 struct device_driver gen_driver; 1001 struct device_driver gen_driver;
1004 int (*probe)(ide_drive_t *); 1002 int (*probe)(ide_drive_t *);
1005 void (*remove)(ide_drive_t *); 1003 void (*remove)(ide_drive_t *);
1006 void (*shutdown)(ide_drive_t *); 1004 void (*shutdown)(ide_drive_t *);
1007} ide_driver_t; 1005#ifdef CONFIG_IDE_PROC_FS
1006 ide_proc_entry_t *proc;
1007#endif
1008};
1008 1009
1009#define to_ide_driver(drv) container_of(drv, ide_driver_t, gen_driver) 1010#define to_ide_driver(drv) container_of(drv, ide_driver_t, gen_driver)
1010 1011
@@ -1204,9 +1205,14 @@ void ide_init_disk(struct gendisk *, ide_drive_t *);
1204 1205
1205extern int ideprobe_init(void); 1206extern int ideprobe_init(void);
1206 1207
1208#ifdef CONFIG_IDEPCI_PCIBUS_ORDER
1207extern void ide_scan_pcibus(int scan_direction) __init; 1209extern void ide_scan_pcibus(int scan_direction) __init;
1208extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *owner, const char *mod_name); 1210extern int __ide_pci_register_driver(struct pci_driver *driver, struct module *owner, const char *mod_name);
1209#define ide_pci_register_driver(d) __ide_pci_register_driver(d, THIS_MODULE, KBUILD_MODNAME) 1211#define ide_pci_register_driver(d) __ide_pci_register_driver(d, THIS_MODULE, KBUILD_MODNAME)
1212#else
1213#define ide_pci_register_driver(d) pci_register_driver(d)
1214#endif
1215
1210void ide_pci_setup_ports(struct pci_dev *, struct ide_pci_device_s *, int, ata_index_t *); 1216void ide_pci_setup_ports(struct pci_dev *, struct ide_pci_device_s *, int, ata_index_t *);
1211extern void ide_setup_pci_noise (struct pci_dev *dev, struct ide_pci_device_s *d); 1217extern void ide_setup_pci_noise (struct pci_dev *dev, struct ide_pci_device_s *d);
1212 1218
@@ -1214,9 +1220,6 @@ extern void default_hwif_iops(ide_hwif_t *);
1214extern void default_hwif_mmiops(ide_hwif_t *); 1220extern void default_hwif_mmiops(ide_hwif_t *);
1215extern void default_hwif_transport(ide_hwif_t *); 1221extern void default_hwif_transport(ide_hwif_t *);
1216 1222
1217void ide_register_subdriver(ide_drive_t *, ide_driver_t *);
1218void ide_unregister_subdriver(ide_drive_t *, ide_driver_t *);
1219
1220#define ON_BOARD 1 1223#define ON_BOARD 1
1221#define NEVER_BOARD 0 1224#define NEVER_BOARD 0
1222 1225
@@ -1257,6 +1260,7 @@ typedef struct ide_pci_device_s {
1257 unsigned int extra; 1260 unsigned int extra;
1258 struct ide_pci_device_s *next; 1261 struct ide_pci_device_s *next;
1259 u8 flags; 1262 u8 flags;
1263 u8 udma_mask;
1260} ide_pci_device_t; 1264} ide_pci_device_t;
1261 1265
1262extern int ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *); 1266extern int ide_setup_pci_device(struct pci_dev *, ide_pci_device_t *);
@@ -1278,6 +1282,8 @@ int ide_in_drive_list(struct hd_driveid *, const struct drive_list_entry *);
1278int __ide_dma_bad_drive(ide_drive_t *); 1282int __ide_dma_bad_drive(ide_drive_t *);
1279int __ide_dma_good_drive(ide_drive_t *); 1283int __ide_dma_good_drive(ide_drive_t *);
1280int ide_use_dma(ide_drive_t *); 1284int ide_use_dma(ide_drive_t *);
1285u8 ide_max_dma_mode(ide_drive_t *);
1286int ide_tune_dma(ide_drive_t *);
1281void ide_dma_off(ide_drive_t *); 1287void ide_dma_off(ide_drive_t *);
1282void ide_dma_verbose(ide_drive_t *); 1288void ide_dma_verbose(ide_drive_t *);
1283int ide_set_dma(ide_drive_t *); 1289int ide_set_dma(ide_drive_t *);
@@ -1304,6 +1310,8 @@ extern int __ide_dma_timeout(ide_drive_t *);
1304 1310
1305#else 1311#else
1306static inline int ide_use_dma(ide_drive_t *drive) { return 0; } 1312static inline int ide_use_dma(ide_drive_t *drive) { return 0; }
1313static inline u8 ide_max_dma_mode(ide_drive_t *drive) { return 0; }
1314static inline int ide_tune_dma(ide_drive_t *drive) { return 0; }
1307static inline void ide_dma_off(ide_drive_t *drive) { ; } 1315static inline void ide_dma_off(ide_drive_t *drive) { ; }
1308static inline void ide_dma_verbose(ide_drive_t *drive) { ; } 1316static inline void ide_dma_verbose(ide_drive_t *drive) { ; }
1309static inline int ide_set_dma(ide_drive_t *drive) { return 1; } 1317static inline int ide_set_dma(ide_drive_t *drive) { return 1; }
@@ -1348,8 +1356,7 @@ static inline void ide_set_hwifdata (ide_hwif_t * hwif, void *data)
1348} 1356}
1349 1357
1350/* ide-lib.c */ 1358/* ide-lib.c */
1351extern u8 ide_dma_speed(ide_drive_t *drive, u8 mode); 1359u8 ide_rate_filter(ide_drive_t *, u8);
1352extern u8 ide_rate_filter(u8 mode, u8 speed);
1353extern int ide_dma_enable(ide_drive_t *drive); 1360extern int ide_dma_enable(ide_drive_t *drive);
1354extern char *ide_xfer_verbose(u8 xfer_rate); 1361extern char *ide_xfer_verbose(u8 xfer_rate);
1355extern void ide_toggle_bounce(ide_drive_t *drive, int on); 1362extern void ide_toggle_bounce(ide_drive_t *drive, int on);
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index 795102309bf1..45170b2fa253 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -95,7 +95,7 @@ extern struct group_info init_groups;
95#define INIT_TASK(tsk) \ 95#define INIT_TASK(tsk) \
96{ \ 96{ \
97 .state = 0, \ 97 .state = 0, \
98 .thread_info = &init_thread_info, \ 98 .stack = &init_thread_info, \
99 .usage = ATOMIC_INIT(2), \ 99 .usage = ATOMIC_INIT(2), \
100 .flags = 0, \ 100 .flags = 0, \
101 .lock_depth = -1, \ 101 .lock_depth = -1, \
diff --git a/include/linux/irda.h b/include/linux/irda.h
index 09d8f105a5a8..945ba3110874 100644
--- a/include/linux/irda.h
+++ b/include/linux/irda.h
@@ -16,7 +16,7 @@
16 * published by the Free Software Foundation; either version 2 of 16 * published by the Free Software Foundation; either version 2 of
17 * the License, or (at your option) any later version. 17 * the License, or (at your option) any later version.
18 * 18 *
19 * Neither Dag Brattli nor University of Tromsø admit liability nor 19 * Neither Dag Brattli nor University of Tromsø admit liability nor
20 * provide warranty for any of this software. This material is 20 * provide warranty for any of this software. This material is
21 * provided "AS-IS" and at no charge. 21 * provided "AS-IS" and at no charge.
22 * 22 *
diff --git a/include/linux/kthread.h b/include/linux/kthread.h
index 1c65e7a9f186..00dd957e245b 100644
--- a/include/linux/kthread.h
+++ b/include/linux/kthread.h
@@ -30,4 +30,7 @@ void kthread_bind(struct task_struct *k, unsigned int cpu);
30int kthread_stop(struct task_struct *k); 30int kthread_stop(struct task_struct *k);
31int kthread_should_stop(void); 31int kthread_should_stop(void);
32 32
33int kthreadd(void *unused);
34extern struct task_struct *kthreadd_task;
35
33#endif /* _LINUX_KTHREAD_H */ 36#endif /* _LINUX_KTHREAD_H */
diff --git a/include/linux/ktime.h b/include/linux/ktime.h
index 81bb9c7a4eb3..c762954bda14 100644
--- a/include/linux/ktime.h
+++ b/include/linux/ktime.h
@@ -43,7 +43,7 @@
43 * plain scalar nanosecond based representation can be selected by the 43 * plain scalar nanosecond based representation can be selected by the
44 * config switch CONFIG_KTIME_SCALAR. 44 * config switch CONFIG_KTIME_SCALAR.
45 */ 45 */
46typedef union { 46union ktime {
47 s64 tv64; 47 s64 tv64;
48#if BITS_PER_LONG != 64 && !defined(CONFIG_KTIME_SCALAR) 48#if BITS_PER_LONG != 64 && !defined(CONFIG_KTIME_SCALAR)
49 struct { 49 struct {
@@ -54,7 +54,9 @@ typedef union {
54# endif 54# endif
55 } tv; 55 } tv;
56#endif 56#endif
57} ktime_t; 57};
58
59typedef union ktime ktime_t; /* Kill this */
58 60
59#define KTIME_MAX ((s64)~((u64)1 << 63)) 61#define KTIME_MAX ((s64)~((u64)1 << 63))
60#if (BITS_PER_LONG == 64) 62#if (BITS_PER_LONG == 64)
diff --git a/include/linux/mca.h b/include/linux/mca.h
index 5cff2923092b..37972704617f 100644
--- a/include/linux/mca.h
+++ b/include/linux/mca.h
@@ -94,6 +94,7 @@ struct mca_bus {
94struct mca_driver { 94struct mca_driver {
95 const short *id_table; 95 const short *id_table;
96 void *driver_data; 96 void *driver_data;
97 int integrated_id;
97 struct device_driver driver; 98 struct device_driver driver;
98}; 99};
99#define to_mca_driver(mdriver) container_of(mdriver, struct mca_driver, driver) 100#define to_mca_driver(mdriver) container_of(mdriver, struct mca_driver, driver)
@@ -125,6 +126,7 @@ extern enum MCA_AdapterStatus mca_device_status(struct mca_device *mca_dev);
125extern struct bus_type mca_bus_type; 126extern struct bus_type mca_bus_type;
126 127
127extern int mca_register_driver(struct mca_driver *drv); 128extern int mca_register_driver(struct mca_driver *drv);
129extern int mca_register_driver_integrated(struct mca_driver *, int);
128extern void mca_unregister_driver(struct mca_driver *drv); 130extern void mca_unregister_driver(struct mca_driver *drv);
129 131
130/* WARNING: only called by the boot time device setup */ 132/* WARNING: only called by the boot time device setup */
diff --git a/include/linux/meye.h b/include/linux/meye.h
index 11ec45e9a132..39fd9c8ddd4b 100644
--- a/include/linux/meye.h
+++ b/include/linux/meye.h
@@ -3,7 +3,7 @@
3 * 3 *
4 * Copyright (C) 2001-2003 Stelian Pop <stelian@popies.net> 4 * Copyright (C) 2001-2003 Stelian Pop <stelian@popies.net>
5 * 5 *
6 * Copyright (C) 2001-2002 Alcôve <www.alcove.com> 6 * Copyright (C) 2001-2002 Alcôve <www.alcove.com>
7 * 7 *
8 * Copyright (C) 2000 Andrew Tridgell <tridge@valinux.com> 8 * Copyright (C) 2000 Andrew Tridgell <tridge@valinux.com>
9 * 9 *
diff --git a/include/linux/mlx4/cmd.h b/include/linux/mlx4/cmd.h
new file mode 100644
index 000000000000..4fb552d12f7a
--- /dev/null
+++ b/include/linux/mlx4/cmd.h
@@ -0,0 +1,178 @@
1/*
2 * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
3 *
4 * This software is available to you under a choice of one of two
5 * licenses. You may choose to be licensed under the terms of the GNU
6 * General Public License (GPL) Version 2, available from the file
7 * COPYING in the main directory of this source tree, or the
8 * OpenIB.org BSD license below:
9 *
10 * Redistribution and use in source and binary forms, with or
11 * without modification, are permitted provided that the following
12 * conditions are met:
13 *
14 * - Redistributions of source code must retain the above
15 * copyright notice, this list of conditions and the following
16 * disclaimer.
17 *
18 * - Redistributions in binary form must reproduce the above
19 * copyright notice, this list of conditions and the following
20 * disclaimer in the documentation and/or other materials
21 * provided with the distribution.
22 *
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
27 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
28 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
29 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30 * SOFTWARE.
31 */
32
33#ifndef MLX4_CMD_H
34#define MLX4_CMD_H
35
36#include <linux/dma-mapping.h>
37
38enum {
39 /* initialization and general commands */
40 MLX4_CMD_SYS_EN = 0x1,
41 MLX4_CMD_SYS_DIS = 0x2,
42 MLX4_CMD_MAP_FA = 0xfff,
43 MLX4_CMD_UNMAP_FA = 0xffe,
44 MLX4_CMD_RUN_FW = 0xff6,
45 MLX4_CMD_MOD_STAT_CFG = 0x34,
46 MLX4_CMD_QUERY_DEV_CAP = 0x3,
47 MLX4_CMD_QUERY_FW = 0x4,
48 MLX4_CMD_ENABLE_LAM = 0xff8,
49 MLX4_CMD_DISABLE_LAM = 0xff7,
50 MLX4_CMD_QUERY_DDR = 0x5,
51 MLX4_CMD_QUERY_ADAPTER = 0x6,
52 MLX4_CMD_INIT_HCA = 0x7,
53 MLX4_CMD_CLOSE_HCA = 0x8,
54 MLX4_CMD_INIT_PORT = 0x9,
55 MLX4_CMD_CLOSE_PORT = 0xa,
56 MLX4_CMD_QUERY_HCA = 0xb,
57 MLX4_CMD_SET_PORT = 0xc,
58 MLX4_CMD_ACCESS_DDR = 0x2e,
59 MLX4_CMD_MAP_ICM = 0xffa,
60 MLX4_CMD_UNMAP_ICM = 0xff9,
61 MLX4_CMD_MAP_ICM_AUX = 0xffc,
62 MLX4_CMD_UNMAP_ICM_AUX = 0xffb,
63 MLX4_CMD_SET_ICM_SIZE = 0xffd,
64
65 /* TPT commands */
66 MLX4_CMD_SW2HW_MPT = 0xd,
67 MLX4_CMD_QUERY_MPT = 0xe,
68 MLX4_CMD_HW2SW_MPT = 0xf,
69 MLX4_CMD_READ_MTT = 0x10,
70 MLX4_CMD_WRITE_MTT = 0x11,
71 MLX4_CMD_SYNC_TPT = 0x2f,
72
73 /* EQ commands */
74 MLX4_CMD_MAP_EQ = 0x12,
75 MLX4_CMD_SW2HW_EQ = 0x13,
76 MLX4_CMD_HW2SW_EQ = 0x14,
77 MLX4_CMD_QUERY_EQ = 0x15,
78
79 /* CQ commands */
80 MLX4_CMD_SW2HW_CQ = 0x16,
81 MLX4_CMD_HW2SW_CQ = 0x17,
82 MLX4_CMD_QUERY_CQ = 0x18,
83 MLX4_CMD_RESIZE_CQ = 0x2c,
84
85 /* SRQ commands */
86 MLX4_CMD_SW2HW_SRQ = 0x35,
87 MLX4_CMD_HW2SW_SRQ = 0x36,
88 MLX4_CMD_QUERY_SRQ = 0x37,
89 MLX4_CMD_ARM_SRQ = 0x40,
90
91 /* QP/EE commands */
92 MLX4_CMD_RST2INIT_QP = 0x19,
93 MLX4_CMD_INIT2RTR_QP = 0x1a,
94 MLX4_CMD_RTR2RTS_QP = 0x1b,
95 MLX4_CMD_RTS2RTS_QP = 0x1c,
96 MLX4_CMD_SQERR2RTS_QP = 0x1d,
97 MLX4_CMD_2ERR_QP = 0x1e,
98 MLX4_CMD_RTS2SQD_QP = 0x1f,
99 MLX4_CMD_SQD2SQD_QP = 0x38,
100 MLX4_CMD_SQD2RTS_QP = 0x20,
101 MLX4_CMD_2RST_QP = 0x21,
102 MLX4_CMD_QUERY_QP = 0x22,
103 MLX4_CMD_INIT2INIT_QP = 0x2d,
104 MLX4_CMD_SUSPEND_QP = 0x32,
105 MLX4_CMD_UNSUSPEND_QP = 0x33,
106 /* special QP and management commands */
107 MLX4_CMD_CONF_SPECIAL_QP = 0x23,
108 MLX4_CMD_MAD_IFC = 0x24,
109
110 /* multicast commands */
111 MLX4_CMD_READ_MCG = 0x25,
112 MLX4_CMD_WRITE_MCG = 0x26,
113 MLX4_CMD_MGID_HASH = 0x27,
114
115 /* miscellaneous commands */
116 MLX4_CMD_DIAG_RPRT = 0x30,
117 MLX4_CMD_NOP = 0x31,
118
119 /* debug commands */
120 MLX4_CMD_QUERY_DEBUG_MSG = 0x2a,
121 MLX4_CMD_SET_DEBUG_MSG = 0x2b,
122};
123
124enum {
125 MLX4_CMD_TIME_CLASS_A = 10000,
126 MLX4_CMD_TIME_CLASS_B = 10000,
127 MLX4_CMD_TIME_CLASS_C = 10000,
128};
129
130enum {
131 MLX4_MAILBOX_SIZE = 4096
132};
133
134struct mlx4_dev;
135
136struct mlx4_cmd_mailbox {
137 void *buf;
138 dma_addr_t dma;
139};
140
141int __mlx4_cmd(struct mlx4_dev *dev, u64 in_param, u64 *out_param,
142 int out_is_imm, u32 in_modifier, u8 op_modifier,
143 u16 op, unsigned long timeout);
144
145/* Invoke a command with no output parameter */
146static inline int mlx4_cmd(struct mlx4_dev *dev, u64 in_param, u32 in_modifier,
147 u8 op_modifier, u16 op, unsigned long timeout)
148{
149 return __mlx4_cmd(dev, in_param, NULL, 0, in_modifier,
150 op_modifier, op, timeout);
151}
152
153/* Invoke a command with an output mailbox */
154static inline int mlx4_cmd_box(struct mlx4_dev *dev, u64 in_param, u64 out_param,
155 u32 in_modifier, u8 op_modifier, u16 op,
156 unsigned long timeout)
157{
158 return __mlx4_cmd(dev, in_param, &out_param, 0, in_modifier,
159 op_modifier, op, timeout);
160}
161
162/*
163 * Invoke a command with an immediate output parameter (and copy the
164 * output into the caller's out_param pointer after the command
165 * executes).
166 */
167static inline int mlx4_cmd_imm(struct mlx4_dev *dev, u64 in_param, u64 *out_param,
168 u32 in_modifier, u8 op_modifier, u16 op,
169 unsigned long timeout)
170{
171 return __mlx4_cmd(dev, in_param, out_param, 1, in_modifier,
172 op_modifier, op, timeout);
173}
174
175struct mlx4_cmd_mailbox *mlx4_alloc_cmd_mailbox(struct mlx4_dev *dev);
176void mlx4_free_cmd_mailbox(struct mlx4_dev *dev, struct mlx4_cmd_mailbox *mailbox);
177
178#endif /* MLX4_CMD_H */
diff --git a/include/linux/mlx4/cq.h b/include/linux/mlx4/cq.h
new file mode 100644
index 000000000000..0181e0a57cbf
--- /dev/null
+++ b/include/linux/mlx4/cq.h
@@ -0,0 +1,123 @@
1/*
2 * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
3 *
4 * This software is available to you under a choice of one of two
5 * licenses. You may choose to be licensed under the terms of the GNU
6 * General Public License (GPL) Version 2, available from the file
7 * COPYING in the main directory of this source tree, or the
8 * OpenIB.org BSD license below:
9 *
10 * Redistribution and use in source and binary forms, with or
11 * without modification, are permitted provided that the following
12 * conditions are met:
13 *
14 * - Redistributions of source code must retain the above
15 * copyright notice, this list of conditions and the following
16 * disclaimer.
17 *
18 * - Redistributions in binary form must reproduce the above
19 * copyright notice, this list of conditions and the following
20 * disclaimer in the documentation and/or other materials
21 * provided with the distribution.
22 *
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
27 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
28 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
29 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30 * SOFTWARE.
31 */
32
33#ifndef MLX4_CQ_H
34#define MLX4_CQ_H
35
36#include <linux/types.h>
37
38#include <linux/mlx4/device.h>
39#include <linux/mlx4/doorbell.h>
40
41struct mlx4_cqe {
42 __be32 my_qpn;
43 __be32 immed_rss_invalid;
44 __be32 g_mlpath_rqpn;
45 u8 sl;
46 u8 reserved1;
47 __be16 rlid;
48 u32 reserved2;
49 __be32 byte_cnt;
50 __be16 wqe_index;
51 __be16 checksum;
52 u8 reserved3[3];
53 u8 owner_sr_opcode;
54};
55
56struct mlx4_err_cqe {
57 __be32 my_qpn;
58 u32 reserved1[5];
59 __be16 wqe_index;
60 u8 vendor_err_syndrome;
61 u8 syndrome;
62 u8 reserved2[3];
63 u8 owner_sr_opcode;
64};
65
66enum {
67 MLX4_CQE_OWNER_MASK = 0x80,
68 MLX4_CQE_IS_SEND_MASK = 0x40,
69 MLX4_CQE_OPCODE_MASK = 0x1f
70};
71
72enum {
73 MLX4_CQE_SYNDROME_LOCAL_LENGTH_ERR = 0x01,
74 MLX4_CQE_SYNDROME_LOCAL_QP_OP_ERR = 0x02,
75 MLX4_CQE_SYNDROME_LOCAL_PROT_ERR = 0x04,
76 MLX4_CQE_SYNDROME_WR_FLUSH_ERR = 0x05,
77 MLX4_CQE_SYNDROME_MW_BIND_ERR = 0x06,
78 MLX4_CQE_SYNDROME_BAD_RESP_ERR = 0x10,
79 MLX4_CQE_SYNDROME_LOCAL_ACCESS_ERR = 0x11,
80 MLX4_CQE_SYNDROME_REMOTE_INVAL_REQ_ERR = 0x12,
81 MLX4_CQE_SYNDROME_REMOTE_ACCESS_ERR = 0x13,
82 MLX4_CQE_SYNDROME_REMOTE_OP_ERR = 0x14,
83 MLX4_CQE_SYNDROME_TRANSPORT_RETRY_EXC_ERR = 0x15,
84 MLX4_CQE_SYNDROME_RNR_RETRY_EXC_ERR = 0x16,
85 MLX4_CQE_SYNDROME_REMOTE_ABORTED_ERR = 0x22,
86};
87
88static inline void mlx4_cq_arm(struct mlx4_cq *cq, u32 cmd,
89 void __iomem *uar_page,
90 spinlock_t *doorbell_lock)
91{
92 __be32 doorbell[2];
93 u32 sn;
94 u32 ci;
95
96 sn = cq->arm_sn & 3;
97 ci = cq->cons_index & 0xffffff;
98
99 *cq->arm_db = cpu_to_be32(sn << 28 | cmd | ci);
100
101 /*
102 * Make sure that the doorbell record in host memory is
103 * written before ringing the doorbell via PCI MMIO.
104 */
105 wmb();
106
107 doorbell[0] = cpu_to_be32(sn << 28 | cmd | cq->cqn);
108 doorbell[1] = cpu_to_be32(ci);
109
110 mlx4_write64(doorbell, uar_page + MLX4_CQ_DOORBELL, doorbell_lock);
111}
112
113static inline void mlx4_cq_set_ci(struct mlx4_cq *cq)
114{
115 *cq->set_ci_db = cpu_to_be32(cq->cons_index & 0xffffff);
116}
117
118enum {
119 MLX4_CQ_DB_REQ_NOT_SOL = 1 << 24,
120 MLX4_CQ_DB_REQ_NOT = 2 << 24
121};
122
123#endif /* MLX4_CQ_H */
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
new file mode 100644
index 000000000000..8c5f8fd86841
--- /dev/null
+++ b/include/linux/mlx4/device.h
@@ -0,0 +1,331 @@
1/*
2 * Copyright (c) 2006, 2007 Cisco Systems, Inc. All rights reserved.
3 *
4 * This software is available to you under a choice of one of two
5 * licenses. You may choose to be licensed under the terms of the GNU
6 * General Public License (GPL) Version 2, available from the file
7 * COPYING in the main directory of this source tree, or the
8 * OpenIB.org BSD license below:
9 *
10 * Redistribution and use in source and binary forms, with or
11 * without modification, are permitted provided that the following
12 * conditions are met:
13 *
14 * - Redistributions of source code must retain the above
15 * copyright notice, this list of conditions and the following
16 * disclaimer.
17 *
18 * - Redistributions in binary form must reproduce the above
19 * copyright notice, this list of conditions and the following
20 * disclaimer in the documentation and/or other materials
21 * provided with the distribution.
22 *
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
27 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
28 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
29 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30 * SOFTWARE.
31 */
32
33#ifndef MLX4_DEVICE_H
34#define MLX4_DEVICE_H
35
36#include <linux/pci.h>
37#include <linux/completion.h>
38#include <linux/radix-tree.h>
39
40#include <asm/atomic.h>
41
42enum {
43 MLX4_FLAG_MSI_X = 1 << 0,
44};
45
46enum {
47 MLX4_MAX_PORTS = 2
48};
49
50enum {
51 MLX4_DEV_CAP_FLAG_RC = 1 << 0,
52 MLX4_DEV_CAP_FLAG_UC = 1 << 1,
53 MLX4_DEV_CAP_FLAG_UD = 1 << 2,
54 MLX4_DEV_CAP_FLAG_SRQ = 1 << 6,
55 MLX4_DEV_CAP_FLAG_IPOIB_CSUM = 1 << 7,
56 MLX4_DEV_CAP_FLAG_BAD_PKEY_CNTR = 1 << 8,
57 MLX4_DEV_CAP_FLAG_BAD_QKEY_CNTR = 1 << 9,
58 MLX4_DEV_CAP_FLAG_MEM_WINDOW = 1 << 16,
59 MLX4_DEV_CAP_FLAG_APM = 1 << 17,
60 MLX4_DEV_CAP_FLAG_ATOMIC = 1 << 18,
61 MLX4_DEV_CAP_FLAG_RAW_MCAST = 1 << 19,
62 MLX4_DEV_CAP_FLAG_UD_AV_PORT = 1 << 20,
63 MLX4_DEV_CAP_FLAG_UD_MCAST = 1 << 21
64};
65
66enum mlx4_event {
67 MLX4_EVENT_TYPE_COMP = 0x00,
68 MLX4_EVENT_TYPE_PATH_MIG = 0x01,
69 MLX4_EVENT_TYPE_COMM_EST = 0x02,
70 MLX4_EVENT_TYPE_SQ_DRAINED = 0x03,
71 MLX4_EVENT_TYPE_SRQ_QP_LAST_WQE = 0x13,
72 MLX4_EVENT_TYPE_SRQ_LIMIT = 0x14,
73 MLX4_EVENT_TYPE_CQ_ERROR = 0x04,
74 MLX4_EVENT_TYPE_WQ_CATAS_ERROR = 0x05,
75 MLX4_EVENT_TYPE_EEC_CATAS_ERROR = 0x06,
76 MLX4_EVENT_TYPE_PATH_MIG_FAILED = 0x07,
77 MLX4_EVENT_TYPE_WQ_INVAL_REQ_ERROR = 0x10,
78 MLX4_EVENT_TYPE_WQ_ACCESS_ERROR = 0x11,
79 MLX4_EVENT_TYPE_SRQ_CATAS_ERROR = 0x12,
80 MLX4_EVENT_TYPE_LOCAL_CATAS_ERROR = 0x08,
81 MLX4_EVENT_TYPE_PORT_CHANGE = 0x09,
82 MLX4_EVENT_TYPE_EQ_OVERFLOW = 0x0f,
83 MLX4_EVENT_TYPE_ECC_DETECT = 0x0e,
84 MLX4_EVENT_TYPE_CMD = 0x0a
85};
86
87enum {
88 MLX4_PORT_CHANGE_SUBTYPE_DOWN = 1,
89 MLX4_PORT_CHANGE_SUBTYPE_ACTIVE = 4
90};
91
92enum {
93 MLX4_PERM_LOCAL_READ = 1 << 10,
94 MLX4_PERM_LOCAL_WRITE = 1 << 11,
95 MLX4_PERM_REMOTE_READ = 1 << 12,
96 MLX4_PERM_REMOTE_WRITE = 1 << 13,
97 MLX4_PERM_ATOMIC = 1 << 14
98};
99
100enum {
101 MLX4_OPCODE_NOP = 0x00,
102 MLX4_OPCODE_SEND_INVAL = 0x01,
103 MLX4_OPCODE_RDMA_WRITE = 0x08,
104 MLX4_OPCODE_RDMA_WRITE_IMM = 0x09,
105 MLX4_OPCODE_SEND = 0x0a,
106 MLX4_OPCODE_SEND_IMM = 0x0b,
107 MLX4_OPCODE_LSO = 0x0e,
108 MLX4_OPCODE_RDMA_READ = 0x10,
109 MLX4_OPCODE_ATOMIC_CS = 0x11,
110 MLX4_OPCODE_ATOMIC_FA = 0x12,
111 MLX4_OPCODE_ATOMIC_MASK_CS = 0x14,
112 MLX4_OPCODE_ATOMIC_MASK_FA = 0x15,
113 MLX4_OPCODE_BIND_MW = 0x18,
114 MLX4_OPCODE_FMR = 0x19,
115 MLX4_OPCODE_LOCAL_INVAL = 0x1b,
116 MLX4_OPCODE_CONFIG_CMD = 0x1f,
117
118 MLX4_RECV_OPCODE_RDMA_WRITE_IMM = 0x00,
119 MLX4_RECV_OPCODE_SEND = 0x01,
120 MLX4_RECV_OPCODE_SEND_IMM = 0x02,
121 MLX4_RECV_OPCODE_SEND_INVAL = 0x03,
122
123 MLX4_CQE_OPCODE_ERROR = 0x1e,
124 MLX4_CQE_OPCODE_RESIZE = 0x16,
125};
126
127enum {
128 MLX4_STAT_RATE_OFFSET = 5
129};
130
131struct mlx4_caps {
132 u64 fw_ver;
133 int num_ports;
134 int vl_cap;
135 int mtu_cap;
136 int gid_table_len;
137 int pkey_table_len;
138 int local_ca_ack_delay;
139 int num_uars;
140 int bf_reg_size;
141 int bf_regs_per_page;
142 int max_sq_sg;
143 int max_rq_sg;
144 int num_qps;
145 int max_wqes;
146 int max_sq_desc_sz;
147 int max_rq_desc_sz;
148 int max_qp_init_rdma;
149 int max_qp_dest_rdma;
150 int reserved_qps;
151 int sqp_start;
152 int num_srqs;
153 int max_srq_wqes;
154 int max_srq_sge;
155 int reserved_srqs;
156 int num_cqs;
157 int max_cqes;
158 int reserved_cqs;
159 int num_eqs;
160 int reserved_eqs;
161 int num_mpts;
162 int num_mtt_segs;
163 int fmr_reserved_mtts;
164 int reserved_mtts;
165 int reserved_mrws;
166 int reserved_uars;
167 int num_mgms;
168 int num_amgms;
169 int reserved_mcgs;
170 int num_qp_per_mgm;
171 int num_pds;
172 int reserved_pds;
173 int mtt_entry_sz;
174 u32 page_size_cap;
175 u32 flags;
176 u16 stat_rate_support;
177 u8 port_width_cap;
178};
179
180struct mlx4_buf_list {
181 void *buf;
182 dma_addr_t map;
183};
184
185struct mlx4_buf {
186 union {
187 struct mlx4_buf_list direct;
188 struct mlx4_buf_list *page_list;
189 } u;
190 int nbufs;
191 int npages;
192 int page_shift;
193};
194
195struct mlx4_mtt {
196 u32 first_seg;
197 int order;
198 int page_shift;
199};
200
201struct mlx4_mr {
202 struct mlx4_mtt mtt;
203 u64 iova;
204 u64 size;
205 u32 key;
206 u32 pd;
207 u32 access;
208 int enabled;
209};
210
211struct mlx4_uar {
212 unsigned long pfn;
213 int index;
214};
215
216struct mlx4_cq {
217 void (*comp) (struct mlx4_cq *);
218 void (*event) (struct mlx4_cq *, enum mlx4_event);
219
220 struct mlx4_uar *uar;
221
222 u32 cons_index;
223
224 __be32 *set_ci_db;
225 __be32 *arm_db;
226 int arm_sn;
227
228 int cqn;
229
230 atomic_t refcount;
231 struct completion free;
232};
233
234struct mlx4_qp {
235 void (*event) (struct mlx4_qp *, enum mlx4_event);
236
237 int qpn;
238
239 atomic_t refcount;
240 struct completion free;
241};
242
243struct mlx4_srq {
244 void (*event) (struct mlx4_srq *, enum mlx4_event);
245
246 int srqn;
247 int max;
248 int max_gs;
249 int wqe_shift;
250
251 atomic_t refcount;
252 struct completion free;
253};
254
255struct mlx4_av {
256 __be32 port_pd;
257 u8 reserved1;
258 u8 g_slid;
259 __be16 dlid;
260 u8 reserved2;
261 u8 gid_index;
262 u8 stat_rate;
263 u8 hop_limit;
264 __be32 sl_tclass_flowlabel;
265 u8 dgid[16];
266};
267
268struct mlx4_dev {
269 struct pci_dev *pdev;
270 unsigned long flags;
271 struct mlx4_caps caps;
272 struct radix_tree_root qp_table_tree;
273};
274
275struct mlx4_init_port_param {
276 int set_guid0;
277 int set_node_guid;
278 int set_si_guid;
279 u16 mtu;
280 int port_width_cap;
281 u16 vl_cap;
282 u16 max_gid;
283 u16 max_pkey;
284 u64 guid0;
285 u64 node_guid;
286 u64 si_guid;
287};
288
289int mlx4_buf_alloc(struct mlx4_dev *dev, int size, int max_direct,
290 struct mlx4_buf *buf);
291void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf);
292
293int mlx4_pd_alloc(struct mlx4_dev *dev, u32 *pdn);
294void mlx4_pd_free(struct mlx4_dev *dev, u32 pdn);
295
296int mlx4_uar_alloc(struct mlx4_dev *dev, struct mlx4_uar *uar);
297void mlx4_uar_free(struct mlx4_dev *dev, struct mlx4_uar *uar);
298
299int mlx4_mtt_init(struct mlx4_dev *dev, int npages, int page_shift,
300 struct mlx4_mtt *mtt);
301void mlx4_mtt_cleanup(struct mlx4_dev *dev, struct mlx4_mtt *mtt);
302u64 mlx4_mtt_addr(struct mlx4_dev *dev, struct mlx4_mtt *mtt);
303
304int mlx4_mr_alloc(struct mlx4_dev *dev, u32 pd, u64 iova, u64 size, u32 access,
305 int npages, int page_shift, struct mlx4_mr *mr);
306void mlx4_mr_free(struct mlx4_dev *dev, struct mlx4_mr *mr);
307int mlx4_mr_enable(struct mlx4_dev *dev, struct mlx4_mr *mr);
308int mlx4_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
309 int start_index, int npages, u64 *page_list);
310int mlx4_buf_write_mtt(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
311 struct mlx4_buf *buf);
312
313int mlx4_cq_alloc(struct mlx4_dev *dev, int nent, struct mlx4_mtt *mtt,
314 struct mlx4_uar *uar, u64 db_rec, struct mlx4_cq *cq);
315void mlx4_cq_free(struct mlx4_dev *dev, struct mlx4_cq *cq);
316
317int mlx4_qp_alloc(struct mlx4_dev *dev, int sqpn, struct mlx4_qp *qp);
318void mlx4_qp_free(struct mlx4_dev *dev, struct mlx4_qp *qp);
319
320int mlx4_srq_alloc(struct mlx4_dev *dev, u32 pdn, struct mlx4_mtt *mtt,
321 u64 db_rec, struct mlx4_srq *srq);
322void mlx4_srq_free(struct mlx4_dev *dev, struct mlx4_srq *srq);
323int mlx4_srq_arm(struct mlx4_dev *dev, struct mlx4_srq *srq, int limit_watermark);
324
325int mlx4_INIT_PORT(struct mlx4_dev *dev, struct mlx4_init_port_param *param, int port);
326int mlx4_CLOSE_PORT(struct mlx4_dev *dev, int port);
327
328int mlx4_multicast_attach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16]);
329int mlx4_multicast_detach(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16]);
330
331#endif /* MLX4_DEVICE_H */
diff --git a/include/linux/mlx4/doorbell.h b/include/linux/mlx4/doorbell.h
new file mode 100644
index 000000000000..3f2da442d7cb
--- /dev/null
+++ b/include/linux/mlx4/doorbell.h
@@ -0,0 +1,97 @@
1/*
2 * Copyright (c) 2004 Topspin Communications. All rights reserved.
3 * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
4 * Copyright (c) 2005 Mellanox Technologies. All rights reserved.
5 *
6 * This software is available to you under a choice of one of two
7 * licenses. You may choose to be licensed under the terms of the GNU
8 * General Public License (GPL) Version 2, available from the file
9 * COPYING in the main directory of this source tree, or the
10 * OpenIB.org BSD license below:
11 *
12 * Redistribution and use in source and binary forms, with or
13 * without modification, are permitted provided that the following
14 * conditions are met:
15 *
16 * - Redistributions of source code must retain the above
17 * copyright notice, this list of conditions and the following
18 * disclaimer.
19 *
20 * - Redistributions in binary form must reproduce the above
21 * copyright notice, this list of conditions and the following
22 * disclaimer in the documentation and/or other materials
23 * provided with the distribution.
24 *
25 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
28 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
29 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
30 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
31 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
32 * SOFTWARE.
33 */
34
35#ifndef MLX4_DOORBELL_H
36#define MLX4_DOORBELL_H
37
38#include <linux/types.h>
39#include <linux/io.h>
40
41#define MLX4_SEND_DOORBELL 0x14
42#define MLX4_CQ_DOORBELL 0x20
43
44#if BITS_PER_LONG == 64
45/*
46 * Assume that we can just write a 64-bit doorbell atomically. s390
47 * actually doesn't have writeq() but S/390 systems don't even have
48 * PCI so we won't worry about it.
49 */
50
51#define MLX4_DECLARE_DOORBELL_LOCK(name)
52#define MLX4_INIT_DOORBELL_LOCK(ptr) do { } while (0)
53#define MLX4_GET_DOORBELL_LOCK(ptr) (NULL)
54
55static inline void mlx4_write64_raw(__be64 val, void __iomem *dest)
56{
57 __raw_writeq((__force u64) val, dest);
58}
59
60static inline void mlx4_write64(__be32 val[2], void __iomem *dest,
61 spinlock_t *doorbell_lock)
62{
63 __raw_writeq(*(u64 *) val, dest);
64}
65
66#else
67
68/*
69 * Just fall back to a spinlock to protect the doorbell if
70 * BITS_PER_LONG is 32 -- there's no portable way to do atomic 64-bit
71 * MMIO writes.
72 */
73
74#define MLX4_DECLARE_DOORBELL_LOCK(name) spinlock_t name;
75#define MLX4_INIT_DOORBELL_LOCK(ptr) spin_lock_init(ptr)
76#define MLX4_GET_DOORBELL_LOCK(ptr) (ptr)
77
78static inline void mlx4_write64_raw(__be64 val, void __iomem *dest)
79{
80 __raw_writel(((__force u32 *) &val)[0], dest);
81 __raw_writel(((__force u32 *) &val)[1], dest + 4);
82}
83
84static inline void mlx4_write64(__be32 val[2], void __iomem *dest,
85 spinlock_t *doorbell_lock)
86{
87 unsigned long flags;
88
89 spin_lock_irqsave(doorbell_lock, flags);
90 __raw_writel((__force u32) val[0], dest);
91 __raw_writel((__force u32) val[1], dest + 4);
92 spin_unlock_irqrestore(doorbell_lock, flags);
93}
94
95#endif
96
97#endif /* MLX4_DOORBELL_H */
diff --git a/include/linux/mlx4/driver.h b/include/linux/mlx4/driver.h
new file mode 100644
index 000000000000..1b835ca49df1
--- /dev/null
+++ b/include/linux/mlx4/driver.h
@@ -0,0 +1,59 @@
1/*
2 * Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
3 *
4 * This software is available to you under a choice of one of two
5 * licenses. You may choose to be licensed under the terms of the GNU
6 * General Public License (GPL) Version 2, available from the file
7 * COPYING in the main directory of this source tree, or the
8 * OpenIB.org BSD license below:
9 *
10 * Redistribution and use in source and binary forms, with or
11 * without modification, are permitted provided that the following
12 * conditions are met:
13 *
14 * - Redistributions of source code must retain the above
15 * copyright notice, this list of conditions and the following
16 * disclaimer.
17 *
18 * - Redistributions in binary form must reproduce the above
19 * copyright notice, this list of conditions and the following
20 * disclaimer in the documentation and/or other materials
21 * provided with the distribution.
22 *
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
27 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
28 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
29 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30 * SOFTWARE.
31 */
32
33#ifndef MLX4_DRIVER_H
34#define MLX4_DRIVER_H
35
36#include <linux/device.h>
37
38struct mlx4_dev;
39
40enum mlx4_dev_event {
41 MLX4_DEV_EVENT_CATASTROPHIC_ERROR,
42 MLX4_DEV_EVENT_PORT_UP,
43 MLX4_DEV_EVENT_PORT_DOWN,
44 MLX4_DEV_EVENT_PORT_REINIT,
45};
46
47struct mlx4_interface {
48 void * (*add) (struct mlx4_dev *dev);
49 void (*remove)(struct mlx4_dev *dev, void *context);
50 void (*event) (struct mlx4_dev *dev, void *context,
51 enum mlx4_dev_event event, int subtype,
52 int port);
53 struct list_head list;
54};
55
56int mlx4_register_interface(struct mlx4_interface *intf);
57void mlx4_unregister_interface(struct mlx4_interface *intf);
58
59#endif /* MLX4_DRIVER_H */
diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h
new file mode 100644
index 000000000000..9eeb61adf6a3
--- /dev/null
+++ b/include/linux/mlx4/qp.h
@@ -0,0 +1,288 @@
1/*
2 * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
3 *
4 * This software is available to you under a choice of one of two
5 * licenses. You may choose to be licensed under the terms of the GNU
6 * General Public License (GPL) Version 2, available from the file
7 * COPYING in the main directory of this source tree, or the
8 * OpenIB.org BSD license below:
9 *
10 * Redistribution and use in source and binary forms, with or
11 * without modification, are permitted provided that the following
12 * conditions are met:
13 *
14 * - Redistributions of source code must retain the above
15 * copyright notice, this list of conditions and the following
16 * disclaimer.
17 *
18 * - Redistributions in binary form must reproduce the above
19 * copyright notice, this list of conditions and the following
20 * disclaimer in the documentation and/or other materials
21 * provided with the distribution.
22 *
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
27 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
28 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
29 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30 * SOFTWARE.
31 */
32
33#ifndef MLX4_QP_H
34#define MLX4_QP_H
35
36#include <linux/types.h>
37
38#include <linux/mlx4/device.h>
39
40#define MLX4_INVALID_LKEY 0x100
41
42enum mlx4_qp_optpar {
43 MLX4_QP_OPTPAR_ALT_ADDR_PATH = 1 << 0,
44 MLX4_QP_OPTPAR_RRE = 1 << 1,
45 MLX4_QP_OPTPAR_RAE = 1 << 2,
46 MLX4_QP_OPTPAR_RWE = 1 << 3,
47 MLX4_QP_OPTPAR_PKEY_INDEX = 1 << 4,
48 MLX4_QP_OPTPAR_Q_KEY = 1 << 5,
49 MLX4_QP_OPTPAR_RNR_TIMEOUT = 1 << 6,
50 MLX4_QP_OPTPAR_PRIMARY_ADDR_PATH = 1 << 7,
51 MLX4_QP_OPTPAR_SRA_MAX = 1 << 8,
52 MLX4_QP_OPTPAR_RRA_MAX = 1 << 9,
53 MLX4_QP_OPTPAR_PM_STATE = 1 << 10,
54 MLX4_QP_OPTPAR_RETRY_COUNT = 1 << 12,
55 MLX4_QP_OPTPAR_RNR_RETRY = 1 << 13,
56 MLX4_QP_OPTPAR_ACK_TIMEOUT = 1 << 14,
57 MLX4_QP_OPTPAR_SCHED_QUEUE = 1 << 16
58};
59
60enum mlx4_qp_state {
61 MLX4_QP_STATE_RST = 0,
62 MLX4_QP_STATE_INIT = 1,
63 MLX4_QP_STATE_RTR = 2,
64 MLX4_QP_STATE_RTS = 3,
65 MLX4_QP_STATE_SQER = 4,
66 MLX4_QP_STATE_SQD = 5,
67 MLX4_QP_STATE_ERR = 6,
68 MLX4_QP_STATE_SQ_DRAINING = 7,
69 MLX4_QP_NUM_STATE
70};
71
72enum {
73 MLX4_QP_ST_RC = 0x0,
74 MLX4_QP_ST_UC = 0x1,
75 MLX4_QP_ST_RD = 0x2,
76 MLX4_QP_ST_UD = 0x3,
77 MLX4_QP_ST_MLX = 0x7
78};
79
80enum {
81 MLX4_QP_PM_MIGRATED = 0x3,
82 MLX4_QP_PM_ARMED = 0x0,
83 MLX4_QP_PM_REARM = 0x1
84};
85
86enum {
87 /* params1 */
88 MLX4_QP_BIT_SRE = 1 << 15,
89 MLX4_QP_BIT_SWE = 1 << 14,
90 MLX4_QP_BIT_SAE = 1 << 13,
91 /* params2 */
92 MLX4_QP_BIT_RRE = 1 << 15,
93 MLX4_QP_BIT_RWE = 1 << 14,
94 MLX4_QP_BIT_RAE = 1 << 13,
95 MLX4_QP_BIT_RIC = 1 << 4,
96};
97
98struct mlx4_qp_path {
99 u8 fl;
100 u8 reserved1[2];
101 u8 pkey_index;
102 u8 reserved2;
103 u8 grh_mylmc;
104 __be16 rlid;
105 u8 ackto;
106 u8 mgid_index;
107 u8 static_rate;
108 u8 hop_limit;
109 __be32 tclass_flowlabel;
110 u8 rgid[16];
111 u8 sched_queue;
112 u8 snooper_flags;
113 u8 reserved3[2];
114 u8 counter_index;
115 u8 reserved4[7];
116};
117
118struct mlx4_qp_context {
119 __be32 flags;
120 __be32 pd;
121 u8 mtu_msgmax;
122 u8 rq_size_stride;
123 u8 sq_size_stride;
124 u8 rlkey;
125 __be32 usr_page;
126 __be32 local_qpn;
127 __be32 remote_qpn;
128 struct mlx4_qp_path pri_path;
129 struct mlx4_qp_path alt_path;
130 __be32 params1;
131 u32 reserved1;
132 __be32 next_send_psn;
133 __be32 cqn_send;
134 u32 reserved2[2];
135 __be32 last_acked_psn;
136 __be32 ssn;
137 __be32 params2;
138 __be32 rnr_nextrecvpsn;
139 __be32 srcd;
140 __be32 cqn_recv;
141 __be64 db_rec_addr;
142 __be32 qkey;
143 __be32 srqn;
144 __be32 msn;
145 __be16 rq_wqe_counter;
146 __be16 sq_wqe_counter;
147 u32 reserved3[2];
148 __be32 param3;
149 __be32 nummmcpeers_basemkey;
150 u8 log_page_size;
151 u8 reserved4[2];
152 u8 mtt_base_addr_h;
153 __be32 mtt_base_addr_l;
154 u32 reserved5[10];
155};
156
157enum {
158 MLX4_WQE_CTRL_FENCE = 1 << 6,
159 MLX4_WQE_CTRL_CQ_UPDATE = 3 << 2,
160 MLX4_WQE_CTRL_SOLICITED = 1 << 1,
161};
162
163struct mlx4_wqe_ctrl_seg {
164 __be32 owner_opcode;
165 u8 reserved2[3];
166 u8 fence_size;
167 /*
168 * High 24 bits are SRC remote buffer; low 8 bits are flags:
169 * [7] SO (strong ordering)
170 * [5] TCP/UDP checksum
171 * [4] IP checksum
172 * [3:2] C (generate completion queue entry)
173 * [1] SE (solicited event)
174 */
175 __be32 srcrb_flags;
176 /*
177 * imm is immediate data for send/RDMA write w/ immediate;
178 * also invalidation key for send with invalidate; input
179 * modifier for WQEs on CCQs.
180 */
181 __be32 imm;
182};
183
184enum {
185 MLX4_WQE_MLX_VL15 = 1 << 17,
186 MLX4_WQE_MLX_SLR = 1 << 16
187};
188
189struct mlx4_wqe_mlx_seg {
190 u8 owner;
191 u8 reserved1[2];
192 u8 opcode;
193 u8 reserved2[3];
194 u8 size;
195 /*
196 * [17] VL15
197 * [16] SLR
198 * [15:12] static rate
199 * [11:8] SL
200 * [4] ICRC
201 * [3:2] C
202 * [0] FL (force loopback)
203 */
204 __be32 flags;
205 __be16 rlid;
206 u16 reserved3;
207};
208
209struct mlx4_wqe_datagram_seg {
210 __be32 av[8];
211 __be32 dqpn;
212 __be32 qkey;
213 __be32 reservd[2];
214};
215
216struct mlx4_wqe_bind_seg {
217 __be32 flags1;
218 __be32 flags2;
219 __be32 new_rkey;
220 __be32 lkey;
221 __be64 addr;
222 __be64 length;
223};
224
225struct mlx4_wqe_fmr_seg {
226 __be32 flags;
227 __be32 mem_key;
228 __be64 buf_list;
229 __be64 start_addr;
230 __be64 reg_len;
231 __be32 offset;
232 __be32 page_size;
233 u32 reserved[2];
234};
235
236struct mlx4_wqe_fmr_ext_seg {
237 u8 flags;
238 u8 reserved;
239 __be16 app_mask;
240 __be16 wire_app_tag;
241 __be16 mem_app_tag;
242 __be32 wire_ref_tag_base;
243 __be32 mem_ref_tag_base;
244};
245
246struct mlx4_wqe_local_inval_seg {
247 u8 flags;
248 u8 reserved1[3];
249 __be32 mem_key;
250 u8 reserved2[3];
251 u8 guest_id;
252 __be64 pa;
253};
254
255struct mlx4_wqe_raddr_seg {
256 __be64 raddr;
257 __be32 rkey;
258 u32 reserved;
259};
260
261struct mlx4_wqe_atomic_seg {
262 __be64 swap_add;
263 __be64 compare;
264};
265
266struct mlx4_wqe_data_seg {
267 __be32 byte_count;
268 __be32 lkey;
269 __be64 addr;
270};
271
272struct mlx4_wqe_inline_seg {
273 __be32 byte_count;
274};
275
276int mlx4_qp_modify(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
277 enum mlx4_qp_state cur_state, enum mlx4_qp_state new_state,
278 struct mlx4_qp_context *context, enum mlx4_qp_optpar optpar,
279 int sqd_event, struct mlx4_qp *qp);
280
281static inline struct mlx4_qp *__mlx4_qp_lookup(struct mlx4_dev *dev, u32 qpn)
282{
283 return radix_tree_lookup(&dev->qp_table_tree, qpn & (dev->caps.num_qps - 1));
284}
285
286void mlx4_qp_remove(struct mlx4_dev *dev, struct mlx4_qp *qp);
287
288#endif /* MLX4_QP_H */
diff --git a/include/linux/mlx4/srq.h b/include/linux/mlx4/srq.h
new file mode 100644
index 000000000000..799a0697a383
--- /dev/null
+++ b/include/linux/mlx4/srq.h
@@ -0,0 +1,42 @@
1/*
2 * Copyright (c) 2007 Cisco Systems, Inc. All rights reserved.
3 *
4 * This software is available to you under a choice of one of two
5 * licenses. You may choose to be licensed under the terms of the GNU
6 * General Public License (GPL) Version 2, available from the file
7 * COPYING in the main directory of this source tree, or the
8 * OpenIB.org BSD license below:
9 *
10 * Redistribution and use in source and binary forms, with or
11 * without modification, are permitted provided that the following
12 * conditions are met:
13 *
14 * - Redistributions of source code must retain the above
15 * copyright notice, this list of conditions and the following
16 * disclaimer.
17 *
18 * - Redistributions in binary form must reproduce the above
19 * copyright notice, this list of conditions and the following
20 * disclaimer in the documentation and/or other materials
21 * provided with the distribution.
22 *
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
27 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
28 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
29 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30 * SOFTWARE.
31 */
32
33#ifndef MLX4_SRQ_H
34#define MLX4_SRQ_H
35
36struct mlx4_wqe_srq_next_seg {
37 u16 reserved1;
38 __be16 next_wqe_index;
39 u32 reserved2[3];
40};
41
42#endif /* MLX4_SRQ_H */
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 2f1544e83042..d09b1345a3a1 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -83,6 +83,9 @@ struct per_cpu_pages {
83 83
84struct per_cpu_pageset { 84struct per_cpu_pageset {
85 struct per_cpu_pages pcp[2]; /* 0: hot. 1: cold */ 85 struct per_cpu_pages pcp[2]; /* 0: hot. 1: cold */
86#ifdef CONFIG_NUMA
87 s8 expire;
88#endif
86#ifdef CONFIG_SMP 89#ifdef CONFIG_SMP
87 s8 stat_threshold; 90 s8 stat_threshold;
88 s8 vm_stat_diff[NR_VM_ZONE_STAT_ITEMS]; 91 s8 vm_stat_diff[NR_VM_ZONE_STAT_ITEMS];
diff --git a/include/linux/module.h b/include/linux/module.h
index 6d3dc9c4ff96..792d483c9af7 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -356,6 +356,9 @@ struct module
356 keeping pointers to this stuff */ 356 keeping pointers to this stuff */
357 char *args; 357 char *args;
358}; 358};
359#ifndef MODULE_ARCH_INIT
360#define MODULE_ARCH_INIT {}
361#endif
359 362
360/* FIXME: It'd be nice to isolate modules during init, too, so they 363/* FIXME: It'd be nice to isolate modules during init, too, so they
361 aren't used before they (may) fail. But presently too much code 364 aren't used before they (may) fail. But presently too much code
diff --git a/include/linux/mount.h b/include/linux/mount.h
index dab69afee2fa..6d3047d8c91c 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -33,7 +33,7 @@ struct mnt_namespace;
33 33
34#define MNT_SHARED 0x1000 /* if the vfsmount is a shared mount */ 34#define MNT_SHARED 0x1000 /* if the vfsmount is a shared mount */
35#define MNT_UNBINDABLE 0x2000 /* if the vfsmount is a unbindable mount */ 35#define MNT_UNBINDABLE 0x2000 /* if the vfsmount is a unbindable mount */
36#define MNT_PNODE_MASK 0x3000 /* propogation flag mask */ 36#define MNT_PNODE_MASK 0x3000 /* propagation flag mask */
37 37
38struct vfsmount { 38struct vfsmount {
39 struct list_head mnt_hash; 39 struct list_head mnt_hash;
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 45d482ce8397..fd64ccfbce02 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -9,10 +9,6 @@
9#ifndef __MTD_MTD_H__ 9#ifndef __MTD_MTD_H__
10#define __MTD_MTD_H__ 10#define __MTD_MTD_H__
11 11
12#ifndef __KERNEL__
13#error This is a kernel header. Perhaps include mtd-user.h instead?
14#endif
15
16#include <linux/types.h> 12#include <linux/types.h>
17#include <linux/module.h> 13#include <linux/module.h>
18#include <linux/uio.h> 14#include <linux/uio.h>
@@ -137,9 +133,6 @@ struct mtd_info {
137 int numeraseregions; 133 int numeraseregions;
138 struct mtd_erase_region_info *eraseregions; 134 struct mtd_erase_region_info *eraseregions;
139 135
140 /* This really shouldn't be here. It can go away in 2.5 */
141 u_int32_t bank_size;
142
143 int (*erase) (struct mtd_info *mtd, struct erase_info *instr); 136 int (*erase) (struct mtd_info *mtd, struct erase_info *instr);
144 137
145 /* This stuff for eXecute-In-Place */ 138 /* This stuff for eXecute-In-Place */
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index cf197ad62da6..d2365c8dcacc 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -560,6 +560,7 @@ extern int nand_do_read(struct mtd_info *mtd, loff_t from, size_t len,
560 * @chip_delay: R/B delay value in us 560 * @chip_delay: R/B delay value in us
561 * @options: Option flags, e.g. 16bit buswidth 561 * @options: Option flags, e.g. 16bit buswidth
562 * @ecclayout: ecc layout info structure 562 * @ecclayout: ecc layout info structure
563 * @part_probe_types: NULL-terminated array of probe types
563 * @priv: hardware controller specific settings 564 * @priv: hardware controller specific settings
564 */ 565 */
565struct platform_nand_chip { 566struct platform_nand_chip {
@@ -570,6 +571,7 @@ struct platform_nand_chip {
570 struct nand_ecclayout *ecclayout; 571 struct nand_ecclayout *ecclayout;
571 int chip_delay; 572 int chip_delay;
572 unsigned int options; 573 unsigned int options;
574 const char **part_probe_types;
573 void *priv; 575 void *priv;
574}; 576};
575 577
@@ -578,6 +580,8 @@ struct platform_nand_chip {
578 * @hwcontrol: platform specific hardware control structure 580 * @hwcontrol: platform specific hardware control structure
579 * @dev_ready: platform specific function to read ready/busy pin 581 * @dev_ready: platform specific function to read ready/busy pin
580 * @select_chip: platform specific chip select function 582 * @select_chip: platform specific chip select function
583 * @cmd_ctrl: platform specific function for controlling
584 * ALE/CLE/nCE. Also used to write command and address
581 * @priv: private data to transport driver specific settings 585 * @priv: private data to transport driver specific settings
582 * 586 *
583 * All fields are optional and depend on the hardware driver requirements 587 * All fields are optional and depend on the hardware driver requirements
@@ -586,9 +590,21 @@ struct platform_nand_ctrl {
586 void (*hwcontrol)(struct mtd_info *mtd, int cmd); 590 void (*hwcontrol)(struct mtd_info *mtd, int cmd);
587 int (*dev_ready)(struct mtd_info *mtd); 591 int (*dev_ready)(struct mtd_info *mtd);
588 void (*select_chip)(struct mtd_info *mtd, int chip); 592 void (*select_chip)(struct mtd_info *mtd, int chip);
593 void (*cmd_ctrl)(struct mtd_info *mtd, int dat,
594 unsigned int ctrl);
589 void *priv; 595 void *priv;
590}; 596};
591 597
598/**
599 * struct platform_nand_data - container structure for platform-specific data
600 * @chip: chip level chip structure
601 * @ctrl: controller level device structure
602 */
603struct platform_nand_data {
604 struct platform_nand_chip chip;
605 struct platform_nand_ctrl ctrl;
606};
607
592/* Some helpers to access the data structures */ 608/* Some helpers to access the data structures */
593static inline 609static inline
594struct platform_nand_chip *get_platform_nandchip(struct mtd_info *mtd) 610struct platform_nand_chip *get_platform_nandchip(struct mtd_info *mtd)
diff --git a/include/linux/mutex.h b/include/linux/mutex.h
index b81bc2adaeff..0d50ea3df689 100644
--- a/include/linux/mutex.h
+++ b/include/linux/mutex.h
@@ -121,11 +121,12 @@ static inline int fastcall mutex_is_locked(struct mutex *lock)
121 * Also see Documentation/mutex-design.txt. 121 * Also see Documentation/mutex-design.txt.
122 */ 122 */
123extern void fastcall mutex_lock(struct mutex *lock); 123extern void fastcall mutex_lock(struct mutex *lock);
124extern int fastcall mutex_lock_interruptible(struct mutex *lock); 124extern int __must_check fastcall mutex_lock_interruptible(struct mutex *lock);
125 125
126#ifdef CONFIG_DEBUG_LOCK_ALLOC 126#ifdef CONFIG_DEBUG_LOCK_ALLOC
127extern void mutex_lock_nested(struct mutex *lock, unsigned int subclass); 127extern void mutex_lock_nested(struct mutex *lock, unsigned int subclass);
128extern int mutex_lock_interruptible_nested(struct mutex *lock, unsigned int subclass); 128extern int __must_check mutex_lock_interruptible_nested(struct mutex *lock,
129 unsigned int subclass);
129#else 130#else
130# define mutex_lock_nested(lock, subclass) mutex_lock(lock) 131# define mutex_lock_nested(lock, subclass) mutex_lock(lock)
131# define mutex_lock_interruptible_nested(lock, subclass) mutex_lock_interruptible(lock) 132# define mutex_lock_interruptible_nested(lock, subclass) mutex_lock_interruptible(lock)
diff --git a/include/linux/nfs4_acl.h b/include/linux/nfs4_acl.h
index 409b6e02f337..c9c05a78e9bb 100644
--- a/include/linux/nfs4_acl.h
+++ b/include/linux/nfs4_acl.h
@@ -44,7 +44,6 @@
44#define NFS4_ACL_MAX 170 44#define NFS4_ACL_MAX 170
45 45
46struct nfs4_acl *nfs4_acl_new(int); 46struct nfs4_acl *nfs4_acl_new(int);
47void nfs4_acl_add_ace(struct nfs4_acl *, u32, u32, u32, int, uid_t);
48int nfs4_acl_get_whotype(char *, u32); 47int nfs4_acl_get_whotype(char *, u32);
49int nfs4_acl_write_who(int who, char *p); 48int nfs4_acl_write_who(int who, char *p);
50int nfs4_acl_permission(struct nfs4_acl *acl, uid_t owner, gid_t group, 49int nfs4_acl_permission(struct nfs4_acl *acl, uid_t owner, gid_t group,
diff --git a/include/linux/notifier.h b/include/linux/notifier.h
index 10a43ed0527e..9431101bf876 100644
--- a/include/linux/notifier.h
+++ b/include/linux/notifier.h
@@ -112,32 +112,40 @@ extern void srcu_init_notifier_head(struct srcu_notifier_head *nh);
112 112
113#ifdef __KERNEL__ 113#ifdef __KERNEL__
114 114
115extern int atomic_notifier_chain_register(struct atomic_notifier_head *, 115extern int atomic_notifier_chain_register(struct atomic_notifier_head *nh,
116 struct notifier_block *); 116 struct notifier_block *nb);
117extern int blocking_notifier_chain_register(struct blocking_notifier_head *, 117extern int blocking_notifier_chain_register(struct blocking_notifier_head *nh,
118 struct notifier_block *); 118 struct notifier_block *nb);
119extern int raw_notifier_chain_register(struct raw_notifier_head *, 119extern int raw_notifier_chain_register(struct raw_notifier_head *nh,
120 struct notifier_block *); 120 struct notifier_block *nb);
121extern int srcu_notifier_chain_register(struct srcu_notifier_head *, 121extern int srcu_notifier_chain_register(struct srcu_notifier_head *nh,
122 struct notifier_block *); 122 struct notifier_block *nb);
123 123
124extern int atomic_notifier_chain_unregister(struct atomic_notifier_head *, 124extern int atomic_notifier_chain_unregister(struct atomic_notifier_head *nh,
125 struct notifier_block *); 125 struct notifier_block *nb);
126extern int blocking_notifier_chain_unregister(struct blocking_notifier_head *, 126extern int blocking_notifier_chain_unregister(struct blocking_notifier_head *nh,
127 struct notifier_block *); 127 struct notifier_block *nb);
128extern int raw_notifier_chain_unregister(struct raw_notifier_head *, 128extern int raw_notifier_chain_unregister(struct raw_notifier_head *nh,
129 struct notifier_block *); 129 struct notifier_block *nb);
130extern int srcu_notifier_chain_unregister(struct srcu_notifier_head *, 130extern int srcu_notifier_chain_unregister(struct srcu_notifier_head *nh,
131 struct notifier_block *); 131 struct notifier_block *nb);
132 132
133extern int atomic_notifier_call_chain(struct atomic_notifier_head *, 133extern int atomic_notifier_call_chain(struct atomic_notifier_head *nh,
134 unsigned long val, void *v); 134 unsigned long val, void *v);
135extern int blocking_notifier_call_chain(struct blocking_notifier_head *, 135extern int __atomic_notifier_call_chain(struct atomic_notifier_head *nh,
136 unsigned long val, void *v, int nr_to_call, int *nr_calls);
137extern int blocking_notifier_call_chain(struct blocking_notifier_head *nh,
136 unsigned long val, void *v); 138 unsigned long val, void *v);
137extern int raw_notifier_call_chain(struct raw_notifier_head *, 139extern int __blocking_notifier_call_chain(struct blocking_notifier_head *nh,
140 unsigned long val, void *v, int nr_to_call, int *nr_calls);
141extern int raw_notifier_call_chain(struct raw_notifier_head *nh,
138 unsigned long val, void *v); 142 unsigned long val, void *v);
139extern int srcu_notifier_call_chain(struct srcu_notifier_head *, 143extern int __raw_notifier_call_chain(struct raw_notifier_head *nh,
144 unsigned long val, void *v, int nr_to_call, int *nr_calls);
145extern int srcu_notifier_call_chain(struct srcu_notifier_head *nh,
140 unsigned long val, void *v); 146 unsigned long val, void *v);
147extern int __srcu_notifier_call_chain(struct srcu_notifier_head *nh,
148 unsigned long val, void *v, int nr_to_call, int *nr_calls);
141 149
142#define NOTIFY_DONE 0x0000 /* Don't care */ 150#define NOTIFY_DONE 0x0000 /* Don't care */
143#define NOTIFY_OK 0x0001 /* Suits me */ 151#define NOTIFY_OK 0x0001 /* Suits me */
@@ -186,6 +194,20 @@ extern int srcu_notifier_call_chain(struct srcu_notifier_head *,
186#define CPU_DOWN_PREPARE 0x0005 /* CPU (unsigned)v going down */ 194#define CPU_DOWN_PREPARE 0x0005 /* CPU (unsigned)v going down */
187#define CPU_DOWN_FAILED 0x0006 /* CPU (unsigned)v NOT going down */ 195#define CPU_DOWN_FAILED 0x0006 /* CPU (unsigned)v NOT going down */
188#define CPU_DEAD 0x0007 /* CPU (unsigned)v dead */ 196#define CPU_DEAD 0x0007 /* CPU (unsigned)v dead */
197#define CPU_LOCK_ACQUIRE 0x0008 /* Acquire all hotcpu locks */
198#define CPU_LOCK_RELEASE 0x0009 /* Release all hotcpu locks */
199
200/* Used for CPU hotplug events occuring while tasks are frozen due to a suspend
201 * operation in progress
202 */
203#define CPU_TASKS_FROZEN 0x0010
204
205#define CPU_ONLINE_FROZEN (CPU_ONLINE | CPU_TASKS_FROZEN)
206#define CPU_UP_PREPARE_FROZEN (CPU_UP_PREPARE | CPU_TASKS_FROZEN)
207#define CPU_UP_CANCELED_FROZEN (CPU_UP_CANCELED | CPU_TASKS_FROZEN)
208#define CPU_DOWN_PREPARE_FROZEN (CPU_DOWN_PREPARE | CPU_TASKS_FROZEN)
209#define CPU_DOWN_FAILED_FROZEN (CPU_DOWN_FAILED | CPU_TASKS_FROZEN)
210#define CPU_DEAD_FROZEN (CPU_DEAD | CPU_TASKS_FROZEN)
189 211
190#endif /* __KERNEL__ */ 212#endif /* __KERNEL__ */
191#endif /* _LINUX_NOTIFIER_H */ 213#endif /* _LINUX_NOTIFIER_H */
diff --git a/include/linux/pm.h b/include/linux/pm.h
index 6e8fa3049e5d..87545e0f0b58 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -107,26 +107,11 @@ typedef int __bitwise suspend_state_t;
107#define PM_SUSPEND_ON ((__force suspend_state_t) 0) 107#define PM_SUSPEND_ON ((__force suspend_state_t) 0)
108#define PM_SUSPEND_STANDBY ((__force suspend_state_t) 1) 108#define PM_SUSPEND_STANDBY ((__force suspend_state_t) 1)
109#define PM_SUSPEND_MEM ((__force suspend_state_t) 3) 109#define PM_SUSPEND_MEM ((__force suspend_state_t) 3)
110#define PM_SUSPEND_DISK ((__force suspend_state_t) 4) 110#define PM_SUSPEND_MAX ((__force suspend_state_t) 4)
111#define PM_SUSPEND_MAX ((__force suspend_state_t) 5)
112
113typedef int __bitwise suspend_disk_method_t;
114
115/* invalid must be 0 so struct pm_ops initialisers can leave it out */
116#define PM_DISK_INVALID ((__force suspend_disk_method_t) 0)
117#define PM_DISK_PLATFORM ((__force suspend_disk_method_t) 1)
118#define PM_DISK_SHUTDOWN ((__force suspend_disk_method_t) 2)
119#define PM_DISK_REBOOT ((__force suspend_disk_method_t) 3)
120#define PM_DISK_TEST ((__force suspend_disk_method_t) 4)
121#define PM_DISK_TESTPROC ((__force suspend_disk_method_t) 5)
122#define PM_DISK_MAX ((__force suspend_disk_method_t) 6)
123 111
124/** 112/**
125 * struct pm_ops - Callbacks for managing platform dependent suspend states. 113 * struct pm_ops - Callbacks for managing platform dependent suspend states.
126 * @valid: Callback to determine whether the given state can be entered. 114 * @valid: Callback to determine whether the given state can be entered.
127 * If %CONFIG_SOFTWARE_SUSPEND is set then %PM_SUSPEND_DISK is
128 * always valid and never passed to this call. If not assigned,
129 * no suspend states are valid.
130 * Valid states are advertised in /sys/power/state but can still 115 * Valid states are advertised in /sys/power/state but can still
131 * be rejected by prepare or enter if the conditions aren't right. 116 * be rejected by prepare or enter if the conditions aren't right.
132 * There is a %pm_valid_only_mem function available that can be assigned 117 * There is a %pm_valid_only_mem function available that can be assigned
@@ -140,24 +125,12 @@ typedef int __bitwise suspend_disk_method_t;
140 * 125 *
141 * @finish: Called when the system has left the given state and all devices 126 * @finish: Called when the system has left the given state and all devices
142 * are resumed. The return value is ignored. 127 * are resumed. The return value is ignored.
143 *
144 * @pm_disk_mode: The generic code always allows one of the shutdown methods
145 * %PM_DISK_SHUTDOWN, %PM_DISK_REBOOT, %PM_DISK_TEST and
146 * %PM_DISK_TESTPROC. If this variable is set, the mode it is set
147 * to is allowed in addition to those modes and is also made default.
148 * When this mode is sent selected, the @prepare call will be called
149 * before suspending to disk (if present), the @enter call should be
150 * present and will be called after all state has been saved and the
151 * machine is ready to be powered off; the @finish callback is called
152 * after state has been restored. All these calls are called with
153 * %PM_SUSPEND_DISK as the state.
154 */ 128 */
155struct pm_ops { 129struct pm_ops {
156 int (*valid)(suspend_state_t state); 130 int (*valid)(suspend_state_t state);
157 int (*prepare)(suspend_state_t state); 131 int (*prepare)(suspend_state_t state);
158 int (*enter)(suspend_state_t state); 132 int (*enter)(suspend_state_t state);
159 int (*finish)(suspend_state_t state); 133 int (*finish)(suspend_state_t state);
160 suspend_disk_method_t pm_disk_mode;
161}; 134};
162 135
163/** 136/**
@@ -276,8 +249,6 @@ extern void device_power_up(void);
276extern void device_resume(void); 249extern void device_resume(void);
277 250
278#ifdef CONFIG_PM 251#ifdef CONFIG_PM
279extern suspend_disk_method_t pm_disk_mode;
280
281extern int device_suspend(pm_message_t state); 252extern int device_suspend(pm_message_t state);
282extern int device_prepare_suspend(pm_message_t state); 253extern int device_prepare_suspend(pm_message_t state);
283 254
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h
index 0deb842541ac..f9e77d2ee320 100644
--- a/include/linux/radix-tree.h
+++ b/include/linux/radix-tree.h
@@ -87,10 +87,10 @@ do { \
87 * management of their lifetimes must be completely managed by API users. 87 * management of their lifetimes must be completely managed by API users.
88 * 88 *
89 * For API usage, in general, 89 * For API usage, in general,
90 * - any function _modifying_ the the tree or tags (inserting or deleting 90 * - any function _modifying_ the tree or tags (inserting or deleting
91 * items, setting or clearing tags must exclude other modifications, and 91 * items, setting or clearing tags must exclude other modifications, and
92 * exclude any functions reading the tree. 92 * exclude any functions reading the tree.
93 * - any function _reading_ the the tree or tags (looking up items or tags, 93 * - any function _reading_ the tree or tags (looking up items or tags,
94 * gang lookups) must exclude modifications to the tree, but may occur 94 * gang lookups) must exclude modifications to the tree, but may occur
95 * concurrently with other readers. 95 * concurrently with other readers.
96 * 96 *
diff --git a/include/linux/relay.h b/include/linux/relay.h
index 759a0f97bec2..6cd8c4425fc7 100644
--- a/include/linux/relay.h
+++ b/include/linux/relay.h
@@ -12,6 +12,7 @@
12 12
13#include <linux/types.h> 13#include <linux/types.h>
14#include <linux/sched.h> 14#include <linux/sched.h>
15#include <linux/timer.h>
15#include <linux/wait.h> 16#include <linux/wait.h>
16#include <linux/list.h> 17#include <linux/list.h>
17#include <linux/fs.h> 18#include <linux/fs.h>
@@ -38,7 +39,7 @@ struct rchan_buf
38 size_t subbufs_consumed; /* count of sub-buffers consumed */ 39 size_t subbufs_consumed; /* count of sub-buffers consumed */
39 struct rchan *chan; /* associated channel */ 40 struct rchan *chan; /* associated channel */
40 wait_queue_head_t read_wait; /* reader wait queue */ 41 wait_queue_head_t read_wait; /* reader wait queue */
41 struct delayed_work wake_readers; /* reader wake-up work struct */ 42 struct timer_list timer; /* reader wake-up timer */
42 struct dentry *dentry; /* channel file dentry */ 43 struct dentry *dentry; /* channel file dentry */
43 struct kref kref; /* channel buffer refcount */ 44 struct kref kref; /* channel buffer refcount */
44 struct page **page_array; /* array of current buffer pages */ 45 struct page **page_array; /* array of current buffer pages */
diff --git a/include/linux/rslib.h b/include/linux/rslib.h
index ace25acfdc97..746580c1939c 100644
--- a/include/linux/rslib.h
+++ b/include/linux/rslib.h
@@ -34,6 +34,7 @@
34 * @prim: Primitive element, index form 34 * @prim: Primitive element, index form
35 * @iprim: prim-th root of 1, index form 35 * @iprim: prim-th root of 1, index form
36 * @gfpoly: The primitive generator polynominal 36 * @gfpoly: The primitive generator polynominal
37 * @gffunc: Function to generate the field, if non-canonical representation
37 * @users: Users of this structure 38 * @users: Users of this structure
38 * @list: List entry for the rs control list 39 * @list: List entry for the rs control list
39*/ 40*/
@@ -48,6 +49,7 @@ struct rs_control {
48 int prim; 49 int prim;
49 int iprim; 50 int iprim;
50 int gfpoly; 51 int gfpoly;
52 int (*gffunc)(int);
51 int users; 53 int users;
52 struct list_head list; 54 struct list_head list;
53}; 55};
@@ -77,6 +79,8 @@ int decode_rs16(struct rs_control *rs, uint16_t *data, uint16_t *par, int len,
77/* Create or get a matching rs control structure */ 79/* Create or get a matching rs control structure */
78struct rs_control *init_rs(int symsize, int gfpoly, int fcr, int prim, 80struct rs_control *init_rs(int symsize, int gfpoly, int fcr, int prim,
79 int nroots); 81 int nroots);
82struct rs_control *init_rs_non_canonical(int symsize, int (*func)(int),
83 int fcr, int prim, int nroots);
80 84
81/* Release a rs control structure */ 85/* Release a rs control structure */
82void free_rs(struct rs_control *rs); 86void free_rs(struct rs_control *rs);
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 3d95c480f58d..17b72d88c4cb 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -817,7 +817,7 @@ struct prio_array;
817 817
818struct task_struct { 818struct task_struct {
819 volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ 819 volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */
820 struct thread_info *thread_info; 820 void *stack;
821 atomic_t usage; 821 atomic_t usage;
822 unsigned int flags; /* per process flags, defined below */ 822 unsigned int flags; /* per process flags, defined below */
823 unsigned int ptrace; 823 unsigned int ptrace;
@@ -1317,6 +1317,7 @@ extern int in_egroup_p(gid_t);
1317 1317
1318extern void proc_caches_init(void); 1318extern void proc_caches_init(void);
1319extern void flush_signals(struct task_struct *); 1319extern void flush_signals(struct task_struct *);
1320extern void ignore_signals(struct task_struct *);
1320extern void flush_signal_handlers(struct task_struct *, int force_default); 1321extern void flush_signal_handlers(struct task_struct *, int force_default);
1321extern int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info); 1322extern int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info);
1322 1323
@@ -1512,8 +1513,8 @@ static inline void unlock_task_sighand(struct task_struct *tsk,
1512 1513
1513#ifndef __HAVE_THREAD_FUNCTIONS 1514#ifndef __HAVE_THREAD_FUNCTIONS
1514 1515
1515#define task_thread_info(task) (task)->thread_info 1516#define task_thread_info(task) ((struct thread_info *)(task)->stack)
1516#define task_stack_page(task) ((void*)((task)->thread_info)) 1517#define task_stack_page(task) ((task)->stack)
1517 1518
1518static inline void setup_thread_stack(struct task_struct *p, struct task_struct *org) 1519static inline void setup_thread_stack(struct task_struct *p, struct task_struct *org)
1519{ 1520{
@@ -1523,7 +1524,7 @@ static inline void setup_thread_stack(struct task_struct *p, struct task_struct
1523 1524
1524static inline unsigned long *end_of_stack(struct task_struct *p) 1525static inline unsigned long *end_of_stack(struct task_struct *p)
1525{ 1526{
1526 return (unsigned long *)(p->thread_info + 1); 1527 return (unsigned long *)(task_thread_info(p) + 1);
1527} 1528}
1528 1529
1529#endif 1530#endif
diff --git a/include/linux/security.h b/include/linux/security.h
index 47e82c120f9a..9eb9e0fe0331 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -322,7 +322,7 @@ struct request_sock;
322 * @dir contains the inode structure of parent of the new file. 322 * @dir contains the inode structure of parent of the new file.
323 * @dentry contains the dentry structure of the new file. 323 * @dentry contains the dentry structure of the new file.
324 * @mode contains the mode of the new file. 324 * @mode contains the mode of the new file.
325 * @dev contains the the device number. 325 * @dev contains the device number.
326 * Return 0 if permission is granted. 326 * Return 0 if permission is granted.
327 * @inode_rename: 327 * @inode_rename:
328 * Check for permission to rename a file or directory. 328 * Check for permission to rename a file or directory.
diff --git a/include/linux/signal.h b/include/linux/signal.h
index 14749056dd63..3fa0fab4a04b 100644
--- a/include/linux/signal.h
+++ b/include/linux/signal.h
@@ -243,6 +243,131 @@ extern int get_signal_to_deliver(siginfo_t *info, struct k_sigaction *return_ka,
243 243
244extern struct kmem_cache *sighand_cachep; 244extern struct kmem_cache *sighand_cachep;
245 245
246/*
247 * In POSIX a signal is sent either to a specific thread (Linux task)
248 * or to the process as a whole (Linux thread group). How the signal
249 * is sent determines whether it's to one thread or the whole group,
250 * which determines which signal mask(s) are involved in blocking it
251 * from being delivered until later. When the signal is delivered,
252 * either it's caught or ignored by a user handler or it has a default
253 * effect that applies to the whole thread group (POSIX process).
254 *
255 * The possible effects an unblocked signal set to SIG_DFL can have are:
256 * ignore - Nothing Happens
257 * terminate - kill the process, i.e. all threads in the group,
258 * similar to exit_group. The group leader (only) reports
259 * WIFSIGNALED status to its parent.
260 * coredump - write a core dump file describing all threads using
261 * the same mm and then kill all those threads
262 * stop - stop all the threads in the group, i.e. TASK_STOPPED state
263 *
264 * SIGKILL and SIGSTOP cannot be caught, blocked, or ignored.
265 * Other signals when not blocked and set to SIG_DFL behaves as follows.
266 * The job control signals also have other special effects.
267 *
268 * +--------------------+------------------+
269 * | POSIX signal | default action |
270 * +--------------------+------------------+
271 * | SIGHUP | terminate |
272 * | SIGINT | terminate |
273 * | SIGQUIT | coredump |
274 * | SIGILL | coredump |
275 * | SIGTRAP | coredump |
276 * | SIGABRT/SIGIOT | coredump |
277 * | SIGBUS | coredump |
278 * | SIGFPE | coredump |
279 * | SIGKILL | terminate(+) |
280 * | SIGUSR1 | terminate |
281 * | SIGSEGV | coredump |
282 * | SIGUSR2 | terminate |
283 * | SIGPIPE | terminate |
284 * | SIGALRM | terminate |
285 * | SIGTERM | terminate |
286 * | SIGCHLD | ignore |
287 * | SIGCONT | ignore(*) |
288 * | SIGSTOP | stop(*)(+) |
289 * | SIGTSTP | stop(*) |
290 * | SIGTTIN | stop(*) |
291 * | SIGTTOU | stop(*) |
292 * | SIGURG | ignore |
293 * | SIGXCPU | coredump |
294 * | SIGXFSZ | coredump |
295 * | SIGVTALRM | terminate |
296 * | SIGPROF | terminate |
297 * | SIGPOLL/SIGIO | terminate |
298 * | SIGSYS/SIGUNUSED | coredump |
299 * | SIGSTKFLT | terminate |
300 * | SIGWINCH | ignore |
301 * | SIGPWR | terminate |
302 * | SIGRTMIN-SIGRTMAX | terminate |
303 * +--------------------+------------------+
304 * | non-POSIX signal | default action |
305 * +--------------------+------------------+
306 * | SIGEMT | coredump |
307 * +--------------------+------------------+
308 *
309 * (+) For SIGKILL and SIGSTOP the action is "always", not just "default".
310 * (*) Special job control effects:
311 * When SIGCONT is sent, it resumes the process (all threads in the group)
312 * from TASK_STOPPED state and also clears any pending/queued stop signals
313 * (any of those marked with "stop(*)"). This happens regardless of blocking,
314 * catching, or ignoring SIGCONT. When any stop signal is sent, it clears
315 * any pending/queued SIGCONT signals; this happens regardless of blocking,
316 * catching, or ignored the stop signal, though (except for SIGSTOP) the
317 * default action of stopping the process may happen later or never.
318 */
319
320#ifdef SIGEMT
321#define SIGEMT_MASK rt_sigmask(SIGEMT)
322#else
323#define SIGEMT_MASK 0
324#endif
325
326#if SIGRTMIN > BITS_PER_LONG
327#define rt_sigmask(sig) (1ULL << ((sig)-1))
328#else
329#define rt_sigmask(sig) sigmask(sig)
330#endif
331#define siginmask(sig, mask) (rt_sigmask(sig) & (mask))
332
333#define SIG_KERNEL_ONLY_MASK (\
334 rt_sigmask(SIGKILL) | rt_sigmask(SIGSTOP))
335
336#define SIG_KERNEL_STOP_MASK (\
337 rt_sigmask(SIGSTOP) | rt_sigmask(SIGTSTP) | \
338 rt_sigmask(SIGTTIN) | rt_sigmask(SIGTTOU) )
339
340#define SIG_KERNEL_COREDUMP_MASK (\
341 rt_sigmask(SIGQUIT) | rt_sigmask(SIGILL) | \
342 rt_sigmask(SIGTRAP) | rt_sigmask(SIGABRT) | \
343 rt_sigmask(SIGFPE) | rt_sigmask(SIGSEGV) | \
344 rt_sigmask(SIGBUS) | rt_sigmask(SIGSYS) | \
345 rt_sigmask(SIGXCPU) | rt_sigmask(SIGXFSZ) | \
346 SIGEMT_MASK )
347
348#define SIG_KERNEL_IGNORE_MASK (\
349 rt_sigmask(SIGCONT) | rt_sigmask(SIGCHLD) | \
350 rt_sigmask(SIGWINCH) | rt_sigmask(SIGURG) )
351
352#define sig_kernel_only(sig) \
353 (((sig) < SIGRTMIN) && siginmask(sig, SIG_KERNEL_ONLY_MASK))
354#define sig_kernel_coredump(sig) \
355 (((sig) < SIGRTMIN) && siginmask(sig, SIG_KERNEL_COREDUMP_MASK))
356#define sig_kernel_ignore(sig) \
357 (((sig) < SIGRTMIN) && siginmask(sig, SIG_KERNEL_IGNORE_MASK))
358#define sig_kernel_stop(sig) \
359 (((sig) < SIGRTMIN) && siginmask(sig, SIG_KERNEL_STOP_MASK))
360
361#define sig_needs_tasklist(sig) ((sig) == SIGCONT)
362
363#define sig_user_defined(t, signr) \
364 (((t)->sighand->action[(signr)-1].sa.sa_handler != SIG_DFL) && \
365 ((t)->sighand->action[(signr)-1].sa.sa_handler != SIG_IGN))
366
367#define sig_fatal(t, signr) \
368 (!siginmask(signr, SIG_KERNEL_IGNORE_MASK|SIG_KERNEL_STOP_MASK) && \
369 (t)->sighand->action[(signr)-1].sa.sa_handler == SIG_DFL)
370
246#endif /* __KERNEL__ */ 371#endif /* __KERNEL__ */
247 372
248#endif /* _LINUX_SIGNAL_H */ 373#endif /* _LINUX_SIGNAL_H */
diff --git a/include/linux/smp.h b/include/linux/smp.h
index 7ba23ec8211b..3f70149eabbb 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -83,7 +83,6 @@ void smp_prepare_boot_cpu(void);
83 * These macros fold the SMP functionality into a single CPU system 83 * These macros fold the SMP functionality into a single CPU system
84 */ 84 */
85#define raw_smp_processor_id() 0 85#define raw_smp_processor_id() 0
86#define hard_smp_processor_id() 0
87static inline int up_smp_call_function(void) 86static inline int up_smp_call_function(void)
88{ 87{
89 return 0; 88 return 0;
diff --git a/include/linux/sonypi.h b/include/linux/sonypi.h
index f56d24734950..34d4b075f7b8 100644
--- a/include/linux/sonypi.h
+++ b/include/linux/sonypi.h
@@ -5,7 +5,7 @@
5 * 5 *
6 * Copyright (C) 2005 Narayanan R S <nars@kadamba.org> 6 * Copyright (C) 2005 Narayanan R S <nars@kadamba.org>
7 7
8 * Copyright (C) 2001-2002 Alcôve <www.alcove.com> 8 * Copyright (C) 2001-2002 Alcôve <www.alcove.com>
9 * 9 *
10 * Copyright (C) 2001 Michael Ashley <m.ashley@unsw.edu.au> 10 * Copyright (C) 2001 Michael Ashley <m.ashley@unsw.edu.au>
11 * 11 *
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index 35fa4d5aadd0..4a7ae8ab6eb8 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -396,4 +396,23 @@ char * svc_print_addr(struct svc_rqst *, char *, size_t);
396 396
397#define RPC_MAX_ADDRBUFLEN (63U) 397#define RPC_MAX_ADDRBUFLEN (63U)
398 398
399/*
400 * When we want to reduce the size of the reserved space in the response
401 * buffer, we need to take into account the size of any checksum data that
402 * may be at the end of the packet. This is difficult to determine exactly
403 * for all cases without actually generating the checksum, so we just use a
404 * static value.
405 */
406static inline void
407svc_reserve_auth(struct svc_rqst *rqstp, int space)
408{
409 int added_space = 0;
410
411 switch(rqstp->rq_authop->flavour) {
412 case RPC_AUTH_GSS:
413 added_space = RPC_MAX_AUTH_SIZE;
414 }
415 return svc_reserve(rqstp, space + added_space);
416}
417
399#endif /* SUNRPC_SVC_H */ 418#endif /* SUNRPC_SVC_H */
diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h
index 7909687557bf..e21dd93ac4b7 100644
--- a/include/linux/sunrpc/svcsock.h
+++ b/include/linux/sunrpc/svcsock.h
@@ -37,7 +37,8 @@ struct svc_sock {
37 37
38 atomic_t sk_reserved; /* space on outq that is reserved */ 38 atomic_t sk_reserved; /* space on outq that is reserved */
39 39
40 spinlock_t sk_defer_lock; /* protects sk_deferred */ 40 spinlock_t sk_lock; /* protects sk_deferred and
41 * sk_info_authunix */
41 struct list_head sk_deferred; /* deferred requests that need to 42 struct list_head sk_deferred; /* deferred requests that need to
42 * be revisted */ 43 * be revisted */
43 struct mutex sk_mutex; /* to serialize sending data */ 44 struct mutex sk_mutex; /* to serialize sending data */
diff --git a/include/linux/suspend.h b/include/linux/suspend.h
index 1f2f7ba9e709..9c7cb6430666 100644
--- a/include/linux/suspend.h
+++ b/include/linux/suspend.h
@@ -32,6 +32,24 @@ static inline int pm_prepare_console(void) { return 0; }
32static inline void pm_restore_console(void) {} 32static inline void pm_restore_console(void) {}
33#endif 33#endif
34 34
35/**
36 * struct hibernation_ops - hibernation platform support
37 *
38 * The methods in this structure allow a platform to override the default
39 * mechanism of shutting down the machine during a hibernation transition.
40 *
41 * All three methods must be assigned.
42 *
43 * @prepare: prepare system for hibernation
44 * @enter: shut down system after state has been saved to disk
45 * @finish: finish/clean up after state has been reloaded
46 */
47struct hibernation_ops {
48 int (*prepare)(void);
49 int (*enter)(void);
50 void (*finish)(void);
51};
52
35#if defined(CONFIG_PM) && defined(CONFIG_SOFTWARE_SUSPEND) 53#if defined(CONFIG_PM) && defined(CONFIG_SOFTWARE_SUSPEND)
36/* kernel/power/snapshot.c */ 54/* kernel/power/snapshot.c */
37extern void __register_nosave_region(unsigned long b, unsigned long e, int km); 55extern void __register_nosave_region(unsigned long b, unsigned long e, int km);
@@ -47,12 +65,18 @@ extern int swsusp_page_is_forbidden(struct page *);
47extern void swsusp_set_page_free(struct page *); 65extern void swsusp_set_page_free(struct page *);
48extern void swsusp_unset_page_free(struct page *); 66extern void swsusp_unset_page_free(struct page *);
49extern unsigned long get_safe_page(gfp_t gfp_mask); 67extern unsigned long get_safe_page(gfp_t gfp_mask);
68
69extern void hibernation_set_ops(struct hibernation_ops *ops);
70extern int hibernate(void);
50#else 71#else
51static inline void register_nosave_region(unsigned long b, unsigned long e) {} 72static inline void register_nosave_region(unsigned long b, unsigned long e) {}
52static inline void register_nosave_region_late(unsigned long b, unsigned long e) {} 73static inline void register_nosave_region_late(unsigned long b, unsigned long e) {}
53static inline int swsusp_page_is_forbidden(struct page *p) { return 0; } 74static inline int swsusp_page_is_forbidden(struct page *p) { return 0; }
54static inline void swsusp_set_page_free(struct page *p) {} 75static inline void swsusp_set_page_free(struct page *p) {}
55static inline void swsusp_unset_page_free(struct page *p) {} 76static inline void swsusp_unset_page_free(struct page *p) {}
77
78static inline void hibernation_set_ops(struct hibernation_ops *ops) {}
79static inline int hibernate(void) { return -ENOSYS; }
56#endif /* defined(CONFIG_PM) && defined(CONFIG_SOFTWARE_SUSPEND) */ 80#endif /* defined(CONFIG_PM) && defined(CONFIG_SOFTWARE_SUSPEND) */
57 81
58void save_processor_state(void); 82void save_processor_state(void);
diff --git a/include/linux/svga.h b/include/linux/svga.h
index e1cc552e04fe..13ad0b82ac28 100644
--- a/include/linux/svga.h
+++ b/include/linux/svga.h
@@ -113,6 +113,8 @@ void svga_tilefill(struct fb_info *info, struct fb_tilerect *rect);
113void svga_tileblit(struct fb_info *info, struct fb_tileblit *blit); 113void svga_tileblit(struct fb_info *info, struct fb_tileblit *blit);
114void svga_tilecursor(struct fb_info *info, struct fb_tilecursor *cursor); 114void svga_tilecursor(struct fb_info *info, struct fb_tilecursor *cursor);
115int svga_get_tilemax(struct fb_info *info); 115int svga_get_tilemax(struct fb_info *info);
116void svga_get_caps(struct fb_info *info, struct fb_blit_caps *caps,
117 struct fb_var_screeninfo *var);
116 118
117int svga_compute_pll(const struct svga_pll *pll, u32 f_wanted, u16 *m, u16 *n, u16 *r, int node); 119int svga_compute_pll(const struct svga_pll *pll, u32 f_wanted, u16 *m, u16 *n, u16 *r, int node);
118int svga_check_timings(const struct svga_timing_regs *tm, struct fb_var_screeninfo *var, int node); 120int svga_check_timings(const struct svga_timing_regs *tm, struct fb_var_screeninfo *var, int node);
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 1912c6cbef55..3139f4412297 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -576,6 +576,8 @@ asmlinkage long sys_fstatat64(int dfd, char __user *filename,
576 struct stat64 __user *statbuf, int flag); 576 struct stat64 __user *statbuf, int flag);
577asmlinkage long sys_readlinkat(int dfd, const char __user *path, char __user *buf, 577asmlinkage long sys_readlinkat(int dfd, const char __user *path, char __user *buf,
578 int bufsiz); 578 int bufsiz);
579asmlinkage long sys_utimensat(int dfd, char __user *filename,
580 struct timespec __user *utimes, int flags);
579asmlinkage long compat_sys_futimesat(unsigned int dfd, char __user *filename, 581asmlinkage long compat_sys_futimesat(unsigned int dfd, char __user *filename,
580 struct compat_timeval __user *t); 582 struct compat_timeval __user *t);
581asmlinkage long compat_sys_newfstatat(unsigned int dfd, char __user * filename, 583asmlinkage long compat_sys_newfstatat(unsigned int dfd, char __user * filename,
diff --git a/include/linux/usb.h b/include/linux/usb.h
index cfbd2bb8fa2c..94bd38a6d947 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -126,7 +126,7 @@ enum usb_interface_condition {
126 * Each interface may have alternate settings. The initial configuration 126 * Each interface may have alternate settings. The initial configuration
127 * of a device sets altsetting 0, but the device driver can change 127 * of a device sets altsetting 0, but the device driver can change
128 * that setting using usb_set_interface(). Alternate settings are often 128 * that setting using usb_set_interface(). Alternate settings are often
129 * used to control the the use of periodic endpoints, such as by having 129 * used to control the use of periodic endpoints, such as by having
130 * different endpoints use different amounts of reserved USB bandwidth. 130 * different endpoints use different amounts of reserved USB bandwidth.
131 * All standards-conformant USB devices that use isochronous endpoints 131 * All standards-conformant USB devices that use isochronous endpoints
132 * will use them in non-default settings. 132 * will use them in non-default settings.
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h
index acb1f105870c..d9325cf8a134 100644
--- a/include/linux/vmstat.h
+++ b/include/linux/vmstat.h
@@ -212,8 +212,6 @@ extern void dec_zone_state(struct zone *, enum zone_stat_item);
212extern void __dec_zone_state(struct zone *, enum zone_stat_item); 212extern void __dec_zone_state(struct zone *, enum zone_stat_item);
213 213
214void refresh_cpu_vm_stats(int); 214void refresh_cpu_vm_stats(int);
215void refresh_vm_stats(void);
216
217#else /* CONFIG_SMP */ 215#else /* CONFIG_SMP */
218 216
219/* 217/*
@@ -260,7 +258,6 @@ static inline void __dec_zone_page_state(struct page *page,
260#define mod_zone_page_state __mod_zone_page_state 258#define mod_zone_page_state __mod_zone_page_state
261 259
262static inline void refresh_cpu_vm_stats(int cpu) { } 260static inline void refresh_cpu_vm_stats(int cpu) { }
263static inline void refresh_vm_stats(void) { }
264#endif 261#endif
265 262
266#endif /* _LINUX_VMSTAT_H */ 263#endif /* _LINUX_VMSTAT_H */
diff --git a/include/linux/workqueue.h b/include/linux/workqueue.h
index f16ba1e0687d..d555f31c0746 100644
--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -24,15 +24,13 @@ typedef void (*work_func_t)(struct work_struct *work);
24struct work_struct { 24struct work_struct {
25 atomic_long_t data; 25 atomic_long_t data;
26#define WORK_STRUCT_PENDING 0 /* T if work item pending execution */ 26#define WORK_STRUCT_PENDING 0 /* T if work item pending execution */
27#define WORK_STRUCT_NOAUTOREL 1 /* F if work item automatically released on exec */
28#define WORK_STRUCT_FLAG_MASK (3UL) 27#define WORK_STRUCT_FLAG_MASK (3UL)
29#define WORK_STRUCT_WQ_DATA_MASK (~WORK_STRUCT_FLAG_MASK) 28#define WORK_STRUCT_WQ_DATA_MASK (~WORK_STRUCT_FLAG_MASK)
30 struct list_head entry; 29 struct list_head entry;
31 work_func_t func; 30 work_func_t func;
32}; 31};
33 32
34#define WORK_DATA_INIT(autorelease) \ 33#define WORK_DATA_INIT() ATOMIC_LONG_INIT(0)
35 ATOMIC_LONG_INIT((autorelease) << WORK_STRUCT_NOAUTOREL)
36 34
37struct delayed_work { 35struct delayed_work {
38 struct work_struct work; 36 struct work_struct work;
@@ -44,14 +42,8 @@ struct execute_work {
44}; 42};
45 43
46#define __WORK_INITIALIZER(n, f) { \ 44#define __WORK_INITIALIZER(n, f) { \
47 .data = WORK_DATA_INIT(0), \ 45 .data = WORK_DATA_INIT(), \
48 .entry = { &(n).entry, &(n).entry }, \ 46 .entry = { &(n).entry, &(n).entry }, \
49 .func = (f), \
50 }
51
52#define __WORK_INITIALIZER_NAR(n, f) { \
53 .data = WORK_DATA_INIT(1), \
54 .entry = { &(n).entry, &(n).entry }, \
55 .func = (f), \ 47 .func = (f), \
56 } 48 }
57 49
@@ -60,23 +52,12 @@ struct execute_work {
60 .timer = TIMER_INITIALIZER(NULL, 0, 0), \ 52 .timer = TIMER_INITIALIZER(NULL, 0, 0), \
61 } 53 }
62 54
63#define __DELAYED_WORK_INITIALIZER_NAR(n, f) { \
64 .work = __WORK_INITIALIZER_NAR((n).work, (f)), \
65 .timer = TIMER_INITIALIZER(NULL, 0, 0), \
66 }
67
68#define DECLARE_WORK(n, f) \ 55#define DECLARE_WORK(n, f) \
69 struct work_struct n = __WORK_INITIALIZER(n, f) 56 struct work_struct n = __WORK_INITIALIZER(n, f)
70 57
71#define DECLARE_WORK_NAR(n, f) \
72 struct work_struct n = __WORK_INITIALIZER_NAR(n, f)
73
74#define DECLARE_DELAYED_WORK(n, f) \ 58#define DECLARE_DELAYED_WORK(n, f) \
75 struct delayed_work n = __DELAYED_WORK_INITIALIZER(n, f) 59 struct delayed_work n = __DELAYED_WORK_INITIALIZER(n, f)
76 60
77#define DECLARE_DELAYED_WORK_NAR(n, f) \
78 struct dwork_struct n = __DELAYED_WORK_INITIALIZER_NAR(n, f)
79
80/* 61/*
81 * initialize a work item's function pointer 62 * initialize a work item's function pointer
82 */ 63 */
@@ -95,16 +76,9 @@ struct execute_work {
95 * assignment of the work data initializer allows the compiler 76 * assignment of the work data initializer allows the compiler
96 * to generate better code. 77 * to generate better code.
97 */ 78 */
98#define INIT_WORK(_work, _func) \ 79#define INIT_WORK(_work, _func) \
99 do { \
100 (_work)->data = (atomic_long_t) WORK_DATA_INIT(0); \
101 INIT_LIST_HEAD(&(_work)->entry); \
102 PREPARE_WORK((_work), (_func)); \
103 } while (0)
104
105#define INIT_WORK_NAR(_work, _func) \
106 do { \ 80 do { \
107 (_work)->data = (atomic_long_t) WORK_DATA_INIT(1); \ 81 (_work)->data = (atomic_long_t) WORK_DATA_INIT(); \
108 INIT_LIST_HEAD(&(_work)->entry); \ 82 INIT_LIST_HEAD(&(_work)->entry); \
109 PREPARE_WORK((_work), (_func)); \ 83 PREPARE_WORK((_work), (_func)); \
110 } while (0) 84 } while (0)
@@ -115,12 +89,6 @@ struct execute_work {
115 init_timer(&(_work)->timer); \ 89 init_timer(&(_work)->timer); \
116 } while (0) 90 } while (0)
117 91
118#define INIT_DELAYED_WORK_NAR(_work, _func) \
119 do { \
120 INIT_WORK_NAR(&(_work)->work, (_func)); \
121 init_timer(&(_work)->timer); \
122 } while (0)
123
124#define INIT_DELAYED_WORK_DEFERRABLE(_work, _func) \ 92#define INIT_DELAYED_WORK_DEFERRABLE(_work, _func) \
125 do { \ 93 do { \
126 INIT_WORK(&(_work)->work, (_func)); \ 94 INIT_WORK(&(_work)->work, (_func)); \
@@ -143,24 +111,10 @@ struct execute_work {
143 work_pending(&(w)->work) 111 work_pending(&(w)->work)
144 112
145/** 113/**
146 * work_release - Release a work item under execution 114 * work_clear_pending - for internal use only, mark a work item as not pending
147 * @work: The work item to release 115 * @work: The work item in question
148 *
149 * This is used to release a work item that has been initialised with automatic
150 * release mode disabled (WORK_STRUCT_NOAUTOREL is set). This gives the work
151 * function the opportunity to grab auxiliary data from the container of the
152 * work_struct before clearing the pending bit as the work_struct may be
153 * subject to deallocation the moment the pending bit is cleared.
154 *
155 * In such a case, this should be called in the work function after it has
156 * fetched any data it may require from the containter of the work_struct.
157 * After this function has been called, the work_struct may be scheduled for
158 * further execution or it may be deallocated unless other precautions are
159 * taken.
160 *
161 * This should also be used to release a delayed work item.
162 */ 116 */
163#define work_release(work) \ 117#define work_clear_pending(work) \
164 clear_bit(WORK_STRUCT_PENDING, work_data_bits(work)) 118 clear_bit(WORK_STRUCT_PENDING, work_data_bits(work))
165 119
166 120
@@ -174,27 +128,28 @@ extern struct workqueue_struct *__create_workqueue(const char *name,
174extern void destroy_workqueue(struct workqueue_struct *wq); 128extern void destroy_workqueue(struct workqueue_struct *wq);
175 129
176extern int FASTCALL(queue_work(struct workqueue_struct *wq, struct work_struct *work)); 130extern int FASTCALL(queue_work(struct workqueue_struct *wq, struct work_struct *work));
177extern int FASTCALL(queue_delayed_work(struct workqueue_struct *wq, struct delayed_work *work, unsigned long delay)); 131extern int FASTCALL(queue_delayed_work(struct workqueue_struct *wq,
132 struct delayed_work *work, unsigned long delay));
178extern int queue_delayed_work_on(int cpu, struct workqueue_struct *wq, 133extern int queue_delayed_work_on(int cpu, struct workqueue_struct *wq,
179 struct delayed_work *work, unsigned long delay); 134 struct delayed_work *work, unsigned long delay);
135
180extern void FASTCALL(flush_workqueue(struct workqueue_struct *wq)); 136extern void FASTCALL(flush_workqueue(struct workqueue_struct *wq));
137extern void flush_scheduled_work(void);
181 138
182extern int FASTCALL(schedule_work(struct work_struct *work)); 139extern int FASTCALL(schedule_work(struct work_struct *work));
183extern int FASTCALL(run_scheduled_work(struct work_struct *work)); 140extern int FASTCALL(schedule_delayed_work(struct delayed_work *work,
184extern int FASTCALL(schedule_delayed_work(struct delayed_work *work, unsigned long delay)); 141 unsigned long delay));
185 142extern int schedule_delayed_work_on(int cpu, struct delayed_work *work,
186extern int schedule_delayed_work_on(int cpu, struct delayed_work *work, unsigned long delay); 143 unsigned long delay);
187extern int schedule_on_each_cpu(work_func_t func); 144extern int schedule_on_each_cpu(work_func_t func);
188extern void flush_scheduled_work(void);
189extern int current_is_keventd(void); 145extern int current_is_keventd(void);
190extern int keventd_up(void); 146extern int keventd_up(void);
191 147
192extern void init_workqueues(void); 148extern void init_workqueues(void);
193void cancel_rearming_delayed_work(struct delayed_work *work);
194void cancel_rearming_delayed_workqueue(struct workqueue_struct *,
195 struct delayed_work *);
196int execute_in_process_context(work_func_t fn, struct execute_work *); 149int execute_in_process_context(work_func_t fn, struct execute_work *);
197 150
151extern void cancel_work_sync(struct work_struct *work);
152
198/* 153/*
199 * Kill off a pending schedule_delayed_work(). Note that the work callback 154 * Kill off a pending schedule_delayed_work(). Note that the work callback
200 * function may still be running on return from cancel_delayed_work(), unless 155 * function may still be running on return from cancel_delayed_work(), unless
@@ -207,8 +162,18 @@ static inline int cancel_delayed_work(struct delayed_work *work)
207 162
208 ret = del_timer(&work->timer); 163 ret = del_timer(&work->timer);
209 if (ret) 164 if (ret)
210 work_release(&work->work); 165 work_clear_pending(&work->work);
211 return ret; 166 return ret;
212} 167}
213 168
169extern void cancel_rearming_delayed_work(struct delayed_work *work);
170
171/* Obsolete. use cancel_rearming_delayed_work() */
172static inline
173void cancel_rearming_delayed_workqueue(struct workqueue_struct *wq,
174 struct delayed_work *work)
175{
176 cancel_rearming_delayed_work(work);
177}
178
214#endif 179#endif
diff --git a/include/net/ieee80211.h b/include/net/ieee80211.h
index d56b2923d61a..bbd85cd61ed5 100644
--- a/include/net/ieee80211.h
+++ b/include/net/ieee80211.h
@@ -1291,6 +1291,8 @@ extern u8 ieee80211_get_channel_flags(struct ieee80211_device *ieee,
1291extern const struct ieee80211_channel *ieee80211_get_channel(struct 1291extern const struct ieee80211_channel *ieee80211_get_channel(struct
1292 ieee80211_device 1292 ieee80211_device
1293 *ieee, u8 channel); 1293 *ieee, u8 channel);
1294extern u32 ieee80211_channel_to_freq(struct ieee80211_device * ieee,
1295 u8 channel);
1294 1296
1295/* ieee80211_wx.c */ 1297/* ieee80211_wx.c */
1296extern int ieee80211_wx_get_scan(struct ieee80211_device *ieee, 1298extern int ieee80211_wx_get_scan(struct ieee80211_device *ieee,
diff --git a/include/net/irda/af_irda.h b/include/net/irda/af_irda.h
index 7a209f61c482..0df574931522 100644
--- a/include/net/irda/af_irda.h
+++ b/include/net/irda/af_irda.h
@@ -17,7 +17,7 @@
17 * published by the Free Software Foundation; either version 2 of 17 * published by the Free Software Foundation; either version 2 of
18 * the License, or (at your option) any later version. 18 * the License, or (at your option) any later version.
19 * 19 *
20 * Neither Dag Brattli nor University of Tromsø admit liability nor 20 * Neither Dag Brattli nor University of Tromsø admit liability nor
21 * provide warranty for any of this software. This material is 21 * provide warranty for any of this software. This material is
22 * provided "AS-IS" and at no charge. 22 * provided "AS-IS" and at no charge.
23 * 23 *
diff --git a/include/net/irda/irda.h b/include/net/irda/irda.h
index 89fe534045f1..36bee441aa56 100644
--- a/include/net/irda/irda.h
+++ b/include/net/irda/irda.h
@@ -17,7 +17,7 @@
17 * published by the Free Software Foundation; either version 2 of 17 * published by the Free Software Foundation; either version 2 of
18 * the License, or (at your option) any later version. 18 * the License, or (at your option) any later version.
19 * 19 *
20 * Neither Dag Brattli nor University of Tromsø admit liability nor 20 * Neither Dag Brattli nor University of Tromsø admit liability nor
21 * provide warranty for any of this software. This material is 21 * provide warranty for any of this software. This material is
22 * provided "AS-IS" and at no charge. 22 * provided "AS-IS" and at no charge.
23 * 23 *
diff --git a/include/net/irda/iriap.h b/include/net/irda/iriap.h
index 2007c5a0a43f..fcc896491a95 100644
--- a/include/net/irda/iriap.h
+++ b/include/net/irda/iriap.h
@@ -17,7 +17,7 @@
17 * published by the Free Software Foundation; either version 2 of 17 * published by the Free Software Foundation; either version 2 of
18 * the License, or (at your option) any later version. 18 * the License, or (at your option) any later version.
19 * 19 *
20 * Neither Dag Brattli nor University of Tromsø admit liability nor 20 * Neither Dag Brattli nor University of Tromsø admit liability nor
21 * provide warranty for any of this software. This material is 21 * provide warranty for any of this software. This material is
22 * provided "AS-IS" and at no charge. 22 * provided "AS-IS" and at no charge.
23 * 23 *
diff --git a/include/net/irda/iriap_event.h b/include/net/irda/iriap_event.h
index 4ca3d2071b03..89747f06d9eb 100644
--- a/include/net/irda/iriap_event.h
+++ b/include/net/irda/iriap_event.h
@@ -16,7 +16,7 @@
16 * published by the Free Software Foundation; either version 2 of 16 * published by the Free Software Foundation; either version 2 of
17 * the License, or (at your option) any later version. 17 * the License, or (at your option) any later version.
18 * 18 *
19 * Neither Dag Brattli nor University of Tromsø admit liability nor 19 * Neither Dag Brattli nor University of Tromsø admit liability nor
20 * provide warranty for any of this software. This material is 20 * provide warranty for any of this software. This material is
21 * provided "AS-IS" and at no charge. 21 * provided "AS-IS" and at no charge.
22 * 22 *
diff --git a/include/net/irda/irias_object.h b/include/net/irda/irias_object.h
index c41196b87955..83f78081799c 100644
--- a/include/net/irda/irias_object.h
+++ b/include/net/irda/irias_object.h
@@ -16,7 +16,7 @@
16 * published by the Free Software Foundation; either version 2 of 16 * published by the Free Software Foundation; either version 2 of
17 * the License, or (at your option) any later version. 17 * the License, or (at your option) any later version.
18 * 18 *
19 * Neither Dag Brattli nor University of Tromsø admit liability nor 19 * Neither Dag Brattli nor University of Tromsø admit liability nor
20 * provide warranty for any of this software. This material is 20 * provide warranty for any of this software. This material is
21 * provided "AS-IS" and at no charge. 21 * provided "AS-IS" and at no charge.
22 * 22 *
diff --git a/include/net/irda/irlan_client.h b/include/net/irda/irlan_client.h
index 736dabe211e3..fa8455eda280 100644
--- a/include/net/irda/irlan_client.h
+++ b/include/net/irda/irlan_client.h
@@ -16,7 +16,7 @@
16 * published by the Free Software Foundation; either version 2 of 16 * published by the Free Software Foundation; either version 2 of
17 * the License, or (at your option) any later version. 17 * the License, or (at your option) any later version.
18 * 18 *
19 * Neither Dag Brattli nor University of Tromsø admit liability nor 19 * Neither Dag Brattli nor University of Tromsø admit liability nor
20 * provide warranty for any of this software. This material is 20 * provide warranty for any of this software. This material is
21 * provided "AS-IS" and at no charge. 21 * provided "AS-IS" and at no charge.
22 * 22 *
diff --git a/include/net/irda/irlan_common.h b/include/net/irda/irlan_common.h
index 9592c374b41d..73cacb3ac16c 100644
--- a/include/net/irda/irlan_common.h
+++ b/include/net/irda/irlan_common.h
@@ -17,7 +17,7 @@
17 * published by the Free Software Foundation; either version 2 of 17 * published by the Free Software Foundation; either version 2 of
18 * the License, or (at your option) any later version. 18 * the License, or (at your option) any later version.
19 * 19 *
20 * Neither Dag Brattli nor University of Tromsø admit liability nor 20 * Neither Dag Brattli nor University of Tromsø admit liability nor
21 * provide warranty for any of this software. This material is 21 * provide warranty for any of this software. This material is
22 * provided "AS-IS" and at no charge. 22 * provided "AS-IS" and at no charge.
23 * 23 *
diff --git a/include/net/irda/irlan_eth.h b/include/net/irda/irlan_eth.h
index 9a9b3619d305..0062347600b9 100644
--- a/include/net/irda/irlan_eth.h
+++ b/include/net/irda/irlan_eth.h
@@ -16,7 +16,7 @@
16 * published by the Free Software Foundation; either version 2 of 16 * published by the Free Software Foundation; either version 2 of
17 * the License, or (at your option) any later version. 17 * the License, or (at your option) any later version.
18 * 18 *
19 * Neither Dag Brattli nor University of Tromsø admit liability nor 19 * Neither Dag Brattli nor University of Tromsø admit liability nor
20 * provide warranty for any of this software. This material is 20 * provide warranty for any of this software. This material is
21 * provided "AS-IS" and at no charge. 21 * provided "AS-IS" and at no charge.
22 * 22 *
diff --git a/include/net/irda/irlan_event.h b/include/net/irda/irlan_event.h
index b9baac9eb8b6..6d9539f05806 100644
--- a/include/net/irda/irlan_event.h
+++ b/include/net/irda/irlan_event.h
@@ -16,7 +16,7 @@
16 * published by the Free Software Foundation; either version 2 of 16 * published by the Free Software Foundation; either version 2 of
17 * the License, or (at your option) any later version. 17 * the License, or (at your option) any later version.
18 * 18 *
19 * Neither Dag Brattli nor University of Tromsø admit liability nor 19 * Neither Dag Brattli nor University of Tromsø admit liability nor
20 * provide warranty for any of this software. This material is 20 * provide warranty for any of this software. This material is
21 * provided "AS-IS" and at no charge. 21 * provided "AS-IS" and at no charge.
22 * 22 *
diff --git a/include/net/irda/irlan_filter.h b/include/net/irda/irlan_filter.h
index 1720539ac2c1..a5a2539485bd 100644
--- a/include/net/irda/irlan_filter.h
+++ b/include/net/irda/irlan_filter.h
@@ -16,7 +16,7 @@
16 * published by the Free Software Foundation; either version 2 of 16 * published by the Free Software Foundation; either version 2 of
17 * the License, or (at your option) any later version. 17 * the License, or (at your option) any later version.
18 * 18 *
19 * Neither Dag Brattli nor University of Tromsø admit liability nor 19 * Neither Dag Brattli nor University of Tromsø admit liability nor
20 * provide warranty for any of this software. This material is 20 * provide warranty for any of this software. This material is
21 * provided "AS-IS" and at no charge. 21 * provided "AS-IS" and at no charge.
22 * 22 *
diff --git a/include/net/irda/irlan_provider.h b/include/net/irda/irlan_provider.h
index ca51d5b7c999..92f3b0e1029b 100644
--- a/include/net/irda/irlan_provider.h
+++ b/include/net/irda/irlan_provider.h
@@ -16,7 +16,7 @@
16 * published by the Free Software Foundation; either version 2 of 16 * published by the Free Software Foundation; either version 2 of
17 * the License, or (at your option) any later version. 17 * the License, or (at your option) any later version.
18 * 18 *
19 * Neither Dag Brattli nor University of Tromsø admit liability nor 19 * Neither Dag Brattli nor University of Tromsø admit liability nor
20 * provide warranty for any of this software. This material is 20 * provide warranty for any of this software. This material is
21 * provided "AS-IS" and at no charge. 21 * provided "AS-IS" and at no charge.
22 * 22 *
diff --git a/include/net/irda/irlap.h b/include/net/irda/irlap.h
index e77eb88d9226..f0248fb8e196 100644
--- a/include/net/irda/irlap.h
+++ b/include/net/irda/irlap.h
@@ -18,7 +18,7 @@
18 * published by the Free Software Foundation; either version 2 of 18 * published by the Free Software Foundation; either version 2 of
19 * the License, or (at your option) any later version. 19 * the License, or (at your option) any later version.
20 * 20 *
21 * Neither Dag Brattli nor University of Tromsø admit liability nor 21 * Neither Dag Brattli nor University of Tromsø admit liability nor
22 * provide warranty for any of this software. This material is 22 * provide warranty for any of this software. This material is
23 * provided "AS-IS" and at no charge. 23 * provided "AS-IS" and at no charge.
24 * 24 *
diff --git a/include/net/irda/irlmp.h b/include/net/irda/irlmp.h
index e212b9bc2503..3ffc1d0f93d6 100644
--- a/include/net/irda/irlmp.h
+++ b/include/net/irda/irlmp.h
@@ -18,7 +18,7 @@
18 * published by the Free Software Foundation; either version 2 of 18 * published by the Free Software Foundation; either version 2 of
19 * the License, or (at your option) any later version. 19 * the License, or (at your option) any later version.
20 * 20 *
21 * Neither Dag Brattli nor University of Tromsø admit liability nor 21 * Neither Dag Brattli nor University of Tromsø admit liability nor
22 * provide warranty for any of this software. This material is 22 * provide warranty for any of this software. This material is
23 * provided "AS-IS" and at no charge. 23 * provided "AS-IS" and at no charge.
24 * 24 *
diff --git a/include/net/irda/irlmp_event.h b/include/net/irda/irlmp_event.h
index 03c6f81a502a..e03ae4ae3963 100644
--- a/include/net/irda/irlmp_event.h
+++ b/include/net/irda/irlmp_event.h
@@ -18,7 +18,7 @@
18 * published by the Free Software Foundation; either version 2 of 18 * published by the Free Software Foundation; either version 2 of
19 * the License, or (at your option) any later version. 19 * the License, or (at your option) any later version.
20 * 20 *
21 * Neither Dag Brattli nor University of Tromsø admit liability nor 21 * Neither Dag Brattli nor University of Tromsø admit liability nor
22 * provide warranty for any of this software. This material is 22 * provide warranty for any of this software. This material is
23 * provided "AS-IS" and at no charge. 23 * provided "AS-IS" and at no charge.
24 * 24 *
diff --git a/include/net/irda/irlmp_frame.h b/include/net/irda/irlmp_frame.h
index c463f8bca856..1906eb71422e 100644
--- a/include/net/irda/irlmp_frame.h
+++ b/include/net/irda/irlmp_frame.h
@@ -17,7 +17,7 @@
17 * published by the Free Software Foundation; either version 2 of 17 * published by the Free Software Foundation; either version 2 of
18 * the License, or (at your option) any later version. 18 * the License, or (at your option) any later version.
19 * 19 *
20 * Neither Dag Brattli nor University of Tromsø admit liability nor 20 * Neither Dag Brattli nor University of Tromsø admit liability nor
21 * provide warranty for any of this software. This material is 21 * provide warranty for any of this software. This material is
22 * provided "AS-IS" and at no charge. 22 * provided "AS-IS" and at no charge.
23 * 23 *
diff --git a/include/net/irda/irmod.h b/include/net/irda/irmod.h
index 72b446c1e22c..86f0dbb8ee5d 100644
--- a/include/net/irda/irmod.h
+++ b/include/net/irda/irmod.h
@@ -17,7 +17,7 @@
17 * published by the Free Software Foundation; either version 2 of 17 * published by the Free Software Foundation; either version 2 of
18 * the License, or (at your option) any later version. 18 * the License, or (at your option) any later version.
19 * 19 *
20 * Neither Dag Brattli nor University of Tromsø admit liability nor 20 * Neither Dag Brattli nor University of Tromsø admit liability nor
21 * provide warranty for any of this software. This material is 21 * provide warranty for any of this software. This material is
22 * provided "AS-IS" and at no charg. 22 * provided "AS-IS" and at no charg.
23 * 23 *
diff --git a/include/net/irda/irqueue.h b/include/net/irda/irqueue.h
index 335b0ace9665..37f512bd6733 100644
--- a/include/net/irda/irqueue.h
+++ b/include/net/irda/irqueue.h
@@ -21,7 +21,7 @@
21 * published by the Free Software Foundation; either version 2 of 21 * published by the Free Software Foundation; either version 2 of
22 * the License, or (at your option) any later version. 22 * the License, or (at your option) any later version.
23 * 23 *
24 * Neither Dag Brattli nor University of Tromsø admit liability nor 24 * Neither Dag Brattli nor University of Tromsø admit liability nor
25 * provide warranty for any of this software. This material is 25 * provide warranty for any of this software. This material is
26 * provided "AS-IS" and at no charge. 26 * provided "AS-IS" and at no charge.
27 * 27 *
diff --git a/include/net/irda/irttp.h b/include/net/irda/irttp.h
index a899e5837be8..cf80c1af5854 100644
--- a/include/net/irda/irttp.h
+++ b/include/net/irda/irttp.h
@@ -18,7 +18,7 @@
18 * published by the Free Software Foundation; either version 2 of 18 * published by the Free Software Foundation; either version 2 of
19 * the License, or (at your option) any later version. 19 * the License, or (at your option) any later version.
20 * 20 *
21 * Neither Dag Brattli nor University of Tromsø admit liability nor 21 * Neither Dag Brattli nor University of Tromsø admit liability nor
22 * provide warranty for any of this software. This material is 22 * provide warranty for any of this software. This material is
23 * provided "AS-IS" and at no charge. 23 * provided "AS-IS" and at no charge.
24 * 24 *
diff --git a/include/net/irda/parameters.h b/include/net/irda/parameters.h
index 3a605d37ddbf..c0d938847bd3 100644
--- a/include/net/irda/parameters.h
+++ b/include/net/irda/parameters.h
@@ -26,7 +26,7 @@
26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
27 * MA 02111-1307 USA 27 * MA 02111-1307 USA
28 * 28 *
29 * Michel Dänzer <daenzer@debian.org>, 10/2001 29 * Michel Dänzer <daenzer@debian.org>, 10/2001
30 * - simplify irda_pv_t to avoid endianness issues 30 * - simplify irda_pv_t to avoid endianness issues
31 * 31 *
32 ********************************************************************/ 32 ********************************************************************/
diff --git a/include/net/irda/timer.h b/include/net/irda/timer.h
index cb61568547d1..cb2615ccf761 100644
--- a/include/net/irda/timer.h
+++ b/include/net/irda/timer.h
@@ -18,7 +18,7 @@
18 * published by the Free Software Foundation; either version 2 of 18 * published by the Free Software Foundation; either version 2 of
19 * the License, or (at your option) any later version. 19 * the License, or (at your option) any later version.
20 * 20 *
21 * Neither Dag Brattli nor University of Tromsø admit liability nor 21 * Neither Dag Brattli nor University of Tromsø admit liability nor
22 * provide warranty for any of this software. This material is 22 * provide warranty for any of this software. This material is
23 * provided "AS-IS" and at no charge. 23 * provided "AS-IS" and at no charge.
24 * 24 *
diff --git a/include/net/irda/wrapper.h b/include/net/irda/wrapper.h
index 98768b3f9e31..2942ad6ab932 100644
--- a/include/net/irda/wrapper.h
+++ b/include/net/irda/wrapper.h
@@ -17,7 +17,7 @@
17 * published by the Free Software Foundation; either version 2 of 17 * published by the Free Software Foundation; either version 2 of
18 * the License, or (at your option) any later version. 18 * the License, or (at your option) any later version.
19 * 19 *
20 * Neither Dag Brattli nor University of Tromsø admit liability nor 20 * Neither Dag Brattli nor University of Tromsø admit liability nor
21 * provide warranty for any of this software. This material is 21 * provide warranty for any of this software. This material is
22 * provided "AS-IS" and at no charge. 22 * provided "AS-IS" and at no charge.
23 * 23 *
diff --git a/include/rdma/ib_umem.h b/include/rdma/ib_umem.h
new file mode 100644
index 000000000000..b3a36f7d79e5
--- /dev/null
+++ b/include/rdma/ib_umem.h
@@ -0,0 +1,81 @@
1/*
2 * Copyright (c) 2007 Cisco Systems. All rights reserved.
3 *
4 * This software is available to you under a choice of one of two
5 * licenses. You may choose to be licensed under the terms of the GNU
6 * General Public License (GPL) Version 2, available from the file
7 * COPYING in the main directory of this source tree, or the
8 * OpenIB.org BSD license below:
9 *
10 * Redistribution and use in source and binary forms, with or
11 * without modification, are permitted provided that the following
12 * conditions are met:
13 *
14 * - Redistributions of source code must retain the above
15 * copyright notice, this list of conditions and the following
16 * disclaimer.
17 *
18 * - Redistributions in binary form must reproduce the above
19 * copyright notice, this list of conditions and the following
20 * disclaimer in the documentation and/or other materials
21 * provided with the distribution.
22 *
23 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
27 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
28 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
29 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30 * SOFTWARE.
31 */
32
33#ifndef IB_UMEM_H
34#define IB_UMEM_H
35
36#include <linux/list.h>
37#include <linux/scatterlist.h>
38
39struct ib_ucontext;
40
41struct ib_umem {
42 struct ib_ucontext *context;
43 size_t length;
44 int offset;
45 int page_size;
46 int writable;
47 struct list_head chunk_list;
48 struct work_struct work;
49 struct mm_struct *mm;
50 unsigned long diff;
51};
52
53struct ib_umem_chunk {
54 struct list_head list;
55 int nents;
56 int nmap;
57 struct scatterlist page_list[0];
58};
59
60#ifdef CONFIG_INFINIBAND_USER_MEM
61
62struct ib_umem *ib_umem_get(struct ib_ucontext *context, unsigned long addr,
63 size_t size, int access);
64void ib_umem_release(struct ib_umem *umem);
65int ib_umem_page_count(struct ib_umem *umem);
66
67#else /* CONFIG_INFINIBAND_USER_MEM */
68
69#include <linux/err.h>
70
71static inline struct ib_umem *ib_umem_get(struct ib_ucontext *context,
72 unsigned long addr, size_t size,
73 int access) {
74 return ERR_PTR(-EINVAL);
75}
76static inline void ib_umem_release(struct ib_umem *umem) { }
77static inline int ib_umem_page_count(struct ib_umem *umem) { return 0; }
78
79#endif /* CONFIG_INFINIBAND_USER_MEM */
80
81#endif /* IB_UMEM_H */
diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h
index 5342ac64ed1a..47cefca59c89 100644
--- a/include/rdma/ib_verbs.h
+++ b/include/rdma/ib_verbs.h
@@ -5,7 +5,7 @@
5 * Copyright (c) 2004 Topspin Corporation. All rights reserved. 5 * Copyright (c) 2004 Topspin Corporation. All rights reserved.
6 * Copyright (c) 2004 Voltaire Corporation. All rights reserved. 6 * Copyright (c) 2004 Voltaire Corporation. All rights reserved.
7 * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved. 7 * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
8 * Copyright (c) 2005, 2006 Cisco Systems. All rights reserved. 8 * Copyright (c) 2005, 2006, 2007 Cisco Systems. All rights reserved.
9 * 9 *
10 * This software is available to you under a choice of one of two 10 * This software is available to you under a choice of one of two
11 * licenses. You may choose to be licensed under the terms of the GNU 11 * licenses. You may choose to be licensed under the terms of the GNU
@@ -710,6 +710,7 @@ struct ib_ucontext {
710 struct list_head qp_list; 710 struct list_head qp_list;
711 struct list_head srq_list; 711 struct list_head srq_list;
712 struct list_head ah_list; 712 struct list_head ah_list;
713 int closing;
713}; 714};
714 715
715struct ib_uobject { 716struct ib_uobject {
@@ -723,23 +724,6 @@ struct ib_uobject {
723 int live; 724 int live;
724}; 725};
725 726
726struct ib_umem {
727 unsigned long user_base;
728 unsigned long virt_base;
729 size_t length;
730 int offset;
731 int page_size;
732 int writable;
733 struct list_head chunk_list;
734};
735
736struct ib_umem_chunk {
737 struct list_head list;
738 int nents;
739 int nmap;
740 struct scatterlist page_list[0];
741};
742
743struct ib_udata { 727struct ib_udata {
744 void __user *inbuf; 728 void __user *inbuf;
745 void __user *outbuf; 729 void __user *outbuf;
@@ -752,11 +736,6 @@ struct ib_udata {
752 ((void *) &((struct ib_umem_chunk *) 0)->page_list[1] - \ 736 ((void *) &((struct ib_umem_chunk *) 0)->page_list[1] - \
753 (void *) &((struct ib_umem_chunk *) 0)->page_list[0])) 737 (void *) &((struct ib_umem_chunk *) 0)->page_list[0]))
754 738
755struct ib_umem_object {
756 struct ib_uobject uobject;
757 struct ib_umem umem;
758};
759
760struct ib_pd { 739struct ib_pd {
761 struct ib_device *device; 740 struct ib_device *device;
762 struct ib_uobject *uobject; 741 struct ib_uobject *uobject;
@@ -1003,7 +982,8 @@ struct ib_device {
1003 int mr_access_flags, 982 int mr_access_flags,
1004 u64 *iova_start); 983 u64 *iova_start);
1005 struct ib_mr * (*reg_user_mr)(struct ib_pd *pd, 984 struct ib_mr * (*reg_user_mr)(struct ib_pd *pd,
1006 struct ib_umem *region, 985 u64 start, u64 length,
986 u64 virt_addr,
1007 int mr_access_flags, 987 int mr_access_flags,
1008 struct ib_udata *udata); 988 struct ib_udata *udata);
1009 int (*query_mr)(struct ib_mr *mr, 989 int (*query_mr)(struct ib_mr *mr,