aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-02-17 15:09:59 -0500
committerJeff Garzik <jeff@garzik.org>2007-02-17 15:09:59 -0500
commit48c871c1f6a7c7044dd76774fb469e65c7e2e4e8 (patch)
treeda3aa535c98cc0957851354ceb0fbff7482d7a9d /include
parent1a1689344add3333d28d1b5495d8043a3877d01c (diff)
parent4409d28140d9a6e6e3f4f1fdaf7234c4b965d954 (diff)
Merge branch 'gfar' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc into upstream
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/mman.h1
-rw-r--r--include/asm-alpha/percpu.h14
-rw-r--r--include/asm-alpha/termios.h18
-rw-r--r--include/asm-arm/arch-at91rm9200/gpio.h48
-rw-r--r--include/asm-arm/arch-imx/spi_imx.h72
-rw-r--r--include/asm-arm/arch-omap/gpio.h66
-rw-r--r--include/asm-arm/arch-pxa/gpio.h72
-rw-r--r--include/asm-arm/arch-s3c2410/gpio.h65
-rw-r--r--include/asm-arm/arch-sa1100/gpio.h81
-rw-r--r--include/asm-arm/gpio.h7
-rw-r--r--include/asm-arm/hardware/gpio_keys.h17
-rw-r--r--include/asm-arm/spinlock.h1
-rw-r--r--include/asm-arm/termios.h18
-rw-r--r--include/asm-arm/uaccess.h4
-rw-r--r--include/asm-arm26/termios.h18
-rw-r--r--include/asm-arm26/uaccess-asm.h4
-rw-r--r--include/asm-avr32/termios.h18
-rw-r--r--include/asm-cris/semaphore-helper.h9
-rw-r--r--include/asm-cris/system.h3
-rw-r--r--include/asm-cris/termios.h18
-rw-r--r--include/asm-frv/termios.h18
-rw-r--r--include/asm-generic/dma-mapping-broken.h4
-rw-r--r--include/asm-generic/gpio.h25
-rw-r--r--include/asm-generic/memory_model.h2
-rw-r--r--include/asm-generic/mman.h1
-rw-r--r--include/asm-h8300/termios.h18
-rw-r--r--include/asm-i386/atomic.h4
-rw-r--r--include/asm-i386/bitops.h4
-rw-r--r--include/asm-i386/setup.h2
-rw-r--r--include/asm-i386/termios.h18
-rw-r--r--include/asm-i386/uaccess.h4
-rw-r--r--include/asm-ia64/setup.h2
-rw-r--r--include/asm-ia64/termios.h18
-rw-r--r--include/asm-m32r/a.out.h2
-rw-r--r--include/asm-m32r/addrspace.h1
-rw-r--r--include/asm-m32r/bugs.h2
-rw-r--r--include/asm-m32r/byteorder.h2
-rw-r--r--include/asm-m32r/cache.h2
-rw-r--r--include/asm-m32r/cacheflush.h1
-rw-r--r--include/asm-m32r/current.h3
-rw-r--r--include/asm-m32r/delay.h2
-rw-r--r--include/asm-m32r/dma.h2
-rw-r--r--include/asm-m32r/errno.h3
-rw-r--r--include/asm-m32r/ide.h6
-rw-r--r--include/asm-m32r/ioctls.h5
-rw-r--r--include/asm-m32r/ipcbuf.h4
-rw-r--r--include/asm-m32r/kmap_types.h4
-rw-r--r--include/asm-m32r/m32104ut/m32104ut_pld.h11
-rw-r--r--include/asm-m32r/m32700ut/m32700ut_lan.h13
-rw-r--r--include/asm-m32r/m32700ut/m32700ut_lcd.h13
-rw-r--r--include/asm-m32r/m32700ut/m32700ut_pld.h13
-rw-r--r--include/asm-m32r/mappi2/mappi2_pld.h13
-rw-r--r--include/asm-m32r/mappi3/mappi3_pld.h11
-rw-r--r--include/asm-m32r/mc146818rtc.h3
-rw-r--r--include/asm-m32r/mman.h2
-rw-r--r--include/asm-m32r/mmu.h10
-rw-r--r--include/asm-m32r/mmu_context.h9
-rw-r--r--include/asm-m32r/module.h3
-rw-r--r--include/asm-m32r/msgbuf.h4
-rw-r--r--include/asm-m32r/namei.h4
-rw-r--r--include/asm-m32r/opsput/opsput_lan.h13
-rw-r--r--include/asm-m32r/opsput/opsput_lcd.h13
-rw-r--r--include/asm-m32r/opsput/opsput_pld.h13
-rw-r--r--include/asm-m32r/page.h5
-rw-r--r--include/asm-m32r/param.h4
-rw-r--r--include/asm-m32r/pci.h2
-rw-r--r--include/asm-m32r/pgalloc.h3
-rw-r--r--include/asm-m32r/pgtable-2level.h3
-rw-r--r--include/asm-m32r/posix_types.h4
-rw-r--r--include/asm-m32r/rtc.h4
-rw-r--r--include/asm-m32r/scatterlist.h2
-rw-r--r--include/asm-m32r/sections.h1
-rw-r--r--include/asm-m32r/segment.h4
-rw-r--r--include/asm-m32r/sembuf.h4
-rw-r--r--include/asm-m32r/setup.h4
-rw-r--r--include/asm-m32r/shmbuf.h4
-rw-r--r--include/asm-m32r/shmparam.h2
-rw-r--r--include/asm-m32r/sigcontext.h3
-rw-r--r--include/asm-m32r/siginfo.h2
-rw-r--r--include/asm-m32r/signal.h4
-rw-r--r--include/asm-m32r/smp.h3
-rw-r--r--include/asm-m32r/sockios.h2
-rw-r--r--include/asm-m32r/spinlock_types.h2
-rw-r--r--include/asm-m32r/stat.h4
-rw-r--r--include/asm-m32r/string.h2
-rw-r--r--include/asm-m32r/syscall.h3
-rw-r--r--include/asm-m32r/system.h2
-rw-r--r--include/asm-m32r/termbits.h4
-rw-r--r--include/asm-m32r/termios.h20
-rw-r--r--include/asm-m32r/timex.h3
-rw-r--r--include/asm-m32r/tlbflush.h1
-rw-r--r--include/asm-m32r/types.h6
-rw-r--r--include/asm-m32r/uaccess.h4
-rw-r--r--include/asm-m32r/ucontext.h2
-rw-r--r--include/asm-m32r/unaligned.h8
-rw-r--r--include/asm-m32r/unistd.h2
-rw-r--r--include/asm-m32r/user.h6
-rw-r--r--include/asm-m32r/vga.h4
-rw-r--r--include/asm-m32r/xor.h2
-rw-r--r--include/asm-m68k/math-emu.h15
-rw-r--r--include/asm-m68k/termios.h18
-rw-r--r--include/asm-m68k/user.h2
-rw-r--r--include/asm-mips/mips_mt.h3
-rw-r--r--include/asm-mips/mman.h1
-rw-r--r--include/asm-mips/sigcontext.h4
-rw-r--r--include/asm-mips/termios.h18
-rw-r--r--include/asm-mips/uaccess.h5
-rw-r--r--include/asm-parisc/mman.h1
-rw-r--r--include/asm-parisc/termios.h18
-rw-r--r--include/asm-powerpc/Kbuild1
-rw-r--r--include/asm-powerpc/ps3.h9
-rw-r--r--include/asm-powerpc/ps3av.h738
-rw-r--r--include/asm-powerpc/ps3fb.h56
-rw-r--r--include/asm-powerpc/termios.h18
-rw-r--r--include/asm-s390/ccwdev.h2
-rw-r--r--include/asm-s390/io.h71
-rw-r--r--include/asm-s390/termios.h18
-rw-r--r--include/asm-sh/termios.h18
-rw-r--r--include/asm-sh64/termios.h18
-rw-r--r--include/asm-sparc/io.h29
-rw-r--r--include/asm-sparc/termios.h18
-rw-r--r--include/asm-sparc64/irq.h4
-rw-r--r--include/asm-sparc64/pbm.h28
-rw-r--r--include/asm-sparc64/setup.h2
-rw-r--r--include/asm-sparc64/termios.h18
-rw-r--r--include/asm-um/elf-ppc.h2
-rw-r--r--include/asm-um/processor-x86_64.h6
-rw-r--r--include/asm-um/ptrace-x86_64.h9
-rw-r--r--include/asm-v850/termios.h18
-rw-r--r--include/asm-x86_64/bootsetup.h2
-rw-r--r--include/asm-x86_64/setup.h2
-rw-r--r--include/asm-x86_64/termios.h18
-rw-r--r--include/asm-x86_64/uaccess.h4
-rw-r--r--include/asm-xtensa/mman.h1
-rw-r--r--include/asm-xtensa/termios.h19
-rw-r--r--include/linux/Kbuild3
-rw-r--r--include/linux/ata.h13
-rw-r--r--include/linux/atalk.h2
-rw-r--r--include/linux/blkdev.h1
-rw-r--r--include/linux/buffer_head.h12
-rw-r--r--include/linux/byteorder/Kbuild2
-rw-r--r--include/linux/byteorder/pdp_endian.h88
-rw-r--r--include/linux/byteorder/swabb.h13
-rw-r--r--include/linux/cfag12864b.h77
-rw-r--r--include/linux/coda_linux.h6
-rw-r--r--include/linux/compiler-gcc.h7
-rw-r--r--include/linux/console.h4
-rw-r--r--include/linux/console_struct.h3
-rw-r--r--include/linux/cpu.h12
-rw-r--r--include/linux/cpuset.h2
-rw-r--r--include/linux/device.h38
-rw-r--r--include/linux/dma-mapping.h29
-rw-r--r--include/linux/dmapool.h7
-rw-r--r--include/linux/dn.h2
-rw-r--r--include/linux/efs_fs.h2
-rw-r--r--include/linux/ext3_fs.h10
-rw-r--r--include/linux/ext4_fs.h10
-rw-r--r--include/linux/fb.h38
-rw-r--r--include/linux/fs.h22
-rw-r--r--include/linux/genhd.h10
-rw-r--r--include/linux/gfp.h2
-rw-r--r--include/linux/gigaset_dev.h2
-rw-r--r--include/linux/init.h7
-rw-r--r--include/linux/init_task.h2
-rw-r--r--include/linux/interrupt.h6
-rw-r--r--include/linux/io.h15
-rw-r--r--include/linux/ioport.h20
-rw-r--r--include/linux/kernel.h13
-rw-r--r--include/linux/kfifo.h6
-rw-r--r--include/linux/ks0108.h46
-rw-r--r--include/linux/ktime.h6
-rw-r--r--include/linux/kvm.h5
-rw-r--r--include/linux/libata.h131
-rw-r--r--include/linux/list.h67
-rw-r--r--include/linux/lockdep.h3
-rw-r--r--include/linux/magic.h1
-rw-r--r--include/linux/mc146818rtc.h10
-rw-r--r--include/linux/minix_fs.h25
-rw-r--r--include/linux/mm.h15
-rw-r--r--include/linux/mm_inline.h13
-rw-r--r--include/linux/mmzone.h42
-rw-r--r--include/linux/mount.h10
-rw-r--r--include/linux/msdos_fs.h6
-rw-r--r--include/linux/ncp_fs.h4
-rw-r--r--include/linux/netfilter.h4
-rw-r--r--include/linux/netfilter_ipv4/ip_conntrack.h6
-rw-r--r--include/linux/netlink.h1
-rw-r--r--include/linux/nfs_fs.h14
-rw-r--r--include/linux/nfs_xdr.h4
-rw-r--r--include/linux/nfsd/const.h4
-rw-r--r--include/linux/pci.h14
-rw-r--r--include/linux/pci_ids.h13
-rw-r--r--include/linux/phonedev.h2
-rw-r--r--include/linux/pid.h14
-rw-r--r--include/linux/pnp.h2
-rw-r--r--include/linux/proc_fs.h4
-rw-r--r--include/linux/qnx4_fs.h4
-rw-r--r--include/linux/quota.h1
-rw-r--r--include/linux/random.h2
-rw-r--r--include/linux/reiserfs_fs.h8
-rw-r--r--include/linux/reiserfs_xattr.h24
-rw-r--r--include/linux/relay.h9
-rw-r--r--include/linux/rio.h1
-rw-r--r--include/linux/sched.h45
-rw-r--r--include/linux/security.h4
-rw-r--r--include/linux/slab_def.h30
-rw-r--r--include/linux/socket.h2
-rw-r--r--include/linux/spi/ads7846.h12
-rw-r--r--include/linux/spi/eeprom.h22
-rw-r--r--include/linux/spi/spi.h37
-rw-r--r--include/linux/spi/spi_bitbang.h2
-rw-r--r--include/linux/spinlock.h33
-rw-r--r--include/linux/stat.h2
-rw-r--r--include/linux/sunrpc/svc.h45
-rw-r--r--include/linux/sunrpc/svcsock.h12
-rw-r--r--include/linux/svga.h124
-rw-r--r--include/linux/swap.h6
-rw-r--r--include/linux/time.h4
-rw-r--r--include/linux/timex.h4
-rw-r--r--include/linux/toshiba.h2
-rw-r--r--include/linux/tty.h30
-rw-r--r--include/linux/ufs_fs.h47
-rw-r--r--include/linux/ufs_fs_i.h3
-rw-r--r--include/linux/ufs_fs_sb.h1
-rw-r--r--include/linux/vmstat.h72
-rw-r--r--include/linux/xattr.h8
-rw-r--r--include/net/ax25.h4
-rw-r--r--include/net/dn_route.h5
-rw-r--r--include/net/dst.h15
-rw-r--r--include/net/ip6_fib.h1
-rw-r--r--include/net/netfilter/nf_conntrack.h6
-rw-r--r--include/net/netfilter/nf_conntrack_expect.h2
-rw-r--r--include/net/netfilter/nf_conntrack_l3proto.h4
-rw-r--r--include/net/netfilter/nf_conntrack_l4proto.h2
-rw-r--r--include/net/netrom.h4
-rw-r--r--include/net/rose.h6
-rw-r--r--include/net/route.h7
-rw-r--r--include/scsi/libsas.h22
-rw-r--r--include/scsi/scsi_transport_sas.h3
-rw-r--r--include/scsi/scsi_transport_spi.h1
-rw-r--r--include/sound/pcm.h2
-rw-r--r--include/video/neomagic.h3
-rw-r--r--include/video/s3blit.h79
243 files changed, 2620 insertions, 1304 deletions
diff --git a/include/asm-alpha/mman.h b/include/asm-alpha/mman.h
index 5f24c755f577..90d7c35d2867 100644
--- a/include/asm-alpha/mman.h
+++ b/include/asm-alpha/mman.h
@@ -49,7 +49,6 @@
49#define MADV_DOFORK 11 /* do inherit across fork */ 49#define MADV_DOFORK 11 /* do inherit across fork */
50 50
51/* compatibility flags */ 51/* compatibility flags */
52#define MAP_ANON MAP_ANONYMOUS
53#define MAP_FILE 0 52#define MAP_FILE 0
54 53
55#endif /* __ALPHA_MMAN_H__ */ 54#endif /* __ALPHA_MMAN_H__ */
diff --git a/include/asm-alpha/percpu.h b/include/asm-alpha/percpu.h
index 48348fe34c19..651ebb141b24 100644
--- a/include/asm-alpha/percpu.h
+++ b/include/asm-alpha/percpu.h
@@ -1,6 +1,20 @@
1#ifndef __ALPHA_PERCPU_H 1#ifndef __ALPHA_PERCPU_H
2#define __ALPHA_PERCPU_H 2#define __ALPHA_PERCPU_H
3 3
4/*
5 * Increase the per cpu area for Alpha so that
6 * modules using percpu area can load.
7 */
8#ifdef CONFIG_MODULES
9# define PERCPU_MODULE_RESERVE 8192
10#else
11# define PERCPU_MODULE_RESERVE 0
12#endif
13
14#define PERCPU_ENOUGH_ROOM \
15 (ALIGN(__per_cpu_end - __per_cpu_start, SMP_CACHE_BYTES) + \
16 PERCPU_MODULE_RESERVE)
17
4#include <asm-generic/percpu.h> 18#include <asm-generic/percpu.h>
5 19
6#endif /* __ALPHA_PERCPU_H */ 20#endif /* __ALPHA_PERCPU_H */
diff --git a/include/asm-alpha/termios.h b/include/asm-alpha/termios.h
index 1cfd27f0ad73..39e492c3bfa3 100644
--- a/include/asm-alpha/termios.h
+++ b/include/asm-alpha/termios.h
@@ -66,24 +66,6 @@ struct termio {
66#define _VEOL2 6 66#define _VEOL2 6
67#define _VSWTC 7 67#define _VSWTC 7
68 68
69/* line disciplines */
70#define N_TTY 0
71#define N_SLIP 1
72#define N_MOUSE 2
73#define N_PPP 3
74#define N_STRIP 4
75#define N_AX25 5
76#define N_X25 6 /* X.25 async */
77#define N_6PACK 7
78#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
79#define N_R3964 9 /* Reserved for Simatic R3964 module */
80#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
81#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */
82#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
83#define N_HDLC 13 /* synchronous HDLC */
84#define N_SYNC_PPP 14
85#define N_HCI 15 /* Bluetooth HCI UART */
86
87#ifdef __KERNEL__ 69#ifdef __KERNEL__
88/* eof=^D eol=\0 eol2=\0 erase=del 70/* eof=^D eol=\0 eol2=\0 erase=del
89 werase=^W kill=^U reprint=^R sxtc=\0 71 werase=^W kill=^U reprint=^R sxtc=\0
diff --git a/include/asm-arm/arch-at91rm9200/gpio.h b/include/asm-arm/arch-at91rm9200/gpio.h
index a011d27876a2..e09d6528fadf 100644
--- a/include/asm-arm/arch-at91rm9200/gpio.h
+++ b/include/asm-arm/arch-at91rm9200/gpio.h
@@ -179,6 +179,7 @@
179 179
180#ifndef __ASSEMBLY__ 180#ifndef __ASSEMBLY__
181/* setup setup routines, called from board init or driver probe() */ 181/* setup setup routines, called from board init or driver probe() */
182extern int __init_or_module at91_set_GPIO_periph(unsigned pin, int use_pullup);
182extern int __init_or_module at91_set_A_periph(unsigned pin, int use_pullup); 183extern int __init_or_module at91_set_A_periph(unsigned pin, int use_pullup);
183extern int __init_or_module at91_set_B_periph(unsigned pin, int use_pullup); 184extern int __init_or_module at91_set_B_periph(unsigned pin, int use_pullup);
184extern int __init_or_module at91_set_gpio_input(unsigned pin, int use_pullup); 185extern int __init_or_module at91_set_gpio_input(unsigned pin, int use_pullup);
@@ -193,7 +194,50 @@ extern int at91_get_gpio_value(unsigned pin);
193/* callable only from core power-management code */ 194/* callable only from core power-management code */
194extern void at91_gpio_suspend(void); 195extern void at91_gpio_suspend(void);
195extern void at91_gpio_resume(void); 196extern void at91_gpio_resume(void);
196#endif
197 197
198#endif 198/*-------------------------------------------------------------------------*/
199
200/* wrappers for "new style" GPIO calls. the old AT91-specfic ones should
201 * eventually be removed (along with this errno.h inclusion), and the
202 * gpio request/free calls should probably be implemented.
203 */
204
205#include <asm/errno.h>
206
207static inline int gpio_request(unsigned gpio, const char *label)
208{
209 return 0;
210}
211
212static inline void gpio_free(unsigned gpio)
213{
214}
215
216extern int gpio_direction_input(unsigned gpio);
217extern int gpio_direction_output(unsigned gpio);
199 218
219static inline int gpio_get_value(unsigned gpio)
220{
221 return at91_get_gpio_value(gpio);
222}
223
224static inline void gpio_set_value(unsigned gpio, int value)
225{
226 at91_set_gpio_value(gpio, value);
227}
228
229#include <asm-generic/gpio.h> /* cansleep wrappers */
230
231static inline int gpio_to_irq(unsigned gpio)
232{
233 return gpio;
234}
235
236static inline int irq_to_gpio(unsigned irq)
237{
238 return irq;
239}
240
241#endif /* __ASSEMBLY__ */
242
243#endif
diff --git a/include/asm-arm/arch-imx/spi_imx.h b/include/asm-arm/arch-imx/spi_imx.h
new file mode 100644
index 000000000000..2165449e976e
--- /dev/null
+++ b/include/asm-arm/arch-imx/spi_imx.h
@@ -0,0 +1,72 @@
1/*
2 * include/asm-arm/arch-imx/spi_imx.h
3 *
4 * Copyright (C) 2006 SWAPP
5 * Andrea Paterniani <a.paterniani@swapp-eng.it>
6 *
7 * Initial version inspired by:
8 * linux-2.6.17-rc3-mm1/include/asm-arm/arch-pxa/pxa2xx_spi.h
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., 675 Mass Ave, Cambridge, MA 02139, USA.
23 */
24
25#ifndef SPI_IMX_H_
26#define SPI_IMX_H_
27
28
29/*-------------------------------------------------------------------------*/
30/**
31 * struct spi_imx_master - device.platform_data for SPI controller devices.
32 * @num_chipselect: chipselects are used to distinguish individual
33 * SPI slaves, and are numbered from zero to num_chipselects - 1.
34 * each slave has a chipselect signal, but it's common that not
35 * every chipselect is connected to a slave.
36 * @enable_dma: if true enables DMA driven transfers.
37*/
38struct spi_imx_master {
39 u8 num_chipselect;
40 u8 enable_dma:1;
41};
42/*-------------------------------------------------------------------------*/
43
44
45/*-------------------------------------------------------------------------*/
46/**
47 * struct spi_imx_chip - spi_board_info.controller_data for SPI
48 * slave devices, copied to spi_device.controller_data.
49 * @enable_loopback : used for test purpouse to internally connect RX and TX
50 * sections.
51 * @enable_dma : enables dma transfer (provided that controller driver has
52 * dma enabled too).
53 * @ins_ss_pulse : enable /SS pulse insertion between SPI burst.
54 * @bclk_wait : number of bclk waits between each bits_per_word SPI burst.
55 * @cs_control : function pointer to board-specific function to assert/deassert
56 * I/O port to control HW generation of devices chip-select.
57*/
58struct spi_imx_chip {
59 u8 enable_loopback:1;
60 u8 enable_dma:1;
61 u8 ins_ss_pulse:1;
62 u16 bclk_wait:15;
63 void (*cs_control)(u32 control);
64};
65
66/* Chip-select state */
67#define SPI_CS_ASSERT (1 << 0)
68#define SPI_CS_DEASSERT (1 << 1)
69/*-------------------------------------------------------------------------*/
70
71
72#endif /* SPI_IMX_H_*/
diff --git a/include/asm-arm/arch-omap/gpio.h b/include/asm-arm/arch-omap/gpio.h
index f486b72070ea..3762a6ae6a7f 100644
--- a/include/asm-arm/arch-omap/gpio.h
+++ b/include/asm-arm/arch-omap/gpio.h
@@ -76,4 +76,70 @@ extern void omap_set_gpio_direction(int gpio, int is_input);
76extern void omap_set_gpio_dataout(int gpio, int enable); 76extern void omap_set_gpio_dataout(int gpio, int enable);
77extern int omap_get_gpio_datain(int gpio); 77extern int omap_get_gpio_datain(int gpio);
78 78
79/*-------------------------------------------------------------------------*/
80
81/* wrappers for "new style" GPIO calls. the old OMAP-specfic ones should
82 * eventually be removed (along with this errno.h inclusion), and maybe
83 * gpios should put MPUIOs last too.
84 */
85
86#include <asm/errno.h>
87
88static inline int gpio_request(unsigned gpio, const char *label)
89{
90 return omap_request_gpio(gpio);
91}
92
93static inline void gpio_free(unsigned gpio)
94{
95 omap_free_gpio(gpio);
96}
97
98static inline int __gpio_set_direction(unsigned gpio, int is_input)
99{
100 if (cpu_class_is_omap2()) {
101 if (gpio > OMAP_MAX_GPIO_LINES)
102 return -EINVAL;
103 } else {
104 if (gpio > (OMAP_MAX_GPIO_LINES + 16 /* MPUIO */))
105 return -EINVAL;
106 }
107 omap_set_gpio_direction(gpio, is_input);
108 return 0;
109}
110
111static inline int gpio_direction_input(unsigned gpio)
112{
113 return __gpio_set_direction(gpio, 1);
114}
115
116static inline int gpio_direction_output(unsigned gpio)
117{
118 return __gpio_set_direction(gpio, 0);
119}
120
121static inline int gpio_get_value(unsigned gpio)
122{
123 return omap_get_gpio_datain(gpio);
124}
125
126static inline void gpio_set_value(unsigned gpio, int value)
127{
128 omap_set_gpio_dataout(gpio, value);
129}
130
131#include <asm-generic/gpio.h> /* cansleep wrappers */
132
133static inline int gpio_to_irq(unsigned gpio)
134{
135 return OMAP_GPIO_IRQ(gpio);
136}
137
138static inline int irq_to_gpio(unsigned irq)
139{
140 if (cpu_class_is_omap1() && (irq < (IH_MPUIO_BASE + 16)))
141 return (irq - IH_MPUIO_BASE) + OMAP_MAX_GPIO_LINES;
142 return irq - IH_GPIO_BASE;
143}
144
79#endif 145#endif
diff --git a/include/asm-arm/arch-pxa/gpio.h b/include/asm-arm/arch-pxa/gpio.h
new file mode 100644
index 000000000000..e67c23821017
--- /dev/null
+++ b/include/asm-arm/arch-pxa/gpio.h
@@ -0,0 +1,72 @@
1/*
2 * linux/include/asm-arm/arch-pxa/gpio.h
3 *
4 * PXA GPIO wrappers for arch-neutral GPIO calls
5 *
6 * Written by Philipp Zabel <philipp.zabel@gmail.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 *
22 */
23
24#ifndef __ASM_ARCH_PXA_GPIO_H
25#define __ASM_ARCH_PXA_GPIO_H
26
27#include <asm/arch/pxa-regs.h>
28#include <asm/arch/irqs.h>
29#include <asm/arch/hardware.h>
30
31#include <asm/errno.h>
32
33static inline int gpio_request(unsigned gpio, const char *label)
34{
35 return 0;
36}
37
38static inline void gpio_free(unsigned gpio)
39{
40 return;
41}
42
43static inline int gpio_direction_input(unsigned gpio)
44{
45 if (gpio > PXA_LAST_GPIO)
46 return -EINVAL;
47 pxa_gpio_mode(gpio | GPIO_IN);
48}
49
50static inline int gpio_direction_output(unsigned gpio)
51{
52 if (gpio > PXA_LAST_GPIO)
53 return -EINVAL;
54 pxa_gpio_mode(gpio | GPIO_OUT);
55}
56
57/* REVISIT these macros are correct, but suffer code explosion
58 * for non-constant parameters. Provide out-line versions too.
59 */
60#define gpio_get_value(gpio) \
61 (GPLR(gpio) & GPIO_bit(gpio))
62
63#define gpio_set_value(gpio,value) \
64 ((value) ? (GPSR(gpio) = GPIO_bit(gpio)):(GPCR(gpio) = GPIO_bit(gpio)))
65
66#include <asm-generic/gpio.h> /* cansleep wrappers */
67
68#define gpio_to_irq(gpio) IRQ_GPIO(gpio)
69#define irq_to_gpio(irq) IRQ_TO_GPIO(irq)
70
71
72#endif
diff --git a/include/asm-arm/arch-s3c2410/gpio.h b/include/asm-arm/arch-s3c2410/gpio.h
new file mode 100644
index 000000000000..67b8b9ab22e9
--- /dev/null
+++ b/include/asm-arm/arch-s3c2410/gpio.h
@@ -0,0 +1,65 @@
1/*
2 * linux/include/asm-arm/arch-pxa/gpio.h
3 *
4 * S3C2400 GPIO wrappers for arch-neutral GPIO calls
5 *
6 * Written by Philipp Zabel <philipp.zabel@gmail.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 *
22 */
23
24#ifndef __ASM_ARCH_PXA_GPIO_H
25#define __ASM_ARCH_PXA_GPIO_H
26
27#include <asm/arch/pxa-regs.h>
28#include <asm/arch/irqs.h>
29#include <asm/arch/hardware.h>
30
31#include <asm/errno.h>
32
33static inline int gpio_request(unsigned gpio, const char *label)
34{
35 return 0;
36}
37
38static inline void gpio_free(unsigned gpio)
39{
40 return;
41}
42
43static inline int gpio_direction_input(unsigned gpio)
44{
45 s3c2410_gpio_cfgpin(gpio, S3C2410_GPIO_INPUT);
46 return 0;
47}
48
49static inline int gpio_direction_output(unsigned gpio)
50{
51 s3c2410_gpio_cfgpin(gpio, S3C2410_GPIO_OUTPUT);
52 return 0;
53}
54
55#define gpio_get_value(gpio) s3c2410_gpio_getpin(gpio)
56#define gpio_set_value(gpio,value) s3c2410_gpio_setpin(gpio, value)
57
58#include <asm-generic/gpio.h> /* cansleep wrappers */
59
60/* FIXME or maybe s3c2400_gpio_getirq() ... */
61#define gpio_to_irq(gpio) s3c2410_gpio_getirq(gpio)
62
63/* FIXME implement irq_to_gpio() */
64
65#endif
diff --git a/include/asm-arm/arch-sa1100/gpio.h b/include/asm-arm/arch-sa1100/gpio.h
new file mode 100644
index 000000000000..a331fe3f6e48
--- /dev/null
+++ b/include/asm-arm/arch-sa1100/gpio.h
@@ -0,0 +1,81 @@
1/*
2 * linux/include/asm-arm/arch-pxa/gpio.h
3 *
4 * SA1100 GPIO wrappers for arch-neutral GPIO calls
5 *
6 * Written by Philipp Zabel <philipp.zabel@gmail.com>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 *
22 */
23
24#ifndef __ASM_ARCH_SA1100_GPIO_H
25#define __ASM_ARCH_SA1100_GPIO_H
26
27#include <asm/arch/SA-1100.h>
28#include <asm/arch/irqs.h>
29#include <asm/arch/hardware.h>
30
31#include <asm/errno.h>
32
33static inline int gpio_request(unsigned gpio, const char *label)
34{
35 return 0;
36}
37
38static inline void gpio_free(unsigned gpio)
39{
40 return;
41}
42
43static inline int gpio_direction_input(unsigned gpio)
44{
45 if (gpio > GPIO_MAX)
46 return -EINVAL;
47 GPDR = (GPDR_In << gpio) 0
48}
49
50static inline int gpio_direction_output(unsigned gpio)
51{
52 if (gpio > GPIO_MAX)
53 return -EINVAL;
54 GPDR = (GPDR_Out << gpio) 0
55}
56
57#define gpio_get_value(gpio) \
58 (GPLR & GPIO_GPIO(gpio))
59
60#define gpio_set_value(gpio,value) \
61 ((value) ? (GPSR = GPIO_GPIO(gpio)) : (GPCR(gpio) = GPIO_GPIO(gpio)))
62
63#include <asm-generic/gpio.h> /* cansleep wrappers */
64
65static inline unsigned gpio_to_irq(unsigned gpio)
66{
67 if (gpio < 11)
68 return IRQ_GPIO0 + gpio;
69 else
70 return IRQ_GPIO11 - 11 + gpio;
71}
72
73static inline unsigned irq_to_gpio(unsigned irq)
74{
75 if (irq < IRQ_GPIO11_27)
76 return irq - IRQ_GPIO0;
77 else
78 return irq - IRQ_GPIO11 + 11;
79}
80
81#endif
diff --git a/include/asm-arm/gpio.h b/include/asm-arm/gpio.h
new file mode 100644
index 000000000000..fff4f800ee42
--- /dev/null
+++ b/include/asm-arm/gpio.h
@@ -0,0 +1,7 @@
1#ifndef _ARCH_ARM_GPIO_H
2#define _ARCH_ARM_GPIO_H
3
4/* not all ARM platforms necessarily support this API ... */
5#include <asm/arch/gpio.h>
6
7#endif /* _ARCH_ARM_GPIO_H */
diff --git a/include/asm-arm/hardware/gpio_keys.h b/include/asm-arm/hardware/gpio_keys.h
new file mode 100644
index 000000000000..2b217c7b9312
--- /dev/null
+++ b/include/asm-arm/hardware/gpio_keys.h
@@ -0,0 +1,17 @@
1#ifndef _GPIO_KEYS_H
2#define _GPIO_KEYS_H
3
4struct gpio_keys_button {
5 /* Configuration parameters */
6 int keycode;
7 int gpio;
8 int active_low;
9 char *desc;
10};
11
12struct gpio_keys_platform_data {
13 struct gpio_keys_button *buttons;
14 int nbuttons;
15};
16
17#endif
diff --git a/include/asm-arm/spinlock.h b/include/asm-arm/spinlock.h
index 861092fbaa53..800ba5254daf 100644
--- a/include/asm-arm/spinlock.h
+++ b/include/asm-arm/spinlock.h
@@ -85,7 +85,6 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock)
85 * Write locks are easy - we just set bit 31. When unlocking, we can 85 * Write locks are easy - we just set bit 31. When unlocking, we can
86 * just write zero since the lock is exclusively held. 86 * just write zero since the lock is exclusively held.
87 */ 87 */
88#define rwlock_is_locked(x) (*((volatile unsigned int *)(x)) != 0)
89 88
90static inline void __raw_write_lock(raw_rwlock_t *rw) 89static inline void __raw_write_lock(raw_rwlock_t *rw)
91{ 90{
diff --git a/include/asm-arm/termios.h b/include/asm-arm/termios.h
index 7b8f5e8ae063..329c324c4040 100644
--- a/include/asm-arm/termios.h
+++ b/include/asm-arm/termios.h
@@ -49,24 +49,6 @@ struct termio {
49 49
50/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ 50/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
51 51
52/* line disciplines */
53#define N_TTY 0
54#define N_SLIP 1
55#define N_MOUSE 2
56#define N_PPP 3
57#define N_STRIP 4
58#define N_AX25 5
59#define N_X25 6 /* X.25 async */
60#define N_6PACK 7
61#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
62#define N_R3964 9 /* Reserved for Simatic R3964 module */
63#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
64#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */
65#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
66#define N_HDLC 13 /* synchronous HDLC */
67#define N_SYNC_PPP 14
68#define N_HCI 15 /* Bluetooth HCI UART */
69
70#ifdef __KERNEL__ 52#ifdef __KERNEL__
71 53
72/* 54/*
diff --git a/include/asm-arm/uaccess.h b/include/asm-arm/uaccess.h
index 5f420a0149f1..c92df958802e 100644
--- a/include/asm-arm/uaccess.h
+++ b/include/asm-arm/uaccess.h
@@ -76,10 +76,10 @@ static inline void set_fs(mm_segment_t fs)
76 76
77/* We use 33-bit arithmetic here... */ 77/* We use 33-bit arithmetic here... */
78#define __range_ok(addr,size) ({ \ 78#define __range_ok(addr,size) ({ \
79 unsigned long flag, sum; \ 79 unsigned long flag, roksum; \
80 __chk_user_ptr(addr); \ 80 __chk_user_ptr(addr); \
81 __asm__("adds %1, %2, %3; sbcccs %1, %1, %0; movcc %0, #0" \ 81 __asm__("adds %1, %2, %3; sbcccs %1, %1, %0; movcc %0, #0" \
82 : "=&r" (flag), "=&r" (sum) \ 82 : "=&r" (flag), "=&r" (roksum) \
83 : "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit) \ 83 : "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit) \
84 : "cc"); \ 84 : "cc"); \
85 flag; }) 85 flag; })
diff --git a/include/asm-arm26/termios.h b/include/asm-arm26/termios.h
index 7b8f5e8ae063..329c324c4040 100644
--- a/include/asm-arm26/termios.h
+++ b/include/asm-arm26/termios.h
@@ -49,24 +49,6 @@ struct termio {
49 49
50/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ 50/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
51 51
52/* line disciplines */
53#define N_TTY 0
54#define N_SLIP 1
55#define N_MOUSE 2
56#define N_PPP 3
57#define N_STRIP 4
58#define N_AX25 5
59#define N_X25 6 /* X.25 async */
60#define N_6PACK 7
61#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
62#define N_R3964 9 /* Reserved for Simatic R3964 module */
63#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
64#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */
65#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
66#define N_HDLC 13 /* synchronous HDLC */
67#define N_SYNC_PPP 14
68#define N_HCI 15 /* Bluetooth HCI UART */
69
70#ifdef __KERNEL__ 52#ifdef __KERNEL__
71 53
72/* 54/*
diff --git a/include/asm-arm26/uaccess-asm.h b/include/asm-arm26/uaccess-asm.h
index 19f798e338c9..ade76ec02995 100644
--- a/include/asm-arm26/uaccess-asm.h
+++ b/include/asm-arm26/uaccess-asm.h
@@ -34,9 +34,9 @@ static inline void set_fs (mm_segment_t fs)
34} 34}
35 35
36#define __range_ok(addr,size) ({ \ 36#define __range_ok(addr,size) ({ \
37 unsigned long flag, sum; \ 37 unsigned long flag, roksum; \
38 __asm__ __volatile__("subs %1, %0, %3; cmpcs %1, %2; movcs %0, #0" \ 38 __asm__ __volatile__("subs %1, %0, %3; cmpcs %1, %2; movcs %0, #0" \
39 : "=&r" (flag), "=&r" (sum) \ 39 : "=&r" (flag), "=&r" (roksum) \
40 : "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit) \ 40 : "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit) \
41 : "cc"); \ 41 : "cc"); \
42 flag; }) 42 flag; })
diff --git a/include/asm-avr32/termios.h b/include/asm-avr32/termios.h
index 615bc0639e5c..0152aba35154 100644
--- a/include/asm-avr32/termios.h
+++ b/include/asm-avr32/termios.h
@@ -46,24 +46,6 @@ struct termio {
46 46
47/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ 47/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
48 48
49/* line disciplines */
50#define N_TTY 0
51#define N_SLIP 1
52#define N_MOUSE 2
53#define N_PPP 3
54#define N_STRIP 4
55#define N_AX25 5
56#define N_X25 6 /* X.25 async */
57#define N_6PACK 7
58#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
59#define N_R3964 9 /* Reserved for Simatic R3964 module */
60#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
61#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */
62#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
63#define N_HDLC 13 /* synchronous HDLC */
64#define N_SYNC_PPP 14 /* synchronous PPP */
65#define N_HCI 15 /* Bluetooth HCI UART */
66
67#ifdef __KERNEL__ 49#ifdef __KERNEL__
68/* intr=^C quit=^\ erase=del kill=^U 50/* intr=^C quit=^\ erase=del kill=^U
69 eof=^D vtime=\0 vmin=\1 sxtc=\0 51 eof=^D vtime=\0 vmin=\1 sxtc=\0
diff --git a/include/asm-cris/semaphore-helper.h b/include/asm-cris/semaphore-helper.h
index a8e1e6cb7cd0..27bfeca1b981 100644
--- a/include/asm-cris/semaphore-helper.h
+++ b/include/asm-cris/semaphore-helper.h
@@ -30,8 +30,7 @@ static inline int waking_non_zero(struct semaphore *sem)
30 unsigned long flags; 30 unsigned long flags;
31 int ret = 0; 31 int ret = 0;
32 32
33 local_save_flags(flags); 33 local_irq_save(flags);
34 local_irq_disable();
35 if (read(&sem->waking) > 0) { 34 if (read(&sem->waking) > 0) {
36 dec(&sem->waking); 35 dec(&sem->waking);
37 ret = 1; 36 ret = 1;
@@ -46,8 +45,7 @@ static inline int waking_non_zero_interruptible(struct semaphore *sem,
46 int ret = 0; 45 int ret = 0;
47 unsigned long flags; 46 unsigned long flags;
48 47
49 local_save_flags(flags); 48 local_irq_save(flags);
50 local_irq_disable();
51 if (read(&sem->waking) > 0) { 49 if (read(&sem->waking) > 0) {
52 dec(&sem->waking); 50 dec(&sem->waking);
53 ret = 1; 51 ret = 1;
@@ -64,8 +62,7 @@ static inline int waking_non_zero_trylock(struct semaphore *sem)
64 int ret = 1; 62 int ret = 1;
65 unsigned long flags; 63 unsigned long flags;
66 64
67 local_save_flags(flags); 65 local_irq_save(flags);
68 local_irq_disable();
69 if (read(&sem->waking) <= 0) 66 if (read(&sem->waking) <= 0)
70 inc(&sem->count); 67 inc(&sem->count);
71 else { 68 else {
diff --git a/include/asm-cris/system.h b/include/asm-cris/system.h
index b869f6161aaa..fea0e8d57cb5 100644
--- a/include/asm-cris/system.h
+++ b/include/asm-cris/system.h
@@ -44,8 +44,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void * ptr, int siz
44 /* since Etrax doesn't have any atomic xchg instructions, we need to disable 44 /* since Etrax doesn't have any atomic xchg instructions, we need to disable
45 irq's (if enabled) and do it with move.d's */ 45 irq's (if enabled) and do it with move.d's */
46 unsigned long flags,temp; 46 unsigned long flags,temp;
47 local_save_flags(flags); /* save flags, including irq enable bit */ 47 local_irq_save(flags); /* save flags, including irq enable bit and shut off irqs */
48 local_irq_disable(); /* shut off irq's */
49 switch (size) { 48 switch (size) {
50 case 1: 49 case 1:
51 *((unsigned char *)&temp) = x; 50 *((unsigned char *)&temp) = x;
diff --git a/include/asm-cris/termios.h b/include/asm-cris/termios.h
index 5ce1023c5d7b..c9dbd4d43368 100644
--- a/include/asm-cris/termios.h
+++ b/include/asm-cris/termios.h
@@ -40,24 +40,6 @@ struct termio {
40 40
41/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ 41/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
42 42
43/* line disciplines */
44#define N_TTY 0
45#define N_SLIP 1
46#define N_MOUSE 2
47#define N_PPP 3
48#define N_STRIP 4
49#define N_AX25 5
50#define N_X25 6 /* X.25 async */
51#define N_6PACK 7
52#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
53#define N_R3964 9 /* Reserved for Simatic R3964 module */
54#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
55#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */
56#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
57#define N_HDLC 13 /* synchronous HDLC */
58#define N_SYNC_PPP 14 /* synchronous PPP */
59#define N_BT 15 /* bluetooth */
60
61#ifdef __KERNEL__ 43#ifdef __KERNEL__
62 44
63/* intr=^C quit=^\ erase=del kill=^U 45/* intr=^C quit=^\ erase=del kill=^U
diff --git a/include/asm-frv/termios.h b/include/asm-frv/termios.h
index 8840cf95e8dd..a62fb5872375 100644
--- a/include/asm-frv/termios.h
+++ b/include/asm-frv/termios.h
@@ -51,24 +51,6 @@ struct termio {
51 51
52/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ 52/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
53 53
54/* line disciplines */
55#define N_TTY 0
56#define N_SLIP 1
57#define N_MOUSE 2
58#define N_PPP 3
59#define N_STRIP 4
60#define N_AX25 5
61#define N_X25 6 /* X.25 async */
62#define N_6PACK 7
63#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
64#define N_R3964 9 /* Reserved for Simatic R3964 module */
65#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
66#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */
67#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
68#define N_HDLC 13 /* synchronous HDLC */
69#define N_SYNC_PPP 14
70#define N_HCI 15 /* Bluetooth HCI UART */
71
72#ifdef __KERNEL__ 54#ifdef __KERNEL__
73#include <asm-generic/termios.h> 55#include <asm-generic/termios.h>
74#endif 56#endif
diff --git a/include/asm-generic/dma-mapping-broken.h b/include/asm-generic/dma-mapping-broken.h
index a7f1a55ce6b0..29413d3d4605 100644
--- a/include/asm-generic/dma-mapping-broken.h
+++ b/include/asm-generic/dma-mapping-broken.h
@@ -3,7 +3,6 @@
3 3
4/* This is used for archs that do not support DMA */ 4/* This is used for archs that do not support DMA */
5 5
6
7static inline void * 6static inline void *
8dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, 7dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
9 gfp_t flag) 8 gfp_t flag)
@@ -19,4 +18,7 @@ dma_free_coherent(struct device *dev, size_t size, void *cpu_addr,
19 BUG(); 18 BUG();
20} 19}
21 20
21#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
22#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
23
22#endif /* _ASM_GENERIC_DMA_MAPPING_H */ 24#endif /* _ASM_GENERIC_DMA_MAPPING_H */
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
new file mode 100644
index 000000000000..2d0aab1d8611
--- /dev/null
+++ b/include/asm-generic/gpio.h
@@ -0,0 +1,25 @@
1#ifndef _ASM_GENERIC_GPIO_H
2#define _ASM_GENERIC_GPIO_H
3
4/* platforms that don't directly support access to GPIOs through I2C, SPI,
5 * or other blocking infrastructure can use these wrappers.
6 */
7
8static inline int gpio_cansleep(unsigned gpio)
9{
10 return 0;
11}
12
13static inline int gpio_get_value_cansleep(unsigned gpio)
14{
15 might_sleep();
16 return gpio_get_value(gpio);
17}
18
19static inline void gpio_set_value_cansleep(unsigned gpio, int value)
20{
21 might_sleep();
22 gpio_set_value(gpio, value);
23}
24
25#endif /* _ASM_GENERIC_GPIO_H */
diff --git a/include/asm-generic/memory_model.h b/include/asm-generic/memory_model.h
index 8078cbd2c016..30d8d33491dd 100644
--- a/include/asm-generic/memory_model.h
+++ b/include/asm-generic/memory_model.h
@@ -54,7 +54,7 @@
54#define __page_to_pfn(pg) \ 54#define __page_to_pfn(pg) \
55({ struct page *__pg = (pg); \ 55({ struct page *__pg = (pg); \
56 int __sec = page_to_section(__pg); \ 56 int __sec = page_to_section(__pg); \
57 __pg - __section_mem_map_addr(__nr_to_section(__sec)); \ 57 (unsigned long)(__pg - __section_mem_map_addr(__nr_to_section(__sec))); \
58}) 58})
59 59
60#define __pfn_to_page(pfn) \ 60#define __pfn_to_page(pfn) \
diff --git a/include/asm-generic/mman.h b/include/asm-generic/mman.h
index 3b41d2bb70da..5e3dde2ee5ad 100644
--- a/include/asm-generic/mman.h
+++ b/include/asm-generic/mman.h
@@ -36,7 +36,6 @@
36#define MADV_DOFORK 11 /* do inherit across fork */ 36#define MADV_DOFORK 11 /* do inherit across fork */
37 37
38/* compatibility flags */ 38/* compatibility flags */
39#define MAP_ANON MAP_ANONYMOUS
40#define MAP_FILE 0 39#define MAP_FILE 0
41 40
42#endif 41#endif
diff --git a/include/asm-h8300/termios.h b/include/asm-h8300/termios.h
index e2319f992af2..fb2925d08c49 100644
--- a/include/asm-h8300/termios.h
+++ b/include/asm-h8300/termios.h
@@ -49,24 +49,6 @@ struct termio {
49 49
50/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ 50/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
51 51
52/* line disciplines */
53#define N_TTY 0
54#define N_SLIP 1
55#define N_MOUSE 2
56#define N_PPP 3
57#define N_STRIP 4
58#define N_AX25 5
59#define N_X25 6 /* X.25 async */
60#define N_6PACK 7
61#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
62#define N_R3964 9 /* Reserved for Simatic R3964 module */
63#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
64#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */
65#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
66#define N_HDLC 13 /* synchronous HDLC */
67#define N_SYNC_PPP 14
68#define N_HCI 15 /* Bluetooth HCI UART */
69
70#ifdef __KERNEL__ 52#ifdef __KERNEL__
71 53
72/* 54/*
diff --git a/include/asm-i386/atomic.h b/include/asm-i386/atomic.h
index c57441bb2905..4dd272331361 100644
--- a/include/asm-i386/atomic.h
+++ b/include/asm-i386/atomic.h
@@ -211,12 +211,12 @@ static __inline__ int atomic_sub_return(int i, atomic_t *v)
211#define atomic_xchg(v, new) (xchg(&((v)->counter), new)) 211#define atomic_xchg(v, new) (xchg(&((v)->counter), new))
212 212
213/** 213/**
214 * atomic_add_unless - add unless the number is a given value 214 * atomic_add_unless - add unless the number is already a given value
215 * @v: pointer of type atomic_t 215 * @v: pointer of type atomic_t
216 * @a: the amount to add to v... 216 * @a: the amount to add to v...
217 * @u: ...unless v is equal to u. 217 * @u: ...unless v is equal to u.
218 * 218 *
219 * Atomically adds @a to @v, so long as it was not @u. 219 * Atomically adds @a to @v, so long as @v was not already @u.
220 * Returns non-zero if @v was not @u, and zero otherwise. 220 * Returns non-zero if @v was not @u, and zero otherwise.
221 */ 221 */
222#define atomic_add_unless(v, a, u) \ 222#define atomic_add_unless(v, a, u) \
diff --git a/include/asm-i386/bitops.h b/include/asm-i386/bitops.h
index 1c780fa1e762..273b50629357 100644
--- a/include/asm-i386/bitops.h
+++ b/include/asm-i386/bitops.h
@@ -371,7 +371,7 @@ static inline unsigned long ffz(unsigned long word)
371 * 371 *
372 * This is defined the same way as 372 * This is defined the same way as
373 * the libc and compiler builtin ffs routines, therefore 373 * the libc and compiler builtin ffs routines, therefore
374 * differs in spirit from the above ffz (man ffs). 374 * differs in spirit from the above ffz() (man ffs).
375 */ 375 */
376static inline int ffs(int x) 376static inline int ffs(int x)
377{ 377{
@@ -388,7 +388,7 @@ static inline int ffs(int x)
388 * fls - find last bit set 388 * fls - find last bit set
389 * @x: the word to search 389 * @x: the word to search
390 * 390 *
391 * This is defined the same way as ffs. 391 * This is defined the same way as ffs().
392 */ 392 */
393static inline int fls(int x) 393static inline int fls(int x)
394{ 394{
diff --git a/include/asm-i386/setup.h b/include/asm-i386/setup.h
index 67659dbaf120..76316275d6f9 100644
--- a/include/asm-i386/setup.h
+++ b/include/asm-i386/setup.h
@@ -6,7 +6,7 @@
6#ifndef _i386_SETUP_H 6#ifndef _i386_SETUP_H
7#define _i386_SETUP_H 7#define _i386_SETUP_H
8 8
9#define COMMAND_LINE_SIZE 256 9#define COMMAND_LINE_SIZE 2048
10 10
11#ifdef __KERNEL__ 11#ifdef __KERNEL__
12#include <linux/pfn.h> 12#include <linux/pfn.h>
diff --git a/include/asm-i386/termios.h b/include/asm-i386/termios.h
index 03f548536d6b..7c99678a8f86 100644
--- a/include/asm-i386/termios.h
+++ b/include/asm-i386/termios.h
@@ -39,24 +39,6 @@ struct termio {
39 39
40/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ 40/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
41 41
42/* line disciplines */
43#define N_TTY 0
44#define N_SLIP 1
45#define N_MOUSE 2
46#define N_PPP 3
47#define N_STRIP 4
48#define N_AX25 5
49#define N_X25 6 /* X.25 async */
50#define N_6PACK 7
51#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
52#define N_R3964 9 /* Reserved for Simatic R3964 module */
53#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
54#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */
55#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
56#define N_HDLC 13 /* synchronous HDLC */
57#define N_SYNC_PPP 14 /* synchronous PPP */
58#define N_HCI 15 /* Bluetooth HCI UART */
59
60#ifdef __KERNEL__ 42#ifdef __KERNEL__
61#include <linux/module.h> 43#include <linux/module.h>
62 44
diff --git a/include/asm-i386/uaccess.h b/include/asm-i386/uaccess.h
index eef5133b9ce2..70829ae3ad52 100644
--- a/include/asm-i386/uaccess.h
+++ b/include/asm-i386/uaccess.h
@@ -54,10 +54,10 @@ extern struct movsl_mask {
54 * This needs 33-bit arithmetic. We have a carry... 54 * This needs 33-bit arithmetic. We have a carry...
55 */ 55 */
56#define __range_ok(addr,size) ({ \ 56#define __range_ok(addr,size) ({ \
57 unsigned long flag,sum; \ 57 unsigned long flag,roksum; \
58 __chk_user_ptr(addr); \ 58 __chk_user_ptr(addr); \
59 asm("addl %3,%1 ; sbbl %0,%0; cmpl %1,%4; sbbl $0,%0" \ 59 asm("addl %3,%1 ; sbbl %0,%0; cmpl %1,%4; sbbl $0,%0" \
60 :"=&r" (flag), "=r" (sum) \ 60 :"=&r" (flag), "=r" (roksum) \
61 :"1" (addr),"g" ((int)(size)),"rm" (current_thread_info()->addr_limit.seg)); \ 61 :"1" (addr),"g" ((int)(size)),"rm" (current_thread_info()->addr_limit.seg)); \
62 flag; }) 62 flag; })
63 63
diff --git a/include/asm-ia64/setup.h b/include/asm-ia64/setup.h
index ea29b57affcb..4399a44355b3 100644
--- a/include/asm-ia64/setup.h
+++ b/include/asm-ia64/setup.h
@@ -1,6 +1,6 @@
1#ifndef __IA64_SETUP_H 1#ifndef __IA64_SETUP_H
2#define __IA64_SETUP_H 2#define __IA64_SETUP_H
3 3
4#define COMMAND_LINE_SIZE 512 4#define COMMAND_LINE_SIZE 2048
5 5
6#endif 6#endif
diff --git a/include/asm-ia64/termios.h b/include/asm-ia64/termios.h
index 42c95693240c..08750c2d3607 100644
--- a/include/asm-ia64/termios.h
+++ b/include/asm-ia64/termios.h
@@ -46,24 +46,6 @@ struct termio {
46 46
47/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ 47/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
48 48
49/* line disciplines */
50#define N_TTY 0
51#define N_SLIP 1
52#define N_MOUSE 2
53#define N_PPP 3
54#define N_STRIP 4
55#define N_AX25 5
56#define N_X25 6 /* X.25 async */
57#define N_6PACK 7
58#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
59#define N_R3964 9 /* Reserved for Simatic R3964 module */
60#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
61#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */
62#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS msgs */
63#define N_HDLC 13 /* synchronous HDLC */
64#define N_SYNC_PPP 14 /* synchronous PPP */
65#define N_HCI 15 /* Bluetooth HCI UART */
66
67# ifdef __KERNEL__ 49# ifdef __KERNEL__
68 50
69/* intr=^C quit=^\ erase=del kill=^U 51/* intr=^C quit=^\ erase=del kill=^U
diff --git a/include/asm-m32r/a.out.h b/include/asm-m32r/a.out.h
index 4619ba5c372e..9a4a5d20160a 100644
--- a/include/asm-m32r/a.out.h
+++ b/include/asm-m32r/a.out.h
@@ -1,8 +1,6 @@
1#ifndef _ASM_M32R_A_OUT_H 1#ifndef _ASM_M32R_A_OUT_H
2#define _ASM_M32R_A_OUT_H 2#define _ASM_M32R_A_OUT_H
3 3
4/* orig : i386 2.4.18 */
5
6struct exec 4struct exec
7{ 5{
8 unsigned long a_info; /* Use macros N_MAGIC, etc for access */ 6 unsigned long a_info; /* Use macros N_MAGIC, etc for access */
diff --git a/include/asm-m32r/addrspace.h b/include/asm-m32r/addrspace.h
index 06a83dc94648..81782c122da4 100644
--- a/include/asm-m32r/addrspace.h
+++ b/include/asm-m32r/addrspace.h
@@ -1,4 +1,3 @@
1/* $Id$ */
2/* 1/*
3 * This file is subject to the terms and conditions of the GNU General Public 2 * This file is subject to the terms and conditions of the GNU General Public
4 * License. See the file "COPYING" in the main directory of this archive 3 * License. See the file "COPYING" in the main directory of this archive
diff --git a/include/asm-m32r/bugs.h b/include/asm-m32r/bugs.h
index 9a56f661bdb3..f77214eff136 100644
--- a/include/asm-m32r/bugs.h
+++ b/include/asm-m32r/bugs.h
@@ -1,8 +1,6 @@
1#ifndef _ASM_M32R_BUGS_H 1#ifndef _ASM_M32R_BUGS_H
2#define _ASM_M32R_BUGS_H 2#define _ASM_M32R_BUGS_H
3 3
4/* $Id$ */
5
6/* 4/*
7 * This is included by init/main.c to check for architecture-dependent bugs. 5 * This is included by init/main.c to check for architecture-dependent bugs.
8 * 6 *
diff --git a/include/asm-m32r/byteorder.h b/include/asm-m32r/byteorder.h
index 3c0b9a2e03bc..10b2c1d11614 100644
--- a/include/asm-m32r/byteorder.h
+++ b/include/asm-m32r/byteorder.h
@@ -1,8 +1,6 @@
1#ifndef _ASM_M32R_BYTEORDER_H 1#ifndef _ASM_M32R_BYTEORDER_H
2#define _ASM_M32R_BYTEORDER_H 2#define _ASM_M32R_BYTEORDER_H
3 3
4/* $Id$ */
5
6#include <asm/types.h> 4#include <asm/types.h>
7 5
8#if !defined(__STRICT_ANSI__) || defined(__KERNEL__) 6#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
diff --git a/include/asm-m32r/cache.h b/include/asm-m32r/cache.h
index 9c2b2d9998bc..40b3ee98193d 100644
--- a/include/asm-m32r/cache.h
+++ b/include/asm-m32r/cache.h
@@ -1,8 +1,6 @@
1#ifndef _ASM_M32R_CACHE_H 1#ifndef _ASM_M32R_CACHE_H
2#define _ASM_M32R_CACHE_H 2#define _ASM_M32R_CACHE_H
3 3
4/* $Id$ */
5
6/* L1 cache line size */ 4/* L1 cache line size */
7#define L1_CACHE_SHIFT 4 5#define L1_CACHE_SHIFT 4
8#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) 6#define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT)
diff --git a/include/asm-m32r/cacheflush.h b/include/asm-m32r/cacheflush.h
index 56961a9511b2..78587c958146 100644
--- a/include/asm-m32r/cacheflush.h
+++ b/include/asm-m32r/cacheflush.h
@@ -67,4 +67,3 @@ do { \
67 memcpy(dst, src, len) 67 memcpy(dst, src, len)
68 68
69#endif /* _ASM_M32R_CACHEFLUSH_H */ 69#endif /* _ASM_M32R_CACHEFLUSH_H */
70
diff --git a/include/asm-m32r/current.h b/include/asm-m32r/current.h
index c19d927ff22d..7859d864f2c2 100644
--- a/include/asm-m32r/current.h
+++ b/include/asm-m32r/current.h
@@ -1,8 +1,6 @@
1#ifndef _ASM_M32R_CURRENT_H 1#ifndef _ASM_M32R_CURRENT_H
2#define _ASM_M32R_CURRENT_H 2#define _ASM_M32R_CURRENT_H
3 3
4/* $Id$ */
5
6#include <linux/thread_info.h> 4#include <linux/thread_info.h>
7 5
8struct task_struct; 6struct task_struct;
@@ -15,4 +13,3 @@ static __inline__ struct task_struct *get_current(void)
15#define current (get_current()) 13#define current (get_current())
16 14
17#endif /* _ASM_M32R_CURRENT_H */ 15#endif /* _ASM_M32R_CURRENT_H */
18
diff --git a/include/asm-m32r/delay.h b/include/asm-m32r/delay.h
index f285eaee7d27..164448d23850 100644
--- a/include/asm-m32r/delay.h
+++ b/include/asm-m32r/delay.h
@@ -1,8 +1,6 @@
1#ifndef _ASM_M32R_DELAY_H 1#ifndef _ASM_M32R_DELAY_H
2#define _ASM_M32R_DELAY_H 2#define _ASM_M32R_DELAY_H
3 3
4/* $Id$ */
5
6/* 4/*
7 * Copyright (C) 1993 Linus Torvalds 5 * Copyright (C) 1993 Linus Torvalds
8 * 6 *
diff --git a/include/asm-m32r/dma.h b/include/asm-m32r/dma.h
index 7263b013b67e..52f6a22dd232 100644
--- a/include/asm-m32r/dma.h
+++ b/include/asm-m32r/dma.h
@@ -1,8 +1,6 @@
1#ifndef _ASM_M32R_DMA_H 1#ifndef _ASM_M32R_DMA_H
2#define _ASM_M32R_DMA_H 2#define _ASM_M32R_DMA_H
3 3
4/* $Id$ */
5
6#include <asm/io.h> 4#include <asm/io.h>
7 5
8/* 6/*
diff --git a/include/asm-m32r/errno.h b/include/asm-m32r/errno.h
index 7a98520194a7..777149262aad 100644
--- a/include/asm-m32r/errno.h
+++ b/include/asm-m32r/errno.h
@@ -1,9 +1,6 @@
1#ifndef _ASM_M32R_ERRNO_H 1#ifndef _ASM_M32R_ERRNO_H
2#define _ASM_M32R_ERRNO_H 2#define _ASM_M32R_ERRNO_H
3 3
4/* $Id$ */
5
6#include <asm-generic/errno.h> 4#include <asm-generic/errno.h>
7 5
8#endif /* _ASM_M32R_ERRNO_H */ 6#endif /* _ASM_M32R_ERRNO_H */
9
diff --git a/include/asm-m32r/ide.h b/include/asm-m32r/ide.h
index c82ebe8f250d..4672a49e8760 100644
--- a/include/asm-m32r/ide.h
+++ b/include/asm-m32r/ide.h
@@ -1,8 +1,6 @@
1#ifndef _ASM_M32R_IDE_H 1#ifndef _ASM_M32R_IDE_H
2#define _ASM_M32R_IDE_H 2#define _ASM_M32R_IDE_H
3 3
4/* $Id$ */
5
6/* 4/*
7 * linux/include/asm-m32r/ide.h 5 * linux/include/asm-m32r/ide.h
8 * 6 *
@@ -15,6 +13,7 @@
15 13
16#ifdef __KERNEL__ 14#ifdef __KERNEL__
17 15
16#include <asm/m32r.h>
18 17
19#ifndef MAX_HWIFS 18#ifndef MAX_HWIFS
20# ifdef CONFIG_BLK_DEV_IDEPCI 19# ifdef CONFIG_BLK_DEV_IDEPCI
@@ -24,9 +23,6 @@
24# endif 23# endif
25#endif 24#endif
26 25
27#include <asm/m32r.h>
28
29
30#define IDE_ARCH_OBSOLETE_DEFAULTS 26#define IDE_ARCH_OBSOLETE_DEFAULTS
31 27
32static __inline__ int ide_default_irq(unsigned long base) 28static __inline__ int ide_default_irq(unsigned long base)
diff --git a/include/asm-m32r/ioctls.h b/include/asm-m32r/ioctls.h
index b3508292246a..d23cfc45738a 100644
--- a/include/asm-m32r/ioctls.h
+++ b/include/asm-m32r/ioctls.h
@@ -1,10 +1,6 @@
1#ifndef __ARCH_M32R_IOCTLS_H__ 1#ifndef __ARCH_M32R_IOCTLS_H__
2#define __ARCH_M32R_IOCTLS_H__ 2#define __ARCH_M32R_IOCTLS_H__
3 3
4/* $Id$ */
5
6/* orig : i386 2.5.67 */
7
8#include <asm/ioctl.h> 4#include <asm/ioctl.h>
9 5
10/* 0x54 is just a magic number to make these relatively unique ('T') */ 6/* 0x54 is just a magic number to make these relatively unique ('T') */
@@ -85,4 +81,3 @@
85#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */ 81#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
86 82
87#endif /* __ARCH_M32R_IOCTLS_H__ */ 83#endif /* __ARCH_M32R_IOCTLS_H__ */
88
diff --git a/include/asm-m32r/ipcbuf.h b/include/asm-m32r/ipcbuf.h
index 7c77fb0b1467..8d2d7c8ffdb0 100644
--- a/include/asm-m32r/ipcbuf.h
+++ b/include/asm-m32r/ipcbuf.h
@@ -1,10 +1,6 @@
1#ifndef _ASM_M32R_IPCBUF_H 1#ifndef _ASM_M32R_IPCBUF_H
2#define _ASM_M32R_IPCBUF_H 2#define _ASM_M32R_IPCBUF_H
3 3
4/* $Id$ */
5
6/* orig : i386 2.4.18 */
7
8/* 4/*
9 * The ipc64_perm structure for m32r architecture. 5 * The ipc64_perm structure for m32r architecture.
10 * Note extra padding because this structure is passed back and forth 6 * Note extra padding because this structure is passed back and forth
diff --git a/include/asm-m32r/kmap_types.h b/include/asm-m32r/kmap_types.h
index 0524d89edb0f..fa94dc6410ea 100644
--- a/include/asm-m32r/kmap_types.h
+++ b/include/asm-m32r/kmap_types.h
@@ -1,9 +1,6 @@
1#ifndef __M32R_KMAP_TYPES_H 1#ifndef __M32R_KMAP_TYPES_H
2#define __M32R_KMAP_TYPES_H 2#define __M32R_KMAP_TYPES_H
3 3
4/* Dummy header just to define km_type. */
5
6
7#ifdef CONFIG_DEBUG_HIGHMEM 4#ifdef CONFIG_DEBUG_HIGHMEM
8# define D(n) __KM_FENCE_##n , 5# define D(n) __KM_FENCE_##n ,
9#else 6#else
@@ -30,4 +27,3 @@ D(13) KM_TYPE_NR
30#undef D 27#undef D
31 28
32#endif /* __M32R_KMAP_TYPES_H */ 29#endif /* __M32R_KMAP_TYPES_H */
33
diff --git a/include/asm-m32r/m32104ut/m32104ut_pld.h b/include/asm-m32r/m32104ut/m32104ut_pld.h
index cbdbc5891445..2dc89d68b6d9 100644
--- a/include/asm-m32r/m32104ut/m32104ut_pld.h
+++ b/include/asm-m32r/m32104ut/m32104ut_pld.h
@@ -1,3 +1,6 @@
1#ifndef _M32104UT_M32104UT_PLD_H
2#define _M32104UT_M32104UT_PLD_H
3
1/* 4/*
2 * include/asm-m32r/m32104ut/m32104ut_pld.h 5 * include/asm-m32r/m32104ut/m32104ut_pld.h
3 * 6 *
@@ -12,10 +15,6 @@
12 * this archive for more details. 15 * this archive for more details.
13 */ 16 */
14 17
15#ifndef _M32104UT_M32104UT_PLD_H
16#define _M32104UT_M32104UT_PLD_H
17
18
19#if defined(CONFIG_PLAT_M32104UT) 18#if defined(CONFIG_PLAT_M32104UT)
20#define PLD_PLAT_BASE 0x02c00000 19#define PLD_PLAT_BASE 0x02c00000
21#else 20#else
@@ -35,7 +34,7 @@
35#define __reg8 34#define __reg8
36#define __reg16 35#define __reg16
37#define __reg32 36#define __reg32
38#endif /* __ASSEMBLY__ */ 37#endif /* __ASSEMBLY__ */
39 38
40/* CFC */ 39/* CFC */
41#define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) 40#define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000)
@@ -159,4 +158,4 @@
159#define PLD_SCTXB __reg16(PLD_BASE + 0x3800c) 158#define PLD_SCTXB __reg16(PLD_BASE + 0x3800c)
160#define PLD_SCRXB __reg16(PLD_BASE + 0x3800e) 159#define PLD_SCRXB __reg16(PLD_BASE + 0x3800e)
161 160
162#endif /* _M32104UT_M32104UT_PLD_H */ 161#endif /* _M32104UT_M32104UT_PLD_H */
diff --git a/include/asm-m32r/m32700ut/m32700ut_lan.h b/include/asm-m32r/m32700ut/m32700ut_lan.h
index f1e47ae1f891..aae810a4fb2c 100644
--- a/include/asm-m32r/m32700ut/m32700ut_lan.h
+++ b/include/asm-m32r/m32700ut/m32700ut_lan.h
@@ -1,3 +1,6 @@
1#ifndef _M32700UT_M32700UT_LAN_H
2#define _M32700UT_M32700UT_LAN_H
3
1/* 4/*
2 * include/asm-m32r/m32700ut/m32700ut_lan.h 5 * include/asm-m32r/m32700ut/m32700ut_lan.h
3 * 6 *
@@ -8,14 +11,8 @@
8 * This file is subject to the terms and conditions of the GNU General 11 * This file is subject to the terms and conditions of the GNU General
9 * Public License. See the file "COPYING" in the main directory of 12 * Public License. See the file "COPYING" in the main directory of
10 * this archive for more details. 13 * this archive for more details.
11 *
12 * $Id$
13 */ 14 */
14 15
15#ifndef _M32700UT_M32700UT_LAN_H
16#define _M32700UT_M32700UT_LAN_H
17
18
19#ifndef __ASSEMBLY__ 16#ifndef __ASSEMBLY__
20/* 17/*
21 * C functions use non-cache address. 18 * C functions use non-cache address.
@@ -23,7 +20,7 @@
23#define M32700UT_LAN_BASE (0x10000000 /* + NONCACHE_OFFSET */) 20#define M32700UT_LAN_BASE (0x10000000 /* + NONCACHE_OFFSET */)
24#else 21#else
25#define M32700UT_LAN_BASE (0x10000000 + NONCACHE_OFFSET) 22#define M32700UT_LAN_BASE (0x10000000 + NONCACHE_OFFSET)
26#endif /* __ASSEMBLY__ */ 23#endif /* __ASSEMBLY__ */
27 24
28/* ICU 25/* ICU
29 * ICUISTS: status register 26 * ICUISTS: status register
@@ -103,4 +100,4 @@
103#define PLDI2CSTS_BB 0x00000010 100#define PLDI2CSTS_BB 0x00000010
104#define PLDI2CSTS_NOACK 0x00000001 /* 0:ack, 1:noack */ 101#define PLDI2CSTS_NOACK 0x00000001 /* 0:ack, 1:noack */
105 102
106#endif /* _M32700UT_M32700UT_LAN_H */ 103#endif /* _M32700UT_M32700UT_LAN_H */
diff --git a/include/asm-m32r/m32700ut/m32700ut_lcd.h b/include/asm-m32r/m32700ut/m32700ut_lcd.h
index e41c4aa48b4c..4c2489079788 100644
--- a/include/asm-m32r/m32700ut/m32700ut_lcd.h
+++ b/include/asm-m32r/m32700ut/m32700ut_lcd.h
@@ -1,3 +1,6 @@
1#ifndef _M32700UT_M32700UT_LCD_H
2#define _M32700UT_M32700UT_LCD_H
3
1/* 4/*
2 * include/asm-m32r/m32700ut/m32700ut_lcd.h 5 * include/asm-m32r/m32700ut/m32700ut_lcd.h
3 * 6 *
@@ -8,14 +11,8 @@
8 * This file is subject to the terms and conditions of the GNU General 11 * This file is subject to the terms and conditions of the GNU General
9 * Public License. See the file "COPYING" in the main directory of 12 * Public License. See the file "COPYING" in the main directory of
10 * this archive for more details. 13 * this archive for more details.
11 *
12 * $Id$
13 */ 14 */
14 15
15#ifndef _M32700UT_M32700UT_LCD_H
16#define _M32700UT_M32700UT_LCD_H
17
18
19#ifndef __ASSEMBLY__ 16#ifndef __ASSEMBLY__
20/* 17/*
21 * C functions use non-cache address. 18 * C functions use non-cache address.
@@ -23,7 +20,7 @@
23#define M32700UT_LCD_BASE (0x10000000 /* + NONCACHE_OFFSET */) 20#define M32700UT_LCD_BASE (0x10000000 /* + NONCACHE_OFFSET */)
24#else 21#else
25#define M32700UT_LCD_BASE (0x10000000 + NONCACHE_OFFSET) 22#define M32700UT_LCD_BASE (0x10000000 + NONCACHE_OFFSET)
26#endif /* __ASSEMBLY__ */ 23#endif /* __ASSEMBLY__ */
27 24
28/* 25/*
29 * ICU 26 * ICU
@@ -55,4 +52,4 @@
55#define M32700UT_LCD_ICUCR19 __reg16(M32700UT_LCD_BASE + 0x300036) 52#define M32700UT_LCD_ICUCR19 __reg16(M32700UT_LCD_BASE + 0x300036)
56#define M32700UT_LCD_ICUCR21 __reg16(M32700UT_LCD_BASE + 0x30003a) 53#define M32700UT_LCD_ICUCR21 __reg16(M32700UT_LCD_BASE + 0x30003a)
57 54
58#endif /* _M32700UT_M32700UT_LCD_H */ 55#endif /* _M32700UT_M32700UT_LCD_H */
diff --git a/include/asm-m32r/m32700ut/m32700ut_pld.h b/include/asm-m32r/m32700ut/m32700ut_pld.h
index a48c22c978ca..d39121279a1a 100644
--- a/include/asm-m32r/m32700ut/m32700ut_pld.h
+++ b/include/asm-m32r/m32700ut/m32700ut_pld.h
@@ -1,3 +1,6 @@
1#ifndef _M32700UT_M32700UT_PLD_H
2#define _M32700UT_M32700UT_PLD_H
3
1/* 4/*
2 * include/asm-m32r/m32700ut/m32700ut_pld.h 5 * include/asm-m32r/m32700ut/m32700ut_pld.h
3 * 6 *
@@ -8,14 +11,8 @@
8 * This file is subject to the terms and conditions of the GNU General 11 * This file is subject to the terms and conditions of the GNU General
9 * Public License. See the file "COPYING" in the main directory of 12 * Public License. See the file "COPYING" in the main directory of
10 * this archive for more details. 13 * this archive for more details.
11 *
12 * $Id$
13 */ 14 */
14 15
15#ifndef _M32700UT_M32700UT_PLD_H
16#define _M32700UT_M32700UT_PLD_H
17
18
19#if defined(CONFIG_PLAT_M32700UT_Alpha) 16#if defined(CONFIG_PLAT_M32700UT_Alpha)
20#define PLD_PLAT_BASE 0x08c00000 17#define PLD_PLAT_BASE 0x08c00000
21#elif defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_USRV) 18#elif defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_USRV)
@@ -37,7 +34,7 @@
37#define __reg8 34#define __reg8
38#define __reg16 35#define __reg16
39#define __reg32 36#define __reg32
40#endif /* __ASSEMBLY__ */ 37#endif /* __ASSEMBLY__ */
41 38
42/* CFC */ 39/* CFC */
43#define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) 40#define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000)
@@ -261,4 +258,4 @@
261#define PLD_SCTXB __reg16(PLD_BASE + 0x3800c) 258#define PLD_SCTXB __reg16(PLD_BASE + 0x3800c)
262#define PLD_SCRXB __reg16(PLD_BASE + 0x3800e) 259#define PLD_SCRXB __reg16(PLD_BASE + 0x3800e)
263 260
264#endif /* _M32700UT_M32700UT_PLD.H */ 261#endif /* _M32700UT_M32700UT_PLD.H */
diff --git a/include/asm-m32r/mappi2/mappi2_pld.h b/include/asm-m32r/mappi2/mappi2_pld.h
index 56a2b12f2bfc..2624c9db7255 100644
--- a/include/asm-m32r/mappi2/mappi2_pld.h
+++ b/include/asm-m32r/mappi2/mappi2_pld.h
@@ -1,18 +1,17 @@
1#ifndef _MAPPI2_PLD_H
2#define _MAPPI2_PLD_H
3
1/* 4/*
2 * include/asm-m32r/mappi2/mappi2_pld.h 5 * include/asm-m32r/mappi2/mappi2_pld.h
3 * 6 *
4 * Definitions for Extended IO Logic on MAPPI2 board. 7 * Definitions for Extended IO Logic on MAPPI2 board.
5 * based on m32700ut_pld.h by 8 * based on m32700ut_pld.h
6 * 9 *
7 * This file is subject to the terms and conditions of the GNU General 10 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file "COPYING" in the main directory of 11 * Public License. See the file "COPYING" in the main directory of
9 * this archive for more details. 12 * this archive for more details.
10 *
11 */ 13 */
12 14
13#ifndef _MAPPI2_PLD_H
14#define _MAPPI2_PLD_H
15
16#ifndef __ASSEMBLY__ 15#ifndef __ASSEMBLY__
17/* FIXME: 16/* FIXME:
18 * Some C functions use non-cache address, so can't define non-cache address. 17 * Some C functions use non-cache address, so can't define non-cache address.
@@ -26,7 +25,7 @@
26#define __reg8 25#define __reg8
27#define __reg16 26#define __reg16
28#define __reg32 27#define __reg32
29#endif /* __ASSEMBLY__ */ 28#endif /* __ASSEMBLY__ */
30 29
31/* CFC */ 30/* CFC */
32#define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) 31#define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000)
@@ -148,4 +147,4 @@
148 147
149#endif 148#endif
150 149
151#endif /* _MAPPI2_PLD.H */ 150#endif /* _MAPPI2_PLD.H */
diff --git a/include/asm-m32r/mappi3/mappi3_pld.h b/include/asm-m32r/mappi3/mappi3_pld.h
index 92f10defaef8..451c40ee70af 100644
--- a/include/asm-m32r/mappi3/mappi3_pld.h
+++ b/include/asm-m32r/mappi3/mappi3_pld.h
@@ -1,3 +1,6 @@
1#ifndef _MAPPI3_PLD_H
2#define _MAPPI3_PLD_H
3
1/* 4/*
2 * include/asm-m32r/mappi3/mappi3_pld.h 5 * include/asm-m32r/mappi3/mappi3_pld.h
3 * 6 *
@@ -7,12 +10,8 @@
7 * This file is subject to the terms and conditions of the GNU General 10 * This file is subject to the terms and conditions of the GNU General
8 * Public License. See the file "COPYING" in the main directory of 11 * Public License. See the file "COPYING" in the main directory of
9 * this archive for more details. 12 * this archive for more details.
10 *
11 */ 13 */
12 14
13#ifndef _MAPPI3_PLD_H
14#define _MAPPI3_PLD_H
15
16#ifndef __ASSEMBLY__ 15#ifndef __ASSEMBLY__
17/* FIXME: 16/* FIXME:
18 * Some C functions use non-cache address, so can't define non-cache address. 17 * Some C functions use non-cache address, so can't define non-cache address.
@@ -26,7 +25,7 @@
26#define __reg8 25#define __reg8
27#define __reg16 26#define __reg16
28#define __reg32 27#define __reg32
29#endif /* __ASSEMBLY__ */ 28#endif /* __ASSEMBLY__ */
30 29
31/* CFC */ 30/* CFC */
32#define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) 31#define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000)
@@ -140,4 +139,4 @@
140/* Reset Control */ 139/* Reset Control */
141#define PLD_REBOOT __reg16(PLD_BASE + 0x38000) 140#define PLD_REBOOT __reg16(PLD_BASE + 0x38000)
142 141
143#endif /* _MAPPI3_PLD.H */ 142#endif /* _MAPPI3_PLD.H */
diff --git a/include/asm-m32r/mc146818rtc.h b/include/asm-m32r/mc146818rtc.h
index 755601d053cc..aa1b7bf84f51 100644
--- a/include/asm-m32r/mc146818rtc.h
+++ b/include/asm-m32r/mc146818rtc.h
@@ -7,7 +7,6 @@
7#include <asm/io.h> 7#include <asm/io.h>
8 8
9#ifndef RTC_PORT 9#ifndef RTC_PORT
10// #define RTC_PORT(x) (0x70 + (x))
11#define RTC_PORT(x) ((x)) 10#define RTC_PORT(x) ((x))
12#define RTC_ALWAYS_BCD 1 /* RTC operates in binary mode */ 11#define RTC_ALWAYS_BCD 1 /* RTC operates in binary mode */
13#endif 12#endif
@@ -26,7 +25,5 @@ outb_p((val),RTC_PORT(1)); \
26}) 25})
27 26
28#define RTC_IRQ 8 27#define RTC_IRQ 8
29#if 0
30#endif
31 28
32#endif /* _ASM_MC146818RTC_H */ 29#endif /* _ASM_MC146818RTC_H */
diff --git a/include/asm-m32r/mman.h b/include/asm-m32r/mman.h
index 695a860c024f..516a8973b130 100644
--- a/include/asm-m32r/mman.h
+++ b/include/asm-m32r/mman.h
@@ -3,8 +3,6 @@
3 3
4#include <asm-generic/mman.h> 4#include <asm-generic/mman.h>
5 5
6/* orig : i386 2.6.0-test6 */
7
8#define MAP_GROWSDOWN 0x0100 /* stack-like segment */ 6#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
9#define MAP_DENYWRITE 0x0800 /* ETXTBSY */ 7#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
10#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */ 8#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
diff --git a/include/asm-m32r/mmu.h b/include/asm-m32r/mmu.h
index cf3f6d78ac66..d9bd724479cf 100644
--- a/include/asm-m32r/mmu.h
+++ b/include/asm-m32r/mmu.h
@@ -1,13 +1,14 @@
1#ifndef _ASM_M32R_MMU_H 1#ifndef _ASM_M32R_MMU_H
2#define _ASM_M32R_MMU_H 2#define _ASM_M32R_MMU_H
3 3
4
5#if !defined(CONFIG_MMU) 4#if !defined(CONFIG_MMU)
5
6typedef struct { 6typedef struct {
7 struct vm_list_struct *vmlist; 7 struct vm_list_struct *vmlist;
8 unsigned long end_brk; 8 unsigned long end_brk;
9} mm_context_t; 9} mm_context_t;
10#else 10
11#else /* CONFIG_MMU */
11 12
12/* Default "unsigned long" context */ 13/* Default "unsigned long" context */
13#ifndef CONFIG_SMP 14#ifndef CONFIG_SMP
@@ -16,5 +17,6 @@ typedef unsigned long mm_context_t;
16typedef unsigned long mm_context_t[NR_CPUS]; 17typedef unsigned long mm_context_t[NR_CPUS];
17#endif 18#endif
18 19
19#endif /* CONFIG_MMU */ 20#endif /* CONFIG_MMU */
20#endif /* _ASM_M32R_MMU_H */ 21
22#endif /* _ASM_M32R_MMU_H */
diff --git a/include/asm-m32r/mmu_context.h b/include/asm-m32r/mmu_context.h
index 542302eb6bcb..1f40d4a0acf1 100644
--- a/include/asm-m32r/mmu_context.h
+++ b/include/asm-m32r/mmu_context.h
@@ -1,9 +1,7 @@
1#ifndef _ASM_M32R_MMU_CONTEXT_H 1#ifndef _ASM_M32R_MMU_CONTEXT_H
2#define _ASM_M32R_MMU_CONTEXT_H 2#define _ASM_M32R_MMU_CONTEXT_H
3
4#ifdef __KERNEL__ 3#ifdef __KERNEL__
5 4
6
7#include <asm/m32r.h> 5#include <asm/m32r.h>
8 6
9#define MMU_CONTEXT_ASID_MASK (0x000000FF) 7#define MMU_CONTEXT_ASID_MASK (0x000000FF)
@@ -11,7 +9,6 @@
11#define MMU_CONTEXT_FIRST_VERSION (0x00000100) 9#define MMU_CONTEXT_FIRST_VERSION (0x00000100)
12#define NO_CONTEXT (0x00000000) 10#define NO_CONTEXT (0x00000000)
13 11
14
15#ifndef __ASSEMBLY__ 12#ifndef __ASSEMBLY__
16 13
17#include <asm/atomic.h> 14#include <asm/atomic.h>
@@ -147,7 +144,7 @@ static inline void switch_mm(struct mm_struct *prev,
147#define activate_mm(prev, next) \ 144#define activate_mm(prev, next) \
148 switch_mm((prev), (next), NULL) 145 switch_mm((prev), (next), NULL)
149 146
150#else 147#else /* not CONFIG_MMU */
151#define get_mmu_context(mm) do { } while (0) 148#define get_mmu_context(mm) do { } while (0)
152#define init_new_context(tsk,mm) (0) 149#define init_new_context(tsk,mm) (0)
153#define destroy_context(mm) do { } while (0) 150#define destroy_context(mm) do { } while (0)
@@ -158,11 +155,9 @@ static inline void switch_mm(struct mm_struct *prev,
158#define deactivate_mm(mm,tsk) do { } while (0) 155#define deactivate_mm(mm,tsk) do { } while (0)
159#define activate_mm(prev,next) do { } while (0) 156#define activate_mm(prev,next) do { } while (0)
160#define enter_lazy_tlb(mm,tsk) do { } while (0) 157#define enter_lazy_tlb(mm,tsk) do { } while (0)
161#endif /* CONFIG_MMU */ 158#endif /* not CONFIG_MMU */
162
163 159
164#endif /* not __ASSEMBLY__ */ 160#endif /* not __ASSEMBLY__ */
165 161
166#endif /* __KERNEL__ */ 162#endif /* __KERNEL__ */
167
168#endif /* _ASM_M32R_MMU_CONTEXT_H */ 163#endif /* _ASM_M32R_MMU_CONTEXT_H */
diff --git a/include/asm-m32r/module.h b/include/asm-m32r/module.h
index 3f2541c92a7b..eb73ee011215 100644
--- a/include/asm-m32r/module.h
+++ b/include/asm-m32r/module.h
@@ -1,8 +1,6 @@
1#ifndef _ASM_M32R_MODULE_H 1#ifndef _ASM_M32R_MODULE_H
2#define _ASM_M32R_MODULE_H 2#define _ASM_M32R_MODULE_H
3 3
4/* $Id$ */
5
6struct mod_arch_specific { }; 4struct mod_arch_specific { };
7 5
8#define Elf_Shdr Elf32_Shdr 6#define Elf_Shdr Elf32_Shdr
@@ -10,4 +8,3 @@ struct mod_arch_specific { };
10#define Elf_Ehdr Elf32_Ehdr 8#define Elf_Ehdr Elf32_Ehdr
11 9
12#endif /* _ASM_M32R_MODULE_H */ 10#endif /* _ASM_M32R_MODULE_H */
13
diff --git a/include/asm-m32r/msgbuf.h b/include/asm-m32r/msgbuf.h
index 852ff52af4c2..0d5a877b813e 100644
--- a/include/asm-m32r/msgbuf.h
+++ b/include/asm-m32r/msgbuf.h
@@ -1,10 +1,6 @@
1#ifndef _ASM_M32R_MSGBUF_H 1#ifndef _ASM_M32R_MSGBUF_H
2#define _ASM_M32R_MSGBUF_H 2#define _ASM_M32R_MSGBUF_H
3 3
4/* $Id$ */
5
6/* orig : i386 2.4.18 */
7
8/* 4/*
9 * The msqid64_ds structure for m32r architecture. 5 * The msqid64_ds structure for m32r architecture.
10 * Note extra padding because this structure is passed back and forth 6 * Note extra padding because this structure is passed back and forth
diff --git a/include/asm-m32r/namei.h b/include/asm-m32r/namei.h
index 7172d3d2e260..210f8056b805 100644
--- a/include/asm-m32r/namei.h
+++ b/include/asm-m32r/namei.h
@@ -1,10 +1,6 @@
1#ifndef _ASM_M32R_NAMEI_H 1#ifndef _ASM_M32R_NAMEI_H
2#define _ASM_M32R_NAMEI_H 2#define _ASM_M32R_NAMEI_H
3 3
4/* $Id$ */
5
6/* orig : i386 2.4.18 */
7
8/* 4/*
9 * linux/include/asm-m32r/namei.h 5 * linux/include/asm-m32r/namei.h
10 * 6 *
diff --git a/include/asm-m32r/opsput/opsput_lan.h b/include/asm-m32r/opsput/opsput_lan.h
index f53e10187c03..a5f18dd1ab20 100644
--- a/include/asm-m32r/opsput/opsput_lan.h
+++ b/include/asm-m32r/opsput/opsput_lan.h
@@ -1,3 +1,6 @@
1#ifndef _OPSPUT_OPSPUT_LAN_H
2#define _OPSPUT_OPSPUT_LAN_H
3
1/* 4/*
2 * include/asm-m32r/opsput/opsput_lan.h 5 * include/asm-m32r/opsput/opsput_lan.h
3 * 6 *
@@ -8,14 +11,8 @@
8 * This file is subject to the terms and conditions of the GNU General 11 * This file is subject to the terms and conditions of the GNU General
9 * Public License. See the file "COPYING" in the main directory of 12 * Public License. See the file "COPYING" in the main directory of
10 * this archive for more details. 13 * this archive for more details.
11 *
12 * $Id: opsput_lan.h,v 1.1 2004/07/27 06:54:20 sakugawa Exp $
13 */ 14 */
14 15
15#ifndef _OPSPUT_OPSPUT_LAN_H
16#define _OPSPUT_OPSPUT_LAN_H
17
18
19#ifndef __ASSEMBLY__ 16#ifndef __ASSEMBLY__
20/* 17/*
21 * C functions use non-cache address. 18 * C functions use non-cache address.
@@ -23,7 +20,7 @@
23#define OPSPUT_LAN_BASE (0x10000000 /* + NONCACHE_OFFSET */) 20#define OPSPUT_LAN_BASE (0x10000000 /* + NONCACHE_OFFSET */)
24#else 21#else
25#define OPSPUT_LAN_BASE (0x10000000 + NONCACHE_OFFSET) 22#define OPSPUT_LAN_BASE (0x10000000 + NONCACHE_OFFSET)
26#endif /* __ASSEMBLY__ */ 23#endif /* __ASSEMBLY__ */
27 24
28/* ICU 25/* ICU
29 * ICUISTS: status register 26 * ICUISTS: status register
@@ -52,4 +49,4 @@
52#define OPSPUT_LAN_ICUCR1 __reg16(OPSPUT_LAN_BASE + 0xc0010) 49#define OPSPUT_LAN_ICUCR1 __reg16(OPSPUT_LAN_BASE + 0xc0010)
53#define OPSPUT_LAN_ICUCR3 __reg16(OPSPUT_LAN_BASE + 0xc0014) 50#define OPSPUT_LAN_ICUCR3 __reg16(OPSPUT_LAN_BASE + 0xc0014)
54 51
55#endif /* _OPSPUT_OPSPUT_LAN_H */ 52#endif /* _OPSPUT_OPSPUT_LAN_H */
diff --git a/include/asm-m32r/opsput/opsput_lcd.h b/include/asm-m32r/opsput/opsput_lcd.h
index 99f296e1b61b..369c9f0832a6 100644
--- a/include/asm-m32r/opsput/opsput_lcd.h
+++ b/include/asm-m32r/opsput/opsput_lcd.h
@@ -1,3 +1,6 @@
1#ifndef _OPSPUT_OPSPUT_LCD_H
2#define _OPSPUT_OPSPUT_LCD_H
3
1/* 4/*
2 * include/asm-m32r/opsput/opsput_lcd.h 5 * include/asm-m32r/opsput/opsput_lcd.h
3 * 6 *
@@ -8,14 +11,8 @@
8 * This file is subject to the terms and conditions of the GNU General 11 * This file is subject to the terms and conditions of the GNU General
9 * Public License. See the file "COPYING" in the main directory of 12 * Public License. See the file "COPYING" in the main directory of
10 * this archive for more details. 13 * this archive for more details.
11 *
12 * $Id: opsput_lcd.h,v 1.1 2004/07/27 06:54:20 sakugawa Exp $
13 */ 14 */
14 15
15#ifndef _OPSPUT_OPSPUT_LCD_H
16#define _OPSPUT_OPSPUT_LCD_H
17
18
19#ifndef __ASSEMBLY__ 16#ifndef __ASSEMBLY__
20/* 17/*
21 * C functions use non-cache address. 18 * C functions use non-cache address.
@@ -23,7 +20,7 @@
23#define OPSPUT_LCD_BASE (0x10000000 /* + NONCACHE_OFFSET */) 20#define OPSPUT_LCD_BASE (0x10000000 /* + NONCACHE_OFFSET */)
24#else 21#else
25#define OPSPUT_LCD_BASE (0x10000000 + NONCACHE_OFFSET) 22#define OPSPUT_LCD_BASE (0x10000000 + NONCACHE_OFFSET)
26#endif /* __ASSEMBLY__ */ 23#endif /* __ASSEMBLY__ */
27 24
28/* 25/*
29 * ICU 26 * ICU
@@ -55,4 +52,4 @@
55#define OPSPUT_LCD_ICUCR19 __reg16(OPSPUT_LCD_BASE + 0x300036) 52#define OPSPUT_LCD_ICUCR19 __reg16(OPSPUT_LCD_BASE + 0x300036)
56#define OPSPUT_LCD_ICUCR21 __reg16(OPSPUT_LCD_BASE + 0x30003a) 53#define OPSPUT_LCD_ICUCR21 __reg16(OPSPUT_LCD_BASE + 0x30003a)
57 54
58#endif /* _OPSPUT_OPSPUT_LCD_H */ 55#endif /* _OPSPUT_OPSPUT_LCD_H */
diff --git a/include/asm-m32r/opsput/opsput_pld.h b/include/asm-m32r/opsput/opsput_pld.h
index a8d6452076f1..3f11ea1aac2d 100644
--- a/include/asm-m32r/opsput/opsput_pld.h
+++ b/include/asm-m32r/opsput/opsput_pld.h
@@ -1,3 +1,6 @@
1#ifndef _OPSPUT_OPSPUT_PLD_H
2#define _OPSPUT_OPSPUT_PLD_H
3
1/* 4/*
2 * include/asm-m32r/opsput/opsput_pld.h 5 * include/asm-m32r/opsput/opsput_pld.h
3 * 6 *
@@ -8,14 +11,8 @@
8 * This file is subject to the terms and conditions of the GNU General 11 * This file is subject to the terms and conditions of the GNU General
9 * Public License. See the file "COPYING" in the main directory of 12 * Public License. See the file "COPYING" in the main directory of
10 * this archive for more details. 13 * this archive for more details.
11 *
12 * $Id: opsput_pld.h,v 1.1 2004/07/27 06:54:20 sakugawa Exp $
13 */ 14 */
14 15
15#ifndef _OPSPUT_OPSPUT_PLD_H
16#define _OPSPUT_OPSPUT_PLD_H
17
18
19#define PLD_PLAT_BASE 0x1cc00000 16#define PLD_PLAT_BASE 0x1cc00000
20 17
21#ifndef __ASSEMBLY__ 18#ifndef __ASSEMBLY__
@@ -31,7 +28,7 @@
31#define __reg8 28#define __reg8
32#define __reg16 29#define __reg16
33#define __reg32 30#define __reg32
34#endif /* __ASSEMBLY__ */ 31#endif /* __ASSEMBLY__ */
35 32
36/* CFC */ 33/* CFC */
37#define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000) 34#define PLD_CFRSTCR __reg16(PLD_BASE + 0x0000)
@@ -255,4 +252,4 @@
255#define PLD_SCTXB __reg16(PLD_BASE + 0x3800c) 252#define PLD_SCTXB __reg16(PLD_BASE + 0x3800c)
256#define PLD_SCRXB __reg16(PLD_BASE + 0x3800e) 253#define PLD_SCRXB __reg16(PLD_BASE + 0x3800e)
257 254
258#endif /* _OPSPUT_OPSPUT_PLD.H */ 255#endif /* _OPSPUT_OPSPUT_PLD.H */
diff --git a/include/asm-m32r/page.h b/include/asm-m32r/page.h
index 404a4c24007b..6f6ecf7d14a3 100644
--- a/include/asm-m32r/page.h
+++ b/include/asm-m32r/page.h
@@ -1,7 +1,6 @@
1#ifndef _ASM_M32R_PAGE_H 1#ifndef _ASM_M32R_PAGE_H
2#define _ASM_M32R_PAGE_H 2#define _ASM_M32R_PAGE_H
3 3
4
5/* PAGE_SHIFT determines the page size */ 4/* PAGE_SHIFT determines the page size */
6#define PAGE_SHIFT 12 5#define PAGE_SHIFT 12
7#define PAGE_SIZE (1UL << PAGE_SHIFT) 6#define PAGE_SIZE (1UL << PAGE_SHIFT)
@@ -57,9 +56,6 @@ typedef struct { unsigned long pgprot; } pgprot_t;
57 * and CONFIG_HIGHMEM64G options in the kernel configuration. 56 * and CONFIG_HIGHMEM64G options in the kernel configuration.
58 */ 57 */
59 58
60
61/* This handles the memory map.. */
62
63#define __MEMORY_START CONFIG_MEMORY_START 59#define __MEMORY_START CONFIG_MEMORY_START
64#define __MEMORY_SIZE CONFIG_MEMORY_SIZE 60#define __MEMORY_SIZE CONFIG_MEMORY_SIZE
65 61
@@ -92,4 +88,3 @@ typedef struct { unsigned long pgprot; } pgprot_t;
92 88
93#endif /* __KERNEL__ */ 89#endif /* __KERNEL__ */
94#endif /* _ASM_M32R_PAGE_H */ 90#endif /* _ASM_M32R_PAGE_H */
95
diff --git a/include/asm-m32r/param.h b/include/asm-m32r/param.h
index 750b938ccb52..3e14026e39cd 100644
--- a/include/asm-m32r/param.h
+++ b/include/asm-m32r/param.h
@@ -1,10 +1,6 @@
1#ifndef _ASM_M32R_PARAM_H 1#ifndef _ASM_M32R_PARAM_H
2#define _ASM_M32R_PARAM_H 2#define _ASM_M32R_PARAM_H
3 3
4/* $Id$ */
5
6/* orig : i386 2.5.67 */
7
8#ifdef __KERNEL__ 4#ifdef __KERNEL__
9# define HZ 100 /* Internal kernel timer frequency */ 5# define HZ 100 /* Internal kernel timer frequency */
10# define USER_HZ 100 /* .. some user interfaces are in "ticks" */ 6# define USER_HZ 100 /* .. some user interfaces are in "ticks" */
diff --git a/include/asm-m32r/pci.h b/include/asm-m32r/pci.h
index 00d7b6f39a33..fe785d167db6 100644
--- a/include/asm-m32r/pci.h
+++ b/include/asm-m32r/pci.h
@@ -1,8 +1,6 @@
1#ifndef _ASM_M32R_PCI_H 1#ifndef _ASM_M32R_PCI_H
2#define _ASM_M32R_PCI_H 2#define _ASM_M32R_PCI_H
3 3
4/* $Id$ */
5
6#include <asm-generic/pci.h> 4#include <asm-generic/pci.h>
7 5
8#define PCI_DMA_BUS_IS_PHYS (1) 6#define PCI_DMA_BUS_IS_PHYS (1)
diff --git a/include/asm-m32r/pgalloc.h b/include/asm-m32r/pgalloc.h
index e09a86c3cadf..943ba63c1ebc 100644
--- a/include/asm-m32r/pgalloc.h
+++ b/include/asm-m32r/pgalloc.h
@@ -1,8 +1,6 @@
1#ifndef _ASM_M32R_PGALLOC_H 1#ifndef _ASM_M32R_PGALLOC_H
2#define _ASM_M32R_PGALLOC_H 2#define _ASM_M32R_PGALLOC_H
3 3
4/* $Id$ */
5
6#include <linux/mm.h> 4#include <linux/mm.h>
7 5
8#include <asm/io.h> 6#include <asm/io.h>
@@ -74,4 +72,3 @@ static __inline__ void pte_free(struct page *pte)
74#define check_pgt_cache() do { } while (0) 72#define check_pgt_cache() do { } while (0)
75 73
76#endif /* _ASM_M32R_PGALLOC_H */ 74#endif /* _ASM_M32R_PGALLOC_H */
77
diff --git a/include/asm-m32r/pgtable-2level.h b/include/asm-m32r/pgtable-2level.h
index 84152760e0b5..750925726a10 100644
--- a/include/asm-m32r/pgtable-2level.h
+++ b/include/asm-m32r/pgtable-2level.h
@@ -1,9 +1,7 @@
1#ifndef _ASM_M32R_PGTABLE_2LEVEL_H 1#ifndef _ASM_M32R_PGTABLE_2LEVEL_H
2#define _ASM_M32R_PGTABLE_2LEVEL_H 2#define _ASM_M32R_PGTABLE_2LEVEL_H
3
4#ifdef __KERNEL__ 3#ifdef __KERNEL__
5 4
6
7/* 5/*
8 * traditional M32R two-level paging structure: 6 * traditional M32R two-level paging structure:
9 */ 7 */
@@ -77,5 +75,4 @@ static inline pmd_t *pmd_offset(pgd_t * dir, unsigned long address)
77#define pgoff_to_pte(off) ((pte_t) { (((off) & 0xef) << 2) | (((off) >> 7) << 10) | _PAGE_FILE }) 75#define pgoff_to_pte(off) ((pte_t) { (((off) & 0xef) << 2) | (((off) >> 7) << 10) | _PAGE_FILE })
78 76
79#endif /* __KERNEL__ */ 77#endif /* __KERNEL__ */
80
81#endif /* _ASM_M32R_PGTABLE_2LEVEL_H */ 78#endif /* _ASM_M32R_PGTABLE_2LEVEL_H */
diff --git a/include/asm-m32r/posix_types.h b/include/asm-m32r/posix_types.h
index 47e7e85a3dc3..1caac65d208f 100644
--- a/include/asm-m32r/posix_types.h
+++ b/include/asm-m32r/posix_types.h
@@ -1,10 +1,6 @@
1#ifndef _ASM_M32R_POSIX_TYPES_H 1#ifndef _ASM_M32R_POSIX_TYPES_H
2#define _ASM_M32R_POSIX_TYPES_H 2#define _ASM_M32R_POSIX_TYPES_H
3 3
4/* $Id$ */
5
6/* orig : i386, sh 2.4.18 */
7
8/* 4/*
9 * This file is generally used by user-level software, so you need to 5 * This file is generally used by user-level software, so you need to
10 * be a little careful about namespace pollution etc. Also, we cannot 6 * be a little careful about namespace pollution etc. Also, we cannot
diff --git a/include/asm-m32r/rtc.h b/include/asm-m32r/rtc.h
index 6b2b837c5978..0340633f3f4d 100644
--- a/include/asm-m32r/rtc.h
+++ b/include/asm-m32r/rtc.h
@@ -1,10 +1,6 @@
1/* $Id: rtc.h,v 1.1.1.1 2004/03/25 04:29:22 hitoshiy Exp $ */
2
3#ifndef __RTC_H__ 1#ifndef __RTC_H__
4#define __RTC_H__ 2#define __RTC_H__
5 3
6
7
8 /* Dallas DS1302 clock/calendar register numbers. */ 4 /* Dallas DS1302 clock/calendar register numbers. */
9# define RTC_SECONDS 0 5# define RTC_SECONDS 0
10# define RTC_MINUTES 1 6# define RTC_MINUTES 1
diff --git a/include/asm-m32r/scatterlist.h b/include/asm-m32r/scatterlist.h
index 09a10e43bf0f..c2de96cb69ed 100644
--- a/include/asm-m32r/scatterlist.h
+++ b/include/asm-m32r/scatterlist.h
@@ -1,8 +1,6 @@
1#ifndef _ASM_M32R_SCATTERLIST_H 1#ifndef _ASM_M32R_SCATTERLIST_H
2#define _ASM_M32R_SCATTERLIST_H 2#define _ASM_M32R_SCATTERLIST_H
3 3
4/* $Id$ */
5
6struct scatterlist { 4struct scatterlist {
7 char * address; /* Location data is to be transferred to, NULL for 5 char * address; /* Location data is to be transferred to, NULL for
8 * highmem page */ 6 * highmem page */
diff --git a/include/asm-m32r/sections.h b/include/asm-m32r/sections.h
index 6b969e53b806..5e5d21c4908a 100644
--- a/include/asm-m32r/sections.h
+++ b/include/asm-m32r/sections.h
@@ -5,4 +5,3 @@
5#include <asm-generic/sections.h> 5#include <asm-generic/sections.h>
6 6
7#endif /* _M32R_SECTIONS_H */ 7#endif /* _M32R_SECTIONS_H */
8
diff --git a/include/asm-m32r/segment.h b/include/asm-m32r/segment.h
index e45db68e6c2d..42b11aeb3249 100644
--- a/include/asm-m32r/segment.h
+++ b/include/asm-m32r/segment.h
@@ -1,10 +1,6 @@
1#ifndef _ASM_M32R_SEGMENT_H 1#ifndef _ASM_M32R_SEGMENT_H
2#define _ASM_M32R_SEGMENT_H 2#define _ASM_M32R_SEGMENT_H
3 3
4/* $Id$ */
5
6/* orig : i386 (2.4.18) */
7
8#define __KERNEL_CS 0x10 4#define __KERNEL_CS 0x10
9#define __KERNEL_DS 0x18 5#define __KERNEL_DS 0x18
10 6
diff --git a/include/asm-m32r/sembuf.h b/include/asm-m32r/sembuf.h
index e69018e6ff71..c9873d6890e2 100644
--- a/include/asm-m32r/sembuf.h
+++ b/include/asm-m32r/sembuf.h
@@ -1,10 +1,6 @@
1#ifndef _ASM_M32R_SEMBUF_H 1#ifndef _ASM_M32R_SEMBUF_H
2#define _ASM_M32R_SEMBUF_H 2#define _ASM_M32R_SEMBUF_H
3 3
4/* $Id$ */
5
6/* orig : i386 2.4.18 */
7
8/* 4/*
9 * The semid64_ds structure for m32r architecture. 5 * The semid64_ds structure for m32r architecture.
10 * Note extra padding because this structure is passed back and forth 6 * Note extra padding because this structure is passed back and forth
diff --git a/include/asm-m32r/setup.h b/include/asm-m32r/setup.h
index 6a0b32202d4e..c637ab992394 100644
--- a/include/asm-m32r/setup.h
+++ b/include/asm-m32r/setup.h
@@ -1,3 +1,6 @@
1#ifndef _ASM_M32R_SETUP_H
2#define _ASM_M32R_SETUP_H
3
1/* 4/*
2 * This is set up by the setup-routine at boot-time 5 * This is set up by the setup-routine at boot-time
3 */ 6 */
@@ -32,3 +35,4 @@ extern unsigned long memory_end;
32 35
33#endif /* __KERNEL__ */ 36#endif /* __KERNEL__ */
34 37
38#endif /* _ASM_M32R_SETUP_H */
diff --git a/include/asm-m32r/shmbuf.h b/include/asm-m32r/shmbuf.h
index b84e897fa87b..b0cdf0aa7d65 100644
--- a/include/asm-m32r/shmbuf.h
+++ b/include/asm-m32r/shmbuf.h
@@ -1,10 +1,6 @@
1#ifndef _ASM_M32R_SHMBUF_H 1#ifndef _ASM_M32R_SHMBUF_H
2#define _ASM_M32R_SHMBUF_H 2#define _ASM_M32R_SHMBUF_H
3 3
4/* $Id$ */
5
6/* orig : i386 2.4.18 */
7
8/* 4/*
9 * The shmid64_ds structure for M32R architecture. 5 * The shmid64_ds structure for M32R architecture.
10 * Note extra padding because this structure is passed back and forth 6 * Note extra padding because this structure is passed back and forth
diff --git a/include/asm-m32r/shmparam.h b/include/asm-m32r/shmparam.h
index db0019ba955d..35986d81a528 100644
--- a/include/asm-m32r/shmparam.h
+++ b/include/asm-m32r/shmparam.h
@@ -1,8 +1,6 @@
1#ifndef _ASM_M32R_SHMPARAM_H 1#ifndef _ASM_M32R_SHMPARAM_H
2#define _ASM_M32R_SHMPARAM_H 2#define _ASM_M32R_SHMPARAM_H
3 3
4/* $Id$ */
5
6#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */ 4#define SHMLBA PAGE_SIZE /* attach addr a multiple of this */
7 5
8#endif /* _ASM_M32R_SHMPARAM_H */ 6#endif /* _ASM_M32R_SHMPARAM_H */
diff --git a/include/asm-m32r/sigcontext.h b/include/asm-m32r/sigcontext.h
index 62537dc4dec9..da4a9c36d09b 100644
--- a/include/asm-m32r/sigcontext.h
+++ b/include/asm-m32r/sigcontext.h
@@ -1,9 +1,6 @@
1#ifndef _ASM_M32R_SIGCONTEXT_H 1#ifndef _ASM_M32R_SIGCONTEXT_H
2#define _ASM_M32R_SIGCONTEXT_H 2#define _ASM_M32R_SIGCONTEXT_H
3 3
4/* $Id$ */
5
6
7struct sigcontext { 4struct sigcontext {
8 /* CPU registers */ 5 /* CPU registers */
9 /* Saved main processor registers. */ 6 /* Saved main processor registers. */
diff --git a/include/asm-m32r/siginfo.h b/include/asm-m32r/siginfo.h
index 482202f2e77f..7d9cd9ebfd0e 100644
--- a/include/asm-m32r/siginfo.h
+++ b/include/asm-m32r/siginfo.h
@@ -1,8 +1,6 @@
1#ifndef _M32R_SIGINFO_H 1#ifndef _M32R_SIGINFO_H
2#define _M32R_SIGINFO_H 2#define _M32R_SIGINFO_H
3 3
4/* $Id$ */
5
6#include <asm-generic/siginfo.h> 4#include <asm-generic/siginfo.h>
7 5
8#endif /* _M32R_SIGINFO_H */ 6#endif /* _M32R_SIGINFO_H */
diff --git a/include/asm-m32r/signal.h b/include/asm-m32r/signal.h
index 65423bed32b1..937258686ba5 100644
--- a/include/asm-m32r/signal.h
+++ b/include/asm-m32r/signal.h
@@ -1,10 +1,6 @@
1#ifndef _ASM_M32R_SIGNAL_H 1#ifndef _ASM_M32R_SIGNAL_H
2#define _ASM_M32R_SIGNAL_H 2#define _ASM_M32R_SIGNAL_H
3 3
4/* $Id$ */
5
6/* orig : i386 2.4.18 */
7
8#include <linux/types.h> 4#include <linux/types.h>
9#include <linux/time.h> 5#include <linux/time.h>
10#include <linux/compiler.h> 6#include <linux/compiler.h>
diff --git a/include/asm-m32r/smp.h b/include/asm-m32r/smp.h
index 650d2558c304..abd937ac5239 100644
--- a/include/asm-m32r/smp.h
+++ b/include/asm-m32r/smp.h
@@ -1,9 +1,6 @@
1#ifndef _ASM_M32R_SMP_H 1#ifndef _ASM_M32R_SMP_H
2#define _ASM_M32R_SMP_H 2#define _ASM_M32R_SMP_H
3 3
4/* $Id$ */
5
6
7#ifdef CONFIG_SMP 4#ifdef CONFIG_SMP
8#ifndef __ASSEMBLY__ 5#ifndef __ASSEMBLY__
9 6
diff --git a/include/asm-m32r/sockios.h b/include/asm-m32r/sockios.h
index 147a118442ac..f89962e231fe 100644
--- a/include/asm-m32r/sockios.h
+++ b/include/asm-m32r/sockios.h
@@ -1,8 +1,6 @@
1#ifndef _ASM_M32R_SOCKIOS_H 1#ifndef _ASM_M32R_SOCKIOS_H
2#define _ASM_M32R_SOCKIOS_H 2#define _ASM_M32R_SOCKIOS_H
3 3
4/* $Id$ */
5
6/* Socket-level I/O control calls. */ 4/* Socket-level I/O control calls. */
7#define FIOSETOWN 0x8901 5#define FIOSETOWN 0x8901
8#define SIOCSPGRP 0x8902 6#define SIOCSPGRP 0x8902
diff --git a/include/asm-m32r/spinlock_types.h b/include/asm-m32r/spinlock_types.h
index 7e9941c45f40..83f52105c0e4 100644
--- a/include/asm-m32r/spinlock_types.h
+++ b/include/asm-m32r/spinlock_types.h
@@ -20,4 +20,4 @@ typedef struct {
20 20
21#define __RAW_RW_LOCK_UNLOCKED { RW_LOCK_BIAS } 21#define __RAW_RW_LOCK_UNLOCKED { RW_LOCK_BIAS }
22 22
23#endif 23#endif /* _ASM_M32R_SPINLOCK_TYPES_H */
diff --git a/include/asm-m32r/stat.h b/include/asm-m32r/stat.h
index 05748fef4c8e..da4518f82d6d 100644
--- a/include/asm-m32r/stat.h
+++ b/include/asm-m32r/stat.h
@@ -1,10 +1,6 @@
1#ifndef _ASM_M32R_STAT_H 1#ifndef _ASM_M32R_STAT_H
2#define _ASM_M32R_STAT_H 2#define _ASM_M32R_STAT_H
3 3
4/* $Id$ */
5
6/* orig : i386 2.4.18 */
7
8#include <asm/byteorder.h> 4#include <asm/byteorder.h>
9 5
10struct __old_kernel_stat { 6struct __old_kernel_stat {
diff --git a/include/asm-m32r/string.h b/include/asm-m32r/string.h
index cb54bcc2e677..e61e2b0bfc1f 100644
--- a/include/asm-m32r/string.h
+++ b/include/asm-m32r/string.h
@@ -1,8 +1,6 @@
1#ifndef _ASM_M32R_STRING_H 1#ifndef _ASM_M32R_STRING_H
2#define _ASM_M32R_STRING_H 2#define _ASM_M32R_STRING_H
3 3
4/* $Id$ */
5
6#define __HAVE_ARCH_STRLEN 4#define __HAVE_ARCH_STRLEN
7extern size_t strlen(const char * s); 5extern size_t strlen(const char * s);
8 6
diff --git a/include/asm-m32r/syscall.h b/include/asm-m32r/syscall.h
index d8d4b2c7a7d4..25f316f2b78d 100644
--- a/include/asm-m32r/syscall.h
+++ b/include/asm-m32r/syscall.h
@@ -1,11 +1,8 @@
1#ifndef _ASM_M32R_SYSCALL_H 1#ifndef _ASM_M32R_SYSCALL_H
2#define _ASM_M32R_SYSCALL_H 2#define _ASM_M32R_SYSCALL_H
3 3
4/* $Id$ */
5
6/* Definitions for the system call vector. */ 4/* Definitions for the system call vector. */
7#define SYSCALL_VECTOR "2" 5#define SYSCALL_VECTOR "2"
8#define SYSCALL_VECTOR_ADDRESS "0xa0" 6#define SYSCALL_VECTOR_ADDRESS "0xa0"
9 7
10#endif /* _ASM_M32R_SYSCALL_H */ 8#endif /* _ASM_M32R_SYSCALL_H */
11
diff --git a/include/asm-m32r/system.h b/include/asm-m32r/system.h
index 4ce0619f6989..99ee09889ff7 100644
--- a/include/asm-m32r/system.h
+++ b/include/asm-m32r/system.h
@@ -339,4 +339,4 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size)
339 339
340#define arch_align_stack(x) (x) 340#define arch_align_stack(x) (x)
341 341
342#endif /* _ASM_M32R_SYSTEM_H */ 342#endif /* _ASM_M32R_SYSTEM_H */
diff --git a/include/asm-m32r/termbits.h b/include/asm-m32r/termbits.h
index faf2bd0504c1..e402641dfbad 100644
--- a/include/asm-m32r/termbits.h
+++ b/include/asm-m32r/termbits.h
@@ -1,8 +1,6 @@
1#ifndef _ASM_M32R_TERMBITS_H 1#ifndef _ASM_M32R_TERMBITS_H
2#define _ASM_M32R_TERMBITS_H 2#define _ASM_M32R_TERMBITS_H
3 3
4/* $Id$ */
5
6#include <linux/posix_types.h> 4#include <linux/posix_types.h>
7 5
8typedef unsigned char cc_t; 6typedef unsigned char cc_t;
@@ -184,4 +182,4 @@ struct ktermios {
184#define TCSADRAIN 1 182#define TCSADRAIN 1
185#define TCSAFLUSH 2 183#define TCSAFLUSH 2
186 184
187#endif /* _ASM_M32R_TERMBITS_H */ 185#endif /* _ASM_M32R_TERMBITS_H */
diff --git a/include/asm-m32r/termios.h b/include/asm-m32r/termios.h
index fc99d2e178d8..4943dd8db44d 100644
--- a/include/asm-m32r/termios.h
+++ b/include/asm-m32r/termios.h
@@ -1,8 +1,6 @@
1#ifndef _M32R_TERMIOS_H 1#ifndef _M32R_TERMIOS_H
2#define _M32R_TERMIOS_H 2#define _M32R_TERMIOS_H
3 3
4/* orig : i386 2.6.0-test5 */
5
6#include <asm/termbits.h> 4#include <asm/termbits.h>
7#include <asm/ioctls.h> 5#include <asm/ioctls.h>
8 6
@@ -41,24 +39,6 @@ struct termio {
41 39
42/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ 40/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
43 41
44/* line disciplines */
45#define N_TTY 0
46#define N_SLIP 1
47#define N_MOUSE 2
48#define N_PPP 3
49#define N_STRIP 4
50#define N_AX25 5
51#define N_X25 6 /* X.25 async */
52#define N_6PACK 7
53#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
54#define N_R3964 9 /* Reserved for Simatic R3964 module */
55#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
56#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */
57#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
58#define N_HDLC 13 /* synchronous HDLC */
59#define N_SYNC_PPP 14 /* synchronous PPP */
60#define N_HCI 15 /* Bluetooth HCI UART */
61
62#ifdef __KERNEL__ 42#ifdef __KERNEL__
63#include <linux/module.h> 43#include <linux/module.h>
64 44
diff --git a/include/asm-m32r/timex.h b/include/asm-m32r/timex.h
index 019441c1d7a0..bb9fe4feb12d 100644
--- a/include/asm-m32r/timex.h
+++ b/include/asm-m32r/timex.h
@@ -1,15 +1,12 @@
1#ifndef _ASM_M32R_TIMEX_H 1#ifndef _ASM_M32R_TIMEX_H
2#define _ASM_M32R_TIMEX_H 2#define _ASM_M32R_TIMEX_H
3 3
4/* $Id$ */
5
6/* 4/*
7 * linux/include/asm-m32r/timex.h 5 * linux/include/asm-m32r/timex.h
8 * 6 *
9 * m32r architecture timex specifications 7 * m32r architecture timex specifications
10 */ 8 */
11 9
12
13#define CLOCK_TICK_RATE (CONFIG_BUS_CLOCK / CONFIG_TIMER_DIVIDE) 10#define CLOCK_TICK_RATE (CONFIG_BUS_CLOCK / CONFIG_TIMER_DIVIDE)
14#define CLOCK_TICK_FACTOR 20 /* Factor of both 1000000 and CLOCK_TICK_RATE */ 11#define CLOCK_TICK_FACTOR 20 /* Factor of both 1000000 and CLOCK_TICK_RATE */
15 12
diff --git a/include/asm-m32r/tlbflush.h b/include/asm-m32r/tlbflush.h
index ae4494960593..3d37ac002bcc 100644
--- a/include/asm-m32r/tlbflush.h
+++ b/include/asm-m32r/tlbflush.h
@@ -98,4 +98,3 @@ static __inline__ void __flush_tlb_all(void)
98extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t); 98extern void update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t);
99 99
100#endif /* _ASM_M32R_TLBFLUSH_H */ 100#endif /* _ASM_M32R_TLBFLUSH_H */
101
diff --git a/include/asm-m32r/types.h b/include/asm-m32r/types.h
index fcf24c64c3ba..27d3eb539c50 100644
--- a/include/asm-m32r/types.h
+++ b/include/asm-m32r/types.h
@@ -3,10 +3,6 @@
3 3
4#ifndef __ASSEMBLY__ 4#ifndef __ASSEMBLY__
5 5
6/* $Id$ */
7
8/* orig : i386 2.4.18 */
9
10typedef unsigned short umode_t; 6typedef unsigned short umode_t;
11 7
12/* 8/*
@@ -59,4 +55,4 @@ typedef u64 dma64_addr_t;
59 55
60#endif /* __KERNEL__ */ 56#endif /* __KERNEL__ */
61 57
62#endif /* _ASM_M32R_TYPES_H */ 58#endif /* _ASM_M32R_TYPES_H */
diff --git a/include/asm-m32r/uaccess.h b/include/asm-m32r/uaccess.h
index 26e978c7e3b4..bd8c83765a5c 100644
--- a/include/asm-m32r/uaccess.h
+++ b/include/asm-m32r/uaccess.h
@@ -68,7 +68,7 @@ static inline void set_fs(mm_segment_t s)
68 * This needs 33-bit arithmetic. We have a carry... 68 * This needs 33-bit arithmetic. We have a carry...
69 */ 69 */
70#define __range_ok(addr,size) ({ \ 70#define __range_ok(addr,size) ({ \
71 unsigned long flag, sum; \ 71 unsigned long flag, roksum; \
72 __chk_user_ptr(addr); \ 72 __chk_user_ptr(addr); \
73 asm ( \ 73 asm ( \
74 " cmpu %1, %1 ; clear cbit\n" \ 74 " cmpu %1, %1 ; clear cbit\n" \
@@ -76,7 +76,7 @@ static inline void set_fs(mm_segment_t s)
76 " subx %0, %0\n" \ 76 " subx %0, %0\n" \
77 " cmpu %4, %1\n" \ 77 " cmpu %4, %1\n" \
78 " subx %0, %5\n" \ 78 " subx %0, %5\n" \
79 : "=&r" (flag), "=r" (sum) \ 79 : "=&r" (flag), "=r" (roksum) \
80 : "1" (addr), "r" ((int)(size)), \ 80 : "1" (addr), "r" ((int)(size)), \
81 "r" (current_thread_info()->addr_limit.seg), "r" (0) \ 81 "r" (current_thread_info()->addr_limit.seg), "r" (0) \
82 : "cbit" ); \ 82 : "cbit" ); \
diff --git a/include/asm-m32r/ucontext.h b/include/asm-m32r/ucontext.h
index 2de709a5c53c..09324741eec3 100644
--- a/include/asm-m32r/ucontext.h
+++ b/include/asm-m32r/ucontext.h
@@ -1,8 +1,6 @@
1#ifndef _ASM_M32R_UCONTEXT_H 1#ifndef _ASM_M32R_UCONTEXT_H
2#define _ASM_M32R_UCONTEXT_H 2#define _ASM_M32R_UCONTEXT_H
3 3
4/* orig : i386 2.4.18 */
5
6struct ucontext { 4struct ucontext {
7 unsigned long uc_flags; 5 unsigned long uc_flags;
8 struct ucontext *uc_link; 6 struct ucontext *uc_link;
diff --git a/include/asm-m32r/unaligned.h b/include/asm-m32r/unaligned.h
index 3aef9ac8d3aa..fccc180c3913 100644
--- a/include/asm-m32r/unaligned.h
+++ b/include/asm-m32r/unaligned.h
@@ -1,10 +1,6 @@
1#ifndef _ASM_M32R_UNALIGNED_H 1#ifndef _ASM_M32R_UNALIGNED_H
2#define _ASM_M32R_UNALIGNED_H 2#define _ASM_M32R_UNALIGNED_H
3 3
4/* $Id$ */
5
6/* orig : generic 2.4.18 */
7
8/* 4/*
9 * For the benefit of those who are trying to port Linux to another 5 * For the benefit of those who are trying to port Linux to another
10 * architecture, here are some C-language equivalents. 6 * architecture, here are some C-language equivalents.
@@ -12,7 +8,6 @@
12 8
13#include <asm/string.h> 9#include <asm/string.h>
14 10
15
16#define get_unaligned(ptr) \ 11#define get_unaligned(ptr) \
17 ({ __typeof__(*(ptr)) __tmp; memmove(&__tmp, (ptr), sizeof(*(ptr))); __tmp; }) 12 ({ __typeof__(*(ptr)) __tmp; memmove(&__tmp, (ptr), sizeof(*(ptr))); __tmp; })
18 13
@@ -21,5 +16,4 @@
21 memmove((ptr), &__tmp, sizeof(*(ptr))); \ 16 memmove((ptr), &__tmp, sizeof(*(ptr))); \
22 (void)0; }) 17 (void)0; })
23 18
24 19#endif /* _ASM_M32R_UNALIGNED_H */
25#endif /* _ASM_M32R_UNALIGNED_H */
diff --git a/include/asm-m32r/unistd.h b/include/asm-m32r/unistd.h
index 5b66bd3c6ed6..cbbd53762ea6 100644
--- a/include/asm-m32r/unistd.h
+++ b/include/asm-m32r/unistd.h
@@ -1,8 +1,6 @@
1#ifndef _ASM_M32R_UNISTD_H 1#ifndef _ASM_M32R_UNISTD_H
2#define _ASM_M32R_UNISTD_H 2#define _ASM_M32R_UNISTD_H
3 3
4/* $Id$ */
5
6/* 4/*
7 * This file contains the system call numbers. 5 * This file contains the system call numbers.
8 */ 6 */
diff --git a/include/asm-m32r/user.h b/include/asm-m32r/user.h
index 1ad4ded8483b..035258d713d0 100644
--- a/include/asm-m32r/user.h
+++ b/include/asm-m32r/user.h
@@ -1,12 +1,6 @@
1#ifndef _ASM_M32R_USER_H 1#ifndef _ASM_M32R_USER_H
2#define _ASM_M32R_USER_H 2#define _ASM_M32R_USER_H
3 3
4/* $Id$ */
5
6/* orig : sh 2.4.18
7 * mod : remove fpu registers
8 */
9
10#include <linux/types.h> 4#include <linux/types.h>
11#include <asm/ptrace.h> 5#include <asm/ptrace.h>
12#include <asm/page.h> 6#include <asm/page.h>
diff --git a/include/asm-m32r/vga.h b/include/asm-m32r/vga.h
index 533163447cc9..a1b63061c06f 100644
--- a/include/asm-m32r/vga.h
+++ b/include/asm-m32r/vga.h
@@ -1,8 +1,6 @@
1#ifndef _ASM_M32R_VGA_H 1#ifndef _ASM_M32R_VGA_H
2#define _ASM_M32R_VGA_H 2#define _ASM_M32R_VGA_H
3 3
4/* $Id$ */
5
6/* 4/*
7 * Access to VGA videoram 5 * Access to VGA videoram
8 * 6 *
@@ -19,4 +17,4 @@
19#define vga_readb(x) (*(x)) 17#define vga_readb(x) (*(x))
20#define vga_writeb(x,y) (*(y) = (x)) 18#define vga_writeb(x,y) (*(y) = (x))
21 19
22#endif /* _ASM_M32R_VGA_H */ 20#endif /* _ASM_M32R_VGA_H */
diff --git a/include/asm-m32r/xor.h b/include/asm-m32r/xor.h
index fd960dc9bf76..6d525259df3e 100644
--- a/include/asm-m32r/xor.h
+++ b/include/asm-m32r/xor.h
@@ -1,8 +1,6 @@
1#ifndef _ASM_M32R_XOR_H 1#ifndef _ASM_M32R_XOR_H
2#define _ASM_M32R_XOR_H 2#define _ASM_M32R_XOR_H
3 3
4/* $Id$ */
5
6#include <asm-generic/xor.h> 4#include <asm-generic/xor.h>
7 5
8#endif /* _ASM_M32R_XOR_H */ 6#endif /* _ASM_M32R_XOR_H */
diff --git a/include/asm-m68k/math-emu.h b/include/asm-m68k/math-emu.h
index 7ac6259b68df..ddfab96403cb 100644
--- a/include/asm-m68k/math-emu.h
+++ b/include/asm-m68k/math-emu.h
@@ -226,6 +226,21 @@ extern unsigned int fp_debugprint;
226 .previous 226 .previous
227.endm 227.endm
228 228
229/* work around binutils idiocy */
230old_gas=-1
231.irp gas_ident.x .x
232old_gas=old_gas+1
233.endr
234.if !old_gas
235.irp m b,w,l
236.macro getuser.\m src,dest,label,addr
237 getuser .\m,\src,\dest,\label,\addr
238.endm
239.macro putuser.\m src,dest,label,addr
240 putuser .\m,\src,\dest,\label,\addr
241.endm
242.endr
243.endif
229 244
230.macro movestack nr,arg1,arg2,arg3,arg4,arg5 245.macro movestack nr,arg1,arg2,arg3,arg4,arg5
231 .if \nr 246 .if \nr
diff --git a/include/asm-m68k/termios.h b/include/asm-m68k/termios.h
index 857f0c9a9120..00edabd76168 100644
--- a/include/asm-m68k/termios.h
+++ b/include/asm-m68k/termios.h
@@ -49,24 +49,6 @@ struct termio {
49 49
50/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ 50/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
51 51
52/* line disciplines */
53#define N_TTY 0
54#define N_SLIP 1
55#define N_MOUSE 2
56#define N_PPP 3
57#define N_STRIP 4
58#define N_AX25 5
59#define N_X25 6 /* X.25 async */
60#define N_6PACK 7
61#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
62#define N_R3964 9 /* Reserved for Simatic R3964 module */
63#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
64#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */
65#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
66#define N_HDLC 13 /* synchronous HDLC */
67#define N_SYNC_PPP 14
68#define N_HCI 15 /* Bluetooth HCI UART */
69
70#ifdef __KERNEL__ 52#ifdef __KERNEL__
71 53
72/* 54/*
diff --git a/include/asm-m68k/user.h b/include/asm-m68k/user.h
index d7c0b109bd45..8c56ccab4849 100644
--- a/include/asm-m68k/user.h
+++ b/include/asm-m68k/user.h
@@ -1,8 +1,6 @@
1#ifndef _M68K_USER_H 1#ifndef _M68K_USER_H
2#define _M68K_USER_H 2#define _M68K_USER_H
3 3
4#include <asm/page.h>
5
6/* Core file format: The core file is written in such a way that gdb 4/* Core file format: The core file is written in such a way that gdb
7 can understand it and provide useful information to the user (under 5 can understand it and provide useful information to the user (under
8 linux we use the 'trad-core' bfd). There are quite a number of 6 linux we use the 'trad-core' bfd). There are quite a number of
diff --git a/include/asm-mips/mips_mt.h b/include/asm-mips/mips_mt.h
index c31a312b9783..fdfff0b8ce42 100644
--- a/include/asm-mips/mips_mt.h
+++ b/include/asm-mips/mips_mt.h
@@ -12,4 +12,7 @@ extern unsigned long mt_fpemul_threshold;
12extern void mips_mt_regdump(unsigned long previous_mvpcontrol_value); 12extern void mips_mt_regdump(unsigned long previous_mvpcontrol_value);
13extern void mips_mt_set_cpuoptions(void); 13extern void mips_mt_set_cpuoptions(void);
14 14
15struct class;
16extern struct class *mt_class;
17
15#endif /* __ASM_MIPS_MT_H */ 18#endif /* __ASM_MIPS_MT_H */
diff --git a/include/asm-mips/mman.h b/include/asm-mips/mman.h
index 046cf686bee7..e4d6f1fb1cf7 100644
--- a/include/asm-mips/mman.h
+++ b/include/asm-mips/mman.h
@@ -72,7 +72,6 @@
72#define MADV_DOFORK 11 /* do inherit across fork */ 72#define MADV_DOFORK 11 /* do inherit across fork */
73 73
74/* compatibility flags */ 74/* compatibility flags */
75#define MAP_ANON MAP_ANONYMOUS
76#define MAP_FILE 0 75#define MAP_FILE 0
77 76
78#endif /* _ASM_MMAN_H */ 77#endif /* _ASM_MMAN_H */
diff --git a/include/asm-mips/sigcontext.h b/include/asm-mips/sigcontext.h
index cefa657dd04a..3c175a7e4345 100644
--- a/include/asm-mips/sigcontext.h
+++ b/include/asm-mips/sigcontext.h
@@ -19,7 +19,7 @@
19 */ 19 */
20struct sigcontext { 20struct sigcontext {
21 unsigned int sc_regmask; /* Unused */ 21 unsigned int sc_regmask; /* Unused */
22 unsigned int sc_status; 22 unsigned int sc_status; /* Unused */
23 unsigned long long sc_pc; 23 unsigned long long sc_pc;
24 unsigned long long sc_regs[32]; 24 unsigned long long sc_regs[32];
25 unsigned long long sc_fpregs[32]; 25 unsigned long long sc_fpregs[32];
@@ -76,7 +76,7 @@ struct sigcontext {
76 76
77struct sigcontext32 { 77struct sigcontext32 {
78 __u32 sc_regmask; /* Unused */ 78 __u32 sc_regmask; /* Unused */
79 __u32 sc_status; 79 __u32 sc_status; /* Unused */
80 __u64 sc_pc; 80 __u64 sc_pc;
81 __u64 sc_regs[32]; 81 __u64 sc_regs[32];
82 __u64 sc_fpregs[32]; 82 __u64 sc_fpregs[32];
diff --git a/include/asm-mips/termios.h b/include/asm-mips/termios.h
index 4906204d34fe..2ce07f4be369 100644
--- a/include/asm-mips/termios.h
+++ b/include/asm-mips/termios.h
@@ -87,24 +87,6 @@ struct termio {
87#define TIOCM_OUT2 0x4000 87#define TIOCM_OUT2 0x4000
88#define TIOCM_LOOP 0x8000 88#define TIOCM_LOOP 0x8000
89 89
90/* line disciplines */
91#define N_TTY 0
92#define N_SLIP 1
93#define N_MOUSE 2
94#define N_PPP 3
95#define N_STRIP 4
96#define N_AX25 5
97#define N_X25 6 /* X.25 async */
98#define N_6PACK 7
99#define N_MASC 8 /* Reserved fo Mobitex module <kaz@cafe.net> */
100#define N_R3964 9 /* Reserved for Simatic R3964 module */
101#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
102#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */
103#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
104#define N_HDLC 13 /* synchronous HDLC */
105#define N_SYNC_PPP 14 /* synchronous PPP */
106#define N_HCI 15 /* Bluetooth HCI UART */
107
108#ifdef __KERNEL__ 90#ifdef __KERNEL__
109 91
110#include <linux/string.h> 92#include <linux/string.h>
diff --git a/include/asm-mips/uaccess.h b/include/asm-mips/uaccess.h
index c12ebc53ef31..825fcbd9eabd 100644
--- a/include/asm-mips/uaccess.h
+++ b/include/asm-mips/uaccess.h
@@ -265,8 +265,6 @@ do { \
265 */ 265 */
266#define __get_user_asm_ll32(val, addr) \ 266#define __get_user_asm_ll32(val, addr) \
267{ \ 267{ \
268 unsigned long long __gu_tmp; \
269 \
270 __asm__ __volatile__( \ 268 __asm__ __volatile__( \
271 "1: lw %1, (%3) \n" \ 269 "1: lw %1, (%3) \n" \
272 "2: lw %D1, 4(%3) \n" \ 270 "2: lw %D1, 4(%3) \n" \
@@ -281,9 +279,8 @@ do { \
281 " " __UA_ADDR " 1b, 4b \n" \ 279 " " __UA_ADDR " 1b, 4b \n" \
282 " " __UA_ADDR " 2b, 4b \n" \ 280 " " __UA_ADDR " 2b, 4b \n" \
283 " .previous \n" \ 281 " .previous \n" \
284 : "=r" (__gu_err), "=&r" (__gu_tmp) \ 282 : "=r" (__gu_err), "=&r" (val) \
285 : "0" (0), "r" (addr), "i" (-EFAULT)); \ 283 : "0" (0), "r" (addr), "i" (-EFAULT)); \
286 (val) = (__typeof__(*(addr))) __gu_tmp; \
287} 284}
288 285
289/* 286/*
diff --git a/include/asm-parisc/mman.h b/include/asm-parisc/mman.h
index 0ef15ee0f17e..defe752cc996 100644
--- a/include/asm-parisc/mman.h
+++ b/include/asm-parisc/mman.h
@@ -55,7 +55,6 @@
55#define MADV_64M_PAGES 26 /* Use 64 Megabyte pages */ 55#define MADV_64M_PAGES 26 /* Use 64 Megabyte pages */
56 56
57/* compatibility flags */ 57/* compatibility flags */
58#define MAP_ANON MAP_ANONYMOUS
59#define MAP_FILE 0 58#define MAP_FILE 0
60#define MAP_VARIABLE 0 59#define MAP_VARIABLE 0
61 60
diff --git a/include/asm-parisc/termios.h b/include/asm-parisc/termios.h
index 6965e8f6c3e1..5345b3420475 100644
--- a/include/asm-parisc/termios.h
+++ b/include/asm-parisc/termios.h
@@ -39,24 +39,6 @@ struct termio {
39 39
40/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ 40/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
41 41
42/* line disciplines */
43#define N_TTY 0
44#define N_SLIP 1
45#define N_MOUSE 2
46#define N_PPP 3
47#define N_STRIP 4
48#define N_AX25 5
49#define N_X25 6 /* X.25 async */
50#define N_6PACK 7
51#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
52#define N_R3964 9 /* Reserved for Simatic R3964 module */
53#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
54#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */
55#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
56#define N_HDLC 13 /* synchronous HDLC */
57#define N_SYNC_PPP 14
58#define N_HCI 15 /* Bluetooth HCI UART */
59
60#ifdef __KERNEL__ 42#ifdef __KERNEL__
61 43
62/* intr=^C quit=^\ erase=del kill=^U 44/* intr=^C quit=^\ erase=del kill=^U
diff --git a/include/asm-powerpc/Kbuild b/include/asm-powerpc/Kbuild
index 703970fb0ec0..4869513b872f 100644
--- a/include/asm-powerpc/Kbuild
+++ b/include/asm-powerpc/Kbuild
@@ -23,6 +23,7 @@ header-y += linkage.h
23header-y += resource.h 23header-y += resource.h
24header-y += sigcontext.h 24header-y += sigcontext.h
25header-y += statfs.h 25header-y += statfs.h
26header-y += ps3fb.h
26 27
27unifdef-y += a.out.h 28unifdef-y += a.out.h
28unifdef-y += asm-compat.h 29unifdef-y += asm-compat.h
diff --git a/include/asm-powerpc/ps3.h b/include/asm-powerpc/ps3.h
index 4f5a1e01fdac..e5982ad46576 100644
--- a/include/asm-powerpc/ps3.h
+++ b/include/asm-powerpc/ps3.h
@@ -388,4 +388,13 @@ struct ps3_vuart_port_device {
388 388
389int ps3_vuart_port_device_register(struct ps3_vuart_port_device *dev); 389int ps3_vuart_port_device_register(struct ps3_vuart_port_device *dev);
390 390
391struct ps3_prealloc {
392 const char *name;
393 void *address;
394 unsigned long size;
395 unsigned long align;
396};
397
398extern struct ps3_prealloc ps3fb_videomemory;
399
391#endif 400#endif
diff --git a/include/asm-powerpc/ps3av.h b/include/asm-powerpc/ps3av.h
new file mode 100644
index 000000000000..43e90ea96136
--- /dev/null
+++ b/include/asm-powerpc/ps3av.h
@@ -0,0 +1,738 @@
1/*
2 * Copyright (C) 2006 Sony Computer Entertainment Inc.
3 * Copyright 2006, 2007 Sony Corporation
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published
7 * by the Free Software Foundation; version 2 of the License.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18#ifndef _ASM_POWERPC_PS3AV_H_
19#define _ASM_POWERPC_PS3AV_H_
20
21#include <linux/mutex.h>
22
23/** command for ioctl() **/
24#define PS3AV_VERSION 0x205 /* version of ps3av command */
25
26#define PS3AV_CID_AV_INIT 0x00000001
27#define PS3AV_CID_AV_FIN 0x00000002
28#define PS3AV_CID_AV_GET_HW_CONF 0x00000003
29#define PS3AV_CID_AV_GET_MONITOR_INFO 0x00000004
30#define PS3AV_CID_AV_ENABLE_EVENT 0x00000006
31#define PS3AV_CID_AV_DISABLE_EVENT 0x00000007
32#define PS3AV_CID_AV_TV_MUTE 0x0000000a
33
34#define PS3AV_CID_AV_VIDEO_CS 0x00010001
35#define PS3AV_CID_AV_VIDEO_MUTE 0x00010002
36#define PS3AV_CID_AV_VIDEO_DISABLE_SIG 0x00010003
37#define PS3AV_CID_AV_AUDIO_PARAM 0x00020001
38#define PS3AV_CID_AV_AUDIO_MUTE 0x00020002
39#define PS3AV_CID_AV_HDMI_MODE 0x00040001
40
41#define PS3AV_CID_VIDEO_INIT 0x01000001
42#define PS3AV_CID_VIDEO_MODE 0x01000002
43#define PS3AV_CID_VIDEO_FORMAT 0x01000004
44#define PS3AV_CID_VIDEO_PITCH 0x01000005
45
46#define PS3AV_CID_AUDIO_INIT 0x02000001
47#define PS3AV_CID_AUDIO_MODE 0x02000002
48#define PS3AV_CID_AUDIO_MUTE 0x02000003
49#define PS3AV_CID_AUDIO_ACTIVE 0x02000004
50#define PS3AV_CID_AUDIO_INACTIVE 0x02000005
51#define PS3AV_CID_AUDIO_SPDIF_BIT 0x02000006
52#define PS3AV_CID_AUDIO_CTRL 0x02000007
53
54#define PS3AV_CID_EVENT_UNPLUGGED 0x10000001
55#define PS3AV_CID_EVENT_PLUGGED 0x10000002
56#define PS3AV_CID_EVENT_HDCP_DONE 0x10000003
57#define PS3AV_CID_EVENT_HDCP_FAIL 0x10000004
58#define PS3AV_CID_EVENT_HDCP_AUTH 0x10000005
59#define PS3AV_CID_EVENT_HDCP_ERROR 0x10000006
60
61#define PS3AV_CID_AVB_PARAM 0x04000001
62
63/* max backend ports */
64#define PS3AV_HDMI_MAX 2 /* HDMI_0 HDMI_1 */
65#define PS3AV_AVMULTI_MAX 1 /* AVMULTI_0 */
66#define PS3AV_AV_PORT_MAX (PS3AV_HDMI_MAX + PS3AV_AVMULTI_MAX)
67#define PS3AV_OPT_PORT_MAX 1 /* SPDIF0 */
68#define PS3AV_HEAD_MAX 2 /* HEAD_A HEAD_B */
69
70/* num of pkt for PS3AV_CID_AVB_PARAM */
71#define PS3AV_AVB_NUM_VIDEO PS3AV_HEAD_MAX
72#define PS3AV_AVB_NUM_AUDIO 0 /* not supported */
73#define PS3AV_AVB_NUM_AV_VIDEO PS3AV_AV_PORT_MAX
74#define PS3AV_AVB_NUM_AV_AUDIO PS3AV_HDMI_MAX
75
76#define PS3AV_MUTE_PORT_MAX 1 /* num of ports in mute pkt */
77
78/* event_bit */
79#define PS3AV_CMD_EVENT_BIT_UNPLUGGED (1 << 0)
80#define PS3AV_CMD_EVENT_BIT_PLUGGED (1 << 1)
81#define PS3AV_CMD_EVENT_BIT_HDCP_DONE (1 << 2)
82#define PS3AV_CMD_EVENT_BIT_HDCP_FAIL (1 << 3)
83#define PS3AV_CMD_EVENT_BIT_HDCP_REAUTH (1 << 4)
84#define PS3AV_CMD_EVENT_BIT_HDCP_TOPOLOGY (1 << 5)
85
86/* common params */
87/* mute */
88#define PS3AV_CMD_MUTE_OFF 0x0000
89#define PS3AV_CMD_MUTE_ON 0x0001
90/* avport */
91#define PS3AV_CMD_AVPORT_HDMI_0 0x0000
92#define PS3AV_CMD_AVPORT_HDMI_1 0x0001
93#define PS3AV_CMD_AVPORT_AVMULTI_0 0x0010
94#define PS3AV_CMD_AVPORT_SPDIF_0 0x0020
95#define PS3AV_CMD_AVPORT_SPDIF_1 0x0021
96
97/* for av backend */
98/* av_mclk */
99#define PS3AV_CMD_AV_MCLK_128 0x0000
100#define PS3AV_CMD_AV_MCLK_256 0x0001
101#define PS3AV_CMD_AV_MCLK_512 0x0003
102/* av_inputlen */
103#define PS3AV_CMD_AV_INPUTLEN_16 0x02
104#define PS3AV_CMD_AV_INPUTLEN_20 0x0a
105#define PS3AV_CMD_AV_INPUTLEN_24 0x0b
106/* alayout */
107#define PS3AV_CMD_AV_LAYOUT_32 (1 << 0)
108#define PS3AV_CMD_AV_LAYOUT_44 (1 << 1)
109#define PS3AV_CMD_AV_LAYOUT_48 (1 << 2)
110#define PS3AV_CMD_AV_LAYOUT_88 (1 << 3)
111#define PS3AV_CMD_AV_LAYOUT_96 (1 << 4)
112#define PS3AV_CMD_AV_LAYOUT_176 (1 << 5)
113#define PS3AV_CMD_AV_LAYOUT_192 (1 << 6)
114/* hdmi_mode */
115#define PS3AV_CMD_AV_HDMI_MODE_NORMAL 0xff
116#define PS3AV_CMD_AV_HDMI_HDCP_OFF 0x01
117#define PS3AV_CMD_AV_HDMI_EDID_PASS 0x80
118#define PS3AV_CMD_AV_HDMI_DVI 0x40
119
120/* for video module */
121/* video_head */
122#define PS3AV_CMD_VIDEO_HEAD_A 0x0000
123#define PS3AV_CMD_VIDEO_HEAD_B 0x0001
124/* video_cs_out video_cs_in */
125#define PS3AV_CMD_VIDEO_CS_NONE 0x0000
126#define PS3AV_CMD_VIDEO_CS_RGB_8 0x0001
127#define PS3AV_CMD_VIDEO_CS_YUV444_8 0x0002
128#define PS3AV_CMD_VIDEO_CS_YUV422_8 0x0003
129#define PS3AV_CMD_VIDEO_CS_XVYCC_8 0x0004
130#define PS3AV_CMD_VIDEO_CS_RGB_10 0x0005
131#define PS3AV_CMD_VIDEO_CS_YUV444_10 0x0006
132#define PS3AV_CMD_VIDEO_CS_YUV422_10 0x0007
133#define PS3AV_CMD_VIDEO_CS_XVYCC_10 0x0008
134#define PS3AV_CMD_VIDEO_CS_RGB_12 0x0009
135#define PS3AV_CMD_VIDEO_CS_YUV444_12 0x000a
136#define PS3AV_CMD_VIDEO_CS_YUV422_12 0x000b
137#define PS3AV_CMD_VIDEO_CS_XVYCC_12 0x000c
138/* video_vid */
139#define PS3AV_CMD_VIDEO_VID_NONE 0x0000
140#define PS3AV_CMD_VIDEO_VID_480I 0x0001
141#define PS3AV_CMD_VIDEO_VID_576I 0x0003
142#define PS3AV_CMD_VIDEO_VID_480P 0x0005
143#define PS3AV_CMD_VIDEO_VID_576P 0x0006
144#define PS3AV_CMD_VIDEO_VID_1080I_60HZ 0x0007
145#define PS3AV_CMD_VIDEO_VID_1080I_50HZ 0x0008
146#define PS3AV_CMD_VIDEO_VID_720P_60HZ 0x0009
147#define PS3AV_CMD_VIDEO_VID_720P_50HZ 0x000a
148#define PS3AV_CMD_VIDEO_VID_1080P_60HZ 0x000b
149#define PS3AV_CMD_VIDEO_VID_1080P_50HZ 0x000c
150#define PS3AV_CMD_VIDEO_VID_WXGA 0x000d
151#define PS3AV_CMD_VIDEO_VID_SXGA 0x000e
152#define PS3AV_CMD_VIDEO_VID_WUXGA 0x000f
153#define PS3AV_CMD_VIDEO_VID_480I_A 0x0010
154/* video_format */
155#define PS3AV_CMD_VIDEO_FORMAT_BLACK 0x0000
156#define PS3AV_CMD_VIDEO_FORMAT_ARGB_8BIT 0x0007
157/* video_order */
158#define PS3AV_CMD_VIDEO_ORDER_RGB 0x0000
159#define PS3AV_CMD_VIDEO_ORDER_BGR 0x0001
160/* video_fmt */
161#define PS3AV_CMD_VIDEO_FMT_X8R8G8B8 0x0000
162/* video_out_format */
163#define PS3AV_CMD_VIDEO_OUT_FORMAT_RGB_12BIT 0x0000
164/* video_sync */
165#define PS3AV_CMD_VIDEO_SYNC_VSYNC 0x0001
166#define PS3AV_CMD_VIDEO_SYNC_CSYNC 0x0004
167#define PS3AV_CMD_VIDEO_SYNC_HSYNC 0x0010
168
169/* for audio module */
170/* num_of_ch */
171#define PS3AV_CMD_AUDIO_NUM_OF_CH_2 0x0000
172#define PS3AV_CMD_AUDIO_NUM_OF_CH_3 0x0001
173#define PS3AV_CMD_AUDIO_NUM_OF_CH_4 0x0002
174#define PS3AV_CMD_AUDIO_NUM_OF_CH_5 0x0003
175#define PS3AV_CMD_AUDIO_NUM_OF_CH_6 0x0004
176#define PS3AV_CMD_AUDIO_NUM_OF_CH_7 0x0005
177#define PS3AV_CMD_AUDIO_NUM_OF_CH_8 0x0006
178/* audio_fs */
179#define PS3AV_CMD_AUDIO_FS_32K 0x0001
180#define PS3AV_CMD_AUDIO_FS_44K 0x0002
181#define PS3AV_CMD_AUDIO_FS_48K 0x0003
182#define PS3AV_CMD_AUDIO_FS_88K 0x0004
183#define PS3AV_CMD_AUDIO_FS_96K 0x0005
184#define PS3AV_CMD_AUDIO_FS_176K 0x0006
185#define PS3AV_CMD_AUDIO_FS_192K 0x0007
186/* audio_word_bits */
187#define PS3AV_CMD_AUDIO_WORD_BITS_16 0x0001
188#define PS3AV_CMD_AUDIO_WORD_BITS_20 0x0002
189#define PS3AV_CMD_AUDIO_WORD_BITS_24 0x0003
190/* audio_format */
191#define PS3AV_CMD_AUDIO_FORMAT_PCM 0x0001
192#define PS3AV_CMD_AUDIO_FORMAT_BITSTREAM 0x00ff
193/* audio_source */
194#define PS3AV_CMD_AUDIO_SOURCE_SERIAL 0x0000
195#define PS3AV_CMD_AUDIO_SOURCE_SPDIF 0x0001
196/* audio_swap */
197#define PS3AV_CMD_AUDIO_SWAP_0 0x0000
198#define PS3AV_CMD_AUDIO_SWAP_1 0x0000
199/* audio_map */
200#define PS3AV_CMD_AUDIO_MAP_OUTPUT_0 0x0000
201#define PS3AV_CMD_AUDIO_MAP_OUTPUT_1 0x0001
202#define PS3AV_CMD_AUDIO_MAP_OUTPUT_2 0x0002
203#define PS3AV_CMD_AUDIO_MAP_OUTPUT_3 0x0003
204/* audio_layout */
205#define PS3AV_CMD_AUDIO_LAYOUT_2CH 0x0000
206#define PS3AV_CMD_AUDIO_LAYOUT_6CH 0x000b /* LREClr */
207#define PS3AV_CMD_AUDIO_LAYOUT_8CH 0x001f /* LREClrXY */
208/* audio_downmix */
209#define PS3AV_CMD_AUDIO_DOWNMIX_PERMITTED 0x0000
210#define PS3AV_CMD_AUDIO_DOWNMIX_PROHIBITED 0x0001
211
212/* audio_port */
213#define PS3AV_CMD_AUDIO_PORT_HDMI_0 ( 1 << 0 )
214#define PS3AV_CMD_AUDIO_PORT_HDMI_1 ( 1 << 1 )
215#define PS3AV_CMD_AUDIO_PORT_AVMULTI_0 ( 1 << 10 )
216#define PS3AV_CMD_AUDIO_PORT_SPDIF_0 ( 1 << 20 )
217#define PS3AV_CMD_AUDIO_PORT_SPDIF_1 ( 1 << 21 )
218
219/* audio_ctrl_id */
220#define PS3AV_CMD_AUDIO_CTRL_ID_DAC_RESET 0x0000
221#define PS3AV_CMD_AUDIO_CTRL_ID_DAC_DE_EMPHASIS 0x0001
222#define PS3AV_CMD_AUDIO_CTRL_ID_AVCLK 0x0002
223/* audio_ctrl_data[0] reset */
224#define PS3AV_CMD_AUDIO_CTRL_RESET_NEGATE 0x0000
225#define PS3AV_CMD_AUDIO_CTRL_RESET_ASSERT 0x0001
226/* audio_ctrl_data[0] de-emphasis */
227#define PS3AV_CMD_AUDIO_CTRL_DE_EMPHASIS_OFF 0x0000
228#define PS3AV_CMD_AUDIO_CTRL_DE_EMPHASIS_ON 0x0001
229/* audio_ctrl_data[0] avclk */
230#define PS3AV_CMD_AUDIO_CTRL_AVCLK_22 0x0000
231#define PS3AV_CMD_AUDIO_CTRL_AVCLK_18 0x0001
232
233/* av_vid */
234/* do not use these params directly, use vid_video2av */
235#define PS3AV_CMD_AV_VID_480I 0x0000
236#define PS3AV_CMD_AV_VID_480P 0x0001
237#define PS3AV_CMD_AV_VID_720P_60HZ 0x0002
238#define PS3AV_CMD_AV_VID_1080I_60HZ 0x0003
239#define PS3AV_CMD_AV_VID_1080P_60HZ 0x0004
240#define PS3AV_CMD_AV_VID_576I 0x0005
241#define PS3AV_CMD_AV_VID_576P 0x0006
242#define PS3AV_CMD_AV_VID_720P_50HZ 0x0007
243#define PS3AV_CMD_AV_VID_1080I_50HZ 0x0008
244#define PS3AV_CMD_AV_VID_1080P_50HZ 0x0009
245#define PS3AV_CMD_AV_VID_WXGA 0x000a
246#define PS3AV_CMD_AV_VID_SXGA 0x000b
247#define PS3AV_CMD_AV_VID_WUXGA 0x000c
248/* av_cs_out av_cs_in */
249/* use cs_video2av() */
250#define PS3AV_CMD_AV_CS_RGB_8 0x0000
251#define PS3AV_CMD_AV_CS_YUV444_8 0x0001
252#define PS3AV_CMD_AV_CS_YUV422_8 0x0002
253#define PS3AV_CMD_AV_CS_XVYCC_8 0x0003
254#define PS3AV_CMD_AV_CS_RGB_10 0x0004
255#define PS3AV_CMD_AV_CS_YUV444_10 0x0005
256#define PS3AV_CMD_AV_CS_YUV422_10 0x0006
257#define PS3AV_CMD_AV_CS_XVYCC_10 0x0007
258#define PS3AV_CMD_AV_CS_RGB_12 0x0008
259#define PS3AV_CMD_AV_CS_YUV444_12 0x0009
260#define PS3AV_CMD_AV_CS_YUV422_12 0x000a
261#define PS3AV_CMD_AV_CS_XVYCC_12 0x000b
262#define PS3AV_CMD_AV_CS_8 0x0000
263#define PS3AV_CMD_AV_CS_10 0x0001
264#define PS3AV_CMD_AV_CS_12 0x0002
265/* dither */
266#define PS3AV_CMD_AV_DITHER_OFF 0x0000
267#define PS3AV_CMD_AV_DITHER_ON 0x0001
268#define PS3AV_CMD_AV_DITHER_8BIT 0x0000
269#define PS3AV_CMD_AV_DITHER_10BIT 0x0002
270#define PS3AV_CMD_AV_DITHER_12BIT 0x0004
271/* super_white */
272#define PS3AV_CMD_AV_SUPER_WHITE_OFF 0x0000
273#define PS3AV_CMD_AV_SUPER_WHITE_ON 0x0001
274/* aspect */
275#define PS3AV_CMD_AV_ASPECT_16_9 0x0000
276#define PS3AV_CMD_AV_ASPECT_4_3 0x0001
277/* video_cs_cnv() */
278#define PS3AV_CMD_VIDEO_CS_RGB 0x0001
279#define PS3AV_CMD_VIDEO_CS_YUV422 0x0002
280#define PS3AV_CMD_VIDEO_CS_YUV444 0x0003
281
282/* for automode */
283#define PS3AV_RESBIT_720x480P 0x0003 /* 0x0001 | 0x0002 */
284#define PS3AV_RESBIT_720x576P 0x0003 /* 0x0001 | 0x0002 */
285#define PS3AV_RESBIT_1280x720P 0x0004
286#define PS3AV_RESBIT_1920x1080I 0x0008
287#define PS3AV_RESBIT_1920x1080P 0x4000
288#define PS3AV_RES_MASK_60 (PS3AV_RESBIT_720x480P \
289 | PS3AV_RESBIT_1280x720P \
290 | PS3AV_RESBIT_1920x1080I \
291 | PS3AV_RESBIT_1920x1080P)
292#define PS3AV_RES_MASK_50 (PS3AV_RESBIT_720x576P \
293 | PS3AV_RESBIT_1280x720P \
294 | PS3AV_RESBIT_1920x1080I \
295 | PS3AV_RESBIT_1920x1080P)
296
297#define PS3AV_MONITOR_TYPE_HDMI 1 /* HDMI */
298#define PS3AV_MONITOR_TYPE_DVI 2 /* DVI */
299#define PS3AV_DEFAULT_HDMI_VID_REG_60 PS3AV_CMD_VIDEO_VID_480P
300#define PS3AV_DEFAULT_AVMULTI_VID_REG_60 PS3AV_CMD_VIDEO_VID_480I
301#define PS3AV_DEFAULT_HDMI_VID_REG_50 PS3AV_CMD_VIDEO_VID_576P
302#define PS3AV_DEFAULT_AVMULTI_VID_REG_50 PS3AV_CMD_VIDEO_VID_576I
303#define PS3AV_DEFAULT_DVI_VID PS3AV_CMD_VIDEO_VID_480P
304
305#define PS3AV_REGION_60 0x01
306#define PS3AV_REGION_50 0x02
307#define PS3AV_REGION_RGB 0x10
308
309#define get_status(buf) (((__u32 *)buf)[2])
310#define PS3AV_HDR_SIZE 4 /* version + size */
311
312/* for video mode */
313#define PS3AV_MODE_MASK 0x000F
314#define PS3AV_MODE_HDCP_OFF 0x1000 /* Retail PS3 product doesn't support this */
315#define PS3AV_MODE_DITHER 0x0800
316#define PS3AV_MODE_FULL 0x0080
317#define PS3AV_MODE_DVI 0x0040
318#define PS3AV_MODE_RGB 0x0020
319
320
321/** command packet structure **/
322struct ps3av_send_hdr {
323 u16 version;
324 u16 size; /* size of command packet */
325 u32 cid; /* command id */
326};
327
328struct ps3av_reply_hdr {
329 u16 version;
330 u16 size;
331 u32 cid;
332 u32 status;
333};
334
335/* backend: initialization */
336struct ps3av_pkt_av_init {
337 struct ps3av_send_hdr send_hdr;
338 u32 event_bit;
339};
340
341/* backend: finalize */
342struct ps3av_pkt_av_fin {
343 struct ps3av_send_hdr send_hdr;
344 /* recv */
345 u32 reserved;
346};
347
348/* backend: get port */
349struct ps3av_pkt_av_get_hw_conf {
350 struct ps3av_send_hdr send_hdr;
351 /* recv */
352 u32 status;
353 u16 num_of_hdmi; /* out: number of hdmi */
354 u16 num_of_avmulti; /* out: number of avmulti */
355 u16 num_of_spdif; /* out: number of hdmi */
356 u16 reserved;
357};
358
359/* backend: get monitor info */
360struct ps3av_info_resolution {
361 u32 res_bits;
362 u32 native;
363};
364
365struct ps3av_info_cs {
366 u8 rgb;
367 u8 yuv444;
368 u8 yuv422;
369 u8 reserved;
370};
371
372struct ps3av_info_color {
373 u16 red_x;
374 u16 red_y;
375 u16 green_x;
376 u16 green_y;
377 u16 blue_x;
378 u16 blue_y;
379 u16 white_x;
380 u16 white_y;
381 u32 gamma;
382};
383
384struct ps3av_info_audio {
385 u8 type;
386 u8 max_num_of_ch;
387 u8 fs;
388 u8 sbit;
389};
390
391struct ps3av_info_monitor {
392 u8 avport;
393 u8 monitor_id[10];
394 u8 monitor_type;
395 u8 monitor_name[16];
396 struct ps3av_info_resolution res_60;
397 struct ps3av_info_resolution res_50;
398 struct ps3av_info_resolution res_other;
399 struct ps3av_info_resolution res_vesa;
400 struct ps3av_info_cs cs;
401 struct ps3av_info_color color;
402 u8 supported_ai;
403 u8 speaker_info;
404 u8 num_of_audio_block;
405 struct ps3av_info_audio audio[0]; /* 0 or more audio blocks */
406 u8 reserved[169];
407} __attribute__ ((packed));
408
409struct ps3av_pkt_av_get_monitor_info {
410 struct ps3av_send_hdr send_hdr;
411 u16 avport; /* in: avport */
412 u16 reserved;
413 /* recv */
414 struct ps3av_info_monitor info; /* out: monitor info */
415};
416
417/* backend: enable/disable event */
418struct ps3av_pkt_av_event {
419 struct ps3av_send_hdr send_hdr;
420 u32 event_bit; /* in */
421};
422
423/* backend: video cs param */
424struct ps3av_pkt_av_video_cs {
425 struct ps3av_send_hdr send_hdr;
426 u16 avport; /* in: avport */
427 u16 av_vid; /* in: video resolution */
428 u16 av_cs_out; /* in: output color space */
429 u16 av_cs_in; /* in: input color space */
430 u8 dither; /* in: dither bit length */
431 u8 bitlen_out; /* in: bit length */
432 u8 super_white; /* in: super white */
433 u8 aspect; /* in: aspect ratio */
434};
435
436/* backend: video mute */
437struct ps3av_av_mute {
438 u16 avport; /* in: avport */
439 u16 mute; /* in: mute on/off */
440};
441
442struct ps3av_pkt_av_video_mute {
443 struct ps3av_send_hdr send_hdr;
444 struct ps3av_av_mute mute[PS3AV_MUTE_PORT_MAX];
445};
446
447/* backend: video disable signal */
448struct ps3av_pkt_av_video_disable_sig {
449 struct ps3av_send_hdr send_hdr;
450 u16 avport; /* in: avport */
451 u16 reserved;
452};
453
454/* backend: audio param */
455struct ps3av_audio_info_frame {
456 struct pb1_bit {
457 u8 ct:4;
458 u8 rsv:1;
459 u8 cc:3;
460 } pb1;
461 struct pb2_bit {
462 u8 rsv:3;
463 u8 sf:3;
464 u8 ss:2;
465 } pb2;
466 u8 pb3;
467 u8 pb4;
468 struct pb5_bit {
469 u8 dm:1;
470 u8 lsv:4;
471 u8 rsv:3;
472 } pb5;
473};
474
475struct ps3av_pkt_av_audio_param {
476 struct ps3av_send_hdr send_hdr;
477 u16 avport; /* in: avport */
478 u16 reserved;
479 u8 mclk; /* in: audio mclk */
480 u8 ns[3]; /* in: audio ns val */
481 u8 enable; /* in: audio enable */
482 u8 swaplr; /* in: audio swap */
483 u8 fifomap; /* in: audio fifomap */
484 u8 inputctrl; /* in: audio input ctrl */
485 u8 inputlen; /* in: sample bit size */
486 u8 layout; /* in: speaker layout param */
487 struct ps3av_audio_info_frame info; /* in: info */
488 u8 chstat[5]; /* in: ch stat */
489};
490
491/* backend: audio_mute */
492struct ps3av_pkt_av_audio_mute {
493 struct ps3av_send_hdr send_hdr;
494 struct ps3av_av_mute mute[PS3AV_MUTE_PORT_MAX];
495};
496
497/* backend: hdmi_mode */
498struct ps3av_pkt_av_hdmi_mode {
499 struct ps3av_send_hdr send_hdr;
500 u8 mode; /* in: hdmi_mode */
501 u8 reserved0;
502 u8 reserved1;
503 u8 reserved2;
504};
505
506/* backend: tv_mute */
507struct ps3av_pkt_av_tv_mute {
508 struct ps3av_send_hdr send_hdr;
509 u16 avport; /* in: avport HDMI only */
510 u16 mute; /* in: mute */
511};
512
513/* video: initialize */
514struct ps3av_pkt_video_init {
515 struct ps3av_send_hdr send_hdr;
516 /* recv */
517 u32 reserved;
518};
519
520/* video: mode setting */
521struct ps3av_pkt_video_mode {
522 struct ps3av_send_hdr send_hdr;
523 u32 video_head; /* in: head */
524 u32 reserved;
525 u32 video_vid; /* in: video resolution */
526 u16 reserved1;
527 u16 width; /* in: width in pixel */
528 u16 reserved2;
529 u16 height; /* in: height in pixel */
530 u32 pitch; /* in: line size in byte */
531 u32 video_out_format; /* in: out format */
532 u32 video_format; /* in: input frame buffer format */
533 u8 reserved3;
534 u8 reserved4;
535 u16 video_order; /* in: input RGB order */
536 u32 reserved5;
537};
538
539/* video: format */
540struct ps3av_pkt_video_format {
541 struct ps3av_send_hdr send_hdr;
542 u32 video_head; /* in: head */
543 u32 video_format; /* in: frame buffer format */
544 u16 reserved;
545 u16 video_order; /* in: input RGB order */
546};
547
548/* video: pitch */
549struct ps3av_pkt_video_pitch {
550 u16 version;
551 u16 size; /* size of command packet */
552 u32 cid; /* command id */
553 u32 video_head; /* in: head */
554 u32 pitch; /* in: line size in byte */
555};
556
557/* audio: initialize */
558struct ps3av_pkt_audio_init {
559 struct ps3av_send_hdr send_hdr;
560 /* recv */
561 u32 reserved;
562};
563
564/* audio: mode setting */
565struct ps3av_pkt_audio_mode {
566 struct ps3av_send_hdr send_hdr;
567 u8 avport; /* in: avport */
568 u8 reserved0[3];
569 u32 mask; /* in: mask */
570 u32 audio_num_of_ch; /* in: number of ch */
571 u32 audio_fs; /* in: sampling freq */
572 u32 audio_word_bits; /* in: sample bit size */
573 u32 audio_format; /* in: audio output format */
574 u32 audio_source; /* in: audio source */
575 u8 audio_enable[4]; /* in: audio enable */
576 u8 audio_swap[4]; /* in: audio swap */
577 u8 audio_map[4]; /* in: audio map */
578 u32 audio_layout; /* in: speaker layout */
579 u32 audio_downmix; /* in: audio downmix permission */
580 u32 audio_downmix_level;
581 u8 audio_cs_info[8]; /* in: IEC channel status */
582};
583
584/* audio: mute */
585struct ps3av_audio_mute {
586 u8 avport; /* in: opt_port optical */
587 u8 reserved[3];
588 u32 mute; /* in: mute */
589};
590
591struct ps3av_pkt_audio_mute {
592 struct ps3av_send_hdr send_hdr;
593 struct ps3av_audio_mute mute[PS3AV_OPT_PORT_MAX];
594};
595
596/* audio: active/inactive */
597struct ps3av_pkt_audio_active {
598 struct ps3av_send_hdr send_hdr;
599 u32 audio_port; /* in: audio active/inactive port */
600};
601
602/* audio: SPDIF user bit */
603struct ps3av_pkt_audio_spdif_bit {
604 u16 version;
605 u16 size; /* size of command packet */
606 u32 cid; /* command id */
607 u8 avport; /* in: avport SPDIF only */
608 u8 reserved[3];
609 u32 audio_port; /* in: SPDIF only */
610 u32 spdif_bit_data[12]; /* in: user bit data */
611};
612
613/* audio: audio control */
614struct ps3av_pkt_audio_ctrl {
615 u16 version;
616 u16 size; /* size of command packet */
617 u32 cid; /* command id */
618 u32 audio_ctrl_id; /* in: control id */
619 u32 audio_ctrl_data[4]; /* in: control data */
620};
621
622/* avb:param */
623#define PS3AV_PKT_AVB_PARAM_MAX_BUF_SIZE \
624 (PS3AV_AVB_NUM_VIDEO*sizeof(struct ps3av_pkt_video_mode) + \
625 PS3AV_AVB_NUM_AUDIO*sizeof(struct ps3av_pkt_audio_mode) + \
626 PS3AV_AVB_NUM_AV_VIDEO*sizeof(struct ps3av_pkt_av_video_cs) + \
627 PS3AV_AVB_NUM_AV_AUDIO*sizeof(struct ps3av_pkt_av_audio_param))
628
629struct ps3av_pkt_avb_param {
630 struct ps3av_send_hdr send_hdr;
631 u16 num_of_video_pkt;
632 u16 num_of_audio_pkt;
633 u16 num_of_av_video_pkt;
634 u16 num_of_av_audio_pkt;
635 /*
636 * The actual buffer layout depends on the fields above:
637 *
638 * struct ps3av_pkt_video_mode video[num_of_video_pkt];
639 * struct ps3av_pkt_audio_mode audio[num_of_audio_pkt];
640 * struct ps3av_pkt_av_video_cs av_video[num_of_av_video_pkt];
641 * struct ps3av_pkt_av_audio_param av_audio[num_of_av_audio_pkt];
642 */
643 u8 buf[PS3AV_PKT_AVB_PARAM_MAX_BUF_SIZE];
644};
645
646struct ps3av {
647 int available;
648 struct semaphore sem;
649 struct semaphore ping;
650 struct semaphore pong;
651 struct mutex mutex;
652 int open_count;
653 struct ps3_vuart_port_device *dev;
654
655 int region;
656 struct ps3av_pkt_av_get_hw_conf av_hw_conf;
657 u32 av_port[PS3AV_AV_PORT_MAX + PS3AV_OPT_PORT_MAX];
658 u32 opt_port[PS3AV_OPT_PORT_MAX];
659 u32 head[PS3AV_HEAD_MAX];
660 u32 audio_port;
661 int ps3av_mode;
662 int ps3av_mode_old;
663};
664
665/** command status **/
666#define PS3AV_STATUS_SUCCESS 0x0000 /* success */
667#define PS3AV_STATUS_RECEIVE_VUART_ERROR 0x0001 /* receive vuart error */
668#define PS3AV_STATUS_SYSCON_COMMUNICATE_FAIL 0x0002 /* syscon communication error */
669#define PS3AV_STATUS_INVALID_COMMAND 0x0003 /* obsolete invalid CID */
670#define PS3AV_STATUS_INVALID_PORT 0x0004 /* invalid port number */
671#define PS3AV_STATUS_INVALID_VID 0x0005 /* invalid video format */
672#define PS3AV_STATUS_INVALID_COLOR_SPACE 0x0006 /* invalid video colose space */
673#define PS3AV_STATUS_INVALID_FS 0x0007 /* invalid audio sampling freq */
674#define PS3AV_STATUS_INVALID_AUDIO_CH 0x0008 /* invalid audio channel number */
675#define PS3AV_STATUS_UNSUPPORTED_VERSION 0x0009 /* version mismatch */
676#define PS3AV_STATUS_INVALID_SAMPLE_SIZE 0x000a /* invalid audio sample bit size */
677#define PS3AV_STATUS_FAILURE 0x000b /* other failures */
678#define PS3AV_STATUS_UNSUPPORTED_COMMAND 0x000c /* unsupported cid */
679#define PS3AV_STATUS_BUFFER_OVERFLOW 0x000d /* write buffer overflow */
680#define PS3AV_STATUS_INVALID_VIDEO_PARAM 0x000e /* invalid video param */
681#define PS3AV_STATUS_NO_SEL 0x000f /* not exist selector */
682#define PS3AV_STATUS_INVALID_AV_PARAM 0x0010 /* invalid backend param */
683#define PS3AV_STATUS_INVALID_AUDIO_PARAM 0x0011 /* invalid audio param */
684#define PS3AV_STATUS_UNSUPPORTED_HDMI_MODE 0x0012 /* unsupported hdmi mode */
685#define PS3AV_STATUS_NO_SYNC_HEAD 0x0013 /* sync head failed */
686
687extern void ps3av_set_hdr(u32, u16, struct ps3av_send_hdr *);
688extern int ps3av_do_pkt(u32, u16, size_t, struct ps3av_send_hdr *);
689
690extern int ps3av_cmd_init(void);
691extern int ps3av_cmd_fin(void);
692extern int ps3av_cmd_av_video_mute(int, u32 *, u32);
693extern int ps3av_cmd_av_video_disable_sig(u32);
694extern int ps3av_cmd_av_tv_mute(u32, u32);
695extern int ps3av_cmd_enable_event(void);
696extern int ps3av_cmd_av_hdmi_mode(u8);
697extern u32 ps3av_cmd_set_av_video_cs(void *, u32, int, int, int, u32);
698extern u32 ps3av_cmd_set_video_mode(void *, u32, int, int, u32);
699extern int ps3av_cmd_video_format_black(u32, u32, u32);
700extern int ps3av_cmd_av_audio_mute(int, u32 *, u32);
701extern u32 ps3av_cmd_set_av_audio_param(void *, u32,
702 const struct ps3av_pkt_audio_mode *,
703 u32);
704extern void ps3av_cmd_set_audio_mode(struct ps3av_pkt_audio_mode *, u32, u32,
705 u32, u32, u32, u32);
706extern int ps3av_cmd_audio_mode(struct ps3av_pkt_audio_mode *);
707extern int ps3av_cmd_audio_mute(int, u32 *, u32);
708extern int ps3av_cmd_audio_active(int, u32);
709extern int ps3av_cmd_avb_param(struct ps3av_pkt_avb_param *, u32);
710extern int ps3av_cmd_av_get_hw_conf(struct ps3av_pkt_av_get_hw_conf *);
711#ifdef PS3AV_DEBUG
712extern void ps3av_cmd_av_hw_conf_dump(const struct ps3av_pkt_av_get_hw_conf *);
713extern void ps3av_cmd_av_monitor_info_dump(const struct ps3av_pkt_av_get_monitor_info *);
714#else
715static inline void ps3av_cmd_av_hw_conf_dump(const struct ps3av_pkt_av_get_hw_conf *hw_conf) {}
716static inline void ps3av_cmd_av_monitor_info_dump(const struct ps3av_pkt_av_get_monitor_info *monitor_info) {}
717#endif
718extern int ps3av_cmd_video_get_monitor_info(struct ps3av_pkt_av_get_monitor_info *,
719 u32);
720
721extern int ps3av_vuart_write(struct ps3_vuart_port_device *dev,
722 const void *buf, unsigned long size);
723extern int ps3av_vuart_read(struct ps3_vuart_port_device *dev, void *buf,
724 unsigned long size, int timeout);
725
726extern int ps3av_set_video_mode(u32, int);
727extern int ps3av_set_audio_mode(u32, u32, u32, u32, u32);
728extern int ps3av_set_mode(u32, int);
729extern int ps3av_get_mode(void);
730extern int ps3av_get_scanmode(int);
731extern int ps3av_get_refresh_rate(int);
732extern int ps3av_video_mode2res(u32, u32 *, u32 *);
733extern int ps3av_video_mute(int);
734extern int ps3av_audio_mute(int);
735extern int ps3av_dev_open(void);
736extern int ps3av_dev_close(void);
737
738#endif /* _ASM_POWERPC_PS3AV_H_ */
diff --git a/include/asm-powerpc/ps3fb.h b/include/asm-powerpc/ps3fb.h
new file mode 100644
index 000000000000..ad81cf431964
--- /dev/null
+++ b/include/asm-powerpc/ps3fb.h
@@ -0,0 +1,56 @@
1/*
2 * Copyright (C) 2006 Sony Computer Entertainment Inc.
3 * Copyright 2006, 2007 Sony Corporation
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published
7 * by the Free Software Foundation; version 2 of the License.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18
19#ifndef _ASM_POWERPC_PS3FB_H_
20#define _ASM_POWERPC_PS3FB_H_
21
22#include <linux/ioctl.h>
23
24/* ioctl */
25#define PS3FB_IOCTL_SETMODE _IOW('r', 1, int) /* set video mode */
26#define PS3FB_IOCTL_GETMODE _IOR('r', 2, int) /* get video mode */
27#define PS3FB_IOCTL_SCREENINFO _IOR('r', 3, int) /* get screen info */
28#define PS3FB_IOCTL_ON _IO('r', 4) /* use IOCTL_FSEL */
29#define PS3FB_IOCTL_OFF _IO('r', 5) /* return to normal-flip */
30#define PS3FB_IOCTL_FSEL _IOW('r', 6, int) /* blit and flip request */
31
32#ifndef FBIO_WAITFORVSYNC
33#define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32) /* wait for vsync */
34#endif
35
36struct ps3fb_ioctl_res {
37 __u32 xres; /* frame buffer x_size */
38 __u32 yres; /* frame buffer y_size */
39 __u32 xoff; /* margine x */
40 __u32 yoff; /* margine y */
41 __u32 num_frames; /* num of frame buffers */
42};
43
44#ifdef __KERNEL__
45
46#ifdef CONFIG_FB_PS3
47extern void ps3fb_flip_ctl(int on);
48extern void ps3fb_cleanup(void);
49#else
50static inline void ps3fb_flip_ctl(int on) {}
51static inline void ps3fb_cleanup(void) {}
52#endif
53
54#endif /* __KERNEL__ */
55
56#endif /* _ASM_POWERPC_PS3FB_H_ */
diff --git a/include/asm-powerpc/termios.h b/include/asm-powerpc/termios.h
index 7f80a019b6a0..2c14fea07c8a 100644
--- a/include/asm-powerpc/termios.h
+++ b/include/asm-powerpc/termios.h
@@ -71,24 +71,6 @@ struct termio {
71#define _VEOL2 8 71#define _VEOL2 8
72#define _VSWTC 9 72#define _VSWTC 9
73 73
74/* line disciplines */
75#define N_TTY 0
76#define N_SLIP 1
77#define N_MOUSE 2
78#define N_PPP 3
79#define N_STRIP 4
80#define N_AX25 5
81#define N_X25 6 /* X.25 async */
82#define N_6PACK 7
83#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
84#define N_R3964 9 /* Reserved for Simatic R3964 module */
85#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
86#define N_IRDA 11 /* Linux IrDa - http://www.cs.uit.no/~dagb/irda/irda.html */
87#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
88#define N_HDLC 13 /* synchronous HDLC */
89#define N_SYNC_PPP 14
90#define N_HCI 15 /* Bluetooth HCI UART */
91
92#ifdef __KERNEL__ 74#ifdef __KERNEL__
93/* ^C ^\ del ^U ^D 1 0 0 0 0 ^W ^R ^Z ^Q ^S ^V ^U */ 75/* ^C ^\ del ^U ^D 1 0 0 0 0 ^W ^R ^Z ^Q ^S ^V ^U */
94#define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025" 76#define INIT_C_CC "\003\034\177\025\004\001\000\000\000\000\027\022\032\021\023\026\025"
diff --git a/include/asm-s390/ccwdev.h b/include/asm-s390/ccwdev.h
index 58c70acffc73..cfc81533b9ba 100644
--- a/include/asm-s390/ccwdev.h
+++ b/include/asm-s390/ccwdev.h
@@ -110,7 +110,9 @@ extern void ccw_driver_unregister (struct ccw_driver *driver);
110 110
111struct ccw1; 111struct ccw1;
112 112
113extern int ccw_device_set_options_mask(struct ccw_device *, unsigned long);
113extern int ccw_device_set_options(struct ccw_device *, unsigned long); 114extern int ccw_device_set_options(struct ccw_device *, unsigned long);
115extern void ccw_device_clear_options(struct ccw_device *, unsigned long);
114 116
115/* Allow for i/o completion notification after primary interrupt status. */ 117/* Allow for i/o completion notification after primary interrupt status. */
116#define CCWDEV_EARLY_NOTIFICATION 0x0001 118#define CCWDEV_EARLY_NOTIFICATION 0x0001
diff --git a/include/asm-s390/io.h b/include/asm-s390/io.h
index a4c2d550dad4..b7ff6afc3caa 100644
--- a/include/asm-s390/io.h
+++ b/include/asm-s390/io.h
@@ -13,13 +13,10 @@
13 13
14#ifdef __KERNEL__ 14#ifdef __KERNEL__
15 15
16#include <linux/vmalloc.h>
17#include <asm/page.h> 16#include <asm/page.h>
18 17
19#define IO_SPACE_LIMIT 0xffffffff 18#define IO_SPACE_LIMIT 0xffffffff
20 19
21#define __io_virt(x) ((void *)(PAGE_OFFSET | (unsigned long)(x)))
22
23/* 20/*
24 * Change virtual addresses to physical addresses and vv. 21 * Change virtual addresses to physical addresses and vv.
25 * These are pretty trivial 22 * These are pretty trivial
@@ -38,75 +35,9 @@ static inline unsigned long virt_to_phys(volatile void * address)
38 35
39static inline void * phys_to_virt(unsigned long address) 36static inline void * phys_to_virt(unsigned long address)
40{ 37{
41 return __io_virt(address); 38 return (void *) address;
42}
43
44extern void * __ioremap(unsigned long offset, unsigned long size, unsigned long flags);
45
46static inline void * ioremap (unsigned long offset, unsigned long size)
47{
48 return __ioremap(offset, size, 0);
49}
50
51/*
52 * This one maps high address device memory and turns off caching for that area.
53 * it's useful if some control registers are in such an area and write combining
54 * or read caching is not desirable:
55 */
56static inline void * ioremap_nocache (unsigned long offset, unsigned long size)
57{
58 return __ioremap(offset, size, 0);
59} 39}
60 40
61extern void iounmap(void *addr);
62
63/*
64 * IO bus memory addresses are also 1:1 with the physical address
65 */
66#define virt_to_bus virt_to_phys
67#define bus_to_virt phys_to_virt
68
69/*
70 * readX/writeX() are used to access memory mapped devices. On some
71 * architectures the memory mapped IO stuff needs to be accessed
72 * differently.
73 */
74
75#define readb(addr) (*(volatile unsigned char *) __io_virt(addr))
76#define readw(addr) (*(volatile unsigned short *) __io_virt(addr))
77#define readl(addr) (*(volatile unsigned int *) __io_virt(addr))
78#define readq(addr) (*(volatile unsigned long long *) __io_virt(addr))
79
80#define readb_relaxed(addr) readb(addr)
81#define readw_relaxed(addr) readw(addr)
82#define readl_relaxed(addr) readl(addr)
83#define readq_relaxed(addr) readq(addr)
84#define __raw_readb readb
85#define __raw_readw readw
86#define __raw_readl readl
87#define __raw_readq readq
88
89#define writeb(b,addr) (*(volatile unsigned char *) __io_virt(addr) = (b))
90#define writew(b,addr) (*(volatile unsigned short *) __io_virt(addr) = (b))
91#define writel(b,addr) (*(volatile unsigned int *) __io_virt(addr) = (b))
92#define writeq(b,addr) (*(volatile unsigned long long *) __io_virt(addr) = (b))
93#define __raw_writeb writeb
94#define __raw_writew writew
95#define __raw_writel writel
96#define __raw_writeq writeq
97
98#define memset_io(a,b,c) memset(__io_virt(a),(b),(c))
99#define memcpy_fromio(a,b,c) memcpy((a),__io_virt(b),(c))
100#define memcpy_toio(a,b,c) memcpy(__io_virt(a),(b),(c))
101
102#define inb_p(addr) readb(addr)
103#define inb(addr) readb(addr)
104
105#define outb(x,addr) ((void) writeb(x,addr))
106#define outb_p(x,addr) outb(x,addr)
107
108#define mmiowb() do { } while (0)
109
110/* 41/*
111 * Convert a physical pointer to a virtual kernel pointer for /dev/mem 42 * Convert a physical pointer to a virtual kernel pointer for /dev/mem
112 * access 43 * access
diff --git a/include/asm-s390/termios.h b/include/asm-s390/termios.h
index 62b23caf370e..a3480e25eb4b 100644
--- a/include/asm-s390/termios.h
+++ b/include/asm-s390/termios.h
@@ -47,24 +47,6 @@ struct termio {
47 47
48/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ 48/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
49 49
50/* line disciplines */
51#define N_TTY 0
52#define N_SLIP 1
53#define N_MOUSE 2
54#define N_PPP 3
55#define N_STRIP 4
56#define N_AX25 5
57#define N_X25 6 /* X.25 async */
58#define N_6PACK 7
59#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
60#define N_R3964 9 /* Reserved for Simatic R3964 module */
61#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
62#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */
63#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
64#define N_HDLC 13 /* synchronous HDLC */
65#define N_SYNC_PPP 14 /* synchronous PPP */
66#define N_HCI 15 /* Bluetooth HCI UART */
67
68#ifdef __KERNEL__ 50#ifdef __KERNEL__
69 51
70/* intr=^C quit=^\ erase=del kill=^U 52/* intr=^C quit=^\ erase=del kill=^U
diff --git a/include/asm-sh/termios.h b/include/asm-sh/termios.h
index 44edfd471443..e7c8f86ef890 100644
--- a/include/asm-sh/termios.h
+++ b/include/asm-sh/termios.h
@@ -39,24 +39,6 @@ struct termio {
39 39
40/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ 40/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
41 41
42/* line disciplines */
43#define N_TTY 0
44#define N_SLIP 1
45#define N_MOUSE 2
46#define N_PPP 3
47#define N_STRIP 4
48#define N_AX25 5
49#define N_X25 6 /* X.25 async */
50#define N_6PACK 7
51#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
52#define N_R3964 9 /* Reserved for Simatic R3964 module */
53#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
54#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */
55#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
56#define N_HDLC 13 /* synchronous HDLC */
57#define N_SYNC_PPP 14
58#define N_HCI 15 /* Bluetooth HCI UART */
59
60#ifdef __KERNEL__ 42#ifdef __KERNEL__
61 43
62/* intr=^C quit=^\ erase=del kill=^U 44/* intr=^C quit=^\ erase=del kill=^U
diff --git a/include/asm-sh64/termios.h b/include/asm-sh64/termios.h
index 4a9c7fb411bc..dc44e6ed3a7c 100644
--- a/include/asm-sh64/termios.h
+++ b/include/asm-sh64/termios.h
@@ -50,24 +50,6 @@ struct termio {
50 50
51/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ 51/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
52 52
53/* line disciplines */
54#define N_TTY 0
55#define N_SLIP 1
56#define N_MOUSE 2
57#define N_PPP 3
58#define N_STRIP 4
59#define N_AX25 5
60#define N_X25 6 /* X.25 async */
61#define N_6PACK 7
62#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
63#define N_R3964 9 /* Reserved for Simatic R3964 module */
64#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
65#define N_IRDA 11 /* Linux IR - http://www.cs.uit.no/~dagb/irda/irda.html */
66#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
67#define N_HDLC 13 /* synchronous HDLC */
68#define N_SYNC_PPP 14
69#define N_HCI 15 /* Bluetooth HCI UART */
70
71#ifdef __KERNEL__ 53#ifdef __KERNEL__
72 54
73/* intr=^C quit=^\ erase=del kill=^U 55/* intr=^C quit=^\ erase=del kill=^U
diff --git a/include/asm-sparc/io.h b/include/asm-sparc/io.h
index cab0b851b8b1..c23e74a0eaa8 100644
--- a/include/asm-sparc/io.h
+++ b/include/asm-sparc/io.h
@@ -256,6 +256,35 @@ extern void iounmap(volatile void __iomem *addr);
256#define iowrite16(val,X) writew(val,X) 256#define iowrite16(val,X) writew(val,X)
257#define iowrite32(val,X) writel(val,X) 257#define iowrite32(val,X) writel(val,X)
258 258
259static inline void ioread8_rep(void __iomem *port, void *buf, unsigned long count)
260{
261 insb((unsigned long __force)port, buf, count);
262}
263static inline void ioread16_rep(void __iomem *port, void *buf, unsigned long count)
264{
265 insw((unsigned long __force)port, buf, count);
266}
267
268static inline void ioread32_rep(void __iomem *port, void *buf, unsigned long count)
269{
270 insl((unsigned long __force)port, buf, count);
271}
272
273static inline void iowrite8_rep(void __iomem *port, const void *buf, unsigned long count)
274{
275 outsb((unsigned long __force)port, buf, count);
276}
277
278static inline void iowrite16_rep(void __iomem *port, const void *buf, unsigned long count)
279{
280 outsw((unsigned long __force)port, buf, count);
281}
282
283static inline void iowrite32_rep(void __iomem *port, const void *buf, unsigned long count)
284{
285 outsl((unsigned long __force)port, buf, count);
286}
287
259/* Create a virtual mapping cookie for an IO port range */ 288/* Create a virtual mapping cookie for an IO port range */
260extern void __iomem *ioport_map(unsigned long port, unsigned int nr); 289extern void __iomem *ioport_map(unsigned long port, unsigned int nr);
261extern void ioport_unmap(void __iomem *); 290extern void ioport_unmap(void __iomem *);
diff --git a/include/asm-sparc/termios.h b/include/asm-sparc/termios.h
index d05f83c80989..d767f206ab33 100644
--- a/include/asm-sparc/termios.h
+++ b/include/asm-sparc/termios.h
@@ -45,24 +45,6 @@ struct winsize {
45 unsigned short ws_ypixel; 45 unsigned short ws_ypixel;
46}; 46};
47 47
48/* line disciplines */
49#define N_TTY 0
50#define N_SLIP 1
51#define N_MOUSE 2
52#define N_PPP 3
53#define N_STRIP 4
54#define N_AX25 5
55#define N_X25 6
56#define N_6PACK 7
57#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
58#define N_R3964 9 /* Reserved for Simatic R3964 module */
59#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
60#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */
61#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
62#define N_HDLC 13 /* synchronous HDLC */
63#define N_SYNC_PPP 14 /* synchronous PPP */
64#define N_HCI 15 /* Bluetooth HCI UART */
65
66#ifdef __KERNEL__ 48#ifdef __KERNEL__
67#include <linux/module.h> 49#include <linux/module.h>
68 50
diff --git a/include/asm-sparc64/irq.h b/include/asm-sparc64/irq.h
index 905e59b4a737..5d233b42fe13 100644
--- a/include/asm-sparc64/irq.h
+++ b/include/asm-sparc64/irq.h
@@ -46,6 +46,10 @@ extern void irq_install_pre_handler(int virt_irq,
46#define irq_canonicalize(irq) (irq) 46#define irq_canonicalize(irq) (irq)
47extern unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap); 47extern unsigned int build_irq(int inofixup, unsigned long iclr, unsigned long imap);
48extern unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino); 48extern unsigned int sun4v_build_irq(u32 devhandle, unsigned int devino);
49extern unsigned int sun4v_build_msi(u32 devhandle, unsigned int *virt_irq_p,
50 unsigned int msi_devino_start,
51 unsigned int msi_devino_end);
52extern void sun4v_destroy_msi(unsigned int virt_irq);
49extern unsigned int sbus_build_irq(void *sbus, unsigned int ino); 53extern unsigned int sbus_build_irq(void *sbus, unsigned int ino);
50 54
51static __inline__ void set_softint(unsigned long bits) 55static __inline__ void set_softint(unsigned long bits)
diff --git a/include/asm-sparc64/pbm.h b/include/asm-sparc64/pbm.h
index dcfa7629358c..7a246d8a1828 100644
--- a/include/asm-sparc64/pbm.h
+++ b/include/asm-sparc64/pbm.h
@@ -11,6 +11,7 @@
11#include <linux/pci.h> 11#include <linux/pci.h>
12#include <linux/ioport.h> 12#include <linux/ioport.h>
13#include <linux/spinlock.h> 13#include <linux/spinlock.h>
14#include <linux/msi.h>
14 15
15#include <asm/io.h> 16#include <asm/io.h>
16#include <asm/page.h> 17#include <asm/page.h>
@@ -177,6 +178,24 @@ struct pci_pbm_info {
177 int is_66mhz_capable; 178 int is_66mhz_capable;
178 int all_devs_66mhz; 179 int all_devs_66mhz;
179 180
181#ifdef CONFIG_PCI_MSI
182 /* MSI info. */
183 u32 msiq_num;
184 u32 msiq_ent_count;
185 u32 msiq_first;
186 u32 msiq_first_devino;
187 u32 msi_num;
188 u32 msi_first;
189 u32 msi_data_mask;
190 u32 msix_data_width;
191 u64 msi32_start;
192 u64 msi64_start;
193 u32 msi32_len;
194 u32 msi64_len;
195 void *msi_queues;
196 unsigned long *msi_bitmap;
197#endif /* !(CONFIG_PCI_MSI) */
198
180 /* This PBM's streaming buffer. */ 199 /* This PBM's streaming buffer. */
181 struct pci_strbuf stc; 200 struct pci_strbuf stc;
182 201
@@ -213,6 +232,12 @@ struct pci_controller_info {
213 void (*base_address_update)(struct pci_dev *, int); 232 void (*base_address_update)(struct pci_dev *, int);
214 void (*resource_adjust)(struct pci_dev *, struct resource *, struct resource *); 233 void (*resource_adjust)(struct pci_dev *, struct resource *, struct resource *);
215 234
235#ifdef CONFIG_PCI_MSI
236 int (*setup_msi_irq)(unsigned int *virt_irq_p, struct pci_dev *pdev,
237 struct msi_desc *entry);
238 void (*teardown_msi_irq)(unsigned int virt_irq, struct pci_dev *pdev);
239#endif
240
216 /* Now things for the actual PCI bus probes. */ 241 /* Now things for the actual PCI bus probes. */
217 struct pci_ops *pci_ops; 242 struct pci_ops *pci_ops;
218 unsigned int pci_first_busno; 243 unsigned int pci_first_busno;
@@ -231,6 +256,9 @@ struct pcidev_cookie {
231 int num_prom_regs; 256 int num_prom_regs;
232 struct linux_prom_pci_registers prom_assignments[PROMREG_MAX]; 257 struct linux_prom_pci_registers prom_assignments[PROMREG_MAX];
233 int num_prom_assignments; 258 int num_prom_assignments;
259#ifdef CONFIG_PCI_MSI
260 unsigned int msi_num;
261#endif
234}; 262};
235 263
236/* Currently these are the same across all PCI controllers 264/* Currently these are the same across all PCI controllers
diff --git a/include/asm-sparc64/setup.h b/include/asm-sparc64/setup.h
index b356ee2cda92..5053df3cec40 100644
--- a/include/asm-sparc64/setup.h
+++ b/include/asm-sparc64/setup.h
@@ -5,6 +5,6 @@
5#ifndef _SPARC64_SETUP_H 5#ifndef _SPARC64_SETUP_H
6#define _SPARC64_SETUP_H 6#define _SPARC64_SETUP_H
7 7
8#define COMMAND_LINE_SIZE 256 8#define COMMAND_LINE_SIZE 2048
9 9
10#endif /* _SPARC64_SETUP_H */ 10#endif /* _SPARC64_SETUP_H */
diff --git a/include/asm-sparc64/termios.h b/include/asm-sparc64/termios.h
index ee26a071c677..f05d390993d5 100644
--- a/include/asm-sparc64/termios.h
+++ b/include/asm-sparc64/termios.h
@@ -45,24 +45,6 @@ struct winsize {
45 unsigned short ws_ypixel; 45 unsigned short ws_ypixel;
46}; 46};
47 47
48/* line disciplines */
49#define N_TTY 0
50#define N_SLIP 1
51#define N_MOUSE 2
52#define N_PPP 3
53#define N_STRIP 4
54#define N_AX25 5
55#define N_X25 6
56#define N_6PACK 7
57#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
58#define N_R3964 9 /* Reserved for Simatic R3964 module */
59#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
60#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */
61#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
62#define N_HDLC 13 /* synchronous HDLC */
63#define N_SYNC_PPP 14 /* synchronous PPP */
64#define N_HCI 15 /* Bluetooth HCI UART */
65
66#ifdef __KERNEL__ 48#ifdef __KERNEL__
67#include <linux/module.h> 49#include <linux/module.h>
68 50
diff --git a/include/asm-um/elf-ppc.h b/include/asm-um/elf-ppc.h
index 99711134e477..d3b90b7ac3e9 100644
--- a/include/asm-um/elf-ppc.h
+++ b/include/asm-um/elf-ppc.h
@@ -11,7 +11,7 @@ extern long elf_aux_hwcap;
11 11
12#define elf_check_arch(x) (1) 12#define elf_check_arch(x) (1)
13 13
14#ifdef CONFIG_64_BIT 14#ifdef CONFIG_64BIT
15#define ELF_CLASS ELFCLASS64 15#define ELF_CLASS ELFCLASS64
16#else 16#else
17#define ELF_CLASS ELFCLASS32 17#define ELF_CLASS ELFCLASS32
diff --git a/include/asm-um/processor-x86_64.h b/include/asm-um/processor-x86_64.h
index 10609af376c0..31c2d4d685bd 100644
--- a/include/asm-um/processor-x86_64.h
+++ b/include/asm-um/processor-x86_64.h
@@ -13,6 +13,7 @@
13struct arch_thread { 13struct arch_thread {
14 unsigned long debugregs[8]; 14 unsigned long debugregs[8];
15 int debugregs_seq; 15 int debugregs_seq;
16 unsigned long fs;
16 struct faultinfo faultinfo; 17 struct faultinfo faultinfo;
17}; 18};
18 19
@@ -25,8 +26,9 @@ extern inline void rep_nop(void)
25#define cpu_relax() rep_nop() 26#define cpu_relax() rep_nop()
26 27
27#define INIT_ARCH_THREAD { .debugregs = { [ 0 ... 7 ] = 0 }, \ 28#define INIT_ARCH_THREAD { .debugregs = { [ 0 ... 7 ] = 0 }, \
28 .debugregs_seq = 0, \ 29 .debugregs_seq = 0, \
29 .faultinfo = { 0, 0, 0 } } 30 .fs = 0, \
31 .faultinfo = { 0, 0, 0 } }
30 32
31static inline void arch_flush_thread(struct arch_thread *thread) 33static inline void arch_flush_thread(struct arch_thread *thread)
32{ 34{
diff --git a/include/asm-um/ptrace-x86_64.h b/include/asm-um/ptrace-x86_64.h
index 03b4af4ac09a..bf61d17de3f7 100644
--- a/include/asm-um/ptrace-x86_64.h
+++ b/include/asm-um/ptrace-x86_64.h
@@ -81,9 +81,10 @@ static inline void arch_switch_to_tt(struct task_struct *from,
81{ 81{
82} 82}
83 83
84static inline void arch_switch_to_skas(struct task_struct *from, 84extern void arch_switch_to_skas(struct task_struct *from,
85 struct task_struct *to) 85 struct task_struct *to);
86{ 86
87} 87extern long arch_prctl_skas(struct task_struct *task, int code,
88 unsigned long __user *addr);
88 89
89#endif 90#endif
diff --git a/include/asm-v850/termios.h b/include/asm-v850/termios.h
index 79e97b59806e..c2c2b1d58776 100644
--- a/include/asm-v850/termios.h
+++ b/include/asm-v850/termios.h
@@ -39,24 +39,6 @@ struct termio {
39 39
40/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ 40/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
41 41
42/* line disciplines */
43#define N_TTY 0
44#define N_SLIP 1
45#define N_MOUSE 2
46#define N_PPP 3
47#define N_STRIP 4
48#define N_AX25 5
49#define N_X25 6 /* X.25 async */
50#define N_6PACK 7
51#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
52#define N_R3964 9 /* Reserved for Simatic R3964 module */
53#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
54#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */
55#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
56#define N_HDLC 13 /* synchronous HDLC */
57#define N_SYNC_PPP 14 /* synchronous PPP */
58#define N_HCI 15 /* Bluetooth HCI UART */
59
60#ifdef __KERNEL__ 42#ifdef __KERNEL__
61 43
62/* intr=^C quit=^\ erase=del kill=^U 44/* intr=^C quit=^\ erase=del kill=^U
diff --git a/include/asm-x86_64/bootsetup.h b/include/asm-x86_64/bootsetup.h
index b829f7b534be..7b1c3ad155fd 100644
--- a/include/asm-x86_64/bootsetup.h
+++ b/include/asm-x86_64/bootsetup.h
@@ -31,7 +31,7 @@ extern char x86_boot_params[BOOT_PARAM_SIZE];
31#define EDD_MBR_SIG_NR (*(unsigned char *) (PARAM+EDD_MBR_SIG_NR_BUF)) 31#define EDD_MBR_SIG_NR (*(unsigned char *) (PARAM+EDD_MBR_SIG_NR_BUF))
32#define EDD_MBR_SIGNATURE ((unsigned int *) (PARAM+EDD_MBR_SIG_BUF)) 32#define EDD_MBR_SIGNATURE ((unsigned int *) (PARAM+EDD_MBR_SIG_BUF))
33#define EDD_BUF ((struct edd_info *) (PARAM+EDDBUF)) 33#define EDD_BUF ((struct edd_info *) (PARAM+EDDBUF))
34#define COMMAND_LINE saved_command_line 34#define COMMAND_LINE boot_command_line
35 35
36#define RAMDISK_IMAGE_START_MASK 0x07FF 36#define RAMDISK_IMAGE_START_MASK 0x07FF
37#define RAMDISK_PROMPT_FLAG 0x8000 37#define RAMDISK_PROMPT_FLAG 0x8000
diff --git a/include/asm-x86_64/setup.h b/include/asm-x86_64/setup.h
index 985d4e3c79da..eaeff73d6c10 100644
--- a/include/asm-x86_64/setup.h
+++ b/include/asm-x86_64/setup.h
@@ -1,6 +1,6 @@
1#ifndef _x8664_SETUP_H 1#ifndef _x8664_SETUP_H
2#define _x8664_SETUP_H 2#define _x8664_SETUP_H
3 3
4#define COMMAND_LINE_SIZE 256 4#define COMMAND_LINE_SIZE 2048
5 5
6#endif 6#endif
diff --git a/include/asm-x86_64/termios.h b/include/asm-x86_64/termios.h
index 443b225537f0..35ee59b78329 100644
--- a/include/asm-x86_64/termios.h
+++ b/include/asm-x86_64/termios.h
@@ -39,24 +39,6 @@ struct termio {
39 39
40/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ 40/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
41 41
42/* line disciplines */
43#define N_TTY 0
44#define N_SLIP 1
45#define N_MOUSE 2
46#define N_PPP 3
47#define N_STRIP 4
48#define N_AX25 5
49#define N_X25 6 /* X.25 async */
50#define N_6PACK 7
51#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
52#define N_R3964 9 /* Reserved for Simatic R3964 module */
53#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
54#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */
55#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
56#define N_HDLC 13 /* synchronous HDLC */
57#define N_SYNC_PPP 14 /* synchronous PPP */
58#define N_HCI 15 /* Bluetooth HCI UART */
59
60#ifdef __KERNEL__ 42#ifdef __KERNEL__
61 43
62/* intr=^C quit=^\ erase=del kill=^U 44/* intr=^C quit=^\ erase=del kill=^U
diff --git a/include/asm-x86_64/uaccess.h b/include/asm-x86_64/uaccess.h
index c0eac519840b..8079e29c14fd 100644
--- a/include/asm-x86_64/uaccess.h
+++ b/include/asm-x86_64/uaccess.h
@@ -37,11 +37,11 @@
37 * Uhhuh, this needs 65-bit arithmetic. We have a carry.. 37 * Uhhuh, this needs 65-bit arithmetic. We have a carry..
38 */ 38 */
39#define __range_not_ok(addr,size) ({ \ 39#define __range_not_ok(addr,size) ({ \
40 unsigned long flag,sum; \ 40 unsigned long flag,roksum; \
41 __chk_user_ptr(addr); \ 41 __chk_user_ptr(addr); \
42 asm("# range_ok\n\r" \ 42 asm("# range_ok\n\r" \
43 "addq %3,%1 ; sbbq %0,%0 ; cmpq %1,%4 ; sbbq $0,%0" \ 43 "addq %3,%1 ; sbbq %0,%0 ; cmpq %1,%4 ; sbbq $0,%0" \
44 :"=&r" (flag), "=r" (sum) \ 44 :"=&r" (flag), "=r" (roksum) \
45 :"1" (addr),"g" ((long)(size)),"g" (current_thread_info()->addr_limit.seg)); \ 45 :"1" (addr),"g" ((long)(size)),"g" (current_thread_info()->addr_limit.seg)); \
46 flag; }) 46 flag; })
47 47
diff --git a/include/asm-xtensa/mman.h b/include/asm-xtensa/mman.h
index ba394cbb4807..9b92620c8a1e 100644
--- a/include/asm-xtensa/mman.h
+++ b/include/asm-xtensa/mman.h
@@ -79,7 +79,6 @@
79#define MADV_DOFORK 11 /* do inherit across fork */ 79#define MADV_DOFORK 11 /* do inherit across fork */
80 80
81/* compatibility flags */ 81/* compatibility flags */
82#define MAP_ANON MAP_ANONYMOUS
83#define MAP_FILE 0 82#define MAP_FILE 0
84 83
85#endif /* _XTENSA_MMAN_H */ 84#endif /* _XTENSA_MMAN_H */
diff --git a/include/asm-xtensa/termios.h b/include/asm-xtensa/termios.h
index 83c6aed1d115..f14b42c8dac0 100644
--- a/include/asm-xtensa/termios.h
+++ b/include/asm-xtensa/termios.h
@@ -52,25 +52,6 @@ struct termio {
52 52
53/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */ 53/* ioctl (fd, TIOCSERGETLSR, &result) where result may be as below */
54 54
55/* Line disciplines */
56
57#define N_TTY 0
58#define N_SLIP 1
59#define N_MOUSE 2
60#define N_PPP 3
61#define N_STRIP 4
62#define N_AX25 5
63#define N_X25 6 /* X.25 async */
64#define N_6PACK 7
65#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
66#define N_R3964 9 /* Reserved for Simatic R3964 module */
67#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
68#define N_IRDA 11 /* Linux IR - http://irda.sourceforge.net/ */
69#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data cards about SMS messages */
70#define N_HDLC 13 /* synchronous HDLC */
71#define N_SYNC_PPP 14
72#define N_HCI 15 /* Bluetooth HCI UART */
73
74#ifdef __KERNEL__ 55#ifdef __KERNEL__
75 56
76/* intr=^C quit=^\ erase=del kill=^U 57/* intr=^C quit=^\ erase=del kill=^U
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 683513e310de..e81e301a4d71 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -156,7 +156,6 @@ header-y += video_encoder.h
156header-y += videotext.h 156header-y += videotext.h
157header-y += vt.h 157header-y += vt.h
158header-y += wireless.h 158header-y += wireless.h
159header-y += xattr.h
160header-y += x25.h 159header-y += x25.h
161 160
162unifdef-y += acct.h 161unifdef-y += acct.h
@@ -324,6 +323,7 @@ unifdef-y += tty.h
324unifdef-y += types.h 323unifdef-y += types.h
325unifdef-y += udf_fs_i.h 324unifdef-y += udf_fs_i.h
326unifdef-y += udp.h 325unifdef-y += udp.h
326unifdef-y += ufs_fs.h
327unifdef-y += uinput.h 327unifdef-y += uinput.h
328unifdef-y += uio.h 328unifdef-y += uio.h
329unifdef-y += unistd.h 329unifdef-y += unistd.h
@@ -336,6 +336,7 @@ unifdef-y += wait.h
336unifdef-y += wanrouter.h 336unifdef-y += wanrouter.h
337unifdef-y += watchdog.h 337unifdef-y += watchdog.h
338unifdef-y += wireless.h 338unifdef-y += wireless.h
339unifdef-y += xattr.h
339unifdef-y += xfrm.h 340unifdef-y += xfrm.h
340 341
341objhdr-y += version.h 342objhdr-y += version.h
diff --git a/include/linux/ata.h b/include/linux/ata.h
index 1df941648a57..18e401ff7eaf 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -44,9 +44,9 @@ enum {
44 ATA_MAX_SECTORS_LBA48 = 65535,/* TODO: 65536? */ 44 ATA_MAX_SECTORS_LBA48 = 65535,/* TODO: 65536? */
45 45
46 ATA_ID_WORDS = 256, 46 ATA_ID_WORDS = 256,
47 ATA_ID_SERNO_OFS = 10, 47 ATA_ID_SERNO = 10,
48 ATA_ID_FW_REV_OFS = 23, 48 ATA_ID_FW_REV = 23,
49 ATA_ID_PROD_OFS = 27, 49 ATA_ID_PROD = 27,
50 ATA_ID_OLD_PIO_MODES = 51, 50 ATA_ID_OLD_PIO_MODES = 51,
51 ATA_ID_FIELD_VALID = 53, 51 ATA_ID_FIELD_VALID = 53,
52 ATA_ID_MWDMA_MODES = 63, 52 ATA_ID_MWDMA_MODES = 63,
@@ -58,8 +58,11 @@ enum {
58 ATA_ID_MAJOR_VER = 80, 58 ATA_ID_MAJOR_VER = 80,
59 ATA_ID_PIO4 = (1 << 1), 59 ATA_ID_PIO4 = (1 << 1),
60 60
61 ATA_ID_SERNO_LEN = 20,
62 ATA_ID_FW_REV_LEN = 8,
63 ATA_ID_PROD_LEN = 40,
64
61 ATA_PCI_CTL_OFS = 2, 65 ATA_PCI_CTL_OFS = 2,
62 ATA_SERNO_LEN = 20,
63 ATA_UDMA0 = (1 << 0), 66 ATA_UDMA0 = (1 << 0),
64 ATA_UDMA1 = ATA_UDMA0 | (1 << 1), 67 ATA_UDMA1 = ATA_UDMA0 | (1 << 1),
65 ATA_UDMA2 = ATA_UDMA1 | (1 << 2), 68 ATA_UDMA2 = ATA_UDMA1 | (1 << 2),
@@ -296,6 +299,8 @@ struct ata_taskfile {
296#define ata_id_queue_depth(id) (((id)[75] & 0x1f) + 1) 299#define ata_id_queue_depth(id) (((id)[75] & 0x1f) + 1)
297#define ata_id_removeable(id) ((id)[0] & (1 << 7)) 300#define ata_id_removeable(id) ((id)[0] & (1 << 7))
298#define ata_id_has_dword_io(id) ((id)[50] & (1 << 0)) 301#define ata_id_has_dword_io(id) ((id)[50] & (1 << 0))
302#define ata_id_iordy_disable(id) ((id)[49] & (1 << 10))
303#define ata_id_has_iordy(id) ((id)[49] & (1 << 9))
299#define ata_id_u32(id,n) \ 304#define ata_id_u32(id,n) \
300 (((u32) (id)[(n) + 1] << 16) | ((u32) (id)[(n)])) 305 (((u32) (id)[(n) + 1] << 16) | ((u32) (id)[(n)]))
301#define ata_id_u64(id,n) \ 306#define ata_id_u64(id,n) \
diff --git a/include/linux/atalk.h b/include/linux/atalk.h
index 75b8baca08f3..d12984ddaa9f 100644
--- a/include/linux/atalk.h
+++ b/include/linux/atalk.h
@@ -182,7 +182,7 @@ extern rwlock_t atalk_interfaces_lock;
182 182
183extern struct atalk_route atrtr_default; 183extern struct atalk_route atrtr_default;
184 184
185extern struct file_operations atalk_seq_arp_fops; 185extern const struct file_operations atalk_seq_arp_fops;
186 186
187extern int sysctl_aarp_expiry_time; 187extern int sysctl_aarp_expiry_time;
188extern int sysctl_aarp_tick_time; 188extern int sysctl_aarp_tick_time;
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 36a6eacefe20..83dcd8c0e974 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -82,7 +82,6 @@ struct cfq_io_context {
82 82
83 unsigned long last_end_request; 83 unsigned long last_end_request;
84 sector_t last_request_pos; 84 sector_t last_request_pos;
85 unsigned long last_queue;
86 85
87 unsigned long ttime_total; 86 unsigned long ttime_total;
88 unsigned long ttime_samples; 87 unsigned long ttime_samples;
diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h
index 5d9fb0e94156..dd27b1c7227f 100644
--- a/include/linux/buffer_head.h
+++ b/include/linux/buffer_head.h
@@ -34,6 +34,7 @@ enum bh_state_bits {
34 BH_Write_EIO, /* I/O error on write */ 34 BH_Write_EIO, /* I/O error on write */
35 BH_Ordered, /* ordered write */ 35 BH_Ordered, /* ordered write */
36 BH_Eopnotsupp, /* operation not supported (barrier) */ 36 BH_Eopnotsupp, /* operation not supported (barrier) */
37 BH_Unwritten, /* Buffer is allocated on disk but not written */
37 38
38 BH_PrivateStart,/* not a state bit, but the first bit available 39 BH_PrivateStart,/* not a state bit, but the first bit available
39 * for private allocation by other entities 40 * for private allocation by other entities
@@ -126,6 +127,7 @@ BUFFER_FNS(Boundary, boundary)
126BUFFER_FNS(Write_EIO, write_io_error) 127BUFFER_FNS(Write_EIO, write_io_error)
127BUFFER_FNS(Ordered, ordered) 128BUFFER_FNS(Ordered, ordered)
128BUFFER_FNS(Eopnotsupp, eopnotsupp) 129BUFFER_FNS(Eopnotsupp, eopnotsupp)
130BUFFER_FNS(Unwritten, unwritten)
129 131
130#define bh_offset(bh) ((unsigned long)(bh)->b_data & ~PAGE_MASK) 132#define bh_offset(bh) ((unsigned long)(bh)->b_data & ~PAGE_MASK)
131#define touch_buffer(bh) mark_page_accessed(bh->b_page) 133#define touch_buffer(bh) mark_page_accessed(bh->b_page)
@@ -172,12 +174,14 @@ struct super_block *freeze_bdev(struct block_device *);
172void thaw_bdev(struct block_device *, struct super_block *); 174void thaw_bdev(struct block_device *, struct super_block *);
173int fsync_super(struct super_block *); 175int fsync_super(struct super_block *);
174int fsync_no_super(struct block_device *); 176int fsync_no_super(struct block_device *);
175struct buffer_head *__find_get_block(struct block_device *, sector_t, int); 177struct buffer_head *__find_get_block(struct block_device *bdev, sector_t block,
176struct buffer_head * __getblk(struct block_device *, sector_t, int); 178 unsigned size);
179struct buffer_head *__getblk(struct block_device *bdev, sector_t block,
180 unsigned size);
177void __brelse(struct buffer_head *); 181void __brelse(struct buffer_head *);
178void __bforget(struct buffer_head *); 182void __bforget(struct buffer_head *);
179void __breadahead(struct block_device *, sector_t block, int size); 183void __breadahead(struct block_device *, sector_t block, unsigned int size);
180struct buffer_head *__bread(struct block_device *, sector_t block, int size); 184struct buffer_head *__bread(struct block_device *, sector_t block, unsigned size);
181struct buffer_head *alloc_buffer_head(gfp_t gfp_flags); 185struct buffer_head *alloc_buffer_head(gfp_t gfp_flags);
182void free_buffer_head(struct buffer_head * bh); 186void free_buffer_head(struct buffer_head * bh);
183void FASTCALL(unlock_buffer(struct buffer_head *bh)); 187void FASTCALL(unlock_buffer(struct buffer_head *bh));
diff --git a/include/linux/byteorder/Kbuild b/include/linux/byteorder/Kbuild
index 56499ab9e32e..79bedddfd9ca 100644
--- a/include/linux/byteorder/Kbuild
+++ b/include/linux/byteorder/Kbuild
@@ -1,7 +1,5 @@
1header-y += big_endian.h 1header-y += big_endian.h
2header-y += little_endian.h 2header-y += little_endian.h
3header-y += pdp_endian.h
4 3
5unifdef-y += generic.h 4unifdef-y += generic.h
6unifdef-y += swabb.h
7unifdef-y += swab.h 5unifdef-y += swab.h
diff --git a/include/linux/byteorder/pdp_endian.h b/include/linux/byteorder/pdp_endian.h
deleted file mode 100644
index 618631cbc6e3..000000000000
--- a/include/linux/byteorder/pdp_endian.h
+++ /dev/null
@@ -1,88 +0,0 @@
1#ifndef _LINUX_BYTEORDER_PDP_ENDIAN_H
2#define _LINUX_BYTEORDER_PDP_ENDIAN_H
3
4/*
5 * Could have been named NUXI-endian, but we use the same name as in glibc.
6 * hopefully only the PDP and its evolutions (old VAXen in compatibility mode)
7 * should ever use this braindead byteorder.
8 * This file *should* work, but has not been tested.
9 *
10 * little-endian is 1234; big-endian is 4321; nuxi/pdp-endian is 3412
11 *
12 * I thought vaxen were NUXI-endian, but was told they were correct-endian
13 * (little-endian), though indeed there existed NUXI-endian machines
14 * (DEC PDP-11 and old VAXen in compatibility mode).
15 * This makes this file a bit useless, but as a proof-of-concept.
16 *
17 * But what does a __u64 look like: is it 34127856 or 78563412 ???
18 * I don't dare imagine! Hence, no 64-bit byteorder support yet.
19 * Hopefully, there 64-bit pdp-endian support shouldn't ever be required.
20 *
21 */
22
23#ifndef __PDP_ENDIAN
24#define __PDP_ENDIAN 3412
25#endif
26#ifndef __PDP_ENDIAN_BITFIELD
27#define __PDP_ENDIAN_BITFIELD
28#endif
29
30#include <linux/byteorder/swab.h>
31#include <linux/byteorder/swabb.h>
32
33#define __constant_htonl(x) ___constant_swahb32((x))
34#define __constant_ntohl(x) ___constant_swahb32((x))
35#define __constant_htons(x) ___constant_swab16((x))
36#define __constant_ntohs(x) ___constant_swab16((x))
37#define __constant_cpu_to_le64(x) I DON'T KNOW
38#define __constant_le64_to_cpu(x) I DON'T KNOW
39#define __constant_cpu_to_le32(x) ___constant_swahw32((x))
40#define __constant_le32_to_cpu(x) ___constant_swahw32((x))
41#define __constant_cpu_to_le16(x) ((__u16)(x)
42#define __constant_le16_to_cpu(x) ((__u16)(x)
43#define __constant_cpu_to_be64(x) I DON'T KNOW
44#define __constant_be64_to_cpu(x) I DON'T KNOW
45#define __constant_cpu_to_be32(x) ___constant_swahb32((x))
46#define __constant_be32_to_cpu(x) ___constant_swahb32((x))
47#define __constant_cpu_to_be16(x) ___constant_swab16((x))
48#define __constant_be16_to_cpu(x) ___constant_swab16((x))
49#define __cpu_to_le64(x) I DON'T KNOW
50#define __le64_to_cpu(x) I DON'T KNOW
51#define __cpu_to_le32(x) ___swahw32((x))
52#define __le32_to_cpu(x) ___swahw32((x))
53#define __cpu_to_le16(x) ((__u16)(x)
54#define __le16_to_cpu(x) ((__u16)(x)
55#define __cpu_to_be64(x) I DON'T KNOW
56#define __be64_to_cpu(x) I DON'T KNOW
57#define __cpu_to_be32(x) __swahb32((x))
58#define __be32_to_cpu(x) __swahb32((x))
59#define __cpu_to_be16(x) __swab16((x))
60#define __be16_to_cpu(x) __swab16((x))
61#define __cpu_to_le64p(x) I DON'T KNOW
62#define __le64_to_cpup(x) I DON'T KNOW
63#define __cpu_to_le32p(x) ___swahw32p((x))
64#define __le32_to_cpup(x) ___swahw32p((x))
65#define __cpu_to_le16p(x) (*(__u16*)(x))
66#define __le16_to_cpup(x) (*(__u16*)(x))
67#define __cpu_to_be64p(x) I DON'T KNOW
68#define __be64_to_cpup(x) I DON'T KNOW
69#define __cpu_to_be32p(x) __swahb32p((x))
70#define __be32_to_cpup(x) __swahb32p((x))
71#define __cpu_to_be16p(x) __swab16p((x))
72#define __be16_to_cpup(x) __swab16p((x))
73#define __cpu_to_le64s(x) I DON'T KNOW
74#define __le64_to_cpus(x) I DON'T KNOW
75#define __cpu_to_le32s(x) ___swahw32s((x))
76#define __le32_to_cpus(x) ___swahw32s((x))
77#define __cpu_to_le16s(x) do {} while (0)
78#define __le16_to_cpus(x) do {} while (0)
79#define __cpu_to_be64s(x) I DON'T KNOW
80#define __be64_to_cpus(x) I DON'T KNOW
81#define __cpu_to_be32s(x) __swahb32s((x))
82#define __be32_to_cpus(x) __swahb32s((x))
83#define __cpu_to_be16s(x) __swab16s((x))
84#define __be16_to_cpus(x) __swab16s((x))
85
86#include <linux/byteorder/generic.h>
87
88#endif /* _LINUX_BYTEORDER_PDP_ENDIAN_H */
diff --git a/include/linux/byteorder/swabb.h b/include/linux/byteorder/swabb.h
index ae5e5f914bf4..8c780c7d779e 100644
--- a/include/linux/byteorder/swabb.h
+++ b/include/linux/byteorder/swabb.h
@@ -25,6 +25,8 @@
25 * 25 *
26 */ 26 */
27 27
28#include <linux/types.h>
29
28#define ___swahw32(x) \ 30#define ___swahw32(x) \
29({ \ 31({ \
30 __u32 __x = (x); \ 32 __u32 __x = (x); \
@@ -77,19 +79,14 @@
77/* 79/*
78 * Allow constant folding 80 * Allow constant folding
79 */ 81 */
80#if defined(__GNUC__) && defined(__OPTIMIZE__) 82#define __swahw32(x) \
81# define __swahw32(x) \
82(__builtin_constant_p((__u32)(x)) ? \ 83(__builtin_constant_p((__u32)(x)) ? \
83 ___swahw32((x)) : \ 84 ___swahw32((x)) : \
84 __fswahw32((x))) 85 __fswahw32((x)))
85# define __swahb32(x) \ 86#define __swahb32(x) \
86(__builtin_constant_p((__u32)(x)) ? \ 87(__builtin_constant_p((__u32)(x)) ? \
87 ___swahb32((x)) : \ 88 ___swahb32((x)) : \
88 __fswahb32((x))) 89 __fswahb32((x)))
89#else
90# define __swahw32(x) __fswahw32(x)
91# define __swahb32(x) __fswahb32(x)
92#endif /* OPTIMIZE */
93 90
94 91
95static inline __u32 __fswahw32(__u32 x) 92static inline __u32 __fswahw32(__u32 x)
@@ -128,13 +125,11 @@ static inline void __swahb32s(__u32 *addr)
128 */ 125 */
129#endif /* __BYTEORDER_HAS_U64__ */ 126#endif /* __BYTEORDER_HAS_U64__ */
130 127
131#if defined(__KERNEL__)
132#define swahw32 __swahw32 128#define swahw32 __swahw32
133#define swahb32 __swahb32 129#define swahb32 __swahb32
134#define swahw32p __swahw32p 130#define swahw32p __swahw32p
135#define swahb32p __swahb32p 131#define swahb32p __swahb32p
136#define swahw32s __swahw32s 132#define swahw32s __swahw32s
137#define swahb32s __swahb32s 133#define swahb32s __swahb32s
138#endif
139 134
140#endif /* _LINUX_BYTEORDER_SWABB_H */ 135#endif /* _LINUX_BYTEORDER_SWABB_H */
diff --git a/include/linux/cfag12864b.h b/include/linux/cfag12864b.h
new file mode 100644
index 000000000000..0bc45e69da5a
--- /dev/null
+++ b/include/linux/cfag12864b.h
@@ -0,0 +1,77 @@
1/*
2 * Filename: cfag12864b.h
3 * Version: 0.1.0
4 * Description: cfag12864b LCD driver header
5 * License: GPLv2
6 *
7 * Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com>
8 * Date: 2006-10-12
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 version 2 as
12 * published by the Free Software Foundation.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 */
24
25#ifndef _CFAG12864B_H_
26#define _CFAG12864B_H_
27
28#define CFAG12864B_WIDTH (128)
29#define CFAG12864B_HEIGHT (64)
30#define CFAG12864B_CONTROLLERS (2)
31#define CFAG12864B_PAGES (8)
32#define CFAG12864B_ADDRESSES (64)
33#define CFAG12864B_SIZE ((CFAG12864B_CONTROLLERS) * \
34 (CFAG12864B_PAGES) * \
35 (CFAG12864B_ADDRESSES))
36
37/*
38 * The driver will blit this buffer to the LCD
39 *
40 * Its size is CFAG12864B_SIZE.
41 */
42extern unsigned char * cfag12864b_buffer;
43
44/*
45 * Get the refresh rate of the LCD
46 *
47 * Returns the refresh rate (hertzs).
48 */
49extern unsigned int cfag12864b_getrate(void);
50
51/*
52 * Enable refreshing
53 *
54 * Returns 0 if successful (anyone was using it),
55 * or != 0 if failed (someone is using it).
56 */
57extern unsigned char cfag12864b_enable(void);
58
59/*
60 * Disable refreshing
61 *
62 * You should call this only when you finish using the LCD.
63 */
64extern void cfag12864b_disable(void);
65
66/*
67 * Is enabled refreshing? (is anyone using the module?)
68 *
69 * Returns 0 if refreshing is not enabled (anyone is using it),
70 * or != 0 if refreshing is enabled (someone is using it).
71 *
72 * Useful for buffer read-only modules.
73 */
74extern unsigned char cfag12864b_isenabled(void);
75
76#endif /* _CFAG12864B_H_ */
77
diff --git a/include/linux/coda_linux.h b/include/linux/coda_linux.h
index 4c2632a8d31b..e4ac016ad272 100644
--- a/include/linux/coda_linux.h
+++ b/include/linux/coda_linux.h
@@ -23,9 +23,9 @@
23#include <linux/coda_fs_i.h> 23#include <linux/coda_fs_i.h>
24 24
25/* operations */ 25/* operations */
26extern struct inode_operations coda_dir_inode_operations; 26extern const struct inode_operations coda_dir_inode_operations;
27extern struct inode_operations coda_file_inode_operations; 27extern const struct inode_operations coda_file_inode_operations;
28extern struct inode_operations coda_ioctl_inode_operations; 28extern const struct inode_operations coda_ioctl_inode_operations;
29 29
30extern const struct address_space_operations coda_file_aops; 30extern const struct address_space_operations coda_file_aops;
31extern const struct address_space_operations coda_symlink_aops; 31extern const struct address_space_operations coda_symlink_aops;
diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index 6e1c44a935d4..9008eabb9c3d 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -27,6 +27,13 @@
27#define __inline__ __inline__ __attribute__((always_inline)) 27#define __inline__ __inline__ __attribute__((always_inline))
28#define __inline __inline __attribute__((always_inline)) 28#define __inline __inline __attribute__((always_inline))
29#define __deprecated __attribute__((deprecated)) 29#define __deprecated __attribute__((deprecated))
30#define __packed __attribute__((packed))
31#define __weak __attribute__((weak))
32#define __naked __attribute__((naked))
33#define __noreturn __attribute__((noreturn))
34#define __pure __attribute__((pure))
35#define __aligned(x) __attribute__((aligned(x)))
36#define __printf(a,b) __attribute__((format(printf,a,b)))
30#define noinline __attribute__((noinline)) 37#define noinline __attribute__((noinline))
31#define __attribute_pure__ __attribute__((pure)) 38#define __attribute_pure__ __attribute__((pure))
32#define __attribute_const__ __attribute__((__const__)) 39#define __attribute_const__ __attribute__((__const__))
diff --git a/include/linux/console.h b/include/linux/console.h
index 7d0420274de0..de25ee3b7919 100644
--- a/include/linux/console.h
+++ b/include/linux/console.h
@@ -21,6 +21,7 @@ struct vc_data;
21struct console_font_op; 21struct console_font_op;
22struct console_font; 22struct console_font;
23struct module; 23struct module;
24struct tty_struct;
24 25
25/* 26/*
26 * this is what the terminal answers to a ESC-Z or csi0c query. 27 * this is what the terminal answers to a ESC-Z or csi0c query.
@@ -132,6 +133,9 @@ static inline void resume_console(void) {}
132int mda_console_init(void); 133int mda_console_init(void);
133void prom_con_init(void); 134void prom_con_init(void);
134 135
136void vcs_make_sysfs(struct tty_struct *tty);
137void vcs_remove_sysfs(struct tty_struct *tty);
138
135/* Some debug stub to catch some of the obvious races in the VT code */ 139/* Some debug stub to catch some of the obvious races in the VT code */
136#if 1 140#if 1
137#define WARN_CONSOLE_UNLOCKED() WARN_ON(!is_console_locked() && !oops_in_progress) 141#define WARN_CONSOLE_UNLOCKED() WARN_ON(!is_console_locked() && !oops_in_progress)
diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h
index ed6c0fee1ac7..a86162b26c0d 100644
--- a/include/linux/console_struct.h
+++ b/include/linux/console_struct.h
@@ -11,6 +11,7 @@
11 11
12#include <linux/wait.h> 12#include <linux/wait.h>
13#include <linux/vt.h> 13#include <linux/vt.h>
14#include <linux/workqueue.h>
14 15
15struct vt_struct; 16struct vt_struct;
16 17
@@ -103,6 +104,7 @@ struct vc_data {
103 104
104struct vc { 105struct vc {
105 struct vc_data *d; 106 struct vc_data *d;
107 struct work_struct SAK_work;
106 108
107 /* might add scrmem, vt_struct, kbd at some time, 109 /* might add scrmem, vt_struct, kbd at some time,
108 to have everything in one place - the disadvantage 110 to have everything in one place - the disadvantage
@@ -110,6 +112,7 @@ struct vc {
110}; 112};
111 113
112extern struct vc vc_cons [MAX_NR_CONSOLES]; 114extern struct vc vc_cons [MAX_NR_CONSOLES];
115extern void vc_SAK(struct work_struct *work);
113 116
114#define CUR_DEF 0 117#define CUR_DEF 0
115#define CUR_NONE 1 118#define CUR_NONE 1
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index bfb520212d71..769ddc6df492 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -49,10 +49,20 @@ struct notifier_block;
49 49
50#ifdef CONFIG_SMP 50#ifdef CONFIG_SMP
51/* Need to know about CPUs going up/down? */ 51/* Need to know about CPUs going up/down? */
52extern int register_cpu_notifier(struct notifier_block *nb);
53#ifdef CONFIG_HOTPLUG_CPU 52#ifdef CONFIG_HOTPLUG_CPU
53extern int register_cpu_notifier(struct notifier_block *nb);
54extern void unregister_cpu_notifier(struct notifier_block *nb); 54extern void unregister_cpu_notifier(struct notifier_block *nb);
55#else 55#else
56
57#ifndef MODULE
58extern int register_cpu_notifier(struct notifier_block *nb);
59#else
60static inline int register_cpu_notifier(struct notifier_block *nb)
61{
62 return 0;
63}
64#endif
65
56static inline void unregister_cpu_notifier(struct notifier_block *nb) 66static inline void unregister_cpu_notifier(struct notifier_block *nb)
57{ 67{
58} 68}
diff --git a/include/linux/cpuset.h b/include/linux/cpuset.h
index fd404416f31c..826b15e914e2 100644
--- a/include/linux/cpuset.h
+++ b/include/linux/cpuset.h
@@ -55,7 +55,7 @@ extern int cpuset_excl_nodes_overlap(const struct task_struct *p);
55extern int cpuset_memory_pressure_enabled; 55extern int cpuset_memory_pressure_enabled;
56extern void __cpuset_memory_pressure_bump(void); 56extern void __cpuset_memory_pressure_bump(void);
57 57
58extern struct file_operations proc_cpuset_operations; 58extern const struct file_operations proc_cpuset_operations;
59extern char *cpuset_task_status_allowed(struct task_struct *task, char *buffer); 59extern char *cpuset_task_status_allowed(struct task_struct *task, char *buffer);
60 60
61extern void cpuset_lock(void); 61extern void cpuset_lock(void);
diff --git a/include/linux/device.h b/include/linux/device.h
index 5ca1cdba563a..26e4692f2d1a 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -354,6 +354,41 @@ extern int __must_check device_create_bin_file(struct device *dev,
354 struct bin_attribute *attr); 354 struct bin_attribute *attr);
355extern void device_remove_bin_file(struct device *dev, 355extern void device_remove_bin_file(struct device *dev,
356 struct bin_attribute *attr); 356 struct bin_attribute *attr);
357
358/* device resource management */
359typedef void (*dr_release_t)(struct device *dev, void *res);
360typedef int (*dr_match_t)(struct device *dev, void *res, void *match_data);
361
362#ifdef CONFIG_DEBUG_DEVRES
363extern void * __devres_alloc(dr_release_t release, size_t size, gfp_t gfp,
364 const char *name);
365#define devres_alloc(release, size, gfp) \
366 __devres_alloc(release, size, gfp, #release)
367#else
368extern void * devres_alloc(dr_release_t release, size_t size, gfp_t gfp);
369#endif
370extern void devres_free(void *res);
371extern void devres_add(struct device *dev, void *res);
372extern void * devres_find(struct device *dev, dr_release_t release,
373 dr_match_t match, void *match_data);
374extern void * devres_get(struct device *dev, void *new_res,
375 dr_match_t match, void *match_data);
376extern void * devres_remove(struct device *dev, dr_release_t release,
377 dr_match_t match, void *match_data);
378extern int devres_destroy(struct device *dev, dr_release_t release,
379 dr_match_t match, void *match_data);
380
381/* devres group */
382extern void * __must_check devres_open_group(struct device *dev, void *id,
383 gfp_t gfp);
384extern void devres_close_group(struct device *dev, void *id);
385extern void devres_remove_group(struct device *dev, void *id);
386extern int devres_release_group(struct device *dev, void *id);
387
388/* managed kzalloc/kfree for device drivers, no kmalloc, always use kzalloc */
389extern void *devm_kzalloc(struct device *dev, size_t size, gfp_t gfp);
390extern void devm_kfree(struct device *dev, void *p);
391
357struct device { 392struct device {
358 struct klist klist_children; 393 struct klist klist_children;
359 struct klist_node knode_parent; /* node in sibling list */ 394 struct klist_node knode_parent; /* node in sibling list */
@@ -397,6 +432,9 @@ struct device {
397 /* arch specific additions */ 432 /* arch specific additions */
398 struct dev_archdata archdata; 433 struct dev_archdata archdata;
399 434
435 spinlock_t devres_lock;
436 struct list_head devres_head;
437
400 /* class_device migration path */ 438 /* class_device migration path */
401 struct list_head node; 439 struct list_head node;
402 struct class *class; 440 struct class *class;
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index ff203c465fed..9a663c6db16a 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -66,6 +66,33 @@ dma_mark_declared_memory_occupied(struct device *dev,
66} 66}
67#endif 67#endif
68 68
69#endif 69/*
70 * Managed DMA API
71 */
72extern void *dmam_alloc_coherent(struct device *dev, size_t size,
73 dma_addr_t *dma_handle, gfp_t gfp);
74extern void dmam_free_coherent(struct device *dev, size_t size, void *vaddr,
75 dma_addr_t dma_handle);
76extern void *dmam_alloc_noncoherent(struct device *dev, size_t size,
77 dma_addr_t *dma_handle, gfp_t gfp);
78extern void dmam_free_noncoherent(struct device *dev, size_t size, void *vaddr,
79 dma_addr_t dma_handle);
80#ifdef ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY
81extern int dmam_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr,
82 dma_addr_t device_addr, size_t size,
83 int flags);
84extern void dmam_release_declared_memory(struct device *dev);
85#else /* ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY */
86static inline int dmam_declare_coherent_memory(struct device *dev,
87 dma_addr_t bus_addr, dma_addr_t device_addr,
88 size_t size, gfp_t gfp)
89{
90 return 0;
91}
70 92
93static inline void dmam_release_declared_memory(struct device *dev)
94{
95}
96#endif /* ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY */
71 97
98#endif
diff --git a/include/linux/dmapool.h b/include/linux/dmapool.h
index 76f12f46db7f..022e34fcbd1b 100644
--- a/include/linux/dmapool.h
+++ b/include/linux/dmapool.h
@@ -24,5 +24,12 @@ void *dma_pool_alloc(struct dma_pool *pool, gfp_t mem_flags,
24 24
25void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t addr); 25void dma_pool_free(struct dma_pool *pool, void *vaddr, dma_addr_t addr);
26 26
27/*
28 * Managed DMA pool
29 */
30struct dma_pool *dmam_pool_create(const char *name, struct device *dev,
31 size_t size, size_t align, size_t allocation);
32void dmam_pool_destroy(struct dma_pool *pool);
33
27#endif 34#endif
28 35
diff --git a/include/linux/dn.h b/include/linux/dn.h
index 10b6a6fd5837..02bba040fcfb 100644
--- a/include/linux/dn.h
+++ b/include/linux/dn.h
@@ -113,7 +113,7 @@ struct accessdata_dn
113 * DECnet logical link information structure 113 * DECnet logical link information structure
114 */ 114 */
115struct linkinfo_dn { 115struct linkinfo_dn {
116 __le16 idn_segsize; /* Segment size for link */ 116 __u16 idn_segsize; /* Segment size for link */
117 __u8 idn_linkstate; /* Logical link state */ 117 __u8 idn_linkstate; /* Logical link state */
118}; 118};
119 119
diff --git a/include/linux/efs_fs.h b/include/linux/efs_fs.h
index 278ef4495819..dfed8009ebff 100644
--- a/include/linux/efs_fs.h
+++ b/include/linux/efs_fs.h
@@ -36,7 +36,7 @@ static inline struct efs_sb_info *SUPER_INFO(struct super_block *sb)
36 36
37struct statfs; 37struct statfs;
38 38
39extern struct inode_operations efs_dir_inode_operations; 39extern const struct inode_operations efs_dir_inode_operations;
40extern const struct file_operations efs_dir_operations; 40extern const struct file_operations efs_dir_operations;
41extern const struct address_space_operations efs_symlink_aops; 41extern const struct address_space_operations efs_symlink_aops;
42 42
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h
index 11cca1bdc0c7..4eb18ac510ae 100644
--- a/include/linux/ext3_fs.h
+++ b/include/linux/ext3_fs.h
@@ -868,16 +868,16 @@ do { \
868extern const struct file_operations ext3_dir_operations; 868extern const struct file_operations ext3_dir_operations;
869 869
870/* file.c */ 870/* file.c */
871extern struct inode_operations ext3_file_inode_operations; 871extern const struct inode_operations ext3_file_inode_operations;
872extern const struct file_operations ext3_file_operations; 872extern const struct file_operations ext3_file_operations;
873 873
874/* namei.c */ 874/* namei.c */
875extern struct inode_operations ext3_dir_inode_operations; 875extern const struct inode_operations ext3_dir_inode_operations;
876extern struct inode_operations ext3_special_inode_operations; 876extern const struct inode_operations ext3_special_inode_operations;
877 877
878/* symlink.c */ 878/* symlink.c */
879extern struct inode_operations ext3_symlink_inode_operations; 879extern const struct inode_operations ext3_symlink_inode_operations;
880extern struct inode_operations ext3_fast_symlink_inode_operations; 880extern const struct inode_operations ext3_fast_symlink_inode_operations;
881 881
882 882
883#endif /* __KERNEL__ */ 883#endif /* __KERNEL__ */
diff --git a/include/linux/ext4_fs.h b/include/linux/ext4_fs.h
index 498503ee613d..54c576d414c3 100644
--- a/include/linux/ext4_fs.h
+++ b/include/linux/ext4_fs.h
@@ -955,16 +955,16 @@ do { \
955extern const struct file_operations ext4_dir_operations; 955extern const struct file_operations ext4_dir_operations;
956 956
957/* file.c */ 957/* file.c */
958extern struct inode_operations ext4_file_inode_operations; 958extern const struct inode_operations ext4_file_inode_operations;
959extern const struct file_operations ext4_file_operations; 959extern const struct file_operations ext4_file_operations;
960 960
961/* namei.c */ 961/* namei.c */
962extern struct inode_operations ext4_dir_inode_operations; 962extern const struct inode_operations ext4_dir_inode_operations;
963extern struct inode_operations ext4_special_inode_operations; 963extern const struct inode_operations ext4_special_inode_operations;
964 964
965/* symlink.c */ 965/* symlink.c */
966extern struct inode_operations ext4_symlink_inode_operations; 966extern const struct inode_operations ext4_symlink_inode_operations;
967extern struct inode_operations ext4_fast_symlink_inode_operations; 967extern const struct inode_operations ext4_fast_symlink_inode_operations;
968 968
969/* extents.c */ 969/* extents.c */
970extern int ext4_ext_tree_init(handle_t *handle, struct inode *); 970extern int ext4_ext_tree_init(handle_t *handle, struct inode *);
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 64177ec9a019..a78e25683f82 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -49,6 +49,13 @@
49#define FB_AUX_TEXT_S3_MMIO 2 /* S3 MMIO fasttext */ 49#define FB_AUX_TEXT_S3_MMIO 2 /* S3 MMIO fasttext */
50#define FB_AUX_TEXT_MGA_STEP16 3 /* MGA Millenium I: text, attr, 14 reserved bytes */ 50#define FB_AUX_TEXT_MGA_STEP16 3 /* MGA Millenium I: text, attr, 14 reserved bytes */
51#define FB_AUX_TEXT_MGA_STEP8 4 /* other MGAs: text, attr, 6 reserved bytes */ 51#define FB_AUX_TEXT_MGA_STEP8 4 /* other MGAs: text, attr, 6 reserved bytes */
52#define FB_AUX_TEXT_SVGA_GROUP 8 /* 8-15: SVGA tileblit compatible modes */
53#define FB_AUX_TEXT_SVGA_MASK 7 /* lower three bits says step */
54#define FB_AUX_TEXT_SVGA_STEP2 8 /* SVGA text mode: text, attr */
55#define FB_AUX_TEXT_SVGA_STEP4 9 /* SVGA text mode: text, attr, 2 reserved bytes */
56#define FB_AUX_TEXT_SVGA_STEP8 10 /* SVGA text mode: text, attr, 6 reserved bytes */
57#define FB_AUX_TEXT_SVGA_STEP16 11 /* SVGA text mode: text, attr, 14 reserved bytes */
58#define FB_AUX_TEXT_SVGA_LAST 15 /* reserved up to 15 */
52 59
53#define FB_AUX_VGA_PLANES_VGA4 0 /* 16 color planes (EGA/VGA) */ 60#define FB_AUX_VGA_PLANES_VGA4 0 /* 16 color planes (EGA/VGA) */
54#define FB_AUX_VGA_PLANES_CFB4 1 /* CFB4 in planes (VGA) */ 61#define FB_AUX_VGA_PLANES_CFB4 1 /* CFB4 in planes (VGA) */
@@ -945,25 +952,26 @@ extern unsigned char *fb_ddc_read(struct i2c_adapter *adapter);
945/* drivers/video/modedb.c */ 952/* drivers/video/modedb.c */
946#define VESA_MODEDB_SIZE 34 953#define VESA_MODEDB_SIZE 34
947extern void fb_var_to_videomode(struct fb_videomode *mode, 954extern void fb_var_to_videomode(struct fb_videomode *mode,
948 struct fb_var_screeninfo *var); 955 const struct fb_var_screeninfo *var);
949extern void fb_videomode_to_var(struct fb_var_screeninfo *var, 956extern void fb_videomode_to_var(struct fb_var_screeninfo *var,
950 struct fb_videomode *mode); 957 const struct fb_videomode *mode);
951extern int fb_mode_is_equal(struct fb_videomode *mode1, 958extern int fb_mode_is_equal(const struct fb_videomode *mode1,
952 struct fb_videomode *mode2); 959 const struct fb_videomode *mode2);
953extern int fb_add_videomode(struct fb_videomode *mode, struct list_head *head); 960extern int fb_add_videomode(const struct fb_videomode *mode,
954extern void fb_delete_videomode(struct fb_videomode *mode, 961 struct list_head *head);
962extern void fb_delete_videomode(const struct fb_videomode *mode,
955 struct list_head *head); 963 struct list_head *head);
956extern struct fb_videomode *fb_match_mode(struct fb_var_screeninfo *var, 964extern const struct fb_videomode *fb_match_mode(const struct fb_var_screeninfo *var,
957 struct list_head *head); 965 struct list_head *head);
958extern struct fb_videomode *fb_find_best_mode(struct fb_var_screeninfo *var, 966extern const struct fb_videomode *fb_find_best_mode(const struct fb_var_screeninfo *var,
959 struct list_head *head); 967 struct list_head *head);
960extern struct fb_videomode *fb_find_nearest_mode(struct fb_videomode *mode, 968extern const struct fb_videomode *fb_find_nearest_mode(const struct fb_videomode *mode,
961 struct list_head *head); 969 struct list_head *head);
962extern void fb_destroy_modelist(struct list_head *head); 970extern void fb_destroy_modelist(struct list_head *head);
963extern void fb_videomode_to_modelist(struct fb_videomode *modedb, int num, 971extern void fb_videomode_to_modelist(const struct fb_videomode *modedb, int num,
964 struct list_head *head); 972 struct list_head *head);
965extern struct fb_videomode *fb_find_best_display(struct fb_monspecs *specs, 973extern const struct fb_videomode *fb_find_best_display(const struct fb_monspecs *specs,
966 struct list_head *head); 974 struct list_head *head);
967 975
968/* drivers/video/fbcmap.c */ 976/* drivers/video/fbcmap.c */
969extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp); 977extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp);
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 1410e5330c8d..86ec3f4a7da6 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -169,6 +169,7 @@ extern int dir_notify_enable;
169#define IS_DIRSYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS|MS_DIRSYNC) || \ 169#define IS_DIRSYNC(inode) (__IS_FLG(inode, MS_SYNCHRONOUS|MS_DIRSYNC) || \
170 ((inode)->i_flags & (S_SYNC|S_DIRSYNC))) 170 ((inode)->i_flags & (S_SYNC|S_DIRSYNC)))
171#define IS_MANDLOCK(inode) __IS_FLG(inode, MS_MANDLOCK) 171#define IS_MANDLOCK(inode) __IS_FLG(inode, MS_MANDLOCK)
172#define IS_NOATIME(inode) __IS_FLG(inode, MS_RDONLY|MS_NOATIME)
172 173
173#define IS_NOQUOTA(inode) ((inode)->i_flags & S_NOQUOTA) 174#define IS_NOQUOTA(inode) ((inode)->i_flags & S_NOQUOTA)
174#define IS_APPEND(inode) ((inode)->i_flags & S_APPEND) 175#define IS_APPEND(inode) ((inode)->i_flags & S_APPEND)
@@ -550,7 +551,7 @@ struct inode {
550 spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */ 551 spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_size */
551 struct mutex i_mutex; 552 struct mutex i_mutex;
552 struct rw_semaphore i_alloc_sem; 553 struct rw_semaphore i_alloc_sem;
553 struct inode_operations *i_op; 554 const struct inode_operations *i_op;
554 const struct file_operations *i_fop; /* former ->i_op->default_file_ops */ 555 const struct file_operations *i_fop; /* former ->i_op->default_file_ops */
555 struct super_block *i_sb; 556 struct super_block *i_sb;
556 struct file_lock *i_flock; 557 struct file_lock *i_flock;
@@ -906,7 +907,7 @@ struct super_block {
906 unsigned char s_dirt; 907 unsigned char s_dirt;
907 unsigned long long s_maxbytes; /* Max file size */ 908 unsigned long long s_maxbytes; /* Max file size */
908 struct file_system_type *s_type; 909 struct file_system_type *s_type;
909 struct super_operations *s_op; 910 const struct super_operations *s_op;
910 struct dquot_operations *dq_op; 911 struct dquot_operations *dq_op;
911 struct quotactl_ops *s_qcop; 912 struct quotactl_ops *s_qcop;
912 struct export_operations *s_export_op; 913 struct export_operations *s_export_op;
@@ -1382,7 +1383,7 @@ struct super_block *sget(struct file_system_type *type,
1382 int (*set)(struct super_block *,void *), 1383 int (*set)(struct super_block *,void *),
1383 void *data); 1384 void *data);
1384extern int get_sb_pseudo(struct file_system_type *, char *, 1385extern int get_sb_pseudo(struct file_system_type *, char *,
1385 struct super_operations *ops, unsigned long, 1386 const struct super_operations *ops, unsigned long,
1386 struct vfsmount *mnt); 1387 struct vfsmount *mnt);
1387extern int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb); 1388extern int simple_set_mnt(struct vfsmount *mnt, struct super_block *sb);
1388int __put_super(struct super_block *sb); 1389int __put_super(struct super_block *sb);
@@ -1572,12 +1573,18 @@ extern int invalidate_partition(struct gendisk *, int);
1572extern int invalidate_inodes(struct super_block *); 1573extern int invalidate_inodes(struct super_block *);
1573unsigned long invalidate_mapping_pages(struct address_space *mapping, 1574unsigned long invalidate_mapping_pages(struct address_space *mapping,
1574 pgoff_t start, pgoff_t end); 1575 pgoff_t start, pgoff_t end);
1575unsigned long invalidate_inode_pages(struct address_space *mapping); 1576
1577static inline unsigned long __deprecated
1578invalidate_inode_pages(struct address_space *mapping)
1579{
1580 return invalidate_mapping_pages(mapping, 0, ~0UL);
1581}
1582
1576static inline void invalidate_remote_inode(struct inode *inode) 1583static inline void invalidate_remote_inode(struct inode *inode)
1577{ 1584{
1578 if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || 1585 if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
1579 S_ISLNK(inode->i_mode)) 1586 S_ISLNK(inode->i_mode))
1580 invalidate_inode_pages(inode->i_mapping); 1587 invalidate_mapping_pages(inode->i_mapping, 0, -1);
1581} 1588}
1582extern int invalidate_inode_pages2(struct address_space *mapping); 1589extern int invalidate_inode_pages2(struct address_space *mapping);
1583extern int invalidate_inode_pages2_range(struct address_space *mapping, 1590extern int invalidate_inode_pages2_range(struct address_space *mapping,
@@ -1681,7 +1688,6 @@ extern struct inode *new_inode(struct super_block *);
1681extern int __remove_suid(struct dentry *, int); 1688extern int __remove_suid(struct dentry *, int);
1682extern int should_remove_suid(struct dentry *); 1689extern int should_remove_suid(struct dentry *);
1683extern int remove_suid(struct dentry *); 1690extern int remove_suid(struct dentry *);
1684extern void remove_dquot_ref(struct super_block *, int, struct list_head *);
1685 1691
1686extern void __insert_inode_hash(struct inode *, unsigned long hashval); 1692extern void __insert_inode_hash(struct inode *, unsigned long hashval);
1687extern void remove_inode_hash(struct inode *); 1693extern void remove_inode_hash(struct inode *);
@@ -1822,7 +1828,7 @@ extern void page_put_link(struct dentry *, struct nameidata *, void *);
1822extern int __page_symlink(struct inode *inode, const char *symname, int len, 1828extern int __page_symlink(struct inode *inode, const char *symname, int len,
1823 gfp_t gfp_mask); 1829 gfp_t gfp_mask);
1824extern int page_symlink(struct inode *inode, const char *symname, int len); 1830extern int page_symlink(struct inode *inode, const char *symname, int len);
1825extern struct inode_operations page_symlink_inode_operations; 1831extern const struct inode_operations page_symlink_inode_operations;
1826extern int generic_readlink(struct dentry *, char __user *, int); 1832extern int generic_readlink(struct dentry *, char __user *, int);
1827extern void generic_fillattr(struct inode *, struct kstat *); 1833extern void generic_fillattr(struct inode *, struct kstat *);
1828extern int vfs_getattr(struct vfsmount *, struct dentry *, struct kstat *); 1834extern int vfs_getattr(struct vfsmount *, struct dentry *, struct kstat *);
@@ -1867,7 +1873,7 @@ extern int simple_commit_write(struct file *file, struct page *page,
1867extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *); 1873extern struct dentry *simple_lookup(struct inode *, struct dentry *, struct nameidata *);
1868extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *); 1874extern ssize_t generic_read_dir(struct file *, char __user *, size_t, loff_t *);
1869extern const struct file_operations simple_dir_operations; 1875extern const struct file_operations simple_dir_operations;
1870extern struct inode_operations simple_dir_inode_operations; 1876extern const struct inode_operations simple_dir_inode_operations;
1871struct tree_descr { char *name; const struct file_operations *ops; int mode; }; 1877struct tree_descr { char *name; const struct file_operations *ops; int mode; };
1872struct dentry *d_alloc_name(struct dentry *, const char *); 1878struct dentry *d_alloc_name(struct dentry *, const char *);
1873extern int simple_fill_super(struct super_block *, int, struct tree_descr *); 1879extern int simple_fill_super(struct super_block *, int, struct tree_descr *);
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index 0a022b2f63fc..2c65da7cabb2 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -20,7 +20,11 @@ enum {
20 LINUX_EXTENDED_PARTITION = 0x85, 20 LINUX_EXTENDED_PARTITION = 0x85,
21 WIN98_EXTENDED_PARTITION = 0x0f, 21 WIN98_EXTENDED_PARTITION = 0x0f,
22 22
23 SUN_WHOLE_DISK = DOS_EXTENDED_PARTITION,
24
23 LINUX_SWAP_PARTITION = 0x82, 25 LINUX_SWAP_PARTITION = 0x82,
26 LINUX_DATA_PARTITION = 0x83,
27 LINUX_LVM_PARTITION = 0x8e,
24 LINUX_RAID_PARTITION = 0xfd, /* autodetect RAID partition */ 28 LINUX_RAID_PARTITION = 0xfd, /* autodetect RAID partition */
25 29
26 SOLARIS_X86_PARTITION = LINUX_SWAP_PARTITION, 30 SOLARIS_X86_PARTITION = LINUX_SWAP_PARTITION,
@@ -400,10 +404,14 @@ struct unixware_disklabel {
400 404
401#ifdef __KERNEL__ 405#ifdef __KERNEL__
402 406
407#define ADDPART_FLAG_NONE 0
408#define ADDPART_FLAG_RAID 1
409#define ADDPART_FLAG_WHOLEDISK 2
410
403char *disk_name (struct gendisk *hd, int part, char *buf); 411char *disk_name (struct gendisk *hd, int part, char *buf);
404 412
405extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev); 413extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev);
406extern void add_partition(struct gendisk *, int, sector_t, sector_t); 414extern void add_partition(struct gendisk *, int, sector_t, sector_t, int);
407extern void delete_partition(struct gendisk *, int); 415extern void delete_partition(struct gendisk *, int);
408 416
409extern struct gendisk *alloc_disk_node(int minors, int node_id); 417extern struct gendisk *alloc_disk_node(int minors, int node_id);
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index 063799ea6be0..2a7d15bcde46 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -85,8 +85,10 @@ struct vm_area_struct;
85 85
86static inline enum zone_type gfp_zone(gfp_t flags) 86static inline enum zone_type gfp_zone(gfp_t flags)
87{ 87{
88#ifdef CONFIG_ZONE_DMA
88 if (flags & __GFP_DMA) 89 if (flags & __GFP_DMA)
89 return ZONE_DMA; 90 return ZONE_DMA;
91#endif
90#ifdef CONFIG_ZONE_DMA32 92#ifdef CONFIG_ZONE_DMA32
91 if (flags & __GFP_DMA32) 93 if (flags & __GFP_DMA32)
92 return ZONE_DMA32; 94 return ZONE_DMA32;
diff --git a/include/linux/gigaset_dev.h b/include/linux/gigaset_dev.h
index 70ad09c8ad1e..5dc4a316ca37 100644
--- a/include/linux/gigaset_dev.h
+++ b/include/linux/gigaset_dev.h
@@ -9,8 +9,6 @@
9 * published by the Free Software Foundation; either version 2 of 9 * published by the Free Software Foundation; either version 2 of
10 * the License, or (at your option) any later version. 10 * the License, or (at your option) any later version.
11 * ===================================================================== 11 * =====================================================================
12 * Version: $Id: gigaset_dev.h,v 1.4.4.4 2005/11/21 22:28:09 hjlipp Exp $
13 * =====================================================================
14 */ 12 */
15 13
16#ifndef GIGASET_INTERFACE_H 14#ifndef GIGASET_INTERFACE_H
diff --git a/include/linux/init.h b/include/linux/init.h
index 5a593a1dec1e..e290a010e3f2 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -67,7 +67,8 @@ extern initcall_t __con_initcall_start[], __con_initcall_end[];
67extern initcall_t __security_initcall_start[], __security_initcall_end[]; 67extern initcall_t __security_initcall_start[], __security_initcall_end[];
68 68
69/* Defined in init/main.c */ 69/* Defined in init/main.c */
70extern char saved_command_line[]; 70extern char __initdata boot_command_line[];
71extern char *saved_command_line;
71extern unsigned int reset_devices; 72extern unsigned int reset_devices;
72 73
73/* used by init/main.c */ 74/* used by init/main.c */
@@ -164,7 +165,7 @@ struct obs_kernel_param {
164#define early_param(str, fn) \ 165#define early_param(str, fn) \
165 __setup_param(str, fn, fn, 1) 166 __setup_param(str, fn, fn, 1)
166 167
167/* Relies on saved_command_line being set */ 168/* Relies on boot_command_line being set */
168void __init parse_early_param(void); 169void __init parse_early_param(void);
169#endif /* __ASSEMBLY__ */ 170#endif /* __ASSEMBLY__ */
170 171
@@ -172,7 +173,7 @@ void __init parse_early_param(void);
172 * module_init() - driver initialization entry point 173 * module_init() - driver initialization entry point
173 * @x: function to be run at kernel boot time or module insertion 174 * @x: function to be run at kernel boot time or module insertion
174 * 175 *
175 * module_init() will either be called during do_initcalls (if 176 * module_init() will either be called during do_initcalls() (if
176 * builtin) or at module insertion time (if a module). There can only 177 * builtin) or at module insertion time (if a module). There can only
177 * be one per module. 178 * be one per module.
178 */ 179 */
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index 6383d2d83bb0..a2d95ff50e9b 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -66,7 +66,7 @@
66 .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \ 66 .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \
67 .rlim = INIT_RLIMITS, \ 67 .rlim = INIT_RLIMITS, \
68 .pgrp = 1, \ 68 .pgrp = 1, \
69 .tty_old_pgrp = 0, \ 69 .tty_old_pgrp = NULL, \
70 { .__session = 1}, \ 70 { .__session = 1}, \
71} 71}
72 72
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index e36e86c869fb..5a8ba0b8ccba 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -12,6 +12,7 @@
12#include <linux/sched.h> 12#include <linux/sched.h>
13#include <linux/irqflags.h> 13#include <linux/irqflags.h>
14#include <linux/bottom_half.h> 14#include <linux/bottom_half.h>
15#include <linux/device.h>
15#include <asm/atomic.h> 16#include <asm/atomic.h>
16#include <asm/ptrace.h> 17#include <asm/ptrace.h>
17#include <asm/system.h> 18#include <asm/system.h>
@@ -83,6 +84,11 @@ extern int request_irq(unsigned int, irq_handler_t handler,
83 unsigned long, const char *, void *); 84 unsigned long, const char *, void *);
84extern void free_irq(unsigned int, void *); 85extern void free_irq(unsigned int, void *);
85 86
87extern int devm_request_irq(struct device *dev, unsigned int irq,
88 irq_handler_t handler, unsigned long irqflags,
89 const char *devname, void *dev_id);
90extern void devm_free_irq(struct device *dev, unsigned int irq, void *dev_id);
91
86/* 92/*
87 * On lockdep we dont want to enable hardirqs in hardirq 93 * On lockdep we dont want to enable hardirqs in hardirq
88 * context. Use local_irq_enable_in_hardirq() to annotate 94 * context. Use local_irq_enable_in_hardirq() to annotate
diff --git a/include/linux/io.h b/include/linux/io.h
index 81877ea39309..c244a0cc9319 100644
--- a/include/linux/io.h
+++ b/include/linux/io.h
@@ -22,12 +22,27 @@
22#include <asm/io.h> 22#include <asm/io.h>
23#include <asm/page.h> 23#include <asm/page.h>
24 24
25struct device;
26
25void __iowrite32_copy(void __iomem *to, const void *from, size_t count); 27void __iowrite32_copy(void __iomem *to, const void *from, size_t count);
26void __iowrite64_copy(void __iomem *to, const void *from, size_t count); 28void __iowrite64_copy(void __iomem *to, const void *from, size_t count);
27 29
28int ioremap_page_range(unsigned long addr, unsigned long end, 30int ioremap_page_range(unsigned long addr, unsigned long end,
29 unsigned long phys_addr, pgprot_t prot); 31 unsigned long phys_addr, pgprot_t prot);
30 32
33/*
34 * Managed iomap interface
35 */
36void __iomem * devm_ioport_map(struct device *dev, unsigned long port,
37 unsigned int nr);
38void devm_ioport_unmap(struct device *dev, void __iomem *addr);
39
40void __iomem * devm_ioremap(struct device *dev, unsigned long offset,
41 unsigned long size);
42void __iomem * devm_ioremap_nocache(struct device *dev, unsigned long offset,
43 unsigned long size);
44void devm_iounmap(struct device *dev, void __iomem *addr);
45
31/** 46/**
32 * check_signature - find BIOS signatures 47 * check_signature - find BIOS signatures
33 * @io_addr: mmio address to check 48 * @io_addr: mmio address to check
diff --git a/include/linux/ioport.h b/include/linux/ioport.h
index 15228d79c5bc..6859a3b14088 100644
--- a/include/linux/ioport.h
+++ b/include/linux/ioport.h
@@ -137,4 +137,24 @@ static inline int __deprecated check_region(resource_size_t s,
137{ 137{
138 return __check_region(&ioport_resource, s, n); 138 return __check_region(&ioport_resource, s, n);
139} 139}
140
141/* Wrappers for managed devices */
142struct device;
143#define devm_request_region(dev,start,n,name) \
144 __devm_request_region(dev, &ioport_resource, (start), (n), (name))
145#define devm_request_mem_region(dev,start,n,name) \
146 __devm_request_region(dev, &iomem_resource, (start), (n), (name))
147
148extern struct resource * __devm_request_region(struct device *dev,
149 struct resource *parent, resource_size_t start,
150 resource_size_t n, const char *name);
151
152#define devm_release_region(start,n) \
153 __devm_release_region(dev, &ioport_resource, (start), (n))
154#define devm_release_mem_region(start,n) \
155 __devm_release_region(dev, &iomem_resource, (start), (n))
156
157extern void __devm_release_region(struct device *dev, struct resource *parent,
158 resource_size_t start, resource_size_t n);
159
140#endif /* _LINUX_IOPORT_H */ 160#endif /* _LINUX_IOPORT_H */
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 63fb18dcac30..9ddf25c21538 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -92,11 +92,6 @@ extern int cond_resched(void);
92 (__x < 0) ? -__x : __x; \ 92 (__x < 0) ? -__x : __x; \
93 }) 93 })
94 94
95#define labs(x) ({ \
96 long __x = (x); \
97 (__x < 0) ? -__x : __x; \
98 })
99
100extern struct atomic_notifier_head panic_notifier_list; 95extern struct atomic_notifier_head panic_notifier_list;
101extern long (*panic_blink)(long time); 96extern long (*panic_blink)(long time);
102NORET_TYPE void panic(const char * fmt, ...) 97NORET_TYPE void panic(const char * fmt, ...)
@@ -139,7 +134,8 @@ extern unsigned long long memparse(char *ptr, char **retptr);
139extern int core_kernel_text(unsigned long addr); 134extern int core_kernel_text(unsigned long addr);
140extern int __kernel_text_address(unsigned long addr); 135extern int __kernel_text_address(unsigned long addr);
141extern int kernel_text_address(unsigned long addr); 136extern int kernel_text_address(unsigned long addr);
142extern int session_of_pgrp(int pgrp); 137struct pid;
138extern struct pid *session_of_pgrp(struct pid *pgrp);
143 139
144extern void dump_thread(struct pt_regs *regs, struct user *dump); 140extern void dump_thread(struct pt_regs *regs, struct user *dump);
145 141
@@ -176,6 +172,7 @@ static inline void console_verbose(void)
176} 172}
177 173
178extern void bust_spinlocks(int yes); 174extern void bust_spinlocks(int yes);
175extern void wake_up_klogd(void);
179extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */ 176extern int oops_in_progress; /* If set, an oops, panic(), BUG() or die() is in progress */
180extern int panic_timeout; 177extern int panic_timeout;
181extern int panic_on_oops; 178extern int panic_on_oops;
@@ -200,6 +197,7 @@ extern enum system_states {
200#define TAINT_FORCED_RMMOD (1<<3) 197#define TAINT_FORCED_RMMOD (1<<3)
201#define TAINT_MACHINE_CHECK (1<<4) 198#define TAINT_MACHINE_CHECK (1<<4)
202#define TAINT_BAD_PAGE (1<<5) 199#define TAINT_BAD_PAGE (1<<5)
200#define TAINT_USER (1<<6)
203 201
204extern void dump_stack(void); 202extern void dump_stack(void);
205 203
@@ -312,6 +310,9 @@ static inline int __attribute__ ((format (printf, 1, 2))) pr_debug(const char *
312 (void)__tmp; \ 310 (void)__tmp; \
313}) 311})
314 312
313struct sysinfo;
314extern int do_sysinfo(struct sysinfo *info);
315
315#endif /* __KERNEL__ */ 316#endif /* __KERNEL__ */
316 317
317#define SI_LOAD_SHIFT 16 318#define SI_LOAD_SHIFT 16
diff --git a/include/linux/kfifo.h b/include/linux/kfifo.h
index 48eccd865bd8..404f4464cb1a 100644
--- a/include/linux/kfifo.h
+++ b/include/linux/kfifo.h
@@ -74,7 +74,7 @@ static inline void kfifo_reset(struct kfifo *fifo)
74 * @buffer: the data to be added. 74 * @buffer: the data to be added.
75 * @len: the length of the data to be added. 75 * @len: the length of the data to be added.
76 * 76 *
77 * This function copies at most 'len' bytes from the 'buffer' into 77 * This function copies at most @len bytes from the @buffer into
78 * the FIFO depending on the free space, and returns the number of 78 * the FIFO depending on the free space, and returns the number of
79 * bytes copied. 79 * bytes copied.
80 */ 80 */
@@ -99,8 +99,8 @@ static inline unsigned int kfifo_put(struct kfifo *fifo,
99 * @buffer: where the data must be copied. 99 * @buffer: where the data must be copied.
100 * @len: the size of the destination buffer. 100 * @len: the size of the destination buffer.
101 * 101 *
102 * This function copies at most 'len' bytes from the FIFO into the 102 * This function copies at most @len bytes from the FIFO into the
103 * 'buffer' and returns the number of copied bytes. 103 * @buffer and returns the number of copied bytes.
104 */ 104 */
105static inline unsigned int kfifo_get(struct kfifo *fifo, 105static inline unsigned int kfifo_get(struct kfifo *fifo,
106 unsigned char *buffer, unsigned int len) 106 unsigned char *buffer, unsigned int len)
diff --git a/include/linux/ks0108.h b/include/linux/ks0108.h
new file mode 100644
index 000000000000..8047d4b17bf1
--- /dev/null
+++ b/include/linux/ks0108.h
@@ -0,0 +1,46 @@
1/*
2 * Filename: ks0108.h
3 * Version: 0.1.0
4 * Description: ks0108 LCD Controller driver header
5 * License: GPLv2
6 *
7 * Author: Copyright (C) Miguel Ojeda Sandonis <maxextreme@gmail.com>
8 * Date: 2006-10-31
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 version 2 as
12 * published by the Free Software Foundation.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 *
23 */
24
25#ifndef _KS0108_H_
26#define _KS0108_H_
27
28/* Write a byte to the data port */
29extern void ks0108_writedata(unsigned char byte);
30
31/* Write a byte to the control port */
32extern void ks0108_writecontrol(unsigned char byte);
33
34/* Set the controller's current display state (0..1) */
35extern void ks0108_displaystate(unsigned char state);
36
37/* Set the controller's current startline (0..63) */
38extern void ks0108_startline(unsigned char startline);
39
40/* Set the controller's current address (0..63) */
41extern void ks0108_address(unsigned char address);
42
43/* Set the controller's current page (0..7) */
44extern void ks0108_page(unsigned char page);
45
46#endif /* _KS0108_H_ */
diff --git a/include/linux/ktime.h b/include/linux/ktime.h
index 611f17f79eef..7444a6326231 100644
--- a/include/linux/ktime.h
+++ b/include/linux/ktime.h
@@ -163,7 +163,7 @@ static inline ktime_t ktime_sub(const ktime_t lhs, const ktime_t rhs)
163 * @add1: addend1 163 * @add1: addend1
164 * @add2: addend2 164 * @add2: addend2
165 * 165 *
166 * Returns the sum of addend1 and addend2 166 * Returns the sum of @add1 and @add2.
167 */ 167 */
168static inline ktime_t ktime_add(const ktime_t add1, const ktime_t add2) 168static inline ktime_t ktime_add(const ktime_t add1, const ktime_t add2)
169{ 169{
@@ -189,7 +189,7 @@ static inline ktime_t ktime_add(const ktime_t add1, const ktime_t add2)
189 * @kt: addend 189 * @kt: addend
190 * @nsec: the scalar nsec value to add 190 * @nsec: the scalar nsec value to add
191 * 191 *
192 * Returns the sum of kt and nsec in ktime_t format 192 * Returns the sum of @kt and @nsec in ktime_t format
193 */ 193 */
194extern ktime_t ktime_add_ns(const ktime_t kt, u64 nsec); 194extern ktime_t ktime_add_ns(const ktime_t kt, u64 nsec);
195 195
@@ -246,7 +246,7 @@ static inline struct timeval ktime_to_timeval(const ktime_t kt)
246 * ktime_to_ns - convert a ktime_t variable to scalar nanoseconds 246 * ktime_to_ns - convert a ktime_t variable to scalar nanoseconds
247 * @kt: the ktime_t variable to convert 247 * @kt: the ktime_t variable to convert
248 * 248 *
249 * Returns the scalar nanoseconds representation of kt 249 * Returns the scalar nanoseconds representation of @kt
250 */ 250 */
251static inline s64 ktime_to_ns(const ktime_t kt) 251static inline s64 ktime_to_ns(const ktime_t kt)
252{ 252{
diff --git a/include/linux/kvm.h b/include/linux/kvm.h
index 1be148f0fce4..f3604593fb76 100644
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -11,7 +11,7 @@
11#include <asm/types.h> 11#include <asm/types.h>
12#include <linux/ioctl.h> 12#include <linux/ioctl.h>
13 13
14#define KVM_API_VERSION 2 14#define KVM_API_VERSION 3
15 15
16/* 16/*
17 * Architectural interrupt line count, and the size of the bitmap needed 17 * Architectural interrupt line count, and the size of the bitmap needed
@@ -65,6 +65,8 @@ struct kvm_run {
65 __u8 ready_for_interrupt_injection; 65 __u8 ready_for_interrupt_injection;
66 __u8 if_flag; 66 __u8 if_flag;
67 __u16 padding2; 67 __u16 padding2;
68
69 /* in (pre_kvm_run), out (post_kvm_run) */
68 __u64 cr8; 70 __u64 cr8;
69 __u64 apic_base; 71 __u64 apic_base;
70 72
@@ -185,6 +187,7 @@ struct kvm_translation {
185 __u8 valid; 187 __u8 valid;
186 __u8 writeable; 188 __u8 writeable;
187 __u8 usermode; 189 __u8 usermode;
190 __u8 pad[5];
188}; 191};
189 192
190/* for KVM_INTERRUPT */ 193/* for KVM_INTERRUPT */
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 91bb8ceef0b5..596e0c18887d 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -31,7 +31,7 @@
31#include <linux/pci.h> 31#include <linux/pci.h>
32#include <linux/dma-mapping.h> 32#include <linux/dma-mapping.h>
33#include <asm/scatterlist.h> 33#include <asm/scatterlist.h>
34#include <asm/io.h> 34#include <linux/io.h>
35#include <linux/ata.h> 35#include <linux/ata.h>
36#include <linux/workqueue.h> 36#include <linux/workqueue.h>
37#include <scsi/scsi_host.h> 37#include <scsi/scsi_host.h>
@@ -54,8 +54,6 @@
54#undef ATA_VERBOSE_DEBUG /* yet more debugging output */ 54#undef ATA_VERBOSE_DEBUG /* yet more debugging output */
55#undef ATA_IRQ_TRAP /* define to ack screaming irqs */ 55#undef ATA_IRQ_TRAP /* define to ack screaming irqs */
56#undef ATA_NDEBUG /* define to disable quick runtime checks */ 56#undef ATA_NDEBUG /* define to disable quick runtime checks */
57#define ATA_ENABLE_PATA /* define to enable PATA support in some
58 * low-level drivers */
59 57
60 58
61/* note: prints function name for you */ 59/* note: prints function name for you */
@@ -109,10 +107,6 @@ static inline u32 ata_msg_init(int dval, int default_msg_enable_bits)
109#define ATA_TAG_POISON 0xfafbfcfdU 107#define ATA_TAG_POISON 0xfafbfcfdU
110 108
111/* move to PCI layer? */ 109/* move to PCI layer? */
112#define PCI_VDEVICE(vendor, device) \
113 PCI_VENDOR_ID_##vendor, (device), \
114 PCI_ANY_ID, PCI_ANY_ID, 0, 0
115
116static inline struct device *pci_dev_to_dev(struct pci_dev *pdev) 110static inline struct device *pci_dev_to_dev(struct pci_dev *pdev)
117{ 111{
118 return &pdev->dev; 112 return &pdev->dev;
@@ -308,7 +302,7 @@ enum {
308 * most devices. 302 * most devices.
309 */ 303 */
310 ATA_SPINUP_WAIT = 8000, 304 ATA_SPINUP_WAIT = 8000,
311 305
312 /* Horkage types. May be set by libata or controller on drives 306 /* Horkage types. May be set by libata or controller on drives
313 (some horkage may be drive/controller pair dependant */ 307 (some horkage may be drive/controller pair dependant */
314 308
@@ -352,21 +346,21 @@ typedef int (*ata_reset_fn_t)(struct ata_port *ap, unsigned int *classes);
352typedef void (*ata_postreset_fn_t)(struct ata_port *ap, unsigned int *classes); 346typedef void (*ata_postreset_fn_t)(struct ata_port *ap, unsigned int *classes);
353 347
354struct ata_ioports { 348struct ata_ioports {
355 unsigned long cmd_addr; 349 void __iomem *cmd_addr;
356 unsigned long data_addr; 350 void __iomem *data_addr;
357 unsigned long error_addr; 351 void __iomem *error_addr;
358 unsigned long feature_addr; 352 void __iomem *feature_addr;
359 unsigned long nsect_addr; 353 void __iomem *nsect_addr;
360 unsigned long lbal_addr; 354 void __iomem *lbal_addr;
361 unsigned long lbam_addr; 355 void __iomem *lbam_addr;
362 unsigned long lbah_addr; 356 void __iomem *lbah_addr;
363 unsigned long device_addr; 357 void __iomem *device_addr;
364 unsigned long status_addr; 358 void __iomem *status_addr;
365 unsigned long command_addr; 359 void __iomem *command_addr;
366 unsigned long altstatus_addr; 360 void __iomem *altstatus_addr;
367 unsigned long ctl_addr; 361 void __iomem *ctl_addr;
368 unsigned long bmdma_addr; 362 void __iomem *bmdma_addr;
369 unsigned long scr_addr; 363 void __iomem *scr_addr;
370}; 364};
371 365
372struct ata_probe_ent { 366struct ata_probe_ent {
@@ -385,7 +379,7 @@ struct ata_probe_ent {
385 unsigned int irq_flags; 379 unsigned int irq_flags;
386 unsigned long port_flags; 380 unsigned long port_flags;
387 unsigned long _host_flags; 381 unsigned long _host_flags;
388 void __iomem *mmio_base; 382 void __iomem * const *iomap;
389 void *private_data; 383 void *private_data;
390 384
391 /* port_info for the secondary port. Together with irq2, it's 385 /* port_info for the secondary port. Together with irq2, it's
@@ -402,7 +396,7 @@ struct ata_host {
402 struct device *dev; 396 struct device *dev;
403 unsigned long irq; 397 unsigned long irq;
404 unsigned long irq2; 398 unsigned long irq2;
405 void __iomem *mmio_base; 399 void __iomem * const *iomap;
406 unsigned int n_ports; 400 unsigned int n_ports;
407 void *private_data; 401 void *private_data;
408 const struct ata_port_operations *ops; 402 const struct ata_port_operations *ops;
@@ -431,9 +425,6 @@ struct ata_queued_cmd {
431 425
432 unsigned int pad_len; 426 unsigned int pad_len;
433 427
434 unsigned int nsect;
435 unsigned int cursect;
436
437 unsigned int nbytes; 428 unsigned int nbytes;
438 unsigned int curbytes; 429 unsigned int curbytes;
439 430
@@ -639,6 +630,8 @@ struct ata_port_operations {
639 630
640 irq_handler_t irq_handler; 631 irq_handler_t irq_handler;
641 void (*irq_clear) (struct ata_port *); 632 void (*irq_clear) (struct ata_port *);
633 u8 (*irq_on) (struct ata_port *);
634 u8 (*irq_ack) (struct ata_port *ap, unsigned int chk_drq);
642 635
643 u32 (*scr_read) (struct ata_port *ap, unsigned int sc_reg); 636 u32 (*scr_read) (struct ata_port *ap, unsigned int sc_reg);
644 void (*scr_write) (struct ata_port *ap, unsigned int sc_reg, 637 void (*scr_write) (struct ata_port *ap, unsigned int sc_reg,
@@ -720,20 +713,18 @@ extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_i
720 unsigned int n_ports); 713 unsigned int n_ports);
721extern void ata_pci_remove_one (struct pci_dev *pdev); 714extern void ata_pci_remove_one (struct pci_dev *pdev);
722extern void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t mesg); 715extern void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t mesg);
723extern void ata_pci_device_do_resume(struct pci_dev *pdev); 716extern int __must_check ata_pci_device_do_resume(struct pci_dev *pdev);
724extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg); 717extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg);
725extern int ata_pci_device_resume(struct pci_dev *pdev); 718extern int ata_pci_device_resume(struct pci_dev *pdev);
726extern int ata_pci_clear_simplex(struct pci_dev *pdev); 719extern int ata_pci_clear_simplex(struct pci_dev *pdev);
727#endif /* CONFIG_PCI */ 720#endif /* CONFIG_PCI */
728extern int ata_device_add(const struct ata_probe_ent *ent); 721extern int ata_device_add(const struct ata_probe_ent *ent);
729extern void ata_port_detach(struct ata_port *ap); 722extern void ata_host_detach(struct ata_host *host);
730extern void ata_host_init(struct ata_host *, struct device *, 723extern void ata_host_init(struct ata_host *, struct device *,
731 unsigned long, const struct ata_port_operations *); 724 unsigned long, const struct ata_port_operations *);
732extern void ata_host_remove(struct ata_host *host);
733extern int ata_scsi_detect(struct scsi_host_template *sht); 725extern int ata_scsi_detect(struct scsi_host_template *sht);
734extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); 726extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg);
735extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); 727extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *));
736extern int ata_scsi_release(struct Scsi_Host *host);
737extern void ata_sas_port_destroy(struct ata_port *); 728extern void ata_sas_port_destroy(struct ata_port *);
738extern struct ata_port *ata_sas_port_alloc(struct ata_host *, 729extern struct ata_port *ata_sas_port_alloc(struct ata_host *,
739 struct ata_port_info *, struct Scsi_Host *); 730 struct ata_port_info *, struct Scsi_Host *);
@@ -776,15 +767,11 @@ extern u8 ata_check_status(struct ata_port *ap);
776extern u8 ata_altstatus(struct ata_port *ap); 767extern u8 ata_altstatus(struct ata_port *ap);
777extern void ata_exec_command(struct ata_port *ap, const struct ata_taskfile *tf); 768extern void ata_exec_command(struct ata_port *ap, const struct ata_taskfile *tf);
778extern int ata_port_start (struct ata_port *ap); 769extern int ata_port_start (struct ata_port *ap);
779extern void ata_port_stop (struct ata_port *ap);
780extern void ata_host_stop (struct ata_host *host);
781extern irqreturn_t ata_interrupt (int irq, void *dev_instance); 770extern irqreturn_t ata_interrupt (int irq, void *dev_instance);
782extern void ata_mmio_data_xfer(struct ata_device *adev, unsigned char *buf, 771extern void ata_data_xfer(struct ata_device *adev, unsigned char *buf,
783 unsigned int buflen, int write_data); 772 unsigned int buflen, int write_data);
784extern void ata_pio_data_xfer(struct ata_device *adev, unsigned char *buf, 773extern void ata_data_xfer_noirq(struct ata_device *adev, unsigned char *buf,
785 unsigned int buflen, int write_data); 774 unsigned int buflen, int write_data);
786extern void ata_pio_data_xfer_noirq(struct ata_device *adev, unsigned char *buf,
787 unsigned int buflen, int write_data);
788extern void ata_qc_prep(struct ata_queued_cmd *qc); 775extern void ata_qc_prep(struct ata_queued_cmd *qc);
789extern void ata_noop_qc_prep(struct ata_queued_cmd *qc); 776extern void ata_noop_qc_prep(struct ata_queued_cmd *qc);
790extern unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc); 777extern unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc);
@@ -826,6 +813,10 @@ extern void ata_scsi_slave_destroy(struct scsi_device *sdev);
826extern int ata_scsi_change_queue_depth(struct scsi_device *sdev, 813extern int ata_scsi_change_queue_depth(struct scsi_device *sdev,
827 int queue_depth); 814 int queue_depth);
828extern struct ata_device *ata_dev_pair(struct ata_device *adev); 815extern struct ata_device *ata_dev_pair(struct ata_device *adev);
816extern u8 ata_irq_on(struct ata_port *ap);
817extern u8 ata_dummy_irq_on(struct ata_port *ap);
818extern u8 ata_irq_ack(struct ata_port *ap, unsigned int chk_drq);
819extern u8 ata_dummy_irq_ack(struct ata_port *ap, unsigned int chk_drq);
829 820
830/* 821/*
831 * Timing helpers 822 * Timing helpers
@@ -864,7 +855,6 @@ struct pci_bits {
864 unsigned long val; 855 unsigned long val;
865}; 856};
866 857
867extern void ata_pci_host_stop (struct ata_host *host);
868extern struct ata_probe_ent * 858extern struct ata_probe_ent *
869ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int portmask); 859ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int portmask);
870extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits); 860extern int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits);
@@ -1096,10 +1086,9 @@ static inline u8 ata_wait_idle(struct ata_port *ap)
1096 u8 status = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000); 1086 u8 status = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000);
1097 1087
1098 if (status != 0xff && (status & (ATA_BUSY | ATA_DRQ))) { 1088 if (status != 0xff && (status & (ATA_BUSY | ATA_DRQ))) {
1099 unsigned long l = ap->ioaddr.status_addr;
1100 if (ata_msg_warn(ap)) 1089 if (ata_msg_warn(ap))
1101 printk(KERN_WARNING "ATA: abnormal status 0x%X on port 0x%lX\n", 1090 printk(KERN_WARNING "ATA: abnormal status 0x%X on port 0x%p\n",
1102 status, l); 1091 status, ap->ioaddr.status_addr);
1103 } 1092 }
1104 1093
1105 return status; 1094 return status;
@@ -1149,8 +1138,7 @@ static inline void ata_qc_reinit(struct ata_queued_cmd *qc)
1149 qc->dma_dir = DMA_NONE; 1138 qc->dma_dir = DMA_NONE;
1150 qc->__sg = NULL; 1139 qc->__sg = NULL;
1151 qc->flags = 0; 1140 qc->flags = 0;
1152 qc->cursect = qc->cursg = qc->cursg_ofs = 0; 1141 qc->cursg = qc->cursg_ofs = 0;
1153 qc->nsect = 0;
1154 qc->nbytes = qc->curbytes = 0; 1142 qc->nbytes = qc->curbytes = 0;
1155 qc->n_elem = 0; 1143 qc->n_elem = 0;
1156 qc->err_mask = 0; 1144 qc->err_mask = 0;
@@ -1163,51 +1151,6 @@ static inline void ata_qc_reinit(struct ata_queued_cmd *qc)
1163 qc->result_tf.feature = 0; 1151 qc->result_tf.feature = 0;
1164} 1152}
1165 1153
1166/**
1167 * ata_irq_ack - Acknowledge a device interrupt.
1168 * @ap: Port on which interrupts are enabled.
1169 *
1170 * Wait up to 10 ms for legacy IDE device to become idle (BUSY
1171 * or BUSY+DRQ clear). Obtain dma status and port status from
1172 * device. Clear the interrupt. Return port status.
1173 *
1174 * LOCKING:
1175 */
1176
1177static inline u8 ata_irq_ack(struct ata_port *ap, unsigned int chk_drq)
1178{
1179 unsigned int bits = chk_drq ? ATA_BUSY | ATA_DRQ : ATA_BUSY;
1180 u8 host_stat, post_stat, status;
1181
1182 status = ata_busy_wait(ap, bits, 1000);
1183 if (status & bits)
1184 if (ata_msg_err(ap))
1185 printk(KERN_ERR "abnormal status 0x%X\n", status);
1186
1187 /* get controller status; clear intr, err bits */
1188 if (ap->flags & ATA_FLAG_MMIO) {
1189 void __iomem *mmio = (void __iomem *) ap->ioaddr.bmdma_addr;
1190 host_stat = readb(mmio + ATA_DMA_STATUS);
1191 writeb(host_stat | ATA_DMA_INTR | ATA_DMA_ERR,
1192 mmio + ATA_DMA_STATUS);
1193
1194 post_stat = readb(mmio + ATA_DMA_STATUS);
1195 } else {
1196 host_stat = inb(ap->ioaddr.bmdma_addr + ATA_DMA_STATUS);
1197 outb(host_stat | ATA_DMA_INTR | ATA_DMA_ERR,
1198 ap->ioaddr.bmdma_addr + ATA_DMA_STATUS);
1199
1200 post_stat = inb(ap->ioaddr.bmdma_addr + ATA_DMA_STATUS);
1201 }
1202
1203 if (ata_msg_intr(ap))
1204 printk(KERN_INFO "%s: irq ack: host_stat 0x%X, new host_stat 0x%X, drv_stat 0x%X\n",
1205 __FUNCTION__,
1206 host_stat, post_stat, status);
1207
1208 return status;
1209}
1210
1211static inline int ata_try_flush_cache(const struct ata_device *dev) 1154static inline int ata_try_flush_cache(const struct ata_device *dev)
1212{ 1155{
1213 return ata_id_wcache_enabled(dev->id) || 1156 return ata_id_wcache_enabled(dev->id) ||
@@ -1235,14 +1178,14 @@ static inline unsigned int __ac_err_mask(u8 status)
1235static inline int ata_pad_alloc(struct ata_port *ap, struct device *dev) 1178static inline int ata_pad_alloc(struct ata_port *ap, struct device *dev)
1236{ 1179{
1237 ap->pad_dma = 0; 1180 ap->pad_dma = 0;
1238 ap->pad = dma_alloc_coherent(dev, ATA_DMA_PAD_BUF_SZ, 1181 ap->pad = dmam_alloc_coherent(dev, ATA_DMA_PAD_BUF_SZ,
1239 &ap->pad_dma, GFP_KERNEL); 1182 &ap->pad_dma, GFP_KERNEL);
1240 return (ap->pad == NULL) ? -ENOMEM : 0; 1183 return (ap->pad == NULL) ? -ENOMEM : 0;
1241} 1184}
1242 1185
1243static inline void ata_pad_free(struct ata_port *ap, struct device *dev) 1186static inline void ata_pad_free(struct ata_port *ap, struct device *dev)
1244{ 1187{
1245 dma_free_coherent(dev, ATA_DMA_PAD_BUF_SZ, ap->pad, ap->pad_dma); 1188 dmam_free_coherent(dev, ATA_DMA_PAD_BUF_SZ, ap->pad, ap->pad_dma);
1246} 1189}
1247 1190
1248static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host) 1191static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host)
diff --git a/include/linux/list.h b/include/linux/list.h
index 611059d633f4..f9d71eab05ee 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -161,7 +161,7 @@ static inline void __list_del(struct list_head * prev, struct list_head * next)
161/** 161/**
162 * list_del - deletes entry from list. 162 * list_del - deletes entry from list.
163 * @entry: the element to delete from the list. 163 * @entry: the element to delete from the list.
164 * Note: list_empty on entry does not return true after this, the entry is 164 * Note: list_empty() on entry does not return true after this, the entry is
165 * in an undefined state. 165 * in an undefined state.
166 */ 166 */
167#ifndef CONFIG_DEBUG_LIST 167#ifndef CONFIG_DEBUG_LIST
@@ -179,7 +179,7 @@ extern void list_del(struct list_head *entry);
179 * list_del_rcu - deletes entry from list without re-initialization 179 * list_del_rcu - deletes entry from list without re-initialization
180 * @entry: the element to delete from the list. 180 * @entry: the element to delete from the list.
181 * 181 *
182 * Note: list_empty on entry does not return true after this, 182 * Note: list_empty() on entry does not return true after this,
183 * the entry is in an undefined state. It is useful for RCU based 183 * the entry is in an undefined state. It is useful for RCU based
184 * lockfree traversal. 184 * lockfree traversal.
185 * 185 *
@@ -209,7 +209,8 @@ static inline void list_del_rcu(struct list_head *entry)
209 * list_replace - replace old entry by new one 209 * list_replace - replace old entry by new one
210 * @old : the element to be replaced 210 * @old : the element to be replaced
211 * @new : the new element to insert 211 * @new : the new element to insert
212 * Note: if 'old' was empty, it will be overwritten. 212 *
213 * If @old was empty, it will be overwritten.
213 */ 214 */
214static inline void list_replace(struct list_head *old, 215static inline void list_replace(struct list_head *old,
215 struct list_head *new) 216 struct list_head *new)
@@ -360,6 +361,62 @@ static inline void list_splice_init(struct list_head *list,
360} 361}
361 362
362/** 363/**
364 * list_splice_init_rcu - splice an RCU-protected list into an existing list.
365 * @list: the RCU-protected list to splice
366 * @head: the place in the list to splice the first list into
367 * @sync: function to sync: synchronize_rcu(), synchronize_sched(), ...
368 *
369 * @head can be RCU-read traversed concurrently with this function.
370 *
371 * Note that this function blocks.
372 *
373 * Important note: the caller must take whatever action is necessary to
374 * prevent any other updates to @head. In principle, it is possible
375 * to modify the list as soon as sync() begins execution.
376 * If this sort of thing becomes necessary, an alternative version
377 * based on call_rcu() could be created. But only if -really-
378 * needed -- there is no shortage of RCU API members.
379 */
380static inline void list_splice_init_rcu(struct list_head *list,
381 struct list_head *head,
382 void (*sync)(void))
383{
384 struct list_head *first = list->next;
385 struct list_head *last = list->prev;
386 struct list_head *at = head->next;
387
388 if (list_empty(head))
389 return;
390
391 /* "first" and "last" tracking list, so initialize it. */
392
393 INIT_LIST_HEAD(list);
394
395 /*
396 * At this point, the list body still points to the source list.
397 * Wait for any readers to finish using the list before splicing
398 * the list body into the new list. Any new readers will see
399 * an empty list.
400 */
401
402 sync();
403
404 /*
405 * Readers are finished with the source list, so perform splice.
406 * The order is important if the new list is global and accessible
407 * to concurrent RCU readers. Note that RCU readers are not
408 * permitted to traverse the prev pointers without excluding
409 * this function.
410 */
411
412 last->next = at;
413 smp_wmb();
414 head->next = first;
415 first->prev = head;
416 at->prev = last;
417}
418
419/**
363 * list_entry - get the struct for this entry 420 * list_entry - get the struct for this entry
364 * @ptr: the &struct list_head pointer. 421 * @ptr: the &struct list_head pointer.
365 * @type: the type of the struct this is embedded in. 422 * @type: the type of the struct this is embedded in.
@@ -432,12 +489,12 @@ static inline void list_splice_init(struct list_head *list,
432 pos = list_entry(pos->member.prev, typeof(*pos), member)) 489 pos = list_entry(pos->member.prev, typeof(*pos), member))
433 490
434/** 491/**
435 * list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue 492 * list_prepare_entry - prepare a pos entry for use in list_for_each_entry_continue()
436 * @pos: the type * to use as a start point 493 * @pos: the type * to use as a start point
437 * @head: the head of the list 494 * @head: the head of the list
438 * @member: the name of the list_struct within the struct. 495 * @member: the name of the list_struct within the struct.
439 * 496 *
440 * Prepares a pos entry for use as a start point in list_for_each_entry_continue. 497 * Prepares a pos entry for use as a start point in list_for_each_entry_continue().
441 */ 498 */
442#define list_prepare_entry(pos, head, member) \ 499#define list_prepare_entry(pos, head, member) \
443 ((pos) ? : list_entry(head, typeof(*pos), member)) 500 ((pos) ? : list_entry(head, typeof(*pos), member))
diff --git a/include/linux/lockdep.h b/include/linux/lockdep.h
index ea097dddc44f..06fe93a3e916 100644
--- a/include/linux/lockdep.h
+++ b/include/linux/lockdep.h
@@ -8,6 +8,8 @@
8#ifndef __LINUX_LOCKDEP_H 8#ifndef __LINUX_LOCKDEP_H
9#define __LINUX_LOCKDEP_H 9#define __LINUX_LOCKDEP_H
10 10
11struct task_struct;
12
11#ifdef CONFIG_LOCKDEP 13#ifdef CONFIG_LOCKDEP
12 14
13#include <linux/linkage.h> 15#include <linux/linkage.h>
@@ -132,6 +134,7 @@ struct lock_list {
132 struct list_head entry; 134 struct list_head entry;
133 struct lock_class *class; 135 struct lock_class *class;
134 struct stack_trace trace; 136 struct stack_trace trace;
137 int distance;
135}; 138};
136 139
137/* 140/*
diff --git a/include/linux/magic.h b/include/linux/magic.h
index b78bbf42135a..b32c8a97fcec 100644
--- a/include/linux/magic.h
+++ b/include/linux/magic.h
@@ -18,6 +18,7 @@
18#define MINIX_SUPER_MAGIC2 0x138F /* minix fs, 30 char names */ 18#define MINIX_SUPER_MAGIC2 0x138F /* minix fs, 30 char names */
19#define MINIX2_SUPER_MAGIC 0x2468 /* minix V2 fs */ 19#define MINIX2_SUPER_MAGIC 0x2468 /* minix V2 fs */
20#define MINIX2_SUPER_MAGIC2 0x2478 /* minix V2 fs, 30 char names */ 20#define MINIX2_SUPER_MAGIC2 0x2478 /* minix V2 fs, 30 char names */
21#define MINIX3_SUPER_MAGIC 0x4d5a /* minix V3 fs */
21 22
22#define MSDOS_SUPER_MAGIC 0x4d44 /* MD */ 23#define MSDOS_SUPER_MAGIC 0x4d44 /* MD */
23#define NCP_SUPER_MAGIC 0x564c /* Guess, what 0x564c is :-) */ 24#define NCP_SUPER_MAGIC 0x564c /* Guess, what 0x564c is :-) */
diff --git a/include/linux/mc146818rtc.h b/include/linux/mc146818rtc.h
index 432b2fa24929..bdc01127dced 100644
--- a/include/linux/mc146818rtc.h
+++ b/include/linux/mc146818rtc.h
@@ -18,6 +18,16 @@
18#ifdef __KERNEL__ 18#ifdef __KERNEL__
19#include <linux/spinlock.h> /* spinlock_t */ 19#include <linux/spinlock.h> /* spinlock_t */
20extern spinlock_t rtc_lock; /* serialize CMOS RAM access */ 20extern spinlock_t rtc_lock; /* serialize CMOS RAM access */
21
22/* Some RTCs extend the mc146818 register set to support alarms of more
23 * than 24 hours in the future; or dates that include a century code.
24 * This platform_data structure can pass this information to the driver.
25 */
26struct cmos_rtc_board_info {
27 u8 rtc_day_alarm; /* zero, or register index */
28 u8 rtc_mon_alarm; /* zero, or register index */
29 u8 rtc_century; /* zero, or register index */
30};
21#endif 31#endif
22 32
23/********************************************************************** 33/**********************************************************************
diff --git a/include/linux/minix_fs.h b/include/linux/minix_fs.h
index 916e8f72c63d..9850d513ff60 100644
--- a/include/linux/minix_fs.h
+++ b/include/linux/minix_fs.h
@@ -25,7 +25,6 @@
25#define MINIX_ERROR_FS 0x0002 /* fs has errors. */ 25#define MINIX_ERROR_FS 0x0002 /* fs has errors. */
26 26
27#define MINIX_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix_inode))) 27#define MINIX_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix_inode)))
28#define MINIX2_INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct minix2_inode)))
29 28
30/* 29/*
31 * This is the original minix inode layout on disk. 30 * This is the original minix inode layout on disk.
@@ -75,9 +74,33 @@ struct minix_super_block {
75 __u32 s_zones; 74 __u32 s_zones;
76}; 75};
77 76
77/*
78 * V3 minix super-block data on disk
79 */
80struct minix3_super_block {
81 __u16 s_ninodes;
82 __u16 s_nzones;
83 __u16 s_pad0;
84 __u16 s_imap_blocks;
85 __u16 s_zmap_blocks;
86 __u16 s_firstdatazone;
87 __u16 s_log_zone_size;
88 __u16 s_pad1;
89 __u32 s_max_size;
90 __u32 s_zones;
91 __u16 s_magic;
92 __u16 s_pad2;
93 __u16 s_blocksize;
94 __u8 s_disk_version;
95};
96
78struct minix_dir_entry { 97struct minix_dir_entry {
79 __u16 inode; 98 __u16 inode;
80 char name[0]; 99 char name[0];
81}; 100};
82 101
102struct minix3_dir_entry {
103 __u32 inode;
104 char name[0];
105};
83#endif 106#endif
diff --git a/include/linux/mm.h b/include/linux/mm.h
index bb793a4c8e9e..a0eec16eb0bd 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -437,15 +437,15 @@ static inline compound_page_dtor *get_compound_page_dtor(struct page *page)
437/* NODE:ZONE or SECTION:ZONE is used to ID a zone for the buddy allcator */ 437/* NODE:ZONE or SECTION:ZONE is used to ID a zone for the buddy allcator */
438#ifdef NODE_NOT_IN_PAGEFLAGS 438#ifdef NODE_NOT_IN_PAGEFLAGS
439#define ZONEID_SHIFT (SECTIONS_SHIFT + ZONES_SHIFT) 439#define ZONEID_SHIFT (SECTIONS_SHIFT + ZONES_SHIFT)
440#define ZONEID_PGOFF ((SECTIONS_PGOFF < ZONES_PGOFF)? \
441 SECTIONS_PGOFF : ZONES_PGOFF)
440#else 442#else
441#define ZONEID_SHIFT (NODES_SHIFT + ZONES_SHIFT) 443#define ZONEID_SHIFT (NODES_SHIFT + ZONES_SHIFT)
444#define ZONEID_PGOFF ((NODES_PGOFF < ZONES_PGOFF)? \
445 NODES_PGOFF : ZONES_PGOFF)
442#endif 446#endif
443 447
444#if ZONES_WIDTH > 0 448#define ZONEID_PGSHIFT (ZONEID_PGOFF * (ZONEID_SHIFT != 0))
445#define ZONEID_PGSHIFT ZONES_PGSHIFT
446#else
447#define ZONEID_PGSHIFT NODES_PGOFF
448#endif
449 449
450#if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED 450#if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED
451#error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED 451#error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > FLAGS_RESERVED
@@ -471,7 +471,6 @@ static inline enum zone_type page_zonenum(struct page *page)
471 */ 471 */
472static inline int page_zone_id(struct page *page) 472static inline int page_zone_id(struct page *page)
473{ 473{
474 BUILD_BUG_ON(ZONEID_PGSHIFT == 0 && ZONEID_MASK);
475 return (page->flags >> ZONEID_PGSHIFT) & ZONEID_MASK; 474 return (page->flags >> ZONEID_PGSHIFT) & ZONEID_MASK;
476} 475}
477 476
@@ -638,6 +637,7 @@ static inline int page_mapped(struct page *page)
638 */ 637 */
639#define NOPFN_SIGBUS ((unsigned long) -1) 638#define NOPFN_SIGBUS ((unsigned long) -1)
640#define NOPFN_OOM ((unsigned long) -2) 639#define NOPFN_OOM ((unsigned long) -2)
640#define NOPFN_REFAULT ((unsigned long) -3)
641 641
642/* 642/*
643 * Different kinds of faults, as returned by handle_mm_fault(). 643 * Different kinds of faults, as returned by handle_mm_fault().
@@ -786,6 +786,7 @@ extern int try_to_release_page(struct page * page, gfp_t gfp_mask);
786extern void do_invalidatepage(struct page *page, unsigned long offset); 786extern void do_invalidatepage(struct page *page, unsigned long offset);
787 787
788int __set_page_dirty_nobuffers(struct page *page); 788int __set_page_dirty_nobuffers(struct page *page);
789int __set_page_dirty_no_writeback(struct page *page);
789int redirty_page_for_writepage(struct writeback_control *wbc, 790int redirty_page_for_writepage(struct writeback_control *wbc,
790 struct page *page); 791 struct page *page);
791int FASTCALL(set_page_dirty(struct page *page)); 792int FASTCALL(set_page_dirty(struct page *page));
@@ -1124,6 +1125,8 @@ unsigned long vmalloc_to_pfn(void *addr);
1124int remap_pfn_range(struct vm_area_struct *, unsigned long addr, 1125int remap_pfn_range(struct vm_area_struct *, unsigned long addr,
1125 unsigned long pfn, unsigned long size, pgprot_t); 1126 unsigned long pfn, unsigned long size, pgprot_t);
1126int vm_insert_page(struct vm_area_struct *, unsigned long addr, struct page *); 1127int vm_insert_page(struct vm_area_struct *, unsigned long addr, struct page *);
1128int vm_insert_pfn(struct vm_area_struct *vma, unsigned long addr,
1129 unsigned long pfn);
1127 1130
1128struct page *follow_page(struct vm_area_struct *, unsigned long address, 1131struct page *follow_page(struct vm_area_struct *, unsigned long address,
1129 unsigned int foll_flags); 1132 unsigned int foll_flags);
diff --git a/include/linux/mm_inline.h b/include/linux/mm_inline.h
index 3b6723dfaff3..895bc4e93039 100644
--- a/include/linux/mm_inline.h
+++ b/include/linux/mm_inline.h
@@ -1,30 +1,29 @@
1
2static inline void 1static inline void
3add_page_to_active_list(struct zone *zone, struct page *page) 2add_page_to_active_list(struct zone *zone, struct page *page)
4{ 3{
5 list_add(&page->lru, &zone->active_list); 4 list_add(&page->lru, &zone->active_list);
6 zone->nr_active++; 5 __inc_zone_state(zone, NR_ACTIVE);
7} 6}
8 7
9static inline void 8static inline void
10add_page_to_inactive_list(struct zone *zone, struct page *page) 9add_page_to_inactive_list(struct zone *zone, struct page *page)
11{ 10{
12 list_add(&page->lru, &zone->inactive_list); 11 list_add(&page->lru, &zone->inactive_list);
13 zone->nr_inactive++; 12 __inc_zone_state(zone, NR_INACTIVE);
14} 13}
15 14
16static inline void 15static inline void
17del_page_from_active_list(struct zone *zone, struct page *page) 16del_page_from_active_list(struct zone *zone, struct page *page)
18{ 17{
19 list_del(&page->lru); 18 list_del(&page->lru);
20 zone->nr_active--; 19 __dec_zone_state(zone, NR_ACTIVE);
21} 20}
22 21
23static inline void 22static inline void
24del_page_from_inactive_list(struct zone *zone, struct page *page) 23del_page_from_inactive_list(struct zone *zone, struct page *page)
25{ 24{
26 list_del(&page->lru); 25 list_del(&page->lru);
27 zone->nr_inactive--; 26 __dec_zone_state(zone, NR_INACTIVE);
28} 27}
29 28
30static inline void 29static inline void
@@ -33,9 +32,9 @@ del_page_from_lru(struct zone *zone, struct page *page)
33 list_del(&page->lru); 32 list_del(&page->lru);
34 if (PageActive(page)) { 33 if (PageActive(page)) {
35 __ClearPageActive(page); 34 __ClearPageActive(page);
36 zone->nr_active--; 35 __dec_zone_state(zone, NR_ACTIVE);
37 } else { 36 } else {
38 zone->nr_inactive--; 37 __dec_zone_state(zone, NR_INACTIVE);
39 } 38 }
40} 39}
41 40
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index b262f47961fb..ee9e3143df4f 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -47,15 +47,20 @@ struct zone_padding {
47#endif 47#endif
48 48
49enum zone_stat_item { 49enum zone_stat_item {
50 /* First 128 byte cacheline (assuming 64 bit words) */
51 NR_FREE_PAGES,
52 NR_INACTIVE,
53 NR_ACTIVE,
50 NR_ANON_PAGES, /* Mapped anonymous pages */ 54 NR_ANON_PAGES, /* Mapped anonymous pages */
51 NR_FILE_MAPPED, /* pagecache pages mapped into pagetables. 55 NR_FILE_MAPPED, /* pagecache pages mapped into pagetables.
52 only modified from process context */ 56 only modified from process context */
53 NR_FILE_PAGES, 57 NR_FILE_PAGES,
54 NR_SLAB_RECLAIMABLE,
55 NR_SLAB_UNRECLAIMABLE,
56 NR_PAGETABLE, /* used for pagetables */
57 NR_FILE_DIRTY, 58 NR_FILE_DIRTY,
58 NR_WRITEBACK, 59 NR_WRITEBACK,
60 /* Second 128 byte cacheline */
61 NR_SLAB_RECLAIMABLE,
62 NR_SLAB_UNRECLAIMABLE,
63 NR_PAGETABLE, /* used for pagetables */
59 NR_UNSTABLE_NFS, /* NFS unstable pages */ 64 NR_UNSTABLE_NFS, /* NFS unstable pages */
60 NR_BOUNCE, 65 NR_BOUNCE,
61 NR_VMSCAN_WRITE, 66 NR_VMSCAN_WRITE,
@@ -91,6 +96,7 @@ struct per_cpu_pageset {
91#endif 96#endif
92 97
93enum zone_type { 98enum zone_type {
99#ifdef CONFIG_ZONE_DMA
94 /* 100 /*
95 * ZONE_DMA is used when there are devices that are not able 101 * ZONE_DMA is used when there are devices that are not able
96 * to do DMA to all of addressable memory (ZONE_NORMAL). Then we 102 * to do DMA to all of addressable memory (ZONE_NORMAL). Then we
@@ -111,6 +117,7 @@ enum zone_type {
111 * <16M. 117 * <16M.
112 */ 118 */
113 ZONE_DMA, 119 ZONE_DMA,
120#endif
114#ifdef CONFIG_ZONE_DMA32 121#ifdef CONFIG_ZONE_DMA32
115 /* 122 /*
116 * x86_64 needs two ZONE_DMAs because it supports devices that are 123 * x86_64 needs two ZONE_DMAs because it supports devices that are
@@ -147,15 +154,30 @@ enum zone_type {
147 * match the requested limits. See gfp_zone() in include/linux/gfp.h 154 * match the requested limits. See gfp_zone() in include/linux/gfp.h
148 */ 155 */
149 156
150#if !defined(CONFIG_ZONE_DMA32) && !defined(CONFIG_HIGHMEM) 157/*
158 * Count the active zones. Note that the use of defined(X) outside
159 * #if and family is not necessarily defined so ensure we cannot use
160 * it later. Use __ZONE_COUNT to work out how many shift bits we need.
161 */
162#define __ZONE_COUNT ( \
163 defined(CONFIG_ZONE_DMA) \
164 + defined(CONFIG_ZONE_DMA32) \
165 + 1 \
166 + defined(CONFIG_HIGHMEM) \
167)
168#if __ZONE_COUNT < 2
169#define ZONES_SHIFT 0
170#elif __ZONE_COUNT <= 2
151#define ZONES_SHIFT 1 171#define ZONES_SHIFT 1
152#else 172#elif __ZONE_COUNT <= 4
153#define ZONES_SHIFT 2 173#define ZONES_SHIFT 2
174#else
175#error ZONES_SHIFT -- too many zones configured adjust calculation
154#endif 176#endif
177#undef __ZONE_COUNT
155 178
156struct zone { 179struct zone {
157 /* Fields commonly accessed by the page allocator */ 180 /* Fields commonly accessed by the page allocator */
158 unsigned long free_pages;
159 unsigned long pages_min, pages_low, pages_high; 181 unsigned long pages_min, pages_low, pages_high;
160 /* 182 /*
161 * We don't know if the memory that we're going to allocate will be freeable 183 * We don't know if the memory that we're going to allocate will be freeable
@@ -197,8 +219,6 @@ struct zone {
197 struct list_head inactive_list; 219 struct list_head inactive_list;
198 unsigned long nr_scan_active; 220 unsigned long nr_scan_active;
199 unsigned long nr_scan_inactive; 221 unsigned long nr_scan_inactive;
200 unsigned long nr_active;
201 unsigned long nr_inactive;
202 unsigned long pages_scanned; /* since last reclaim */ 222 unsigned long pages_scanned; /* since last reclaim */
203 int all_unreclaimable; /* All pages pinned */ 223 int all_unreclaimable; /* All pages pinned */
204 224
@@ -442,8 +462,6 @@ typedef struct pglist_data {
442 462
443#include <linux/memory_hotplug.h> 463#include <linux/memory_hotplug.h>
444 464
445void __get_zone_counts(unsigned long *active, unsigned long *inactive,
446 unsigned long *free, struct pglist_data *pgdat);
447void get_zone_counts(unsigned long *active, unsigned long *inactive, 465void get_zone_counts(unsigned long *active, unsigned long *inactive,
448 unsigned long *free); 466 unsigned long *free);
449void build_all_zonelists(void); 467void build_all_zonelists(void);
@@ -523,7 +541,11 @@ static inline int is_dma32(struct zone *zone)
523 541
524static inline int is_dma(struct zone *zone) 542static inline int is_dma(struct zone *zone)
525{ 543{
544#ifdef CONFIG_ZONE_DMA
526 return zone == zone->zone_pgdat->node_zones + ZONE_DMA; 545 return zone == zone->zone_pgdat->node_zones + ZONE_DMA;
546#else
547 return 0;
548#endif
527} 549}
528 550
529/* These two functions are used to setup the per zone pages min values */ 551/* These two functions are used to setup the per zone pages min values */
diff --git a/include/linux/mount.h b/include/linux/mount.h
index 1b7e178b0d84..dab69afee2fa 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
@@ -43,9 +43,8 @@ struct vfsmount {
43 struct super_block *mnt_sb; /* pointer to superblock */ 43 struct super_block *mnt_sb; /* pointer to superblock */
44 struct list_head mnt_mounts; /* list of children, anchored here */ 44 struct list_head mnt_mounts; /* list of children, anchored here */
45 struct list_head mnt_child; /* and going through their mnt_child */ 45 struct list_head mnt_child; /* and going through their mnt_child */
46 atomic_t mnt_count;
47 int mnt_flags; 46 int mnt_flags;
48 int mnt_expiry_mark; /* true if marked for expiry */ 47 /* 4 bytes hole on 64bits arches */
49 char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */ 48 char *mnt_devname; /* Name of device e.g. /dev/dsk/hda1 */
50 struct list_head mnt_list; 49 struct list_head mnt_list;
51 struct list_head mnt_expire; /* link in fs-specific expiry list */ 50 struct list_head mnt_expire; /* link in fs-specific expiry list */
@@ -54,6 +53,13 @@ struct vfsmount {
54 struct list_head mnt_slave; /* slave list entry */ 53 struct list_head mnt_slave; /* slave list entry */
55 struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */ 54 struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */
56 struct mnt_namespace *mnt_ns; /* containing namespace */ 55 struct mnt_namespace *mnt_ns; /* containing namespace */
56 /*
57 * We put mnt_count & mnt_expiry_mark at the end of struct vfsmount
58 * to let these frequently modified fields in a separate cache line
59 * (so that reads of mnt_flags wont ping-pong on SMP machines)
60 */
61 atomic_t mnt_count;
62 int mnt_expiry_mark; /* true if marked for expiry */
57 int mnt_pinned; 63 int mnt_pinned;
58}; 64};
59 65
diff --git a/include/linux/msdos_fs.h b/include/linux/msdos_fs.h
index 24a9ef1506b6..fa253fa73aa3 100644
--- a/include/linux/msdos_fs.h
+++ b/include/linux/msdos_fs.h
@@ -234,7 +234,7 @@ struct msdos_sb_info {
234 struct fat_mount_options options; 234 struct fat_mount_options options;
235 struct nls_table *nls_disk; /* Codepage used on disk */ 235 struct nls_table *nls_disk; /* Codepage used on disk */
236 struct nls_table *nls_io; /* Charset used for input and display */ 236 struct nls_table *nls_io; /* Charset used for input and display */
237 void *dir_ops; /* Opaque; default directory operations */ 237 const void *dir_ops; /* Opaque; default directory operations */
238 int dir_per_block; /* dir entries per block */ 238 int dir_per_block; /* dir entries per block */
239 int dir_per_block_bits; /* log2(dir_per_block) */ 239 int dir_per_block_bits; /* log2(dir_per_block) */
240 240
@@ -399,7 +399,7 @@ extern int fat_count_free_clusters(struct super_block *sb);
399extern int fat_generic_ioctl(struct inode *inode, struct file *filp, 399extern int fat_generic_ioctl(struct inode *inode, struct file *filp,
400 unsigned int cmd, unsigned long arg); 400 unsigned int cmd, unsigned long arg);
401extern const struct file_operations fat_file_operations; 401extern const struct file_operations fat_file_operations;
402extern struct inode_operations fat_file_inode_operations; 402extern const struct inode_operations fat_file_inode_operations;
403extern int fat_notify_change(struct dentry * dentry, struct iattr * attr); 403extern int fat_notify_change(struct dentry * dentry, struct iattr * attr);
404extern void fat_truncate(struct inode *inode); 404extern void fat_truncate(struct inode *inode);
405extern int fat_getattr(struct vfsmount *mnt, struct dentry *dentry, 405extern int fat_getattr(struct vfsmount *mnt, struct dentry *dentry,
@@ -413,7 +413,7 @@ extern struct inode *fat_build_inode(struct super_block *sb,
413 struct msdos_dir_entry *de, loff_t i_pos); 413 struct msdos_dir_entry *de, loff_t i_pos);
414extern int fat_sync_inode(struct inode *inode); 414extern int fat_sync_inode(struct inode *inode);
415extern int fat_fill_super(struct super_block *sb, void *data, int silent, 415extern int fat_fill_super(struct super_block *sb, void *data, int silent,
416 struct inode_operations *fs_dir_inode_ops, int isvfat); 416 const struct inode_operations *fs_dir_inode_ops, int isvfat);
417 417
418extern int fat_flush_inodes(struct super_block *sb, struct inode *i1, 418extern int fat_flush_inodes(struct super_block *sb, struct inode *i1,
419 struct inode *i2); 419 struct inode *i2);
diff --git a/include/linux/ncp_fs.h b/include/linux/ncp_fs.h
index 0ea7f89e613c..83e39eb054d3 100644
--- a/include/linux/ncp_fs.h
+++ b/include/linux/ncp_fs.h
@@ -204,7 +204,7 @@ void ncp_update_inode(struct inode *, struct ncp_entry_info *);
204void ncp_update_inode2(struct inode *, struct ncp_entry_info *); 204void ncp_update_inode2(struct inode *, struct ncp_entry_info *);
205 205
206/* linux/fs/ncpfs/dir.c */ 206/* linux/fs/ncpfs/dir.c */
207extern struct inode_operations ncp_dir_inode_operations; 207extern const struct inode_operations ncp_dir_inode_operations;
208extern const struct file_operations ncp_dir_operations; 208extern const struct file_operations ncp_dir_operations;
209int ncp_conn_logged_in(struct super_block *); 209int ncp_conn_logged_in(struct super_block *);
210int ncp_date_dos2unix(__le16 time, __le16 date); 210int ncp_date_dos2unix(__le16 time, __le16 date);
@@ -226,7 +226,7 @@ void ncp_lock_server(struct ncp_server *server);
226void ncp_unlock_server(struct ncp_server *server); 226void ncp_unlock_server(struct ncp_server *server);
227 227
228/* linux/fs/ncpfs/file.c */ 228/* linux/fs/ncpfs/file.c */
229extern struct inode_operations ncp_file_inode_operations; 229extern const struct inode_operations ncp_file_inode_operations;
230extern const struct file_operations ncp_file_operations; 230extern const struct file_operations ncp_file_operations;
231int ncp_make_open(struct inode *, int); 231int ncp_make_open(struct inode *, int);
232 232
diff --git a/include/linux/netfilter.h b/include/linux/netfilter.h
index d4c4c5120bc0..70d3b4f1e48d 100644
--- a/include/linux/netfilter.h
+++ b/include/linux/netfilter.h
@@ -172,8 +172,8 @@ struct nf_logger {
172 172
173/* Function to register/unregister log function. */ 173/* Function to register/unregister log function. */
174int nf_log_register(int pf, struct nf_logger *logger); 174int nf_log_register(int pf, struct nf_logger *logger);
175int nf_log_unregister_pf(int pf); 175void nf_log_unregister(struct nf_logger *logger);
176void nf_log_unregister_logger(struct nf_logger *logger); 176void nf_log_unregister_pf(int pf);
177 177
178/* Calls the registered backend logging function */ 178/* Calls the registered backend logging function */
179void nf_log_packet(int pf, 179void nf_log_packet(int pf,
diff --git a/include/linux/netfilter_ipv4/ip_conntrack.h b/include/linux/netfilter_ipv4/ip_conntrack.h
index 33581c13d947..da9274e6bf12 100644
--- a/include/linux/netfilter_ipv4/ip_conntrack.h
+++ b/include/linux/netfilter_ipv4/ip_conntrack.h
@@ -301,6 +301,12 @@ extern unsigned int ip_conntrack_htable_size;
301extern int ip_conntrack_checksum; 301extern int ip_conntrack_checksum;
302 302
303#define CONNTRACK_STAT_INC(count) (__get_cpu_var(ip_conntrack_stat).count++) 303#define CONNTRACK_STAT_INC(count) (__get_cpu_var(ip_conntrack_stat).count++)
304#define CONNTRACK_STAT_INC_ATOMIC(count) \
305do { \
306 local_bh_disable(); \
307 __get_cpu_var(ip_conntrack_stat).count++; \
308 local_bh_enable(); \
309} while (0)
304 310
305#ifdef CONFIG_IP_NF_CONNTRACK_EVENTS 311#ifdef CONFIG_IP_NF_CONNTRACK_EVENTS
306#include <linux/notifier.h> 312#include <linux/notifier.h>
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index b3b9b609ee89..2a20f488ac1b 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -23,6 +23,7 @@
23#define NETLINK_GENERIC 16 23#define NETLINK_GENERIC 16
24/* leave room for NETLINK_DM (DM Events) */ 24/* leave room for NETLINK_DM (DM Events) */
25#define NETLINK_SCSITRANSPORT 18 /* SCSI Transports */ 25#define NETLINK_SCSITRANSPORT 18 /* SCSI Transports */
26#define NETLINK_ECRYPTFS 19
26 27
27#define MAX_LINKS 32 28#define MAX_LINKS 32
28 29
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index c5d4084773e8..ed0f2eac8f50 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -331,9 +331,9 @@ static inline void nfs_fattr_init(struct nfs_fattr *fattr)
331/* 331/*
332 * linux/fs/nfs/file.c 332 * linux/fs/nfs/file.c
333 */ 333 */
334extern struct inode_operations nfs_file_inode_operations; 334extern const struct inode_operations nfs_file_inode_operations;
335#ifdef CONFIG_NFS_V3 335#ifdef CONFIG_NFS_V3
336extern struct inode_operations nfs3_file_inode_operations; 336extern const struct inode_operations nfs3_file_inode_operations;
337#endif /* CONFIG_NFS_V3 */ 337#endif /* CONFIG_NFS_V3 */
338extern const struct file_operations nfs_file_operations; 338extern const struct file_operations nfs_file_operations;
339extern const struct address_space_operations nfs_file_aops; 339extern const struct address_space_operations nfs_file_aops;
@@ -380,9 +380,9 @@ extern ssize_t nfs_file_direct_write(struct kiocb *iocb,
380/* 380/*
381 * linux/fs/nfs/dir.c 381 * linux/fs/nfs/dir.c
382 */ 382 */
383extern struct inode_operations nfs_dir_inode_operations; 383extern const struct inode_operations nfs_dir_inode_operations;
384#ifdef CONFIG_NFS_V3 384#ifdef CONFIG_NFS_V3
385extern struct inode_operations nfs3_dir_inode_operations; 385extern const struct inode_operations nfs3_dir_inode_operations;
386#endif /* CONFIG_NFS_V3 */ 386#endif /* CONFIG_NFS_V3 */
387extern const struct file_operations nfs_dir_operations; 387extern const struct file_operations nfs_dir_operations;
388extern struct dentry_operations nfs_dentry_operations; 388extern struct dentry_operations nfs_dentry_operations;
@@ -392,7 +392,7 @@ extern int nfs_instantiate(struct dentry *dentry, struct nfs_fh *fh, struct nfs_
392/* 392/*
393 * linux/fs/nfs/symlink.c 393 * linux/fs/nfs/symlink.c
394 */ 394 */
395extern struct inode_operations nfs_symlink_inode_operations; 395extern const struct inode_operations nfs_symlink_inode_operations;
396 396
397/* 397/*
398 * linux/fs/nfs/sysctl.c 398 * linux/fs/nfs/sysctl.c
@@ -409,8 +409,8 @@ extern void nfs_unregister_sysctl(void);
409 * linux/fs/nfs/namespace.c 409 * linux/fs/nfs/namespace.c
410 */ 410 */
411extern struct list_head nfs_automount_list; 411extern struct list_head nfs_automount_list;
412extern struct inode_operations nfs_mountpoint_inode_operations; 412extern const struct inode_operations nfs_mountpoint_inode_operations;
413extern struct inode_operations nfs_referral_inode_operations; 413extern const struct inode_operations nfs_referral_inode_operations;
414extern int nfs_mountpoint_expiry_timeout; 414extern int nfs_mountpoint_expiry_timeout;
415extern void nfs_release_automount_timer(void); 415extern void nfs_release_automount_timer(void);
416 416
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 9ee9da5e1cc9..30d7116d601e 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -767,8 +767,8 @@ struct nfs_access_entry;
767struct nfs_rpc_ops { 767struct nfs_rpc_ops {
768 int version; /* Protocol version */ 768 int version; /* Protocol version */
769 struct dentry_operations *dentry_ops; 769 struct dentry_operations *dentry_ops;
770 struct inode_operations *dir_inode_ops; 770 const struct inode_operations *dir_inode_ops;
771 struct inode_operations *file_inode_ops; 771 const struct inode_operations *file_inode_ops;
772 772
773 int (*getroot) (struct nfs_server *, struct nfs_fh *, 773 int (*getroot) (struct nfs_server *, struct nfs_fh *,
774 struct nfs_fsinfo *); 774 struct nfs_fsinfo *);
diff --git a/include/linux/nfsd/const.h b/include/linux/nfsd/const.h
index f0cc77790527..323f8cfa060a 100644
--- a/include/linux/nfsd/const.h
+++ b/include/linux/nfsd/const.h
@@ -30,10 +30,6 @@
30 30
31#include <linux/sunrpc/msg_prot.h> 31#include <linux/sunrpc/msg_prot.h>
32 32
33#ifndef NFS_SUPER_MAGIC
34# define NFS_SUPER_MAGIC 0x6969
35#endif
36
37/* 33/*
38 * Largest number of bytes we need to allocate for an NFS 34 * Largest number of bytes we need to allocate for an NFS
39 * call or reply. Used to control buffer sizes. We use 35 * call or reply. Used to control buffer sizes. We use
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 805412cc6875..98c8765a488e 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -167,6 +167,7 @@ struct pci_dev {
167 unsigned int broken_parity_status:1; /* Device generates false positive parity */ 167 unsigned int broken_parity_status:1; /* Device generates false positive parity */
168 unsigned int msi_enabled:1; 168 unsigned int msi_enabled:1;
169 unsigned int msix_enabled:1; 169 unsigned int msix_enabled:1;
170 unsigned int is_managed:1;
170 atomic_t enable_cnt; /* pci_enable_device has been called */ 171 atomic_t enable_cnt; /* pci_enable_device has been called */
171 172
172 u32 saved_config_space[16]; /* config space saved at suspend time */ 173 u32 saved_config_space[16]; /* config space saved at suspend time */
@@ -528,6 +529,14 @@ static inline int pci_write_config_dword(struct pci_dev *dev, int where, u32 val
528 529
529int __must_check pci_enable_device(struct pci_dev *dev); 530int __must_check pci_enable_device(struct pci_dev *dev);
530int __must_check pci_enable_device_bars(struct pci_dev *dev, int mask); 531int __must_check pci_enable_device_bars(struct pci_dev *dev, int mask);
532int __must_check pcim_enable_device(struct pci_dev *pdev);
533void pcim_pin_device(struct pci_dev *pdev);
534
535static inline int pci_is_managed(struct pci_dev *pdev)
536{
537 return pdev->is_managed;
538}
539
531void pci_disable_device(struct pci_dev *dev); 540void pci_disable_device(struct pci_dev *dev);
532void pci_set_master(struct pci_dev *dev); 541void pci_set_master(struct pci_dev *dev);
533#define HAVE_PCI_SET_MWI 542#define HAVE_PCI_SET_MWI
@@ -831,6 +840,11 @@ enum pci_fixup_pass {
831 840
832void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev); 841void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev);
833 842
843void __iomem * pcim_iomap(struct pci_dev *pdev, int bar, unsigned long maxlen);
844void pcim_iounmap(struct pci_dev *pdev, void __iomem *addr);
845void __iomem * const * pcim_iomap_table(struct pci_dev *pdev);
846int pcim_iomap_regions(struct pci_dev *pdev, u16 mask, const char *name);
847
834extern int pci_pci_problems; 848extern int pci_pci_problems;
835#define PCIPCI_FAIL 1 /* No PCI PCI DMA */ 849#define PCIPCI_FAIL 1 /* No PCI PCI DMA */
836#define PCIPCI_TRITON 2 850#define PCIPCI_TRITON 2
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 6252cb9092dd..8fb9c3e06eef 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -15,6 +15,8 @@
15#define PCI_CLASS_STORAGE_FLOPPY 0x0102 15#define PCI_CLASS_STORAGE_FLOPPY 0x0102
16#define PCI_CLASS_STORAGE_IPI 0x0103 16#define PCI_CLASS_STORAGE_IPI 0x0103
17#define PCI_CLASS_STORAGE_RAID 0x0104 17#define PCI_CLASS_STORAGE_RAID 0x0104
18#define PCI_CLASS_STORAGE_SATA 0x0106
19#define PCI_CLASS_STORAGE_SATA_AHCI 0x010601
18#define PCI_CLASS_STORAGE_SAS 0x0107 20#define PCI_CLASS_STORAGE_SAS 0x0107
19#define PCI_CLASS_STORAGE_OTHER 0x0180 21#define PCI_CLASS_STORAGE_OTHER 0x0180
20 22
@@ -957,6 +959,7 @@
957#define PCI_DEVICE_ID_PLX_R753 0x1152 959#define PCI_DEVICE_ID_PLX_R753 0x1152
958#define PCI_DEVICE_ID_PLX_OLITEC 0x1187 960#define PCI_DEVICE_ID_PLX_OLITEC 0x1187
959#define PCI_DEVICE_ID_PLX_PCI200SYN 0x3196 961#define PCI_DEVICE_ID_PLX_PCI200SYN 0x3196
962#define PCI_DEVICE_ID_PLX_9030 0x9030
960#define PCI_DEVICE_ID_PLX_9050 0x9050 963#define PCI_DEVICE_ID_PLX_9050 0x9050
961#define PCI_DEVICE_ID_PLX_9080 0x9080 964#define PCI_DEVICE_ID_PLX_9080 0x9080
962#define PCI_DEVICE_ID_PLX_GTEK_SERIAL2 0xa001 965#define PCI_DEVICE_ID_PLX_GTEK_SERIAL2 0xa001
@@ -1633,6 +1636,7 @@
1633#define PCI_VENDOR_ID_ITE 0x1283 1636#define PCI_VENDOR_ID_ITE 0x1283
1634#define PCI_DEVICE_ID_ITE_8211 0x8211 1637#define PCI_DEVICE_ID_ITE_8211 0x8211
1635#define PCI_DEVICE_ID_ITE_8212 0x8212 1638#define PCI_DEVICE_ID_ITE_8212 0x8212
1639#define PCI_DEVICE_ID_ITE_8213 0x8213
1636#define PCI_DEVICE_ID_ITE_8872 0x8872 1640#define PCI_DEVICE_ID_ITE_8872 0x8872
1637#define PCI_DEVICE_ID_ITE_IT8330G_0 0xe886 1641#define PCI_DEVICE_ID_ITE_IT8330G_0 0xe886
1638 1642
@@ -1693,6 +1697,8 @@
1693#define PCI_VENDOR_ID_ELECTRONICDESIGNGMBH 0x12f8 1697#define PCI_VENDOR_ID_ELECTRONICDESIGNGMBH 0x12f8
1694#define PCI_DEVICE_ID_LML_33R10 0x8a02 1698#define PCI_DEVICE_ID_LML_33R10 0x8a02
1695 1699
1700#define PCI_VENDOR_ID_ESDGMBH 0x12fe
1701#define PCI_DEVICE_ID_ESDGMBH_CPCIASIO4 0x0111
1696 1702
1697#define PCI_VENDOR_ID_SIIG 0x131f 1703#define PCI_VENDOR_ID_SIIG 0x131f
1698#define PCI_SUBVENDOR_ID_SIIG 0x131f 1704#define PCI_SUBVENDOR_ID_SIIG 0x131f
@@ -1808,6 +1814,9 @@
1808#define PCI_DEVICE_ID_MOXA_C168 0x1680 1814#define PCI_DEVICE_ID_MOXA_C168 0x1680
1809#define PCI_DEVICE_ID_MOXA_CP168U 0x1681 1815#define PCI_DEVICE_ID_MOXA_CP168U 0x1681
1810#define PCI_DEVICE_ID_MOXA_CP168EL 0x1682 1816#define PCI_DEVICE_ID_MOXA_CP168EL 0x1682
1817#define PCI_DEVICE_ID_MOXA_CP204J 0x2040
1818#define PCI_DEVICE_ID_MOXA_C218 0x2180
1819#define PCI_DEVICE_ID_MOXA_C320 0x3200
1811 1820
1812#define PCI_VENDOR_ID_CCD 0x1397 1821#define PCI_VENDOR_ID_CCD 0x1397
1813#define PCI_DEVICE_ID_CCD_2BD0 0x2bd0 1822#define PCI_DEVICE_ID_CCD_2BD0 0x2bd0
@@ -1988,6 +1997,10 @@
1988 1997
1989#define PCI_VENDOR_ID_CHELSIO 0x1425 1998#define PCI_VENDOR_ID_CHELSIO 0x1425
1990 1999
2000#define PCI_SUBVENDOR_ID_PERLE 0x155f
2001#define PCI_SUBDEVICE_ID_PCI_RAS4 0xf001
2002#define PCI_SUBDEVICE_ID_PCI_RAS8 0xf010
2003
1991 2004
1992#define PCI_VENDOR_ID_SYBA 0x1592 2005#define PCI_VENDOR_ID_SYBA 0x1592
1993#define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782 2006#define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782
diff --git a/include/linux/phonedev.h b/include/linux/phonedev.h
index a0e31adf3abe..4269de99e320 100644
--- a/include/linux/phonedev.h
+++ b/include/linux/phonedev.h
@@ -9,7 +9,7 @@
9 9
10struct phone_device { 10struct phone_device {
11 struct phone_device *next; 11 struct phone_device *next;
12 struct file_operations *f_op; 12 const struct file_operations *f_op;
13 int (*open) (struct phone_device *, struct file *); 13 int (*open) (struct phone_device *, struct file *);
14 int board; /* Device private index */ 14 int board; /* Device private index */
15 int minor; 15 int minor;
diff --git a/include/linux/pid.h b/include/linux/pid.h
index 4dec047b1837..2ac27f9997dd 100644
--- a/include/linux/pid.h
+++ b/include/linux/pid.h
@@ -105,20 +105,6 @@ static inline pid_t pid_nr(struct pid *pid)
105 return nr; 105 return nr;
106} 106}
107 107
108
109#define do_each_task_pid(who, type, task) \
110 do { \
111 struct hlist_node *pos___; \
112 struct pid *pid___ = find_pid(who); \
113 if (pid___ != NULL) \
114 hlist_for_each_entry_rcu((task), pos___, \
115 &pid___->tasks[type], pids[type].node) {
116
117#define while_each_task_pid(who, type, task) \
118 } \
119 } while (0)
120
121
122#define do_each_pid_task(pid, type, task) \ 108#define do_each_pid_task(pid, type, task) \
123 do { \ 109 do { \
124 struct hlist_node *pos___; \ 110 struct hlist_node *pos___; \
diff --git a/include/linux/pnp.h b/include/linux/pnp.h
index ab8a8dd8d64c..9a5226f0f169 100644
--- a/include/linux/pnp.h
+++ b/include/linux/pnp.h
@@ -352,6 +352,8 @@ struct pnp_protocol {
352 (dev) = protocol_to_pnp_dev((dev)->protocol_list.next)) 352 (dev) = protocol_to_pnp_dev((dev)->protocol_list.next))
353 353
354 354
355extern struct bus_type pnp_bus_type;
356
355#if defined(CONFIG_PNP) 357#if defined(CONFIG_PNP)
356 358
357/* device management */ 359/* device management */
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 87dec8fe6de9..2e132473cbe5 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -55,8 +55,8 @@ struct proc_dir_entry {
55 uid_t uid; 55 uid_t uid;
56 gid_t gid; 56 gid_t gid;
57 loff_t size; 57 loff_t size;
58 struct inode_operations * proc_iops; 58 const struct inode_operations *proc_iops;
59 const struct file_operations * proc_fops; 59 const struct file_operations *proc_fops;
60 get_info_t *get_info; 60 get_info_t *get_info;
61 struct module *owner; 61 struct module *owner;
62 struct proc_dir_entry *next, *parent, *subdir; 62 struct proc_dir_entry *next, *parent, *subdir;
diff --git a/include/linux/qnx4_fs.h b/include/linux/qnx4_fs.h
index 0c7ac444fd35..19bc9b8b6191 100644
--- a/include/linux/qnx4_fs.h
+++ b/include/linux/qnx4_fs.h
@@ -116,8 +116,8 @@ extern unsigned long qnx4_block_map(struct inode *inode, long iblock);
116 116
117extern struct buffer_head *qnx4_bread(struct inode *, int, int); 117extern struct buffer_head *qnx4_bread(struct inode *, int, int);
118 118
119extern struct inode_operations qnx4_file_inode_operations; 119extern const struct inode_operations qnx4_file_inode_operations;
120extern struct inode_operations qnx4_dir_inode_operations; 120extern const struct inode_operations qnx4_dir_inode_operations;
121extern const struct file_operations qnx4_file_operations; 121extern const struct file_operations qnx4_file_operations;
122extern const struct file_operations qnx4_dir_operations; 122extern const struct file_operations qnx4_dir_operations;
123extern int qnx4_is_free(struct super_block *sb, long block); 123extern int qnx4_is_free(struct super_block *sb, long block);
diff --git a/include/linux/quota.h b/include/linux/quota.h
index b8fbf26eb885..77db80a953d6 100644
--- a/include/linux/quota.h
+++ b/include/linux/quota.h
@@ -132,6 +132,7 @@ struct if_dqinfo {
132 132
133#ifdef __KERNEL__ 133#ifdef __KERNEL__
134#include <linux/spinlock.h> 134#include <linux/spinlock.h>
135#include <linux/rwsem.h>
135#include <linux/mutex.h> 136#include <linux/mutex.h>
136 137
137#include <linux/dqblk_xfs.h> 138#include <linux/dqblk_xfs.h>
diff --git a/include/linux/random.h b/include/linux/random.h
index 01ad71033d65..36f125c0c603 100644
--- a/include/linux/random.h
+++ b/include/linux/random.h
@@ -63,7 +63,7 @@ extern u64 secure_dccp_sequence_number(__be32 saddr, __be32 daddr,
63 __be16 sport, __be16 dport); 63 __be16 sport, __be16 dport);
64 64
65#ifndef MODULE 65#ifndef MODULE
66extern struct file_operations random_fops, urandom_fops; 66extern const struct file_operations random_fops, urandom_fops;
67#endif 67#endif
68 68
69unsigned int get_random_int(void); 69unsigned int get_random_int(void);
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h
index c3fc6caaad3f..965d5b3ea9eb 100644
--- a/include/linux/reiserfs_fs.h
+++ b/include/linux/reiserfs_fs.h
@@ -1949,9 +1949,9 @@ int reiserfs_global_version_in_proc(char *buffer, char **start, off_t offset,
1949#endif 1949#endif
1950 1950
1951/* dir.c */ 1951/* dir.c */
1952extern struct inode_operations reiserfs_dir_inode_operations; 1952extern const struct inode_operations reiserfs_dir_inode_operations;
1953extern struct inode_operations reiserfs_symlink_inode_operations; 1953extern const struct inode_operations reiserfs_symlink_inode_operations;
1954extern struct inode_operations reiserfs_special_inode_operations; 1954extern const struct inode_operations reiserfs_special_inode_operations;
1955extern const struct file_operations reiserfs_dir_operations; 1955extern const struct file_operations reiserfs_dir_operations;
1956 1956
1957/* tail_conversion.c */ 1957/* tail_conversion.c */
@@ -1963,7 +1963,7 @@ int indirect2direct(struct reiserfs_transaction_handle *, struct inode *,
1963void reiserfs_unmap_buffer(struct buffer_head *); 1963void reiserfs_unmap_buffer(struct buffer_head *);
1964 1964
1965/* file.c */ 1965/* file.c */
1966extern struct inode_operations reiserfs_file_inode_operations; 1966extern const struct inode_operations reiserfs_file_inode_operations;
1967extern const struct file_operations reiserfs_file_operations; 1967extern const struct file_operations reiserfs_file_operations;
1968extern const struct address_space_operations reiserfs_address_space_operations; 1968extern const struct address_space_operations reiserfs_address_space_operations;
1969 1969
diff --git a/include/linux/reiserfs_xattr.h b/include/linux/reiserfs_xattr.h
index 966c35851b2e..66a96814d614 100644
--- a/include/linux/reiserfs_xattr.h
+++ b/include/linux/reiserfs_xattr.h
@@ -2,7 +2,10 @@
2 File: linux/reiserfs_xattr.h 2 File: linux/reiserfs_xattr.h
3*/ 3*/
4 4
5#include <linux/xattr.h> 5#ifndef _LINUX_REISERFS_XATTR_H
6#define _LINUX_REISERFS_XATTR_H
7
8#include <linux/types.h>
6 9
7/* Magic value in header */ 10/* Magic value in header */
8#define REISERFS_XATTR_MAGIC 0x52465841 /* "RFXA" */ 11#define REISERFS_XATTR_MAGIC 0x52465841 /* "RFXA" */
@@ -13,7 +16,18 @@ struct reiserfs_xattr_header {
13}; 16};
14 17
15#ifdef __KERNEL__ 18#ifdef __KERNEL__
19
16#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/list.h>
22#include <linux/rwsem.h>
23#include <linux/reiserfs_fs_i.h>
24#include <linux/reiserfs_fs.h>
25
26struct inode;
27struct dentry;
28struct iattr;
29struct super_block;
30struct nameidata;
17 31
18struct reiserfs_xattr_handler { 32struct reiserfs_xattr_handler {
19 char *prefix; 33 char *prefix;
@@ -49,9 +63,7 @@ int reiserfs_xattr_set(struct inode *, const char *, const void *, size_t, int);
49 63
50extern struct reiserfs_xattr_handler user_handler; 64extern struct reiserfs_xattr_handler user_handler;
51extern struct reiserfs_xattr_handler trusted_handler; 65extern struct reiserfs_xattr_handler trusted_handler;
52#ifdef CONFIG_REISERFS_FS_SECURITY
53extern struct reiserfs_xattr_handler security_handler; 66extern struct reiserfs_xattr_handler security_handler;
54#endif
55 67
56int reiserfs_xattr_register_handlers(void) __init; 68int reiserfs_xattr_register_handlers(void) __init;
57void reiserfs_xattr_unregister_handlers(void); 69void reiserfs_xattr_unregister_handlers(void);
@@ -137,6 +149,8 @@ static inline int reiserfs_xattr_init(struct super_block *sb, int mount_flags)
137static inline void reiserfs_init_xattr_rwsem(struct inode *inode) 149static inline void reiserfs_init_xattr_rwsem(struct inode *inode)
138{ 150{
139} 151}
140#endif 152#endif /* CONFIG_REISERFS_FS_XATTR */
153
154#endif /* __KERNEL__ */
141 155
142#endif /* __KERNEL__ */ 156#endif /* _LINUX_REISERFS_XATTR_H */
diff --git a/include/linux/relay.h b/include/linux/relay.h
index c6a48bfc8b14..759a0f97bec2 100644
--- a/include/linux/relay.h
+++ b/include/linux/relay.h
@@ -24,7 +24,7 @@
24/* 24/*
25 * Tracks changes to rchan/rchan_buf structs 25 * Tracks changes to rchan/rchan_buf structs
26 */ 26 */
27#define RELAYFS_CHANNEL_VERSION 6 27#define RELAYFS_CHANNEL_VERSION 7
28 28
29/* 29/*
30 * Per-cpu relay channel buffer 30 * Per-cpu relay channel buffer
@@ -64,6 +64,10 @@ struct rchan
64 void *private_data; /* for user-defined data */ 64 void *private_data; /* for user-defined data */
65 size_t last_toobig; /* tried to log event > subbuf size */ 65 size_t last_toobig; /* tried to log event > subbuf size */
66 struct rchan_buf *buf[NR_CPUS]; /* per-cpu channel buffers */ 66 struct rchan_buf *buf[NR_CPUS]; /* per-cpu channel buffers */
67 int is_global; /* One global buffer ? */
68 struct list_head list; /* for channel list */
69 struct dentry *parent; /* parent dentry passed to open */
70 char base_filename[NAME_MAX]; /* saved base filename */
67}; 71};
68 72
69/* 73/*
@@ -162,7 +166,8 @@ struct rchan *relay_open(const char *base_filename,
162 struct dentry *parent, 166 struct dentry *parent,
163 size_t subbuf_size, 167 size_t subbuf_size,
164 size_t n_subbufs, 168 size_t n_subbufs,
165 struct rchan_callbacks *cb); 169 struct rchan_callbacks *cb,
170 void *private_data);
166extern void relay_close(struct rchan *chan); 171extern void relay_close(struct rchan *chan);
167extern void relay_flush(struct rchan *chan); 172extern void relay_flush(struct rchan *chan);
168extern void relay_subbufs_consumed(struct rchan *chan, 173extern void relay_subbufs_consumed(struct rchan *chan,
diff --git a/include/linux/rio.h b/include/linux/rio.h
index d93857056cb9..68e3f6853fa6 100644
--- a/include/linux/rio.h
+++ b/include/linux/rio.h
@@ -25,6 +25,7 @@
25 25
26#define RIO_ANY_DESTID 0xff 26#define RIO_ANY_DESTID 0xff
27#define RIO_NO_HOPCOUNT -1 27#define RIO_NO_HOPCOUNT -1
28#define RIO_INVALID_DESTID 0xffff
28 29
29#define RIO_MAX_MPORT_RESOURCES 16 30#define RIO_MAX_MPORT_RESOURCES 16
30#define RIO_MAX_DEV_RESOURCES 16 31#define RIO_MAX_DEV_RESOURCES 16
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 446373535190..5053dc01fad4 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -436,7 +436,7 @@ struct signal_struct {
436 436
437 /* job control IDs */ 437 /* job control IDs */
438 pid_t pgrp; 438 pid_t pgrp;
439 pid_t tty_old_pgrp; 439 struct pid *tty_old_pgrp;
440 440
441 union { 441 union {
442 pid_t session __deprecated; 442 pid_t session __deprecated;
@@ -1013,8 +1013,10 @@ struct task_struct {
1013 * to a stack based synchronous wait) if its doing sync IO. 1013 * to a stack based synchronous wait) if its doing sync IO.
1014 */ 1014 */
1015 wait_queue_t *io_wait; 1015 wait_queue_t *io_wait;
1016#ifdef CONFIG_TASK_XACCT
1016/* i/o counters(bytes read/written, #syscalls */ 1017/* i/o counters(bytes read/written, #syscalls */
1017 u64 rchar, wchar, syscr, syscw; 1018 u64 rchar, wchar, syscr, syscw;
1019#endif
1018 struct task_io_accounting ioac; 1020 struct task_io_accounting ioac;
1019#if defined(CONFIG_TASK_XACCT) 1021#if defined(CONFIG_TASK_XACCT)
1020 u64 acct_rss_mem1; /* accumulated rss usage */ 1022 u64 acct_rss_mem1; /* accumulated rss usage */
@@ -1327,14 +1329,11 @@ extern int kill_pid_info(int sig, struct siginfo *info, struct pid *pid);
1327extern int kill_pid_info_as_uid(int, struct siginfo *, struct pid *, uid_t, uid_t, u32); 1329extern int kill_pid_info_as_uid(int, struct siginfo *, struct pid *, uid_t, uid_t, u32);
1328extern int kill_pgrp(struct pid *pid, int sig, int priv); 1330extern int kill_pgrp(struct pid *pid, int sig, int priv);
1329extern int kill_pid(struct pid *pid, int sig, int priv); 1331extern int kill_pid(struct pid *pid, int sig, int priv);
1330extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp);
1331extern int kill_pg_info(int, struct siginfo *, pid_t);
1332extern void do_notify_parent(struct task_struct *, int); 1332extern void do_notify_parent(struct task_struct *, int);
1333extern void force_sig(int, struct task_struct *); 1333extern void force_sig(int, struct task_struct *);
1334extern void force_sig_specific(int, struct task_struct *); 1334extern void force_sig_specific(int, struct task_struct *);
1335extern int send_sig(int, struct task_struct *, int); 1335extern int send_sig(int, struct task_struct *, int);
1336extern void zap_other_threads(struct task_struct *p); 1336extern void zap_other_threads(struct task_struct *p);
1337extern int kill_pg(pid_t, int, int);
1338extern int kill_proc(pid_t, int, int); 1337extern int kill_proc(pid_t, int, int);
1339extern struct sigqueue *sigqueue_alloc(void); 1338extern struct sigqueue *sigqueue_alloc(void);
1340extern void sigqueue_free(struct sigqueue *); 1339extern void sigqueue_free(struct sigqueue *);
@@ -1649,6 +1648,44 @@ extern int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls);
1649 1648
1650extern void normalize_rt_tasks(void); 1649extern void normalize_rt_tasks(void);
1651 1650
1651#ifdef CONFIG_TASK_XACCT
1652static inline void add_rchar(struct task_struct *tsk, ssize_t amt)
1653{
1654 tsk->rchar += amt;
1655}
1656
1657static inline void add_wchar(struct task_struct *tsk, ssize_t amt)
1658{
1659 tsk->wchar += amt;
1660}
1661
1662static inline void inc_syscr(struct task_struct *tsk)
1663{
1664 tsk->syscr++;
1665}
1666
1667static inline void inc_syscw(struct task_struct *tsk)
1668{
1669 tsk->syscw++;
1670}
1671#else
1672static inline void add_rchar(struct task_struct *tsk, ssize_t amt)
1673{
1674}
1675
1676static inline void add_wchar(struct task_struct *tsk, ssize_t amt)
1677{
1678}
1679
1680static inline void inc_syscr(struct task_struct *tsk)
1681{
1682}
1683
1684static inline void inc_syscw(struct task_struct *tsk)
1685{
1686}
1687#endif
1688
1652#endif /* __KERNEL__ */ 1689#endif /* __KERNEL__ */
1653 1690
1654#endif 1691#endif
diff --git a/include/linux/security.h b/include/linux/security.h
index 83cdefae9931..7f88d97575fd 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -492,7 +492,7 @@ struct request_sock;
492 * Note that the fown_struct, @fown, is never outside the context of a 492 * Note that the fown_struct, @fown, is never outside the context of a
493 * struct file, so the file structure (and associated security information) 493 * struct file, so the file structure (and associated security information)
494 * can always be obtained: 494 * can always be obtained:
495 * (struct file *)((long)fown - offsetof(struct file,f_owner)); 495 * container_of(fown, struct file, f_owner)
496 * @tsk contains the structure of task receiving signal. 496 * @tsk contains the structure of task receiving signal.
497 * @fown contains the file owner information. 497 * @fown contains the file owner information.
498 * @sig is the signal that will be sent. When 0, kernel sends SIGIO. 498 * @sig is the signal that will be sent. When 0, kernel sends SIGIO.
@@ -2130,7 +2130,7 @@ extern int mod_reg_security (const char *name, struct security_operations *ops);
2130extern int mod_unreg_security (const char *name, struct security_operations *ops); 2130extern int mod_unreg_security (const char *name, struct security_operations *ops);
2131extern struct dentry *securityfs_create_file(const char *name, mode_t mode, 2131extern struct dentry *securityfs_create_file(const char *name, mode_t mode,
2132 struct dentry *parent, void *data, 2132 struct dentry *parent, void *data,
2133 struct file_operations *fops); 2133 const struct file_operations *fops);
2134extern struct dentry *securityfs_create_dir(const char *name, struct dentry *parent); 2134extern struct dentry *securityfs_create_dir(const char *name, struct dentry *parent);
2135extern void securityfs_remove(struct dentry *dentry); 2135extern void securityfs_remove(struct dentry *dentry);
2136 2136
diff --git a/include/linux/slab_def.h b/include/linux/slab_def.h
index 4b463e66ddea..5e4364644ed1 100644
--- a/include/linux/slab_def.h
+++ b/include/linux/slab_def.h
@@ -19,7 +19,9 @@
19struct cache_sizes { 19struct cache_sizes {
20 size_t cs_size; 20 size_t cs_size;
21 struct kmem_cache *cs_cachep; 21 struct kmem_cache *cs_cachep;
22#ifdef CONFIG_ZONE_DMA
22 struct kmem_cache *cs_dmacachep; 23 struct kmem_cache *cs_dmacachep;
24#endif
23}; 25};
24extern struct cache_sizes malloc_sizes[]; 26extern struct cache_sizes malloc_sizes[];
25 27
@@ -39,9 +41,12 @@ static inline void *kmalloc(size_t size, gfp_t flags)
39 __you_cannot_kmalloc_that_much(); 41 __you_cannot_kmalloc_that_much();
40 } 42 }
41found: 43found:
42 return kmem_cache_alloc((flags & GFP_DMA) ? 44#ifdef CONFIG_ZONE_DMA
43 malloc_sizes[i].cs_dmacachep : 45 if (flags & GFP_DMA)
44 malloc_sizes[i].cs_cachep, flags); 46 return kmem_cache_alloc(malloc_sizes[i].cs_dmacachep,
47 flags);
48#endif
49 return kmem_cache_alloc(malloc_sizes[i].cs_cachep, flags);
45 } 50 }
46 return __kmalloc(size, flags); 51 return __kmalloc(size, flags);
47} 52}
@@ -62,9 +67,12 @@ static inline void *kzalloc(size_t size, gfp_t flags)
62 __you_cannot_kzalloc_that_much(); 67 __you_cannot_kzalloc_that_much();
63 } 68 }
64found: 69found:
65 return kmem_cache_zalloc((flags & GFP_DMA) ? 70#ifdef CONFIG_ZONE_DMA
66 malloc_sizes[i].cs_dmacachep : 71 if (flags & GFP_DMA)
67 malloc_sizes[i].cs_cachep, flags); 72 return kmem_cache_zalloc(malloc_sizes[i].cs_dmacachep,
73 flags);
74#endif
75 return kmem_cache_zalloc(malloc_sizes[i].cs_cachep, flags);
68 } 76 }
69 return __kzalloc(size, flags); 77 return __kzalloc(size, flags);
70} 78}
@@ -88,9 +96,13 @@ static inline void *kmalloc_node(size_t size, gfp_t flags, int node)
88 __you_cannot_kmalloc_that_much(); 96 __you_cannot_kmalloc_that_much();
89 } 97 }
90found: 98found:
91 return kmem_cache_alloc_node((flags & GFP_DMA) ? 99#ifdef CONFIG_ZONE_DMA
92 malloc_sizes[i].cs_dmacachep : 100 if (flags & GFP_DMA)
93 malloc_sizes[i].cs_cachep, flags, node); 101 return kmem_cache_alloc_node(malloc_sizes[i].cs_dmacachep,
102 flags, node);
103#endif
104 return kmem_cache_alloc_node(malloc_sizes[i].cs_cachep,
105 flags, node);
94 } 106 }
95 return __kmalloc_node(size, flags, node); 107 return __kmalloc_node(size, flags, node);
96} 108}
diff --git a/include/linux/socket.h b/include/linux/socket.h
index fcd35a210e7f..28157a36e6cc 100644
--- a/include/linux/socket.h
+++ b/include/linux/socket.h
@@ -16,7 +16,7 @@ struct __kernel_sockaddr_storage {
16 /* _SS_MAXSIZE value minus size of ss_family */ 16 /* _SS_MAXSIZE value minus size of ss_family */
17} __attribute__ ((aligned(_K_SS_ALIGNSIZE))); /* force desired alignment */ 17} __attribute__ ((aligned(_K_SS_ALIGNSIZE))); /* force desired alignment */
18 18
19#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) 19#ifdef __KERNEL__
20 20
21#include <asm/socket.h> /* arch-dependent defines */ 21#include <asm/socket.h> /* arch-dependent defines */
22#include <linux/sockios.h> /* the SIOCxxx I/O controls */ 22#include <linux/sockios.h> /* the SIOCxxx I/O controls */
diff --git a/include/linux/spi/ads7846.h b/include/linux/spi/ads7846.h
index adb3dafd33e9..3387e44dfd13 100644
--- a/include/linux/spi/ads7846.h
+++ b/include/linux/spi/ads7846.h
@@ -5,9 +5,17 @@
5 * 5 *
6 * It's OK if the min/max values are zero. 6 * It's OK if the min/max values are zero.
7 */ 7 */
8enum ads7846_filter {
9 ADS7846_FILTER_OK,
10 ADS7846_FILTER_REPEAT,
11 ADS7846_FILTER_IGNORE,
12};
13
8struct ads7846_platform_data { 14struct ads7846_platform_data {
9 u16 model; /* 7843, 7845, 7846. */ 15 u16 model; /* 7843, 7845, 7846. */
10 u16 vref_delay_usecs; /* 0 for external vref; etc */ 16 u16 vref_delay_usecs; /* 0 for external vref; etc */
17 int keep_vref_on:1; /* set to keep vref on for differential
18 * measurements as well */
11 u16 x_plate_ohms; 19 u16 x_plate_ohms;
12 u16 y_plate_ohms; 20 u16 y_plate_ohms;
13 21
@@ -21,5 +29,9 @@ struct ads7846_platform_data {
21 u16 debounce_rep; /* additional consecutive good readings 29 u16 debounce_rep; /* additional consecutive good readings
22 * required after the first two */ 30 * required after the first two */
23 int (*get_pendown_state)(void); 31 int (*get_pendown_state)(void);
32 int (*filter_init) (struct ads7846_platform_data *pdata,
33 void **filter_data);
34 int (*filter) (void *filter_data, int data_idx, int *val);
35 void (*filter_cleanup)(void *filter_data);
24}; 36};
25 37
diff --git a/include/linux/spi/eeprom.h b/include/linux/spi/eeprom.h
new file mode 100644
index 000000000000..1085212c446e
--- /dev/null
+++ b/include/linux/spi/eeprom.h
@@ -0,0 +1,22 @@
1#ifndef __LINUX_SPI_EEPROM_H
2#define __LINUX_SPI_EEPROM_H
3
4/*
5 * Put one of these structures in platform_data for SPI EEPROMS handled
6 * by the "at25" driver. On SPI, most EEPROMS understand the same core
7 * command set. If you need to support EEPROMs that don't yet fit, add
8 * flags to support those protocol options. These values all come from
9 * the chip datasheets.
10 */
11struct spi_eeprom {
12 u32 byte_len;
13 char name[10];
14 u16 page_size; /* for writes */
15 u16 flags;
16#define EE_ADDR1 0x0001 /* 8 bit addrs */
17#define EE_ADDR2 0x0002 /* 16 bit addrs */
18#define EE_ADDR3 0x0004 /* 24 bit addrs */
19#define EE_READONLY 0x0008 /* disallow writes */
20};
21
22#endif /* __LINUX_SPI_EEPROM_H */
diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
index 176f6e36dbfa..4f0f8c2e58a5 100644
--- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h
@@ -114,6 +114,17 @@ static inline void spi_set_ctldata(struct spi_device *spi, void *state)
114 spi->controller_state = state; 114 spi->controller_state = state;
115} 115}
116 116
117/* device driver data */
118
119static inline void spi_set_drvdata(struct spi_device *spi, void *data)
120{
121 dev_set_drvdata(&spi->dev, data);
122}
123
124static inline void *spi_get_drvdata(struct spi_device *spi)
125{
126 return dev_get_drvdata(&spi->dev);
127}
117 128
118struct spi_message; 129struct spi_message;
119 130
@@ -137,13 +148,11 @@ extern int spi_register_driver(struct spi_driver *sdrv);
137 148
138static inline void spi_unregister_driver(struct spi_driver *sdrv) 149static inline void spi_unregister_driver(struct spi_driver *sdrv)
139{ 150{
140 if (!sdrv) 151 if (sdrv)
141 return; 152 driver_unregister(&sdrv->driver);
142 driver_unregister(&sdrv->driver);
143} 153}
144 154
145 155
146
147/** 156/**
148 * struct spi_master - interface to SPI master controller 157 * struct spi_master - interface to SPI master controller
149 * @cdev: class interface to this driver 158 * @cdev: class interface to this driver
@@ -154,7 +163,8 @@ static inline void spi_unregister_driver(struct spi_driver *sdrv)
154 * each slave has a chipselect signal, but it's common that not 163 * each slave has a chipselect signal, but it's common that not
155 * every chipselect is connected to a slave. 164 * every chipselect is connected to a slave.
156 * @setup: updates the device mode and clocking records used by a 165 * @setup: updates the device mode and clocking records used by a
157 * device's SPI controller; protocol code may call this. 166 * device's SPI controller; protocol code may call this. This
167 * must fail if an unrecognized or unsupported mode is requested.
158 * @transfer: adds a message to the controller's transfer queue. 168 * @transfer: adds a message to the controller's transfer queue.
159 * @cleanup: frees controller-specific state 169 * @cleanup: frees controller-specific state
160 * 170 *
@@ -211,7 +221,7 @@ struct spi_master {
211 struct spi_message *mesg); 221 struct spi_message *mesg);
212 222
213 /* called on release() to free memory provided by spi_master */ 223 /* called on release() to free memory provided by spi_master */
214 void (*cleanup)(const struct spi_device *spi); 224 void (*cleanup)(struct spi_device *spi);
215}; 225};
216 226
217static inline void *spi_master_get_devdata(struct spi_master *master) 227static inline void *spi_master_get_devdata(struct spi_master *master)
@@ -296,6 +306,16 @@ extern struct spi_master *spi_busnum_to_master(u16 busnum);
296 * shifting out three bytes with word size of sixteen or twenty bits; 306 * shifting out three bytes with word size of sixteen or twenty bits;
297 * the former uses two bytes per word, the latter uses four bytes.) 307 * the former uses two bytes per word, the latter uses four bytes.)
298 * 308 *
309 * In-memory data values are always in native CPU byte order, translated
310 * from the wire byte order (big-endian except with SPI_LSB_FIRST). So
311 * for example when bits_per_word is sixteen, buffers are 2N bytes long
312 * and hold N sixteen bit words in CPU byte order.
313 *
314 * When the word size of the SPI transfer is not a power-of-two multiple
315 * of eight bits, those in-memory words include extra bits. In-memory
316 * words are always seen by protocol drivers as right-justified, so the
317 * undefined (rx) or unused (tx) bits are always the most significant bits.
318 *
299 * All SPI transfers start with the relevant chipselect active. Normally 319 * All SPI transfers start with the relevant chipselect active. Normally
300 * it stays selected until after the last transfer in a message. Drivers 320 * it stays selected until after the last transfer in a message. Drivers
301 * can affect the chipselect signal using cs_change: 321 * can affect the chipselect signal using cs_change:
@@ -453,6 +473,11 @@ static inline void spi_message_free(struct spi_message *m)
453 * changes those settings, and must be called from a context that can sleep. 473 * changes those settings, and must be called from a context that can sleep.
454 * The changes take effect the next time the device is selected and data 474 * The changes take effect the next time the device is selected and data
455 * is transferred to or from it. 475 * is transferred to or from it.
476 *
477 * Note that this call wil fail if the protocol driver specifies an option
478 * that the underlying controller or its driver does not support. For
479 * example, not all hardware supports wire transfers using nine bit words,
480 * LSB-first wire encoding, or active-high chipselects.
456 */ 481 */
457static inline int 482static inline int
458spi_setup(struct spi_device *spi) 483spi_setup(struct spi_device *spi)
diff --git a/include/linux/spi/spi_bitbang.h b/include/linux/spi/spi_bitbang.h
index 16ce178f54d7..2e8c048b9b80 100644
--- a/include/linux/spi/spi_bitbang.h
+++ b/include/linux/spi/spi_bitbang.h
@@ -55,7 +55,7 @@ struct spi_bitbang {
55 * methods, if you like. 55 * methods, if you like.
56 */ 56 */
57extern int spi_bitbang_setup(struct spi_device *spi); 57extern int spi_bitbang_setup(struct spi_device *spi);
58extern void spi_bitbang_cleanup(const struct spi_device *spi); 58extern void spi_bitbang_cleanup(struct spi_device *spi);
59extern int spi_bitbang_transfer(struct spi_device *spi, struct spi_message *m); 59extern int spi_bitbang_transfer(struct spi_device *spi, struct spi_message *m);
60extern int spi_bitbang_setup_transfer(struct spi_device *spi, 60extern int spi_bitbang_setup_transfer(struct spi_device *spi,
61 struct spi_transfer *t); 61 struct spi_transfer *t);
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h
index 94b767d64275..61fef376ed2e 100644
--- a/include/linux/spinlock.h
+++ b/include/linux/spinlock.h
@@ -228,15 +228,30 @@ do { \
228# define read_unlock_irq(lock) _read_unlock_irq(lock) 228# define read_unlock_irq(lock) _read_unlock_irq(lock)
229# define write_unlock_irq(lock) _write_unlock_irq(lock) 229# define write_unlock_irq(lock) _write_unlock_irq(lock)
230#else 230#else
231# define spin_unlock(lock) __raw_spin_unlock(&(lock)->raw_lock) 231# define spin_unlock(lock) \
232# define read_unlock(lock) __raw_read_unlock(&(lock)->raw_lock) 232 do {__raw_spin_unlock(&(lock)->raw_lock); __release(lock); } while (0)
233# define write_unlock(lock) __raw_write_unlock(&(lock)->raw_lock) 233# define read_unlock(lock) \
234# define spin_unlock_irq(lock) \ 234 do {__raw_read_unlock(&(lock)->raw_lock); __release(lock); } while (0)
235 do { __raw_spin_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0) 235# define write_unlock(lock) \
236# define read_unlock_irq(lock) \ 236 do {__raw_write_unlock(&(lock)->raw_lock); __release(lock); } while (0)
237 do { __raw_read_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0) 237# define spin_unlock_irq(lock) \
238# define write_unlock_irq(lock) \ 238do { \
239 do { __raw_write_unlock(&(lock)->raw_lock); local_irq_enable(); } while (0) 239 __raw_spin_unlock(&(lock)->raw_lock); \
240 __release(lock); \
241 local_irq_enable(); \
242} while (0)
243# define read_unlock_irq(lock) \
244do { \
245 __raw_read_unlock(&(lock)->raw_lock); \
246 __release(lock); \
247 local_irq_enable(); \
248} while (0)
249# define write_unlock_irq(lock) \
250do { \
251 __raw_write_unlock(&(lock)->raw_lock); \
252 __release(lock); \
253 local_irq_enable(); \
254} while (0)
240#endif 255#endif
241 256
242#define spin_unlock_irqrestore(lock, flags) \ 257#define spin_unlock_irqrestore(lock, flags) \
diff --git a/include/linux/stat.h b/include/linux/stat.h
index 679ef0d70b6b..4f8539ccff6c 100644
--- a/include/linux/stat.h
+++ b/include/linux/stat.h
@@ -7,7 +7,7 @@
7 7
8#endif 8#endif
9 9
10#if defined(__KERNEL__) || !defined(__GLIBC__) || (__GLIBC__ < 2) 10#ifdef __KERNEL__
11 11
12#define S_IFMT 00170000 12#define S_IFMT 00170000
13#define S_IFSOCK 0140000 13#define S_IFSOCK 0140000
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index 64f3d60c72af..83b3c7b433aa 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -11,6 +11,7 @@
11#define SUNRPC_SVC_H 11#define SUNRPC_SVC_H
12 12
13#include <linux/in.h> 13#include <linux/in.h>
14#include <linux/in6.h>
14#include <linux/sunrpc/types.h> 15#include <linux/sunrpc/types.h>
15#include <linux/sunrpc/xdr.h> 16#include <linux/sunrpc/xdr.h>
16#include <linux/sunrpc/auth.h> 17#include <linux/sunrpc/auth.h>
@@ -191,7 +192,13 @@ static inline void svc_putu32(struct kvec *iov, __be32 val)
191 iov->iov_len += sizeof(__be32); 192 iov->iov_len += sizeof(__be32);
192} 193}
193 194
194 195union svc_addr_u {
196 struct in_addr addr;
197#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
198 struct in6_addr addr6;
199#endif
200};
201
195/* 202/*
196 * The context of a single thread, including the request currently being 203 * The context of a single thread, including the request currently being
197 * processed. 204 * processed.
@@ -200,8 +207,8 @@ struct svc_rqst {
200 struct list_head rq_list; /* idle list */ 207 struct list_head rq_list; /* idle list */
201 struct list_head rq_all; /* all threads list */ 208 struct list_head rq_all; /* all threads list */
202 struct svc_sock * rq_sock; /* socket */ 209 struct svc_sock * rq_sock; /* socket */
203 struct sockaddr_in rq_addr; /* peer address */ 210 struct sockaddr_storage rq_addr; /* peer address */
204 int rq_addrlen; 211 size_t rq_addrlen;
205 212
206 struct svc_serv * rq_server; /* RPC service definition */ 213 struct svc_serv * rq_server; /* RPC service definition */
207 struct svc_pool * rq_pool; /* thread pool */ 214 struct svc_pool * rq_pool; /* thread pool */
@@ -227,8 +234,8 @@ struct svc_rqst {
227 unsigned short 234 unsigned short
228 rq_secure : 1; /* secure port */ 235 rq_secure : 1; /* secure port */
229 236
230 237 union svc_addr_u rq_daddr; /* dest addr of request
231 __be32 rq_daddr; /* dest addr of request - reply from here */ 238 * - reply from here */
232 239
233 void * rq_argp; /* decoded arguments */ 240 void * rq_argp; /* decoded arguments */
234 void * rq_resp; /* xdr'd results */ 241 void * rq_resp; /* xdr'd results */
@@ -256,6 +263,24 @@ struct svc_rqst {
256}; 263};
257 264
258/* 265/*
266 * Rigorous type checking on sockaddr type conversions
267 */
268static inline struct sockaddr_in *svc_addr_in(struct svc_rqst *rqst)
269{
270 return (struct sockaddr_in *) &rqst->rq_addr;
271}
272
273static inline struct sockaddr_in6 *svc_addr_in6(struct svc_rqst *rqst)
274{
275 return (struct sockaddr_in6 *) &rqst->rq_addr;
276}
277
278static inline struct sockaddr *svc_addr(struct svc_rqst *rqst)
279{
280 return (struct sockaddr *) &rqst->rq_addr;
281}
282
283/*
259 * Check buffer bounds after decoding arguments 284 * Check buffer bounds after decoding arguments
260 */ 285 */
261static inline int 286static inline int
@@ -292,9 +317,10 @@ static inline void svc_free_res_pages(struct svc_rqst *rqstp)
292 317
293struct svc_deferred_req { 318struct svc_deferred_req {
294 u32 prot; /* protocol (UDP or TCP) */ 319 u32 prot; /* protocol (UDP or TCP) */
295 struct sockaddr_in addr; 320 struct svc_sock *svsk;
296 struct svc_sock *svsk; /* where reply must go */ 321 struct sockaddr_storage addr; /* where reply must go */
297 __be32 daddr; /* where reply must come from */ 322 size_t addrlen;
323 union svc_addr_u daddr; /* where reply must come from */
298 struct cache_deferred_req handle; 324 struct cache_deferred_req handle;
299 int argslen; 325 int argslen;
300 __be32 args[0]; 326 __be32 args[0];
@@ -368,5 +394,8 @@ int svc_register(struct svc_serv *, int, unsigned short);
368void svc_wake_up(struct svc_serv *); 394void svc_wake_up(struct svc_serv *);
369void svc_reserve(struct svc_rqst *rqstp, int space); 395void svc_reserve(struct svc_rqst *rqstp, int space);
370struct svc_pool * svc_pool_for_cpu(struct svc_serv *serv, int cpu); 396struct svc_pool * svc_pool_for_cpu(struct svc_serv *serv, int cpu);
397char * svc_print_addr(struct svc_rqst *, char *, size_t);
398
399#define RPC_MAX_ADDRBUFLEN (63U)
371 400
372#endif /* SUNRPC_SVC_H */ 401#endif /* SUNRPC_SVC_H */
diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h
index db312a1e2eeb..cccea0a0feb4 100644
--- a/include/linux/sunrpc/svcsock.h
+++ b/include/linux/sunrpc/svcsock.h
@@ -57,12 +57,15 @@ struct svc_sock {
57 57
58 /* cache of various info for TCP sockets */ 58 /* cache of various info for TCP sockets */
59 void *sk_info_authunix; 59 void *sk_info_authunix;
60
61 struct sockaddr_storage sk_remote; /* remote peer's address */
62 int sk_remotelen; /* length of address */
60}; 63};
61 64
62/* 65/*
63 * Function prototypes. 66 * Function prototypes.
64 */ 67 */
65int svc_makesock(struct svc_serv *, int, unsigned short); 68int svc_makesock(struct svc_serv *, int, unsigned short, int flags);
66void svc_close_socket(struct svc_sock *); 69void svc_close_socket(struct svc_sock *);
67int svc_recv(struct svc_rqst *, long); 70int svc_recv(struct svc_rqst *, long);
68int svc_send(struct svc_rqst *); 71int svc_send(struct svc_rqst *);
@@ -74,4 +77,11 @@ int svc_addsock(struct svc_serv *serv,
74 char *name_return, 77 char *name_return,
75 int *proto); 78 int *proto);
76 79
80/*
81 * svc_makesock socket characteristics
82 */
83#define SVC_SOCK_DEFAULTS (0U)
84#define SVC_SOCK_ANONYMOUS (1U << 0) /* don't register with pmap */
85#define SVC_SOCK_TEMPORARY (1U << 1) /* flag socket as temporary */
86
77#endif /* SUNRPC_SVCSOCK_H */ 87#endif /* SUNRPC_SVCSOCK_H */
diff --git a/include/linux/svga.h b/include/linux/svga.h
new file mode 100644
index 000000000000..eadb981bb37c
--- /dev/null
+++ b/include/linux/svga.h
@@ -0,0 +1,124 @@
1#ifndef _LINUX_SVGA_H
2#define _LINUX_SVGA_H
3
4#ifdef __KERNEL__
5
6#include <linux/pci.h>
7#include <video/vga.h>
8
9/* Terminator for register set */
10
11#define VGA_REGSET_END_VAL 0xFF
12#define VGA_REGSET_END {VGA_REGSET_END_VAL, 0, 0}
13
14struct vga_regset {
15 u8 regnum;
16 u8 lowbit;
17 u8 highbit;
18};
19
20/* ------------------------------------------------------------------------- */
21
22#define SVGA_FORMAT_END_VAL 0xFFFF
23#define SVGA_FORMAT_END {SVGA_FORMAT_END_VAL, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, 0, 0, 0, 0, 0, 0}
24
25struct svga_fb_format {
26 /* var part */
27 u32 bits_per_pixel;
28 struct fb_bitfield red;
29 struct fb_bitfield green;
30 struct fb_bitfield blue;
31 struct fb_bitfield transp;
32 u32 nonstd;
33 /* fix part */
34 u32 type;
35 u32 type_aux;
36 u32 visual;
37 u32 xpanstep;
38 u32 xresstep;
39};
40
41struct svga_timing_regs {
42 const struct vga_regset *h_total_regs;
43 const struct vga_regset *h_display_regs;
44 const struct vga_regset *h_blank_start_regs;
45 const struct vga_regset *h_blank_end_regs;
46 const struct vga_regset *h_sync_start_regs;
47 const struct vga_regset *h_sync_end_regs;
48
49 const struct vga_regset *v_total_regs;
50 const struct vga_regset *v_display_regs;
51 const struct vga_regset *v_blank_start_regs;
52 const struct vga_regset *v_blank_end_regs;
53 const struct vga_regset *v_sync_start_regs;
54 const struct vga_regset *v_sync_end_regs;
55};
56
57struct svga_pll {
58 u16 m_min;
59 u16 m_max;
60 u16 n_min;
61 u16 n_max;
62 u16 r_min;
63 u16 r_max; /* r_max < 32 */
64 u32 f_vco_min;
65 u32 f_vco_max;
66 u32 f_base;
67};
68
69
70/* Write a value to the attribute register */
71
72static inline void svga_wattr(u8 index, u8 data)
73{
74 inb(0x3DA);
75 outb(index, 0x3C0);
76 outb(data, 0x3C0);
77}
78
79/* Write a value to a sequence register with a mask */
80
81static inline void svga_wseq_mask(u8 index, u8 data, u8 mask)
82{
83 vga_wseq(NULL, index, (data & mask) | (vga_rseq(NULL, index) & ~mask));
84}
85
86/* Write a value to a CRT register with a mask */
87
88static inline void svga_wcrt_mask(u8 index, u8 data, u8 mask)
89{
90 vga_wcrt(NULL, index, (data & mask) | (vga_rcrt(NULL, index) & ~mask));
91}
92
93static inline int svga_primary_device(struct pci_dev *dev)
94{
95 u16 flags;
96 pci_read_config_word(dev, PCI_COMMAND, &flags);
97 return (flags & PCI_COMMAND_IO);
98}
99
100
101void svga_wcrt_multi(const struct vga_regset *regset, u32 value);
102void svga_wseq_multi(const struct vga_regset *regset, u32 value);
103
104void svga_set_default_gfx_regs(void);
105void svga_set_default_atc_regs(void);
106void svga_set_default_seq_regs(void);
107void svga_set_default_crt_regs(void);
108void svga_set_textmode_vga_regs(void);
109
110void svga_settile(struct fb_info *info, struct fb_tilemap *map);
111void svga_tilecopy(struct fb_info *info, struct fb_tilearea *area);
112void svga_tilefill(struct fb_info *info, struct fb_tilerect *rect);
113void svga_tileblit(struct fb_info *info, struct fb_tileblit *blit);
114void svga_tilecursor(struct fb_info *info, struct fb_tilecursor *cursor);
115
116int svga_compute_pll(const struct svga_pll *pll, u32 f_wanted, u16 *m, u16 *n, u16 *r, int node);
117int svga_check_timings(const struct svga_timing_regs *tm, struct fb_var_screeninfo *var, int node);
118void svga_set_timings(const struct svga_timing_regs *tm, struct fb_var_screeninfo *var, u32 hmul, u32 hdiv, u32 vmul, u32 vdiv, u32 hborder, int node);
119
120int svga_match_format(const struct svga_fb_format *frm, struct fb_var_screeninfo *var, struct fb_fix_screeninfo *fix);
121
122#endif /* __KERNEL__ */
123#endif /* _LINUX_SVGA_H */
124
diff --git a/include/linux/swap.h b/include/linux/swap.h
index 5423559a44a6..006868881346 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -170,11 +170,13 @@ extern void swapin_readahead(swp_entry_t, unsigned long, struct vm_area_struct *
170extern unsigned long totalram_pages; 170extern unsigned long totalram_pages;
171extern unsigned long totalreserve_pages; 171extern unsigned long totalreserve_pages;
172extern long nr_swap_pages; 172extern long nr_swap_pages;
173extern unsigned int nr_free_pages(void);
174extern unsigned int nr_free_pages_pgdat(pg_data_t *pgdat);
175extern unsigned int nr_free_buffer_pages(void); 173extern unsigned int nr_free_buffer_pages(void);
176extern unsigned int nr_free_pagecache_pages(void); 174extern unsigned int nr_free_pagecache_pages(void);
177 175
176/* Definition of global_page_state not available yet */
177#define nr_free_pages() global_page_state(NR_FREE_PAGES)
178
179
178/* linux/mm/swap.c */ 180/* linux/mm/swap.c */
179extern void FASTCALL(lru_cache_add(struct page *)); 181extern void FASTCALL(lru_cache_add(struct page *));
180extern void FASTCALL(lru_cache_add_active(struct page *)); 182extern void FASTCALL(lru_cache_add_active(struct page *));
diff --git a/include/linux/time.h b/include/linux/time.h
index a5b739967b74..55cee172d723 100644
--- a/include/linux/time.h
+++ b/include/linux/time.h
@@ -46,7 +46,7 @@ static inline int timespec_equal(struct timespec *a, struct timespec *b)
46 * lhs == rhs: return 0 46 * lhs == rhs: return 0
47 * lhs > rhs: return >0 47 * lhs > rhs: return >0
48 */ 48 */
49static inline int timespec_compare(struct timespec *lhs, struct timespec *rhs) 49static inline int timespec_compare(const struct timespec *lhs, const struct timespec *rhs)
50{ 50{
51 if (lhs->tv_sec < rhs->tv_sec) 51 if (lhs->tv_sec < rhs->tv_sec)
52 return -1; 52 return -1;
@@ -55,7 +55,7 @@ static inline int timespec_compare(struct timespec *lhs, struct timespec *rhs)
55 return lhs->tv_nsec - rhs->tv_nsec; 55 return lhs->tv_nsec - rhs->tv_nsec;
56} 56}
57 57
58static inline int timeval_compare(struct timeval *lhs, struct timeval *rhs) 58static inline int timeval_compare(const struct timeval *lhs, const struct timeval *rhs)
59{ 59{
60 if (lhs->tv_sec < rhs->tv_sec) 60 if (lhs->tv_sec < rhs->tv_sec)
61 return -1; 61 return -1;
diff --git a/include/linux/timex.h b/include/linux/timex.h
index db501dc23c29..9a24e500c311 100644
--- a/include/linux/timex.h
+++ b/include/linux/timex.h
@@ -255,10 +255,10 @@ struct time_interpolator {
255 u8 jitter; /* if set compensate for fluctuations */ 255 u8 jitter; /* if set compensate for fluctuations */
256 u32 nsec_per_cyc; /* set by register_time_interpolator() */ 256 u32 nsec_per_cyc; /* set by register_time_interpolator() */
257 void *addr; /* address of counter or function */ 257 void *addr; /* address of counter or function */
258 u64 mask; /* mask the valid bits of the counter */ 258 cycles_t mask; /* mask the valid bits of the counter */
259 unsigned long offset; /* nsec offset at last update of interpolator */ 259 unsigned long offset; /* nsec offset at last update of interpolator */
260 u64 last_counter; /* counter value in units of the counter at last update */ 260 u64 last_counter; /* counter value in units of the counter at last update */
261 u64 last_cycle; /* Last timer value if TIME_SOURCE_JITTER is set */ 261 cycles_t last_cycle; /* Last timer value if TIME_SOURCE_JITTER is set */
262 u64 frequency; /* frequency in counts/second */ 262 u64 frequency; /* frequency in counts/second */
263 long drift; /* drift in parts-per-million (or -1) */ 263 long drift; /* drift in parts-per-million (or -1) */
264 unsigned long skips; /* skips forward */ 264 unsigned long skips; /* skips forward */
diff --git a/include/linux/toshiba.h b/include/linux/toshiba.h
index 916e5e3a699b..6a7c4edf0e13 100644
--- a/include/linux/toshiba.h
+++ b/include/linux/toshiba.h
@@ -33,4 +33,6 @@ typedef struct {
33 unsigned int edi __attribute__ ((packed)); 33 unsigned int edi __attribute__ ((packed));
34} SMMRegisters; 34} SMMRegisters;
35 35
36int tosh_smm(SMMRegisters *regs);
37
36#endif 38#endif
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 65cbcf22c31e..dee72b9a20fb 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -24,7 +24,27 @@
24#define NR_PTYS CONFIG_LEGACY_PTY_COUNT /* Number of legacy ptys */ 24#define NR_PTYS CONFIG_LEGACY_PTY_COUNT /* Number of legacy ptys */
25#define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */ 25#define NR_UNIX98_PTY_DEFAULT 4096 /* Default maximum for Unix98 ptys */
26#define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */ 26#define NR_UNIX98_PTY_MAX (1 << MINORBITS) /* Absolute limit */
27#define NR_LDISCS 16 27#define NR_LDISCS 17
28
29/* line disciplines */
30#define N_TTY 0
31#define N_SLIP 1
32#define N_MOUSE 2
33#define N_PPP 3
34#define N_STRIP 4
35#define N_AX25 5
36#define N_X25 6 /* X.25 async */
37#define N_6PACK 7
38#define N_MASC 8 /* Reserved for Mobitex module <kaz@cafe.net> */
39#define N_R3964 9 /* Reserved for Simatic R3964 module */
40#define N_PROFIBUS_FDL 10 /* Reserved for Profibus <Dave@mvhi.com> */
41#define N_IRDA 11 /* Linux IrDa - http://irda.sourceforge.net/ */
42#define N_SMSBLOCK 12 /* SMS block mode - for talking to GSM data */
43 /* cards about SMS messages */
44#define N_HDLC 13 /* synchronous HDLC */
45#define N_SYNC_PPP 14 /* synchronous PPP */
46#define N_HCI 15 /* Bluetooth HCI UART */
47#define N_GIGASET_M101 16 /* Siemens Gigaset M101 serial DECT adapter */
28 48
29/* 49/*
30 * This character is the same as _POSIX_VDISABLE: it cannot be used as 50 * This character is the same as _POSIX_VDISABLE: it cannot be used as
@@ -177,8 +197,8 @@ struct tty_struct {
177 struct mutex termios_mutex; 197 struct mutex termios_mutex;
178 struct ktermios *termios, *termios_locked; 198 struct ktermios *termios, *termios_locked;
179 char name[64]; 199 char name[64];
180 int pgrp; 200 struct pid *pgrp;
181 int session; 201 struct pid *session;
182 unsigned long flags; 202 unsigned long flags;
183 int count; 203 int count;
184 struct winsize winsize; 204 struct winsize winsize;
@@ -283,7 +303,7 @@ extern int tty_read_raw_data(struct tty_struct *tty, unsigned char *bufp,
283 int buflen); 303 int buflen);
284extern void tty_write_message(struct tty_struct *tty, char *msg); 304extern void tty_write_message(struct tty_struct *tty, char *msg);
285 305
286extern int is_orphaned_pgrp(int pgrp); 306extern int is_current_pgrp_orphaned(void);
287extern int is_ignored(int sig); 307extern int is_ignored(int sig);
288extern int tty_signal(int sig, struct tty_struct *tty); 308extern int tty_signal(int sig, struct tty_struct *tty);
289extern void tty_hangup(struct tty_struct * tty); 309extern void tty_hangup(struct tty_struct * tty);
@@ -291,6 +311,7 @@ extern void tty_vhangup(struct tty_struct * tty);
291extern void tty_unhangup(struct file *filp); 311extern void tty_unhangup(struct file *filp);
292extern int tty_hung_up_p(struct file * filp); 312extern int tty_hung_up_p(struct file * filp);
293extern void do_SAK(struct tty_struct *tty); 313extern void do_SAK(struct tty_struct *tty);
314extern void __do_SAK(struct tty_struct *tty);
294extern void disassociate_ctty(int priv); 315extern void disassociate_ctty(int priv);
295extern void tty_flip_buffer_push(struct tty_struct *tty); 316extern void tty_flip_buffer_push(struct tty_struct *tty);
296extern speed_t tty_get_baud_rate(struct tty_struct *tty); 317extern speed_t tty_get_baud_rate(struct tty_struct *tty);
@@ -312,7 +333,6 @@ extern int tty_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
312 333
313extern dev_t tty_devnum(struct tty_struct *tty); 334extern dev_t tty_devnum(struct tty_struct *tty);
314extern void proc_clear_tty(struct task_struct *p); 335extern void proc_clear_tty(struct task_struct *p);
315extern void __proc_set_tty(struct task_struct *tsk, struct tty_struct *tty);
316extern void proc_set_tty(struct task_struct *tsk, struct tty_struct *tty); 336extern void proc_set_tty(struct task_struct *tsk, struct tty_struct *tty);
317extern struct tty_struct *get_current_tty(void); 337extern struct tty_struct *get_current_tty(void);
318 338
diff --git a/include/linux/ufs_fs.h b/include/linux/ufs_fs.h
index d3a4f994a5dc..dc2e9fe69418 100644
--- a/include/linux/ufs_fs.h
+++ b/include/linux/ufs_fs.h
@@ -40,13 +40,16 @@ typedef __u64 __fs64;
40typedef __u32 __fs32; 40typedef __u32 __fs32;
41typedef __u16 __fs16; 41typedef __u16 __fs16;
42#else 42#else
43#include <asm/div64.h>
43typedef __u64 __bitwise __fs64; 44typedef __u64 __bitwise __fs64;
44typedef __u32 __bitwise __fs32; 45typedef __u32 __bitwise __fs32;
45typedef __u16 __bitwise __fs16; 46typedef __u16 __bitwise __fs16;
46#endif 47#endif
47 48
49#ifdef __KERNEL__
48#include <linux/ufs_fs_i.h> 50#include <linux/ufs_fs_i.h>
49#include <linux/ufs_fs_sb.h> 51#include <linux/ufs_fs_sb.h>
52#endif
50 53
51#define UFS_BBLOCK 0 54#define UFS_BBLOCK 0
52#define UFS_BBSIZE 8192 55#define UFS_BBSIZE 8192
@@ -261,17 +264,10 @@ typedef __u16 __bitwise __fs16;
261 */ 264 */
262#define ufs_inotocg(x) ((x) / uspi->s_ipg) 265#define ufs_inotocg(x) ((x) / uspi->s_ipg)
263#define ufs_inotocgoff(x) ((x) % uspi->s_ipg) 266#define ufs_inotocgoff(x) ((x) % uspi->s_ipg)
264#define ufs_inotofsba(x) (ufs_cgimin(ufs_inotocg(x)) + ufs_inotocgoff(x) / uspi->s_inopf) 267#define ufs_inotofsba(x) (((u64)ufs_cgimin(ufs_inotocg(x))) + ufs_inotocgoff(x) / uspi->s_inopf)
265#define ufs_inotofsbo(x) ((x) % uspi->s_inopf) 268#define ufs_inotofsbo(x) ((x) % uspi->s_inopf)
266 269
267/* 270/*
268 * Give cylinder group number for a file system block.
269 * Give cylinder group block number for a file system block.
270 */
271#define ufs_dtog(d) ((d) / uspi->s_fpg)
272#define ufs_dtogd(d) ((d) % uspi->s_fpg)
273
274/*
275 * Compute the cylinder and rotational position of a cyl block addr. 271 * Compute the cylinder and rotational position of a cyl block addr.
276 */ 272 */
277#define ufs_cbtocylno(bno) \ 273#define ufs_cbtocylno(bno) \
@@ -303,7 +299,7 @@ typedef __u16 __bitwise __fs16;
303#define UFS_MAXMNTLEN 512 299#define UFS_MAXMNTLEN 512
304#define UFS2_MAXMNTLEN 468 300#define UFS2_MAXMNTLEN 468
305#define UFS2_MAXVOLLEN 32 301#define UFS2_MAXVOLLEN 32
306/* #define UFS_MAXCSBUFS 31 */ 302#define UFS_MAXCSBUFS 31
307#define UFS_LINK_MAX 32000 303#define UFS_LINK_MAX 32000
308/* 304/*
309#define UFS2_NOCSPTRS ((128 / sizeof(void *)) - 4) 305#define UFS2_NOCSPTRS ((128 / sizeof(void *)) - 4)
@@ -721,6 +717,7 @@ struct ufs_cg_private_info {
721 __u32 c_nclusterblks; /* number of clusters this cg */ 717 __u32 c_nclusterblks; /* number of clusters this cg */
722}; 718};
723 719
720
724struct ufs_sb_private_info { 721struct ufs_sb_private_info {
725 struct ufs_buffer_head s_ubh; /* buffer containing super block */ 722 struct ufs_buffer_head s_ubh; /* buffer containing super block */
726 struct ufs_csum_core cs_total; 723 struct ufs_csum_core cs_total;
@@ -754,7 +751,7 @@ struct ufs_sb_private_info {
754 __u32 s_npsect; /* # sectors/track including spares */ 751 __u32 s_npsect; /* # sectors/track including spares */
755 __u32 s_interleave; /* hardware sector interleave */ 752 __u32 s_interleave; /* hardware sector interleave */
756 __u32 s_trackskew; /* sector 0 skew, per track */ 753 __u32 s_trackskew; /* sector 0 skew, per track */
757 __u32 s_csaddr; /* blk addr of cyl grp summary area */ 754 __u64 s_csaddr; /* blk addr of cyl grp summary area */
758 __u32 s_cssize; /* size of cyl grp summary area */ 755 __u32 s_cssize; /* size of cyl grp summary area */
759 __u32 s_cgsize; /* cylinder group size */ 756 __u32 s_cgsize; /* cylinder group size */
760 __u32 s_ntrak; /* tracks per cylinder */ 757 __u32 s_ntrak; /* tracks per cylinder */
@@ -950,17 +947,17 @@ struct ufs_super_block_third {
950#ifdef __KERNEL__ 947#ifdef __KERNEL__
951 948
952/* balloc.c */ 949/* balloc.c */
953extern void ufs_free_fragments (struct inode *, unsigned, unsigned); 950extern void ufs_free_fragments (struct inode *, u64, unsigned);
954extern void ufs_free_blocks (struct inode *, unsigned, unsigned); 951extern void ufs_free_blocks (struct inode *, u64, unsigned);
955extern unsigned ufs_new_fragments(struct inode *, __fs32 *, unsigned, unsigned, 952extern u64 ufs_new_fragments(struct inode *, void *, u64, u64,
956 unsigned, int *, struct page *); 953 unsigned, int *, struct page *);
957 954
958/* cylinder.c */ 955/* cylinder.c */
959extern struct ufs_cg_private_info * ufs_load_cylinder (struct super_block *, unsigned); 956extern struct ufs_cg_private_info * ufs_load_cylinder (struct super_block *, unsigned);
960extern void ufs_put_cylinder (struct super_block *, unsigned); 957extern void ufs_put_cylinder (struct super_block *, unsigned);
961 958
962/* dir.c */ 959/* dir.c */
963extern struct inode_operations ufs_dir_inode_operations; 960extern const struct inode_operations ufs_dir_inode_operations;
964extern int ufs_add_link (struct dentry *, struct inode *); 961extern int ufs_add_link (struct dentry *, struct inode *);
965extern ino_t ufs_inode_by_name(struct inode *, struct dentry *); 962extern ino_t ufs_inode_by_name(struct inode *, struct dentry *);
966extern int ufs_make_empty(struct inode *, struct inode *); 963extern int ufs_make_empty(struct inode *, struct inode *);
@@ -972,7 +969,7 @@ extern void ufs_set_link(struct inode *dir, struct ufs_dir_entry *de,
972 struct page *page, struct inode *inode); 969 struct page *page, struct inode *inode);
973 970
974/* file.c */ 971/* file.c */
975extern struct inode_operations ufs_file_inode_operations; 972extern const struct inode_operations ufs_file_inode_operations;
976extern const struct file_operations ufs_file_operations; 973extern const struct file_operations ufs_file_operations;
977 974
978extern const struct address_space_operations ufs_aops; 975extern const struct address_space_operations ufs_aops;
@@ -999,7 +996,7 @@ extern void ufs_error (struct super_block *, const char *, const char *, ...) __
999extern void ufs_panic (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4))); 996extern void ufs_panic (struct super_block *, const char *, const char *, ...) __attribute__ ((format (printf, 3, 4)));
1000 997
1001/* symlink.c */ 998/* symlink.c */
1002extern struct inode_operations ufs_fast_symlink_inode_operations; 999extern const struct inode_operations ufs_fast_symlink_inode_operations;
1003 1000
1004/* truncate.c */ 1001/* truncate.c */
1005extern int ufs_truncate (struct inode *, loff_t); 1002extern int ufs_truncate (struct inode *, loff_t);
@@ -1014,6 +1011,22 @@ static inline struct ufs_inode_info *UFS_I(struct inode *inode)
1014 return container_of(inode, struct ufs_inode_info, vfs_inode); 1011 return container_of(inode, struct ufs_inode_info, vfs_inode);
1015} 1012}
1016 1013
1014/*
1015 * Give cylinder group number for a file system block.
1016 * Give cylinder group block number for a file system block.
1017 */
1018/* #define ufs_dtog(d) ((d) / uspi->s_fpg) */
1019static inline u64 ufs_dtog(struct ufs_sb_private_info * uspi, u64 b)
1020{
1021 do_div(b, uspi->s_fpg);
1022 return b;
1023}
1024/* #define ufs_dtogd(d) ((d) % uspi->s_fpg) */
1025static inline u32 ufs_dtogd(struct ufs_sb_private_info * uspi, u64 b)
1026{
1027 return do_div(b, uspi->s_fpg);
1028}
1029
1017#endif /* __KERNEL__ */ 1030#endif /* __KERNEL__ */
1018 1031
1019#endif /* __LINUX_UFS_FS_H */ 1032#endif /* __LINUX_UFS_FS_H */
diff --git a/include/linux/ufs_fs_i.h b/include/linux/ufs_fs_i.h
index f50ce3b0cd52..6496caa82f9e 100644
--- a/include/linux/ufs_fs_i.h
+++ b/include/linux/ufs_fs_i.h
@@ -20,13 +20,12 @@ struct ufs_inode_info {
20 __fs64 u2_i_data[15]; 20 __fs64 u2_i_data[15];
21 } i_u1; 21 } i_u1;
22 __u32 i_flags; 22 __u32 i_flags;
23 __u32 i_gen;
24 __u32 i_shadow; 23 __u32 i_shadow;
25 __u32 i_unused1; 24 __u32 i_unused1;
26 __u32 i_unused2; 25 __u32 i_unused2;
27 __u32 i_oeftflag; 26 __u32 i_oeftflag;
28 __u16 i_osync; 27 __u16 i_osync;
29 __u32 i_lastfrag; 28 __u64 i_lastfrag;
30 __u32 i_dir_start_lookup; 29 __u32 i_dir_start_lookup;
31 struct inode vfs_inode; 30 struct inode vfs_inode;
32}; 31};
diff --git a/include/linux/ufs_fs_sb.h b/include/linux/ufs_fs_sb.h
index 8ff13c160f3d..e114c93fc578 100644
--- a/include/linux/ufs_fs_sb.h
+++ b/include/linux/ufs_fs_sb.h
@@ -21,7 +21,6 @@
21struct ufs_sb_private_info; 21struct ufs_sb_private_info;
22struct ufs_cg_private_info; 22struct ufs_cg_private_info;
23struct ufs_csum; 23struct ufs_csum;
24#define UFS_MAXCSBUFS 31
25 24
26struct ufs_sb_info { 25struct ufs_sb_info {
27 struct ufs_sb_private_info * s_uspi; 26 struct ufs_sb_private_info * s_uspi;
diff --git a/include/linux/vmstat.h b/include/linux/vmstat.h
index 5e9803ed17fc..acb1f105870c 100644
--- a/include/linux/vmstat.h
+++ b/include/linux/vmstat.h
@@ -3,20 +3,15 @@
3 3
4#include <linux/types.h> 4#include <linux/types.h>
5#include <linux/percpu.h> 5#include <linux/percpu.h>
6#include <linux/mm.h>
6#include <linux/mmzone.h> 7#include <linux/mmzone.h>
7#include <asm/atomic.h> 8#include <asm/atomic.h>
8 9
9#ifdef CONFIG_VM_EVENT_COUNTERS 10#ifdef CONFIG_ZONE_DMA
10/* 11#define DMA_ZONE(xx) xx##_DMA,
11 * Light weight per cpu counter implementation. 12#else
12 * 13#define DMA_ZONE(xx)
13 * Counters should only be incremented. You need to set EMBEDDED 14#endif
14 * to disable VM_EVENT_COUNTERS. Things like procps (vmstat,
15 * top, etc) use /proc/vmstat and depend on these counters.
16 *
17 * Counters are handled completely inline. On many platforms the code
18 * generated will simply be the increment of a global address.
19 */
20 15
21#ifdef CONFIG_ZONE_DMA32 16#ifdef CONFIG_ZONE_DMA32
22#define DMA32_ZONE(xx) xx##_DMA32, 17#define DMA32_ZONE(xx) xx##_DMA32,
@@ -30,7 +25,7 @@
30#define HIGHMEM_ZONE(xx) 25#define HIGHMEM_ZONE(xx)
31#endif 26#endif
32 27
33#define FOR_ALL_ZONES(xx) xx##_DMA, DMA32_ZONE(xx) xx##_NORMAL HIGHMEM_ZONE(xx) 28#define FOR_ALL_ZONES(xx) DMA_ZONE(xx) DMA32_ZONE(xx) xx##_NORMAL HIGHMEM_ZONE(xx)
34 29
35enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT, 30enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
36 FOR_ALL_ZONES(PGALLOC), 31 FOR_ALL_ZONES(PGALLOC),
@@ -45,6 +40,17 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
45 NR_VM_EVENT_ITEMS 40 NR_VM_EVENT_ITEMS
46}; 41};
47 42
43#ifdef CONFIG_VM_EVENT_COUNTERS
44/*
45 * Light weight per cpu counter implementation.
46 *
47 * Counters should only be incremented and no critical kernel component
48 * should rely on the counter values.
49 *
50 * Counters are handled completely inline. On many platforms the code
51 * generated will simply be the increment of a global address.
52 */
53
48struct vm_event_state { 54struct vm_event_state {
49 unsigned long event[NR_VM_EVENT_ITEMS]; 55 unsigned long event[NR_VM_EVENT_ITEMS];
50}; 56};
@@ -85,17 +91,30 @@ static inline void vm_events_fold_cpu(int cpu)
85#else 91#else
86 92
87/* Disable counters */ 93/* Disable counters */
88#define get_cpu_vm_events(e) 0L 94static inline void count_vm_event(enum vm_event_item item)
89#define count_vm_event(e) do { } while (0) 95{
90#define count_vm_events(e,d) do { } while (0) 96}
91#define __count_vm_event(e) do { } while (0) 97static inline void count_vm_events(enum vm_event_item item, long delta)
92#define __count_vm_events(e,d) do { } while (0) 98{
93#define vm_events_fold_cpu(x) do { } while (0) 99}
100static inline void __count_vm_event(enum vm_event_item item)
101{
102}
103static inline void __count_vm_events(enum vm_event_item item, long delta)
104{
105}
106static inline void all_vm_events(unsigned long *ret)
107{
108}
109static inline void vm_events_fold_cpu(int cpu)
110{
111}
94 112
95#endif /* CONFIG_VM_EVENT_COUNTERS */ 113#endif /* CONFIG_VM_EVENT_COUNTERS */
96 114
97#define __count_zone_vm_events(item, zone, delta) \ 115#define __count_zone_vm_events(item, zone, delta) \
98 __count_vm_events(item##_DMA + zone_idx(zone), delta) 116 __count_vm_events(item##_NORMAL - ZONE_NORMAL + \
117 zone_idx(zone), delta)
99 118
100/* 119/*
101 * Zone based page accounting with per cpu differentials. 120 * Zone based page accounting with per cpu differentials.
@@ -142,14 +161,16 @@ static inline unsigned long node_page_state(int node,
142 struct zone *zones = NODE_DATA(node)->node_zones; 161 struct zone *zones = NODE_DATA(node)->node_zones;
143 162
144 return 163 return
164#ifdef CONFIG_ZONE_DMA
165 zone_page_state(&zones[ZONE_DMA], item) +
166#endif
145#ifdef CONFIG_ZONE_DMA32 167#ifdef CONFIG_ZONE_DMA32
146 zone_page_state(&zones[ZONE_DMA32], item) + 168 zone_page_state(&zones[ZONE_DMA32], item) +
147#endif 169#endif
148 zone_page_state(&zones[ZONE_NORMAL], item) +
149#ifdef CONFIG_HIGHMEM 170#ifdef CONFIG_HIGHMEM
150 zone_page_state(&zones[ZONE_HIGHMEM], item) + 171 zone_page_state(&zones[ZONE_HIGHMEM], item) +
151#endif 172#endif
152 zone_page_state(&zones[ZONE_DMA], item); 173 zone_page_state(&zones[ZONE_NORMAL], item);
153} 174}
154 175
155extern void zone_statistics(struct zonelist *, struct zone *); 176extern void zone_statistics(struct zonelist *, struct zone *);
@@ -186,6 +207,9 @@ void inc_zone_page_state(struct page *, enum zone_stat_item);
186void dec_zone_page_state(struct page *, enum zone_stat_item); 207void dec_zone_page_state(struct page *, enum zone_stat_item);
187 208
188extern void inc_zone_state(struct zone *, enum zone_stat_item); 209extern void inc_zone_state(struct zone *, enum zone_stat_item);
210extern void __inc_zone_state(struct zone *, enum zone_stat_item);
211extern void dec_zone_state(struct zone *, enum zone_stat_item);
212extern void __dec_zone_state(struct zone *, enum zone_stat_item);
189 213
190void refresh_cpu_vm_stats(int); 214void refresh_cpu_vm_stats(int);
191void refresh_vm_stats(void); 215void refresh_vm_stats(void);
@@ -214,6 +238,12 @@ static inline void __inc_zone_page_state(struct page *page,
214 __inc_zone_state(page_zone(page), item); 238 __inc_zone_state(page_zone(page), item);
215} 239}
216 240
241static inline void __dec_zone_state(struct zone *zone, enum zone_stat_item item)
242{
243 atomic_long_dec(&zone->vm_stat[item]);
244 atomic_long_dec(&vm_stat[item]);
245}
246
217static inline void __dec_zone_page_state(struct page *page, 247static inline void __dec_zone_page_state(struct page *page,
218 enum zone_stat_item item) 248 enum zone_stat_item item)
219{ 249{
diff --git a/include/linux/xattr.h b/include/linux/xattr.h
index 0e7f1e20ea45..def131a5ac70 100644
--- a/include/linux/xattr.h
+++ b/include/linux/xattr.h
@@ -13,6 +13,10 @@
13#define XATTR_CREATE 0x1 /* set value, fail if attr already exists */ 13#define XATTR_CREATE 0x1 /* set value, fail if attr already exists */
14#define XATTR_REPLACE 0x2 /* set value, fail if attr does not exist */ 14#define XATTR_REPLACE 0x2 /* set value, fail if attr does not exist */
15 15
16#ifdef __KERNEL__
17
18#include <linux/types.h>
19
16/* Namespaces */ 20/* Namespaces */
17#define XATTR_OS2_PREFIX "os2." 21#define XATTR_OS2_PREFIX "os2."
18#define XATTR_OS2_PREFIX_LEN (sizeof (XATTR_OS2_PREFIX) - 1) 22#define XATTR_OS2_PREFIX_LEN (sizeof (XATTR_OS2_PREFIX) - 1)
@@ -29,6 +33,8 @@
29#define XATTR_USER_PREFIX "user." 33#define XATTR_USER_PREFIX "user."
30#define XATTR_USER_PREFIX_LEN (sizeof (XATTR_USER_PREFIX) - 1) 34#define XATTR_USER_PREFIX_LEN (sizeof (XATTR_USER_PREFIX) - 1)
31 35
36struct inode;
37struct dentry;
32 38
33struct xattr_handler { 39struct xattr_handler {
34 char *prefix; 40 char *prefix;
@@ -50,4 +56,6 @@ ssize_t generic_listxattr(struct dentry *dentry, char *buffer, size_t buffer_siz
50int generic_setxattr(struct dentry *dentry, const char *name, const void *value, size_t size, int flags); 56int generic_setxattr(struct dentry *dentry, const char *name, const void *value, size_t size, int flags);
51int generic_removexattr(struct dentry *dentry, const char *name); 57int generic_removexattr(struct dentry *dentry, const char *name);
52 58
59#endif /* __KERNEL__ */
60
53#endif /* _LINUX_XATTR_H */ 61#endif /* _LINUX_XATTR_H */
diff --git a/include/net/ax25.h b/include/net/ax25.h
index 5ae10dd2e32e..47ff2f46e908 100644
--- a/include/net/ax25.h
+++ b/include/net/ax25.h
@@ -377,7 +377,7 @@ extern int ax25_check_iframes_acked(ax25_cb *, unsigned short);
377/* ax25_route.c */ 377/* ax25_route.c */
378extern void ax25_rt_device_down(struct net_device *); 378extern void ax25_rt_device_down(struct net_device *);
379extern int ax25_rt_ioctl(unsigned int, void __user *); 379extern int ax25_rt_ioctl(unsigned int, void __user *);
380extern struct file_operations ax25_route_fops; 380extern const struct file_operations ax25_route_fops;
381extern ax25_route *ax25_get_route(ax25_address *addr, struct net_device *dev); 381extern ax25_route *ax25_get_route(ax25_address *addr, struct net_device *dev);
382extern int ax25_rt_autobind(ax25_cb *, ax25_address *); 382extern int ax25_rt_autobind(ax25_cb *, ax25_address *);
383extern struct sk_buff *ax25_rt_build_path(struct sk_buff *, ax25_address *, ax25_address *, ax25_digi *); 383extern struct sk_buff *ax25_rt_build_path(struct sk_buff *, ax25_address *, ax25_address *, ax25_digi *);
@@ -430,7 +430,7 @@ extern unsigned long ax25_display_timer(struct timer_list *);
430extern int ax25_uid_policy; 430extern int ax25_uid_policy;
431extern ax25_uid_assoc *ax25_findbyuid(uid_t); 431extern ax25_uid_assoc *ax25_findbyuid(uid_t);
432extern int __must_check ax25_uid_ioctl(int, struct sockaddr_ax25 *); 432extern int __must_check ax25_uid_ioctl(int, struct sockaddr_ax25 *);
433extern struct file_operations ax25_uid_fops; 433extern const struct file_operations ax25_uid_fops;
434extern void ax25_uid_free(void); 434extern void ax25_uid_free(void);
435 435
436/* sysctl_net_ax25.c */ 436/* sysctl_net_ax25.c */
diff --git a/include/net/dn_route.h b/include/net/dn_route.h
index 76f957e258b0..a566944c4962 100644
--- a/include/net/dn_route.h
+++ b/include/net/dn_route.h
@@ -68,9 +68,10 @@ extern void dn_rt_cache_flush(int delay);
68struct dn_route { 68struct dn_route {
69 union { 69 union {
70 struct dst_entry dst; 70 struct dst_entry dst;
71 struct dn_route *rt_next;
72 } u; 71 } u;
73 72
73 struct flowi fl;
74
74 __le16 rt_saddr; 75 __le16 rt_saddr;
75 __le16 rt_daddr; 76 __le16 rt_daddr;
76 __le16 rt_gateway; 77 __le16 rt_gateway;
@@ -80,8 +81,6 @@ struct dn_route {
80 81
81 unsigned rt_flags; 82 unsigned rt_flags;
82 unsigned rt_type; 83 unsigned rt_type;
83
84 struct flowi fl;
85}; 84};
86 85
87extern void dn_route_init(void); 86extern void dn_route_init(void);
diff --git a/include/net/dst.h b/include/net/dst.h
index 62b7e7598e9a..e12a8ce0b9b3 100644
--- a/include/net/dst.h
+++ b/include/net/dst.h
@@ -37,9 +37,7 @@ struct sk_buff;
37 37
38struct dst_entry 38struct dst_entry
39{ 39{
40 struct dst_entry *next; 40 struct rcu_head rcu_head;
41 atomic_t __refcnt; /* client references */
42 int __use;
43 struct dst_entry *child; 41 struct dst_entry *child;
44 struct net_device *dev; 42 struct net_device *dev;
45 short error; 43 short error;
@@ -50,7 +48,6 @@ struct dst_entry
50#define DST_NOPOLICY 4 48#define DST_NOPOLICY 4
51#define DST_NOHASH 8 49#define DST_NOHASH 8
52#define DST_BALANCED 0x10 50#define DST_BALANCED 0x10
53 unsigned long lastuse;
54 unsigned long expires; 51 unsigned long expires;
55 52
56 unsigned short header_len; /* more space at head required */ 53 unsigned short header_len; /* more space at head required */
@@ -75,8 +72,16 @@ struct dst_entry
75#endif 72#endif
76 73
77 struct dst_ops *ops; 74 struct dst_ops *ops;
78 struct rcu_head rcu_head;
79 75
76 unsigned long lastuse;
77 atomic_t __refcnt; /* client references */
78 int __use;
79 union {
80 struct dst_entry *next;
81 struct rtable *rt_next;
82 struct rt6_info *rt6_next;
83 struct dn_route *dn_next;
84 };
80 char info[0]; 85 char info[0];
81}; 86};
82 87
diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h
index 7be4f4e3a0f2..9eda572a2a65 100644
--- a/include/net/ip6_fib.h
+++ b/include/net/ip6_fib.h
@@ -83,7 +83,6 @@ struct rt6_info
83{ 83{
84 union { 84 union {
85 struct dst_entry dst; 85 struct dst_entry dst;
86 struct rt6_info *next;
87 } u; 86 } u;
88 87
89 struct inet6_dev *rt6i_idev; 88 struct inet6_dev *rt6i_idev;
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
index 68ec27490c20..0e690e34c00b 100644
--- a/include/net/netfilter/nf_conntrack.h
+++ b/include/net/netfilter/nf_conntrack.h
@@ -257,6 +257,12 @@ extern int nf_conntrack_max;
257 257
258DECLARE_PER_CPU(struct ip_conntrack_stat, nf_conntrack_stat); 258DECLARE_PER_CPU(struct ip_conntrack_stat, nf_conntrack_stat);
259#define NF_CT_STAT_INC(count) (__get_cpu_var(nf_conntrack_stat).count++) 259#define NF_CT_STAT_INC(count) (__get_cpu_var(nf_conntrack_stat).count++)
260#define NF_CT_STAT_INC_ATOMIC(count) \
261do { \
262 local_bh_disable(); \
263 __get_cpu_var(nf_conntrack_stat).count++; \
264 local_bh_enable(); \
265} while (0)
260 266
261/* no helper, no nat */ 267/* no helper, no nat */
262#define NF_CT_F_BASIC 0 268#define NF_CT_F_BASIC 0
diff --git a/include/net/netfilter/nf_conntrack_expect.h b/include/net/netfilter/nf_conntrack_expect.h
index 41bcc9eb4206..173c7c1eff23 100644
--- a/include/net/netfilter/nf_conntrack_expect.h
+++ b/include/net/netfilter/nf_conntrack_expect.h
@@ -8,7 +8,7 @@
8 8
9extern struct list_head nf_conntrack_expect_list; 9extern struct list_head nf_conntrack_expect_list;
10extern struct kmem_cache *nf_conntrack_expect_cachep; 10extern struct kmem_cache *nf_conntrack_expect_cachep;
11extern struct file_operations exp_file_ops; 11extern const struct file_operations exp_file_ops;
12 12
13struct nf_conntrack_expect 13struct nf_conntrack_expect
14{ 14{
diff --git a/include/net/netfilter/nf_conntrack_l3proto.h b/include/net/netfilter/nf_conntrack_l3proto.h
index 664ddcffe00d..eb575cbd4c95 100644
--- a/include/net/netfilter/nf_conntrack_l3proto.h
+++ b/include/net/netfilter/nf_conntrack_l3proto.h
@@ -89,7 +89,7 @@ extern struct nf_conntrack_l3proto *nf_ct_l3protos[AF_MAX];
89 89
90/* Protocol registration. */ 90/* Protocol registration. */
91extern int nf_conntrack_l3proto_register(struct nf_conntrack_l3proto *proto); 91extern int nf_conntrack_l3proto_register(struct nf_conntrack_l3proto *proto);
92extern int nf_conntrack_l3proto_unregister(struct nf_conntrack_l3proto *proto); 92extern void nf_conntrack_l3proto_unregister(struct nf_conntrack_l3proto *proto);
93 93
94extern struct nf_conntrack_l3proto * 94extern struct nf_conntrack_l3proto *
95nf_ct_l3proto_find_get(u_int16_t l3proto); 95nf_ct_l3proto_find_get(u_int16_t l3proto);
@@ -106,7 +106,7 @@ __nf_ct_l3proto_find(u_int16_t l3proto)
106{ 106{
107 if (unlikely(l3proto >= AF_MAX)) 107 if (unlikely(l3proto >= AF_MAX))
108 return &nf_conntrack_l3proto_generic; 108 return &nf_conntrack_l3proto_generic;
109 return nf_ct_l3protos[l3proto]; 109 return rcu_dereference(nf_ct_l3protos[l3proto]);
110} 110}
111 111
112#endif /*_NF_CONNTRACK_L3PROTO_H*/ 112#endif /*_NF_CONNTRACK_L3PROTO_H*/
diff --git a/include/net/netfilter/nf_conntrack_l4proto.h b/include/net/netfilter/nf_conntrack_l4proto.h
index fc8af08ff542..8415182ec126 100644
--- a/include/net/netfilter/nf_conntrack_l4proto.h
+++ b/include/net/netfilter/nf_conntrack_l4proto.h
@@ -109,7 +109,7 @@ extern void nf_ct_l4proto_put(struct nf_conntrack_l4proto *p);
109 109
110/* Protocol registration. */ 110/* Protocol registration. */
111extern int nf_conntrack_l4proto_register(struct nf_conntrack_l4proto *proto); 111extern int nf_conntrack_l4proto_register(struct nf_conntrack_l4proto *proto);
112extern int nf_conntrack_l4proto_unregister(struct nf_conntrack_l4proto *proto); 112extern void nf_conntrack_l4proto_unregister(struct nf_conntrack_l4proto *proto);
113 113
114/* Generic netlink helpers */ 114/* Generic netlink helpers */
115extern int nf_ct_port_tuple_to_nfattr(struct sk_buff *skb, 115extern int nf_ct_port_tuple_to_nfattr(struct sk_buff *skb,
diff --git a/include/net/netrom.h b/include/net/netrom.h
index e0ca112024a3..f06852bba62a 100644
--- a/include/net/netrom.h
+++ b/include/net/netrom.h
@@ -215,8 +215,8 @@ extern struct net_device *nr_dev_get(ax25_address *);
215extern int nr_rt_ioctl(unsigned int, void __user *); 215extern int nr_rt_ioctl(unsigned int, void __user *);
216extern void nr_link_failed(ax25_cb *, int); 216extern void nr_link_failed(ax25_cb *, int);
217extern int nr_route_frame(struct sk_buff *, ax25_cb *); 217extern int nr_route_frame(struct sk_buff *, ax25_cb *);
218extern struct file_operations nr_nodes_fops; 218extern const struct file_operations nr_nodes_fops;
219extern struct file_operations nr_neigh_fops; 219extern const struct file_operations nr_neigh_fops;
220extern void nr_rt_free(void); 220extern void nr_rt_free(void);
221 221
222/* nr_subr.c */ 222/* nr_subr.c */
diff --git a/include/net/rose.h b/include/net/rose.h
index 4c05a88b921b..a4047d3cf5dd 100644
--- a/include/net/rose.h
+++ b/include/net/rose.h
@@ -189,9 +189,9 @@ extern void rose_enquiry_response(struct sock *);
189 189
190/* rose_route.c */ 190/* rose_route.c */
191extern struct rose_neigh rose_loopback_neigh; 191extern struct rose_neigh rose_loopback_neigh;
192extern struct file_operations rose_neigh_fops; 192extern const struct file_operations rose_neigh_fops;
193extern struct file_operations rose_nodes_fops; 193extern const struct file_operations rose_nodes_fops;
194extern struct file_operations rose_routes_fops; 194extern const struct file_operations rose_routes_fops;
195 195
196extern void rose_add_loopback_neigh(void); 196extern void rose_add_loopback_neigh(void);
197extern int __must_check rose_add_loopback_node(rose_address *); 197extern int __must_check rose_add_loopback_node(rose_address *);
diff --git a/include/net/route.h b/include/net/route.h
index 1440bdb5a27d..749e4dfe5ff3 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -53,9 +53,11 @@ struct rtable
53 union 53 union
54 { 54 {
55 struct dst_entry dst; 55 struct dst_entry dst;
56 struct rtable *rt_next;
57 } u; 56 } u;
58 57
58 /* Cache lookup keys */
59 struct flowi fl;
60
59 struct in_device *idev; 61 struct in_device *idev;
60 62
61 unsigned rt_flags; 63 unsigned rt_flags;
@@ -69,9 +71,6 @@ struct rtable
69 /* Info on neighbour */ 71 /* Info on neighbour */
70 __be32 rt_gateway; 72 __be32 rt_gateway;
71 73
72 /* Cache lookup keys */
73 struct flowi fl;
74
75 /* Miscellaneous cached information */ 74 /* Miscellaneous cached information */
76 __be32 rt_spec_dst; /* RFC1122 specific destination */ 75 __be32 rt_spec_dst; /* RFC1122 specific destination */
77 struct inet_peer *peer; /* long-living peer info */ 76 struct inet_peer *peer; /* long-living peer info */
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index 0c775fceb675..ad0182ef7809 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -323,12 +323,20 @@ struct sas_ha_event {
323 struct sas_ha_struct *ha; 323 struct sas_ha_struct *ha;
324}; 324};
325 325
326enum sas_ha_state {
327 SAS_HA_REGISTERED,
328 SAS_HA_UNREGISTERED
329};
330
326struct sas_ha_struct { 331struct sas_ha_struct {
327/* private: */ 332/* private: */
328 spinlock_t event_lock; 333 spinlock_t event_lock;
329 struct sas_ha_event ha_events[HA_NUM_EVENTS]; 334 struct sas_ha_event ha_events[HA_NUM_EVENTS];
330 unsigned long pending; 335 unsigned long pending;
331 336
337 enum sas_ha_state state;
338 spinlock_t state_lock;
339
332 struct scsi_core core; 340 struct scsi_core core;
333 341
334/* public: */ 342/* public: */
@@ -553,15 +561,15 @@ struct sas_task {
553#define SAS_TASK_STATE_PENDING 1 561#define SAS_TASK_STATE_PENDING 1
554#define SAS_TASK_STATE_DONE 2 562#define SAS_TASK_STATE_DONE 2
555#define SAS_TASK_STATE_ABORTED 4 563#define SAS_TASK_STATE_ABORTED 4
556#define SAS_TASK_INITIATOR_ABORTED 8 564#define SAS_TASK_NEED_DEV_RESET 8
565#define SAS_TASK_AT_INITIATOR 16
557 566
558static inline struct sas_task *sas_alloc_task(gfp_t flags) 567static inline struct sas_task *sas_alloc_task(gfp_t flags)
559{ 568{
560 extern struct kmem_cache *sas_task_cache; 569 extern struct kmem_cache *sas_task_cache;
561 struct sas_task *task = kmem_cache_alloc(sas_task_cache, flags); 570 struct sas_task *task = kmem_cache_zalloc(sas_task_cache, flags);
562 571
563 if (task) { 572 if (task) {
564 memset(task, 0, sizeof(*task));
565 INIT_LIST_HEAD(&task->list); 573 INIT_LIST_HEAD(&task->list);
566 spin_lock_init(&task->task_state_lock); 574 spin_lock_init(&task->task_state_lock);
567 task->task_state_flags = SAS_TASK_STATE_PENDING; 575 task->task_state_flags = SAS_TASK_STATE_PENDING;
@@ -613,6 +621,9 @@ struct sas_domain_function_template {
613extern int sas_register_ha(struct sas_ha_struct *); 621extern int sas_register_ha(struct sas_ha_struct *);
614extern int sas_unregister_ha(struct sas_ha_struct *); 622extern int sas_unregister_ha(struct sas_ha_struct *);
615 623
624int sas_set_phy_speed(struct sas_phy *phy,
625 struct sas_phy_linkrates *rates);
626int sas_phy_enable(struct sas_phy *phy, int enabled);
616int sas_phy_reset(struct sas_phy *phy, int hard_reset); 627int sas_phy_reset(struct sas_phy *phy, int hard_reset);
617extern int sas_queuecommand(struct scsi_cmnd *, 628extern int sas_queuecommand(struct scsi_cmnd *,
618 void (*scsi_done)(struct scsi_cmnd *)); 629 void (*scsi_done)(struct scsi_cmnd *));
@@ -646,6 +657,9 @@ void sas_unregister_dev(struct domain_device *);
646 657
647void sas_init_dev(struct domain_device *); 658void sas_init_dev(struct domain_device *);
648 659
649void sas_task_abort(struct work_struct *); 660void sas_task_abort(struct sas_task *);
661int __sas_task_abort(struct sas_task *);
662int sas_eh_device_reset_handler(struct scsi_cmnd *cmd);
663int sas_eh_bus_reset_handler(struct scsi_cmnd *cmd);
650 664
651#endif /* _SASLIB_H_ */ 665#endif /* _SASLIB_H_ */
diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h
index 59633a82de47..9aedc19820b0 100644
--- a/include/scsi/scsi_transport_sas.h
+++ b/include/scsi/scsi_transport_sas.h
@@ -54,6 +54,7 @@ struct sas_identify {
54struct sas_phy { 54struct sas_phy {
55 struct device dev; 55 struct device dev;
56 int number; 56 int number;
57 int enabled;
57 58
58 /* phy identification */ 59 /* phy identification */
59 struct sas_identify identify; 60 struct sas_identify identify;
@@ -163,6 +164,7 @@ struct sas_function_template {
163 int (*get_enclosure_identifier)(struct sas_rphy *, u64 *); 164 int (*get_enclosure_identifier)(struct sas_rphy *, u64 *);
164 int (*get_bay_identifier)(struct sas_rphy *); 165 int (*get_bay_identifier)(struct sas_rphy *);
165 int (*phy_reset)(struct sas_phy *, int); 166 int (*phy_reset)(struct sas_phy *, int);
167 int (*phy_enable)(struct sas_phy *, int);
166 int (*set_phy_speed)(struct sas_phy *, struct sas_phy_linkrates *); 168 int (*set_phy_speed)(struct sas_phy *, struct sas_phy_linkrates *);
167}; 169};
168 170
@@ -180,6 +182,7 @@ extern struct sas_rphy *sas_end_device_alloc(struct sas_port *);
180extern struct sas_rphy *sas_expander_alloc(struct sas_port *, enum sas_device_type); 182extern struct sas_rphy *sas_expander_alloc(struct sas_port *, enum sas_device_type);
181void sas_rphy_free(struct sas_rphy *); 183void sas_rphy_free(struct sas_rphy *);
182extern int sas_rphy_add(struct sas_rphy *); 184extern int sas_rphy_add(struct sas_rphy *);
185extern void sas_rphy_remove(struct sas_rphy *);
183extern void sas_rphy_delete(struct sas_rphy *); 186extern void sas_rphy_delete(struct sas_rphy *);
184extern int scsi_is_sas_rphy(const struct device *); 187extern int scsi_is_sas_rphy(const struct device *);
185 188
diff --git a/include/scsi/scsi_transport_spi.h b/include/scsi/scsi_transport_spi.h
index da180f738477..286e9628ed8b 100644
--- a/include/scsi/scsi_transport_spi.h
+++ b/include/scsi/scsi_transport_spi.h
@@ -85,6 +85,7 @@ struct spi_host_attrs {
85#define spi_pcomp_en(x) (((struct spi_transport_attrs *)&(x)->starget_data)->pcomp_en) 85#define spi_pcomp_en(x) (((struct spi_transport_attrs *)&(x)->starget_data)->pcomp_en)
86#define spi_hold_mcs(x) (((struct spi_transport_attrs *)&(x)->starget_data)->hold_mcs) 86#define spi_hold_mcs(x) (((struct spi_transport_attrs *)&(x)->starget_data)->hold_mcs)
87#define spi_initial_dv(x) (((struct spi_transport_attrs *)&(x)->starget_data)->initial_dv) 87#define spi_initial_dv(x) (((struct spi_transport_attrs *)&(x)->starget_data)->initial_dv)
88#define spi_dv_pending(x) (((struct spi_transport_attrs *)&(x)->starget_data)->dv_pending)
88 89
89#define spi_support_sync(x) (((struct spi_transport_attrs *)&(x)->starget_data)->support_sync) 90#define spi_support_sync(x) (((struct spi_transport_attrs *)&(x)->starget_data)->support_sync)
90#define spi_support_wide(x) (((struct spi_transport_attrs *)&(x)->starget_data)->support_wide) 91#define spi_support_wide(x) (((struct spi_transport_attrs *)&(x)->starget_data)->support_wide)
diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index ee6bc2d06803..deff5a92efa6 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -447,7 +447,7 @@ struct snd_pcm_notify {
447 * Registering 447 * Registering
448 */ 448 */
449 449
450extern struct file_operations snd_pcm_f_ops[2]; 450extern const struct file_operations snd_pcm_f_ops[2];
451 451
452int snd_pcm_new(struct snd_card *card, char *id, int device, 452int snd_pcm_new(struct snd_card *card, char *id, int device,
453 int playback_count, int capture_count, 453 int playback_count, int capture_count,
diff --git a/include/video/neomagic.h b/include/video/neomagic.h
index 78b1f15a538f..a9e118a1cd16 100644
--- a/include/video/neomagic.h
+++ b/include/video/neomagic.h
@@ -140,7 +140,8 @@ typedef volatile struct {
140 140
141struct neofb_par { 141struct neofb_par {
142 struct vgastate state; 142 struct vgastate state;
143 atomic_t ref_count; 143 struct mutex open_lock;
144 unsigned int ref_count;
144 145
145 unsigned char MiscOutReg; /* Misc */ 146 unsigned char MiscOutReg; /* Misc */
146 unsigned char CRTC[25]; /* Crtc Controller */ 147 unsigned char CRTC[25]; /* Crtc Controller */
diff --git a/include/video/s3blit.h b/include/video/s3blit.h
deleted file mode 100644
index b1db63187b4e..000000000000
--- a/include/video/s3blit.h
+++ /dev/null
@@ -1,79 +0,0 @@
1#ifndef _VIDEO_S3BLIT_H
2#define _VIDEO_S3BLIT_H
3
4/* s3 commands */
5#define S3_BITBLT 0xc011
6#define S3_TWOPOINTLINE 0x2811
7#define S3_FILLEDRECT 0x40b1
8
9#define S3_FIFO_EMPTY 0x0400
10#define S3_HDW_BUSY 0x0200
11
12/* Enhanced register mapping (MMIO mode) */
13
14#define S3_READ_SEL 0xbee8 /* offset f */
15#define S3_MULT_MISC 0xbee8 /* offset e */
16#define S3_ERR_TERM 0x92e8
17#define S3_FRGD_COLOR 0xa6e8
18#define S3_BKGD_COLOR 0xa2e8
19#define S3_PIXEL_CNTL 0xbee8 /* offset a */
20#define S3_FRGD_MIX 0xbae8
21#define S3_BKGD_MIX 0xb6e8
22#define S3_CUR_Y 0x82e8
23#define S3_CUR_X 0x86e8
24#define S3_DESTY_AXSTP 0x8ae8
25#define S3_DESTX_DIASTP 0x8ee8
26#define S3_MIN_AXIS_PCNT 0xbee8 /* offset 0 */
27#define S3_MAJ_AXIS_PCNT 0x96e8
28#define S3_CMD 0x9ae8
29#define S3_GP_STAT 0x9ae8
30#define S3_ADVFUNC_CNTL 0x4ae8
31#define S3_WRT_MASK 0xaae8
32#define S3_RD_MASK 0xaee8
33
34/* Enhanced register mapping (Packed MMIO mode, write only) */
35#define S3_ALT_CURXY 0x8100
36#define S3_ALT_CURXY2 0x8104
37#define S3_ALT_STEP 0x8108
38#define S3_ALT_STEP2 0x810c
39#define S3_ALT_ERR 0x8110
40#define S3_ALT_CMD 0x8118
41#define S3_ALT_MIX 0x8134
42#define S3_ALT_PCNT 0x8148
43#define S3_ALT_PAT 0x8168
44
45/* Drawing modes */
46#define S3_NOTCUR 0x0000
47#define S3_LOGICALZERO 0x0001
48#define S3_LOGICALONE 0x0002
49#define S3_LEAVEASIS 0x0003
50#define S3_NOTNEW 0x0004
51#define S3_CURXORNEW 0x0005
52#define S3_NOT_CURXORNEW 0x0006
53#define S3_NEW 0x0007
54#define S3_NOTCURORNOTNEW 0x0008
55#define S3_CURORNOTNEW 0x0009
56#define S3_NOTCURORNEW 0x000a
57#define S3_CURORNEW 0x000b
58#define S3_CURANDNEW 0x000c
59#define S3_NOTCURANDNEW 0x000d
60#define S3_CURANDNOTNEW 0x000e
61#define S3_NOTCURANDNOTNEW 0x000f
62
63#define S3_CRTC_ADR 0x03d4
64#define S3_CRTC_DATA 0x03d5
65
66#define S3_REG_LOCK2 0x39
67#define S3_HGC_MODE 0x45
68
69#define S3_HWGC_ORGX_H 0x46
70#define S3_HWGC_ORGX_L 0x47
71#define S3_HWGC_ORGY_H 0x48
72#define S3_HWGC_ORGY_L 0x49
73#define S3_HWGC_DX 0x4e
74#define S3_HWGC_DY 0x4f
75
76
77#define S3_LAW_CTL 0x58
78
79#endif /* _VIDEO_S3BLIT_H */