aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/networking/00-INDEX10
-rw-r--r--Documentation/networking/Configurable34
-rw-r--r--Documentation/networking/comx.txt248
-rw-r--r--Documentation/networking/ncsa-telnet16
-rw-r--r--Documentation/networking/pt.txt58
-rw-r--r--Documentation/networking/routing.txt46
-rw-r--r--Documentation/networking/slicecom.hun371
-rw-r--r--Documentation/networking/slicecom.txt369
-rw-r--r--Documentation/powerpc/booting-without-of.txt275
-rw-r--r--arch/arm/Kconfig2
-rw-r--r--arch/arm/mach-netx/xc.c6
-rw-r--r--arch/arm/mach-pxa/time.c23
-rw-r--r--arch/arm/plat-omap/fb.c2
-rw-r--r--arch/frv/mm/init.c2
-rw-r--r--arch/powerpc/boot/dts/walnut.dts4
-rwxr-xr-xarch/powerpc/boot/wrapper43
-rw-r--r--arch/powerpc/configs/pasemi_defconfig308
-rw-r--r--arch/powerpc/configs/ppc64_defconfig247
-rw-r--r--arch/powerpc/kernel/cputable.c36
-rw-r--r--arch/powerpc/kernel/entry_32.S23
-rw-r--r--arch/powerpc/kernel/head_64.S2
-rw-r--r--arch/powerpc/kernel/idle.c2
-rw-r--r--arch/powerpc/kernel/misc_32.S32
-rw-r--r--arch/powerpc/kernel/prom.c12
-rw-r--r--arch/powerpc/kernel/prom_init.c2
-rw-r--r--arch/powerpc/kernel/setup_64.c19
-rw-r--r--arch/powerpc/kernel/swsusp_32.S2
-rw-r--r--arch/powerpc/kernel/time.c10
-rw-r--r--arch/powerpc/kernel/vmlinux.lds.S3
-rw-r--r--arch/powerpc/mm/40x_mmu.c17
-rw-r--r--arch/powerpc/mm/44x_mmu.c1
-rw-r--r--arch/powerpc/mm/fault.c2
-rw-r--r--arch/powerpc/mm/hash_low_64.S5
-rw-r--r--arch/powerpc/mm/hash_utils_64.c7
-rw-r--r--arch/powerpc/mm/mmu_decl.h4
-rw-r--r--arch/powerpc/mm/slb.c35
-rw-r--r--arch/powerpc/platforms/cell/interrupt.c24
-rw-r--r--arch/powerpc/platforms/cell/smp.c1
-rw-r--r--arch/powerpc/platforms/celleb/setup.c1
-rw-r--r--arch/powerpc/platforms/iseries/irq.h4
-rw-r--r--arch/powerpc/platforms/iseries/setup.c4
-rw-r--r--arch/powerpc/platforms/iseries/vio.c10
-rw-r--r--arch/powerpc/platforms/pseries/eeh.c13
-rw-r--r--arch/powerpc/platforms/pseries/eeh_driver.c18
-rw-r--r--arch/powerpc/platforms/pseries/firmware.c1
-rw-r--r--arch/powerpc/platforms/pseries/msi.c6
-rw-r--r--arch/powerpc/sysdev/i8259.c1
-rw-r--r--arch/powerpc/sysdev/mv64x60_pci.c10
-rw-r--r--arch/ppc/kernel/entry.S23
-rw-r--r--arch/ppc/kernel/misc.S31
-rw-r--r--arch/ppc/mm/44x_mmu.c1
-rw-r--r--arch/ppc/mm/4xx_mmu.c17
-rw-r--r--arch/ppc/mm/fault.c2
-rw-r--r--arch/ppc/mm/mmu_decl.h4
-rw-r--r--arch/ppc/platforms/4xx/ebony.c2
-rw-r--r--arch/ppc/platforms/4xx/luan.c7
-rw-r--r--arch/ppc/platforms/4xx/ocotea.c2
-rw-r--r--arch/ppc/platforms/4xx/taishan.c2
-rw-r--r--arch/ppc/syslib/i8259.c1
-rw-r--r--arch/ppc/syslib/m8260_setup.c13
-rw-r--r--arch/sparc/kernel/irq.c1
-rw-r--r--arch/sparc64/kernel/ds.c1
-rw-r--r--arch/sparc64/kernel/module.c1
-rw-r--r--arch/sparc64/kernel/sys_sparc32.c1
-rw-r--r--arch/sparc64/kernel/sys_sunos32.c1
-rw-r--r--arch/sparc64/kernel/time.c2
-rw-r--r--arm/configs/netx_defconfig925
-rw-r--r--block/cfq-iosched.c34
-rw-r--r--block/ll_rw_blk.c41
-rw-r--r--drivers/block/pktcdvd.c9
-rw-r--r--drivers/char/tty_ioctl.c170
-rw-r--r--drivers/firewire/fw-sbp2.c11
-rw-r--r--drivers/macintosh/windfarm_core.c10
-rw-r--r--drivers/md/bitmap.c3
-rw-r--r--drivers/md/dm-table.c3
-rw-r--r--drivers/md/linear.c3
-rw-r--r--drivers/md/md.c4
-rw-r--r--drivers/md/multipath.c3
-rw-r--r--drivers/md/raid0.c3
-rw-r--r--drivers/md/raid1.c3
-rw-r--r--drivers/md/raid10.c3
-rw-r--r--drivers/md/raid5.c3
-rw-r--r--drivers/mmc/card/queue.c2
-rw-r--r--drivers/net/Kconfig7
-rw-r--r--drivers/net/hamradio/6pack.c26
-rw-r--r--drivers/net/irda/irtty-sir.c7
-rw-r--r--drivers/net/ppp_async.c10
-rw-r--r--drivers/net/ppp_synctty.c10
-rw-r--r--drivers/net/pppol2tp.c25
-rw-r--r--drivers/net/rrunner.c18
-rw-r--r--drivers/net/slip.c8
-rw-r--r--drivers/net/usb/Kconfig9
-rw-r--r--drivers/net/usb/usbnet.c7
-rw-r--r--drivers/net/wan/x25_asy.c6
-rw-r--r--drivers/net/wireless/strip.c10
-rw-r--r--drivers/serial/uartlite.c10
-rw-r--r--drivers/video/cyber2000fb.c2
-rw-r--r--fs/dlm/lowcomms.c6
-rw-r--r--fs/ioprio.c4
-rw-r--r--fs/ocfs2/alloc.c2
-rw-r--r--fs/ocfs2/aops.c22
-rw-r--r--fs/ocfs2/cluster/heartbeat.c2
-rw-r--r--fs/ocfs2/dcache.c2
-rw-r--r--fs/ocfs2/dir.c6
-rw-r--r--fs/ocfs2/dlmglue.c25
-rw-r--r--fs/ocfs2/file.c26
-rw-r--r--fs/ocfs2/namei.c13
-rw-r--r--fs/proc/proc_net.c7
-rw-r--r--include/asm-arm/hardware/iop3xx.h2
-rw-r--r--include/asm-arm/pgtable.h2
-rw-r--r--include/asm-frv/irq.h3
-rw-r--r--include/asm-powerpc/pgtable-ppc32.h13
-rw-r--r--include/asm-powerpc/systbl.h2
-rw-r--r--include/asm-powerpc/time.h20
-rw-r--r--include/asm-powerpc/tlbflush.h12
-rw-r--r--include/asm-sparc64/vio.h4
-rw-r--r--include/linux/blkdev.h1
-rw-r--r--include/linux/mroute.h12
-rw-r--r--include/linux/netfilter/Kbuild18
-rw-r--r--include/linux/netfilter_ipv4/Kbuild28
-rw-r--r--include/linux/netfilter_ipv6/Kbuild2
-rw-r--r--include/linux/netlink.h2
-rw-r--r--include/linux/proc_fs.h3
-rw-r--r--include/linux/tty.h4
-rw-r--r--include/net/inet_hashtables.h71
-rw-r--r--include/net/ip_fib.h15
-rw-r--r--include/net/ip_vs.h8
-rw-r--r--include/net/sock.h63
-rw-r--r--ipc/mqueue.c6
-rw-r--r--lib/libcrc32c.c7
-rw-r--r--net/8021q/vlan.c1
-rw-r--r--net/bridge/netfilter/ebt_arp.c2
-rw-r--r--net/core/dst.c1
-rw-r--r--net/core/neighbour.c2
-rw-r--r--net/core/net_namespace.c28
-rw-r--r--net/core/sock.c69
-rw-r--r--net/dccp/ipv4.c3
-rw-r--r--net/dccp/ipv6.c3
-rw-r--r--net/dccp/proto.c9
-rw-r--r--net/decnet/dn_dev.c2
-rw-r--r--net/ieee80211/ieee80211_crypt_tkip.c1
-rw-r--r--net/ieee80211/ieee80211_crypt_wep.c1
-rw-r--r--net/ipv4/fib_frontend.c15
-rw-r--r--net/ipv4/inet_diag.c9
-rw-r--r--net/ipv4/inet_hashtables.c7
-rw-r--r--net/ipv4/inet_timewait_sock.c13
-rw-r--r--net/ipv4/ip_output.c28
-rw-r--r--net/ipv4/ip_sockglue.c39
-rw-r--r--net/ipv4/ipcomp.c3
-rw-r--r--net/ipv4/ipvs/ip_vs_conn.c19
-rw-r--r--net/ipv4/ipvs/ip_vs_core.c20
-rw-r--r--net/ipv4/ipvs/ip_vs_ctl.c26
-rw-r--r--net/ipv4/ipvs/ip_vs_sync.c24
-rw-r--r--net/ipv4/netfilter/Makefile20
-rw-r--r--net/ipv4/netfilter/ip_queue.c37
-rw-r--r--net/ipv4/netfilter/nf_nat_amanda.c2
-rw-r--r--net/ipv4/netfilter/nf_nat_ftp.c2
-rw-r--r--net/ipv4/netfilter/nf_nat_h323.c18
-rw-r--r--net/ipv4/netfilter/nf_nat_irc.c2
-rw-r--r--net/ipv4/netfilter/nf_nat_pptp.c8
-rw-r--r--net/ipv4/netfilter/nf_nat_sip.c4
-rw-r--r--net/ipv4/netfilter/nf_nat_tftp.c2
-rw-r--r--net/ipv4/proc.c19
-rw-r--r--net/ipv4/raw.c3
-rw-r--r--net/ipv4/tcp.c4
-rw-r--r--net/ipv4/tcp_ipv4.c14
-rw-r--r--net/ipv4/udp.c3
-rw-r--r--net/ipv4/udplite.c3
-rw-r--r--net/ipv6/inet6_hashtables.c19
-rw-r--r--net/ipv6/ip6_output.c36
-rw-r--r--net/ipv6/ipcomp6.c3
-rw-r--r--net/ipv6/netfilter/Makefile28
-rw-r--r--net/ipv6/netfilter/ip6_queue.c37
-rw-r--r--net/ipv6/proc.c19
-rw-r--r--net/ipv6/raw.c3
-rw-r--r--net/ipv6/route.c91
-rw-r--r--net/ipv6/tcp_ipv6.c3
-rw-r--r--net/ipv6/udp.c8
-rw-r--r--net/ipv6/udplite.c3
-rw-r--r--net/netfilter/Makefile14
-rw-r--r--net/netfilter/nf_sockopt.c13
-rw-r--r--net/netfilter/xt_connlimit.c5
-rw-r--r--net/netfilter/xt_time.c3
-rw-r--r--net/netfilter/xt_u32.c5
-rw-r--r--net/netlink/af_netlink.c10
-rw-r--r--net/sched/cls_u32.c4
-rw-r--r--net/sched/sch_teql.c3
-rw-r--r--net/sctp/socket.c6
-rw-r--r--security/selinux/ss/avtab.c32
-rw-r--r--security/selinux/ss/avtab.h5
-rw-r--r--security/selinux/ss/conditional.c3
-rw-r--r--security/selinux/ss/ebitmap.c2
-rw-r--r--security/selinux/ss/mls.c66
-rw-r--r--security/selinux/ss/mls.h2
-rw-r--r--security/selinux/ss/policydb.c45
-rw-r--r--security/selinux/ss/policydb.h3
-rw-r--r--security/selinux/xfrm.c13
197 files changed, 2990 insertions, 2241 deletions
diff --git a/Documentation/networking/00-INDEX b/Documentation/networking/00-INDEX
index f5a5e6d3d541..563e442f2d42 100644
--- a/Documentation/networking/00-INDEX
+++ b/Documentation/networking/00-INDEX
@@ -4,8 +4,6 @@
4 - information on the 3Com EtherLink Plus (3c505) driver. 4 - information on the 3Com EtherLink Plus (3c505) driver.
56pack.txt 56pack.txt
6 - info on the 6pack protocol, an alternative to KISS for AX.25 6 - info on the 6pack protocol, an alternative to KISS for AX.25
7Configurable
8 - info on some of the configurable network parameters
9DLINK.txt 7DLINK.txt
10 - info on the D-Link DE-600/DE-620 parallel port pocket adapters 8 - info on the D-Link DE-600/DE-620 parallel port pocket adapters
11PLIP.txt 9PLIP.txt
@@ -26,8 +24,6 @@ baycom.txt
26 - info on the driver for Baycom style amateur radio modems 24 - info on the driver for Baycom style amateur radio modems
27bridge.txt 25bridge.txt
28 - where to get user space programs for ethernet bridging with Linux. 26 - where to get user space programs for ethernet bridging with Linux.
29comx.txt
30 - info on drivers for COMX line of synchronous serial adapters.
31cops.txt 27cops.txt
32 - info on the COPS LocalTalk Linux driver 28 - info on the COPS LocalTalk Linux driver
33cs89x0.txt 29cs89x0.txt
@@ -78,20 +74,14 @@ ltpc.txt
78 - the Apple or Farallon LocalTalk PC card driver 74 - the Apple or Farallon LocalTalk PC card driver
79multicast.txt 75multicast.txt
80 - Behaviour of cards under Multicast 76 - Behaviour of cards under Multicast
81ncsa-telnet
82 - notes on how NCSA telnet (DOS) breaks with MTU discovery enabled.
83netdevices.txt 77netdevices.txt
84 - info on network device driver functions exported to the kernel. 78 - info on network device driver functions exported to the kernel.
85olympic.txt 79olympic.txt
86 - IBM PCI Pit/Pit-Phy/Olympic Token Ring driver info. 80 - IBM PCI Pit/Pit-Phy/Olympic Token Ring driver info.
87policy-routing.txt 81policy-routing.txt
88 - IP policy-based routing 82 - IP policy-based routing
89pt.txt
90 - the Gracilis Packetwin AX.25 device driver
91ray_cs.txt 83ray_cs.txt
92 - Raylink Wireless LAN card driver info. 84 - Raylink Wireless LAN card driver info.
93routing.txt
94 - the new routing mechanism
95shaper.txt 85shaper.txt
96 - info on the module that can shape/limit transmitted traffic. 86 - info on the module that can shape/limit transmitted traffic.
97sk98lin.txt 87sk98lin.txt
diff --git a/Documentation/networking/Configurable b/Documentation/networking/Configurable
deleted file mode 100644
index 69c0dd466ead..000000000000
--- a/Documentation/networking/Configurable
+++ /dev/null
@@ -1,34 +0,0 @@
1
2There are a few network parameters that can be tuned to better match
3the kernel to your system hardware and intended usage. The defaults
4are usually a good choice for 99% of the people 99% of the time, but
5you should be aware they do exist and can be changed.
6
7The current list of parameters can be found in the files:
8
9 linux/net/TUNABLE
10 Documentation/networking/ip-sysctl.txt
11
12Some of these are accessible via the sysctl interface, and many more are
13scheduled to be added in this way. For example, some parameters related
14to Address Resolution Protocol (ARP) are very easily viewed and altered.
15
16 # cat /proc/sys/net/ipv4/arp_timeout
17 6000
18 # echo 7000 > /proc/sys/net/ipv4/arp_timeout
19 # cat /proc/sys/net/ipv4/arp_timeout
20 7000
21
22Others are already accessible via the related user space programs.
23For example, MAX_WINDOW has a default of 32 k which is a good choice for
24modern hardware, but if you have a slow (8 bit) Ethernet card and/or a slow
25machine, then this will be far too big for the card to keep up with fast
26machines transmitting on the same net, resulting in overruns and receive errors.
27A value of about 4 k would be more appropriate, which can be set via:
28
29 # route add -net 192.168.3.0 window 4096
30
31The remainder of these can only be presently changed by altering a #define
32in the related header file. This means an edit and recompile cycle.
33
34 Paul Gortmaker 06/96
diff --git a/Documentation/networking/comx.txt b/Documentation/networking/comx.txt
deleted file mode 100644
index d1526eba2645..000000000000
--- a/Documentation/networking/comx.txt
+++ /dev/null
@@ -1,248 +0,0 @@
1
2 COMX drivers for the 2.2 kernel
3
4Originally written by: Tivadar Szemethy, <tiv@itc.hu>
5Currently maintained by: Gergely Madarasz <gorgo@itc.hu>
6
7Last change: 21/06/1999.
8
9INTRODUCTION
10
11This document describes the software drivers and their use for the
12COMX line of synchronous serial adapters for Linux version 2.2.0 and
13above.
14The cards are produced and sold by ITC-Pro Ltd. Budapest, Hungary
15For further info contact <info@itc.hu>
16or http://www.itc.hu (mostly in Hungarian).
17The firmware files and software are available from ftp://ftp.itc.hu
18
19Currently, the drivers support the following cards and protocols:
20
21COMX (2x64 kbps intelligent board)
22CMX (1x256 + 1x128 kbps intelligent board)
23HiCOMX (2x2Mbps intelligent board)
24LoCOMX (1x512 kbps passive board)
25MixCOM (1x512 or 2x512kbps passive board with a hardware watchdog an
26 optional BRI interface and optional flashROM (1-32M))
27SliceCOM (1x2Mbps channelized E1 board)
28PciCOM (X21)
29
30At the moment of writing this document, the (Cisco)-HDLC, LAPB, SyncPPP and
31Frame Relay (DTE, rfc1294 IP encapsulation with partially implemented Q933a
32LMI) protocols are available as link-level protocol.
33X.25 support is being worked on.
34
35USAGE
36
37Load the comx.o module and the hardware-specific and protocol-specific
38modules you'll need into the running kernel using the insmod utility.
39This creates the /proc/comx directory.
40See the example scripts in the 'etc' directory.
41
42/proc INTERFACE INTRO
43
44The COMX driver set has a new type of user interface based on the /proc
45filesystem which eliminates the need for external user-land software doing
46IOCTL calls.
47Each network interface or device (i.e. those ones you configure with 'ifconfig'
48and 'route' etc.) has a corresponding directory under /proc/comx. You can
49dynamically create a new interface by saying 'mkdir /proc/comx/comx0' (or you
50can name it whatever you want up to 8 characters long, comx[n] is just a
51convention).
52Generally the files contained in these directories are text files, which can
53be viewed by 'cat filename' and you can write a string to such a file by
54saying 'echo _string_ >filename'. This is very similar to the sysctl interface.
55Don't use a text editor to edit these files, always use 'echo' (or 'cat'
56where appropriate).
57When you've created the comx[n] directory, two files are created automagically
58in it: 'boardtype' and 'protocol'. You have to fill in these files correctly
59for your board and protocol you intend to use (see the board and protocol
60descriptions in this file below or the example scripts in the 'etc' directory).
61After filling in these files, other files will appear in the directory for
62setting the various hardware- and protocol-related informations (for example
63irq and io addresses, keepalive values etc.) These files are set to default
64values upon creation, so you don't necessarily have to change all of them.
65
66When you're ready with filling in the files in the comx[n] directory, you can
67configure the corresponding network interface with the standard network
68configuration utilities. If you're unable to bring the interfaces up, look up
69the various kernel log files on your system, and consult the messages for
70a probable reason.
71
72EXAMPLE
73
74To create the interface 'comx0' which is the first channel of a COMX card:
75
76insmod comx
77# insmod comx-hw-comx ; insmod comx-proto-ppp (these are usually
78autoloaded if you use the kernel module loader)
79
80mkdir /proc/comx/comx0
81echo comx >/proc/comx/comx0/boardtype
82echo 0x360 >/proc/comx/comx0/io <- jumper-selectable I/O port
83echo 0x0a >/proc/comx/comx0/irq <- jumper-selectable IRQ line
84echo 0xd000 >/proc/comx/comx0/memaddr <- software-configurable memory
85 address. COMX uses 64 KB, and this
86 can be: 0xa000, 0xb000, 0xc000,
87 0xd000, 0xe000. Avoid conflicts
88 with other hardware.
89cat </etc/siol1.rom >/proc/comx/comx0/firmware <- the firmware for the card
90echo HDLC >/proc/comx/comx0/protocol <- the data-link protocol
91echo 10 >/proc/comx/comx0/keepalive <- the keepalive for the protocol
92ifconfig comx0 1.2.3.4 pointopoint 5.6.7.8 netmask 255.255.255.255 <-
93 finally configure it with ifconfig
94Check its status:
95cat /proc/comx/comx0/status
96
97If you want to use the second channel of this board:
98
99mkdir /proc/comx/comx1
100echo comx >/proc/comx/comx1/boardtype
101echo 0x360 >/proc/comx/comx1/io
102echo 10 >/proc/comx/comx1/irq
103echo 0xd000 >/proc/comx/comx1/memaddr
104echo 1 >/proc/comx/comx1/channel <- channels are numbered
105 as 0 (default) and 1
106
107Now, check if the driver recognized that you're going to use the other
108channel of the same adapter:
109
110cat /proc/comx/comx0/twin
111comx1
112cat /proc/comx/comx1/twin
113comx0
114
115You don't have to load the firmware twice, if you use both channels of
116an adapter, just write it into the channel 0's /proc firmware file.
117
118Default values: io 0x360 for COMX, 0x320 (HICOMX), irq 10, memaddr 0xd0000
119
120THE LOCOMX HARDWARE DRIVER
121
122The LoCOMX driver doesn't require firmware, and it doesn't use memory either,
123but it uses DMA channels 1 and 3. You can set the clock rate (if enabled by
124jumpers on the board) by writing the kbps value into the file named 'clock'.
125Set it to 'external' (it is the default) if you have external clock source.
126
127(Note: currently the LoCOMX driver does not support the internal clock)
128
129THE COMX, CMX AND HICOMX DRIVERS
130
131On the HICOMX, COMX and CMX, you have to load the firmware (it is different for
132the three cards!). All these adapters can share the same memory
133address (we usually use 0xd0000). On the CMX you can set the internal
134clock rate (if enabled by jumpers on the small adapter boards) by writing
135the kbps value into the 'clock' file. You have to do this before initializing
136the card. If you use both HICOMX and CMX/COMX cards, initialize the HICOMX
137first. The I/O address of the HICOMX board is not configurable by any
138method available to the user: it is hardwired to 0x320, and if you have to
139change it, consult ITC-Pro Ltd.
140
141THE MIXCOM DRIVER
142
143The MixCOM board doesn't require firmware, the driver communicates with
144it through I/O ports. You can have three of these cards in one machine.
145
146THE SLICECOM DRIVER
147
148The SliceCOM board doesn't require firmware. You can have 4 of these cards
149in one machine. The driver doesn't (yet) support shared interrupts, so
150you will need a separate IRQ line for every board.
151Read Documentation/networking/slicecom.txt for help on configuring
152this adapter.
153
154THE HDLC/PPP LINE PROTOCOL DRIVER
155
156The HDLC/SyncPPP line protocol driver uses the kernel's built-in syncppp
157driver (syncppp.o). You don't have to manually select syncppp.o when building
158the kernel, the dependencies compile it in automatically.
159
160
161
162
163EXAMPLE
164(setting up hw parameters, see above)
165
166# using HDLC:
167echo hdlc >/proc/comx/comx0/protocol
168echo 10 >/proc/comx/comx0/keepalive <- not necessary, 10 is the default
169ifconfig comx0 1.2.3.4 pointopoint 5.6.7.8 netmask 255.255.255.255
170
171(setting up hw parameters, see above)
172
173# using PPP:
174echo ppp >/proc/comx/comx0/protocol
175ifconfig comx0 up
176ifconfig comx0 1.2.3.4 pointopoint 5.6.7.8 netmask 255.255.255.255
177
178
179THE LAPB LINE PROTOCOL DRIVER
180
181For this, you'll need to configure LAPB support (See 'LAPB Data Link Driver' in
182'Network options' section) into your kernel (thanks to Jonathan Naylor for his
183excellent implementation).
184comx-proto-lapb.o provides the following files in the appropriate directory
185(the default values in parens): t1 (5), t2 (1), n2 (20), mode (DTE, STD) and
186window (7). Agree with the administrator of your peer router on these
187settings (most people use defaults, but you have to know if you are DTE or
188DCE).
189
190EXAMPLE
191
192(setting up hw parameters, see above)
193echo lapb >/proc/comx/comx0/protocol
194echo dce >/proc/comx/comx0/mode <- DCE interface in this example
195ifconfig comx0 1.2.3.4 pointopoint 5.6.7.8 netmask 255.255.255.255
196
197
198THE FRAME RELAY PROTOCOL DRIVER
199
200You DON'T need any other frame relay related modules from the kernel to use
201COMX-Frame Relay. This protocol is a bit more complicated than the others,
202because it allows to use 'subinterfaces' or DLCIs within one physical device.
203First you have to create the 'master' device (the actual physical interface)
204as you would do for other protocols. Specify 'frad' as protocol type.
205Now you can bring this interface up by saying 'ifconfig comx0 up' (or whatever
206you've named the interface). Do not assign any IP address to this interface
207and do not set any routes through it.
208Then, set up your DLCIs the following way: create a comx interface for each
209DLCI you intend to use (with mkdir), and write 'dlci' to the 'boardtype' file,
210and 'ietf-ip' to the 'protocol' file. Currently, the only supported
211encapsulation type is this (also called as RFC1294/1490 IP encapsulation).
212Write the DLCI number to the 'dlci' file, and write the name of the physical
213COMX device to the file called 'master'.
214Now you can assign an IP address to this interface and set routes using it.
215See the example file for further info and example config script.
216Notes: this driver implements a DTE interface with partially implemented
217Q933a LMI.
218You can find an extensively commented example in the 'etc' directory.
219
220FURTHER /proc FILES
221
222boardtype:
223Type of the hardware. Valid values are:
224 'comx', 'hicomx', 'locomx', 'cmx', 'slicecom'.
225
226protocol:
227Data-link protocol on this channel. Can be: HDLC, LAPB, PPP, FRAD
228
229status:
230You can read the channel's actual status from the 'status' file, for example
231'cat /proc/comx/comx3/status'.
232
233lineup_delay:
234Interpreted in seconds (default is 1). Used to avoid line jitter: the system
235will consider the line status 'UP' only if it is up for at least this number
236of seconds.
237
238debug:
239You can set various debug options through this file. Valid options are:
240'comx_events', 'comx_tx', 'comx_rx', 'hw_events', 'hw_tx', 'hw_rx'.
241You can enable a debug options by writing its name prepended by a '+' into
242the debug file, for example 'echo +comx_rx >comx0/debug'.
243Disabling an option happens similarly, use the '-' prefix
244(e.g. 'echo -hw_rx >debug').
245Debug results can be read from the debug file, for example:
246tail -f /proc/comx/comx2/debug
247
248
diff --git a/Documentation/networking/ncsa-telnet b/Documentation/networking/ncsa-telnet
deleted file mode 100644
index d77d28b09093..000000000000
--- a/Documentation/networking/ncsa-telnet
+++ /dev/null
@@ -1,16 +0,0 @@
1NCSA telnet doesn't work with path MTU discovery enabled. This is due to a
2bug in NCSA that also stops it working with other modern networking code
3such as Solaris.
4
5The following information is courtesy of
6Marek <marekm@i17linuxb.ists.pwr.wroc.pl>
7
8There is a fixed version somewhere on ftp.upe.ac.za (sorry, I don't
9remember the exact pathname, and this site is very slow from here).
10It may or may not be faster for you to get it from
11ftp://ftp.ists.pwr.wroc.pl/pub/msdos/telnet/ncsa_upe/tel23074.zip
12(source is in v230704s.zip). I have tested it with 1.3.79 (with
13path mtu discovery enabled - ncsa 2.3.08 didn't work) and it seems
14to work. I don't know if anyone is working on this code - this
15version is over a year old. Too bad - it's faster and often more
16stable than these windoze telnets, and runs on almost anything...
diff --git a/Documentation/networking/pt.txt b/Documentation/networking/pt.txt
deleted file mode 100644
index 72e888c1d988..000000000000
--- a/Documentation/networking/pt.txt
+++ /dev/null
@@ -1,58 +0,0 @@
1This is the README for the Gracilis Packetwin device driver, version 0.5
2ALPHA for Linux 1.3.43.
3
4These files will allow you to talk to the PackeTwin (now know as PT) and
5connect through it just like a pair of TNCs. To do this you will also
6require the AX.25 code in the kernel enabled.
7
8There are four files in this archive; this readme, a patch file, a .c file
9and finally a .h file. The two program files need to be put into the
10drivers/net directory in the Linux source tree, for me this is the
11directory /usr/src/linux/drivers/net. The patch file needs to be patched in
12at the top of the Linux source tree (/usr/src/linux in my case).
13
14You will most probably have to edit the pt.c file to suit your own setup,
15this should just involve changing some of the defines at the top of the file.
16Please note that if you run an external modem you must specify a speed of 0.
17
18The program is currently setup to run a 4800 baud external modem on port A
19and a Kantronics DE-9600 daughter board on port B so if you have this (or
20something similar) then you're right.
21
22To compile in the driver, put the files in the correct place and patch in
23the diff. You will have to re-configure the kernel again before you
24recompile it.
25
26The driver is not real good at the moment for finding the card. You can
27'help' it by changing the order of the potential addresses in the structure
28found in the pt_init() function so the address of where the card is is put
29first.
30
31After compiling, you have to get them going, they are pretty well like any
32other net device and just need ifconfig to get them going.
33As an example, here is my /etc/rc.net
34--------------------------
35
36#
37# Configure the PackeTwin, port A.
38/sbin/ifconfig pt0a 44.136.8.87 hw ax25 vk2xlz mtu 512
39/sbin/ifconfig pt0a 44.136.8.87 broadcast 44.136.8.255 netmask 255.255.255.0
40/sbin/route add -net 44.136.8.0 netmask 255.255.255.0 dev pt0a
41/sbin/route add -net 44.0.0.0 netmask 255.0.0.0 gw 44.136.8.68 dev pt0a
42/sbin/route add -net 138.25.16.0 netmask 255.255.240.0 dev pt0a
43/sbin/route add -host 44.136.8.255 dev pt0a
44#
45# Configure the PackeTwin, port B.
46/sbin/ifconfig pt0b 44.136.8.87 hw ax25 vk2xlz-1 mtu 512
47/sbin/ifconfig pt0b 44.136.8.87 broadcast 44.255.255.255 netmask 255.0.0.0
48/sbin/route add -host 44.136.8.216 dev pt0b
49/sbin/route add -host 44.136.8.95 dev pt0b
50/sbin/route add -host 44.255.255.255 dev pt0b
51
52This version of the driver comes under the GNU GPL. If you have one of my
53previous (non-GPL) versions of the driver, please update to this one.
54
55I hope that this all works well for you. I would be pleased to hear how
56many people use the driver and if it does its job.
57
58 - Craig vk2xlz <csmall@small.dropbear.id.au>
diff --git a/Documentation/networking/routing.txt b/Documentation/networking/routing.txt
deleted file mode 100644
index a26838b930f2..000000000000
--- a/Documentation/networking/routing.txt
+++ /dev/null
@@ -1,46 +0,0 @@
1The directory ftp.inr.ac.ru:/ip-routing contains:
2
3- iproute.c - "professional" routing table maintenance utility.
4
5- rdisc.tar.gz - rdisc daemon, ported from Sun.
6 STRONGLY RECOMMENDED FOR ALL HOSTS.
7
8- routing.tgz - original Mike McLagan's route by source patch.
9 Currently it is obsolete.
10
11- gated.dif-ss<NEWEST>.gz - gated-R3_6Alpha_2 fixes.
12 Look at README.gated
13
14- mrouted-3.8.dif.gz - mrouted-3.8 fixes.
15
16- rtmon.c - trivial debugging utility: reads and stores netlink.
17
18
19NEWS for user.
20
21- Policy based routing. Routing decisions are made on the basis
22 not only of destination address, but also source address,
23 TOS and incoming interface.
24- Complete set of IP level control messages.
25 Now Linux is the only OS in the world complying to RFC requirements.
26 Great win 8)
27- New interface addressing paradigm.
28 Assignment of address ranges to interface,
29 multiple prefixes etc. etc.
30 Do not bother, it is compatible with the old one. Moreover:
31- You don't need to do "route add aaa.bbb.ccc... eth0" anymore,
32 it is done automatically.
33- "Abstract" UNIX sockets and security enhancements.
34 This is necessary to use TIRPC and TLI emulation library.
35
36NEWS for hacker.
37
38- New destination cache. Flexible, robust and just beautiful.
39- Network stack is reordered, simplified, optimized, a lot of bugs fixed.
40 (well, and new bugs were introduced, but I haven't seen them yet 8))
41 It is difficult to describe all the changes, look into source.
42
43If you see this file, then this patch works 8)
44
45Alexey Kuznetsov.
46kuznet@ms2.inr.ac.ru
diff --git a/Documentation/networking/slicecom.hun b/Documentation/networking/slicecom.hun
deleted file mode 100644
index bed2f045e550..000000000000
--- a/Documentation/networking/slicecom.hun
+++ /dev/null
@@ -1,371 +0,0 @@
1
2SliceCOM adapter felhasznaloi dokumentacioja - 0.51 verziohoz
3
4Bartók István <bartoki@itc.hu>
5Utolso modositas: Wed Aug 29 17:26:58 CEST 2001
6
7-----------------------------------------------------------------
8
9Hasznalata:
10
11Forditas:
12
13Code maturity level options
14 [*] Prompt for development and/or incomplete code/drivers
15
16Network device support
17 Wan interfaces
18 <M> MultiGate (COMX) synchronous
19 <M> Support for MUNICH based boards: SliceCOM, PCICOM (NEW)
20 <M> Support for HDLC and syncPPP...
21
22
23A modulok betoltese:
24
25modprobe comx
26
27modprobe comx-proto-ppp # a Cisco-HDLC es a SyncPPP protokollt is
28 # ez a modul adja
29
30modprobe comx-hw-munich # a modul betoltodeskor azonnal jelent a
31 # syslogba a detektalt kartyakrol
32
33
34Konfiguralas:
35
36# Ezen az interfeszen Cisco-HDLC vonali protokoll fog futni
37# Az interfeszhez rendelt idoszeletek: 1,2 (128 kbit/sec-es vonal)
38# (a G.703 keretben az elso adatot vivo idoszelet az 1-es)
39#
40mkdir /proc/comx/comx0.1/
41echo slicecom >/proc/comx/comx0.1/boardtype
42echo hdlc >/proc/comx/comx0.1/protocol
43echo 1 2 >/proc/comx/comx0.1/timeslots
44
45
46# Ezen az interfeszen SyncPPP vonali protokoll fog futni
47# Az interfeszhez rendelt idoszelet: 3 (64 kbit/sec-es vonal)
48#
49mkdir /proc/comx/comx0.2/
50echo slicecom >/proc/comx/comx0.2/boardtype
51echo ppp >/proc/comx/comx0.2/protocol
52echo 3 >/proc/comx/comx0.2/timeslots
53
54...
55
56ifconfig comx0.1 up
57ifconfig comx0.2 up
58
59-----------------------------------------------------------------
60
61A COMX driverek default 20 csomagnyi transmit queue-t rendelnek a halozati
62interfeszekhez. WAN halozatokban ennel hosszabbat is szokas hasznalni
63(20 es 100 kozott), hogy a vonal kihasznaltsaga nagy terheles eseten jobb
64legyen (bar ezzel megno a varhato kesleltetes a csomagok sorban allasa miatt):
65
66# ifconfig comx0 txqueuelen 50
67
68Ezt a beallitasi lehetoseget csak az ujabb disztribuciok ifconfig parancsa
69tamogatja (amik mar a 2.2 kernelekhez keszultek, mint a RedHat 6.1 vagy a
70Debian 2.2).
71
72A 2.1-es Debian disztribuciohoz a http://www.debian.org/~rcw/2.2/netbase/
73cimrol toltheto le ujabb netbase csomag, ami mar ilyet tamogato ifconfig
74parancsot tartalmaz. Bovebben a 2.2 kernel hasznalatarol Debian 2.1 alatt:
75http://www.debian.org/releases/stable/running-kernel-2.2
76
77-----------------------------------------------------------------
78
79A kartya LED-jeinek jelentese:
80
81piros - eg, ha Remote Alarm-ot kuld a tuloldal
82zold - eg, ha a vett jelben megtalalja a keretszinkront
83
84Reszletesebben:
85
86piros: zold: jelentes:
87
88- - nincs keretszinkron (nincs jel, vagy rossz a jel)
89- eg "minden rendben"
90eg eg a vetel OK, de a tuloldal Remote Alarm-ot kuld
91eg - ez nincs ertelmezve, egyelore funkcio nelkul
92
93-----------------------------------------------------------------
94
95Reszletesebb leiras a hardver beallitasi lehetosegeirol:
96
97Az altalanos,- es a protokoll-retegek beallitasi lehetosegeirol a 'comx.txt'
98fajlban leirtak SliceCOM kartyanal is ervenyesek, itt csak a hardver-specifikus
99beallitasi lehetosegek vannak osszefoglalva:
100
101Konfiguralasi interfesz a /proc/comx/ alatt:
102
103Minden timeslot-csoportnak kulon comx* interfeszt kell letrehozni mkdir-rel:
104comx0, comx1, .. stb. Itt beallithato, hogy az adott interfesz hanyadik kartya
105melyik timeslotja(i)bol alljon ossze. A Cisco-fele serial3:1 elnevezesek
106(serial3:1 = a 3. kartyaban az 1-es idoszelet-csoport) Linuxon aliasing-ot
107jelentenenek, ezert mi nem tudunk ilyen elnevezest hasznalni.
108
109Tobb kartya eseten a comx0.1, comx0.2, ... vagy slice0.1, slice0.2 nevek
110hasznalhatoak.
111
112Tobb SliceCOM kartya is lehet egy gepben, de sajat interrupt kell mindegyiknek,
113nem tud meg megosztott interruptot kezelni.
114
115Az egesz kartyat erinto beallitasok:
116
117Az ioport es irq beallitas nincs: amit a PCI BIOS kioszt a rendszernek,
118azt hasznalja a driver.
119
120
121comx0/boardnum - hanyadik SliceCOM kartya a gepben (a 'termeszetes' PCI
122 sorrendben ertve: ahogyan a /proc/pci-ban vagy az 'lspci'
123 kimeneteben megjelenik, altalaban az alaplapi PCI meghajto
124 aramkorokhoz kozelebb eso kartyak a kisebb sorszamuak)
125
126 Default: 0 (0-tol kezdodik a szamolas)
127
128
129Bar a kovetkezoket csak egy-egy interfeszen allitjuk at, megis az egesz kartya
130mukodeset egyszerre allitjak. A megkotes hogy csak UP-ban levo interfeszen
131hasznalhatoak, azert van, mert kulonben nem vart eredmenyekre vezetne egy ilyen
132paranccsorozat:
133
134 echo 0 >boardnum
135 echo internal >clock_source
136 echo 1 >boardnum
137
138- Ez a 0-s board clock_source-at allitana at.
139
140Ezek a beallitasok megmaradnak az osszes interfesz torlesekor, de torlodnek
141a driver modul ki/betoltesekor.
142
143
144comx0/clock_source - A Tx orajelforrasa, a Cisco-val hasonlatosra keszult.
145 Hasznalata:
146
147 papaya:# echo line >/proc/comx/comx0/clock_source
148 papaya:# echo internal >/proc/comx/comx0/clock_source
149
150 line - A Tx orajelet a vett adatfolyambol dekodolja, igyekszik
151 igazodni hozza. Ha nem lat orajelet az inputon, akkor
152 atall a sajat orajelgeneratorara.
153 internal - A Tx orajelet a sajat orajelgeneratora szolgaltatja.
154
155 Default: line
156
157 Normal osszeallitas eseten a tavkozlesi szolgaltato eszkoze
158 (pl. HDSL modem) adja az orajelet, ezert ez a default.
159
160
161comx0/framing - A CRC4 ki/be kapcsolasa
162
163 A CRC4: 16 PCM keretet (A PCM keret az, amibe a 32 darab 64
164 kilobites csatorna van bemultiplexalva. Nem osszetevesztendo a HDLC
165 kerettel.) 2x8 -as csoportokra osztanak, es azokhoz 4-4 bites CRC-t
166 szamolnak. Elsosorban a vonal minosegenek a monitorozasara szolgal.
167
168 papaya:~# echo crc4 >/proc/comx/comx0/framing
169 papaya:~# echo no-crc4 >/proc/comx/comx0/framing
170
171 Default a 'crc4', a MATAV vonalak altalaban igy futnak. De ha nem
172 egyforma is a beallitas a vonal ket vegen, attol a forgalom altalaban
173 at tud menni.
174
175
176comx0/linecode - A vonali kodolas beallitasa
177
178 papaya:~# echo hdb3 >/proc/comx/comx0/linecode
179 papaya:~# echo ami >/proc/comx/comx0/linecode
180
181 Default a 'hdb3', a MATAV vonalak igy futnak.
182
183 (az AMI kodolas igen ritka E1-es vonalaknal). Ha ez a beallitas nem
184 egyezik a vonal ket vegen, akkor elofordulhat hogy a keretszinkron
185 osszejon, de CRC4-hibak es a vonalakon atvitt adatokban is hibak
186 keletkeznek (amit a HDLC/SyncPPP szinten CRC-hibaval jelez)
187
188
189comx0/reg - a kartya aramkoreinek, a MUNICH (reg) es a FALC (lbireg)
190comx0/lbireg regisztereinek kozvetlen elerese. Hasznalata:
191
192 echo >reg 0x04 0x0 - a 4-es regiszterbe 0-t ir
193 echo >reg 0x104 - printk()-val kiirja a 4-es regiszter
194 tartalmat a syslogba.
195
196 WARNING: ezek csak a fejleszteshez keszultek, sok galibat
197 lehet veluk okozni!
198
199
200comx0/loopback - A kartya G.703 jelenek a visszahurkolasara is van lehetoseg:
201
202 papaya:# echo none >/proc/comx/comx0/loopback
203 papaya:# echo local >/proc/comx/comx0/loopback
204 papaya:# echo remote >/proc/comx/comx0/loopback
205
206 none - nincs visszahurkolas, normal mukodes
207 local - a kartya a sajat maga altal adott jelet kapja vissza
208 remote - a kartya a kivulrol vett jelet adja kifele
209
210 Default: none
211
212-----------------------------------------------------------------
213
214Az interfeszhez (Cisco terminologiaban 'channel-group') kapcsolodo beallitasok:
215
216comx0/timeslots - mely timeslotok (idoszeletek) tartoznak az adott interfeszhez.
217
218 papaya:~# cat /proc/comx/comx0/timeslots
219 1 3 4 5 6
220 papaya:~#
221
222 Egy timeslot megkeresese (hanyas interfeszbe tartozik nalunk):
223
224 papaya:~# grep ' 4' /proc/comx/comx*/timeslots
225 /proc/comx/comx0/timeslots:1 3 4 5 6
226 papaya:~#
227
228 Beallitasa:
229 papaya:~# echo '1 5 2 6 7 8' >/proc/comx/comx0/timeslots
230
231 A timeslotok sorrendje nem szamit, '1 3 2' ugyanaz mint az '1 2 3'.
232
233 Beallitashoz az adott interfesznek DOWN-ban kell lennie
234 (ifconfig comx0 down), de ugyanannak a kartyanak a tobbi interfesze
235 uzemelhet kozben.
236
237 Beallitaskor leellenorzi, hogy az uj timeslotok nem utkoznek-e egy
238 masik interfesz timeslotjaival. Ha utkoznek, akkor nem allitja at.
239
240 Mindig 10-es szamrendszerben tortenik a timeslotok ertelmezese, nehogy
241 a 08, 09 alaku felirast rosszul ertelmezze.
242
243-----------------------------------------------------------------
244
245Az interfeszek es a kartya allapotanak lekerdezese:
246
247- A ' '-szel kezdodo sorok az eredeti kimenetet, a //-rel kezdodo sorok a
248magyarazatot jelzik.
249
250 papaya:~$ cat /proc/comx/comx1/status
251 Interface administrative status is UP, modem status is UP, protocol is UP
252 Modem status changes: 0, Transmitter status is IDLE, tbusy: 0
253 Interface load (input): 978376 / 947808 / 951024 bits/s (5s/5m/15m)
254 (output): 978376 / 947848 / 951024 bits/s (5s/5m/15m)
255 Debug flags: none
256 RX errors: len: 22, overrun: 1, crc: 0, aborts: 0
257 buffer overrun: 0, pbuffer overrun: 0
258 TX errors: underrun: 0
259 Line keepalive (value: 10) status UP [0]
260
261// Itt kezdodik a hardver-specifikus resz:
262 Controller status:
263 No alarms
264
265// Alarm: hibajelzes:
266//
267// No alarms - minden rendben
268//
269// LOS - Loss Of Signal - nem erzekel jelet a bemeneten.
270// AIS - Alarm Indication Signal - csak egymas utani 1-esek jonnek
271// a bemeneten, a tuloldal igy is jelezheti hogy meghibasodott vagy
272// nincs inicializalva.
273// AUXP - Auxiliary Pattern Indication - 01010101.. sorozat jon a bemeneten.
274// LFA - Loss of Frame Alignment - nincs keretszinkron
275// RRA - Receive Remote Alarm - a tuloldal el, de hibat jelez.
276// LMFA - Loss of CRC4 Multiframe Alignment - nincs CRC4-multikeret-szinkron
277// NMF - No Multiframe alignment Found after 400 msec - ilyen alarm a no-crc4
278// es crc4 keretezesek eseten nincs, lasd lentebb
279//
280// Egyeb lehetseges hibajelzesek:
281//
282// Transmit Line Short - a kartya ugy erzi hogy az adasi kimenete rovidre
283// van zarva, ezert kikapcsolta az adast. (nem feltetlenul veszi eszre
284// a kulso rovidzarat)
285
286// A veteli oldal csomagjainak lancolt listai, debug celokra:
287
288 Rx ring:
289 rafutott: 0
290 lastcheck: 50845731, jiffies: 51314281
291 base: 017b1858
292 rx_desc_ptr: 0
293 rx_desc_ptr: 017b1858
294 hw_curr_ptr: 017b1858
295 06040000 017b1868 017b1898 c016ff00
296 06040000 017b1878 017b1e9c c016ff00
297 46040000 017b1888 017b24a0 c016ff00
298 06040000 017b1858 017b2aa4 c016ff00
299
300// A kartyat hasznalo tobbi interfesz: a 0-s channel-group a comx1 interfesz,
301// es az 1,2,...,16 timeslotok tartoznak hozza:
302
303 Interfaces using this board: (channel-group, interface, timeslots)
304 0 comx1: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
305 1 comx2: 17
306 2 comx3: 18
307 3 comx4: 19
308 4 comx5: 20
309 5 comx6: 21
310 6 comx7: 22
311 7 comx8: 23
312 8 comx9: 24
313 9 comx10: 25
314 10 comx11: 26
315 11 comx12: 27
316 12 comx13: 28
317 13 comx14: 29
318 14 comx15: 30
319 15 comx16: 31
320
321// Hany esemenyt kezelt le a driver egy-egy hardver-interrupt kiszolgalasanal:
322
323 Interrupt work histogram:
324 hist[ 0]: 0 hist[ 1]: 2 hist[ 2]: 18574 hist[ 3]: 79
325 hist[ 4]: 14 hist[ 5]: 1 hist[ 6]: 0 hist[ 7]: 1
326 hist[ 8]: 0 hist[ 9]: 7
327
328// Hany kikuldendo csomag volt mar a Tx-ringben amikor ujabb lett irva bele:
329
330 Tx ring histogram:
331 hist[ 0]: 2329 hist[ 1]: 0 hist[ 2]: 0 hist[ 3]: 0
332
333// Az E1-interfesz hiba-szamlaloi, az rfc2495-nek megfeleloen:
334// (kb. a Cisco routerek "show controllers e1" formatumaban: http://www.cisco.com/univercd/cc/td/doc/product/software/ios11/rbook/rinterfc.htm#xtocid25669126)
335
336Data in current interval (91 seconds elapsed):
337 9516 Line Code Violations, 65 Path Code Violations, 2 E-Bit Errors
338 0 Slip Secs, 2 Fr Loss Secs, 2 Line Err Secs, 0 Degraded Mins
339 0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 11 Unavail Secs
340Data in Interval 1 (15 minutes):
341 0 Line Code Violations, 0 Path Code Violations, 0 E-Bit Errors
342 0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins
343 0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs
344Data in last 4 intervals (1 hour):
345 0 Line Code Violations, 0 Path Code Violations, 0 E-Bit Errors
346 0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins
347 0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs
348Data in last 96 intervals (24 hours):
349 0 Line Code Violations, 0 Path Code Violations, 0 E-Bit Errors
350 0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins
351 0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs
352
353-----------------------------------------------------------------
354
355Nehany kulonlegesebb beallitasi lehetoseg (idovel beepulhetnek majd a driverbe):
356Ezekkel sok galibat lehet okozni, nagyon ovatosan kell oket hasznalni!
357
358 modified CRC-4, for improved interworking of CRC-4 and non-CRC-4
359 devices: (lasd page 107 es g706 Annex B)
360 lbireg[ 0x1b ] |= 0x08
361 lbireg[ 0x1c ] |= 0xc0
362 - ilyenkor ertelmezett az NMF - 'No Multiframe alignment Found after
363 400 msec' alarm.
364
365 FALC - a vonali meghajto IC
366 local loop - a sajat adasomat halljam vissza
367 remote loop - a kivulrol jovo adast adom vissza
368
369 Egy hibakeresesre hasznalhato dolog:
370 - 1-es timeslot local loop a FALC-ban: echo >lbireg 0x1d 0x21
371 - local loop kikapcsolasa: echo >lbireg 0x1d 0x00
diff --git a/Documentation/networking/slicecom.txt b/Documentation/networking/slicecom.txt
deleted file mode 100644
index c82c0cf981b4..000000000000
--- a/Documentation/networking/slicecom.txt
+++ /dev/null
@@ -1,369 +0,0 @@
1
2SliceCOM adapter user's documentation - for the 0.51 driver version
3
4Written by Bartók István <bartoki@itc.hu>
5
6English translation: Lakatos György <gyuri@itc.hu>
7Mon Dec 11 15:28:42 CET 2000
8
9Last modified: Wed Aug 29 17:25:37 CEST 2001
10
11-----------------------------------------------------------------
12
13Usage:
14
15Compiling the kernel:
16
17Code maturity level options
18 [*] Prompt for development and/or incomplete code/drivers
19
20Network device support
21 Wan interfaces
22 <M> MultiGate (COMX) synchronous
23 <M> Support for MUNICH based boards: SliceCOM, PCICOM (NEW)
24 <M> Support for HDLC and syncPPP...
25
26
27Loading the modules:
28
29modprobe comx
30
31modprobe comx-proto-ppp # module for Cisco-HDLC and SyncPPP protocols
32
33modprobe comx-hw-munich # the module logs information by the kernel
34 # about the detected boards
35
36
37Configuring the board:
38
39# This interface will use the Cisco-HDLC line protocol,
40# the timeslices assigned are 1,2 (128 KiBit line speed)
41# (the first data timeslice in the G.703 frame is no. 1)
42#
43mkdir /proc/comx/comx0.1/
44echo slicecom >/proc/comx/comx0.1/boardtype
45echo hdlc >/proc/comx/comx0.1/protocol
46echo 1 2 >/proc/comx/comx0.1/timeslots
47
48
49# This interface uses SyncPPP line protocol, the assigned
50# is no. 3 (64 KiBit line speed)
51#
52mkdir /proc/comx/comx0.2/
53echo slicecom >/proc/comx/comx0.2/boardtype
54echo ppp >/proc/comx/comx0.2/protocol
55echo 3 >/proc/comx/comx0.2/timeslots
56
57...
58
59ifconfig comx0.1 up
60ifconfig comx0.2 up
61
62-----------------------------------------------------------------
63
64The COMX interfaces use a 10 packet transmit queue by default, however WAN
65networks sometimes use bigger values (20 to 100), to utilize the line better
66by large traffic (though the line delay increases because of more packets
67join the queue).
68
69# ifconfig comx0 txqueuelen 50
70
71This option is only supported by the ifconfig command of the later
72distributions, which came with 2.2 kernels, such as RedHat 6.1 or Debian 2.2.
73
74You can download a newer netbase packet from
75http://www.debian.org/~rcw/2.2/netbase/ for Debian 2.1, which has a new
76ifconfig. You can get further information about using 2.2 kernel with
77Debian 2.1 from http://www.debian.org/releases/stable/running-kernel-2.2
78
79-----------------------------------------------------------------
80
81The SliceCom LEDs:
82
83red - on, if the interface is unconfigured, or it gets Remote Alarm-s
84green - on, if the board finds frame-sync in the received signal
85
86A bit more detailed:
87
88red: green: meaning:
89
90- - no frame-sync, no signal received, or signal SNAFU.
91- on "Everything is OK"
92on on Reception is ok, but the remote end sends Remote Alarm
93on - The interface is unconfigured
94
95-----------------------------------------------------------------
96
97A more detailed description of the hardware setting options:
98
99The general and the protocol layer options described in the 'comx.txt' file
100apply to the SliceCom as well, I only summarize the SliceCom hardware specific
101settings below.
102
103The '/proc/comx' configuring interface:
104
105An interface directory should be created for every timeslot group with
106'mkdir', e,g: 'comx0', 'comx1' etc. The timeslots can be assigned here to the
107specific interface. The Cisco-like naming convention (serial3:1 - first
108timeslot group of the 3rd. board) can't be used here, because these mean IP
109aliasing in Linux.
110
111You can give any meaningful name to keep the configuration clear;
112e.g: 'comx0.1', 'comx0.2', 'comx1.1', comx1.2', if you have two boards
113with two interfaces each.
114
115Settings, which apply to the board:
116
117Neither 'io' nor 'irq' settings required, the driver uses the resources
118given by the PCI BIOS.
119
120comx0/boardnum - board number of the SliceCom in the PC (using the 'natural'
121 PCI order) as listed in '/proc/pci' or the output of the
122 'lspci' command, generally the slots nearer to the motherboard
123 PCI driver chips have the lower numbers.
124
125 Default: 0 (the counting starts with 0)
126
127Though the options below are to be set on a single interface, they apply to the
128whole board. The restriction, to use them on 'UP' interfaces, is because the
129command sequence below could lead to unpredictable results.
130
131 # echo 0 >boardnum
132 # echo internal >clock_source
133 # echo 1 >boardnum
134
135The sequence would set the clock source of board 0.
136
137These settings will persist after all the interfaces are cleared, but are
138cleared when the driver module is unloaded and loaded again.
139
140comx0/clock_source - source of the transmit clock
141 Usage:
142
143 # echo line >/proc/comx/comx0/clock_source
144 # echo internal >/proc/comx/comx0/clock_source
145
146 line - The Tx clock is being decoded if the input data stream,
147 if no clock seen on the input, then the board will use it's
148 own clock generator.
149
150 internal - The Tx clock is supplied by the builtin clock generator.
151
152 Default: line
153
154 Normally, the telecommunication company's end device (the HDSL
155 modem) provides the Tx clock, that's why 'line' is the default.
156
157comx0/framing - Switching CRC4 off/on
158
159 CRC4: 16 PCM frames (The 32 64Kibit channels are multiplexed into a
160 PCM frame, nothing to do with HDLC frames) are divided into 2x8
161 groups, each group has a 4 bit CRC.
162
163 # echo crc4 >/proc/comx/comx0/framing
164 # echo no-crc4 >/proc/comx/comx0/framing
165
166 Default is 'crc4', the Hungarian MATAV lines behave like this.
167 The traffic generally passes if this setting on both ends don't match.
168
169comx0/linecode - Setting the line coding
170
171 # echo hdb3 >/proc/comx/comx0/linecode
172 # echo ami >/proc/comx/comx0/linecode
173
174 Default a 'hdb3', MATAV lines use this.
175
176 (AMI coding is rarely used with E1 lines). Frame sync may occur, if
177 this setting doesn't match the other end's, but CRC4 and data errors
178 will come, which will result in CRC errors on HDLC/SyncPPP level.
179
180comx0/reg - direct access to the board's MUNICH (reg) and FALC (lbireg)
181comx0/lbireg circuit's registers
182
183 # echo >reg 0x04 0x0 - write 0 to register 4
184 # echo >reg 0x104 - write the contents of register 4 with
185 printk() to syslog
186
187WARNING! These are only for development purposes, messing with this will
188 result much trouble!
189
190comx0/loopback - Places a loop to the board's G.703 signals
191
192 # echo none >/proc/comx/comx0/loopback
193 # echo local >/proc/comx/comx0/loopback
194 # echo remote >/proc/comx/comx0/loopback
195
196 none - normal operation, no loop
197 local - the board receives it's own output
198 remote - the board sends the received data to the remote side
199
200 Default: none
201
202-----------------------------------------------------------------
203
204Interface (channel group in Cisco terms) settings:
205
206comx0/timeslots - which timeslots belong to the given interface
207
208 Setting:
209
210 # echo '1 5 2 6 7 8' >/proc/comx/comx0/timeslots
211
212 # cat /proc/comx/comx0/timeslots
213 1 2 5 6 7 8
214 #
215
216 Finding a timeslot:
217
218 # grep ' 4' /proc/comx/comx*/timeslots
219 /proc/comx/comx0/timeslots:1 3 4 5 6
220 #
221
222 The timeslots can be in any order, '1 2 3' is the same as '1 3 2'.
223
224 The interface has to be DOWN during the setting ('ifconfig comx0
225 down'), but the other interfaces could operate normally.
226
227 The driver checks if the assigned timeslots are vacant, if not, then
228 the setting won't be applied.
229
230 The timeslot values are treated as decimal numbers, not to misunderstand
231 values of 08, 09 form.
232
233-----------------------------------------------------------------
234
235Checking the interface and board status:
236
237- Lines beginning with ' ' (space) belong to the original output, the lines
238which begin with '//' are the comments.
239
240 papaya:~$ cat /proc/comx/comx1/status
241 Interface administrative status is UP, modem status is UP, protocol is UP
242 Modem status changes: 0, Transmitter status is IDLE, tbusy: 0
243 Interface load (input): 978376 / 947808 / 951024 bits/s (5s/5m/15m)
244 (output): 978376 / 947848 / 951024 bits/s (5s/5m/15m)
245 Debug flags: none
246 RX errors: len: 22, overrun: 1, crc: 0, aborts: 0
247 buffer overrun: 0, pbuffer overrun: 0
248 TX errors: underrun: 0
249 Line keepalive (value: 10) status UP [0]
250
251// The hardware specific part starts here:
252 Controller status:
253 No alarms
254
255// Alarm:
256//
257// No alarms - Everything OK
258//
259// LOS - Loss Of Signal - No signal sensed on the input
260// AIS - Alarm Indication Signal - The remote side sends '11111111'-s,
261// it tells, that there's an error condition, or it's not
262// initialised.
263// AUXP - Auxiliary Pattern Indication - 01010101.. received.
264// LFA - Loss of Frame Alignment - no frame sync received.
265// RRA - Receive Remote Alarm - the remote end's OK, but signals error cond.
266// LMFA - Loss of CRC4 Multiframe Alignment - no CRC4 multiframe sync.
267// NMF - No Multiframe alignment Found after 400 msec - no such alarm using
268// no-crc4 or crc4 framing, see below.
269//
270// Other possible error messages:
271//
272// Transmit Line Short - the board felt, that it's output is short-circuited,
273// so it switched the transmission off. (The board can't definitely tell,
274// that it's output is short-circuited.)
275
276// Chained list of the received packets, for debug purposes:
277
278 Rx ring:
279 rafutott: 0
280 lastcheck: 50845731, jiffies: 51314281
281 base: 017b1858
282 rx_desc_ptr: 0
283 rx_desc_ptr: 017b1858
284 hw_curr_ptr: 017b1858
285 06040000 017b1868 017b1898 c016ff00
286 06040000 017b1878 017b1e9c c016ff00
287 46040000 017b1888 017b24a0 c016ff00
288 06040000 017b1858 017b2aa4 c016ff00
289
290// All the interfaces using the board: comx1, using the 1,2,...16 timeslots,
291// comx2, using timeslot 17, etc.
292
293 Interfaces using this board: (channel-group, interface, timeslots)
294 0 comx1: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
295 1 comx2: 17
296 2 comx3: 18
297 3 comx4: 19
298 4 comx5: 20
299 5 comx6: 21
300 6 comx7: 22
301 7 comx8: 23
302 8 comx9: 24
303 9 comx10: 25
304 10 comx11: 26
305 11 comx12: 27
306 12 comx13: 28
307 13 comx14: 29
308 14 comx15: 30
309 15 comx16: 31
310
311// The number of events handled by the driver during an interrupt cycle:
312
313 Interrupt work histogram:
314 hist[ 0]: 0 hist[ 1]: 2 hist[ 2]: 18574 hist[ 3]: 79
315 hist[ 4]: 14 hist[ 5]: 1 hist[ 6]: 0 hist[ 7]: 1
316 hist[ 8]: 0 hist[ 9]: 7
317
318// The number of packets to send in the Tx ring, when a new one arrived:
319
320 Tx ring histogram:
321 hist[ 0]: 2329 hist[ 1]: 0 hist[ 2]: 0 hist[ 3]: 0
322
323// The error counters of the E1 interface, according to the RFC2495,
324// (similar to the Cisco "show controllers e1" command's output:
325// http://www.cisco.com/univercd/cc/td/doc/product/software/ios11/rbook/rinterfc.htm#xtocid25669126)
326
327Data in current interval (91 seconds elapsed):
328 9516 Line Code Violations, 65 Path Code Violations, 2 E-Bit Errors
329 0 Slip Secs, 2 Fr Loss Secs, 2 Line Err Secs, 0 Degraded Mins
330 0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 11 Unavail Secs
331Data in Interval 1 (15 minutes):
332 0 Line Code Violations, 0 Path Code Violations, 0 E-Bit Errors
333 0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins
334 0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs
335Data in last 4 intervals (1 hour):
336 0 Line Code Violations, 0 Path Code Violations, 0 E-Bit Errors
337 0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins
338 0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs
339Data in last 96 intervals (24 hours):
340 0 Line Code Violations, 0 Path Code Violations, 0 E-Bit Errors
341 0 Slip Secs, 0 Fr Loss Secs, 0 Line Err Secs, 0 Degraded Mins
342 0 Errored Secs, 0 Bursty Err Secs, 0 Severely Err Secs, 0 Unavail Secs
343
344-----------------------------------------------------------------
345
346Some unique options, (may get into the driver later):
347Treat them very carefully, these can cause much trouble!
348
349 modified CRC-4, for improved interworking of CRC-4 and non-CRC-4
350 devices: (see page 107 and g706 Annex B)
351 lbireg[ 0x1b ] |= 0x08
352 lbireg[ 0x1c ] |= 0xc0
353
354 - The NMF - 'No Multiframe alignment Found after 400 msec' alarm
355 comes into account.
356
357 FALC - the line driver chip.
358 local loop - I hear my transmission back.
359 remote loop - I echo the remote transmission back.
360
361 Something useful for finding errors:
362
363 - local loop for timeslot 1 in the FALC chip:
364
365 # echo >lbireg 0x1d 0x21
366
367 - Switching the loop off:
368
369 # echo >lbireg 0x1d 0x00
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt
index a96e85397eb7..ac1be25c1e25 100644
--- a/Documentation/powerpc/booting-without-of.txt
+++ b/Documentation/powerpc/booting-without-of.txt
@@ -52,6 +52,7 @@ Table of Contents
52 i) Freescale QUICC Engine module (QE) 52 i) Freescale QUICC Engine module (QE)
53 j) CFI or JEDEC memory-mapped NOR flash 53 j) CFI or JEDEC memory-mapped NOR flash
54 k) Global Utilities Block 54 k) Global Utilities Block
55 l) Xilinx IP cores
55 56
56 VII - Specifying interrupt information for devices 57 VII - Specifying interrupt information for devices
57 1) interrupts property 58 1) interrupts property
@@ -851,12 +852,18 @@ address which can extend beyond that limit.
851 /cpus/PowerPC,970FX@0 852 /cpus/PowerPC,970FX@0
852 /cpus/PowerPC,970FX@1 853 /cpus/PowerPC,970FX@1
853 (unit addresses do not require leading zeroes) 854 (unit addresses do not require leading zeroes)
854 - d-cache-line-size : one cell, L1 data cache line size in bytes 855 - d-cache-block-size : one cell, L1 data cache block size in bytes (*)
855 - i-cache-line-size : one cell, L1 instruction cache line size in 856 - i-cache-block-size : one cell, L1 instruction cache block size in
856 bytes 857 bytes
857 - d-cache-size : one cell, size of L1 data cache in bytes 858 - d-cache-size : one cell, size of L1 data cache in bytes
858 - i-cache-size : one cell, size of L1 instruction cache in bytes 859 - i-cache-size : one cell, size of L1 instruction cache in bytes
859 860
861(*) The cache "block" size is the size on which the cache management
862instructions operate. Historically, this document used the cache
863"line" size here which is incorrect. The kernel will prefer the cache
864block size and will fallback to cache line size for backward
865compatibility.
866
860 Recommended properties: 867 Recommended properties:
861 868
862 - timebase-frequency : a cell indicating the frequency of the 869 - timebase-frequency : a cell indicating the frequency of the
@@ -870,6 +877,10 @@ address which can extend beyond that limit.
870 for the above, the common code doesn't use that property, but 877 for the above, the common code doesn't use that property, but
871 you are welcome to re-use the pSeries or Maple one. A future 878 you are welcome to re-use the pSeries or Maple one. A future
872 kernel version might provide a common function for this. 879 kernel version might provide a common function for this.
880 - d-cache-line-size : one cell, L1 data cache line size in bytes
881 if different from the block size
882 - i-cache-line-size : one cell, L1 instruction cache line size in
883 bytes if different from the block size
873 884
874 You are welcome to add any property you find relevant to your board, 885 You are welcome to add any property you find relevant to your board,
875 like some information about the mechanism used to soft-reset the 886 like some information about the mechanism used to soft-reset the
@@ -2242,6 +2253,266 @@ platforms are moved over to use the flattened-device-tree model.
2242 available. 2253 available.
2243 For Axon: 0x0000012a 2254 For Axon: 0x0000012a
2244 2255
2256 l) Xilinx IP cores
2257
2258 The Xilinx EDK toolchain ships with a set of IP cores (devices) for use
2259 in Xilinx Spartan and Virtex FPGAs. The devices cover the whole range
2260 of standard device types (network, serial, etc.) and miscellanious
2261 devices (gpio, LCD, spi, etc). Also, since these devices are
2262 implemented within the fpga fabric every instance of the device can be
2263 synthesised with different options that change the behaviour.
2264
2265 Each IP-core has a set of parameters which the FPGA designer can use to
2266 control how the core is synthesized. Historically, the EDK tool would
2267 extract the device parameters relevant to device drivers and copy them
2268 into an 'xparameters.h' in the form of #define symbols. This tells the
2269 device drivers how the IP cores are configured, but it requres the kernel
2270 to be recompiled every time the FPGA bitstream is resynthesized.
2271
2272 The new approach is to export the parameters into the device tree and
2273 generate a new device tree each time the FPGA bitstream changes. The
2274 parameters which used to be exported as #defines will now become
2275 properties of the device node. In general, device nodes for IP-cores
2276 will take the following form:
2277
2278 (name)@(base-address) {
2279 compatible = "xlnx,(ip-core-name)-(HW_VER)"
2280 [, (list of compatible devices), ...];
2281 reg = <(baseaddr) (size)>;
2282 interrupt-parent = <&interrupt-controller-phandle>;
2283 interrupts = < ... >;
2284 xlnx,(parameter1) = "(string-value)";
2285 xlnx,(parameter2) = <(int-value)>;
2286 };
2287
2288 (ip-core-name): the name of the ip block (given after the BEGIN
2289 directive in system.mhs). Should be in lowercase
2290 and all underscores '_' converted to dashes '-'.
2291 (name): is derived from the "PARAMETER INSTANCE" value.
2292 (parameter#): C_* parameters from system.mhs. The C_ prefix is
2293 dropped from the parameter name, the name is converted
2294 to lowercase and all underscore '_' characters are
2295 converted to dashes '-'.
2296 (baseaddr): the C_BASEADDR parameter.
2297 (HW_VER): from the HW_VER parameter.
2298 (size): equals C_HIGHADDR - C_BASEADDR + 1
2299
2300 Typically, the compatible list will include the exact IP core version
2301 followed by an older IP core version which implements the same
2302 interface or any other device with the same interface.
2303
2304 'reg', 'interrupt-parent' and 'interrupts' are all optional properties.
2305
2306 For example, the following block from system.mhs:
2307
2308 BEGIN opb_uartlite
2309 PARAMETER INSTANCE = opb_uartlite_0
2310 PARAMETER HW_VER = 1.00.b
2311 PARAMETER C_BAUDRATE = 115200
2312 PARAMETER C_DATA_BITS = 8
2313 PARAMETER C_ODD_PARITY = 0
2314 PARAMETER C_USE_PARITY = 0
2315 PARAMETER C_CLK_FREQ = 50000000
2316 PARAMETER C_BASEADDR = 0xEC100000
2317 PARAMETER C_HIGHADDR = 0xEC10FFFF
2318 BUS_INTERFACE SOPB = opb_7
2319 PORT OPB_Clk = CLK_50MHz
2320 PORT Interrupt = opb_uartlite_0_Interrupt
2321 PORT RX = opb_uartlite_0_RX
2322 PORT TX = opb_uartlite_0_TX
2323 PORT OPB_Rst = sys_bus_reset_0
2324 END
2325
2326 becomes the following device tree node:
2327
2328 opb-uartlite-0@ec100000 {
2329 device_type = "serial";
2330 compatible = "xlnx,opb-uartlite-1.00.b";
2331 reg = <ec100000 10000>;
2332 interrupt-parent = <&opb-intc>;
2333 interrupts = <1 0>; // got this from the opb_intc parameters
2334 current-speed = <d#115200>; // standard serial device prop
2335 clock-frequency = <d#50000000>; // standard serial device prop
2336 xlnx,data-bits = <8>;
2337 xlnx,odd-parity = <0>;
2338 xlnx,use-parity = <0>;
2339 };
2340
2341 Some IP cores actually implement 2 or more logical devices. In this case,
2342 the device should still describe the whole IP core with a single node
2343 and add a child node for each logical device. The ranges property can
2344 be used to translate from parent IP-core to the registers of each device.
2345 (Note: this makes the assumption that both logical devices have the same
2346 bus binding. If this is not true, then separate nodes should be used for
2347 each logical device). The 'cell-index' property can be used to enumerate
2348 logical devices within an IP core. For example, the following is the
2349 system.mhs entry for the dual ps2 controller found on the ml403 reference
2350 design.
2351
2352 BEGIN opb_ps2_dual_ref
2353 PARAMETER INSTANCE = opb_ps2_dual_ref_0
2354 PARAMETER HW_VER = 1.00.a
2355 PARAMETER C_BASEADDR = 0xA9000000
2356 PARAMETER C_HIGHADDR = 0xA9001FFF
2357 BUS_INTERFACE SOPB = opb_v20_0
2358 PORT Sys_Intr1 = ps2_1_intr
2359 PORT Sys_Intr2 = ps2_2_intr
2360 PORT Clkin1 = ps2_clk_rx_1
2361 PORT Clkin2 = ps2_clk_rx_2
2362 PORT Clkpd1 = ps2_clk_tx_1
2363 PORT Clkpd2 = ps2_clk_tx_2
2364 PORT Rx1 = ps2_d_rx_1
2365 PORT Rx2 = ps2_d_rx_2
2366 PORT Txpd1 = ps2_d_tx_1
2367 PORT Txpd2 = ps2_d_tx_2
2368 END
2369
2370 It would result in the following device tree nodes:
2371
2372 opb_ps2_dual_ref_0@a9000000 {
2373 ranges = <0 a9000000 2000>;
2374 // If this device had extra parameters, then they would
2375 // go here.
2376 ps2@0 {
2377 compatible = "xlnx,opb-ps2-dual-ref-1.00.a";
2378 reg = <0 40>;
2379 interrupt-parent = <&opb-intc>;
2380 interrupts = <3 0>;
2381 cell-index = <0>;
2382 };
2383 ps2@1000 {
2384 compatible = "xlnx,opb-ps2-dual-ref-1.00.a";
2385 reg = <1000 40>;
2386 interrupt-parent = <&opb-intc>;
2387 interrupts = <3 0>;
2388 cell-index = <0>;
2389 };
2390 };
2391
2392 Also, the system.mhs file defines bus attachments from the processor
2393 to the devices. The device tree structure should reflect the bus
2394 attachments. Again an example; this system.mhs fragment:
2395
2396 BEGIN ppc405_virtex4
2397 PARAMETER INSTANCE = ppc405_0
2398 PARAMETER HW_VER = 1.01.a
2399 BUS_INTERFACE DPLB = plb_v34_0
2400 BUS_INTERFACE IPLB = plb_v34_0
2401 END
2402
2403 BEGIN opb_intc
2404 PARAMETER INSTANCE = opb_intc_0
2405 PARAMETER HW_VER = 1.00.c
2406 PARAMETER C_BASEADDR = 0xD1000FC0
2407 PARAMETER C_HIGHADDR = 0xD1000FDF
2408 BUS_INTERFACE SOPB = opb_v20_0
2409 END
2410
2411 BEGIN opb_uart16550
2412 PARAMETER INSTANCE = opb_uart16550_0
2413 PARAMETER HW_VER = 1.00.d
2414 PARAMETER C_BASEADDR = 0xa0000000
2415 PARAMETER C_HIGHADDR = 0xa0001FFF
2416 BUS_INTERFACE SOPB = opb_v20_0
2417 END
2418
2419 BEGIN plb_v34
2420 PARAMETER INSTANCE = plb_v34_0
2421 PARAMETER HW_VER = 1.02.a
2422 END
2423
2424 BEGIN plb_bram_if_cntlr
2425 PARAMETER INSTANCE = plb_bram_if_cntlr_0
2426 PARAMETER HW_VER = 1.00.b
2427 PARAMETER C_BASEADDR = 0xFFFF0000
2428 PARAMETER C_HIGHADDR = 0xFFFFFFFF
2429 BUS_INTERFACE SPLB = plb_v34_0
2430 END
2431
2432 BEGIN plb2opb_bridge
2433 PARAMETER INSTANCE = plb2opb_bridge_0
2434 PARAMETER HW_VER = 1.01.a
2435 PARAMETER C_RNG0_BASEADDR = 0x20000000
2436 PARAMETER C_RNG0_HIGHADDR = 0x3FFFFFFF
2437 PARAMETER C_RNG1_BASEADDR = 0x60000000
2438 PARAMETER C_RNG1_HIGHADDR = 0x7FFFFFFF
2439 PARAMETER C_RNG2_BASEADDR = 0x80000000
2440 PARAMETER C_RNG2_HIGHADDR = 0xBFFFFFFF
2441 PARAMETER C_RNG3_BASEADDR = 0xC0000000
2442 PARAMETER C_RNG3_HIGHADDR = 0xDFFFFFFF
2443 BUS_INTERFACE SPLB = plb_v34_0
2444 BUS_INTERFACE MOPB = opb_v20_0
2445 END
2446
2447 Gives this device tree (some properties removed for clarity):
2448
2449 plb-v34-0 {
2450 #address-cells = <1>;
2451 #size-cells = <1>;
2452 device_type = "ibm,plb";
2453 ranges; // 1:1 translation
2454
2455 plb-bram-if-cntrl-0@ffff0000 {
2456 reg = <ffff0000 10000>;
2457 }
2458
2459 opb-v20-0 {
2460 #address-cells = <1>;
2461 #size-cells = <1>;
2462 ranges = <20000000 20000000 20000000
2463 60000000 60000000 20000000
2464 80000000 80000000 40000000
2465 c0000000 c0000000 20000000>;
2466
2467 opb-uart16550-0@a0000000 {
2468 reg = <a00000000 2000>;
2469 };
2470
2471 opb-intc-0@d1000fc0 {
2472 reg = <d1000fc0 20>;
2473 };
2474 };
2475 };
2476
2477 That covers the general approach to binding xilinx IP cores into the
2478 device tree. The following are bindings for specific devices:
2479
2480 i) Xilinx ML300 Framebuffer
2481
2482 Simple framebuffer device from the ML300 reference design (also on the
2483 ML403 reference design as well as others).
2484
2485 Optional properties:
2486 - resolution = <xres yres> : pixel resolution of framebuffer. Some
2487 implementations use a different resolution.
2488 Default is <d#640 d#480>
2489 - virt-resolution = <xvirt yvirt> : Size of framebuffer in memory.
2490 Default is <d#1024 d#480>.
2491 - rotate-display (empty) : rotate display 180 degrees.
2492
2493 ii) Xilinx SystemACE
2494
2495 The Xilinx SystemACE device is used to program FPGAs from an FPGA
2496 bitstream stored on a CF card. It can also be used as a generic CF
2497 interface device.
2498
2499 Optional properties:
2500 - 8-bit (empty) : Set this property for SystemACE in 8 bit mode
2501
2502 iii) Xilinx EMAC and Xilinx TEMAC
2503
2504 Xilinx Ethernet devices. In addition to general xilinx properties
2505 listed above, nodes for these devices should include a phy-handle
2506 property, and may include other common network device properties
2507 like local-mac-address.
2508
2509 iv) Xilinx Uartlite
2510
2511 Xilinx uartlite devices are simple fixed speed serial ports.
2512
2513 Requred properties:
2514 - current-speed : Baud rate of uartlite
2515
2245 More devices will be defined as this spec matures. 2516 More devices will be defined as this spec matures.
2246 2517
2247VII - Specifying interrupt information for devices 2518VII - Specifying interrupt information for devices
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index a0cdaafa115b..a7e9fea978a6 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1040,6 +1040,8 @@ source "drivers/power/Kconfig"
1040 1040
1041source "drivers/hwmon/Kconfig" 1041source "drivers/hwmon/Kconfig"
1042 1042
1043source "drivers/watchdog/Kconfig"
1044
1043source "drivers/ssb/Kconfig" 1045source "drivers/ssb/Kconfig"
1044 1046
1045#source "drivers/l3/Kconfig" 1047#source "drivers/l3/Kconfig"
diff --git a/arch/arm/mach-netx/xc.c b/arch/arm/mach-netx/xc.c
index bd5184fe177c..ca9c5b61283a 100644
--- a/arch/arm/mach-netx/xc.c
+++ b/arch/arm/mach-netx/xc.c
@@ -190,15 +190,15 @@ struct xc *request_xc(int xcno, struct device *dev)
190 goto exit; 190 goto exit;
191 191
192 if (!request_mem_region 192 if (!request_mem_region
193 (NETX_PA_XPEC(xcno), XPEC_MEM_SIZE, kobject_name(dev->kobj))) 193 (NETX_PA_XPEC(xcno), XPEC_MEM_SIZE, kobject_name(&dev->kobj)))
194 goto exit_free; 194 goto exit_free;
195 195
196 if (!request_mem_region 196 if (!request_mem_region
197 (NETX_PA_XMAC(xcno), XMAC_MEM_SIZE, kobject_name(dev->kobj))) 197 (NETX_PA_XMAC(xcno), XMAC_MEM_SIZE, kobject_name(&dev->kobj)))
198 goto exit_release_1; 198 goto exit_release_1;
199 199
200 if (!request_mem_region 200 if (!request_mem_region
201 (SRAM_INTERNAL_PHYS(xcno), SRAM_MEM_SIZE, kobject_name(dev->kobj))) 201 (SRAM_INTERNAL_PHYS(xcno), SRAM_MEM_SIZE, kobject_name(&dev->kobj)))
202 goto exit_release_2; 202 goto exit_release_2;
203 203
204 x->xpec_base = (void * __iomem)io_p2v(NETX_PA_XPEC(xcno)); 204 x->xpec_base = (void * __iomem)io_p2v(NETX_PA_XPEC(xcno));
diff --git a/arch/arm/mach-pxa/time.c b/arch/arm/mach-pxa/time.c
index a2d45d742ce4..fbfa1920353d 100644
--- a/arch/arm/mach-pxa/time.c
+++ b/arch/arm/mach-pxa/time.c
@@ -68,6 +68,7 @@ pxa_ost0_interrupt(int irq, void *dev_id)
68 if (c->mode == CLOCK_EVT_MODE_ONESHOT) { 68 if (c->mode == CLOCK_EVT_MODE_ONESHOT) {
69 /* Disarm the compare/match, signal the event. */ 69 /* Disarm the compare/match, signal the event. */
70 OIER &= ~OIER_E0; 70 OIER &= ~OIER_E0;
71 OSSR = OSSR_M0;
71 c->event_handler(c); 72 c->event_handler(c);
72 } else if (c->mode == CLOCK_EVT_MODE_PERIODIC) { 73 } else if (c->mode == CLOCK_EVT_MODE_PERIODIC) {
73 /* Call the event handler as many times as necessary 74 /* Call the event handler as many times as necessary
@@ -100,9 +101,9 @@ pxa_ost0_interrupt(int irq, void *dev_id)
100 * anything that might put us "very close". 101 * anything that might put us "very close".
101 */ 102 */
102#define MIN_OSCR_DELTA 16 103#define MIN_OSCR_DELTA 16
103 do { 104 do {
104 OSSR = OSSR_M0; 105 OSSR = OSSR_M0;
105 next_match = (OSMR0 += LATCH); 106 next_match = (OSMR0 += LATCH);
106 c->event_handler(c); 107 c->event_handler(c);
107 } while (((signed long)(next_match - OSCR) <= MIN_OSCR_DELTA) 108 } while (((signed long)(next_match - OSCR) <= MIN_OSCR_DELTA)
108 && (c->mode == CLOCK_EVT_MODE_PERIODIC)); 109 && (c->mode == CLOCK_EVT_MODE_PERIODIC));
@@ -114,14 +115,16 @@ pxa_ost0_interrupt(int irq, void *dev_id)
114static int 115static int
115pxa_osmr0_set_next_event(unsigned long delta, struct clock_event_device *dev) 116pxa_osmr0_set_next_event(unsigned long delta, struct clock_event_device *dev)
116{ 117{
117 unsigned long irqflags; 118 unsigned long flags, next, oscr;
118 119
119 raw_local_irq_save(irqflags); 120 raw_local_irq_save(flags);
120 OSMR0 = OSCR + delta;
121 OSSR = OSSR_M0;
122 OIER |= OIER_E0; 121 OIER |= OIER_E0;
123 raw_local_irq_restore(irqflags); 122 next = OSCR + delta;
124 return 0; 123 OSMR0 = next;
124 oscr = OSCR;
125 raw_local_irq_restore(flags);
126
127 return (signed)(next - oscr) <= MIN_OSCR_DELTA ? -ETIME : 0;
125} 128}
126 129
127static void 130static void
@@ -132,15 +135,16 @@ pxa_osmr0_set_mode(enum clock_event_mode mode, struct clock_event_device *dev)
132 switch (mode) { 135 switch (mode) {
133 case CLOCK_EVT_MODE_PERIODIC: 136 case CLOCK_EVT_MODE_PERIODIC:
134 raw_local_irq_save(irqflags); 137 raw_local_irq_save(irqflags);
135 OSMR0 = OSCR + LATCH;
136 OSSR = OSSR_M0; 138 OSSR = OSSR_M0;
137 OIER |= OIER_E0; 139 OIER |= OIER_E0;
140 OSMR0 = OSCR + LATCH;
138 raw_local_irq_restore(irqflags); 141 raw_local_irq_restore(irqflags);
139 break; 142 break;
140 143
141 case CLOCK_EVT_MODE_ONESHOT: 144 case CLOCK_EVT_MODE_ONESHOT:
142 raw_local_irq_save(irqflags); 145 raw_local_irq_save(irqflags);
143 OIER &= ~OIER_E0; 146 OIER &= ~OIER_E0;
147 OSSR = OSSR_M0;
144 raw_local_irq_restore(irqflags); 148 raw_local_irq_restore(irqflags);
145 break; 149 break;
146 150
@@ -149,6 +153,7 @@ pxa_osmr0_set_mode(enum clock_event_mode mode, struct clock_event_device *dev)
149 /* initializing, released, or preparing for suspend */ 153 /* initializing, released, or preparing for suspend */
150 raw_local_irq_save(irqflags); 154 raw_local_irq_save(irqflags);
151 OIER &= ~OIER_E0; 155 OIER &= ~OIER_E0;
156 OSSR = OSSR_M0;
152 raw_local_irq_restore(irqflags); 157 raw_local_irq_restore(irqflags);
153 break; 158 break;
154 159
diff --git a/arch/arm/plat-omap/fb.c b/arch/arm/plat-omap/fb.c
index 4493bcff5172..ee40c1a0b83d 100644
--- a/arch/arm/plat-omap/fb.c
+++ b/arch/arm/plat-omap/fb.c
@@ -171,7 +171,7 @@ static int check_fbmem_region(int region_idx, struct omapfb_mem_region *rg,
171 * Called from map_io. We need to call to this early enough so that we 171 * Called from map_io. We need to call to this early enough so that we
172 * can reserve the fixed SDRAM regions before VM could get hold of them. 172 * can reserve the fixed SDRAM regions before VM could get hold of them.
173 */ 173 */
174void omapfb_reserve_sdram(void) 174void __init omapfb_reserve_sdram(void)
175{ 175{
176 struct bootmem_data *bdata; 176 struct bootmem_data *bdata;
177 unsigned long sdram_start, sdram_size; 177 unsigned long sdram_start, sdram_size;
diff --git a/arch/frv/mm/init.c b/arch/frv/mm/init.c
index 4103c2c487f3..b841ecfd5d5a 100644
--- a/arch/frv/mm/init.c
+++ b/arch/frv/mm/init.c
@@ -197,7 +197,7 @@ void __init mem_init(void)
197/* 197/*
198 * free the memory that was only required for initialisation 198 * free the memory that was only required for initialisation
199 */ 199 */
200void __init free_initmem(void) 200void free_initmem(void)
201{ 201{
202#if defined(CONFIG_RAMKERNEL) && !defined(CONFIG_PROTECT_KERNEL) 202#if defined(CONFIG_RAMKERNEL) && !defined(CONFIG_PROTECT_KERNEL)
203 unsigned long start, end, addr; 203 unsigned long start, end, addr;
diff --git a/arch/powerpc/boot/dts/walnut.dts b/arch/powerpc/boot/dts/walnut.dts
index fa681f5343fe..754fa3960f83 100644
--- a/arch/powerpc/boot/dts/walnut.dts
+++ b/arch/powerpc/boot/dts/walnut.dts
@@ -122,7 +122,9 @@
122 device_type = "network"; 122 device_type = "network";
123 compatible = "ibm,emac-405gp", "ibm,emac"; 123 compatible = "ibm,emac-405gp", "ibm,emac";
124 interrupt-parent = <&UIC0>; 124 interrupt-parent = <&UIC0>;
125 interrupts = <9 4 f 4>; 125 interrupts = <
126 f 4 /* Ethernet */
127 9 4 /* Ethernet Wake Up */>;
126 local-mac-address = [000000000000]; /* Filled in by zImage */ 128 local-mac-address = [000000000000]; /* Filled in by zImage */
127 reg = <ef600800 70>; 129 reg = <ef600800 70>;
128 mal-device = <&MAL>; 130 mal-device = <&MAL>;
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index 39b27e5ef6c1..31147a037728 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -21,6 +21,14 @@
21# (default ./arch/powerpc/boot) 21# (default ./arch/powerpc/boot)
22# -W dir specify working directory for temporary files (default .) 22# -W dir specify working directory for temporary files (default .)
23 23
24# Stop execution if any command fails
25set -e
26
27# Allow for verbose output
28if [ "$V" = 1 ]; then
29 set -x
30fi
31
24# defaults 32# defaults
25kernel= 33kernel=
26ofile=zImage 34ofile=zImage
@@ -111,7 +119,7 @@ if [ -n "$dts" ]; then
111 if [ -z "$dtb" ]; then 119 if [ -z "$dtb" ]; then
112 dtb="$platform.dtb" 120 dtb="$platform.dtb"
113 fi 121 fi
114 dtc -O dtb -o "$dtb" -b 0 -V 16 "$dts" || exit 1 122 dtc -O dtb -o "$dtb" -b 0 -V 16 "$dts"
115fi 123fi
116 124
117if [ -z "$kernel" ]; then 125if [ -z "$kernel" ]; then
@@ -149,7 +157,6 @@ cuboot*)
149ps3) 157ps3)
150 platformo="$object/ps3-head.o $object/ps3-hvcall.o $object/ps3.o" 158 platformo="$object/ps3-head.o $object/ps3-hvcall.o $object/ps3.o"
151 lds=$object/zImage.ps3.lds 159 lds=$object/zImage.ps3.lds
152 binary=y
153 gzip= 160 gzip=
154 ext=bin 161 ext=bin
155 objflags="-O binary --set-section-flags=.bss=contents,alloc,load,data" 162 objflags="-O binary --set-section-flags=.bss=contents,alloc,load,data"
@@ -233,7 +240,7 @@ entry=`${CROSS}objdump -f "$ofile" | grep '^start address ' | cut -d' ' -f3`
233 240
234if [ -n "$binary" ]; then 241if [ -n "$binary" ]; then
235 mv "$ofile" "$ofile".elf 242 mv "$ofile" "$ofile".elf
236 ${CROSS}objcopy -O binary "$ofile".elf "$ofile".bin 243 ${CROSS}objcopy -O binary "$ofile".elf "$ofile"
237fi 244fi
238 245
239# post-processing needed for some platforms 246# post-processing needed for some platforms
@@ -246,9 +253,9 @@ coff)
246 $object/hack-coff "$ofile" 253 $object/hack-coff "$ofile"
247 ;; 254 ;;
248cuboot*) 255cuboot*)
249 gzip -f -9 "$ofile".bin 256 gzip -f -9 "$ofile"
250 mkimage -A ppc -O linux -T kernel -C gzip -a "$base" -e "$entry" \ 257 mkimage -A ppc -O linux -T kernel -C gzip -a "$base" -e "$entry" \
251 $uboot_version -d "$ofile".bin.gz "$ofile" 258 $uboot_version -d "$ofile".gz "$ofile"
252 ;; 259 ;;
253treeboot*) 260treeboot*)
254 mv "$ofile" "$ofile.elf" 261 mv "$ofile" "$ofile.elf"
@@ -269,11 +276,11 @@ ps3)
269 # then copied to offset 0x100. At runtime the bootwrapper program 276 # then copied to offset 0x100. At runtime the bootwrapper program
270 # copies the 0x100 bytes at __system_reset_kernel to addr 0x100. 277 # copies the 0x100 bytes at __system_reset_kernel to addr 0x100.
271 278
272 system_reset_overlay=0x`${CROSS}nm "$ofile".elf \ 279 system_reset_overlay=0x`${CROSS}nm "$ofile" \
273 | grep ' __system_reset_overlay$' \ 280 | grep ' __system_reset_overlay$' \
274 | cut -d' ' -f1` 281 | cut -d' ' -f1`
275 system_reset_overlay=`printf "%d" $system_reset_overlay` 282 system_reset_overlay=`printf "%d" $system_reset_overlay`
276 system_reset_kernel=0x`${CROSS}nm "$ofile".elf \ 283 system_reset_kernel=0x`${CROSS}nm "$ofile" \
277 | grep ' __system_reset_kernel$' \ 284 | grep ' __system_reset_kernel$' \
278 | cut -d' ' -f1` 285 | cut -d' ' -f1`
279 system_reset_kernel=`printf "%d" $system_reset_kernel` 286 system_reset_kernel=`printf "%d" $system_reset_kernel`
@@ -282,23 +289,15 @@ ps3)
282 289
283 rm -f "$object/otheros.bld" 290 rm -f "$object/otheros.bld"
284 291
285 msg=$(dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \ 292 ${CROSS}objcopy -O binary "$ofile" "$ofile.bin"
286 skip=$overlay_dest seek=$system_reset_kernel \
287 count=$overlay_size bs=1 2>&1)
288 293
289 if [ $? -ne "0" ]; then 294 dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \
290 echo $msg 295 skip=$overlay_dest seek=$system_reset_kernel \
291 exit 1 296 count=$overlay_size bs=1
292 fi
293
294 msg=$(dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \
295 skip=$system_reset_overlay seek=$overlay_dest \
296 count=$overlay_size bs=1 2>&1)
297 297
298 if [ $? -ne "0" ]; then 298 dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \
299 echo $msg 299 skip=$system_reset_overlay seek=$overlay_dest \
300 exit 2 300 count=$overlay_size bs=1
301 fi
302 301
303 gzip --force -9 --stdout "$ofile.bin" > "$object/otheros.bld" 302 gzip --force -9 --stdout "$ofile.bin" > "$object/otheros.bld"
304 ;; 303 ;;
diff --git a/arch/powerpc/configs/pasemi_defconfig b/arch/powerpc/configs/pasemi_defconfig
index 1ccf3ed7693e..78c968aade4e 100644
--- a/arch/powerpc/configs/pasemi_defconfig
+++ b/arch/powerpc/configs/pasemi_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.23-rc4 3# Linux kernel version: 2.6.24-rc2
4# Thu Aug 30 16:40:47 2007 4# Tue Nov 6 23:23:50 2007
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7 7
@@ -10,6 +10,7 @@ CONFIG_PPC64=y
10# 10#
11CONFIG_POWER4_ONLY=y 11CONFIG_POWER4_ONLY=y
12CONFIG_POWER4=y 12CONFIG_POWER4=y
13# CONFIG_TUNE_CELL is not set
13CONFIG_PPC_FPU=y 14CONFIG_PPC_FPU=y
14CONFIG_ALTIVEC=y 15CONFIG_ALTIVEC=y
15CONFIG_PPC_STD_MMU=y 16CONFIG_PPC_STD_MMU=y
@@ -18,8 +19,13 @@ CONFIG_PPC_MM_SLICES=y
18CONFIG_SMP=y 19CONFIG_SMP=y
19CONFIG_NR_CPUS=2 20CONFIG_NR_CPUS=2
20CONFIG_64BIT=y 21CONFIG_64BIT=y
22CONFIG_WORD_SIZE=64
21CONFIG_PPC_MERGE=y 23CONFIG_PPC_MERGE=y
22CONFIG_MMU=y 24CONFIG_MMU=y
25CONFIG_GENERIC_CMOS_UPDATE=y
26CONFIG_GENERIC_TIME=y
27CONFIG_GENERIC_TIME_VSYSCALL=y
28CONFIG_GENERIC_CLOCKEVENTS=y
23CONFIG_GENERIC_HARDIRQS=y 29CONFIG_GENERIC_HARDIRQS=y
24CONFIG_IRQ_PER_CPU=y 30CONFIG_IRQ_PER_CPU=y
25CONFIG_RWSEM_XCHGADD_ALGORITHM=y 31CONFIG_RWSEM_XCHGADD_ALGORITHM=y
@@ -65,7 +71,10 @@ CONFIG_SYSVIPC_SYSCTL=y
65# CONFIG_AUDIT is not set 71# CONFIG_AUDIT is not set
66# CONFIG_IKCONFIG is not set 72# CONFIG_IKCONFIG is not set
67CONFIG_LOG_BUF_SHIFT=17 73CONFIG_LOG_BUF_SHIFT=17
68# CONFIG_CPUSETS is not set 74# CONFIG_CGROUPS is not set
75CONFIG_FAIR_GROUP_SCHED=y
76CONFIG_FAIR_USER_SCHED=y
77# CONFIG_FAIR_CGROUP_SCHED is not set
69CONFIG_SYSFS_DEPRECATED=y 78CONFIG_SYSFS_DEPRECATED=y
70# CONFIG_RELAY is not set 79# CONFIG_RELAY is not set
71CONFIG_BLK_DEV_INITRD=y 80CONFIG_BLK_DEV_INITRD=y
@@ -86,7 +95,6 @@ CONFIG_FUTEX=y
86CONFIG_ANON_INODES=y 95CONFIG_ANON_INODES=y
87CONFIG_EPOLL=y 96CONFIG_EPOLL=y
88CONFIG_SIGNALFD=y 97CONFIG_SIGNALFD=y
89CONFIG_TIMERFD=y
90CONFIG_EVENTFD=y 98CONFIG_EVENTFD=y
91CONFIG_SHMEM=y 99CONFIG_SHMEM=y
92CONFIG_VM_EVENT_COUNTERS=y 100CONFIG_VM_EVENT_COUNTERS=y
@@ -107,14 +115,15 @@ CONFIG_STOP_MACHINE=y
107CONFIG_BLOCK=y 115CONFIG_BLOCK=y
108# CONFIG_BLK_DEV_IO_TRACE is not set 116# CONFIG_BLK_DEV_IO_TRACE is not set
109# CONFIG_BLK_DEV_BSG is not set 117# CONFIG_BLK_DEV_BSG is not set
118CONFIG_BLOCK_COMPAT=y
110 119
111# 120#
112# IO Schedulers 121# IO Schedulers
113# 122#
114CONFIG_IOSCHED_NOOP=y 123CONFIG_IOSCHED_NOOP=y
115CONFIG_IOSCHED_AS=y 124CONFIG_IOSCHED_AS=y
116# CONFIG_IOSCHED_DEADLINE is not set 125CONFIG_IOSCHED_DEADLINE=y
117# CONFIG_IOSCHED_CFQ is not set 126CONFIG_IOSCHED_CFQ=y
118CONFIG_DEFAULT_AS=y 127CONFIG_DEFAULT_AS=y
119# CONFIG_DEFAULT_DEADLINE is not set 128# CONFIG_DEFAULT_DEADLINE is not set
120# CONFIG_DEFAULT_CFQ is not set 129# CONFIG_DEFAULT_CFQ is not set
@@ -125,7 +134,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
125# Platform support 134# Platform support
126# 135#
127CONFIG_PPC_MULTIPLATFORM=y 136CONFIG_PPC_MULTIPLATFORM=y
128# CONFIG_EMBEDDED6xx is not set
129# CONFIG_PPC_82xx is not set 137# CONFIG_PPC_82xx is not set
130# CONFIG_PPC_83xx is not set 138# CONFIG_PPC_83xx is not set
131# CONFIG_PPC_86xx is not set 139# CONFIG_PPC_86xx is not set
@@ -141,6 +149,7 @@ CONFIG_PPC_PASEMI=y
141# PA Semi PWRficient options 149# PA Semi PWRficient options
142# 150#
143CONFIG_PPC_PASEMI_IOMMU=y 151CONFIG_PPC_PASEMI_IOMMU=y
152# CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE is not set
144CONFIG_PPC_PASEMI_MDIO=y 153CONFIG_PPC_PASEMI_MDIO=y
145CONFIG_ELECTRA_IDE=y 154CONFIG_ELECTRA_IDE=y
146# CONFIG_PPC_CELLEB is not set 155# CONFIG_PPC_CELLEB is not set
@@ -156,29 +165,52 @@ CONFIG_MPIC=y
156# CONFIG_U3_DART is not set 165# CONFIG_U3_DART is not set
157# CONFIG_PPC_RTAS is not set 166# CONFIG_PPC_RTAS is not set
158# CONFIG_MMIO_NVRAM is not set 167# CONFIG_MMIO_NVRAM is not set
168CONFIG_MPIC_BROKEN_REGREAD=y
159# CONFIG_PPC_MPC106 is not set 169# CONFIG_PPC_MPC106 is not set
160# CONFIG_PPC_970_NAP is not set 170# CONFIG_PPC_970_NAP is not set
161# CONFIG_PPC_INDIRECT_IO is not set 171# CONFIG_PPC_INDIRECT_IO is not set
162# CONFIG_GENERIC_IOMAP is not set 172# CONFIG_GENERIC_IOMAP is not set
163# CONFIG_CPU_FREQ is not set 173CONFIG_CPU_FREQ=y
174CONFIG_CPU_FREQ_TABLE=y
175CONFIG_CPU_FREQ_DEBUG=y
176CONFIG_CPU_FREQ_STAT=y
177# CONFIG_CPU_FREQ_STAT_DETAILS is not set
178CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
179# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
180# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
181# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
182CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
183CONFIG_CPU_FREQ_GOV_POWERSAVE=y
184CONFIG_CPU_FREQ_GOV_USERSPACE=y
185CONFIG_CPU_FREQ_GOV_ONDEMAND=y
186# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
187
188#
189# CPU Frequency drivers
190#
191CONFIG_PPC_PASEMI_CPUFREQ=y
164# CONFIG_CPM2 is not set 192# CONFIG_CPM2 is not set
165# CONFIG_FSL_ULI1575 is not set 193# CONFIG_FSL_ULI1575 is not set
166 194
167# 195#
168# Kernel options 196# Kernel options
169# 197#
170CONFIG_HZ_100=y 198CONFIG_TICK_ONESHOT=y
199CONFIG_NO_HZ=y
200CONFIG_HIGH_RES_TIMERS=y
201CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
202# CONFIG_HZ_100 is not set
171# CONFIG_HZ_250 is not set 203# CONFIG_HZ_250 is not set
172# CONFIG_HZ_300 is not set 204# CONFIG_HZ_300 is not set
173# CONFIG_HZ_1000 is not set 205CONFIG_HZ_1000=y
174CONFIG_HZ=100 206CONFIG_HZ=1000
175CONFIG_PREEMPT_NONE=y 207CONFIG_PREEMPT_NONE=y
176# CONFIG_PREEMPT_VOLUNTARY is not set 208# CONFIG_PREEMPT_VOLUNTARY is not set
177# CONFIG_PREEMPT is not set 209# CONFIG_PREEMPT is not set
178CONFIG_PREEMPT_BKL=y 210# CONFIG_PREEMPT_BKL is not set
179CONFIG_BINFMT_ELF=y 211CONFIG_BINFMT_ELF=y
180# CONFIG_BINFMT_MISC is not set 212# CONFIG_BINFMT_MISC is not set
181CONFIG_FORCE_MAX_ZONEORDER=13 213CONFIG_FORCE_MAX_ZONEORDER=9
182CONFIG_IOMMU_VMERGE=y 214CONFIG_IOMMU_VMERGE=y
183CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y 215CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
184# CONFIG_KEXEC is not set 216# CONFIG_KEXEC is not set
@@ -196,12 +228,13 @@ CONFIG_FLATMEM_MANUAL=y
196CONFIG_FLATMEM=y 228CONFIG_FLATMEM=y
197CONFIG_FLAT_NODE_MEM_MAP=y 229CONFIG_FLAT_NODE_MEM_MAP=y
198# CONFIG_SPARSEMEM_STATIC is not set 230# CONFIG_SPARSEMEM_STATIC is not set
231CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
199CONFIG_SPLIT_PTLOCK_CPUS=4 232CONFIG_SPLIT_PTLOCK_CPUS=4
200CONFIG_RESOURCES_64BIT=y 233CONFIG_RESOURCES_64BIT=y
201CONFIG_ZONE_DMA_FLAG=1 234CONFIG_ZONE_DMA_FLAG=1
202CONFIG_BOUNCE=y 235CONFIG_BOUNCE=y
203# CONFIG_PPC_HAS_HASH_64K is not set 236CONFIG_PPC_HAS_HASH_64K=y
204# CONFIG_PPC_64K_PAGES is not set 237CONFIG_PPC_64K_PAGES=y
205# CONFIG_SCHED_SMT is not set 238# CONFIG_SCHED_SMT is not set
206CONFIG_PROC_DEVICETREE=y 239CONFIG_PROC_DEVICETREE=y
207# CONFIG_CMDLINE_BOOL is not set 240# CONFIG_CMDLINE_BOOL is not set
@@ -222,11 +255,8 @@ CONFIG_PCI_SYSCALL=y
222# CONFIG_PCIEPORTBUS is not set 255# CONFIG_PCIEPORTBUS is not set
223CONFIG_ARCH_SUPPORTS_MSI=y 256CONFIG_ARCH_SUPPORTS_MSI=y
224# CONFIG_PCI_MSI is not set 257# CONFIG_PCI_MSI is not set
258CONFIG_PCI_LEGACY=y
225# CONFIG_PCI_DEBUG is not set 259# CONFIG_PCI_DEBUG is not set
226
227#
228# PCCARD (PCMCIA/CardBus) support
229#
230CONFIG_PCCARD=y 260CONFIG_PCCARD=y
231CONFIG_PCMCIA_DEBUG=y 261CONFIG_PCMCIA_DEBUG=y
232CONFIG_PCMCIA=y 262CONFIG_PCMCIA=y
@@ -240,6 +270,7 @@ CONFIG_CARDBUS=y
240# CONFIG_YENTA is not set 270# CONFIG_YENTA is not set
241# CONFIG_PD6729 is not set 271# CONFIG_PD6729 is not set
242# CONFIG_I82092 is not set 272# CONFIG_I82092 is not set
273# CONFIG_ELECTRA_CF is not set
243# CONFIG_HOTPLUG_PCI is not set 274# CONFIG_HOTPLUG_PCI is not set
244CONFIG_KERNEL_START=0xc000000000000000 275CONFIG_KERNEL_START=0xc000000000000000
245 276
@@ -255,7 +286,7 @@ CONFIG_PACKET=y
255# CONFIG_PACKET_MMAP is not set 286# CONFIG_PACKET_MMAP is not set
256CONFIG_UNIX=y 287CONFIG_UNIX=y
257CONFIG_XFRM=y 288CONFIG_XFRM=y
258# CONFIG_XFRM_USER is not set 289CONFIG_XFRM_USER=y
259# CONFIG_XFRM_SUB_POLICY is not set 290# CONFIG_XFRM_SUB_POLICY is not set
260# CONFIG_XFRM_MIGRATE is not set 291# CONFIG_XFRM_MIGRATE is not set
261CONFIG_NET_KEY=y 292CONFIG_NET_KEY=y
@@ -281,6 +312,7 @@ CONFIG_INET_TUNNEL=y
281CONFIG_INET_XFRM_MODE_TRANSPORT=y 312CONFIG_INET_XFRM_MODE_TRANSPORT=y
282CONFIG_INET_XFRM_MODE_TUNNEL=y 313CONFIG_INET_XFRM_MODE_TUNNEL=y
283CONFIG_INET_XFRM_MODE_BEET=y 314CONFIG_INET_XFRM_MODE_BEET=y
315CONFIG_INET_LRO=y
284CONFIG_INET_DIAG=y 316CONFIG_INET_DIAG=y
285CONFIG_INET_TCP_DIAG=y 317CONFIG_INET_TCP_DIAG=y
286# CONFIG_TCP_CONG_ADVANCED is not set 318# CONFIG_TCP_CONG_ADVANCED is not set
@@ -306,10 +338,6 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
306# CONFIG_LAPB is not set 338# CONFIG_LAPB is not set
307# CONFIG_ECONET is not set 339# CONFIG_ECONET is not set
308# CONFIG_WAN_ROUTER is not set 340# CONFIG_WAN_ROUTER is not set
309
310#
311# QoS and/or fair queueing
312#
313# CONFIG_NET_SCHED is not set 341# CONFIG_NET_SCHED is not set
314 342
315# 343#
@@ -338,6 +366,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic"
338# 366#
339# Generic Driver Options 367# Generic Driver Options
340# 368#
369CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
341CONFIG_STANDALONE=y 370CONFIG_STANDALONE=y
342CONFIG_PREVENT_FIRMWARE_BUILD=y 371CONFIG_PREVENT_FIRMWARE_BUILD=y
343CONFIG_FW_LOADER=y 372CONFIG_FW_LOADER=y
@@ -361,6 +390,7 @@ CONFIG_MTD_BLOCK=y
361# CONFIG_INFTL is not set 390# CONFIG_INFTL is not set
362# CONFIG_RFD_FTL is not set 391# CONFIG_RFD_FTL is not set
363# CONFIG_SSFDC is not set 392# CONFIG_SSFDC is not set
393# CONFIG_MTD_OOPS is not set
364 394
365# 395#
366# RAM/ROM/Flash chip drivers 396# RAM/ROM/Flash chip drivers
@@ -385,6 +415,7 @@ CONFIG_MTD_CFI_I2=y
385# Mapping drivers for chip access 415# Mapping drivers for chip access
386# 416#
387# CONFIG_MTD_COMPLEX_MAPPINGS is not set 417# CONFIG_MTD_COMPLEX_MAPPINGS is not set
418# CONFIG_MTD_INTEL_VR_NOR is not set
388# CONFIG_MTD_PLATRAM is not set 419# CONFIG_MTD_PLATRAM is not set
389 420
390# 421#
@@ -402,7 +433,15 @@ CONFIG_MTD_PHRAM=y
402# CONFIG_MTD_DOC2000 is not set 433# CONFIG_MTD_DOC2000 is not set
403# CONFIG_MTD_DOC2001 is not set 434# CONFIG_MTD_DOC2001 is not set
404# CONFIG_MTD_DOC2001PLUS is not set 435# CONFIG_MTD_DOC2001PLUS is not set
405# CONFIG_MTD_NAND is not set 436CONFIG_MTD_NAND=y
437# CONFIG_MTD_NAND_VERIFY_WRITE is not set
438# CONFIG_MTD_NAND_ECC_SMC is not set
439# CONFIG_MTD_NAND_MUSEUM_IDS is not set
440CONFIG_MTD_NAND_IDS=y
441# CONFIG_MTD_NAND_DISKONCHIP is not set
442# CONFIG_MTD_NAND_CAFE is not set
443# CONFIG_MTD_NAND_PLATFORM is not set
444# CONFIG_MTD_ALAUDA is not set
406# CONFIG_MTD_ONENAND is not set 445# CONFIG_MTD_ONENAND is not set
407 446
408# 447#
@@ -455,10 +494,42 @@ CONFIG_IDE_PROC_FS=y
455# IDE chipset support/bugfixes 494# IDE chipset support/bugfixes
456# 495#
457# CONFIG_IDE_GENERIC is not set 496# CONFIG_IDE_GENERIC is not set
458# CONFIG_BLK_DEV_IDEPCI is not set 497# CONFIG_BLK_DEV_PLATFORM is not set
498
499#
500# PCI IDE chipsets support
501#
459# CONFIG_IDEPCI_PCIBUS_ORDER is not set 502# CONFIG_IDEPCI_PCIBUS_ORDER is not set
503# CONFIG_BLK_DEV_GENERIC is not set
504# CONFIG_BLK_DEV_OPTI621 is not set
505# CONFIG_BLK_DEV_AEC62XX is not set
506# CONFIG_BLK_DEV_ALI15X3 is not set
507# CONFIG_BLK_DEV_AMD74XX is not set
508# CONFIG_BLK_DEV_CMD64X is not set
509# CONFIG_BLK_DEV_TRIFLEX is not set
510# CONFIG_BLK_DEV_CY82C693 is not set
511# CONFIG_BLK_DEV_CS5520 is not set
512# CONFIG_BLK_DEV_CS5530 is not set
513# CONFIG_BLK_DEV_HPT34X is not set
514# CONFIG_BLK_DEV_HPT366 is not set
515# CONFIG_BLK_DEV_JMICRON is not set
516# CONFIG_BLK_DEV_SC1200 is not set
517# CONFIG_BLK_DEV_PIIX is not set
518# CONFIG_BLK_DEV_IT8213 is not set
519# CONFIG_BLK_DEV_IT821X is not set
520# CONFIG_BLK_DEV_NS87415 is not set
521# CONFIG_BLK_DEV_PDC202XX_OLD is not set
522# CONFIG_BLK_DEV_PDC202XX_NEW is not set
523# CONFIG_BLK_DEV_SVWKS is not set
524# CONFIG_BLK_DEV_SIIMAGE is not set
525# CONFIG_BLK_DEV_SL82C105 is not set
526# CONFIG_BLK_DEV_SLC90E66 is not set
527# CONFIG_BLK_DEV_TRM290 is not set
528# CONFIG_BLK_DEV_VIA82CXXX is not set
529# CONFIG_BLK_DEV_TC86C001 is not set
460# CONFIG_IDE_ARM is not set 530# CONFIG_IDE_ARM is not set
461# CONFIG_BLK_DEV_IDEDMA is not set 531# CONFIG_BLK_DEV_IDEDMA is not set
532CONFIG_IDE_ARCH_OBSOLETE_INIT=y
462# CONFIG_BLK_DEV_HD is not set 533# CONFIG_BLK_DEV_HD is not set
463 534
464# 535#
@@ -498,10 +569,11 @@ CONFIG_SCSI_WAIT_SCAN=m
498# CONFIG_SCSI_FC_ATTRS is not set 569# CONFIG_SCSI_FC_ATTRS is not set
499# CONFIG_SCSI_ISCSI_ATTRS is not set 570# CONFIG_SCSI_ISCSI_ATTRS is not set
500# CONFIG_SCSI_SAS_LIBSAS is not set 571# CONFIG_SCSI_SAS_LIBSAS is not set
572# CONFIG_SCSI_SRP_ATTRS is not set
501CONFIG_SCSI_LOWLEVEL=y 573CONFIG_SCSI_LOWLEVEL=y
502# CONFIG_ISCSI_TCP is not set 574# CONFIG_ISCSI_TCP is not set
503CONFIG_BLK_DEV_3W_XXXX_RAID=y 575# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
504CONFIG_SCSI_3W_9XXX=y 576# CONFIG_SCSI_3W_9XXX is not set
505# CONFIG_SCSI_ACARD is not set 577# CONFIG_SCSI_ACARD is not set
506# CONFIG_SCSI_AACRAID is not set 578# CONFIG_SCSI_AACRAID is not set
507# CONFIG_SCSI_AIC7XXX is not set 579# CONFIG_SCSI_AIC7XXX is not set
@@ -574,9 +646,10 @@ CONFIG_ATA_GENERIC=y
574# CONFIG_PATA_OLDPIIX is not set 646# CONFIG_PATA_OLDPIIX is not set
575# CONFIG_PATA_NETCELL is not set 647# CONFIG_PATA_NETCELL is not set
576# CONFIG_PATA_NS87410 is not set 648# CONFIG_PATA_NS87410 is not set
649# CONFIG_PATA_NS87415 is not set
577# CONFIG_PATA_OPTI is not set 650# CONFIG_PATA_OPTI is not set
578# CONFIG_PATA_OPTIDMA is not set 651# CONFIG_PATA_OPTIDMA is not set
579# CONFIG_PATA_PCMCIA is not set 652CONFIG_PATA_PCMCIA=y
580# CONFIG_PATA_PDC_OLD is not set 653# CONFIG_PATA_PDC_OLD is not set
581# CONFIG_PATA_RADISYS is not set 654# CONFIG_PATA_RADISYS is not set
582# CONFIG_PATA_RZ1000 is not set 655# CONFIG_PATA_RZ1000 is not set
@@ -589,41 +662,13 @@ CONFIG_ATA_GENERIC=y
589# CONFIG_PATA_WINBOND is not set 662# CONFIG_PATA_WINBOND is not set
590CONFIG_PATA_PLATFORM=y 663CONFIG_PATA_PLATFORM=y
591# CONFIG_MD is not set 664# CONFIG_MD is not set
592
593#
594# Fusion MPT device support
595#
596# CONFIG_FUSION is not set 665# CONFIG_FUSION is not set
597# CONFIG_FUSION_SPI is not set
598# CONFIG_FUSION_FC is not set
599# CONFIG_FUSION_SAS is not set
600 666
601# 667#
602# IEEE 1394 (FireWire) support 668# IEEE 1394 (FireWire) support
603# 669#
604# CONFIG_FIREWIRE is not set 670# CONFIG_FIREWIRE is not set
605CONFIG_IEEE1394=y 671# CONFIG_IEEE1394 is not set
606
607#
608# Subsystem Options
609#
610# CONFIG_IEEE1394_VERBOSEDEBUG is not set
611
612#
613# Controllers
614#
615CONFIG_IEEE1394_PCILYNX=y
616CONFIG_IEEE1394_OHCI1394=y
617
618#
619# Protocols
620#
621# CONFIG_IEEE1394_VIDEO1394 is not set
622CONFIG_IEEE1394_SBP2=y
623# CONFIG_IEEE1394_ETH1394_ROM_ENTRY is not set
624# CONFIG_IEEE1394_ETH1394 is not set
625# CONFIG_IEEE1394_DV1394 is not set
626CONFIG_IEEE1394_RAWIO=y
627# CONFIG_I2O is not set 672# CONFIG_I2O is not set
628# CONFIG_MACINTOSH_DRIVERS is not set 673# CONFIG_MACINTOSH_DRIVERS is not set
629CONFIG_NETDEVICES=y 674CONFIG_NETDEVICES=y
@@ -633,6 +678,8 @@ CONFIG_DUMMY=y
633# CONFIG_MACVLAN is not set 678# CONFIG_MACVLAN is not set
634# CONFIG_EQUALIZER is not set 679# CONFIG_EQUALIZER is not set
635# CONFIG_TUN is not set 680# CONFIG_TUN is not set
681# CONFIG_VETH is not set
682# CONFIG_IP1000 is not set
636# CONFIG_ARCNET is not set 683# CONFIG_ARCNET is not set
637CONFIG_PHYLIB=y 684CONFIG_PHYLIB=y
638 685
@@ -649,6 +696,7 @@ CONFIG_MARVELL_PHY=y
649# CONFIG_BROADCOM_PHY is not set 696# CONFIG_BROADCOM_PHY is not set
650# CONFIG_ICPLUS_PHY is not set 697# CONFIG_ICPLUS_PHY is not set
651# CONFIG_FIXED_PHY is not set 698# CONFIG_FIXED_PHY is not set
699# CONFIG_MDIO_BITBANG is not set
652CONFIG_NET_ETHERNET=y 700CONFIG_NET_ETHERNET=y
653CONFIG_MII=y 701CONFIG_MII=y
654# CONFIG_HAPPYMEAL is not set 702# CONFIG_HAPPYMEAL is not set
@@ -657,13 +705,16 @@ CONFIG_MII=y
657# CONFIG_NET_VENDOR_3COM is not set 705# CONFIG_NET_VENDOR_3COM is not set
658# CONFIG_NET_TULIP is not set 706# CONFIG_NET_TULIP is not set
659# CONFIG_HP100 is not set 707# CONFIG_HP100 is not set
708# CONFIG_IBM_NEW_EMAC_ZMII is not set
709# CONFIG_IBM_NEW_EMAC_RGMII is not set
710# CONFIG_IBM_NEW_EMAC_TAH is not set
711# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
660CONFIG_NET_PCI=y 712CONFIG_NET_PCI=y
661# CONFIG_PCNET32 is not set 713# CONFIG_PCNET32 is not set
662# CONFIG_AMD8111_ETH is not set 714# CONFIG_AMD8111_ETH is not set
663# CONFIG_ADAPTEC_STARFIRE is not set 715# CONFIG_ADAPTEC_STARFIRE is not set
664# CONFIG_B44 is not set 716# CONFIG_B44 is not set
665# CONFIG_FORCEDETH is not set 717# CONFIG_FORCEDETH is not set
666# CONFIG_DGRS is not set
667# CONFIG_EEPRO100 is not set 718# CONFIG_EEPRO100 is not set
668# CONFIG_E100 is not set 719# CONFIG_E100 is not set
669# CONFIG_FEALNX is not set 720# CONFIG_FEALNX is not set
@@ -682,6 +733,7 @@ CONFIG_NETDEV_1000=y
682CONFIG_E1000=y 733CONFIG_E1000=y
683CONFIG_E1000_NAPI=y 734CONFIG_E1000_NAPI=y
684# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set 735# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
736# CONFIG_E1000E is not set
685# CONFIG_NS83820 is not set 737# CONFIG_NS83820 is not set
686# CONFIG_HAMACHI is not set 738# CONFIG_HAMACHI is not set
687# CONFIG_YELLOWFIN is not set 739# CONFIG_YELLOWFIN is not set
@@ -689,6 +741,7 @@ CONFIG_E1000_NAPI=y
689# CONFIG_SIS190 is not set 741# CONFIG_SIS190 is not set
690# CONFIG_SKGE is not set 742# CONFIG_SKGE is not set
691# CONFIG_SKY2 is not set 743# CONFIG_SKY2 is not set
744# CONFIG_SK98LIN is not set
692# CONFIG_VIA_VELOCITY is not set 745# CONFIG_VIA_VELOCITY is not set
693CONFIG_TIGON3=y 746CONFIG_TIGON3=y
694# CONFIG_BNX2 is not set 747# CONFIG_BNX2 is not set
@@ -697,12 +750,15 @@ CONFIG_TIGON3=y
697CONFIG_NETDEV_10000=y 750CONFIG_NETDEV_10000=y
698# CONFIG_CHELSIO_T1 is not set 751# CONFIG_CHELSIO_T1 is not set
699# CONFIG_CHELSIO_T3 is not set 752# CONFIG_CHELSIO_T3 is not set
753# CONFIG_IXGBE is not set
700# CONFIG_IXGB is not set 754# CONFIG_IXGB is not set
701# CONFIG_S2IO is not set 755# CONFIG_S2IO is not set
702# CONFIG_MYRI10GE is not set 756# CONFIG_MYRI10GE is not set
703# CONFIG_NETXEN_NIC is not set 757# CONFIG_NETXEN_NIC is not set
758# CONFIG_NIU is not set
704CONFIG_PASEMI_MAC=y 759CONFIG_PASEMI_MAC=y
705# CONFIG_MLX4_CORE is not set 760# CONFIG_MLX4_CORE is not set
761# CONFIG_TEHUTI is not set
706# CONFIG_TR is not set 762# CONFIG_TR is not set
707 763
708# 764#
@@ -749,7 +805,6 @@ CONFIG_INPUT_MOUSEDEV_PSAUX=y
749CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 805CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
750CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 806CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
751CONFIG_INPUT_JOYDEV=y 807CONFIG_INPUT_JOYDEV=y
752# CONFIG_INPUT_TSDEV is not set
753CONFIG_INPUT_EVDEV=y 808CONFIG_INPUT_EVDEV=y
754# CONFIG_INPUT_EVBUG is not set 809# CONFIG_INPUT_EVBUG is not set
755 810
@@ -810,15 +865,12 @@ CONFIG_UNIX98_PTYS=y
810CONFIG_LEGACY_PTYS=y 865CONFIG_LEGACY_PTYS=y
811CONFIG_LEGACY_PTY_COUNT=4 866CONFIG_LEGACY_PTY_COUNT=4
812# CONFIG_IPMI_HANDLER is not set 867# CONFIG_IPMI_HANDLER is not set
813# CONFIG_WATCHDOG is not set
814CONFIG_HW_RANDOM=y 868CONFIG_HW_RANDOM=y
815CONFIG_HW_RANDOM_PASEMI=y 869CONFIG_HW_RANDOM_PASEMI=y
816CONFIG_GEN_RTC=y 870CONFIG_GEN_RTC=y
817CONFIG_GEN_RTC_X=y 871CONFIG_GEN_RTC_X=y
818# CONFIG_R3964 is not set 872# CONFIG_R3964 is not set
819# CONFIG_APPLICOM is not set 873# CONFIG_APPLICOM is not set
820# CONFIG_AGP is not set
821# CONFIG_DRM is not set
822 874
823# 875#
824# PCMCIA character devices 876# PCMCIA character devices
@@ -896,8 +948,6 @@ CONFIG_SENSORS_EEPROM=y
896# CONFIG_POWER_SUPPLY is not set 948# CONFIG_POWER_SUPPLY is not set
897CONFIG_HWMON=y 949CONFIG_HWMON=y
898CONFIG_HWMON_VID=y 950CONFIG_HWMON_VID=y
899# CONFIG_SENSORS_ABITUGURU is not set
900# CONFIG_SENSORS_ABITUGURU3 is not set
901# CONFIG_SENSORS_AD7418 is not set 951# CONFIG_SENSORS_AD7418 is not set
902# CONFIG_SENSORS_ADM1021 is not set 952# CONFIG_SENSORS_ADM1021 is not set
903# CONFIG_SENSORS_ADM1025 is not set 953# CONFIG_SENSORS_ADM1025 is not set
@@ -905,12 +955,12 @@ CONFIG_HWMON_VID=y
905# CONFIG_SENSORS_ADM1029 is not set 955# CONFIG_SENSORS_ADM1029 is not set
906# CONFIG_SENSORS_ADM1031 is not set 956# CONFIG_SENSORS_ADM1031 is not set
907# CONFIG_SENSORS_ADM9240 is not set 957# CONFIG_SENSORS_ADM9240 is not set
908# CONFIG_SENSORS_ASB100 is not set 958# CONFIG_SENSORS_ADT7470 is not set
909# CONFIG_SENSORS_ATXP1 is not set 959# CONFIG_SENSORS_ATXP1 is not set
910# CONFIG_SENSORS_DS1621 is not set 960# CONFIG_SENSORS_DS1621 is not set
911# CONFIG_SENSORS_F71805F is not set 961# CONFIG_SENSORS_F71805F is not set
912# CONFIG_SENSORS_FSCHER is not set 962# CONFIG_SENSORS_F71882FG is not set
913# CONFIG_SENSORS_FSCPOS is not set 963# CONFIG_SENSORS_F75375S is not set
914# CONFIG_SENSORS_GL518SM is not set 964# CONFIG_SENSORS_GL518SM is not set
915# CONFIG_SENSORS_GL520SM is not set 965# CONFIG_SENSORS_GL520SM is not set
916# CONFIG_SENSORS_IT87 is not set 966# CONFIG_SENSORS_IT87 is not set
@@ -946,6 +996,13 @@ CONFIG_SENSORS_LM90=y
946# CONFIG_SENSORS_W83627HF is not set 996# CONFIG_SENSORS_W83627HF is not set
947# CONFIG_SENSORS_W83627EHF is not set 997# CONFIG_SENSORS_W83627EHF is not set
948# CONFIG_HWMON_DEBUG_CHIP is not set 998# CONFIG_HWMON_DEBUG_CHIP is not set
999# CONFIG_WATCHDOG is not set
1000
1001#
1002# Sonics Silicon Backplane
1003#
1004CONFIG_SSB_POSSIBLE=y
1005# CONFIG_SSB is not set
949 1006
950# 1007#
951# Multifunction device drivers 1008# Multifunction device drivers
@@ -963,14 +1020,14 @@ CONFIG_DAB=y
963# 1020#
964# Graphics support 1021# Graphics support
965# 1022#
966CONFIG_BACKLIGHT_LCD_SUPPORT=y 1023# CONFIG_AGP is not set
967CONFIG_LCD_CLASS_DEVICE=m 1024CONFIG_DRM=y
968CONFIG_BACKLIGHT_CLASS_DEVICE=y 1025# CONFIG_DRM_TDFX is not set
969 1026# CONFIG_DRM_R128 is not set
970# 1027CONFIG_DRM_RADEON=y
971# Display device support 1028# CONFIG_DRM_MGA is not set
972# 1029# CONFIG_DRM_VIA is not set
973# CONFIG_DISPLAY_SUPPORT is not set 1030# CONFIG_DRM_SAVAGE is not set
974CONFIG_VGASTATE=y 1031CONFIG_VGASTATE=y
975# CONFIG_VIDEO_OUTPUT_CONTROL is not set 1032# CONFIG_VIDEO_OUTPUT_CONTROL is not set
976CONFIG_FB=y 1033CONFIG_FB=y
@@ -979,6 +1036,7 @@ CONFIG_FB_DDC=y
979CONFIG_FB_CFB_FILLRECT=y 1036CONFIG_FB_CFB_FILLRECT=y
980CONFIG_FB_CFB_COPYAREA=y 1037CONFIG_FB_CFB_COPYAREA=y
981CONFIG_FB_CFB_IMAGEBLIT=y 1038CONFIG_FB_CFB_IMAGEBLIT=y
1039# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
982# CONFIG_FB_SYS_FILLRECT is not set 1040# CONFIG_FB_SYS_FILLRECT is not set
983# CONFIG_FB_SYS_COPYAREA is not set 1041# CONFIG_FB_SYS_COPYAREA is not set
984# CONFIG_FB_SYS_IMAGEBLIT is not set 1042# CONFIG_FB_SYS_IMAGEBLIT is not set
@@ -1026,6 +1084,15 @@ CONFIG_FB_RADEON_BACKLIGHT=y
1026# CONFIG_FB_PM3 is not set 1084# CONFIG_FB_PM3 is not set
1027# CONFIG_FB_IBM_GXT4500 is not set 1085# CONFIG_FB_IBM_GXT4500 is not set
1028# CONFIG_FB_VIRTUAL is not set 1086# CONFIG_FB_VIRTUAL is not set
1087CONFIG_BACKLIGHT_LCD_SUPPORT=y
1088# CONFIG_LCD_CLASS_DEVICE is not set
1089CONFIG_BACKLIGHT_CLASS_DEVICE=y
1090# CONFIG_BACKLIGHT_CORGI is not set
1091
1092#
1093# Display device support
1094#
1095# CONFIG_DISPLAY_SUPPORT is not set
1029 1096
1030# 1097#
1031# Console display driver support 1098# Console display driver support
@@ -1178,6 +1245,7 @@ CONFIG_SND_USB_USX2Y=y
1178CONFIG_HID_SUPPORT=y 1245CONFIG_HID_SUPPORT=y
1179CONFIG_HID=y 1246CONFIG_HID=y
1180# CONFIG_HID_DEBUG is not set 1247# CONFIG_HID_DEBUG is not set
1248# CONFIG_HIDRAW is not set
1181 1249
1182# 1250#
1183# USB Input Devices 1251# USB Input Devices
@@ -1328,6 +1396,7 @@ CONFIG_RTC_INTF_DEV=y
1328# I2C RTC drivers 1396# I2C RTC drivers
1329# 1397#
1330CONFIG_RTC_DRV_DS1307=y 1398CONFIG_RTC_DRV_DS1307=y
1399# CONFIG_RTC_DRV_DS1374 is not set
1331# CONFIG_RTC_DRV_DS1672 is not set 1400# CONFIG_RTC_DRV_DS1672 is not set
1332# CONFIG_RTC_DRV_MAX6900 is not set 1401# CONFIG_RTC_DRV_MAX6900 is not set
1333# CONFIG_RTC_DRV_RS5C372 is not set 1402# CONFIG_RTC_DRV_RS5C372 is not set
@@ -1357,19 +1426,6 @@ CONFIG_RTC_DRV_DS1307=y
1357# 1426#
1358 1427
1359# 1428#
1360# DMA Engine support
1361#
1362# CONFIG_DMA_ENGINE is not set
1363
1364#
1365# DMA Clients
1366#
1367
1368#
1369# DMA Devices
1370#
1371
1372#
1373# Userspace I/O 1429# Userspace I/O
1374# 1430#
1375# CONFIG_UIO is not set 1431# CONFIG_UIO is not set
@@ -1388,7 +1444,6 @@ CONFIG_EXT3_FS_XATTR=y
1388# CONFIG_EXT3_FS_SECURITY is not set 1444# CONFIG_EXT3_FS_SECURITY is not set
1389# CONFIG_EXT4DEV_FS is not set 1445# CONFIG_EXT4DEV_FS is not set
1390CONFIG_JBD=y 1446CONFIG_JBD=y
1391# CONFIG_JBD_DEBUG is not set
1392CONFIG_FS_MBCACHE=y 1447CONFIG_FS_MBCACHE=y
1393# CONFIG_REISERFS_FS is not set 1448# CONFIG_REISERFS_FS is not set
1394# CONFIG_JFS_FS is not set 1449# CONFIG_JFS_FS is not set
@@ -1436,7 +1491,6 @@ CONFIG_TMPFS=y
1436# CONFIG_TMPFS_POSIX_ACL is not set 1491# CONFIG_TMPFS_POSIX_ACL is not set
1437CONFIG_HUGETLBFS=y 1492CONFIG_HUGETLBFS=y
1438CONFIG_HUGETLB_PAGE=y 1493CONFIG_HUGETLB_PAGE=y
1439CONFIG_RAMFS=y
1440CONFIG_CONFIGFS_FS=y 1494CONFIG_CONFIGFS_FS=y
1441 1495
1442# 1496#
@@ -1449,30 +1503,43 @@ CONFIG_CONFIGFS_FS=y
1449# CONFIG_BEFS_FS is not set 1503# CONFIG_BEFS_FS is not set
1450# CONFIG_BFS_FS is not set 1504# CONFIG_BFS_FS is not set
1451# CONFIG_EFS_FS is not set 1505# CONFIG_EFS_FS is not set
1452# CONFIG_JFFS2_FS is not set 1506CONFIG_JFFS2_FS=y
1507CONFIG_JFFS2_FS_DEBUG=0
1508CONFIG_JFFS2_FS_WRITEBUFFER=y
1509# CONFIG_JFFS2_FS_WBUF_VERIFY is not set
1510# CONFIG_JFFS2_SUMMARY is not set
1511# CONFIG_JFFS2_FS_XATTR is not set
1512# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
1513CONFIG_JFFS2_ZLIB=y
1514# CONFIG_JFFS2_LZO is not set
1515CONFIG_JFFS2_RTIME=y
1516# CONFIG_JFFS2_RUBIN is not set
1453# CONFIG_CRAMFS is not set 1517# CONFIG_CRAMFS is not set
1454# CONFIG_VXFS_FS is not set 1518# CONFIG_VXFS_FS is not set
1455# CONFIG_HPFS_FS is not set 1519# CONFIG_HPFS_FS is not set
1456# CONFIG_QNX4FS_FS is not set 1520# CONFIG_QNX4FS_FS is not set
1457# CONFIG_SYSV_FS is not set 1521# CONFIG_SYSV_FS is not set
1458# CONFIG_UFS_FS is not set 1522# CONFIG_UFS_FS is not set
1459 1523CONFIG_NETWORK_FILESYSTEMS=y
1460#
1461# Network File Systems
1462#
1463CONFIG_NFS_FS=y 1524CONFIG_NFS_FS=y
1464CONFIG_NFS_V3=y 1525CONFIG_NFS_V3=y
1465# CONFIG_NFS_V3_ACL is not set 1526# CONFIG_NFS_V3_ACL is not set
1466# CONFIG_NFS_V4 is not set 1527# CONFIG_NFS_V4 is not set
1467# CONFIG_NFS_DIRECTIO is not set 1528# CONFIG_NFS_DIRECTIO is not set
1468# CONFIG_NFSD is not set 1529CONFIG_NFSD=y
1530CONFIG_NFSD_V3=y
1531# CONFIG_NFSD_V3_ACL is not set
1532CONFIG_NFSD_V4=y
1533CONFIG_NFSD_TCP=y
1469CONFIG_ROOT_NFS=y 1534CONFIG_ROOT_NFS=y
1470CONFIG_LOCKD=y 1535CONFIG_LOCKD=y
1471CONFIG_LOCKD_V4=y 1536CONFIG_LOCKD_V4=y
1537CONFIG_EXPORTFS=y
1472CONFIG_NFS_COMMON=y 1538CONFIG_NFS_COMMON=y
1473CONFIG_SUNRPC=y 1539CONFIG_SUNRPC=y
1540CONFIG_SUNRPC_GSS=y
1474# CONFIG_SUNRPC_BIND34 is not set 1541# CONFIG_SUNRPC_BIND34 is not set
1475# CONFIG_RPCSEC_GSS_KRB5 is not set 1542CONFIG_RPCSEC_GSS_KRB5=y
1476# CONFIG_RPCSEC_GSS_SPKM3 is not set 1543# CONFIG_RPCSEC_GSS_SPKM3 is not set
1477# CONFIG_SMB_FS is not set 1544# CONFIG_SMB_FS is not set
1478# CONFIG_CIFS is not set 1545# CONFIG_CIFS is not set
@@ -1501,10 +1568,6 @@ CONFIG_MSDOS_PARTITION=y
1501# CONFIG_KARMA_PARTITION is not set 1568# CONFIG_KARMA_PARTITION is not set
1502# CONFIG_EFI_PARTITION is not set 1569# CONFIG_EFI_PARTITION is not set
1503# CONFIG_SYSV68_PARTITION is not set 1570# CONFIG_SYSV68_PARTITION is not set
1504
1505#
1506# Native Language Support
1507#
1508CONFIG_NLS=y 1571CONFIG_NLS=y
1509CONFIG_NLS_DEFAULT="iso8859-1" 1572CONFIG_NLS_DEFAULT="iso8859-1"
1510CONFIG_NLS_CODEPAGE_437=y 1573CONFIG_NLS_CODEPAGE_437=y
@@ -1545,10 +1608,6 @@ CONFIG_NLS_ISO8859_1=y
1545# CONFIG_NLS_KOI8_R is not set 1608# CONFIG_NLS_KOI8_R is not set
1546# CONFIG_NLS_KOI8_U is not set 1609# CONFIG_NLS_KOI8_U is not set
1547# CONFIG_NLS_UTF8 is not set 1610# CONFIG_NLS_UTF8 is not set
1548
1549#
1550# Distributed Lock Manager
1551#
1552# CONFIG_DLM is not set 1611# CONFIG_DLM is not set
1553# CONFIG_UCC_SLOW is not set 1612# CONFIG_UCC_SLOW is not set
1554 1613
@@ -1561,23 +1620,24 @@ CONFIG_CRC_CCITT=y
1561# CONFIG_CRC_ITU_T is not set 1620# CONFIG_CRC_ITU_T is not set
1562CONFIG_CRC32=y 1621CONFIG_CRC32=y
1563# CONFIG_CRC7 is not set 1622# CONFIG_CRC7 is not set
1564# CONFIG_LIBCRC32C is not set 1623CONFIG_LIBCRC32C=m
1624CONFIG_ZLIB_INFLATE=y
1625CONFIG_ZLIB_DEFLATE=y
1565CONFIG_PLIST=y 1626CONFIG_PLIST=y
1566CONFIG_HAS_IOMEM=y 1627CONFIG_HAS_IOMEM=y
1567CONFIG_HAS_IOPORT=y 1628CONFIG_HAS_IOPORT=y
1568CONFIG_HAS_DMA=y 1629CONFIG_HAS_DMA=y
1569 1630CONFIG_INSTRUMENTATION=y
1570#
1571# Instrumentation Support
1572#
1573CONFIG_PROFILING=y 1631CONFIG_PROFILING=y
1574CONFIG_OPROFILE=y 1632CONFIG_OPROFILE=y
1575# CONFIG_KPROBES is not set 1633# CONFIG_KPROBES is not set
1634# CONFIG_MARKERS is not set
1576 1635
1577# 1636#
1578# Kernel hacking 1637# Kernel hacking
1579# 1638#
1580# CONFIG_PRINTK_TIME is not set 1639# CONFIG_PRINTK_TIME is not set
1640CONFIG_ENABLE_WARN_DEPRECATED=y
1581CONFIG_ENABLE_MUST_CHECK=y 1641CONFIG_ENABLE_MUST_CHECK=y
1582CONFIG_MAGIC_SYSRQ=y 1642CONFIG_MAGIC_SYSRQ=y
1583# CONFIG_UNUSED_SYMBOLS is not set 1643# CONFIG_UNUSED_SYMBOLS is not set
@@ -1586,7 +1646,7 @@ CONFIG_MAGIC_SYSRQ=y
1586CONFIG_DEBUG_KERNEL=y 1646CONFIG_DEBUG_KERNEL=y
1587# CONFIG_DEBUG_SHIRQ is not set 1647# CONFIG_DEBUG_SHIRQ is not set
1588CONFIG_DETECT_SOFTLOCKUP=y 1648CONFIG_DETECT_SOFTLOCKUP=y
1589CONFIG_SCHED_DEBUG=y 1649# CONFIG_SCHED_DEBUG is not set
1590# CONFIG_SCHEDSTATS is not set 1650# CONFIG_SCHEDSTATS is not set
1591# CONFIG_TIMER_STATS is not set 1651# CONFIG_TIMER_STATS is not set
1592# CONFIG_SLUB_DEBUG_ON is not set 1652# CONFIG_SLUB_DEBUG_ON is not set
@@ -1601,9 +1661,12 @@ CONFIG_DEBUG_BUGVERBOSE=y
1601# CONFIG_DEBUG_INFO is not set 1661# CONFIG_DEBUG_INFO is not set
1602# CONFIG_DEBUG_VM is not set 1662# CONFIG_DEBUG_VM is not set
1603# CONFIG_DEBUG_LIST is not set 1663# CONFIG_DEBUG_LIST is not set
1664# CONFIG_DEBUG_SG is not set
1604# CONFIG_FORCED_INLINING is not set 1665# CONFIG_FORCED_INLINING is not set
1666# CONFIG_BOOT_PRINTK_DELAY is not set
1605# CONFIG_RCU_TORTURE_TEST is not set 1667# CONFIG_RCU_TORTURE_TEST is not set
1606# CONFIG_FAULT_INJECTION is not set 1668# CONFIG_FAULT_INJECTION is not set
1669# CONFIG_SAMPLES is not set
1607# CONFIG_DEBUG_STACKOVERFLOW is not set 1670# CONFIG_DEBUG_STACKOVERFLOW is not set
1608# CONFIG_DEBUG_STACK_USAGE is not set 1671# CONFIG_DEBUG_STACK_USAGE is not set
1609# CONFIG_DEBUG_PAGEALLOC is not set 1672# CONFIG_DEBUG_PAGEALLOC is not set
@@ -1620,6 +1683,7 @@ CONFIG_XMON_DISASSEMBLY=y
1620# 1683#
1621# CONFIG_KEYS is not set 1684# CONFIG_KEYS is not set
1622# CONFIG_SECURITY is not set 1685# CONFIG_SECURITY is not set
1686# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1623CONFIG_CRYPTO=y 1687CONFIG_CRYPTO=y
1624CONFIG_CRYPTO_ALGAPI=y 1688CONFIG_CRYPTO_ALGAPI=y
1625CONFIG_CRYPTO_BLKCIPHER=y 1689CONFIG_CRYPTO_BLKCIPHER=y
@@ -1628,34 +1692,38 @@ CONFIG_CRYPTO_MANAGER=y
1628CONFIG_CRYPTO_HMAC=y 1692CONFIG_CRYPTO_HMAC=y
1629# CONFIG_CRYPTO_XCBC is not set 1693# CONFIG_CRYPTO_XCBC is not set
1630# CONFIG_CRYPTO_NULL is not set 1694# CONFIG_CRYPTO_NULL is not set
1631# CONFIG_CRYPTO_MD4 is not set 1695CONFIG_CRYPTO_MD4=y
1632CONFIG_CRYPTO_MD5=y 1696CONFIG_CRYPTO_MD5=y
1633CONFIG_CRYPTO_SHA1=y 1697CONFIG_CRYPTO_SHA1=y
1634# CONFIG_CRYPTO_SHA256 is not set 1698CONFIG_CRYPTO_SHA256=y
1635# CONFIG_CRYPTO_SHA512 is not set 1699CONFIG_CRYPTO_SHA512=y
1636# CONFIG_CRYPTO_WP512 is not set 1700# CONFIG_CRYPTO_WP512 is not set
1637# CONFIG_CRYPTO_TGR192 is not set 1701# CONFIG_CRYPTO_TGR192 is not set
1638# CONFIG_CRYPTO_GF128MUL is not set 1702# CONFIG_CRYPTO_GF128MUL is not set
1639CONFIG_CRYPTO_ECB=m 1703# CONFIG_CRYPTO_ECB is not set
1640CONFIG_CRYPTO_CBC=y 1704CONFIG_CRYPTO_CBC=y
1641CONFIG_CRYPTO_PCBC=m 1705# CONFIG_CRYPTO_PCBC is not set
1642# CONFIG_CRYPTO_LRW is not set 1706# CONFIG_CRYPTO_LRW is not set
1707# CONFIG_CRYPTO_XTS is not set
1643# CONFIG_CRYPTO_CRYPTD is not set 1708# CONFIG_CRYPTO_CRYPTD is not set
1644CONFIG_CRYPTO_DES=y 1709CONFIG_CRYPTO_DES=y
1645# CONFIG_CRYPTO_FCRYPT is not set 1710# CONFIG_CRYPTO_FCRYPT is not set
1646# CONFIG_CRYPTO_BLOWFISH is not set 1711CONFIG_CRYPTO_BLOWFISH=y
1647# CONFIG_CRYPTO_TWOFISH is not set 1712# CONFIG_CRYPTO_TWOFISH is not set
1648# CONFIG_CRYPTO_SERPENT is not set 1713# CONFIG_CRYPTO_SERPENT is not set
1649# CONFIG_CRYPTO_AES is not set 1714CONFIG_CRYPTO_AES=y
1650# CONFIG_CRYPTO_CAST5 is not set 1715# CONFIG_CRYPTO_CAST5 is not set
1651# CONFIG_CRYPTO_CAST6 is not set 1716# CONFIG_CRYPTO_CAST6 is not set
1652# CONFIG_CRYPTO_TEA is not set 1717# CONFIG_CRYPTO_TEA is not set
1653# CONFIG_CRYPTO_ARC4 is not set 1718# CONFIG_CRYPTO_ARC4 is not set
1654# CONFIG_CRYPTO_KHAZAD is not set 1719# CONFIG_CRYPTO_KHAZAD is not set
1655# CONFIG_CRYPTO_ANUBIS is not set 1720# CONFIG_CRYPTO_ANUBIS is not set
1721# CONFIG_CRYPTO_SEED is not set
1656# CONFIG_CRYPTO_DEFLATE is not set 1722# CONFIG_CRYPTO_DEFLATE is not set
1657# CONFIG_CRYPTO_MICHAEL_MIC is not set 1723# CONFIG_CRYPTO_MICHAEL_MIC is not set
1658# CONFIG_CRYPTO_CRC32C is not set 1724# CONFIG_CRYPTO_CRC32C is not set
1659# CONFIG_CRYPTO_CAMELLIA is not set 1725# CONFIG_CRYPTO_CAMELLIA is not set
1660# CONFIG_CRYPTO_TEST is not set 1726# CONFIG_CRYPTO_TEST is not set
1661# CONFIG_CRYPTO_HW is not set 1727# CONFIG_CRYPTO_AUTHENC is not set
1728CONFIG_CRYPTO_HW=y
1729# CONFIG_PPC_CLOCK is not set
diff --git a/arch/powerpc/configs/ppc64_defconfig b/arch/powerpc/configs/ppc64_defconfig
index 05582af50c5b..3e90c835fe12 100644
--- a/arch/powerpc/configs/ppc64_defconfig
+++ b/arch/powerpc/configs/ppc64_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.23-rc4 3# Linux kernel version: 2.6.24-rc2
4# Thu Aug 30 16:47:09 2007 4# Tue Nov 6 23:43:56 2007
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7 7
@@ -11,6 +11,7 @@ CONFIG_PPC64=y
11# CONFIG_POWER4_ONLY is not set 11# CONFIG_POWER4_ONLY is not set
12CONFIG_POWER3=y 12CONFIG_POWER3=y
13CONFIG_POWER4=y 13CONFIG_POWER4=y
14# CONFIG_TUNE_CELL is not set
14CONFIG_PPC_FPU=y 15CONFIG_PPC_FPU=y
15CONFIG_ALTIVEC=y 16CONFIG_ALTIVEC=y
16CONFIG_PPC_STD_MMU=y 17CONFIG_PPC_STD_MMU=y
@@ -19,8 +20,13 @@ CONFIG_VIRT_CPU_ACCOUNTING=y
19CONFIG_SMP=y 20CONFIG_SMP=y
20CONFIG_NR_CPUS=32 21CONFIG_NR_CPUS=32
21CONFIG_64BIT=y 22CONFIG_64BIT=y
23CONFIG_WORD_SIZE=64
22CONFIG_PPC_MERGE=y 24CONFIG_PPC_MERGE=y
23CONFIG_MMU=y 25CONFIG_MMU=y
26CONFIG_GENERIC_CMOS_UPDATE=y
27CONFIG_GENERIC_TIME=y
28CONFIG_GENERIC_TIME_VSYSCALL=y
29CONFIG_GENERIC_CLOCKEVENTS=y
24CONFIG_GENERIC_HARDIRQS=y 30CONFIG_GENERIC_HARDIRQS=y
25CONFIG_IRQ_PER_CPU=y 31CONFIG_IRQ_PER_CPU=y
26CONFIG_RWSEM_XCHGADD_ALGORITHM=y 32CONFIG_RWSEM_XCHGADD_ALGORITHM=y
@@ -72,8 +78,15 @@ CONFIG_IKCONFIG=y
72CONFIG_IKCONFIG_PROC=y 78CONFIG_IKCONFIG_PROC=y
73CONFIG_LOG_BUF_SHIFT=17 79CONFIG_LOG_BUF_SHIFT=17
74CONFIG_CGROUPS=y 80CONFIG_CGROUPS=y
81# CONFIG_CGROUP_DEBUG is not set
82# CONFIG_CGROUP_NS is not set
83# CONFIG_CGROUP_CPUACCT is not set
75CONFIG_CPUSETS=y 84CONFIG_CPUSETS=y
85CONFIG_FAIR_GROUP_SCHED=y
86CONFIG_FAIR_USER_SCHED=y
87# CONFIG_FAIR_CGROUP_SCHED is not set
76CONFIG_SYSFS_DEPRECATED=y 88CONFIG_SYSFS_DEPRECATED=y
89CONFIG_PROC_PID_CPUSET=y
77CONFIG_RELAY=y 90CONFIG_RELAY=y
78CONFIG_BLK_DEV_INITRD=y 91CONFIG_BLK_DEV_INITRD=y
79CONFIG_INITRAMFS_SOURCE="" 92CONFIG_INITRAMFS_SOURCE=""
@@ -93,7 +106,6 @@ CONFIG_FUTEX=y
93CONFIG_ANON_INODES=y 106CONFIG_ANON_INODES=y
94CONFIG_EPOLL=y 107CONFIG_EPOLL=y
95CONFIG_SIGNALFD=y 108CONFIG_SIGNALFD=y
96CONFIG_TIMERFD=y
97CONFIG_EVENTFD=y 109CONFIG_EVENTFD=y
98CONFIG_SHMEM=y 110CONFIG_SHMEM=y
99CONFIG_VM_EVENT_COUNTERS=y 111CONFIG_VM_EVENT_COUNTERS=y
@@ -114,6 +126,7 @@ CONFIG_STOP_MACHINE=y
114CONFIG_BLOCK=y 126CONFIG_BLOCK=y
115CONFIG_BLK_DEV_IO_TRACE=y 127CONFIG_BLK_DEV_IO_TRACE=y
116CONFIG_BLK_DEV_BSG=y 128CONFIG_BLK_DEV_BSG=y
129CONFIG_BLOCK_COMPAT=y
117 130
118# 131#
119# IO Schedulers 132# IO Schedulers
@@ -132,7 +145,6 @@ CONFIG_DEFAULT_IOSCHED="anticipatory"
132# Platform support 145# Platform support
133# 146#
134CONFIG_PPC_MULTIPLATFORM=y 147CONFIG_PPC_MULTIPLATFORM=y
135# CONFIG_EMBEDDED6xx is not set
136# CONFIG_PPC_82xx is not set 148# CONFIG_PPC_82xx is not set
137# CONFIG_PPC_83xx is not set 149# CONFIG_PPC_83xx is not set
138# CONFIG_PPC_86xx is not set 150# CONFIG_PPC_86xx is not set
@@ -155,7 +167,15 @@ CONFIG_VIOPATH=y
155CONFIG_PPC_PMAC=y 167CONFIG_PPC_PMAC=y
156CONFIG_PPC_PMAC64=y 168CONFIG_PPC_PMAC64=y
157CONFIG_PPC_MAPLE=y 169CONFIG_PPC_MAPLE=y
158# CONFIG_PPC_PASEMI is not set 170CONFIG_PPC_PASEMI=y
171
172#
173# PA Semi PWRficient options
174#
175CONFIG_PPC_PASEMI_IOMMU=y
176# CONFIG_PPC_PASEMI_IOMMU_DMA_FORCE is not set
177CONFIG_PPC_PASEMI_MDIO=y
178CONFIG_ELECTRA_IDE=y
159CONFIG_PPC_CELLEB=y 179CONFIG_PPC_CELLEB=y
160# CONFIG_PPC_PS3 is not set 180# CONFIG_PPC_PS3 is not set
161CONFIG_PPC_CELL=y 181CONFIG_PPC_CELL=y
@@ -188,6 +208,7 @@ CONFIG_RTAS_FLASH=m
188CONFIG_PPC_PMI=m 208CONFIG_PPC_PMI=m
189CONFIG_MMIO_NVRAM=y 209CONFIG_MMIO_NVRAM=y
190CONFIG_MPIC_U3_HT_IRQS=y 210CONFIG_MPIC_U3_HT_IRQS=y
211CONFIG_MPIC_BROKEN_REGREAD=y
191CONFIG_IBMVIO=y 212CONFIG_IBMVIO=y
192# CONFIG_IBMEBUS is not set 213# CONFIG_IBMEBUS is not set
193# CONFIG_PPC_MPC106 is not set 214# CONFIG_PPC_MPC106 is not set
@@ -201,6 +222,8 @@ CONFIG_CPU_FREQ_STAT=y
201# CONFIG_CPU_FREQ_STAT_DETAILS is not set 222# CONFIG_CPU_FREQ_STAT_DETAILS is not set
202CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y 223CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
203# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set 224# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
225# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
226# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
204CONFIG_CPU_FREQ_GOV_PERFORMANCE=y 227CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
205CONFIG_CPU_FREQ_GOV_POWERSAVE=y 228CONFIG_CPU_FREQ_GOV_POWERSAVE=y
206CONFIG_CPU_FREQ_GOV_USERSPACE=y 229CONFIG_CPU_FREQ_GOV_USERSPACE=y
@@ -211,6 +234,7 @@ CONFIG_CPU_FREQ_GOV_USERSPACE=y
211# CPU Frequency drivers 234# CPU Frequency drivers
212# 235#
213CONFIG_CPU_FREQ_PMAC64=y 236CONFIG_CPU_FREQ_PMAC64=y
237CONFIG_PPC_PASEMI_CPUFREQ=y
214# CONFIG_CPM2 is not set 238# CONFIG_CPM2 is not set
215CONFIG_AXON_RAM=m 239CONFIG_AXON_RAM=m
216# CONFIG_FSL_ULI1575 is not set 240# CONFIG_FSL_ULI1575 is not set
@@ -254,6 +278,8 @@ CONFIG_SPARSEMEM=y
254CONFIG_HAVE_MEMORY_PRESENT=y 278CONFIG_HAVE_MEMORY_PRESENT=y
255# CONFIG_SPARSEMEM_STATIC is not set 279# CONFIG_SPARSEMEM_STATIC is not set
256CONFIG_SPARSEMEM_EXTREME=y 280CONFIG_SPARSEMEM_EXTREME=y
281CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
282CONFIG_SPARSEMEM_VMEMMAP=y
257CONFIG_MEMORY_HOTPLUG=y 283CONFIG_MEMORY_HOTPLUG=y
258CONFIG_MEMORY_HOTPLUG_SPARSE=y 284CONFIG_MEMORY_HOTPLUG_SPARSE=y
259CONFIG_SPLIT_PTLOCK_CPUS=4 285CONFIG_SPLIT_PTLOCK_CPUS=4
@@ -268,6 +294,7 @@ CONFIG_PROC_DEVICETREE=y
268# CONFIG_CMDLINE_BOOL is not set 294# CONFIG_CMDLINE_BOOL is not set
269# CONFIG_PM is not set 295# CONFIG_PM is not set
270CONFIG_SUSPEND_SMP_POSSIBLE=y 296CONFIG_SUSPEND_SMP_POSSIBLE=y
297CONFIG_HIBERNATION_SMP_POSSIBLE=y
271CONFIG_SECCOMP=y 298CONFIG_SECCOMP=y
272# CONFIG_WANT_DEVICE_TREE is not set 299# CONFIG_WANT_DEVICE_TREE is not set
273CONFIG_ISA_DMA_API=y 300CONFIG_ISA_DMA_API=y
@@ -284,12 +311,22 @@ CONFIG_PCI_SYSCALL=y
284# CONFIG_PCIEPORTBUS is not set 311# CONFIG_PCIEPORTBUS is not set
285CONFIG_ARCH_SUPPORTS_MSI=y 312CONFIG_ARCH_SUPPORTS_MSI=y
286CONFIG_PCI_MSI=y 313CONFIG_PCI_MSI=y
314CONFIG_PCI_LEGACY=y
287# CONFIG_PCI_DEBUG is not set 315# CONFIG_PCI_DEBUG is not set
316CONFIG_PCCARD=y
317# CONFIG_PCMCIA_DEBUG is not set
318CONFIG_PCMCIA=y
319CONFIG_PCMCIA_LOAD_CIS=y
320CONFIG_PCMCIA_IOCTL=y
321CONFIG_CARDBUS=y
288 322
289# 323#
290# PCCARD (PCMCIA/CardBus) support 324# PC-card bridges
291# 325#
292# CONFIG_PCCARD is not set 326# CONFIG_YENTA is not set
327# CONFIG_PD6729 is not set
328# CONFIG_I82092 is not set
329CONFIG_ELECTRA_CF=y
293CONFIG_HOTPLUG_PCI=m 330CONFIG_HOTPLUG_PCI=m
294# CONFIG_HOTPLUG_PCI_FAKE is not set 331# CONFIG_HOTPLUG_PCI_FAKE is not set
295# CONFIG_HOTPLUG_PCI_CPCI is not set 332# CONFIG_HOTPLUG_PCI_CPCI is not set
@@ -319,7 +356,10 @@ CONFIG_INET=y
319CONFIG_IP_MULTICAST=y 356CONFIG_IP_MULTICAST=y
320# CONFIG_IP_ADVANCED_ROUTER is not set 357# CONFIG_IP_ADVANCED_ROUTER is not set
321CONFIG_IP_FIB_HASH=y 358CONFIG_IP_FIB_HASH=y
322# CONFIG_IP_PNP is not set 359CONFIG_IP_PNP=y
360CONFIG_IP_PNP_DHCP=y
361CONFIG_IP_PNP_BOOTP=y
362# CONFIG_IP_PNP_RARP is not set
323CONFIG_NET_IPIP=y 363CONFIG_NET_IPIP=y
324# CONFIG_NET_IPGRE is not set 364# CONFIG_NET_IPGRE is not set
325# CONFIG_IP_MROUTE is not set 365# CONFIG_IP_MROUTE is not set
@@ -333,6 +373,7 @@ CONFIG_INET_TUNNEL=y
333CONFIG_INET_XFRM_MODE_TRANSPORT=y 373CONFIG_INET_XFRM_MODE_TRANSPORT=y
334CONFIG_INET_XFRM_MODE_TUNNEL=y 374CONFIG_INET_XFRM_MODE_TUNNEL=y
335CONFIG_INET_XFRM_MODE_BEET=y 375CONFIG_INET_XFRM_MODE_BEET=y
376# CONFIG_INET_LRO is not set
336CONFIG_INET_DIAG=y 377CONFIG_INET_DIAG=y
337CONFIG_INET_TCP_DIAG=y 378CONFIG_INET_TCP_DIAG=y
338# CONFIG_TCP_CONG_ADVANCED is not set 379# CONFIG_TCP_CONG_ADVANCED is not set
@@ -404,6 +445,7 @@ CONFIG_NETFILTER_XT_MATCH_STATE=m
404CONFIG_NETFILTER_XT_MATCH_STATISTIC=m 445CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
405CONFIG_NETFILTER_XT_MATCH_STRING=m 446CONFIG_NETFILTER_XT_MATCH_STRING=m
406CONFIG_NETFILTER_XT_MATCH_TCPMSS=m 447CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
448# CONFIG_NETFILTER_XT_MATCH_TIME is not set
407CONFIG_NETFILTER_XT_MATCH_U32=m 449CONFIG_NETFILTER_XT_MATCH_U32=m
408CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m 450CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
409 451
@@ -465,10 +507,6 @@ CONFIG_LLC=y
465# CONFIG_LAPB is not set 507# CONFIG_LAPB is not set
466# CONFIG_ECONET is not set 508# CONFIG_ECONET is not set
467# CONFIG_WAN_ROUTER is not set 509# CONFIG_WAN_ROUTER is not set
468
469#
470# QoS and/or fair queueing
471#
472# CONFIG_NET_SCHED is not set 510# CONFIG_NET_SCHED is not set
473CONFIG_NET_CLS_ROUTE=y 511CONFIG_NET_CLS_ROUTE=y
474 512
@@ -498,6 +536,7 @@ CONFIG_NET_CLS_ROUTE=y
498# 536#
499# Generic Driver Options 537# Generic Driver Options
500# 538#
539CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
501CONFIG_STANDALONE=y 540CONFIG_STANDALONE=y
502CONFIG_PREVENT_FIRMWARE_BUILD=y 541CONFIG_PREVENT_FIRMWARE_BUILD=y
503CONFIG_FW_LOADER=y 542CONFIG_FW_LOADER=y
@@ -539,6 +578,8 @@ CONFIG_BLK_DEV_IDE=y
539# CONFIG_BLK_DEV_IDE_SATA is not set 578# CONFIG_BLK_DEV_IDE_SATA is not set
540CONFIG_BLK_DEV_IDEDISK=y 579CONFIG_BLK_DEV_IDEDISK=y
541# CONFIG_IDEDISK_MULTI_MODE is not set 580# CONFIG_IDEDISK_MULTI_MODE is not set
581# CONFIG_BLK_DEV_IDECS is not set
582# CONFIG_BLK_DEV_DELKIN is not set
542CONFIG_BLK_DEV_IDECD=y 583CONFIG_BLK_DEV_IDECD=y
543# CONFIG_BLK_DEV_IDETAPE is not set 584# CONFIG_BLK_DEV_IDETAPE is not set
544# CONFIG_BLK_DEV_IDEFLOPPY is not set 585# CONFIG_BLK_DEV_IDEFLOPPY is not set
@@ -550,6 +591,11 @@ CONFIG_IDE_PROC_FS=y
550# IDE chipset support/bugfixes 591# IDE chipset support/bugfixes
551# 592#
552CONFIG_IDE_GENERIC=y 593CONFIG_IDE_GENERIC=y
594# CONFIG_BLK_DEV_PLATFORM is not set
595
596#
597# PCI IDE chipsets support
598#
553CONFIG_BLK_DEV_IDEPCI=y 599CONFIG_BLK_DEV_IDEPCI=y
554CONFIG_IDEPCI_SHARE_IRQ=y 600CONFIG_IDEPCI_SHARE_IRQ=y
555CONFIG_IDEPCI_PCIBUS_ORDER=y 601CONFIG_IDEPCI_PCIBUS_ORDER=y
@@ -557,8 +603,6 @@ CONFIG_IDEPCI_PCIBUS_ORDER=y
557CONFIG_BLK_DEV_GENERIC=y 603CONFIG_BLK_DEV_GENERIC=y
558# CONFIG_BLK_DEV_OPTI621 is not set 604# CONFIG_BLK_DEV_OPTI621 is not set
559CONFIG_BLK_DEV_IDEDMA_PCI=y 605CONFIG_BLK_DEV_IDEDMA_PCI=y
560# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
561# CONFIG_IDEDMA_ONLYDISK is not set
562# CONFIG_BLK_DEV_AEC62XX is not set 606# CONFIG_BLK_DEV_AEC62XX is not set
563# CONFIG_BLK_DEV_ALI15X3 is not set 607# CONFIG_BLK_DEV_ALI15X3 is not set
564CONFIG_BLK_DEV_AMD74XX=y 608CONFIG_BLK_DEV_AMD74XX=y
@@ -590,7 +634,7 @@ CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y
590CONFIG_BLK_DEV_IDEDMA_PMAC=y 634CONFIG_BLK_DEV_IDEDMA_PMAC=y
591# CONFIG_IDE_ARM is not set 635# CONFIG_IDE_ARM is not set
592CONFIG_BLK_DEV_IDEDMA=y 636CONFIG_BLK_DEV_IDEDMA=y
593# CONFIG_IDEDMA_IVB is not set 637CONFIG_IDE_ARCH_OBSOLETE_INIT=y
594# CONFIG_BLK_DEV_HD is not set 638# CONFIG_BLK_DEV_HD is not set
595 639
596# 640#
@@ -631,6 +675,7 @@ CONFIG_SCSI_FC_ATTRS=y
631CONFIG_SCSI_ISCSI_ATTRS=m 675CONFIG_SCSI_ISCSI_ATTRS=m
632# CONFIG_SCSI_SAS_ATTRS is not set 676# CONFIG_SCSI_SAS_ATTRS is not set
633# CONFIG_SCSI_SAS_LIBSAS is not set 677# CONFIG_SCSI_SAS_LIBSAS is not set
678CONFIG_SCSI_SRP_ATTRS=y
634CONFIG_SCSI_LOWLEVEL=y 679CONFIG_SCSI_LOWLEVEL=y
635# CONFIG_ISCSI_TCP is not set 680# CONFIG_ISCSI_TCP is not set
636# CONFIG_BLK_DEV_3W_XXXX_RAID is not set 681# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
@@ -671,19 +716,20 @@ CONFIG_SCSI_LPFC=m
671# CONFIG_SCSI_DC390T is not set 716# CONFIG_SCSI_DC390T is not set
672CONFIG_SCSI_DEBUG=m 717CONFIG_SCSI_DEBUG=m
673# CONFIG_SCSI_SRP is not set 718# CONFIG_SCSI_SRP is not set
719# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set
674CONFIG_ATA=y 720CONFIG_ATA=y
675CONFIG_ATA_NONSTANDARD=y 721CONFIG_ATA_NONSTANDARD=y
676# CONFIG_SATA_AHCI is not set 722# CONFIG_SATA_AHCI is not set
677CONFIG_SATA_SVW=y 723CONFIG_SATA_SVW=y
678# CONFIG_ATA_PIIX is not set 724# CONFIG_ATA_PIIX is not set
679# CONFIG_SATA_MV is not set 725CONFIG_SATA_MV=y
680# CONFIG_SATA_NV is not set 726# CONFIG_SATA_NV is not set
681# CONFIG_PDC_ADMA is not set 727# CONFIG_PDC_ADMA is not set
682# CONFIG_SATA_QSTOR is not set 728# CONFIG_SATA_QSTOR is not set
683# CONFIG_SATA_PROMISE is not set 729# CONFIG_SATA_PROMISE is not set
684# CONFIG_SATA_SX4 is not set 730# CONFIG_SATA_SX4 is not set
685# CONFIG_SATA_SIL is not set 731# CONFIG_SATA_SIL is not set
686# CONFIG_SATA_SIL24 is not set 732CONFIG_SATA_SIL24=y
687# CONFIG_SATA_SIS is not set 733# CONFIG_SATA_SIS is not set
688# CONFIG_SATA_ULI is not set 734# CONFIG_SATA_ULI is not set
689# CONFIG_SATA_VIA is not set 735# CONFIG_SATA_VIA is not set
@@ -713,8 +759,10 @@ CONFIG_SATA_SVW=y
713# CONFIG_PATA_OLDPIIX is not set 759# CONFIG_PATA_OLDPIIX is not set
714# CONFIG_PATA_NETCELL is not set 760# CONFIG_PATA_NETCELL is not set
715# CONFIG_PATA_NS87410 is not set 761# CONFIG_PATA_NS87410 is not set
762# CONFIG_PATA_NS87415 is not set
716# CONFIG_PATA_OPTI is not set 763# CONFIG_PATA_OPTI is not set
717# CONFIG_PATA_OPTIDMA is not set 764# CONFIG_PATA_OPTIDMA is not set
765CONFIG_PATA_PCMCIA=y
718# CONFIG_PATA_PDC_OLD is not set 766# CONFIG_PATA_PDC_OLD is not set
719# CONFIG_PATA_RADISYS is not set 767# CONFIG_PATA_RADISYS is not set
720# CONFIG_PATA_RZ1000 is not set 768# CONFIG_PATA_RZ1000 is not set
@@ -725,6 +773,7 @@ CONFIG_SATA_SVW=y
725# CONFIG_PATA_SIS is not set 773# CONFIG_PATA_SIS is not set
726# CONFIG_PATA_VIA is not set 774# CONFIG_PATA_VIA is not set
727CONFIG_PATA_WINBOND=y 775CONFIG_PATA_WINBOND=y
776CONFIG_PATA_PLATFORM=y
728CONFIG_PATA_SCC=y 777CONFIG_PATA_SCC=y
729CONFIG_MD=y 778CONFIG_MD=y
730CONFIG_BLK_DEV_MD=y 779CONFIG_BLK_DEV_MD=y
@@ -745,15 +794,10 @@ CONFIG_DM_ZERO=m
745CONFIG_DM_MULTIPATH=m 794CONFIG_DM_MULTIPATH=m
746CONFIG_DM_MULTIPATH_EMC=m 795CONFIG_DM_MULTIPATH_EMC=m
747# CONFIG_DM_MULTIPATH_RDAC is not set 796# CONFIG_DM_MULTIPATH_RDAC is not set
797# CONFIG_DM_MULTIPATH_HP is not set
748# CONFIG_DM_DELAY is not set 798# CONFIG_DM_DELAY is not set
749 799# CONFIG_DM_UEVENT is not set
750#
751# Fusion MPT device support
752#
753# CONFIG_FUSION is not set 800# CONFIG_FUSION is not set
754# CONFIG_FUSION_SPI is not set
755# CONFIG_FUSION_FC is not set
756# CONFIG_FUSION_SAS is not set
757 801
758# 802#
759# IEEE 1394 (FireWire) support 803# IEEE 1394 (FireWire) support
@@ -800,13 +844,15 @@ CONFIG_BONDING=m
800# CONFIG_MACVLAN is not set 844# CONFIG_MACVLAN is not set
801# CONFIG_EQUALIZER is not set 845# CONFIG_EQUALIZER is not set
802CONFIG_TUN=m 846CONFIG_TUN=m
847# CONFIG_VETH is not set
848# CONFIG_IP1000 is not set
803# CONFIG_ARCNET is not set 849# CONFIG_ARCNET is not set
804CONFIG_PHYLIB=m 850CONFIG_PHYLIB=y
805 851
806# 852#
807# MII PHY device drivers 853# MII PHY device drivers
808# 854#
809CONFIG_MARVELL_PHY=m 855CONFIG_MARVELL_PHY=y
810# CONFIG_DAVICOM_PHY is not set 856# CONFIG_DAVICOM_PHY is not set
811# CONFIG_QSEMI_PHY is not set 857# CONFIG_QSEMI_PHY is not set
812# CONFIG_LXT_PHY is not set 858# CONFIG_LXT_PHY is not set
@@ -818,6 +864,9 @@ CONFIG_BROADCOM_PHY=m
818CONFIG_FIXED_PHY=m 864CONFIG_FIXED_PHY=m
819CONFIG_FIXED_MII_10_FDX=y 865CONFIG_FIXED_MII_10_FDX=y
820CONFIG_FIXED_MII_100_FDX=y 866CONFIG_FIXED_MII_100_FDX=y
867# CONFIG_FIXED_MII_1000_FDX is not set
868CONFIG_FIXED_MII_AMNT=1
869# CONFIG_MDIO_BITBANG is not set
821CONFIG_NET_ETHERNET=y 870CONFIG_NET_ETHERNET=y
822CONFIG_MII=y 871CONFIG_MII=y
823# CONFIG_HAPPYMEAL is not set 872# CONFIG_HAPPYMEAL is not set
@@ -829,6 +878,11 @@ CONFIG_VORTEX=y
829# CONFIG_NET_TULIP is not set 878# CONFIG_NET_TULIP is not set
830# CONFIG_HP100 is not set 879# CONFIG_HP100 is not set
831CONFIG_IBMVETH=m 880CONFIG_IBMVETH=m
881# CONFIG_IBM_NEW_EMAC is not set
882CONFIG_IBM_NEW_EMAC_ZMII=y
883CONFIG_IBM_NEW_EMAC_RGMII=y
884CONFIG_IBM_NEW_EMAC_TAH=y
885CONFIG_IBM_NEW_EMAC_EMAC4=y
832CONFIG_NET_PCI=y 886CONFIG_NET_PCI=y
833CONFIG_PCNET32=y 887CONFIG_PCNET32=y
834# CONFIG_PCNET32_NAPI is not set 888# CONFIG_PCNET32_NAPI is not set
@@ -836,7 +890,6 @@ CONFIG_PCNET32=y
836# CONFIG_ADAPTEC_STARFIRE is not set 890# CONFIG_ADAPTEC_STARFIRE is not set
837# CONFIG_B44 is not set 891# CONFIG_B44 is not set
838# CONFIG_FORCEDETH is not set 892# CONFIG_FORCEDETH is not set
839# CONFIG_DGRS is not set
840# CONFIG_EEPRO100 is not set 893# CONFIG_EEPRO100 is not set
841CONFIG_E100=y 894CONFIG_E100=y
842# CONFIG_FEALNX is not set 895# CONFIG_FEALNX is not set
@@ -856,6 +909,7 @@ CONFIG_ACENIC_OMIT_TIGON_I=y
856CONFIG_E1000=y 909CONFIG_E1000=y
857# CONFIG_E1000_NAPI is not set 910# CONFIG_E1000_NAPI is not set
858# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set 911# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
912# CONFIG_E1000E is not set
859# CONFIG_NS83820 is not set 913# CONFIG_NS83820 is not set
860# CONFIG_HAMACHI is not set 914# CONFIG_HAMACHI is not set
861# CONFIG_YELLOWFIN is not set 915# CONFIG_YELLOWFIN is not set
@@ -863,6 +917,7 @@ CONFIG_E1000=y
863# CONFIG_SIS190 is not set 917# CONFIG_SIS190 is not set
864# CONFIG_SKGE is not set 918# CONFIG_SKGE is not set
865# CONFIG_SKY2 is not set 919# CONFIG_SKY2 is not set
920# CONFIG_SK98LIN is not set
866# CONFIG_VIA_VELOCITY is not set 921# CONFIG_VIA_VELOCITY is not set
867CONFIG_TIGON3=y 922CONFIG_TIGON3=y
868# CONFIG_BNX2 is not set 923# CONFIG_BNX2 is not set
@@ -872,13 +927,16 @@ CONFIG_SPIDER_NET=m
872CONFIG_NETDEV_10000=y 927CONFIG_NETDEV_10000=y
873# CONFIG_CHELSIO_T1 is not set 928# CONFIG_CHELSIO_T1 is not set
874# CONFIG_CHELSIO_T3 is not set 929# CONFIG_CHELSIO_T3 is not set
930# CONFIG_IXGBE is not set
875CONFIG_IXGB=m 931CONFIG_IXGB=m
876# CONFIG_IXGB_NAPI is not set 932# CONFIG_IXGB_NAPI is not set
877# CONFIG_S2IO is not set 933# CONFIG_S2IO is not set
878# CONFIG_MYRI10GE is not set 934# CONFIG_MYRI10GE is not set
879# CONFIG_NETXEN_NIC is not set 935# CONFIG_NETXEN_NIC is not set
880CONFIG_PASEMI_MAC=m 936# CONFIG_NIU is not set
937CONFIG_PASEMI_MAC=y
881# CONFIG_MLX4_CORE is not set 938# CONFIG_MLX4_CORE is not set
939# CONFIG_TEHUTI is not set
882CONFIG_TR=y 940CONFIG_TR=y
883CONFIG_IBMOL=y 941CONFIG_IBMOL=y
884# CONFIG_3C359 is not set 942# CONFIG_3C359 is not set
@@ -899,6 +957,7 @@ CONFIG_IBMOL=y
899# CONFIG_USB_RTL8150 is not set 957# CONFIG_USB_RTL8150 is not set
900# CONFIG_USB_USBNET_MII is not set 958# CONFIG_USB_USBNET_MII is not set
901# CONFIG_USB_USBNET is not set 959# CONFIG_USB_USBNET is not set
960# CONFIG_NET_PCMCIA is not set
902# CONFIG_WAN is not set 961# CONFIG_WAN is not set
903CONFIG_ISERIES_VETH=m 962CONFIG_ISERIES_VETH=m
904# CONFIG_FDDI is not set 963# CONFIG_FDDI is not set
@@ -918,6 +977,7 @@ CONFIG_SLHC=m
918# CONFIG_NET_FC is not set 977# CONFIG_NET_FC is not set
919# CONFIG_SHAPER is not set 978# CONFIG_SHAPER is not set
920CONFIG_NETCONSOLE=y 979CONFIG_NETCONSOLE=y
980# CONFIG_NETCONSOLE_DYNAMIC is not set
921CONFIG_NETPOLL=y 981CONFIG_NETPOLL=y
922CONFIG_NETPOLL_TRAP=y 982CONFIG_NETPOLL_TRAP=y
923CONFIG_NET_POLL_CONTROLLER=y 983CONFIG_NET_POLL_CONTROLLER=y
@@ -939,7 +999,6 @@ CONFIG_INPUT_MOUSEDEV=y
939CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 999CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
940CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 1000CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
941# CONFIG_INPUT_JOYDEV is not set 1001# CONFIG_INPUT_JOYDEV is not set
942# CONFIG_INPUT_TSDEV is not set
943CONFIG_INPUT_EVDEV=m 1002CONFIG_INPUT_EVDEV=m
944# CONFIG_INPUT_EVBUG is not set 1003# CONFIG_INPUT_EVBUG is not set
945 1004
@@ -1002,6 +1061,7 @@ CONFIG_HW_CONSOLE=y
1002CONFIG_SERIAL_8250=y 1061CONFIG_SERIAL_8250=y
1003CONFIG_SERIAL_8250_CONSOLE=y 1062CONFIG_SERIAL_8250_CONSOLE=y
1004CONFIG_SERIAL_8250_PCI=y 1063CONFIG_SERIAL_8250_PCI=y
1064# CONFIG_SERIAL_8250_CS is not set
1005CONFIG_SERIAL_8250_NR_UARTS=4 1065CONFIG_SERIAL_8250_NR_UARTS=4
1006CONFIG_SERIAL_8250_RUNTIME_UARTS=4 1066CONFIG_SERIAL_8250_RUNTIME_UARTS=4
1007# CONFIG_SERIAL_8250_EXTENDED is not set 1067# CONFIG_SERIAL_8250_EXTENDED is not set
@@ -1029,14 +1089,18 @@ CONFIG_HVC_RTAS=y
1029CONFIG_HVC_BEAT=y 1089CONFIG_HVC_BEAT=y
1030CONFIG_HVCS=m 1090CONFIG_HVCS=m
1031# CONFIG_IPMI_HANDLER is not set 1091# CONFIG_IPMI_HANDLER is not set
1032# CONFIG_WATCHDOG is not set
1033# CONFIG_HW_RANDOM is not set 1092# CONFIG_HW_RANDOM is not set
1034CONFIG_GEN_RTC=y 1093CONFIG_GEN_RTC=y
1035# CONFIG_GEN_RTC_X is not set 1094# CONFIG_GEN_RTC_X is not set
1036# CONFIG_R3964 is not set 1095# CONFIG_R3964 is not set
1037# CONFIG_APPLICOM is not set 1096# CONFIG_APPLICOM is not set
1038# CONFIG_AGP is not set 1097
1039# CONFIG_DRM is not set 1098#
1099# PCMCIA character devices
1100#
1101# CONFIG_SYNCLINK_CS is not set
1102# CONFIG_CARDMAN_4000 is not set
1103# CONFIG_CARDMAN_4040 is not set
1040CONFIG_RAW_DRIVER=y 1104CONFIG_RAW_DRIVER=y
1041CONFIG_MAX_RAW_DEVS=256 1105CONFIG_MAX_RAW_DEVS=256
1042# CONFIG_HANGCHECK_TIMER is not set 1106# CONFIG_HANGCHECK_TIMER is not set
@@ -1068,6 +1132,7 @@ CONFIG_I2C_POWERMAC=y
1068# CONFIG_I2C_NFORCE2 is not set 1132# CONFIG_I2C_NFORCE2 is not set
1069# CONFIG_I2C_OCORES is not set 1133# CONFIG_I2C_OCORES is not set
1070# CONFIG_I2C_PARPORT_LIGHT is not set 1134# CONFIG_I2C_PARPORT_LIGHT is not set
1135CONFIG_I2C_PASEMI=y
1071# CONFIG_I2C_PROSAVAGE is not set 1136# CONFIG_I2C_PROSAVAGE is not set
1072# CONFIG_I2C_SAVAGE4 is not set 1137# CONFIG_I2C_SAVAGE4 is not set
1073# CONFIG_I2C_SIMTEC is not set 1138# CONFIG_I2C_SIMTEC is not set
@@ -1106,6 +1171,13 @@ CONFIG_I2C_POWERMAC=y
1106# CONFIG_W1 is not set 1171# CONFIG_W1 is not set
1107# CONFIG_POWER_SUPPLY is not set 1172# CONFIG_POWER_SUPPLY is not set
1108# CONFIG_HWMON is not set 1173# CONFIG_HWMON is not set
1174# CONFIG_WATCHDOG is not set
1175
1176#
1177# Sonics Silicon Backplane
1178#
1179CONFIG_SSB_POSSIBLE=y
1180# CONFIG_SSB is not set
1109 1181
1110# 1182#
1111# Multifunction device drivers 1183# Multifunction device drivers
@@ -1122,18 +1194,8 @@ CONFIG_I2C_POWERMAC=y
1122# 1194#
1123# Graphics support 1195# Graphics support
1124# 1196#
1125CONFIG_BACKLIGHT_LCD_SUPPORT=y 1197# CONFIG_AGP is not set
1126CONFIG_LCD_CLASS_DEVICE=y 1198# CONFIG_DRM is not set
1127CONFIG_BACKLIGHT_CLASS_DEVICE=y
1128
1129#
1130# Display device support
1131#
1132CONFIG_DISPLAY_SUPPORT=y
1133
1134#
1135# Display hardware drivers
1136#
1137# CONFIG_VGASTATE is not set 1199# CONFIG_VGASTATE is not set
1138CONFIG_VIDEO_OUTPUT_CONTROL=m 1200CONFIG_VIDEO_OUTPUT_CONTROL=m
1139CONFIG_FB=y 1201CONFIG_FB=y
@@ -1142,6 +1204,7 @@ CONFIG_FB_DDC=y
1142CONFIG_FB_CFB_FILLRECT=y 1204CONFIG_FB_CFB_FILLRECT=y
1143CONFIG_FB_CFB_COPYAREA=y 1205CONFIG_FB_CFB_COPYAREA=y
1144CONFIG_FB_CFB_IMAGEBLIT=y 1206CONFIG_FB_CFB_IMAGEBLIT=y
1207# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
1145# CONFIG_FB_SYS_FILLRECT is not set 1208# CONFIG_FB_SYS_FILLRECT is not set
1146# CONFIG_FB_SYS_COPYAREA is not set 1209# CONFIG_FB_SYS_COPYAREA is not set
1147# CONFIG_FB_SYS_IMAGEBLIT is not set 1210# CONFIG_FB_SYS_IMAGEBLIT is not set
@@ -1192,6 +1255,19 @@ CONFIG_FB_RADEON_BACKLIGHT=y
1192# CONFIG_FB_PM3 is not set 1255# CONFIG_FB_PM3 is not set
1193CONFIG_FB_IBM_GXT4500=y 1256CONFIG_FB_IBM_GXT4500=y
1194# CONFIG_FB_VIRTUAL is not set 1257# CONFIG_FB_VIRTUAL is not set
1258CONFIG_BACKLIGHT_LCD_SUPPORT=y
1259CONFIG_LCD_CLASS_DEVICE=y
1260CONFIG_BACKLIGHT_CLASS_DEVICE=y
1261# CONFIG_BACKLIGHT_CORGI is not set
1262
1263#
1264# Display device support
1265#
1266CONFIG_DISPLAY_SUPPORT=y
1267
1268#
1269# Display hardware drivers
1270#
1195 1271
1196# 1272#
1197# Console display driver support 1273# Console display driver support
@@ -1333,6 +1409,12 @@ CONFIG_SND_AOA_SOUNDBUS_I2S=m
1333# CONFIG_SND_USB_CAIAQ is not set 1409# CONFIG_SND_USB_CAIAQ is not set
1334 1410
1335# 1411#
1412# PCMCIA devices
1413#
1414# CONFIG_SND_VXPOCKET is not set
1415# CONFIG_SND_PDAUDIOCF is not set
1416
1417#
1336# System on Chip audio support 1418# System on Chip audio support
1337# 1419#
1338# CONFIG_SND_SOC is not set 1420# CONFIG_SND_SOC is not set
@@ -1348,6 +1430,7 @@ CONFIG_SND_AOA_SOUNDBUS_I2S=m
1348CONFIG_HID_SUPPORT=y 1430CONFIG_HID_SUPPORT=y
1349CONFIG_HID=y 1431CONFIG_HID=y
1350# CONFIG_HID_DEBUG is not set 1432# CONFIG_HID_DEBUG is not set
1433# CONFIG_HIDRAW is not set
1351 1434
1352# 1435#
1353# USB Input Devices 1436# USB Input Devices
@@ -1489,19 +1572,53 @@ CONFIG_EDAC=y
1489# 1572#
1490# CONFIG_EDAC_DEBUG is not set 1573# CONFIG_EDAC_DEBUG is not set
1491CONFIG_EDAC_MM_EDAC=y 1574CONFIG_EDAC_MM_EDAC=y
1492# CONFIG_RTC_CLASS is not set 1575CONFIG_EDAC_PASEMI=y
1576CONFIG_RTC_LIB=y
1577CONFIG_RTC_CLASS=y
1578CONFIG_RTC_HCTOSYS=y
1579CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
1580# CONFIG_RTC_DEBUG is not set
1581
1582#
1583# RTC interfaces
1584#
1585CONFIG_RTC_INTF_SYSFS=y
1586CONFIG_RTC_INTF_PROC=y
1587CONFIG_RTC_INTF_DEV=y
1588# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
1589# CONFIG_RTC_DRV_TEST is not set
1590
1591#
1592# I2C RTC drivers
1593#
1594CONFIG_RTC_DRV_DS1307=y
1595# CONFIG_RTC_DRV_DS1374 is not set
1596# CONFIG_RTC_DRV_DS1672 is not set
1597# CONFIG_RTC_DRV_MAX6900 is not set
1598# CONFIG_RTC_DRV_RS5C372 is not set
1599# CONFIG_RTC_DRV_ISL1208 is not set
1600# CONFIG_RTC_DRV_X1205 is not set
1601# CONFIG_RTC_DRV_PCF8563 is not set
1602# CONFIG_RTC_DRV_PCF8583 is not set
1603# CONFIG_RTC_DRV_M41T80 is not set
1493 1604
1494# 1605#
1495# DMA Engine support 1606# SPI RTC drivers
1496# 1607#
1497# CONFIG_DMA_ENGINE is not set
1498 1608
1499# 1609#
1500# DMA Clients 1610# Platform RTC drivers
1501# 1611#
1612# CONFIG_RTC_DRV_CMOS is not set
1613# CONFIG_RTC_DRV_DS1553 is not set
1614# CONFIG_RTC_DRV_STK17TA8 is not set
1615# CONFIG_RTC_DRV_DS1742 is not set
1616# CONFIG_RTC_DRV_M48T86 is not set
1617# CONFIG_RTC_DRV_M48T59 is not set
1618# CONFIG_RTC_DRV_V3020 is not set
1502 1619
1503# 1620#
1504# DMA Devices 1621# on-CPU RTC drivers
1505# 1622#
1506 1623
1507# 1624#
@@ -1585,7 +1702,6 @@ CONFIG_TMPFS=y
1585# CONFIG_TMPFS_POSIX_ACL is not set 1702# CONFIG_TMPFS_POSIX_ACL is not set
1586CONFIG_HUGETLBFS=y 1703CONFIG_HUGETLBFS=y
1587CONFIG_HUGETLB_PAGE=y 1704CONFIG_HUGETLB_PAGE=y
1588CONFIG_RAMFS=y
1589# CONFIG_CONFIGFS_FS is not set 1705# CONFIG_CONFIGFS_FS is not set
1590 1706
1591# 1707#
@@ -1604,10 +1720,7 @@ CONFIG_CRAMFS=y
1604# CONFIG_QNX4FS_FS is not set 1720# CONFIG_QNX4FS_FS is not set
1605# CONFIG_SYSV_FS is not set 1721# CONFIG_SYSV_FS is not set
1606# CONFIG_UFS_FS is not set 1722# CONFIG_UFS_FS is not set
1607 1723CONFIG_NETWORK_FILESYSTEMS=y
1608#
1609# Network File Systems
1610#
1611CONFIG_NFS_FS=y 1724CONFIG_NFS_FS=y
1612CONFIG_NFS_V3=y 1725CONFIG_NFS_V3=y
1613CONFIG_NFS_V3_ACL=y 1726CONFIG_NFS_V3_ACL=y
@@ -1619,6 +1732,7 @@ CONFIG_NFSD_V3=y
1619CONFIG_NFSD_V3_ACL=y 1732CONFIG_NFSD_V3_ACL=y
1620CONFIG_NFSD_V4=y 1733CONFIG_NFSD_V4=y
1621CONFIG_NFSD_TCP=y 1734CONFIG_NFSD_TCP=y
1735CONFIG_ROOT_NFS=y
1622CONFIG_LOCKD=y 1736CONFIG_LOCKD=y
1623CONFIG_LOCKD_V4=y 1737CONFIG_LOCKD_V4=y
1624CONFIG_EXPORTFS=m 1738CONFIG_EXPORTFS=m
@@ -1626,6 +1740,7 @@ CONFIG_NFS_ACL_SUPPORT=y
1626CONFIG_NFS_COMMON=y 1740CONFIG_NFS_COMMON=y
1627CONFIG_SUNRPC=y 1741CONFIG_SUNRPC=y
1628CONFIG_SUNRPC_GSS=y 1742CONFIG_SUNRPC_GSS=y
1743CONFIG_SUNRPC_XPRT_RDMA=m
1629# CONFIG_SUNRPC_BIND34 is not set 1744# CONFIG_SUNRPC_BIND34 is not set
1630CONFIG_RPCSEC_GSS_KRB5=y 1745CONFIG_RPCSEC_GSS_KRB5=y
1631CONFIG_RPCSEC_GSS_SPKM3=m 1746CONFIG_RPCSEC_GSS_SPKM3=m
@@ -1662,10 +1777,6 @@ CONFIG_MSDOS_PARTITION=y
1662# CONFIG_KARMA_PARTITION is not set 1777# CONFIG_KARMA_PARTITION is not set
1663# CONFIG_EFI_PARTITION is not set 1778# CONFIG_EFI_PARTITION is not set
1664# CONFIG_SYSV68_PARTITION is not set 1779# CONFIG_SYSV68_PARTITION is not set
1665
1666#
1667# Native Language Support
1668#
1669CONFIG_NLS=y 1780CONFIG_NLS=y
1670CONFIG_NLS_DEFAULT="iso8859-1" 1781CONFIG_NLS_DEFAULT="iso8859-1"
1671CONFIG_NLS_CODEPAGE_437=y 1782CONFIG_NLS_CODEPAGE_437=y
@@ -1706,10 +1817,6 @@ CONFIG_NLS_ISO8859_15=m
1706CONFIG_NLS_KOI8_R=m 1817CONFIG_NLS_KOI8_R=m
1707CONFIG_NLS_KOI8_U=m 1818CONFIG_NLS_KOI8_U=m
1708CONFIG_NLS_UTF8=m 1819CONFIG_NLS_UTF8=m
1709
1710#
1711# Distributed Lock Manager
1712#
1713# CONFIG_DLM is not set 1820# CONFIG_DLM is not set
1714# CONFIG_UCC_SLOW is not set 1821# CONFIG_UCC_SLOW is not set
1715 1822
@@ -1733,18 +1840,17 @@ CONFIG_PLIST=y
1733CONFIG_HAS_IOMEM=y 1840CONFIG_HAS_IOMEM=y
1734CONFIG_HAS_IOPORT=y 1841CONFIG_HAS_IOPORT=y
1735CONFIG_HAS_DMA=y 1842CONFIG_HAS_DMA=y
1736 1843CONFIG_INSTRUMENTATION=y
1737#
1738# Instrumentation Support
1739#
1740CONFIG_PROFILING=y 1844CONFIG_PROFILING=y
1741CONFIG_OPROFILE=y 1845CONFIG_OPROFILE=y
1742# CONFIG_KPROBES is not set 1846# CONFIG_KPROBES is not set
1847# CONFIG_MARKERS is not set
1743 1848
1744# 1849#
1745# Kernel hacking 1850# Kernel hacking
1746# 1851#
1747# CONFIG_PRINTK_TIME is not set 1852# CONFIG_PRINTK_TIME is not set
1853CONFIG_ENABLE_WARN_DEPRECATED=y
1748CONFIG_ENABLE_MUST_CHECK=y 1854CONFIG_ENABLE_MUST_CHECK=y
1749CONFIG_MAGIC_SYSRQ=y 1855CONFIG_MAGIC_SYSRQ=y
1750# CONFIG_UNUSED_SYMBOLS is not set 1856# CONFIG_UNUSED_SYMBOLS is not set
@@ -1768,9 +1874,12 @@ CONFIG_DEBUG_BUGVERBOSE=y
1768# CONFIG_DEBUG_INFO is not set 1874# CONFIG_DEBUG_INFO is not set
1769# CONFIG_DEBUG_VM is not set 1875# CONFIG_DEBUG_VM is not set
1770# CONFIG_DEBUG_LIST is not set 1876# CONFIG_DEBUG_LIST is not set
1877# CONFIG_DEBUG_SG is not set
1771CONFIG_FORCED_INLINING=y 1878CONFIG_FORCED_INLINING=y
1879# CONFIG_BOOT_PRINTK_DELAY is not set
1772# CONFIG_RCU_TORTURE_TEST is not set 1880# CONFIG_RCU_TORTURE_TEST is not set
1773# CONFIG_FAULT_INJECTION is not set 1881# CONFIG_FAULT_INJECTION is not set
1882# CONFIG_SAMPLES is not set
1774CONFIG_DEBUG_STACKOVERFLOW=y 1883CONFIG_DEBUG_STACKOVERFLOW=y
1775CONFIG_DEBUG_STACK_USAGE=y 1884CONFIG_DEBUG_STACK_USAGE=y
1776# CONFIG_DEBUG_PAGEALLOC is not set 1885# CONFIG_DEBUG_PAGEALLOC is not set
@@ -1780,6 +1889,7 @@ CONFIG_XMON=y
1780# CONFIG_XMON_DEFAULT is not set 1889# CONFIG_XMON_DEFAULT is not set
1781CONFIG_XMON_DISASSEMBLY=y 1890CONFIG_XMON_DISASSEMBLY=y
1782CONFIG_IRQSTACKS=y 1891CONFIG_IRQSTACKS=y
1892# CONFIG_VIRQ_DEBUG is not set
1783CONFIG_BOOTX_TEXT=y 1893CONFIG_BOOTX_TEXT=y
1784# CONFIG_PPC_EARLY_DEBUG is not set 1894# CONFIG_PPC_EARLY_DEBUG is not set
1785 1895
@@ -1788,6 +1898,7 @@ CONFIG_BOOTX_TEXT=y
1788# 1898#
1789# CONFIG_KEYS is not set 1899# CONFIG_KEYS is not set
1790# CONFIG_SECURITY is not set 1900# CONFIG_SECURITY is not set
1901# CONFIG_SECURITY_FILE_CAPABILITIES is not set
1791CONFIG_XOR_BLOCKS=y 1902CONFIG_XOR_BLOCKS=y
1792CONFIG_ASYNC_CORE=y 1903CONFIG_ASYNC_CORE=y
1793CONFIG_ASYNC_MEMCPY=y 1904CONFIG_ASYNC_MEMCPY=y
@@ -1812,6 +1923,7 @@ CONFIG_CRYPTO_ECB=m
1812CONFIG_CRYPTO_CBC=y 1923CONFIG_CRYPTO_CBC=y
1813CONFIG_CRYPTO_PCBC=m 1924CONFIG_CRYPTO_PCBC=m
1814# CONFIG_CRYPTO_LRW is not set 1925# CONFIG_CRYPTO_LRW is not set
1926# CONFIG_CRYPTO_XTS is not set
1815# CONFIG_CRYPTO_CRYPTD is not set 1927# CONFIG_CRYPTO_CRYPTD is not set
1816CONFIG_CRYPTO_DES=y 1928CONFIG_CRYPTO_DES=y
1817# CONFIG_CRYPTO_FCRYPT is not set 1929# CONFIG_CRYPTO_FCRYPT is not set
@@ -1826,9 +1938,12 @@ CONFIG_CRYPTO_TEA=m
1826CONFIG_CRYPTO_ARC4=m 1938CONFIG_CRYPTO_ARC4=m
1827CONFIG_CRYPTO_KHAZAD=m 1939CONFIG_CRYPTO_KHAZAD=m
1828CONFIG_CRYPTO_ANUBIS=m 1940CONFIG_CRYPTO_ANUBIS=m
1941# CONFIG_CRYPTO_SEED is not set
1829CONFIG_CRYPTO_DEFLATE=m 1942CONFIG_CRYPTO_DEFLATE=m
1830CONFIG_CRYPTO_MICHAEL_MIC=m 1943CONFIG_CRYPTO_MICHAEL_MIC=m
1831CONFIG_CRYPTO_CRC32C=m 1944CONFIG_CRYPTO_CRC32C=m
1832# CONFIG_CRYPTO_CAMELLIA is not set 1945# CONFIG_CRYPTO_CAMELLIA is not set
1833CONFIG_CRYPTO_TEST=m 1946CONFIG_CRYPTO_TEST=m
1947# CONFIG_CRYPTO_AUTHENC is not set
1834# CONFIG_CRYPTO_HW is not set 1948# CONFIG_CRYPTO_HW is not set
1949# CONFIG_PPC_CLOCK is not set
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index d3fb7d0c6c1c..9ed351f3c966 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -1104,6 +1104,16 @@ static struct cpu_spec __initdata cpu_specs[] = {
1104 { 1104 {
1105 .pvr_mask = 0xf0000fff, 1105 .pvr_mask = 0xf0000fff,
1106 .pvr_value = 0x40000850, 1106 .pvr_value = 0x40000850,
1107 .cpu_name = "440GR Rev. A",
1108 .cpu_features = CPU_FTRS_44X,
1109 .cpu_user_features = COMMON_USER_BOOKE,
1110 .icache_bsize = 32,
1111 .dcache_bsize = 32,
1112 .platform = "ppc440",
1113 },
1114 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1115 .pvr_mask = 0xf0000fff,
1116 .pvr_value = 0x40000858,
1107 .cpu_name = "440EP Rev. A", 1117 .cpu_name = "440EP Rev. A",
1108 .cpu_features = CPU_FTRS_44X, 1118 .cpu_features = CPU_FTRS_44X,
1109 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, 1119 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
@@ -1115,28 +1125,27 @@ static struct cpu_spec __initdata cpu_specs[] = {
1115 { 1125 {
1116 .pvr_mask = 0xf0000fff, 1126 .pvr_mask = 0xf0000fff,
1117 .pvr_value = 0x400008d3, 1127 .pvr_value = 0x400008d3,
1118 .cpu_name = "440EP Rev. B", 1128 .cpu_name = "440GR Rev. B",
1119 .cpu_features = CPU_FTRS_44X, 1129 .cpu_features = CPU_FTRS_44X,
1120 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, 1130 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1121 .icache_bsize = 32, 1131 .icache_bsize = 32,
1122 .dcache_bsize = 32, 1132 .dcache_bsize = 32,
1123 .cpu_setup = __setup_cpu_440ep,
1124 .platform = "ppc440", 1133 .platform = "ppc440",
1125 }, 1134 },
1126 { /* 440EPX */ 1135 { /* Use logical PVR for 440EP (logical pvr = pvr | 0x8) */
1127 .pvr_mask = 0xf0000ffb, 1136 .pvr_mask = 0xf0000fff,
1128 .pvr_value = 0x200008D0, 1137 .pvr_value = 0x400008db,
1129 .cpu_name = "440EPX", 1138 .cpu_name = "440EP Rev. B",
1130 .cpu_features = CPU_FTRS_44X, 1139 .cpu_features = CPU_FTRS_44X,
1131 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU, 1140 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1132 .icache_bsize = 32, 1141 .icache_bsize = 32,
1133 .dcache_bsize = 32, 1142 .dcache_bsize = 32,
1134 .cpu_setup = __setup_cpu_440epx, 1143 .cpu_setup = __setup_cpu_440ep,
1135 .platform = "ppc440", 1144 .platform = "ppc440",
1136 }, 1145 },
1137 { /* 440GRX */ 1146 { /* 440GRX */
1138 .pvr_mask = 0xf0000ffb, 1147 .pvr_mask = 0xf0000ffb,
1139 .pvr_value = 0x200008D8, 1148 .pvr_value = 0x200008D0,
1140 .cpu_name = "440GRX", 1149 .cpu_name = "440GRX",
1141 .cpu_features = CPU_FTRS_44X, 1150 .cpu_features = CPU_FTRS_44X,
1142 .cpu_user_features = COMMON_USER_BOOKE, 1151 .cpu_user_features = COMMON_USER_BOOKE,
@@ -1145,6 +1154,17 @@ static struct cpu_spec __initdata cpu_specs[] = {
1145 .cpu_setup = __setup_cpu_440grx, 1154 .cpu_setup = __setup_cpu_440grx,
1146 .platform = "ppc440", 1155 .platform = "ppc440",
1147 }, 1156 },
1157 { /* Use logical PVR for 440EPx (logical pvr = pvr | 0x8) */
1158 .pvr_mask = 0xf0000ffb,
1159 .pvr_value = 0x200008D8,
1160 .cpu_name = "440EPX",
1161 .cpu_features = CPU_FTRS_44X,
1162 .cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
1163 .icache_bsize = 32,
1164 .dcache_bsize = 32,
1165 .cpu_setup = __setup_cpu_440epx,
1166 .platform = "ppc440",
1167 },
1148 { /* 440GP Rev. B */ 1168 { /* 440GP Rev. B */
1149 .pvr_mask = 0xf0000fff, 1169 .pvr_mask = 0xf0000fff,
1150 .pvr_value = 0x40000440, 1170 .pvr_value = 0x40000440,
diff --git a/arch/powerpc/kernel/entry_32.S b/arch/powerpc/kernel/entry_32.S
index 21d889e63e87..a7572cf464bd 100644
--- a/arch/powerpc/kernel/entry_32.S
+++ b/arch/powerpc/kernel/entry_32.S
@@ -244,6 +244,13 @@ syscall_exit_cont:
244 andis. r10,r0,DBCR0_IC@h 244 andis. r10,r0,DBCR0_IC@h
245 bnel- load_dbcr0 245 bnel- load_dbcr0
246#endif 246#endif
247#ifdef CONFIG_44x
248 lis r4,icache_44x_need_flush@ha
249 lwz r5,icache_44x_need_flush@l(r4)
250 cmplwi cr0,r5,0
251 bne- 2f
2521:
253#endif /* CONFIG_44x */
247 stwcx. r0,0,r1 /* to clear the reservation */ 254 stwcx. r0,0,r1 /* to clear the reservation */
248 lwz r4,_LINK(r1) 255 lwz r4,_LINK(r1)
249 lwz r5,_CCR(r1) 256 lwz r5,_CCR(r1)
@@ -258,6 +265,12 @@ syscall_exit_cont:
258 mtspr SPRN_SRR1,r8 265 mtspr SPRN_SRR1,r8
259 SYNC 266 SYNC
260 RFI 267 RFI
268#ifdef CONFIG_44x
2692: li r7,0
270 iccci r0,r0
271 stw r7,icache_44x_need_flush@l(r4)
272 b 1b
273#endif /* CONFIG_44x */
261 274
26266: li r3,-ENOSYS 27566: li r3,-ENOSYS
263 b ret_from_syscall 276 b ret_from_syscall
@@ -683,6 +696,16 @@ resume_kernel:
683 696
684 /* interrupts are hard-disabled at this point */ 697 /* interrupts are hard-disabled at this point */
685restore: 698restore:
699#ifdef CONFIG_44x
700 lis r4,icache_44x_need_flush@ha
701 lwz r5,icache_44x_need_flush@l(r4)
702 cmplwi cr0,r5,0
703 beq+ 1f
704 li r6,0
705 iccci r0,r0
706 stw r6,icache_44x_need_flush@l(r4)
7071:
708#endif /* CONFIG_44x */
686 lwz r0,GPR0(r1) 709 lwz r0,GPR0(r1)
687 lwz r2,GPR2(r1) 710 lwz r2,GPR2(r1)
688 REST_4GPRS(3, r1) 711 REST_4GPRS(3, r1)
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index 97c5857faf00..c34986835a4e 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -904,7 +904,7 @@ handle_page_fault:
904 */ 904 */
90512: bl .save_nvgprs 90512: bl .save_nvgprs
906 addi r3,r1,STACK_FRAME_OVERHEAD 906 addi r3,r1,STACK_FRAME_OVERHEAD
907 lwz r4,_DAR(r1) 907 ld r4,_DAR(r1)
908 bl .low_hash_fault 908 bl .low_hash_fault
909 b .ret_from_except 909 b .ret_from_except
910 910
diff --git a/arch/powerpc/kernel/idle.c b/arch/powerpc/kernel/idle.c
index abd2957fe537..c3cf0e8f3ac1 100644
--- a/arch/powerpc/kernel/idle.c
+++ b/arch/powerpc/kernel/idle.c
@@ -122,7 +122,7 @@ static ctl_table powersave_nap_sysctl_root[] = {
122 { 122 {
123 .ctl_name = CTL_KERN, 123 .ctl_name = CTL_KERN,
124 .procname = "kernel", 124 .procname = "kernel",
125 .mode = 0755, 125 .mode = 0555,
126 .child = powersave_nap_ctl_table, 126 .child = powersave_nap_ctl_table,
127 }, 127 },
128 {} 128 {}
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S
index 8533de50347d..8b642ab26d37 100644
--- a/arch/powerpc/kernel/misc_32.S
+++ b/arch/powerpc/kernel/misc_32.S
@@ -288,7 +288,16 @@ _GLOBAL(_tlbia)
288 */ 288 */
289_GLOBAL(_tlbie) 289_GLOBAL(_tlbie)
290#if defined(CONFIG_40x) 290#if defined(CONFIG_40x)
291 /* We run the search with interrupts disabled because we have to change
292 * the PID and I don't want to preempt when that happens.
293 */
294 mfmsr r5
295 mfspr r6,SPRN_PID
296 wrteei 0
297 mtspr SPRN_PID,r4
291 tlbsx. r3, 0, r3 298 tlbsx. r3, 0, r3
299 mtspr SPRN_PID,r6
300 wrtee r5
292 bne 10f 301 bne 10f
293 sync 302 sync
294 /* There are only 64 TLB entries, so r3 < 64, which means bit 25 is clear. 303 /* There are only 64 TLB entries, so r3 < 64, which means bit 25 is clear.
@@ -297,23 +306,23 @@ _GLOBAL(_tlbie)
297 tlbwe r3, r3, TLB_TAG 306 tlbwe r3, r3, TLB_TAG
298 isync 307 isync
29910: 30810:
309
300#elif defined(CONFIG_44x) 310#elif defined(CONFIG_44x)
301 mfspr r4,SPRN_MMUCR 311 mfspr r5,SPRN_MMUCR
302 mfspr r5,SPRN_PID /* Get PID */ 312 rlwimi r5,r4,0,24,31 /* Set TID */
303 rlwimi r4,r5,0,24,31 /* Set TID */
304 313
305 /* We have to run the search with interrupts disabled, even critical 314 /* We have to run the search with interrupts disabled, even critical
306 * and debug interrupts (in fact the only critical exceptions we have 315 * and debug interrupts (in fact the only critical exceptions we have
307 * are debug and machine check). Otherwise an interrupt which causes 316 * are debug and machine check). Otherwise an interrupt which causes
308 * a TLB miss can clobber the MMUCR between the mtspr and the tlbsx. */ 317 * a TLB miss can clobber the MMUCR between the mtspr and the tlbsx. */
309 mfmsr r5 318 mfmsr r4
310 lis r6,(MSR_EE|MSR_CE|MSR_ME|MSR_DE)@ha 319 lis r6,(MSR_EE|MSR_CE|MSR_ME|MSR_DE)@ha
311 addi r6,r6,(MSR_EE|MSR_CE|MSR_ME|MSR_DE)@l 320 addi r6,r6,(MSR_EE|MSR_CE|MSR_ME|MSR_DE)@l
312 andc r6,r5,r6 321 andc r6,r4,r6
313 mtmsr r6 322 mtmsr r6
314 mtspr SPRN_MMUCR,r4 323 mtspr SPRN_MMUCR,r5
315 tlbsx. r3, 0, r3 324 tlbsx. r3, 0, r3
316 mtmsr r5 325 mtmsr r4
317 bne 10f 326 bne 10f
318 sync 327 sync
319 /* There are only 64 TLB entries, so r3 < 64, 328 /* There are only 64 TLB entries, so r3 < 64,
@@ -534,12 +543,21 @@ END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
534 addi r3,r3,L1_CACHE_BYTES 543 addi r3,r3,L1_CACHE_BYTES
535 bdnz 0b 544 bdnz 0b
536 sync 545 sync
546#ifndef CONFIG_44x
547 /* We don't flush the icache on 44x. Those have a virtual icache
548 * and we don't have access to the virtual address here (it's
549 * not the page vaddr but where it's mapped in user space). The
550 * flushing of the icache on these is handled elsewhere, when
551 * a change in the address space occurs, before returning to
552 * user space
553 */
537 mtctr r4 554 mtctr r4
5381: icbi 0,r6 5551: icbi 0,r6
539 addi r6,r6,L1_CACHE_BYTES 556 addi r6,r6,L1_CACHE_BYTES
540 bdnz 1b 557 bdnz 1b
541 sync 558 sync
542 isync 559 isync
560#endif /* CONFIG_44x */
543 blr 561 blr
544 562
545/* 563/*
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 9f329a8928ea..acc0d247d3c3 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -697,6 +697,18 @@ static int __init early_init_dt_scan_cpus(unsigned long node,
697 prop = of_get_flat_dt_prop(node, "cpu-version", NULL); 697 prop = of_get_flat_dt_prop(node, "cpu-version", NULL);
698 if (prop && (*prop & 0xff000000) == 0x0f000000) 698 if (prop && (*prop & 0xff000000) == 0x0f000000)
699 identify_cpu(0, *prop); 699 identify_cpu(0, *prop);
700#if defined(CONFIG_44x) && defined(CONFIG_PPC_FPU)
701 /*
702 * Since 440GR(x)/440EP(x) processors have the same pvr,
703 * we check the node path and set bit 28 in the cur_cpu_spec
704 * pvr for EP(x) processor version. This bit is always 0 in
705 * the "real" pvr. Then we call identify_cpu again with
706 * the new logical pvr to enable FPU support.
707 */
708 if (strstr(uname, "440EP")) {
709 identify_cpu(0, cur_cpu_spec->pvr_value | 0x8);
710 }
711#endif
700 } 712 }
701 713
702 check_cpu_feature_properties(node); 714 check_cpu_feature_properties(node);
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 1db10f70ae69..1add6efdb315 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -1244,7 +1244,7 @@ static void __init prom_initialize_tce_table(void)
1244 local_alloc_bottom = base; 1244 local_alloc_bottom = base;
1245 1245
1246 /* It seems OF doesn't null-terminate the path :-( */ 1246 /* It seems OF doesn't null-terminate the path :-( */
1247 memset(path, 0, sizeof(path)); 1247 memset(path, 0, PROM_SCRATCH_SIZE);
1248 /* Call OF to setup the TCE hardware */ 1248 /* Call OF to setup the TCE hardware */
1249 if (call_prom("package-to-path", 3, 1, node, 1249 if (call_prom("package-to-path", 3, 1, node,
1250 path, PROM_SCRATCH_SIZE-1) == PROM_ERROR) { 1250 path, PROM_SCRATCH_SIZE-1) == PROM_ERROR) {
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index ede77dbbd4df..3b1529c103ef 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -291,23 +291,16 @@ static void __init initialize_cache_info(void)
291 if ( num_cpus == 1 ) { 291 if ( num_cpus == 1 ) {
292 const u32 *sizep, *lsizep; 292 const u32 *sizep, *lsizep;
293 u32 size, lsize; 293 u32 size, lsize;
294 const char *dc, *ic;
295
296 /* Then read cache informations */
297 if (machine_is(powermac)) {
298 dc = "d-cache-block-size";
299 ic = "i-cache-block-size";
300 } else {
301 dc = "d-cache-line-size";
302 ic = "i-cache-line-size";
303 }
304 294
305 size = 0; 295 size = 0;
306 lsize = cur_cpu_spec->dcache_bsize; 296 lsize = cur_cpu_spec->dcache_bsize;
307 sizep = of_get_property(np, "d-cache-size", NULL); 297 sizep = of_get_property(np, "d-cache-size", NULL);
308 if (sizep != NULL) 298 if (sizep != NULL)
309 size = *sizep; 299 size = *sizep;
310 lsizep = of_get_property(np, dc, NULL); 300 lsizep = of_get_property(np, "d-cache-block-size", NULL);
301 /* fallback if block size missing */
302 if (lsizep == NULL)
303 lsizep = of_get_property(np, "d-cache-line-size", NULL);
311 if (lsizep != NULL) 304 if (lsizep != NULL)
312 lsize = *lsizep; 305 lsize = *lsizep;
313 if (sizep == 0 || lsizep == 0) 306 if (sizep == 0 || lsizep == 0)
@@ -324,7 +317,9 @@ static void __init initialize_cache_info(void)
324 sizep = of_get_property(np, "i-cache-size", NULL); 317 sizep = of_get_property(np, "i-cache-size", NULL);
325 if (sizep != NULL) 318 if (sizep != NULL)
326 size = *sizep; 319 size = *sizep;
327 lsizep = of_get_property(np, ic, NULL); 320 lsizep = of_get_property(np, "i-cache-block-size", NULL);
321 if (lsizep == NULL)
322 lsizep = of_get_property(np, "i-cache-line-size", NULL);
328 if (lsizep != NULL) 323 if (lsizep != NULL)
329 lsize = *lsizep; 324 lsize = *lsizep;
330 if (sizep == 0 || lsizep == 0) 325 if (sizep == 0 || lsizep == 0)
diff --git a/arch/powerpc/kernel/swsusp_32.S b/arch/powerpc/kernel/swsusp_32.S
index 69e8f86aa4f8..77fc76607ab2 100644
--- a/arch/powerpc/kernel/swsusp_32.S
+++ b/arch/powerpc/kernel/swsusp_32.S
@@ -133,10 +133,12 @@ _GLOBAL(swsusp_arch_suspend)
133/* Resume code */ 133/* Resume code */
134_GLOBAL(swsusp_arch_resume) 134_GLOBAL(swsusp_arch_resume)
135 135
136#ifdef CONFIG_ALTIVEC
136 /* Stop pending alitvec streams and memory accesses */ 137 /* Stop pending alitvec streams and memory accesses */
137BEGIN_FTR_SECTION 138BEGIN_FTR_SECTION
138 DSSALL 139 DSSALL
139END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) 140END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
141#endif
140 sync 142 sync
141 143
142 /* Disable MSR:DR to make sure we don't take a TLB or 144 /* Disable MSR:DR to make sure we don't take a TLB or
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 9eb3284deac4..99ebcd3884d2 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -586,7 +586,7 @@ void timer_interrupt(struct pt_regs * regs)
586 /* not time for this event yet */ 586 /* not time for this event yet */
587 now = per_cpu(decrementer_next_tb, cpu) - now; 587 now = per_cpu(decrementer_next_tb, cpu) - now;
588 if (now <= DECREMENTER_MAX) 588 if (now <= DECREMENTER_MAX)
589 set_dec((unsigned int)now - 1); 589 set_dec((int)now);
590 return; 590 return;
591 } 591 }
592 old_regs = set_irq_regs(regs); 592 old_regs = set_irq_regs(regs);
@@ -611,8 +611,6 @@ void timer_interrupt(struct pt_regs * regs)
611 611
612 if (evt->event_handler) 612 if (evt->event_handler)
613 evt->event_handler(evt); 613 evt->event_handler(evt);
614 else
615 evt->set_next_event(DECREMENTER_MAX, evt);
616 614
617#ifdef CONFIG_PPC_ISERIES 615#ifdef CONFIG_PPC_ISERIES
618 if (firmware_has_feature(FW_FEATURE_ISERIES) && hvlpevent_is_pending()) 616 if (firmware_has_feature(FW_FEATURE_ISERIES) && hvlpevent_is_pending())
@@ -836,9 +834,6 @@ static int decrementer_set_next_event(unsigned long evt,
836 struct clock_event_device *dev) 834 struct clock_event_device *dev)
837{ 835{
838 __get_cpu_var(decrementer_next_tb) = get_tb_or_rtc() + evt; 836 __get_cpu_var(decrementer_next_tb) = get_tb_or_rtc() + evt;
839 /* The decrementer interrupts on the 0 -> -1 transition */
840 if (evt)
841 --evt;
842 set_dec(evt); 837 set_dec(evt);
843 return 0; 838 return 0;
844} 839}
@@ -871,7 +866,8 @@ void init_decrementer_clockevent(void)
871 decrementer_clockevent.shift); 866 decrementer_clockevent.shift);
872 decrementer_clockevent.max_delta_ns = 867 decrementer_clockevent.max_delta_ns =
873 clockevent_delta2ns(DECREMENTER_MAX, &decrementer_clockevent); 868 clockevent_delta2ns(DECREMENTER_MAX, &decrementer_clockevent);
874 decrementer_clockevent.min_delta_ns = 1000; 869 decrementer_clockevent.min_delta_ns =
870 clockevent_delta2ns(2, &decrementer_clockevent);
875 871
876 register_decrementer_clockevent(cpu); 872 register_decrementer_clockevent(cpu);
877} 873}
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 823a8cbd60b5..f66fa5d966b0 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -37,11 +37,10 @@ SECTIONS
37 ALIGN_FUNCTION(); 37 ALIGN_FUNCTION();
38 *(.text.head) 38 *(.text.head)
39 _text = .; 39 _text = .;
40 TEXT_TEXT 40 *(.text .fixup .text.init.refok .exit.text.refok)
41 SCHED_TEXT 41 SCHED_TEXT
42 LOCK_TEXT 42 LOCK_TEXT
43 KPROBES_TEXT 43 KPROBES_TEXT
44 *(.fixup)
45 44
46#ifdef CONFIG_PPC32 45#ifdef CONFIG_PPC32
47 *(.got1) 46 *(.got1)
diff --git a/arch/powerpc/mm/40x_mmu.c b/arch/powerpc/mm/40x_mmu.c
index e067df836be2..3899ea97fbdf 100644
--- a/arch/powerpc/mm/40x_mmu.c
+++ b/arch/powerpc/mm/40x_mmu.c
@@ -98,13 +98,12 @@ unsigned long __init mmu_mapin_ram(void)
98 98
99 v = KERNELBASE; 99 v = KERNELBASE;
100 p = PPC_MEMSTART; 100 p = PPC_MEMSTART;
101 s = 0; 101 s = total_lowmem;
102 102
103 if (__map_without_ltlbs) { 103 if (__map_without_ltlbs)
104 return s; 104 return 0;
105 }
106 105
107 while (s <= (total_lowmem - LARGE_PAGE_SIZE_16M)) { 106 while (s >= LARGE_PAGE_SIZE_16M) {
108 pmd_t *pmdp; 107 pmd_t *pmdp;
109 unsigned long val = p | _PMD_SIZE_16M | _PAGE_HWEXEC | _PAGE_HWWRITE; 108 unsigned long val = p | _PMD_SIZE_16M | _PAGE_HWEXEC | _PAGE_HWWRITE;
110 109
@@ -116,10 +115,10 @@ unsigned long __init mmu_mapin_ram(void)
116 115
117 v += LARGE_PAGE_SIZE_16M; 116 v += LARGE_PAGE_SIZE_16M;
118 p += LARGE_PAGE_SIZE_16M; 117 p += LARGE_PAGE_SIZE_16M;
119 s += LARGE_PAGE_SIZE_16M; 118 s -= LARGE_PAGE_SIZE_16M;
120 } 119 }
121 120
122 while (s <= (total_lowmem - LARGE_PAGE_SIZE_4M)) { 121 while (s >= LARGE_PAGE_SIZE_4M) {
123 pmd_t *pmdp; 122 pmd_t *pmdp;
124 unsigned long val = p | _PMD_SIZE_4M | _PAGE_HWEXEC | _PAGE_HWWRITE; 123 unsigned long val = p | _PMD_SIZE_4M | _PAGE_HWEXEC | _PAGE_HWWRITE;
125 124
@@ -128,8 +127,8 @@ unsigned long __init mmu_mapin_ram(void)
128 127
129 v += LARGE_PAGE_SIZE_4M; 128 v += LARGE_PAGE_SIZE_4M;
130 p += LARGE_PAGE_SIZE_4M; 129 p += LARGE_PAGE_SIZE_4M;
131 s += LARGE_PAGE_SIZE_4M; 130 s -= LARGE_PAGE_SIZE_4M;
132 } 131 }
133 132
134 return s; 133 return total_lowmem - s;
135} 134}
diff --git a/arch/powerpc/mm/44x_mmu.c b/arch/powerpc/mm/44x_mmu.c
index c3df50476539..04dc08798d3d 100644
--- a/arch/powerpc/mm/44x_mmu.c
+++ b/arch/powerpc/mm/44x_mmu.c
@@ -35,6 +35,7 @@
35 */ 35 */
36unsigned int tlb_44x_index; /* = 0 */ 36unsigned int tlb_44x_index; /* = 0 */
37unsigned int tlb_44x_hwater = PPC44x_TLB_SIZE - 1 - PPC44x_EARLY_TLBS; 37unsigned int tlb_44x_hwater = PPC44x_TLB_SIZE - 1 - PPC44x_EARLY_TLBS;
38int icache_44x_need_flush;
38 39
39/* 40/*
40 * "Pins" a 256MB TLB entry in AS0 for kernel lowmem 41 * "Pins" a 256MB TLB entry in AS0 for kernel lowmem
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
index a18fda361cc0..8135da06e0a4 100644
--- a/arch/powerpc/mm/fault.c
+++ b/arch/powerpc/mm/fault.c
@@ -309,7 +309,7 @@ good_area:
309 set_bit(PG_arch_1, &page->flags); 309 set_bit(PG_arch_1, &page->flags);
310 } 310 }
311 pte_update(ptep, 0, _PAGE_HWEXEC); 311 pte_update(ptep, 0, _PAGE_HWEXEC);
312 _tlbie(address); 312 _tlbie(address, mm->context.id);
313 pte_unmap_unlock(ptep, ptl); 313 pte_unmap_unlock(ptep, ptl);
314 up_read(&mm->mmap_sem); 314 up_read(&mm->mmap_sem);
315 return 0; 315 return 0;
diff --git a/arch/powerpc/mm/hash_low_64.S b/arch/powerpc/mm/hash_low_64.S
index ad253b959030..e935edd6b72b 100644
--- a/arch/powerpc/mm/hash_low_64.S
+++ b/arch/powerpc/mm/hash_low_64.S
@@ -331,7 +331,7 @@ htab_pte_insert_failure:
331 *****************************************************************************/ 331 *****************************************************************************/
332 332
333/* _hash_page_4K(unsigned long ea, unsigned long access, unsigned long vsid, 333/* _hash_page_4K(unsigned long ea, unsigned long access, unsigned long vsid,
334 * pte_t *ptep, unsigned long trap, int local) 334 * pte_t *ptep, unsigned long trap, int local, int ssize)
335 */ 335 */
336 336
337/* 337/*
@@ -557,7 +557,8 @@ htab_inval_old_hpte:
557 mr r4,r31 /* PTE.pte */ 557 mr r4,r31 /* PTE.pte */
558 li r5,0 /* PTE.hidx */ 558 li r5,0 /* PTE.hidx */
559 li r6,MMU_PAGE_64K /* psize */ 559 li r6,MMU_PAGE_64K /* psize */
560 ld r7,STK_PARM(r8)(r1) /* local */ 560 ld r7,STK_PARM(r9)(r1) /* ssize */
561 ld r8,STK_PARM(r8)(r1) /* local */
561 bl .flush_hash_page 562 bl .flush_hash_page
562 b htab_insert_pte 563 b htab_insert_pte
563 564
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index c78dc912411f..f09730bf3a33 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -51,6 +51,7 @@
51#include <asm/cputable.h> 51#include <asm/cputable.h>
52#include <asm/sections.h> 52#include <asm/sections.h>
53#include <asm/spu.h> 53#include <asm/spu.h>
54#include <asm/udbg.h>
54 55
55#ifdef DEBUG 56#ifdef DEBUG
56#define DBG(fmt...) udbg_printf(fmt) 57#define DBG(fmt...) udbg_printf(fmt)
@@ -791,8 +792,7 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
791 } 792 }
792 if (user_region) { 793 if (user_region) {
793 if (psize != get_paca()->context.user_psize) { 794 if (psize != get_paca()->context.user_psize) {
794 get_paca()->context.user_psize = 795 get_paca()->context = mm->context;
795 mm->context.user_psize;
796 slb_flush_and_rebolt(); 796 slb_flush_and_rebolt();
797 } 797 }
798 } else if (get_paca()->vmalloc_sllp != 798 } else if (get_paca()->vmalloc_sllp !=
@@ -885,6 +885,9 @@ void hash_preload(struct mm_struct *mm, unsigned long ea,
885 local_irq_restore(flags); 885 local_irq_restore(flags);
886} 886}
887 887
888/* WARNING: This is called from hash_low_64.S, if you change this prototype,
889 * do not forget to update the assembly call site !
890 */
888void flush_hash_page(unsigned long va, real_pte_t pte, int psize, int ssize, 891void flush_hash_page(unsigned long va, real_pte_t pte, int psize, int ssize,
889 int local) 892 int local)
890{ 893{
diff --git a/arch/powerpc/mm/mmu_decl.h b/arch/powerpc/mm/mmu_decl.h
index c94a64fd3c01..eb3a732e91db 100644
--- a/arch/powerpc/mm/mmu_decl.h
+++ b/arch/powerpc/mm/mmu_decl.h
@@ -61,12 +61,12 @@ extern unsigned long total_lowmem;
61#define mmu_mapin_ram() (0UL) 61#define mmu_mapin_ram() (0UL)
62 62
63#elif defined(CONFIG_4xx) 63#elif defined(CONFIG_4xx)
64#define flush_HPTE(X, va, pg) _tlbie(va) 64#define flush_HPTE(pid, va, pg) _tlbie(va, pid)
65extern void MMU_init_hw(void); 65extern void MMU_init_hw(void);
66extern unsigned long mmu_mapin_ram(void); 66extern unsigned long mmu_mapin_ram(void);
67 67
68#elif defined(CONFIG_FSL_BOOKE) 68#elif defined(CONFIG_FSL_BOOKE)
69#define flush_HPTE(X, va, pg) _tlbie(va) 69#define flush_HPTE(pid, va, pg) _tlbie(va, pid)
70extern void MMU_init_hw(void); 70extern void MMU_init_hw(void);
71extern unsigned long mmu_mapin_ram(void); 71extern unsigned long mmu_mapin_ram(void);
72extern void adjust_total_lowmem(void); 72extern void adjust_total_lowmem(void);
diff --git a/arch/powerpc/mm/slb.c b/arch/powerpc/mm/slb.c
index bbd2c512ee05..27922dff8b94 100644
--- a/arch/powerpc/mm/slb.c
+++ b/arch/powerpc/mm/slb.c
@@ -25,6 +25,7 @@
25#include <asm/smp.h> 25#include <asm/smp.h>
26#include <asm/firmware.h> 26#include <asm/firmware.h>
27#include <linux/compiler.h> 27#include <linux/compiler.h>
28#include <asm/udbg.h>
28 29
29#ifdef DEBUG 30#ifdef DEBUG
30#define DBG(fmt...) udbg_printf(fmt) 31#define DBG(fmt...) udbg_printf(fmt)
@@ -148,6 +149,35 @@ void slb_vmalloc_update(void)
148 slb_flush_and_rebolt(); 149 slb_flush_and_rebolt();
149} 150}
150 151
152/* Helper function to compare esids. There are four cases to handle.
153 * 1. The system is not 1T segment size capable. Use the GET_ESID compare.
154 * 2. The system is 1T capable, both addresses are < 1T, use the GET_ESID compare.
155 * 3. The system is 1T capable, only one of the two addresses is > 1T. This is not a match.
156 * 4. The system is 1T capable, both addresses are > 1T, use the GET_ESID_1T macro to compare.
157 */
158static inline int esids_match(unsigned long addr1, unsigned long addr2)
159{
160 int esid_1t_count;
161
162 /* System is not 1T segment size capable. */
163 if (!cpu_has_feature(CPU_FTR_1T_SEGMENT))
164 return (GET_ESID(addr1) == GET_ESID(addr2));
165
166 esid_1t_count = (((addr1 >> SID_SHIFT_1T) != 0) +
167 ((addr2 >> SID_SHIFT_1T) != 0));
168
169 /* both addresses are < 1T */
170 if (esid_1t_count == 0)
171 return (GET_ESID(addr1) == GET_ESID(addr2));
172
173 /* One address < 1T, the other > 1T. Not a match */
174 if (esid_1t_count == 1)
175 return 0;
176
177 /* Both addresses are > 1T. */
178 return (GET_ESID_1T(addr1) == GET_ESID_1T(addr2));
179}
180
151/* Flush all user entries from the segment table of the current processor. */ 181/* Flush all user entries from the segment table of the current processor. */
152void switch_slb(struct task_struct *tsk, struct mm_struct *mm) 182void switch_slb(struct task_struct *tsk, struct mm_struct *mm)
153{ 183{
@@ -193,15 +223,14 @@ void switch_slb(struct task_struct *tsk, struct mm_struct *mm)
193 return; 223 return;
194 slb_allocate(pc); 224 slb_allocate(pc);
195 225
196 if (GET_ESID(pc) == GET_ESID(stack)) 226 if (esids_match(pc,stack))
197 return; 227 return;
198 228
199 if (is_kernel_addr(stack)) 229 if (is_kernel_addr(stack))
200 return; 230 return;
201 slb_allocate(stack); 231 slb_allocate(stack);
202 232
203 if ((GET_ESID(pc) == GET_ESID(unmapped_base)) 233 if (esids_match(pc,unmapped_base) || esids_match(stack,unmapped_base))
204 || (GET_ESID(stack) == GET_ESID(unmapped_base)))
205 return; 234 return;
206 235
207 if (is_kernel_addr(unmapped_base)) 236 if (is_kernel_addr(unmapped_base))
diff --git a/arch/powerpc/platforms/cell/interrupt.c b/arch/powerpc/platforms/cell/interrupt.c
index 151fd8b82d63..04f74f9f9ab6 100644
--- a/arch/powerpc/platforms/cell/interrupt.c
+++ b/arch/powerpc/platforms/cell/interrupt.c
@@ -158,6 +158,18 @@ static unsigned int iic_get_irq(void)
158 return virq; 158 return virq;
159} 159}
160 160
161void iic_setup_cpu(void)
162{
163 out_be64(&__get_cpu_var(iic).regs->prio, 0xff);
164}
165
166u8 iic_get_target_id(int cpu)
167{
168 return per_cpu(iic, cpu).target_id;
169}
170
171EXPORT_SYMBOL_GPL(iic_get_target_id);
172
161#ifdef CONFIG_SMP 173#ifdef CONFIG_SMP
162 174
163/* Use the highest interrupt priorities for IPI */ 175/* Use the highest interrupt priorities for IPI */
@@ -166,29 +178,17 @@ static inline int iic_ipi_to_irq(int ipi)
166 return IIC_IRQ_TYPE_IPI + 0xf - ipi; 178 return IIC_IRQ_TYPE_IPI + 0xf - ipi;
167} 179}
168 180
169void iic_setup_cpu(void)
170{
171 out_be64(&__get_cpu_var(iic).regs->prio, 0xff);
172}
173
174void iic_cause_IPI(int cpu, int mesg) 181void iic_cause_IPI(int cpu, int mesg)
175{ 182{
176 out_be64(&per_cpu(iic, cpu).regs->generate, (0xf - mesg) << 4); 183 out_be64(&per_cpu(iic, cpu).regs->generate, (0xf - mesg) << 4);
177} 184}
178 185
179u8 iic_get_target_id(int cpu)
180{
181 return per_cpu(iic, cpu).target_id;
182}
183EXPORT_SYMBOL_GPL(iic_get_target_id);
184
185struct irq_host *iic_get_irq_host(int node) 186struct irq_host *iic_get_irq_host(int node)
186{ 187{
187 return iic_host; 188 return iic_host;
188} 189}
189EXPORT_SYMBOL_GPL(iic_get_irq_host); 190EXPORT_SYMBOL_GPL(iic_get_irq_host);
190 191
191
192static irqreturn_t iic_ipi_action(int irq, void *dev_id) 192static irqreturn_t iic_ipi_action(int irq, void *dev_id)
193{ 193{
194 int ipi = (int)(long)dev_id; 194 int ipi = (int)(long)dev_id;
diff --git a/arch/powerpc/platforms/cell/smp.c b/arch/powerpc/platforms/cell/smp.c
index 1c0acbad7425..e4438456c867 100644
--- a/arch/powerpc/platforms/cell/smp.c
+++ b/arch/powerpc/platforms/cell/smp.c
@@ -44,6 +44,7 @@
44#include <asm/rtas.h> 44#include <asm/rtas.h>
45 45
46#include "interrupt.h" 46#include "interrupt.h"
47#include <asm/udbg.h>
47 48
48#ifdef DEBUG 49#ifdef DEBUG
49#define DBG(fmt...) udbg_printf(fmt) 50#define DBG(fmt...) udbg_printf(fmt)
diff --git a/arch/powerpc/platforms/celleb/setup.c b/arch/powerpc/platforms/celleb/setup.c
index 1769d755eff3..ddfb35ae741f 100644
--- a/arch/powerpc/platforms/celleb/setup.c
+++ b/arch/powerpc/platforms/celleb/setup.c
@@ -49,6 +49,7 @@
49#include <asm/machdep.h> 49#include <asm/machdep.h>
50#include <asm/cputable.h> 50#include <asm/cputable.h>
51#include <asm/irq.h> 51#include <asm/irq.h>
52#include <asm/time.h>
52#include <asm/spu_priv1.h> 53#include <asm/spu_priv1.h>
53#include <asm/firmware.h> 54#include <asm/firmware.h>
54#include <asm/of_platform.h> 55#include <asm/of_platform.h>
diff --git a/arch/powerpc/platforms/iseries/irq.h b/arch/powerpc/platforms/iseries/irq.h
index 69f1b437fc7b..a1c236074034 100644
--- a/arch/powerpc/platforms/iseries/irq.h
+++ b/arch/powerpc/platforms/iseries/irq.h
@@ -1,9 +1,13 @@
1#ifndef _ISERIES_IRQ_H 1#ifndef _ISERIES_IRQ_H
2#define _ISERIES_IRQ_H 2#define _ISERIES_IRQ_H
3 3
4#ifdef CONFIG_PCI
4extern void iSeries_init_IRQ(void); 5extern void iSeries_init_IRQ(void);
5extern int iSeries_allocate_IRQ(HvBusNumber, HvSubBusNumber, u32); 6extern int iSeries_allocate_IRQ(HvBusNumber, HvSubBusNumber, u32);
6extern void iSeries_activate_IRQs(void); 7extern void iSeries_activate_IRQs(void);
8#else
9#define iSeries_init_IRQ NULL
10#endif
7extern unsigned int iSeries_get_irq(void); 11extern unsigned int iSeries_get_irq(void);
8 12
9#endif /* _ISERIES_IRQ_H */ 13#endif /* _ISERIES_IRQ_H */
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c
index 37ae07ee54a9..0877a8834110 100644
--- a/arch/powerpc/platforms/iseries/setup.c
+++ b/arch/powerpc/platforms/iseries/setup.c
@@ -617,10 +617,6 @@ static void iseries_dedicated_idle(void)
617 } 617 }
618} 618}
619 619
620#ifndef CONFIG_PCI
621void __init iSeries_init_IRQ(void) { }
622#endif
623
624static void __iomem *iseries_ioremap(phys_addr_t address, unsigned long size, 620static void __iomem *iseries_ioremap(phys_addr_t address, unsigned long size,
625 unsigned long flags) 621 unsigned long flags)
626{ 622{
diff --git a/arch/powerpc/platforms/iseries/vio.c b/arch/powerpc/platforms/iseries/vio.c
index d6435b03971f..be06cfd9fa3d 100644
--- a/arch/powerpc/platforms/iseries/vio.c
+++ b/arch/powerpc/platforms/iseries/vio.c
@@ -523,15 +523,16 @@ static void __init get_viotape_info(struct device_node *vio_root)
523static int __init iseries_vio_init(void) 523static int __init iseries_vio_init(void)
524{ 524{
525 struct device_node *vio_root; 525 struct device_node *vio_root;
526 int ret = -ENODEV;
526 527
527 if (!firmware_has_feature(FW_FEATURE_ISERIES)) 528 if (!firmware_has_feature(FW_FEATURE_ISERIES))
528 return -ENODEV; 529 goto out;
529 530
530 iommu_vio_init(); 531 iommu_vio_init();
531 532
532 vio_root = of_find_node_by_path("/vdevice"); 533 vio_root = of_find_node_by_path("/vdevice");
533 if (!vio_root) 534 if (!vio_root)
534 return -ENODEV; 535 goto out;
535 536
536 if (viopath_hostLp == HvLpIndexInvalid) { 537 if (viopath_hostLp == HvLpIndexInvalid) {
537 vio_set_hostlp(); 538 vio_set_hostlp();
@@ -544,10 +545,11 @@ static int __init iseries_vio_init(void)
544 get_viocd_info(vio_root); 545 get_viocd_info(vio_root);
545 get_viotape_info(vio_root); 546 get_viotape_info(vio_root);
546 547
547 return 0; 548 ret = 0;
548 549
549 put_node: 550 put_node:
550 of_node_put(vio_root); 551 of_node_put(vio_root);
551 return -ENODEV; 552 out:
553 return ret;
552} 554}
553arch_initcall(iseries_vio_init); 555arch_initcall(iseries_vio_init);
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c
index 22322b35a0ff..fb3d636e088b 100644
--- a/arch/powerpc/platforms/pseries/eeh.c
+++ b/arch/powerpc/platforms/pseries/eeh.c
@@ -186,6 +186,11 @@ static size_t gather_pci_data(struct pci_dn *pdn, char * buf, size_t len)
186 n += scnprintf(buf+n, len-n, "cmd/stat:%x\n", cfg); 186 n += scnprintf(buf+n, len-n, "cmd/stat:%x\n", cfg);
187 printk(KERN_WARNING "EEH: PCI cmd/status register: %08x\n", cfg); 187 printk(KERN_WARNING "EEH: PCI cmd/status register: %08x\n", cfg);
188 188
189 if (!dev) {
190 printk(KERN_WARNING "EEH: no PCI device for this of node\n");
191 return n;
192 }
193
189 /* Gather bridge-specific registers */ 194 /* Gather bridge-specific registers */
190 if (dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) { 195 if (dev->class >> 16 == PCI_BASE_CLASS_BRIDGE) {
191 rtas_read_config(pdn, PCI_SEC_STATUS, 2, &cfg); 196 rtas_read_config(pdn, PCI_SEC_STATUS, 2, &cfg);
@@ -198,7 +203,7 @@ static size_t gather_pci_data(struct pci_dn *pdn, char * buf, size_t len)
198 } 203 }
199 204
200 /* Dump out the PCI-X command and status regs */ 205 /* Dump out the PCI-X command and status regs */
201 cap = pci_find_capability(pdn->pcidev, PCI_CAP_ID_PCIX); 206 cap = pci_find_capability(dev, PCI_CAP_ID_PCIX);
202 if (cap) { 207 if (cap) {
203 rtas_read_config(pdn, cap, 4, &cfg); 208 rtas_read_config(pdn, cap, 4, &cfg);
204 n += scnprintf(buf+n, len-n, "pcix-cmd:%x\n", cfg); 209 n += scnprintf(buf+n, len-n, "pcix-cmd:%x\n", cfg);
@@ -210,7 +215,7 @@ static size_t gather_pci_data(struct pci_dn *pdn, char * buf, size_t len)
210 } 215 }
211 216
212 /* If PCI-E capable, dump PCI-E cap 10, and the AER */ 217 /* If PCI-E capable, dump PCI-E cap 10, and the AER */
213 cap = pci_find_capability(pdn->pcidev, PCI_CAP_ID_EXP); 218 cap = pci_find_capability(dev, PCI_CAP_ID_EXP);
214 if (cap) { 219 if (cap) {
215 n += scnprintf(buf+n, len-n, "pci-e cap10:\n"); 220 n += scnprintf(buf+n, len-n, "pci-e cap10:\n");
216 printk(KERN_WARNING 221 printk(KERN_WARNING
@@ -222,7 +227,7 @@ static size_t gather_pci_data(struct pci_dn *pdn, char * buf, size_t len)
222 printk(KERN_WARNING "EEH: PCI-E %02x: %08x\n", i, cfg); 227 printk(KERN_WARNING "EEH: PCI-E %02x: %08x\n", i, cfg);
223 } 228 }
224 229
225 cap = pci_find_ext_capability(pdn->pcidev, PCI_EXT_CAP_ID_ERR); 230 cap = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR);
226 if (cap) { 231 if (cap) {
227 n += scnprintf(buf+n, len-n, "pci-e AER:\n"); 232 n += scnprintf(buf+n, len-n, "pci-e AER:\n");
228 printk(KERN_WARNING 233 printk(KERN_WARNING
@@ -318,7 +323,7 @@ eeh_wait_for_slot_status(struct pci_dn *pdn, int max_wait_msecs)
318 323
319 if (rets[2] == 0) return -1; /* permanently unavailable */ 324 if (rets[2] == 0) return -1; /* permanently unavailable */
320 325
321 if (max_wait_msecs <= 0) return -1; 326 if (max_wait_msecs <= 0) break;
322 327
323 mwait = rets[2]; 328 mwait = rets[2];
324 if (mwait <= 0) { 329 if (mwait <= 0) {
diff --git a/arch/powerpc/platforms/pseries/eeh_driver.c b/arch/powerpc/platforms/pseries/eeh_driver.c
index 15e015ef6865..57e025e84ab4 100644
--- a/arch/powerpc/platforms/pseries/eeh_driver.c
+++ b/arch/powerpc/platforms/pseries/eeh_driver.c
@@ -105,17 +105,18 @@ static void eeh_report_error(struct pci_dev *dev, void *userdata)
105 return; 105 return;
106 106
107 rc = driver->err_handler->error_detected (dev, pci_channel_io_frozen); 107 rc = driver->err_handler->error_detected (dev, pci_channel_io_frozen);
108
109 /* A driver that needs a reset trumps all others */
110 if (rc == PCI_ERS_RESULT_NEED_RESET) *res = rc;
108 if (*res == PCI_ERS_RESULT_NONE) *res = rc; 111 if (*res == PCI_ERS_RESULT_NONE) *res = rc;
109 if (*res == PCI_ERS_RESULT_DISCONNECT &&
110 rc == PCI_ERS_RESULT_NEED_RESET) *res = rc;
111} 112}
112 113
113/** 114/**
114 * eeh_report_mmio_enabled - tell drivers that MMIO has been enabled 115 * eeh_report_mmio_enabled - tell drivers that MMIO has been enabled
115 * 116 *
116 * Report an EEH error to each device driver, collect up and 117 * Tells each device driver that IO ports, MMIO and config space I/O
117 * merge the device driver responses. Cumulative response 118 * are now enabled. Collects up and merges the device driver responses.
118 * passed back in "userdata". 119 * Cumulative response passed back in "userdata".
119 */ 120 */
120 121
121static void eeh_report_mmio_enabled(struct pci_dev *dev, void *userdata) 122static void eeh_report_mmio_enabled(struct pci_dev *dev, void *userdata)
@@ -123,17 +124,16 @@ static void eeh_report_mmio_enabled(struct pci_dev *dev, void *userdata)
123 enum pci_ers_result rc, *res = userdata; 124 enum pci_ers_result rc, *res = userdata;
124 struct pci_driver *driver = dev->driver; 125 struct pci_driver *driver = dev->driver;
125 126
126 // dev->error_state = pci_channel_mmio_enabled;
127
128 if (!driver || 127 if (!driver ||
129 !driver->err_handler || 128 !driver->err_handler ||
130 !driver->err_handler->mmio_enabled) 129 !driver->err_handler->mmio_enabled)
131 return; 130 return;
132 131
133 rc = driver->err_handler->mmio_enabled (dev); 132 rc = driver->err_handler->mmio_enabled (dev);
133
134 /* A driver that needs a reset trumps all others */
135 if (rc == PCI_ERS_RESULT_NEED_RESET) *res = rc;
134 if (*res == PCI_ERS_RESULT_NONE) *res = rc; 136 if (*res == PCI_ERS_RESULT_NONE) *res = rc;
135 if (*res == PCI_ERS_RESULT_DISCONNECT &&
136 rc == PCI_ERS_RESULT_NEED_RESET) *res = rc;
137} 137}
138 138
139/** 139/**
diff --git a/arch/powerpc/platforms/pseries/firmware.c b/arch/powerpc/platforms/pseries/firmware.c
index 8b18a1c40092..b765b7c77b65 100644
--- a/arch/powerpc/platforms/pseries/firmware.c
+++ b/arch/powerpc/platforms/pseries/firmware.c
@@ -25,6 +25,7 @@
25 25
26#include <asm/firmware.h> 26#include <asm/firmware.h>
27#include <asm/prom.h> 27#include <asm/prom.h>
28#include <asm/udbg.h>
28 29
29#ifdef DEBUG 30#ifdef DEBUG
30#define DBG(fmt...) udbg_printf(fmt) 31#define DBG(fmt...) udbg_printf(fmt)
diff --git a/arch/powerpc/platforms/pseries/msi.c b/arch/powerpc/platforms/pseries/msi.c
index 2793a1b100e6..f15222bbe136 100644
--- a/arch/powerpc/platforms/pseries/msi.c
+++ b/arch/powerpc/platforms/pseries/msi.c
@@ -171,6 +171,7 @@ static int rtas_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
171 struct pci_dn *pdn; 171 struct pci_dn *pdn;
172 int hwirq, virq, i, rc; 172 int hwirq, virq, i, rc;
173 struct msi_desc *entry; 173 struct msi_desc *entry;
174 struct msi_msg msg;
174 175
175 pdn = get_pdn(pdev); 176 pdn = get_pdn(pdev);
176 if (!pdn) 177 if (!pdn)
@@ -213,6 +214,11 @@ static int rtas_setup_msi_irqs(struct pci_dev *pdev, int nvec, int type)
213 214
214 dev_dbg(&pdev->dev, "rtas_msi: allocated virq %d\n", virq); 215 dev_dbg(&pdev->dev, "rtas_msi: allocated virq %d\n", virq);
215 set_irq_msi(virq, entry); 216 set_irq_msi(virq, entry);
217
218 /* Read config space back so we can restore after reset */
219 read_msi_msg(virq, &msg);
220 entry->msg = msg;
221
216 unmask_msi_irq(virq); 222 unmask_msi_irq(virq);
217 } 223 }
218 224
diff --git a/arch/powerpc/sysdev/i8259.c b/arch/powerpc/sysdev/i8259.c
index 7c1b27ac7d3c..216c0f5680d2 100644
--- a/arch/powerpc/sysdev/i8259.c
+++ b/arch/powerpc/sysdev/i8259.c
@@ -137,6 +137,7 @@ static void i8259_unmask_irq(unsigned int irq_nr)
137static struct irq_chip i8259_pic = { 137static struct irq_chip i8259_pic = {
138 .typename = " i8259 ", 138 .typename = " i8259 ",
139 .mask = i8259_mask_irq, 139 .mask = i8259_mask_irq,
140 .disable = i8259_mask_irq,
140 .unmask = i8259_unmask_irq, 141 .unmask = i8259_unmask_irq,
141 .mask_ack = i8259_mask_and_ack_irq, 142 .mask_ack = i8259_mask_and_ack_irq,
142}; 143};
diff --git a/arch/powerpc/sysdev/mv64x60_pci.c b/arch/powerpc/sysdev/mv64x60_pci.c
index 9b3baa7317d7..6933f9c73b43 100644
--- a/arch/powerpc/sysdev/mv64x60_pci.c
+++ b/arch/powerpc/sysdev/mv64x60_pci.c
@@ -24,8 +24,9 @@
24#define MV64X60_VAL_LEN_MAX 11 24#define MV64X60_VAL_LEN_MAX 11
25#define MV64X60_PCICFG_CPCI_HOTSWAP 0x68 25#define MV64X60_PCICFG_CPCI_HOTSWAP 0x68
26 26
27static ssize_t mv64x60_hs_reg_read(struct kobject *kobj, char *buf, loff_t off, 27static ssize_t mv64x60_hs_reg_read(struct kobject *kobj,
28 size_t count) 28 struct bin_attribute *attr, char *buf,
29 loff_t off, size_t count)
29{ 30{
30 struct pci_dev *phb; 31 struct pci_dev *phb;
31 u32 v; 32 u32 v;
@@ -44,8 +45,9 @@ static ssize_t mv64x60_hs_reg_read(struct kobject *kobj, char *buf, loff_t off,
44 return sprintf(buf, "0x%08x\n", v); 45 return sprintf(buf, "0x%08x\n", v);
45} 46}
46 47
47static ssize_t mv64x60_hs_reg_write(struct kobject *kobj, char *buf, loff_t off, 48static ssize_t mv64x60_hs_reg_write(struct kobject *kobj,
48 size_t count) 49 struct bin_attribute *attr, char *buf,
50 loff_t off, size_t count)
49{ 51{
50 struct pci_dev *phb; 52 struct pci_dev *phb;
51 u32 v; 53 u32 v;
diff --git a/arch/ppc/kernel/entry.S b/arch/ppc/kernel/entry.S
index fba7ca17a67e..b19bfef2034d 100644
--- a/arch/ppc/kernel/entry.S
+++ b/arch/ppc/kernel/entry.S
@@ -244,6 +244,13 @@ syscall_exit_cont:
244 andis. r10,r0,DBCR0_IC@h 244 andis. r10,r0,DBCR0_IC@h
245 bnel- load_dbcr0 245 bnel- load_dbcr0
246#endif 246#endif
247#ifdef CONFIG_44x
248 lis r4,icache_44x_need_flush@ha
249 lwz r5,icache_44x_need_flush@l(r4)
250 cmplwi cr0,r5,0
251 bne- 2f
2521:
253#endif /* CONFIG_44x */
247 stwcx. r0,0,r1 /* to clear the reservation */ 254 stwcx. r0,0,r1 /* to clear the reservation */
248 lwz r4,_LINK(r1) 255 lwz r4,_LINK(r1)
249 lwz r5,_CCR(r1) 256 lwz r5,_CCR(r1)
@@ -258,6 +265,12 @@ syscall_exit_cont:
258 mtspr SPRN_SRR1,r8 265 mtspr SPRN_SRR1,r8
259 SYNC 266 SYNC
260 RFI 267 RFI
268#ifdef CONFIG_44x
2692: li r7,0
270 iccci r0,r0
271 stw r7,icache_44x_need_flush@l(r4)
272 b 1b
273#endif /* CONFIG_44x */
261 274
26266: li r3,-ENOSYS 27566: li r3,-ENOSYS
263 b ret_from_syscall 276 b ret_from_syscall
@@ -679,6 +692,16 @@ resume_kernel:
679 692
680 /* interrupts are hard-disabled at this point */ 693 /* interrupts are hard-disabled at this point */
681restore: 694restore:
695#ifdef CONFIG_44x
696 lis r4,icache_44x_need_flush@ha
697 lwz r5,icache_44x_need_flush@l(r4)
698 cmplwi cr0,r5,0
699 beq+ 1f
700 li r6,0
701 iccci r0,r0
702 stw r6,icache_44x_need_flush@l(r4)
7031:
704#endif /* CONFIG_44x */
682 lwz r0,GPR0(r1) 705 lwz r0,GPR0(r1)
683 lwz r2,GPR2(r1) 706 lwz r2,GPR2(r1)
684 REST_4GPRS(3, r1) 707 REST_4GPRS(3, r1)
diff --git a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S
index a22e1f4d94c8..e0c850d85c53 100644
--- a/arch/ppc/kernel/misc.S
+++ b/arch/ppc/kernel/misc.S
@@ -224,7 +224,16 @@ _GLOBAL(_tlbia)
224 */ 224 */
225_GLOBAL(_tlbie) 225_GLOBAL(_tlbie)
226#if defined(CONFIG_40x) 226#if defined(CONFIG_40x)
227 /* We run the search with interrupts disabled because we have to change
228 * the PID and I don't want to preempt when that happens.
229 */
230 mfmsr r5
231 mfspr r6,SPRN_PID
232 wrteei 0
233 mtspr SPRN_PID,r4
227 tlbsx. r3, 0, r3 234 tlbsx. r3, 0, r3
235 mtspr SPRN_PID,r6
236 wrtee r5
228 bne 10f 237 bne 10f
229 sync 238 sync
230 /* There are only 64 TLB entries, so r3 < 64, which means bit 25 is clear. 239 /* There are only 64 TLB entries, so r3 < 64, which means bit 25 is clear.
@@ -234,22 +243,21 @@ _GLOBAL(_tlbie)
234 isync 243 isync
23510: 24410:
236#elif defined(CONFIG_44x) 245#elif defined(CONFIG_44x)
237 mfspr r4,SPRN_MMUCR 246 mfspr r5,SPRN_MMUCR
238 mfspr r5,SPRN_PID /* Get PID */ 247 rlwimi r5,r4,0,24,31 /* Set TID */
239 rlwimi r4,r5,0,24,31 /* Set TID */
240 248
241 /* We have to run the search with interrupts disabled, even critical 249 /* We have to run the search with interrupts disabled, even critical
242 * and debug interrupts (in fact the only critical exceptions we have 250 * and debug interrupts (in fact the only critical exceptions we have
243 * are debug and machine check). Otherwise an interrupt which causes 251 * are debug and machine check). Otherwise an interrupt which causes
244 * a TLB miss can clobber the MMUCR between the mtspr and the tlbsx. */ 252 * a TLB miss can clobber the MMUCR between the mtspr and the tlbsx. */
245 mfmsr r5 253 mfmsr r4
246 lis r6,(MSR_EE|MSR_CE|MSR_ME|MSR_DE)@ha 254 lis r6,(MSR_EE|MSR_CE|MSR_ME|MSR_DE)@ha
247 addi r6,r6,(MSR_EE|MSR_CE|MSR_ME|MSR_DE)@l 255 addi r6,r6,(MSR_EE|MSR_CE|MSR_ME|MSR_DE)@l
248 andc r6,r5,r6 256 andc r6,r4,r6
249 mtmsr r6 257 mtmsr r6
250 mtspr SPRN_MMUCR,r4 258 mtspr SPRN_MMUCR,r5
251 tlbsx. r3, 0, r3 259 tlbsx. r3, 0, r3
252 mtmsr r5 260 mtmsr r4
253 bne 10f 261 bne 10f
254 sync 262 sync
255 /* There are only 64 TLB entries, so r3 < 64, 263 /* There are only 64 TLB entries, so r3 < 64,
@@ -491,12 +499,21 @@ END_FTR_SECTION_IFSET(CPU_FTR_COHERENT_ICACHE)
491 addi r3,r3,L1_CACHE_BYTES 499 addi r3,r3,L1_CACHE_BYTES
492 bdnz 0b 500 bdnz 0b
493 sync 501 sync
502#ifndef CONFIG_44x
503 /* We don't flush the icache on 44x. Those have a virtual icache
504 * and we don't have access to the virtual address here (it's
505 * not the page vaddr but where it's mapped in user space). The
506 * flushing of the icache on these is handled elsewhere, when
507 * a change in the address space occurs, before returning to
508 * user space
509 */
494 mtctr r4 510 mtctr r4
4951: icbi 0,r6 5111: icbi 0,r6
496 addi r6,r6,L1_CACHE_BYTES 512 addi r6,r6,L1_CACHE_BYTES
497 bdnz 1b 513 bdnz 1b
498 sync 514 sync
499 isync 515 isync
516#endif /* CONFIG_44x */
500 blr 517 blr
501 518
502/* 519/*
diff --git a/arch/ppc/mm/44x_mmu.c b/arch/ppc/mm/44x_mmu.c
index 0a0a0487b334..6536a25cfcb8 100644
--- a/arch/ppc/mm/44x_mmu.c
+++ b/arch/ppc/mm/44x_mmu.c
@@ -61,6 +61,7 @@ extern char etext[], _stext[];
61 */ 61 */
62unsigned int tlb_44x_index = 0; 62unsigned int tlb_44x_index = 0;
63unsigned int tlb_44x_hwater = 62; 63unsigned int tlb_44x_hwater = 62;
64int icache_44x_need_flush;
64 65
65/* 66/*
66 * "Pins" a 256MB TLB entry in AS0 for kernel lowmem 67 * "Pins" a 256MB TLB entry in AS0 for kernel lowmem
diff --git a/arch/ppc/mm/4xx_mmu.c b/arch/ppc/mm/4xx_mmu.c
index 838e09db71d9..ea785dbaac7c 100644
--- a/arch/ppc/mm/4xx_mmu.c
+++ b/arch/ppc/mm/4xx_mmu.c
@@ -99,13 +99,12 @@ unsigned long __init mmu_mapin_ram(void)
99 99
100 v = KERNELBASE; 100 v = KERNELBASE;
101 p = PPC_MEMSTART; 101 p = PPC_MEMSTART;
102 s = 0; 102 s = total_lowmem;
103 103
104 if (__map_without_ltlbs) { 104 if (__map_without_ltlbs)
105 return s; 105 return 0;
106 }
107 106
108 while (s <= (total_lowmem - LARGE_PAGE_SIZE_16M)) { 107 while (s >= LARGE_PAGE_SIZE_16M) {
109 pmd_t *pmdp; 108 pmd_t *pmdp;
110 unsigned long val = p | _PMD_SIZE_16M | _PAGE_HWEXEC | _PAGE_HWWRITE; 109 unsigned long val = p | _PMD_SIZE_16M | _PAGE_HWEXEC | _PAGE_HWWRITE;
111 110
@@ -117,10 +116,10 @@ unsigned long __init mmu_mapin_ram(void)
117 116
118 v += LARGE_PAGE_SIZE_16M; 117 v += LARGE_PAGE_SIZE_16M;
119 p += LARGE_PAGE_SIZE_16M; 118 p += LARGE_PAGE_SIZE_16M;
120 s += LARGE_PAGE_SIZE_16M; 119 s -= LARGE_PAGE_SIZE_16M;
121 } 120 }
122 121
123 while (s <= (total_lowmem - LARGE_PAGE_SIZE_4M)) { 122 while (s >= LARGE_PAGE_SIZE_4M) {
124 pmd_t *pmdp; 123 pmd_t *pmdp;
125 unsigned long val = p | _PMD_SIZE_4M | _PAGE_HWEXEC | _PAGE_HWWRITE; 124 unsigned long val = p | _PMD_SIZE_4M | _PAGE_HWEXEC | _PAGE_HWWRITE;
126 125
@@ -129,8 +128,8 @@ unsigned long __init mmu_mapin_ram(void)
129 128
130 v += LARGE_PAGE_SIZE_4M; 129 v += LARGE_PAGE_SIZE_4M;
131 p += LARGE_PAGE_SIZE_4M; 130 p += LARGE_PAGE_SIZE_4M;
132 s += LARGE_PAGE_SIZE_4M; 131 s -= LARGE_PAGE_SIZE_4M;
133 } 132 }
134 133
135 return s; 134 return total_lowmem - s;
136} 135}
diff --git a/arch/ppc/mm/fault.c b/arch/ppc/mm/fault.c
index 254c23b755e6..36c0e7529edb 100644
--- a/arch/ppc/mm/fault.c
+++ b/arch/ppc/mm/fault.c
@@ -227,7 +227,7 @@ good_area:
227 set_bit(PG_arch_1, &page->flags); 227 set_bit(PG_arch_1, &page->flags);
228 } 228 }
229 pte_update(ptep, 0, _PAGE_HWEXEC); 229 pte_update(ptep, 0, _PAGE_HWEXEC);
230 _tlbie(address); 230 _tlbie(address, mm->context.id);
231 pte_unmap_unlock(ptep, ptl); 231 pte_unmap_unlock(ptep, ptl);
232 up_read(&mm->mmap_sem); 232 up_read(&mm->mmap_sem);
233 return 0; 233 return 0;
diff --git a/arch/ppc/mm/mmu_decl.h b/arch/ppc/mm/mmu_decl.h
index 540f3292b229..f1d4f2109a99 100644
--- a/arch/ppc/mm/mmu_decl.h
+++ b/arch/ppc/mm/mmu_decl.h
@@ -54,12 +54,12 @@ extern unsigned int num_tlbcam_entries;
54#define mmu_mapin_ram() (0UL) 54#define mmu_mapin_ram() (0UL)
55 55
56#elif defined(CONFIG_4xx) 56#elif defined(CONFIG_4xx)
57#define flush_HPTE(X, va, pg) _tlbie(va) 57#define flush_HPTE(pid, va, pg) _tlbie(va, pid)
58extern void MMU_init_hw(void); 58extern void MMU_init_hw(void);
59extern unsigned long mmu_mapin_ram(void); 59extern unsigned long mmu_mapin_ram(void);
60 60
61#elif defined(CONFIG_FSL_BOOKE) 61#elif defined(CONFIG_FSL_BOOKE)
62#define flush_HPTE(X, va, pg) _tlbie(va) 62#define flush_HPTE(pid, va, pg) _tlbie(va, pid)
63extern void MMU_init_hw(void); 63extern void MMU_init_hw(void);
64extern unsigned long mmu_mapin_ram(void); 64extern unsigned long mmu_mapin_ram(void);
65extern void adjust_total_lowmem(void); 65extern void adjust_total_lowmem(void);
diff --git a/arch/ppc/platforms/4xx/ebony.c b/arch/ppc/platforms/4xx/ebony.c
index 05d7184d7e14..453643a0eeea 100644
--- a/arch/ppc/platforms/4xx/ebony.c
+++ b/arch/ppc/platforms/4xx/ebony.c
@@ -236,7 +236,7 @@ ebony_early_serial_map(void)
236 gen550_init(0, &port); 236 gen550_init(0, &port);
237 237
238 /* Purge TLB entry added in head_44x.S for early serial access */ 238 /* Purge TLB entry added in head_44x.S for early serial access */
239 _tlbie(UART0_IO_BASE); 239 _tlbie(UART0_IO_BASE, 0);
240#endif 240#endif
241 241
242 port.membase = ioremap64(PPC440GP_UART1_ADDR, 8); 242 port.membase = ioremap64(PPC440GP_UART1_ADDR, 8);
diff --git a/arch/ppc/platforms/4xx/luan.c b/arch/ppc/platforms/4xx/luan.c
index 4b169610f154..b79ebb8a3e6c 100644
--- a/arch/ppc/platforms/4xx/luan.c
+++ b/arch/ppc/platforms/4xx/luan.c
@@ -230,9 +230,14 @@ luan_setup_hoses(void)
230 230
231 /* Allocate hoses for PCIX1 and PCIX2 */ 231 /* Allocate hoses for PCIX1 and PCIX2 */
232 hose1 = pcibios_alloc_controller(); 232 hose1 = pcibios_alloc_controller();
233 if (!hose1)
234 return;
235
233 hose2 = pcibios_alloc_controller(); 236 hose2 = pcibios_alloc_controller();
234 if (!hose1 || !hose2) 237 if (!hose2) {
238 pcibios_free_controller(hose1);
235 return; 239 return;
240 }
236 241
237 /* Setup PCIX1 */ 242 /* Setup PCIX1 */
238 hose1->first_busno = 0; 243 hose1->first_busno = 0;
diff --git a/arch/ppc/platforms/4xx/ocotea.c b/arch/ppc/platforms/4xx/ocotea.c
index fd0f971881d6..28a712cd4800 100644
--- a/arch/ppc/platforms/4xx/ocotea.c
+++ b/arch/ppc/platforms/4xx/ocotea.c
@@ -259,7 +259,7 @@ ocotea_early_serial_map(void)
259 gen550_init(0, &port); 259 gen550_init(0, &port);
260 260
261 /* Purge TLB entry added in head_44x.S for early serial access */ 261 /* Purge TLB entry added in head_44x.S for early serial access */
262 _tlbie(UART0_IO_BASE); 262 _tlbie(UART0_IO_BASE, 0);
263#endif 263#endif
264 264
265 port.membase = ioremap64(PPC440GX_UART1_ADDR, 8); 265 port.membase = ioremap64(PPC440GX_UART1_ADDR, 8);
diff --git a/arch/ppc/platforms/4xx/taishan.c b/arch/ppc/platforms/4xx/taishan.c
index 888c492b4a45..f6a0c6650f33 100644
--- a/arch/ppc/platforms/4xx/taishan.c
+++ b/arch/ppc/platforms/4xx/taishan.c
@@ -316,7 +316,7 @@ taishan_early_serial_map(void)
316 gen550_init(0, &port); 316 gen550_init(0, &port);
317 317
318 /* Purge TLB entry added in head_44x.S for early serial access */ 318 /* Purge TLB entry added in head_44x.S for early serial access */
319 _tlbie(UART0_IO_BASE); 319 _tlbie(UART0_IO_BASE, 0);
320#endif 320#endif
321 321
322 port.membase = ioremap64(PPC440GX_UART1_ADDR, 8); 322 port.membase = ioremap64(PPC440GX_UART1_ADDR, 8);
diff --git a/arch/ppc/syslib/i8259.c b/arch/ppc/syslib/i8259.c
index 1e5a00a4b5f5..559f27c6aefe 100644
--- a/arch/ppc/syslib/i8259.c
+++ b/arch/ppc/syslib/i8259.c
@@ -127,6 +127,7 @@ static void i8259_unmask_irq(unsigned int irq_nr)
127static struct irq_chip i8259_pic = { 127static struct irq_chip i8259_pic = {
128 .typename = " i8259 ", 128 .typename = " i8259 ",
129 .mask = i8259_mask_irq, 129 .mask = i8259_mask_irq,
130 .disable = i8259_mask_irq,
130 .unmask = i8259_unmask_irq, 131 .unmask = i8259_unmask_irq,
131 .mask_ack = i8259_mask_and_ack_irq, 132 .mask_ack = i8259_mask_and_ack_irq,
132}; 133};
diff --git a/arch/ppc/syslib/m8260_setup.c b/arch/ppc/syslib/m8260_setup.c
index 15f0d7323535..46588fa94381 100644
--- a/arch/ppc/syslib/m8260_setup.c
+++ b/arch/ppc/syslib/m8260_setup.c
@@ -25,6 +25,7 @@
25#include <asm/machdep.h> 25#include <asm/machdep.h>
26#include <asm/bootinfo.h> 26#include <asm/bootinfo.h>
27#include <asm/time.h> 27#include <asm/time.h>
28#include <asm/ppc_sys.h>
28 29
29#include "cpm2_pic.h" 30#include "cpm2_pic.h"
30 31
@@ -61,7 +62,7 @@ m8260_setup_arch(void)
61#endif 62#endif
62 63
63 identify_ppc_sys_by_name_and_id(BOARD_CHIP_NAME, 64 identify_ppc_sys_by_name_and_id(BOARD_CHIP_NAME,
64 in_be32(CPM_MAP_ADDR + CPM_IMMR_OFFSET)); 65 in_be32((void *)CPM_MAP_ADDR + CPM_IMMR_OFFSET));
65 66
66 m82xx_board_setup(); 67 m82xx_board_setup();
67} 68}
@@ -147,12 +148,12 @@ m8260_show_cpuinfo(struct seq_file *m)
147 seq_printf(m, "vendor\t\t: %s\n" 148 seq_printf(m, "vendor\t\t: %s\n"
148 "machine\t\t: %s\n" 149 "machine\t\t: %s\n"
149 "\n" 150 "\n"
150 "mem size\t\t: 0x%08x\n" 151 "mem size\t\t: 0x%08lx\n"
151 "console baud\t\t: %d\n" 152 "console baud\t\t: %ld\n"
152 "\n" 153 "\n"
153 "core clock\t: %u MHz\n" 154 "core clock\t: %lu MHz\n"
154 "CPM clock\t: %u MHz\n" 155 "CPM clock\t: %lu MHz\n"
155 "bus clock\t: %u MHz\n", 156 "bus clock\t: %lu MHz\n",
156 CPUINFO_VENDOR, CPUINFO_MACHINE, bp->bi_memsize, 157 CPUINFO_VENDOR, CPUINFO_MACHINE, bp->bi_memsize,
157 bp->bi_baudrate, bp->bi_intfreq / 1000000, 158 bp->bi_baudrate, bp->bi_intfreq / 1000000,
158 bp->bi_cpmfreq / 1000000, bp->bi_busfreq / 1000000); 159 bp->bi_cpmfreq / 1000000, bp->bi_busfreq / 1000000);
diff --git a/arch/sparc/kernel/irq.c b/arch/sparc/kernel/irq.c
index e1e24f31aa54..01a6756ba371 100644
--- a/arch/sparc/kernel/irq.c
+++ b/arch/sparc/kernel/irq.c
@@ -18,7 +18,6 @@
18#include <linux/linkage.h> 18#include <linux/linkage.h>
19#include <linux/kernel_stat.h> 19#include <linux/kernel_stat.h>
20#include <linux/signal.h> 20#include <linux/signal.h>
21#include <linux/sched.h>
22#include <linux/interrupt.h> 21#include <linux/interrupt.h>
23#include <linux/slab.h> 22#include <linux/slab.h>
24#include <linux/random.h> 23#include <linux/random.h>
diff --git a/arch/sparc64/kernel/ds.c b/arch/sparc64/kernel/ds.c
index 9f472a79d37e..eeb5a2fc788d 100644
--- a/arch/sparc64/kernel/ds.c
+++ b/arch/sparc64/kernel/ds.c
@@ -6,7 +6,6 @@
6#include <linux/kernel.h> 6#include <linux/kernel.h>
7#include <linux/module.h> 7#include <linux/module.h>
8#include <linux/types.h> 8#include <linux/types.h>
9#include <linux/module.h>
10#include <linux/string.h> 9#include <linux/string.h>
11#include <linux/slab.h> 10#include <linux/slab.h>
12#include <linux/sched.h> 11#include <linux/sched.h>
diff --git a/arch/sparc64/kernel/module.c b/arch/sparc64/kernel/module.c
index 579871527699..158484bf5999 100644
--- a/arch/sparc64/kernel/module.c
+++ b/arch/sparc64/kernel/module.c
@@ -11,7 +11,6 @@
11#include <linux/fs.h> 11#include <linux/fs.h>
12#include <linux/string.h> 12#include <linux/string.h>
13#include <linux/slab.h> 13#include <linux/slab.h>
14#include <linux/vmalloc.h>
15#include <linux/mm.h> 14#include <linux/mm.h>
16 15
17#include <asm/processor.h> 16#include <asm/processor.h>
diff --git a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c
index 78caff926737..98c468803ce3 100644
--- a/arch/sparc64/kernel/sys_sparc32.c
+++ b/arch/sparc64/kernel/sys_sparc32.c
@@ -51,7 +51,6 @@
51#include <linux/vfs.h> 51#include <linux/vfs.h>
52#include <linux/netfilter_ipv4/ip_tables.h> 52#include <linux/netfilter_ipv4/ip_tables.h>
53#include <linux/ptrace.h> 53#include <linux/ptrace.h>
54#include <linux/highuid.h>
55 54
56#include <asm/types.h> 55#include <asm/types.h>
57#include <asm/uaccess.h> 56#include <asm/uaccess.h>
diff --git a/arch/sparc64/kernel/sys_sunos32.c b/arch/sparc64/kernel/sys_sunos32.c
index 170d6ca8de6f..cfc22d3fe54c 100644
--- a/arch/sparc64/kernel/sys_sunos32.c
+++ b/arch/sparc64/kernel/sys_sunos32.c
@@ -57,7 +57,6 @@
57#include <linux/personality.h> 57#include <linux/personality.h>
58 58
59/* For SOCKET_I */ 59/* For SOCKET_I */
60#include <linux/socket.h>
61#include <net/sock.h> 60#include <net/sock.h>
62#include <net/compat.h> 61#include <net/compat.h>
63 62
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c
index a2cf955294c1..4352ee4d8dac 100644
--- a/arch/sparc64/kernel/time.c
+++ b/arch/sparc64/kernel/time.c
@@ -28,7 +28,6 @@
28#include <linux/jiffies.h> 28#include <linux/jiffies.h>
29#include <linux/cpufreq.h> 29#include <linux/cpufreq.h>
30#include <linux/percpu.h> 30#include <linux/percpu.h>
31#include <linux/profile.h>
32#include <linux/miscdevice.h> 31#include <linux/miscdevice.h>
33#include <linux/rtc.h> 32#include <linux/rtc.h>
34#include <linux/kernel_stat.h> 33#include <linux/kernel_stat.h>
@@ -47,7 +46,6 @@
47#include <asm/sections.h> 46#include <asm/sections.h>
48#include <asm/cpudata.h> 47#include <asm/cpudata.h>
49#include <asm/uaccess.h> 48#include <asm/uaccess.h>
50#include <asm/prom.h>
51#include <asm/irq_regs.h> 49#include <asm/irq_regs.h>
52 50
53DEFINE_SPINLOCK(mostek_lock); 51DEFINE_SPINLOCK(mostek_lock);
diff --git a/arm/configs/netx_defconfig b/arm/configs/netx_defconfig
new file mode 100644
index 000000000000..57f32f39d0ff
--- /dev/null
+++ b/arm/configs/netx_defconfig
@@ -0,0 +1,925 @@
1#
2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.17-rc6
4# Tue Jun 6 15:26:53 2006
5#
6CONFIG_ARM=y
7CONFIG_MMU=y
8CONFIG_RWSEM_GENERIC_SPINLOCK=y
9CONFIG_GENERIC_HWEIGHT=y
10CONFIG_GENERIC_CALIBRATE_DELAY=y
11CONFIG_VECTORS_BASE=0xffff0000
12
13#
14# Code maturity level options
15#
16CONFIG_EXPERIMENTAL=y
17CONFIG_BROKEN_ON_SMP=y
18CONFIG_LOCK_KERNEL=y
19CONFIG_INIT_ENV_ARG_LIMIT=32
20
21#
22# General setup
23#
24CONFIG_LOCALVERSION=""
25CONFIG_LOCALVERSION_AUTO=y
26CONFIG_SWAP=y
27CONFIG_SYSVIPC=y
28CONFIG_POSIX_MQUEUE=y
29CONFIG_BSD_PROCESS_ACCT=y
30# CONFIG_BSD_PROCESS_ACCT_V3 is not set
31CONFIG_SYSCTL=y
32# CONFIG_AUDIT is not set
33CONFIG_IKCONFIG=y
34CONFIG_IKCONFIG_PROC=y
35# CONFIG_RELAY is not set
36CONFIG_INITRAMFS_SOURCE=""
37CONFIG_UID16=y
38CONFIG_CC_OPTIMIZE_FOR_SIZE=y
39# CONFIG_EMBEDDED is not set
40CONFIG_KALLSYMS=y
41# CONFIG_KALLSYMS_ALL is not set
42# CONFIG_KALLSYMS_EXTRA_PASS is not set
43CONFIG_HOTPLUG=y
44CONFIG_PRINTK=y
45CONFIG_BUG=y
46CONFIG_ELF_CORE=y
47CONFIG_BASE_FULL=y
48CONFIG_FUTEX=y
49CONFIG_EPOLL=y
50CONFIG_SHMEM=y
51CONFIG_SLAB=y
52# CONFIG_TINY_SHMEM is not set
53CONFIG_BASE_SMALL=0
54# CONFIG_SLOB is not set
55CONFIG_OBSOLETE_INTERMODULE=y
56
57#
58# Loadable module support
59#
60CONFIG_MODULES=y
61CONFIG_MODULE_UNLOAD=y
62CONFIG_MODULE_FORCE_UNLOAD=y
63# CONFIG_MODVERSIONS is not set
64# CONFIG_MODULE_SRCVERSION_ALL is not set
65CONFIG_KMOD=y
66
67#
68# Block layer
69#
70# CONFIG_BLK_DEV_IO_TRACE is not set
71
72#
73# IO Schedulers
74#
75CONFIG_IOSCHED_NOOP=y
76CONFIG_IOSCHED_AS=y
77CONFIG_IOSCHED_DEADLINE=y
78CONFIG_IOSCHED_CFQ=y
79CONFIG_DEFAULT_AS=y
80# CONFIG_DEFAULT_DEADLINE is not set
81# CONFIG_DEFAULT_CFQ is not set
82# CONFIG_DEFAULT_NOOP is not set
83CONFIG_DEFAULT_IOSCHED="anticipatory"
84
85#
86# System Type
87#
88# CONFIG_ARCH_CLPS7500 is not set
89# CONFIG_ARCH_CLPS711X is not set
90# CONFIG_ARCH_CO285 is not set
91# CONFIG_ARCH_EBSA110 is not set
92# CONFIG_ARCH_EP93XX is not set
93# CONFIG_ARCH_FOOTBRIDGE is not set
94# CONFIG_ARCH_INTEGRATOR is not set
95# CONFIG_ARCH_IOP3XX is not set
96# CONFIG_ARCH_IXP4XX is not set
97# CONFIG_ARCH_IXP2000 is not set
98# CONFIG_ARCH_IXP23XX is not set
99# CONFIG_ARCH_L7200 is not set
100# CONFIG_ARCH_PXA is not set
101# CONFIG_ARCH_RPC is not set
102# CONFIG_ARCH_SA1100 is not set
103# CONFIG_ARCH_S3C2410 is not set
104# CONFIG_ARCH_SHARK is not set
105# CONFIG_ARCH_LH7A40X is not set
106# CONFIG_ARCH_OMAP is not set
107# CONFIG_ARCH_VERSATILE is not set
108# CONFIG_ARCH_REALVIEW is not set
109# CONFIG_ARCH_IMX is not set
110# CONFIG_ARCH_H720X is not set
111# CONFIG_ARCH_AAEC2000 is not set
112# CONFIG_ARCH_AT91RM9200 is not set
113CONFIG_ARCH_NETX=y
114
115#
116# NetX Implementations
117#
118CONFIG_MACH_NXDKN=y
119CONFIG_MACH_NXDB500=y
120CONFIG_MACH_NXEB500HMI=y
121
122#
123# Processor Type
124#
125CONFIG_CPU_32=y
126CONFIG_CPU_ARM926T=y
127CONFIG_CPU_32v5=y
128CONFIG_CPU_ABRT_EV5TJ=y
129CONFIG_CPU_CACHE_VIVT=y
130CONFIG_CPU_COPY_V4WB=y
131CONFIG_CPU_TLB_V4WBI=y
132
133#
134# Processor Features
135#
136CONFIG_ARM_THUMB=y
137# CONFIG_CPU_ICACHE_DISABLE is not set
138# CONFIG_CPU_DCACHE_DISABLE is not set
139# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
140# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
141CONFIG_ARM_VIC=y
142
143#
144# Bus support
145#
146CONFIG_ARM_AMBA=y
147
148#
149# PCCARD (PCMCIA/CardBus) support
150#
151# CONFIG_PCCARD is not set
152
153#
154# Kernel Features
155#
156CONFIG_PREEMPT=y
157# CONFIG_NO_IDLE_HZ is not set
158CONFIG_HZ=100
159# CONFIG_AEABI is not set
160# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
161CONFIG_SELECT_MEMORY_MODEL=y
162CONFIG_FLATMEM_MANUAL=y
163# CONFIG_DISCONTIGMEM_MANUAL is not set
164# CONFIG_SPARSEMEM_MANUAL is not set
165CONFIG_FLATMEM=y
166CONFIG_FLAT_NODE_MEM_MAP=y
167# CONFIG_SPARSEMEM_STATIC is not set
168CONFIG_SPLIT_PTLOCK_CPUS=4096
169CONFIG_ALIGNMENT_TRAP=y
170
171#
172# Boot options
173#
174CONFIG_ZBOOT_ROM_TEXT=0x0
175CONFIG_ZBOOT_ROM_BSS=0x0
176CONFIG_CMDLINE="console=ttySMX0,115200"
177# CONFIG_XIP_KERNEL is not set
178
179#
180# Floating point emulation
181#
182
183#
184# At least one emulation must be selected
185#
186# CONFIG_FPE_NWFPE is not set
187# CONFIG_FPE_FASTFPE is not set
188# CONFIG_VFP is not set
189
190#
191# Userspace binary formats
192#
193CONFIG_BINFMT_ELF=y
194# CONFIG_BINFMT_AOUT is not set
195# CONFIG_BINFMT_MISC is not set
196# CONFIG_ARTHUR is not set
197
198#
199# Power management options
200#
201# CONFIG_PM is not set
202# CONFIG_APM is not set
203
204#
205# Networking
206#
207CONFIG_NET=y
208
209#
210# Networking options
211#
212# CONFIG_NETDEBUG is not set
213CONFIG_PACKET=y
214CONFIG_PACKET_MMAP=y
215CONFIG_UNIX=y
216CONFIG_XFRM=y
217CONFIG_XFRM_USER=m
218CONFIG_NET_KEY=y
219CONFIG_INET=y
220CONFIG_IP_MULTICAST=y
221# CONFIG_IP_ADVANCED_ROUTER is not set
222CONFIG_IP_FIB_HASH=y
223CONFIG_IP_PNP=y
224CONFIG_IP_PNP_DHCP=y
225# CONFIG_IP_PNP_BOOTP is not set
226# CONFIG_IP_PNP_RARP is not set
227# CONFIG_NET_IPIP is not set
228CONFIG_NET_IPGRE=m
229# CONFIG_NET_IPGRE_BROADCAST is not set
230# CONFIG_IP_MROUTE is not set
231# CONFIG_ARPD is not set
232CONFIG_SYN_COOKIES=y
233CONFIG_INET_AH=y
234CONFIG_INET_ESP=y
235CONFIG_INET_IPCOMP=y
236CONFIG_INET_XFRM_TUNNEL=y
237CONFIG_INET_TUNNEL=y
238CONFIG_INET_DIAG=y
239CONFIG_INET_TCP_DIAG=y
240# CONFIG_TCP_CONG_ADVANCED is not set
241CONFIG_TCP_CONG_BIC=y
242
243#
244# IP: Virtual Server Configuration
245#
246# CONFIG_IP_VS is not set
247CONFIG_IPV6=m
248# CONFIG_IPV6_PRIVACY is not set
249# CONFIG_IPV6_ROUTER_PREF is not set
250CONFIG_INET6_AH=m
251CONFIG_INET6_ESP=m
252CONFIG_INET6_IPCOMP=m
253CONFIG_INET6_XFRM_TUNNEL=m
254CONFIG_INET6_TUNNEL=m
255# CONFIG_IPV6_TUNNEL is not set
256CONFIG_NETFILTER=y
257# CONFIG_NETFILTER_DEBUG is not set
258
259#
260# Core Netfilter Configuration
261#
262# CONFIG_NETFILTER_NETLINK is not set
263# CONFIG_NETFILTER_XTABLES is not set
264
265#
266# IP: Netfilter Configuration
267#
268CONFIG_IP_NF_CONNTRACK=m
269# CONFIG_IP_NF_CT_ACCT is not set
270# CONFIG_IP_NF_CONNTRACK_MARK is not set
271# CONFIG_IP_NF_CONNTRACK_EVENTS is not set
272# CONFIG_IP_NF_CT_PROTO_SCTP is not set
273CONFIG_IP_NF_FTP=m
274CONFIG_IP_NF_IRC=m
275# CONFIG_IP_NF_NETBIOS_NS is not set
276CONFIG_IP_NF_TFTP=m
277CONFIG_IP_NF_AMANDA=m
278# CONFIG_IP_NF_PPTP is not set
279# CONFIG_IP_NF_H323 is not set
280CONFIG_IP_NF_QUEUE=m
281
282#
283# IPv6: Netfilter Configuration (EXPERIMENTAL)
284#
285# CONFIG_IP6_NF_QUEUE is not set
286
287#
288# DCCP Configuration (EXPERIMENTAL)
289#
290# CONFIG_IP_DCCP is not set
291
292#
293# SCTP Configuration (EXPERIMENTAL)
294#
295# CONFIG_IP_SCTP is not set
296
297#
298# TIPC Configuration (EXPERIMENTAL)
299#
300# CONFIG_TIPC is not set
301# CONFIG_ATM is not set
302# CONFIG_BRIDGE is not set
303# CONFIG_VLAN_8021Q is not set
304# CONFIG_DECNET is not set
305# CONFIG_LLC2 is not set
306# CONFIG_IPX is not set
307# CONFIG_ATALK is not set
308# CONFIG_X25 is not set
309# CONFIG_LAPB is not set
310# CONFIG_NET_DIVERT is not set
311# CONFIG_ECONET is not set
312# CONFIG_WAN_ROUTER is not set
313
314#
315# QoS and/or fair queueing
316#
317# CONFIG_NET_SCHED is not set
318
319#
320# Network testing
321#
322CONFIG_NET_PKTGEN=m
323# CONFIG_HAMRADIO is not set
324# CONFIG_IRDA is not set
325# CONFIG_BT is not set
326# CONFIG_IEEE80211 is not set
327
328#
329# Device Drivers
330#
331
332#
333# Generic Driver Options
334#
335CONFIG_STANDALONE=y
336CONFIG_PREVENT_FIRMWARE_BUILD=y
337CONFIG_FW_LOADER=y
338# CONFIG_DEBUG_DRIVER is not set
339
340#
341# Connector - unified userspace <-> kernelspace linker
342#
343# CONFIG_CONNECTOR is not set
344
345#
346# Memory Technology Devices (MTD)
347#
348CONFIG_MTD=y
349# CONFIG_MTD_DEBUG is not set
350# CONFIG_MTD_CONCAT is not set
351CONFIG_MTD_PARTITIONS=y
352# CONFIG_MTD_REDBOOT_PARTS is not set
353CONFIG_MTD_CMDLINE_PARTS=y
354# CONFIG_MTD_AFS_PARTS is not set
355
356#
357# User Modules And Translation Layers
358#
359CONFIG_MTD_CHAR=y
360CONFIG_MTD_BLOCK=y
361# CONFIG_FTL is not set
362# CONFIG_NFTL is not set
363# CONFIG_INFTL is not set
364# CONFIG_RFD_FTL is not set
365
366#
367# RAM/ROM/Flash chip drivers
368#
369CONFIG_MTD_CFI=y
370# CONFIG_MTD_JEDECPROBE is not set
371CONFIG_MTD_GEN_PROBE=y
372# CONFIG_MTD_CFI_ADV_OPTIONS is not set
373CONFIG_MTD_MAP_BANK_WIDTH_1=y
374CONFIG_MTD_MAP_BANK_WIDTH_2=y
375CONFIG_MTD_MAP_BANK_WIDTH_4=y
376# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
377# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
378# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
379CONFIG_MTD_CFI_I1=y
380CONFIG_MTD_CFI_I2=y
381# CONFIG_MTD_CFI_I4 is not set
382# CONFIG_MTD_CFI_I8 is not set
383CONFIG_MTD_CFI_INTELEXT=y
384# CONFIG_MTD_CFI_AMDSTD is not set
385# CONFIG_MTD_CFI_STAA is not set
386CONFIG_MTD_CFI_UTIL=y
387CONFIG_MTD_RAM=y
388# CONFIG_MTD_ROM is not set
389# CONFIG_MTD_ABSENT is not set
390# CONFIG_MTD_OBSOLETE_CHIPS is not set
391
392#
393# Mapping drivers for chip access
394#
395# CONFIG_MTD_COMPLEX_MAPPINGS is not set
396# CONFIG_MTD_PHYSMAP is not set
397# CONFIG_MTD_ARM_INTEGRATOR is not set
398CONFIG_MTD_PLATRAM=y
399
400#
401# Self-contained MTD device drivers
402#
403# CONFIG_MTD_SLRAM is not set
404# CONFIG_MTD_PHRAM is not set
405# CONFIG_MTD_MTDRAM is not set
406# CONFIG_MTD_BLOCK2MTD is not set
407
408#
409# Disk-On-Chip Device Drivers
410#
411# CONFIG_MTD_DOC2000 is not set
412# CONFIG_MTD_DOC2001 is not set
413# CONFIG_MTD_DOC2001PLUS is not set
414
415#
416# NAND Flash Device Drivers
417#
418# CONFIG_MTD_NAND is not set
419
420#
421# OneNAND Flash Device Drivers
422#
423# CONFIG_MTD_ONENAND is not set
424
425#
426# Parallel port support
427#
428# CONFIG_PARPORT is not set
429
430#
431# Plug and Play support
432#
433
434#
435# Block devices
436#
437# CONFIG_BLK_DEV_COW_COMMON is not set
438CONFIG_BLK_DEV_LOOP=m
439CONFIG_BLK_DEV_CRYPTOLOOP=m
440# CONFIG_BLK_DEV_NBD is not set
441# CONFIG_BLK_DEV_RAM is not set
442# CONFIG_BLK_DEV_INITRD is not set
443# CONFIG_CDROM_PKTCDVD is not set
444# CONFIG_ATA_OVER_ETH is not set
445
446#
447# SCSI device support
448#
449# CONFIG_RAID_ATTRS is not set
450# CONFIG_SCSI is not set
451
452#
453# Multi-device support (RAID and LVM)
454#
455# CONFIG_MD is not set
456
457#
458# Fusion MPT device support
459#
460# CONFIG_FUSION is not set
461
462#
463# IEEE 1394 (FireWire) support
464#
465
466#
467# I2O device support
468#
469
470#
471# Network device support
472#
473CONFIG_NETDEVICES=y
474# CONFIG_DUMMY is not set
475# CONFIG_BONDING is not set
476# CONFIG_EQUALIZER is not set
477# CONFIG_TUN is not set
478
479#
480# PHY device support
481#
482# CONFIG_PHYLIB is not set
483
484#
485# Ethernet (10 or 100Mbit)
486#
487CONFIG_NET_ETHERNET=y
488CONFIG_MII=y
489# CONFIG_SMC91X is not set
490CONFIG_NET_NETX=y
491# CONFIG_DM9000 is not set
492
493#
494# Ethernet (1000 Mbit)
495#
496
497#
498# Ethernet (10000 Mbit)
499#
500
501#
502# Token Ring devices
503#
504
505#
506# Wireless LAN (non-hamradio)
507#
508# CONFIG_NET_RADIO is not set
509
510#
511# Wan interfaces
512#
513# CONFIG_WAN is not set
514# CONFIG_PPP is not set
515# CONFIG_SLIP is not set
516# CONFIG_SHAPER is not set
517# CONFIG_NETCONSOLE is not set
518# CONFIG_NETPOLL is not set
519# CONFIG_NET_POLL_CONTROLLER is not set
520
521#
522# ISDN subsystem
523#
524# CONFIG_ISDN is not set
525
526#
527# Input device support
528#
529CONFIG_INPUT=y
530
531#
532# Userland interfaces
533#
534CONFIG_INPUT_MOUSEDEV=y
535# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
536CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
537CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
538# CONFIG_INPUT_JOYDEV is not set
539# CONFIG_INPUT_TSDEV is not set
540# CONFIG_INPUT_EVDEV is not set
541# CONFIG_INPUT_EVBUG is not set
542
543#
544# Input Device Drivers
545#
546# CONFIG_INPUT_KEYBOARD is not set
547# CONFIG_INPUT_MOUSE is not set
548# CONFIG_INPUT_JOYSTICK is not set
549# CONFIG_INPUT_TOUCHSCREEN is not set
550# CONFIG_INPUT_MISC is not set
551
552#
553# Hardware I/O ports
554#
555CONFIG_SERIO=y
556CONFIG_SERIO_SERPORT=y
557# CONFIG_SERIO_AMBAKMI is not set
558# CONFIG_SERIO_RAW is not set
559# CONFIG_GAMEPORT is not set
560
561#
562# Character devices
563#
564CONFIG_VT=y
565CONFIG_VT_CONSOLE=y
566CONFIG_HW_CONSOLE=y
567# CONFIG_SERIAL_NONSTANDARD is not set
568
569#
570# Serial drivers
571#
572# CONFIG_SERIAL_8250 is not set
573
574#
575# Non-8250 serial port support
576#
577# CONFIG_SERIAL_AMBA_PL010 is not set
578# CONFIG_SERIAL_AMBA_PL011 is not set
579CONFIG_SERIAL_CORE=y
580CONFIG_SERIAL_CORE_CONSOLE=y
581CONFIG_SERIAL_NETX=y
582CONFIG_SERIAL_NETX_CONSOLE=y
583CONFIG_UNIX98_PTYS=y
584CONFIG_LEGACY_PTYS=y
585CONFIG_LEGACY_PTY_COUNT=256
586
587#
588# IPMI
589#
590# CONFIG_IPMI_HANDLER is not set
591
592#
593# Watchdog Cards
594#
595# CONFIG_WATCHDOG is not set
596CONFIG_NVRAM=m
597# CONFIG_DTLK is not set
598# CONFIG_R3964 is not set
599
600#
601# Ftape, the floppy tape device driver
602#
603# CONFIG_RAW_DRIVER is not set
604
605#
606# TPM devices
607#
608# CONFIG_TCG_TPM is not set
609# CONFIG_TELCLOCK is not set
610
611#
612# I2C support
613#
614# CONFIG_I2C is not set
615
616#
617# SPI support
618#
619# CONFIG_SPI is not set
620# CONFIG_SPI_MASTER is not set
621
622#
623# Dallas's 1-wire bus
624#
625# CONFIG_W1 is not set
626
627#
628# Hardware Monitoring support
629#
630# CONFIG_HWMON is not set
631# CONFIG_HWMON_VID is not set
632
633#
634# Misc devices
635#
636
637#
638# LED devices
639#
640# CONFIG_NEW_LEDS is not set
641
642#
643# LED drivers
644#
645
646#
647# LED Triggers
648#
649
650#
651# Multimedia devices
652#
653# CONFIG_VIDEO_DEV is not set
654CONFIG_VIDEO_V4L2=y
655
656#
657# Digital Video Broadcasting Devices
658#
659# CONFIG_DVB is not set
660
661#
662# Graphics support
663#
664CONFIG_FB=y
665CONFIG_FB_CFB_FILLRECT=y
666CONFIG_FB_CFB_COPYAREA=y
667CONFIG_FB_CFB_IMAGEBLIT=y
668# CONFIG_FB_MACMODES is not set
669CONFIG_FB_FIRMWARE_EDID=y
670# CONFIG_FB_MODE_HELPERS is not set
671# CONFIG_FB_TILEBLITTING is not set
672CONFIG_FB_ARMCLCD=y
673# CONFIG_FB_S1D13XXX is not set
674# CONFIG_FB_VIRTUAL is not set
675
676#
677# Console display driver support
678#
679# CONFIG_VGA_CONSOLE is not set
680CONFIG_DUMMY_CONSOLE=y
681CONFIG_FRAMEBUFFER_CONSOLE=y
682# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
683# CONFIG_FONTS is not set
684CONFIG_FONT_8x8=y
685CONFIG_FONT_8x16=y
686
687#
688# Logo configuration
689#
690CONFIG_LOGO=y
691CONFIG_LOGO_LINUX_MONO=y
692CONFIG_LOGO_LINUX_VGA16=y
693CONFIG_LOGO_LINUX_CLUT224=y
694# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
695
696#
697# Sound
698#
699# CONFIG_SOUND is not set
700
701#
702# USB support
703#
704CONFIG_USB_ARCH_HAS_HCD=y
705# CONFIG_USB_ARCH_HAS_OHCI is not set
706# CONFIG_USB_ARCH_HAS_EHCI is not set
707# CONFIG_USB is not set
708
709#
710# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
711#
712
713#
714# USB Gadget Support
715#
716# CONFIG_USB_GADGET is not set
717
718#
719# MMC/SD Card support
720#
721# CONFIG_MMC is not set
722
723#
724# Real Time Clock
725#
726CONFIG_RTC_LIB=y
727CONFIG_RTC_CLASS=m
728
729#
730# RTC interfaces
731#
732CONFIG_RTC_INTF_SYSFS=m
733CONFIG_RTC_INTF_PROC=m
734CONFIG_RTC_INTF_DEV=m
735
736#
737# RTC drivers
738#
739# CONFIG_RTC_DRV_M48T86 is not set
740CONFIG_RTC_DRV_NETX=m
741# CONFIG_RTC_DRV_TEST is not set
742
743#
744# File systems
745#
746# CONFIG_EXT2_FS is not set
747# CONFIG_EXT3_FS is not set
748# CONFIG_REISERFS_FS is not set
749# CONFIG_JFS_FS is not set
750# CONFIG_FS_POSIX_ACL is not set
751# CONFIG_XFS_FS is not set
752# CONFIG_OCFS2_FS is not set
753# CONFIG_MINIX_FS is not set
754# CONFIG_ROMFS_FS is not set
755CONFIG_INOTIFY=y
756# CONFIG_QUOTA is not set
757CONFIG_DNOTIFY=y
758# CONFIG_AUTOFS_FS is not set
759# CONFIG_AUTOFS4_FS is not set
760# CONFIG_FUSE_FS is not set
761
762#
763# CD-ROM/DVD Filesystems
764#
765# CONFIG_ISO9660_FS is not set
766# CONFIG_UDF_FS is not set
767
768#
769# DOS/FAT/NT Filesystems
770#
771# CONFIG_MSDOS_FS is not set
772# CONFIG_VFAT_FS is not set
773# CONFIG_NTFS_FS is not set
774
775#
776# Pseudo filesystems
777#
778CONFIG_PROC_FS=y
779CONFIG_SYSFS=y
780CONFIG_TMPFS=y
781# CONFIG_HUGETLB_PAGE is not set
782CONFIG_RAMFS=y
783# CONFIG_CONFIGFS_FS is not set
784
785#
786# Miscellaneous filesystems
787#
788# CONFIG_ADFS_FS is not set
789# CONFIG_AFFS_FS is not set
790# CONFIG_HFS_FS is not set
791# CONFIG_HFSPLUS_FS is not set
792# CONFIG_BEFS_FS is not set
793# CONFIG_BFS_FS is not set
794# CONFIG_EFS_FS is not set
795# CONFIG_JFFS_FS is not set
796CONFIG_JFFS2_FS=y
797CONFIG_JFFS2_FS_DEBUG=0
798CONFIG_JFFS2_FS_WRITEBUFFER=y
799# CONFIG_JFFS2_SUMMARY is not set
800# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
801CONFIG_JFFS2_ZLIB=y
802CONFIG_JFFS2_RTIME=y
803# CONFIG_JFFS2_RUBIN is not set
804# CONFIG_CRAMFS is not set
805# CONFIG_VXFS_FS is not set
806# CONFIG_HPFS_FS is not set
807# CONFIG_QNX4FS_FS is not set
808# CONFIG_SYSV_FS is not set
809# CONFIG_UFS_FS is not set
810
811#
812# Network File Systems
813#
814CONFIG_NFS_FS=y
815CONFIG_NFS_V3=y
816# CONFIG_NFS_V3_ACL is not set
817CONFIG_NFS_V4=y
818CONFIG_NFS_DIRECTIO=y
819# CONFIG_NFSD is not set
820CONFIG_ROOT_NFS=y
821CONFIG_LOCKD=y
822CONFIG_LOCKD_V4=y
823CONFIG_NFS_COMMON=y
824CONFIG_SUNRPC=y
825CONFIG_SUNRPC_GSS=y
826CONFIG_RPCSEC_GSS_KRB5=y
827# CONFIG_RPCSEC_GSS_SPKM3 is not set
828# CONFIG_SMB_FS is not set
829# CONFIG_CIFS is not set
830# CONFIG_NCP_FS is not set
831# CONFIG_CODA_FS is not set
832# CONFIG_AFS_FS is not set
833# CONFIG_9P_FS is not set
834
835#
836# Partition Types
837#
838# CONFIG_PARTITION_ADVANCED is not set
839CONFIG_MSDOS_PARTITION=y
840
841#
842# Native Language Support
843#
844# CONFIG_NLS is not set
845
846#
847# Profiling support
848#
849# CONFIG_PROFILING is not set
850
851#
852# Kernel hacking
853#
854# CONFIG_PRINTK_TIME is not set
855CONFIG_MAGIC_SYSRQ=y
856CONFIG_DEBUG_KERNEL=y
857CONFIG_LOG_BUF_SHIFT=17
858CONFIG_DETECT_SOFTLOCKUP=y
859# CONFIG_SCHEDSTATS is not set
860# CONFIG_DEBUG_SLAB is not set
861CONFIG_DEBUG_PREEMPT=y
862# CONFIG_DEBUG_MUTEXES is not set
863# CONFIG_DEBUG_SPINLOCK is not set
864# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
865# CONFIG_DEBUG_KOBJECT is not set
866CONFIG_DEBUG_BUGVERBOSE=y
867# CONFIG_DEBUG_INFO is not set
868# CONFIG_DEBUG_FS is not set
869# CONFIG_DEBUG_VM is not set
870CONFIG_FRAME_POINTER=y
871# CONFIG_UNWIND_INFO is not set
872CONFIG_FORCED_INLINING=y
873# CONFIG_RCU_TORTURE_TEST is not set
874# CONFIG_DEBUG_USER is not set
875CONFIG_DEBUG_ERRORS=y
876# CONFIG_DEBUG_LL is not set
877
878#
879# Security options
880#
881# CONFIG_KEYS is not set
882# CONFIG_SECURITY is not set
883
884#
885# Cryptographic options
886#
887CONFIG_CRYPTO=y
888CONFIG_CRYPTO_HMAC=y
889CONFIG_CRYPTO_NULL=m
890CONFIG_CRYPTO_MD4=m
891CONFIG_CRYPTO_MD5=y
892CONFIG_CRYPTO_SHA1=y
893CONFIG_CRYPTO_SHA256=m
894CONFIG_CRYPTO_SHA512=m
895# CONFIG_CRYPTO_WP512 is not set
896# CONFIG_CRYPTO_TGR192 is not set
897CONFIG_CRYPTO_DES=y
898CONFIG_CRYPTO_BLOWFISH=m
899CONFIG_CRYPTO_TWOFISH=m
900CONFIG_CRYPTO_SERPENT=m
901CONFIG_CRYPTO_AES=m
902CONFIG_CRYPTO_CAST5=m
903CONFIG_CRYPTO_CAST6=m
904# CONFIG_CRYPTO_TEA is not set
905CONFIG_CRYPTO_ARC4=m
906# CONFIG_CRYPTO_KHAZAD is not set
907# CONFIG_CRYPTO_ANUBIS is not set
908CONFIG_CRYPTO_DEFLATE=y
909CONFIG_CRYPTO_MICHAEL_MIC=m
910CONFIG_CRYPTO_CRC32C=m
911# CONFIG_CRYPTO_TEST is not set
912
913#
914# Hardware crypto devices
915#
916
917#
918# Library routines
919#
920CONFIG_CRC_CCITT=m
921# CONFIG_CRC16 is not set
922CONFIG_CRC32=y
923CONFIG_LIBCRC32C=m
924CONFIG_ZLIB_INFLATE=y
925CONFIG_ZLIB_DEFLATE=y
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index e47a9309eb48..0b4a47905575 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -789,6 +789,20 @@ static inline void cfq_slice_expired(struct cfq_data *cfqd, int timed_out)
789 __cfq_slice_expired(cfqd, cfqq, timed_out); 789 __cfq_slice_expired(cfqd, cfqq, timed_out);
790} 790}
791 791
792static int start_idle_class_timer(struct cfq_data *cfqd)
793{
794 unsigned long end = cfqd->last_end_request + CFQ_IDLE_GRACE;
795 unsigned long now = jiffies;
796
797 if (time_before(now, end) &&
798 time_after_eq(now, cfqd->last_end_request)) {
799 mod_timer(&cfqd->idle_class_timer, end);
800 return 1;
801 }
802
803 return 0;
804}
805
792/* 806/*
793 * Get next queue for service. Unless we have a queue preemption, 807 * Get next queue for service. Unless we have a queue preemption,
794 * we'll simply select the first cfqq in the service tree. 808 * we'll simply select the first cfqq in the service tree.
@@ -805,19 +819,14 @@ static struct cfq_queue *cfq_get_next_queue(struct cfq_data *cfqd)
805 cfqq = rb_entry(n, struct cfq_queue, rb_node); 819 cfqq = rb_entry(n, struct cfq_queue, rb_node);
806 820
807 if (cfq_class_idle(cfqq)) { 821 if (cfq_class_idle(cfqq)) {
808 unsigned long end;
809
810 /* 822 /*
811 * if we have idle queues and no rt or be queues had 823 * if we have idle queues and no rt or be queues had
812 * pending requests, either allow immediate service if 824 * pending requests, either allow immediate service if
813 * the grace period has passed or arm the idle grace 825 * the grace period has passed or arm the idle grace
814 * timer 826 * timer
815 */ 827 */
816 end = cfqd->last_end_request + CFQ_IDLE_GRACE; 828 if (start_idle_class_timer(cfqd))
817 if (time_before(jiffies, end)) {
818 mod_timer(&cfqd->idle_class_timer, end);
819 cfqq = NULL; 829 cfqq = NULL;
820 }
821 } 830 }
822 831
823 return cfqq; 832 return cfqq;
@@ -2036,17 +2045,14 @@ out_cont:
2036static void cfq_idle_class_timer(unsigned long data) 2045static void cfq_idle_class_timer(unsigned long data)
2037{ 2046{
2038 struct cfq_data *cfqd = (struct cfq_data *) data; 2047 struct cfq_data *cfqd = (struct cfq_data *) data;
2039 unsigned long flags, end; 2048 unsigned long flags;
2040 2049
2041 spin_lock_irqsave(cfqd->queue->queue_lock, flags); 2050 spin_lock_irqsave(cfqd->queue->queue_lock, flags);
2042 2051
2043 /* 2052 /*
2044 * race with a non-idle queue, reset timer 2053 * race with a non-idle queue, reset timer
2045 */ 2054 */
2046 end = cfqd->last_end_request + CFQ_IDLE_GRACE; 2055 if (!start_idle_class_timer(cfqd))
2047 if (!time_after_eq(jiffies, end))
2048 mod_timer(&cfqd->idle_class_timer, end);
2049 else
2050 cfq_schedule_dispatch(cfqd); 2056 cfq_schedule_dispatch(cfqd);
2051 2057
2052 spin_unlock_irqrestore(cfqd->queue->queue_lock, flags); 2058 spin_unlock_irqrestore(cfqd->queue->queue_lock, flags);
@@ -2068,9 +2074,10 @@ static void cfq_put_async_queues(struct cfq_data *cfqd)
2068 cfq_put_queue(cfqd->async_cfqq[0][i]); 2074 cfq_put_queue(cfqd->async_cfqq[0][i]);
2069 if (cfqd->async_cfqq[1][i]) 2075 if (cfqd->async_cfqq[1][i])
2070 cfq_put_queue(cfqd->async_cfqq[1][i]); 2076 cfq_put_queue(cfqd->async_cfqq[1][i]);
2071 if (cfqd->async_idle_cfqq)
2072 cfq_put_queue(cfqd->async_idle_cfqq);
2073 } 2077 }
2078
2079 if (cfqd->async_idle_cfqq)
2080 cfq_put_queue(cfqd->async_idle_cfqq);
2074} 2081}
2075 2082
2076static void cfq_exit_queue(elevator_t *e) 2083static void cfq_exit_queue(elevator_t *e)
@@ -2125,6 +2132,7 @@ static void *cfq_init_queue(struct request_queue *q)
2125 2132
2126 INIT_WORK(&cfqd->unplug_work, cfq_kick_queue); 2133 INIT_WORK(&cfqd->unplug_work, cfq_kick_queue);
2127 2134
2135 cfqd->last_end_request = jiffies;
2128 cfqd->cfq_quantum = cfq_quantum; 2136 cfqd->cfq_quantum = cfq_quantum;
2129 cfqd->cfq_fifo_expire[0] = cfq_fifo_expire[0]; 2137 cfqd->cfq_fifo_expire[0] = cfq_fifo_expire[0];
2130 cfqd->cfq_fifo_expire[1] = cfq_fifo_expire[1]; 2138 cfqd->cfq_fifo_expire[1] = cfq_fifo_expire[1];
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index 75c98d58f4dd..3b927be03850 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -1143,22 +1143,9 @@ EXPORT_SYMBOL(blk_queue_start_tag);
1143void blk_queue_invalidate_tags(struct request_queue *q) 1143void blk_queue_invalidate_tags(struct request_queue *q)
1144{ 1144{
1145 struct list_head *tmp, *n; 1145 struct list_head *tmp, *n;
1146 struct request *rq;
1147
1148 list_for_each_safe(tmp, n, &q->tag_busy_list) {
1149 rq = list_entry_rq(tmp);
1150 1146
1151 if (rq->tag == -1) { 1147 list_for_each_safe(tmp, n, &q->tag_busy_list)
1152 printk(KERN_ERR 1148 blk_requeue_request(q, list_entry_rq(tmp));
1153 "%s: bad tag found on list\n", __FUNCTION__);
1154 list_del_init(&rq->queuelist);
1155 rq->cmd_flags &= ~REQ_QUEUED;
1156 } else
1157 blk_queue_end_tag(q, rq);
1158
1159 rq->cmd_flags &= ~REQ_STARTED;
1160 __elv_add_request(q, rq, ELEVATOR_INSERT_BACK, 0);
1161 }
1162} 1149}
1163 1150
1164EXPORT_SYMBOL(blk_queue_invalidate_tags); 1151EXPORT_SYMBOL(blk_queue_invalidate_tags);
@@ -1634,15 +1621,7 @@ static void blk_backing_dev_unplug(struct backing_dev_info *bdi,
1634{ 1621{
1635 struct request_queue *q = bdi->unplug_io_data; 1622 struct request_queue *q = bdi->unplug_io_data;
1636 1623
1637 /* 1624 blk_unplug(q);
1638 * devices don't necessarily have an ->unplug_fn defined
1639 */
1640 if (q->unplug_fn) {
1641 blk_add_trace_pdu_int(q, BLK_TA_UNPLUG_IO, NULL,
1642 q->rq.count[READ] + q->rq.count[WRITE]);
1643
1644 q->unplug_fn(q);
1645 }
1646} 1625}
1647 1626
1648static void blk_unplug_work(struct work_struct *work) 1627static void blk_unplug_work(struct work_struct *work)
@@ -1666,6 +1645,20 @@ static void blk_unplug_timeout(unsigned long data)
1666 kblockd_schedule_work(&q->unplug_work); 1645 kblockd_schedule_work(&q->unplug_work);
1667} 1646}
1668 1647
1648void blk_unplug(struct request_queue *q)
1649{
1650 /*
1651 * devices don't necessarily have an ->unplug_fn defined
1652 */
1653 if (q->unplug_fn) {
1654 blk_add_trace_pdu_int(q, BLK_TA_UNPLUG_IO, NULL,
1655 q->rq.count[READ] + q->rq.count[WRITE]);
1656
1657 q->unplug_fn(q);
1658 }
1659}
1660EXPORT_SYMBOL(blk_unplug);
1661
1669/** 1662/**
1670 * blk_start_queue - restart a previously stopped queue 1663 * blk_start_queue - restart a previously stopped queue
1671 * @q: The &struct request_queue in question 1664 * @q: The &struct request_queue in question
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index a8130a4ad6d4..a5ee21319d37 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -358,10 +358,19 @@ static ssize_t class_pktcdvd_store_add(struct class *c, const char *buf,
358 size_t count) 358 size_t count)
359{ 359{
360 unsigned int major, minor; 360 unsigned int major, minor;
361
361 if (sscanf(buf, "%u:%u", &major, &minor) == 2) { 362 if (sscanf(buf, "%u:%u", &major, &minor) == 2) {
363 /* pkt_setup_dev() expects caller to hold reference to self */
364 if (!try_module_get(THIS_MODULE))
365 return -ENODEV;
366
362 pkt_setup_dev(MKDEV(major, minor), NULL); 367 pkt_setup_dev(MKDEV(major, minor), NULL);
368
369 module_put(THIS_MODULE);
370
363 return count; 371 return count;
364 } 372 }
373
365 return -EINVAL; 374 return -EINVAL;
366} 375}
367 376
diff --git a/drivers/char/tty_ioctl.c b/drivers/char/tty_ioctl.c
index 7a003504c265..1bdd2bf4f37d 100644
--- a/drivers/char/tty_ioctl.c
+++ b/drivers/char/tty_ioctl.c
@@ -730,13 +730,23 @@ static int send_prio_char(struct tty_struct *tty, char ch)
730 return 0; 730 return 0;
731} 731}
732 732
733int n_tty_ioctl(struct tty_struct * tty, struct file * file, 733/**
734 unsigned int cmd, unsigned long arg) 734 * tty_mode_ioctl - mode related ioctls
735 * @tty: tty for the ioctl
736 * @file: file pointer for the tty
737 * @cmd: command
738 * @arg: ioctl argument
739 *
740 * Perform non line discipline specific mode control ioctls. This
741 * is designed to be called by line disciplines to ensure they provide
742 * consistent mode setting.
743 */
744
745int tty_mode_ioctl(struct tty_struct * tty, struct file *file,
746 unsigned int cmd, unsigned long arg)
735{ 747{
736 struct tty_struct * real_tty; 748 struct tty_struct * real_tty;
737 void __user *p = (void __user *)arg; 749 void __user *p = (void __user *)arg;
738 int retval;
739 struct tty_ldisc *ld;
740 750
741 if (tty->driver->type == TTY_DRIVER_TYPE_PTY && 751 if (tty->driver->type == TTY_DRIVER_TYPE_PTY &&
742 tty->driver->subtype == PTY_TYPE_MASTER) 752 tty->driver->subtype == PTY_TYPE_MASTER)
@@ -799,6 +809,93 @@ int n_tty_ioctl(struct tty_struct * tty, struct file * file,
799 return set_termios(real_tty, p, TERMIOS_WAIT | TERMIOS_TERMIO); 809 return set_termios(real_tty, p, TERMIOS_WAIT | TERMIOS_TERMIO);
800 case TCSETA: 810 case TCSETA:
801 return set_termios(real_tty, p, TERMIOS_TERMIO); 811 return set_termios(real_tty, p, TERMIOS_TERMIO);
812#ifndef TCGETS2
813 case TIOCGLCKTRMIOS:
814 if (kernel_termios_to_user_termios((struct termios __user *)arg, real_tty->termios_locked))
815 return -EFAULT;
816 return 0;
817
818 case TIOCSLCKTRMIOS:
819 if (!capable(CAP_SYS_ADMIN))
820 return -EPERM;
821 if (user_termios_to_kernel_termios(real_tty->termios_locked, (struct termios __user *) arg))
822 return -EFAULT;
823 return 0;
824#else
825 case TIOCGLCKTRMIOS:
826 if (kernel_termios_to_user_termios_1((struct termios __user *)arg, real_tty->termios_locked))
827 return -EFAULT;
828 return 0;
829
830 case TIOCSLCKTRMIOS:
831 if (!capable(CAP_SYS_ADMIN))
832 return -EPERM;
833 if (user_termios_to_kernel_termios_1(real_tty->termios_locked, (struct termios __user *) arg))
834 return -EFAULT;
835 return 0;
836#endif
837 case TIOCGSOFTCAR:
838 return put_user(C_CLOCAL(tty) ? 1 : 0, (int __user *)arg);
839 case TIOCSSOFTCAR:
840 if (get_user(arg, (unsigned int __user *) arg))
841 return -EFAULT;
842 mutex_lock(&tty->termios_mutex);
843 tty->termios->c_cflag =
844 ((tty->termios->c_cflag & ~CLOCAL) |
845 (arg ? CLOCAL : 0));
846 mutex_unlock(&tty->termios_mutex);
847 return 0;
848 default:
849 return -ENOIOCTLCMD;
850 }
851}
852
853EXPORT_SYMBOL_GPL(tty_mode_ioctl);
854
855int tty_perform_flush(struct tty_struct *tty, unsigned long arg)
856{
857 struct tty_ldisc *ld;
858 int retval = tty_check_change(tty);
859 if (retval)
860 return retval;
861
862 ld = tty_ldisc_ref(tty);
863 switch (arg) {
864 case TCIFLUSH:
865 if (ld && ld->flush_buffer)
866 ld->flush_buffer(tty);
867 break;
868 case TCIOFLUSH:
869 if (ld && ld->flush_buffer)
870 ld->flush_buffer(tty);
871 /* fall through */
872 case TCOFLUSH:
873 if (tty->driver->flush_buffer)
874 tty->driver->flush_buffer(tty);
875 break;
876 default:
877 tty_ldisc_deref(ld);
878 return -EINVAL;
879 }
880 tty_ldisc_deref(ld);
881 return 0;
882}
883
884EXPORT_SYMBOL_GPL(tty_perform_flush);
885
886int n_tty_ioctl(struct tty_struct * tty, struct file * file,
887 unsigned int cmd, unsigned long arg)
888{
889 struct tty_struct * real_tty;
890 int retval;
891
892 if (tty->driver->type == TTY_DRIVER_TYPE_PTY &&
893 tty->driver->subtype == PTY_TYPE_MASTER)
894 real_tty = tty->link;
895 else
896 real_tty = tty;
897
898 switch (cmd) {
802 case TCXONC: 899 case TCXONC:
803 retval = tty_check_change(tty); 900 retval = tty_check_change(tty);
804 if (retval) 901 if (retval)
@@ -829,30 +926,7 @@ int n_tty_ioctl(struct tty_struct * tty, struct file * file,
829 } 926 }
830 return 0; 927 return 0;
831 case TCFLSH: 928 case TCFLSH:
832 retval = tty_check_change(tty); 929 return tty_perform_flush(tty, arg);
833 if (retval)
834 return retval;
835
836 ld = tty_ldisc_ref(tty);
837 switch (arg) {
838 case TCIFLUSH:
839 if (ld && ld->flush_buffer)
840 ld->flush_buffer(tty);
841 break;
842 case TCIOFLUSH:
843 if (ld && ld->flush_buffer)
844 ld->flush_buffer(tty);
845 /* fall through */
846 case TCOFLUSH:
847 if (tty->driver->flush_buffer)
848 tty->driver->flush_buffer(tty);
849 break;
850 default:
851 tty_ldisc_deref(ld);
852 return -EINVAL;
853 }
854 tty_ldisc_deref(ld);
855 return 0;
856 case TIOCOUTQ: 930 case TIOCOUTQ:
857 return put_user(tty->driver->chars_in_buffer ? 931 return put_user(tty->driver->chars_in_buffer ?
858 tty->driver->chars_in_buffer(tty) : 0, 932 tty->driver->chars_in_buffer(tty) : 0,
@@ -862,32 +936,6 @@ int n_tty_ioctl(struct tty_struct * tty, struct file * file,
862 if (L_ICANON(tty)) 936 if (L_ICANON(tty))
863 retval = inq_canon(tty); 937 retval = inq_canon(tty);
864 return put_user(retval, (unsigned int __user *) arg); 938 return put_user(retval, (unsigned int __user *) arg);
865#ifndef TCGETS2
866 case TIOCGLCKTRMIOS:
867 if (kernel_termios_to_user_termios((struct termios __user *)arg, real_tty->termios_locked))
868 return -EFAULT;
869 return 0;
870
871 case TIOCSLCKTRMIOS:
872 if (!capable(CAP_SYS_ADMIN))
873 return -EPERM;
874 if (user_termios_to_kernel_termios(real_tty->termios_locked, (struct termios __user *) arg))
875 return -EFAULT;
876 return 0;
877#else
878 case TIOCGLCKTRMIOS:
879 if (kernel_termios_to_user_termios_1((struct termios __user *)arg, real_tty->termios_locked))
880 return -EFAULT;
881 return 0;
882
883 case TIOCSLCKTRMIOS:
884 if (!capable(CAP_SYS_ADMIN))
885 return -EPERM;
886 if (user_termios_to_kernel_termios_1(real_tty->termios_locked, (struct termios __user *) arg))
887 return -EFAULT;
888 return 0;
889#endif
890
891 case TIOCPKT: 939 case TIOCPKT:
892 { 940 {
893 int pktmode; 941 int pktmode;
@@ -906,19 +954,9 @@ int n_tty_ioctl(struct tty_struct * tty, struct file * file,
906 tty->packet = 0; 954 tty->packet = 0;
907 return 0; 955 return 0;
908 } 956 }
909 case TIOCGSOFTCAR:
910 return put_user(C_CLOCAL(tty) ? 1 : 0, (int __user *)arg);
911 case TIOCSSOFTCAR:
912 if (get_user(arg, (unsigned int __user *) arg))
913 return -EFAULT;
914 mutex_lock(&tty->termios_mutex);
915 tty->termios->c_cflag =
916 ((tty->termios->c_cflag & ~CLOCAL) |
917 (arg ? CLOCAL : 0));
918 mutex_unlock(&tty->termios_mutex);
919 return 0;
920 default: 957 default:
921 return -ENOIOCTLCMD; 958 /* Try the mode commands */
959 return tty_mode_ioctl(tty, file, cmd, arg);
922 } 960 }
923} 961}
924 962
diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c
index 5596df65c8ed..624ff3e082f6 100644
--- a/drivers/firewire/fw-sbp2.c
+++ b/drivers/firewire/fw-sbp2.c
@@ -650,13 +650,14 @@ static void sbp2_login(struct work_struct *work)
650 if (sbp2_send_management_orb(lu, node_id, generation, 650 if (sbp2_send_management_orb(lu, node_id, generation,
651 SBP2_LOGIN_REQUEST, lu->lun, &response) < 0) { 651 SBP2_LOGIN_REQUEST, lu->lun, &response) < 0) {
652 if (lu->retries++ < 5) { 652 if (lu->retries++ < 5) {
653 queue_delayed_work(sbp2_wq, &lu->work, 653 if (queue_delayed_work(sbp2_wq, &lu->work,
654 DIV_ROUND_UP(HZ, 5)); 654 DIV_ROUND_UP(HZ, 5)))
655 kref_get(&lu->tgt->kref);
655 } else { 656 } else {
656 fw_error("failed to login to %s LUN %04x\n", 657 fw_error("failed to login to %s LUN %04x\n",
657 unit->device.bus_id, lu->lun); 658 unit->device.bus_id, lu->lun);
658 kref_put(&lu->tgt->kref, sbp2_release_target);
659 } 659 }
660 kref_put(&lu->tgt->kref, sbp2_release_target);
660 return; 661 return;
661 } 662 }
662 663
@@ -914,7 +915,9 @@ static void sbp2_reconnect(struct work_struct *work)
914 lu->retries = 0; 915 lu->retries = 0;
915 PREPARE_DELAYED_WORK(&lu->work, sbp2_login); 916 PREPARE_DELAYED_WORK(&lu->work, sbp2_login);
916 } 917 }
917 queue_delayed_work(sbp2_wq, &lu->work, DIV_ROUND_UP(HZ, 5)); 918 if (queue_delayed_work(sbp2_wq, &lu->work, DIV_ROUND_UP(HZ, 5)))
919 kref_get(&lu->tgt->kref);
920 kref_put(&lu->tgt->kref, sbp2_release_target);
918 return; 921 return;
919 } 922 }
920 923
diff --git a/drivers/macintosh/windfarm_core.c b/drivers/macintosh/windfarm_core.c
index 516d943227e2..075b4d99e354 100644
--- a/drivers/macintosh/windfarm_core.c
+++ b/drivers/macintosh/windfarm_core.c
@@ -94,7 +94,9 @@ static int wf_thread_func(void *data)
94 DBG("wf: thread started\n"); 94 DBG("wf: thread started\n");
95 95
96 set_freezable(); 96 set_freezable();
97 while(!kthread_should_stop()) { 97 while (!kthread_should_stop()) {
98 try_to_freeze();
99
98 if (time_after_eq(jiffies, next)) { 100 if (time_after_eq(jiffies, next)) {
99 wf_notify(WF_EVENT_TICK, NULL); 101 wf_notify(WF_EVENT_TICK, NULL);
100 if (wf_overtemp) { 102 if (wf_overtemp) {
@@ -116,12 +118,6 @@ static int wf_thread_func(void *data)
116 delay = next - jiffies; 118 delay = next - jiffies;
117 if (delay <= HZ) 119 if (delay <= HZ)
118 schedule_timeout_interruptible(delay); 120 schedule_timeout_interruptible(delay);
119
120 /* there should be no non-suspend signal, but oh well */
121 if (signal_pending(current) && !try_to_freeze()) {
122 printk(KERN_WARNING "windfarm: thread got sigl !\n");
123 break;
124 }
125 } 121 }
126 122
127 DBG("wf: thread stopped\n"); 123 DBG("wf: thread stopped\n");
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index 7c426d07a555..1b1ef3130e6e 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -1207,8 +1207,7 @@ int bitmap_startwrite(struct bitmap *bitmap, sector_t offset, unsigned long sect
1207 prepare_to_wait(&bitmap->overflow_wait, &__wait, 1207 prepare_to_wait(&bitmap->overflow_wait, &__wait,
1208 TASK_UNINTERRUPTIBLE); 1208 TASK_UNINTERRUPTIBLE);
1209 spin_unlock_irq(&bitmap->lock); 1209 spin_unlock_irq(&bitmap->lock);
1210 bitmap->mddev->queue 1210 blk_unplug(bitmap->mddev->queue);
1211 ->unplug_fn(bitmap->mddev->queue);
1212 schedule(); 1211 schedule();
1213 finish_wait(&bitmap->overflow_wait, &__wait); 1212 finish_wait(&bitmap->overflow_wait, &__wait);
1214 continue; 1213 continue;
diff --git a/drivers/md/dm-table.c b/drivers/md/dm-table.c
index 5a7eb650181e..e298d8d11f24 100644
--- a/drivers/md/dm-table.c
+++ b/drivers/md/dm-table.c
@@ -1000,8 +1000,7 @@ void dm_table_unplug_all(struct dm_table *t)
1000 struct dm_dev *dd = list_entry(d, struct dm_dev, list); 1000 struct dm_dev *dd = list_entry(d, struct dm_dev, list);
1001 struct request_queue *q = bdev_get_queue(dd->bdev); 1001 struct request_queue *q = bdev_get_queue(dd->bdev);
1002 1002
1003 if (q->unplug_fn) 1003 blk_unplug(q);
1004 q->unplug_fn(q);
1005 } 1004 }
1006} 1005}
1007 1006
diff --git a/drivers/md/linear.c b/drivers/md/linear.c
index 56a11f6c127b..3dac1cfb8189 100644
--- a/drivers/md/linear.c
+++ b/drivers/md/linear.c
@@ -87,8 +87,7 @@ static void linear_unplug(struct request_queue *q)
87 87
88 for (i=0; i < mddev->raid_disks; i++) { 88 for (i=0; i < mddev->raid_disks; i++) {
89 struct request_queue *r_queue = bdev_get_queue(conf->disks[i].rdev->bdev); 89 struct request_queue *r_queue = bdev_get_queue(conf->disks[i].rdev->bdev);
90 if (r_queue->unplug_fn) 90 blk_unplug(r_queue);
91 r_queue->unplug_fn(r_queue);
92 } 91 }
93} 92}
94 93
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 808cd9549456..cef9ebd5a046 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -5445,7 +5445,7 @@ void md_do_sync(mddev_t *mddev)
5445 * about not overloading the IO subsystem. (things like an 5445 * about not overloading the IO subsystem. (things like an
5446 * e2fsck being done on the RAID array should execute fast) 5446 * e2fsck being done on the RAID array should execute fast)
5447 */ 5447 */
5448 mddev->queue->unplug_fn(mddev->queue); 5448 blk_unplug(mddev->queue);
5449 cond_resched(); 5449 cond_resched();
5450 5450
5451 currspeed = ((unsigned long)(io_sectors-mddev->resync_mark_cnt))/2 5451 currspeed = ((unsigned long)(io_sectors-mddev->resync_mark_cnt))/2
@@ -5464,7 +5464,7 @@ void md_do_sync(mddev_t *mddev)
5464 * this also signals 'finished resyncing' to md_stop 5464 * this also signals 'finished resyncing' to md_stop
5465 */ 5465 */
5466 out: 5466 out:
5467 mddev->queue->unplug_fn(mddev->queue); 5467 blk_unplug(mddev->queue);
5468 5468
5469 wait_event(mddev->recovery_wait, !atomic_read(&mddev->recovery_active)); 5469 wait_event(mddev->recovery_wait, !atomic_read(&mddev->recovery_active));
5470 5470
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c
index b35731cceac6..eb631ebed686 100644
--- a/drivers/md/multipath.c
+++ b/drivers/md/multipath.c
@@ -125,8 +125,7 @@ static void unplug_slaves(mddev_t *mddev)
125 atomic_inc(&rdev->nr_pending); 125 atomic_inc(&rdev->nr_pending);
126 rcu_read_unlock(); 126 rcu_read_unlock();
127 127
128 if (r_queue->unplug_fn) 128 blk_unplug(r_queue);
129 r_queue->unplug_fn(r_queue);
130 129
131 rdev_dec_pending(rdev, mddev); 130 rdev_dec_pending(rdev, mddev);
132 rcu_read_lock(); 131 rcu_read_lock();
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index c111105fc2dc..f8e591708d1f 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -35,8 +35,7 @@ static void raid0_unplug(struct request_queue *q)
35 for (i=0; i<mddev->raid_disks; i++) { 35 for (i=0; i<mddev->raid_disks; i++) {
36 struct request_queue *r_queue = bdev_get_queue(devlist[i]->bdev); 36 struct request_queue *r_queue = bdev_get_queue(devlist[i]->bdev);
37 37
38 if (r_queue->unplug_fn) 38 blk_unplug(r_queue);
39 r_queue->unplug_fn(r_queue);
40 } 39 }
41} 40}
42 41
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 85478d6a9c1a..4a69c416e045 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -549,8 +549,7 @@ static void unplug_slaves(mddev_t *mddev)
549 atomic_inc(&rdev->nr_pending); 549 atomic_inc(&rdev->nr_pending);
550 rcu_read_unlock(); 550 rcu_read_unlock();
551 551
552 if (r_queue->unplug_fn) 552 blk_unplug(r_queue);
553 r_queue->unplug_fn(r_queue);
554 553
555 rdev_dec_pending(rdev, mddev); 554 rdev_dec_pending(rdev, mddev);
556 rcu_read_lock(); 555 rcu_read_lock();
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index fc6607acb6e4..5cdcc9386200 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -593,8 +593,7 @@ static void unplug_slaves(mddev_t *mddev)
593 atomic_inc(&rdev->nr_pending); 593 atomic_inc(&rdev->nr_pending);
594 rcu_read_unlock(); 594 rcu_read_unlock();
595 595
596 if (r_queue->unplug_fn) 596 blk_unplug(r_queue);
597 r_queue->unplug_fn(r_queue);
598 597
599 rdev_dec_pending(rdev, mddev); 598 rdev_dec_pending(rdev, mddev);
600 rcu_read_lock(); 599 rcu_read_lock();
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 82af3465a900..1cfc984cc7b7 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -3186,8 +3186,7 @@ static void unplug_slaves(mddev_t *mddev)
3186 atomic_inc(&rdev->nr_pending); 3186 atomic_inc(&rdev->nr_pending);
3187 rcu_read_unlock(); 3187 rcu_read_unlock();
3188 3188
3189 if (r_queue->unplug_fn) 3189 blk_unplug(r_queue);
3190 r_queue->unplug_fn(r_queue);
3191 3190
3192 rdev_dec_pending(rdev, mddev); 3191 rdev_dec_pending(rdev, mddev);
3193 rcu_read_lock(); 3192 rcu_read_lock();
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c
index 9203a0b221b3..1b9c9b6da5b7 100644
--- a/drivers/mmc/card/queue.c
+++ b/drivers/mmc/card/queue.c
@@ -310,7 +310,7 @@ static void copy_sg(struct scatterlist *dst, unsigned int dst_len,
310 } 310 }
311 311
312 if (src_size == 0) { 312 if (src_size == 0) {
313 src_buf = sg_virt(dst); 313 src_buf = sg_virt(src);
314 src_size = src->length; 314 src_size = src->length;
315 } 315 }
316 316
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 5f800a6dd978..cb581ebbe3c5 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -136,10 +136,11 @@ config TUN
136 If you don't know what to use this for, you don't need it. 136 If you don't know what to use this for, you don't need it.
137 137
138config VETH 138config VETH
139 tristate "Virtual ethernet device" 139 tristate "Virtual ethernet pair device"
140 ---help--- 140 ---help---
141 The device is an ethernet tunnel. Devices are created in pairs. When 141 This device is a local ethernet tunnel. Devices are created in pairs.
142 one end receives the packet it appears on its pair and vice versa. 142 When one end receives the packet it appears on its pair and vice
143 versa.
143 144
144config NET_SB1000 145config NET_SB1000
145 tristate "General Instruments Surfboard 1000" 146 tristate "General Instruments Surfboard 1000"
diff --git a/drivers/net/hamradio/6pack.c b/drivers/net/hamradio/6pack.c
index e0119f6a3319..580cb4ab2af1 100644
--- a/drivers/net/hamradio/6pack.c
+++ b/drivers/net/hamradio/6pack.c
@@ -762,26 +762,20 @@ static int sixpack_ioctl(struct tty_struct *tty, struct file *file,
762 762
763 if (copy_from_user(&addr, 763 if (copy_from_user(&addr,
764 (void __user *) arg, AX25_ADDR_LEN)) { 764 (void __user *) arg, AX25_ADDR_LEN)) {
765 err = -EFAULT; 765 err = -EFAULT;
766 break; 766 break;
767 } 767 }
768 768
769 netif_tx_lock_bh(dev); 769 netif_tx_lock_bh(dev);
770 memcpy(dev->dev_addr, &addr, AX25_ADDR_LEN); 770 memcpy(dev->dev_addr, &addr, AX25_ADDR_LEN);
771 netif_tx_unlock_bh(dev); 771 netif_tx_unlock_bh(dev);
772 772
773 err = 0; 773 err = 0;
774 break; 774 break;
775 } 775 }
776
777 /* Allow stty to read, but not set, the serial port */
778 case TCGETS:
779 case TCGETA:
780 err = n_tty_ioctl(tty, (struct file *) file, cmd, arg);
781 break;
782 776
783 default: 777 default:
784 err = -ENOIOCTLCMD; 778 err = tty_mode_ioctl(tty, file, cmd, arg);
785 } 779 }
786 780
787 sp_put(sp); 781 sp_put(sp);
diff --git a/drivers/net/irda/irtty-sir.c b/drivers/net/irda/irtty-sir.c
index 2c6f7be36e8a..fc753d7f674e 100644
--- a/drivers/net/irda/irtty-sir.c
+++ b/drivers/net/irda/irtty-sir.c
@@ -434,11 +434,6 @@ static int irtty_ioctl(struct tty_struct *tty, struct file *file, unsigned int c
434 IRDA_ASSERT(dev != NULL, return -1;); 434 IRDA_ASSERT(dev != NULL, return -1;);
435 435
436 switch (cmd) { 436 switch (cmd) {
437 case TCGETS:
438 case TCGETA:
439 err = n_tty_ioctl(tty, file, cmd, arg);
440 break;
441
442 case IRTTY_IOCTDONGLE: 437 case IRTTY_IOCTDONGLE:
443 /* this call blocks for completion */ 438 /* this call blocks for completion */
444 err = sirdev_set_dongle(dev, (IRDA_DONGLE) arg); 439 err = sirdev_set_dongle(dev, (IRDA_DONGLE) arg);
@@ -454,7 +449,7 @@ static int irtty_ioctl(struct tty_struct *tty, struct file *file, unsigned int c
454 err = -EFAULT; 449 err = -EFAULT;
455 break; 450 break;
456 default: 451 default:
457 err = -ENOIOCTLCMD; 452 err = tty_mode_ioctl(tty, file, cmd, arg);
458 break; 453 break;
459 } 454 }
460 return err; 455 return err;
diff --git a/drivers/net/ppp_async.c b/drivers/net/ppp_async.c
index 27f5b904f48e..8d278c87ba48 100644
--- a/drivers/net/ppp_async.c
+++ b/drivers/net/ppp_async.c
@@ -309,16 +309,11 @@ ppp_asynctty_ioctl(struct tty_struct *tty, struct file *file,
309 err = 0; 309 err = 0;
310 break; 310 break;
311 311
312 case TCGETS:
313 case TCGETA:
314 err = n_tty_ioctl(tty, file, cmd, arg);
315 break;
316
317 case TCFLSH: 312 case TCFLSH:
318 /* flush our buffers and the serial port's buffer */ 313 /* flush our buffers and the serial port's buffer */
319 if (arg == TCIOFLUSH || arg == TCOFLUSH) 314 if (arg == TCIOFLUSH || arg == TCOFLUSH)
320 ppp_async_flush_output(ap); 315 ppp_async_flush_output(ap);
321 err = n_tty_ioctl(tty, file, cmd, arg); 316 err = tty_perform_flush(tty, arg);
322 break; 317 break;
323 318
324 case FIONREAD: 319 case FIONREAD:
@@ -329,7 +324,8 @@ ppp_asynctty_ioctl(struct tty_struct *tty, struct file *file,
329 break; 324 break;
330 325
331 default: 326 default:
332 err = -ENOIOCTLCMD; 327 /* Try the various mode ioctls */
328 err = tty_mode_ioctl(tty, file, cmd, arg);
333 } 329 }
334 330
335 ap_put(ap); 331 ap_put(ap);
diff --git a/drivers/net/ppp_synctty.c b/drivers/net/ppp_synctty.c
index ce64032a465a..00e2fb48b4ae 100644
--- a/drivers/net/ppp_synctty.c
+++ b/drivers/net/ppp_synctty.c
@@ -349,16 +349,11 @@ ppp_synctty_ioctl(struct tty_struct *tty, struct file *file,
349 err = 0; 349 err = 0;
350 break; 350 break;
351 351
352 case TCGETS:
353 case TCGETA:
354 err = n_tty_ioctl(tty, file, cmd, arg);
355 break;
356
357 case TCFLSH: 352 case TCFLSH:
358 /* flush our buffers and the serial port's buffer */ 353 /* flush our buffers and the serial port's buffer */
359 if (arg == TCIOFLUSH || arg == TCOFLUSH) 354 if (arg == TCIOFLUSH || arg == TCOFLUSH)
360 ppp_sync_flush_output(ap); 355 ppp_sync_flush_output(ap);
361 err = n_tty_ioctl(tty, file, cmd, arg); 356 err = tty_perform_flush(tty, arg);
362 break; 357 break;
363 358
364 case FIONREAD: 359 case FIONREAD:
@@ -369,7 +364,8 @@ ppp_synctty_ioctl(struct tty_struct *tty, struct file *file,
369 break; 364 break;
370 365
371 default: 366 default:
372 err = -ENOIOCTLCMD; 367 err = tty_mode_ioctl(tty, file, cmd, arg);
368 break;
373 } 369 }
374 370
375 sp_put(ap); 371 sp_put(ap);
diff --git a/drivers/net/pppol2tp.c b/drivers/net/pppol2tp.c
index f8904fd92369..a7556cd2df79 100644
--- a/drivers/net/pppol2tp.c
+++ b/drivers/net/pppol2tp.c
@@ -488,7 +488,7 @@ static int pppol2tp_recv_core(struct sock *sock, struct sk_buff *skb)
488{ 488{
489 struct pppol2tp_session *session = NULL; 489 struct pppol2tp_session *session = NULL;
490 struct pppol2tp_tunnel *tunnel; 490 struct pppol2tp_tunnel *tunnel;
491 unsigned char *ptr; 491 unsigned char *ptr, *optr;
492 u16 hdrflags; 492 u16 hdrflags;
493 u16 tunnel_id, session_id; 493 u16 tunnel_id, session_id;
494 int length; 494 int length;
@@ -496,7 +496,7 @@ static int pppol2tp_recv_core(struct sock *sock, struct sk_buff *skb)
496 496
497 tunnel = pppol2tp_sock_to_tunnel(sock); 497 tunnel = pppol2tp_sock_to_tunnel(sock);
498 if (tunnel == NULL) 498 if (tunnel == NULL)
499 goto error; 499 goto no_tunnel;
500 500
501 /* UDP always verifies the packet length. */ 501 /* UDP always verifies the packet length. */
502 __skb_pull(skb, sizeof(struct udphdr)); 502 __skb_pull(skb, sizeof(struct udphdr));
@@ -509,7 +509,7 @@ static int pppol2tp_recv_core(struct sock *sock, struct sk_buff *skb)
509 } 509 }
510 510
511 /* Point to L2TP header */ 511 /* Point to L2TP header */
512 ptr = skb->data; 512 optr = ptr = skb->data;
513 513
514 /* Get L2TP header flags */ 514 /* Get L2TP header flags */
515 hdrflags = ntohs(*(__be16*)ptr); 515 hdrflags = ntohs(*(__be16*)ptr);
@@ -637,12 +637,14 @@ static int pppol2tp_recv_core(struct sock *sock, struct sk_buff *skb)
637 /* If offset bit set, skip it. */ 637 /* If offset bit set, skip it. */
638 if (hdrflags & L2TP_HDRFLAG_O) { 638 if (hdrflags & L2TP_HDRFLAG_O) {
639 offset = ntohs(*(__be16 *)ptr); 639 offset = ntohs(*(__be16 *)ptr);
640 skb->transport_header += 2 + offset; 640 ptr += 2 + offset;
641 if (!pskb_may_pull(skb, skb_transport_offset(skb) + 2))
642 goto discard;
643 } 641 }
644 642
645 __skb_pull(skb, skb_transport_offset(skb)); 643 offset = ptr - optr;
644 if (!pskb_may_pull(skb, offset))
645 goto discard;
646
647 __skb_pull(skb, offset);
646 648
647 /* Skip PPP header, if present. In testing, Microsoft L2TP clients 649 /* Skip PPP header, if present. In testing, Microsoft L2TP clients
648 * don't send the PPP header (PPP header compression enabled), but 650 * don't send the PPP header (PPP header compression enabled), but
@@ -652,6 +654,9 @@ static int pppol2tp_recv_core(struct sock *sock, struct sk_buff *skb)
652 * Note that skb->data[] isn't dereferenced from a u16 ptr here since 654 * Note that skb->data[] isn't dereferenced from a u16 ptr here since
653 * the field may be unaligned. 655 * the field may be unaligned.
654 */ 656 */
657 if (!pskb_may_pull(skb, 2))
658 goto discard;
659
655 if ((skb->data[0] == 0xff) && (skb->data[1] == 0x03)) 660 if ((skb->data[0] == 0xff) && (skb->data[1] == 0x03))
656 skb_pull(skb, 2); 661 skb_pull(skb, 2);
657 662
@@ -709,6 +714,10 @@ discard:
709 return 0; 714 return 0;
710 715
711error: 716error:
717 /* Put UDP header back */
718 __skb_push(skb, sizeof(struct udphdr));
719
720no_tunnel:
712 return 1; 721 return 1;
713} 722}
714 723
@@ -1050,6 +1059,8 @@ static int pppol2tp_xmit(struct ppp_channel *chan, struct sk_buff *skb)
1050 /* Get routing info from the tunnel socket */ 1059 /* Get routing info from the tunnel socket */
1051 dst_release(skb->dst); 1060 dst_release(skb->dst);
1052 skb->dst = sk_dst_get(sk_tun); 1061 skb->dst = sk_dst_get(sk_tun);
1062 skb_orphan(skb);
1063 skb->sk = sk_tun;
1053 1064
1054 /* Queue the packet to IP for output */ 1065 /* Queue the packet to IP for output */
1055 len = skb->len; 1066 len = skb->len;
diff --git a/drivers/net/rrunner.c b/drivers/net/rrunner.c
index b822859c8de3..73a7e6529ee0 100644
--- a/drivers/net/rrunner.c
+++ b/drivers/net/rrunner.c
@@ -78,12 +78,6 @@ static char version[] __devinitdata = "rrunner.c: v0.50 11/11/2002 Jes Sorensen
78 * stack will need to know about I/O vectors or something similar. 78 * stack will need to know about I/O vectors or something similar.
79 */ 79 */
80 80
81/*
82 * sysctl_[wr]mem_max are checked at init time to see if they are at
83 * least 256KB and increased to 256KB if they are not. This is done to
84 * avoid ending up with socket buffers smaller than the MTU size,
85 */
86
87static int __devinit rr_init_one(struct pci_dev *pdev, 81static int __devinit rr_init_one(struct pci_dev *pdev,
88 const struct pci_device_id *ent) 82 const struct pci_device_id *ent)
89{ 83{
@@ -561,18 +555,6 @@ static int __devinit rr_init(struct net_device *dev)
561 sram_size = rr_read_eeprom_word(rrpriv, (void *)8); 555 sram_size = rr_read_eeprom_word(rrpriv, (void *)8);
562 printk(" SRAM size 0x%06x\n", sram_size); 556 printk(" SRAM size 0x%06x\n", sram_size);
563 557
564 if (sysctl_rmem_max < 262144){
565 printk(" Receive socket buffer limit too low (%i), "
566 "setting to 262144\n", sysctl_rmem_max);
567 sysctl_rmem_max = 262144;
568 }
569
570 if (sysctl_wmem_max < 262144){
571 printk(" Transmit socket buffer limit too low (%i), "
572 "setting to 262144\n", sysctl_wmem_max);
573 sysctl_wmem_max = 262144;
574 }
575
576 return 0; 558 return 0;
577} 559}
578 560
diff --git a/drivers/net/slip.c b/drivers/net/slip.c
index 335b7cc80eba..251a3ce376ac 100644
--- a/drivers/net/slip.c
+++ b/drivers/net/slip.c
@@ -1218,14 +1218,8 @@ static int slip_ioctl(struct tty_struct *tty, struct file *file, unsigned int cm
1218 return 0; 1218 return 0;
1219 /* VSV changes end */ 1219 /* VSV changes end */
1220#endif 1220#endif
1221
1222 /* Allow stty to read, but not set, the serial port */
1223 case TCGETS:
1224 case TCGETA:
1225 return n_tty_ioctl(tty, file, cmd, arg);
1226
1227 default: 1221 default:
1228 return -ENOIOCTLCMD; 1222 return tty_mode_ioctl(tty, file, cmd, arg);
1229 } 1223 }
1230} 1224}
1231 1225
diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig
index 5a96d74e4ce8..a12c9c41b217 100644
--- a/drivers/net/usb/Kconfig
+++ b/drivers/net/usb/Kconfig
@@ -93,13 +93,9 @@ config USB_RTL8150
93 To compile this driver as a module, choose M here: the 93 To compile this driver as a module, choose M here: the
94 module will be called rtl8150. 94 module will be called rtl8150.
95 95
96config USB_USBNET_MII
97 tristate
98 default n
99
100config USB_USBNET 96config USB_USBNET
101 tristate "Multi-purpose USB Networking Framework" 97 tristate "Multi-purpose USB Networking Framework"
102 select MII if USB_USBNET_MII != n 98 select MII
103 ---help--- 99 ---help---
104 This driver supports several kinds of network links over USB, 100 This driver supports several kinds of network links over USB,
105 with "minidrivers" built around a common network driver core 101 with "minidrivers" built around a common network driver core
@@ -135,7 +131,6 @@ config USB_NET_AX8817X
135 tristate "ASIX AX88xxx Based USB 2.0 Ethernet Adapters" 131 tristate "ASIX AX88xxx Based USB 2.0 Ethernet Adapters"
136 depends on USB_USBNET && NET_ETHERNET 132 depends on USB_USBNET && NET_ETHERNET
137 select CRC32 133 select CRC32
138 select USB_USBNET_MII
139 default y 134 default y
140 help 135 help
141 This option adds support for ASIX AX88xxx based USB 2.0 136 This option adds support for ASIX AX88xxx based USB 2.0
@@ -190,7 +185,6 @@ config USB_NET_DM9601
190 tristate "Davicom DM9601 based USB 1.1 10/100 ethernet devices" 185 tristate "Davicom DM9601 based USB 1.1 10/100 ethernet devices"
191 depends on USB_USBNET 186 depends on USB_USBNET
192 select CRC32 187 select CRC32
193 select USB_USBNET_MII
194 help 188 help
195 This option adds support for Davicom DM9601 based USB 1.1 189 This option adds support for Davicom DM9601 based USB 1.1
196 10/100 Ethernet adapters. 190 10/100 Ethernet adapters.
@@ -225,7 +219,6 @@ config USB_NET_PLUSB
225config USB_NET_MCS7830 219config USB_NET_MCS7830
226 tristate "MosChip MCS7830 based Ethernet adapters" 220 tristate "MosChip MCS7830 based Ethernet adapters"
227 depends on USB_USBNET 221 depends on USB_USBNET
228 select USB_USBNET_MII
229 help 222 help
230 Choose this option if you're using a 10/100 Ethernet USB2 223 Choose this option if you're using a 10/100 Ethernet USB2
231 adapter based on the MosChip 7830 controller. This includes 224 adapter based on the MosChip 7830 controller. This includes
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index acd5f1c0e63a..8ed1fc5cbc70 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -683,9 +683,6 @@ done_nopm:
683 * they'll probably want to use this base set. 683 * they'll probably want to use this base set.
684 */ 684 */
685 685
686#if defined(CONFIG_MII) || defined(CONFIG_MII_MODULE)
687#define HAVE_MII
688
689int usbnet_get_settings (struct net_device *net, struct ethtool_cmd *cmd) 686int usbnet_get_settings (struct net_device *net, struct ethtool_cmd *cmd)
690{ 687{
691 struct usbnet *dev = netdev_priv(net); 688 struct usbnet *dev = netdev_priv(net);
@@ -744,8 +741,6 @@ int usbnet_nway_reset(struct net_device *net)
744} 741}
745EXPORT_SYMBOL_GPL(usbnet_nway_reset); 742EXPORT_SYMBOL_GPL(usbnet_nway_reset);
746 743
747#endif /* HAVE_MII */
748
749void usbnet_get_drvinfo (struct net_device *net, struct ethtool_drvinfo *info) 744void usbnet_get_drvinfo (struct net_device *net, struct ethtool_drvinfo *info)
750{ 745{
751 struct usbnet *dev = netdev_priv(net); 746 struct usbnet *dev = netdev_priv(net);
@@ -776,12 +771,10 @@ EXPORT_SYMBOL_GPL(usbnet_set_msglevel);
776 771
777/* drivers may override default ethtool_ops in their bind() routine */ 772/* drivers may override default ethtool_ops in their bind() routine */
778static struct ethtool_ops usbnet_ethtool_ops = { 773static struct ethtool_ops usbnet_ethtool_ops = {
779#ifdef HAVE_MII
780 .get_settings = usbnet_get_settings, 774 .get_settings = usbnet_get_settings,
781 .set_settings = usbnet_set_settings, 775 .set_settings = usbnet_set_settings,
782 .get_link = usbnet_get_link, 776 .get_link = usbnet_get_link,
783 .nway_reset = usbnet_nway_reset, 777 .nway_reset = usbnet_nway_reset,
784#endif
785 .get_drvinfo = usbnet_get_drvinfo, 778 .get_drvinfo = usbnet_get_drvinfo,
786 .get_msglevel = usbnet_get_msglevel, 779 .get_msglevel = usbnet_get_msglevel,
787 .set_msglevel = usbnet_set_msglevel, 780 .set_msglevel = usbnet_set_msglevel,
diff --git a/drivers/net/wan/x25_asy.c b/drivers/net/wan/x25_asy.c
index c48b1cc63fd5..1e89d4de1bb7 100644
--- a/drivers/net/wan/x25_asy.c
+++ b/drivers/net/wan/x25_asy.c
@@ -719,12 +719,8 @@ static int x25_asy_ioctl(struct tty_struct *tty, struct file *file,
719 return 0; 719 return 0;
720 case SIOCSIFHWADDR: 720 case SIOCSIFHWADDR:
721 return -EINVAL; 721 return -EINVAL;
722 /* Allow stty to read, but not set, the serial port */
723 case TCGETS:
724 case TCGETA:
725 return n_tty_ioctl(tty, file, cmd, arg);
726 default: 722 default:
727 return -ENOIOCTLCMD; 723 return tty_mode_ioctl(tty, file, cmd, arg);
728 } 724 }
729} 725}
730 726
diff --git a/drivers/net/wireless/strip.c b/drivers/net/wireless/strip.c
index 4bd14b331862..88efe1bae58f 100644
--- a/drivers/net/wireless/strip.c
+++ b/drivers/net/wireless/strip.c
@@ -2735,16 +2735,8 @@ static int strip_ioctl(struct tty_struct *tty, struct file *file,
2735 return -EFAULT; 2735 return -EFAULT;
2736 return set_mac_address(strip_info, &addr); 2736 return set_mac_address(strip_info, &addr);
2737 } 2737 }
2738 /*
2739 * Allow stty to read, but not set, the serial port
2740 */
2741
2742 case TCGETS:
2743 case TCGETA:
2744 return n_tty_ioctl(tty, file, cmd, arg);
2745 break;
2746 default: 2738 default:
2747 return -ENOIOCTLCMD; 2739 return tty_mode_ioctl(tty, file, cmd, arg);
2748 break; 2740 break;
2749 } 2741 }
2750 return 0; 2742 return 0;
diff --git a/drivers/serial/uartlite.c b/drivers/serial/uartlite.c
index dfef83f14960..a85f2d31a686 100644
--- a/drivers/serial/uartlite.c
+++ b/drivers/serial/uartlite.c
@@ -329,12 +329,14 @@ static struct uart_ops ulite_ops = {
329static void ulite_console_wait_tx(struct uart_port *port) 329static void ulite_console_wait_tx(struct uart_port *port)
330{ 330{
331 int i; 331 int i;
332 u8 val;
332 333
333 /* wait up to 10ms for the character(s) to be sent */ 334 /* Spin waiting for TX fifo to have space available */
334 for (i = 0; i < 10000; i++) { 335 for (i = 0; i < 100000; i++) {
335 if (readb(port->membase + ULITE_STATUS) & ULITE_STATUS_TXEMPTY) 336 val = readb(port->membase + ULITE_STATUS);
337 if ((val & ULITE_STATUS_TXFULL) == 0)
336 break; 338 break;
337 udelay(1); 339 cpu_relax();
338 } 340 }
339} 341}
340 342
diff --git a/drivers/video/cyber2000fb.c b/drivers/video/cyber2000fb.c
index 5fb8675e0d6b..d0e4cb618269 100644
--- a/drivers/video/cyber2000fb.c
+++ b/drivers/video/cyber2000fb.c
@@ -874,6 +874,8 @@ static int cyber2000fb_set_par(struct fb_info *info)
874 default: 874 default:
875 BUG(); 875 BUG();
876 } 876 }
877 break;
878
877 case 24:/* TRUECOLOUR, 16m */ 879 case 24:/* TRUECOLOUR, 16m */
878 hw.co_pixfmt = CO_PIXFMT_24BPP; 880 hw.co_pixfmt = CO_PIXFMT_24BPP;
879 hw.width *= 3; 881 hw.width *= 3;
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index 58bf3f5cdbe2..e9923ca9c2d9 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -1062,7 +1062,7 @@ static int sctp_listen_for_all(void)
1062 subscribe.sctp_shutdown_event = 1; 1062 subscribe.sctp_shutdown_event = 1;
1063 subscribe.sctp_partial_delivery_event = 1; 1063 subscribe.sctp_partial_delivery_event = 1;
1064 1064
1065 result = kernel_setsockopt(sock, SOL_SOCKET, SO_RCVBUF, 1065 result = kernel_setsockopt(sock, SOL_SOCKET, SO_RCVBUFFORCE,
1066 (char *)&bufsize, sizeof(bufsize)); 1066 (char *)&bufsize, sizeof(bufsize));
1067 if (result) 1067 if (result)
1068 log_print("Error increasing buffer space on socket %d", result); 1068 log_print("Error increasing buffer space on socket %d", result);
@@ -1454,10 +1454,6 @@ int dlm_lowcomms_start(void)
1454 if (!con_cache) 1454 if (!con_cache)
1455 goto out; 1455 goto out;
1456 1456
1457 /* Set some sysctl minima */
1458 if (sysctl_rmem_max < NEEDED_RMEM)
1459 sysctl_rmem_max = NEEDED_RMEM;
1460
1461 /* Start listening */ 1457 /* Start listening */
1462 if (dlm_config.ci_protocol == 0) 1458 if (dlm_config.ci_protocol == 0)
1463 error = tcp_listen_for_all(); 1459 error = tcp_listen_for_all();
diff --git a/fs/ioprio.c b/fs/ioprio.c
index d6ff77e8e7ec..e4e01bc7f338 100644
--- a/fs/ioprio.c
+++ b/fs/ioprio.c
@@ -78,6 +78,10 @@ asmlinkage long sys_ioprio_set(int which, int who, int ioprio)
78 if (!capable(CAP_SYS_ADMIN)) 78 if (!capable(CAP_SYS_ADMIN))
79 return -EPERM; 79 return -EPERM;
80 break; 80 break;
81 case IOPRIO_CLASS_NONE:
82 if (data)
83 return -EINVAL;
84 break;
81 default: 85 default:
82 return -EINVAL; 86 return -EINVAL;
83 } 87 }
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c
index 4ba7f0bdc248..ce62c152823d 100644
--- a/fs/ocfs2/alloc.c
+++ b/fs/ocfs2/alloc.c
@@ -3946,7 +3946,7 @@ static int __ocfs2_mark_extent_written(struct inode *inode,
3946 struct ocfs2_merge_ctxt ctxt; 3946 struct ocfs2_merge_ctxt ctxt;
3947 struct ocfs2_extent_list *rightmost_el; 3947 struct ocfs2_extent_list *rightmost_el;
3948 3948
3949 if (!rec->e_flags & OCFS2_EXT_UNWRITTEN) { 3949 if (!(rec->e_flags & OCFS2_EXT_UNWRITTEN)) {
3950 ret = -EIO; 3950 ret = -EIO;
3951 mlog_errno(ret); 3951 mlog_errno(ret);
3952 goto out; 3952 goto out;
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
index c69c1b300155..556e34ccb005 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -729,6 +729,27 @@ static void ocfs2_clear_page_regions(struct page *page,
729} 729}
730 730
731/* 731/*
732 * Nonsparse file systems fully allocate before we get to the write
733 * code. This prevents ocfs2_write() from tagging the write as an
734 * allocating one, which means ocfs2_map_page_blocks() might try to
735 * read-in the blocks at the tail of our file. Avoid reading them by
736 * testing i_size against each block offset.
737 */
738static int ocfs2_should_read_blk(struct inode *inode, struct page *page,
739 unsigned int block_start)
740{
741 u64 offset = page_offset(page) + block_start;
742
743 if (ocfs2_sparse_alloc(OCFS2_SB(inode->i_sb)))
744 return 1;
745
746 if (i_size_read(inode) > offset)
747 return 1;
748
749 return 0;
750}
751
752/*
732 * Some of this taken from block_prepare_write(). We already have our 753 * Some of this taken from block_prepare_write(). We already have our
733 * mapping by now though, and the entire write will be allocating or 754 * mapping by now though, and the entire write will be allocating or
734 * it won't, so not much need to use BH_New. 755 * it won't, so not much need to use BH_New.
@@ -781,6 +802,7 @@ int ocfs2_map_page_blocks(struct page *page, u64 *p_blkno,
781 set_buffer_uptodate(bh); 802 set_buffer_uptodate(bh);
782 } else if (!buffer_uptodate(bh) && !buffer_delay(bh) && 803 } else if (!buffer_uptodate(bh) && !buffer_delay(bh) &&
783 !buffer_new(bh) && 804 !buffer_new(bh) &&
805 ocfs2_should_read_blk(inode, page, block_start) &&
784 (block_start < from || block_end > to)) { 806 (block_start < from || block_end > to)) {
785 ll_rw_block(READ, 1, &bh); 807 ll_rw_block(READ, 1, &bh);
786 *wait_bh++=bh; 808 *wait_bh++=bh;
diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c
index 9cc7c0418b70..f02ccb34604d 100644
--- a/fs/ocfs2/cluster/heartbeat.c
+++ b/fs/ocfs2/cluster/heartbeat.c
@@ -267,7 +267,7 @@ static struct bio *o2hb_setup_one_bio(struct o2hb_region *reg,
267 current_page = cs / spp; 267 current_page = cs / spp;
268 page = reg->hr_slot_data[current_page]; 268 page = reg->hr_slot_data[current_page];
269 269
270 vec_len = min(PAGE_CACHE_SIZE, 270 vec_len = min(PAGE_CACHE_SIZE - vec_start,
271 (max_slots-cs) * (PAGE_CACHE_SIZE/spp) ); 271 (max_slots-cs) * (PAGE_CACHE_SIZE/spp) );
272 272
273 mlog(ML_HB_BIO, "page %d, vec_len = %u, vec_start = %u\n", 273 mlog(ML_HB_BIO, "page %d, vec_len = %u, vec_start = %u\n",
diff --git a/fs/ocfs2/dcache.c b/fs/ocfs2/dcache.c
index 3094ddb7a254..1957a5ed219e 100644
--- a/fs/ocfs2/dcache.c
+++ b/fs/ocfs2/dcache.c
@@ -318,9 +318,9 @@ out_attach:
318static void ocfs2_drop_dentry_lock(struct ocfs2_super *osb, 318static void ocfs2_drop_dentry_lock(struct ocfs2_super *osb,
319 struct ocfs2_dentry_lock *dl) 319 struct ocfs2_dentry_lock *dl)
320{ 320{
321 iput(dl->dl_inode);
321 ocfs2_simple_drop_lockres(osb, &dl->dl_lockres); 322 ocfs2_simple_drop_lockres(osb, &dl->dl_lockres);
322 ocfs2_lock_res_free(&dl->dl_lockres); 323 ocfs2_lock_res_free(&dl->dl_lockres);
323 iput(dl->dl_inode);
324 kfree(dl); 324 kfree(dl);
325} 325}
326 326
diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c
index 6a2f143e269c..63b28fdceb4a 100644
--- a/fs/ocfs2/dir.c
+++ b/fs/ocfs2/dir.c
@@ -208,9 +208,9 @@ out:
208 return NULL; 208 return NULL;
209} 209}
210 210
211struct buffer_head *ocfs2_find_entry_el(const char *name, int namelen, 211static struct buffer_head *ocfs2_find_entry_el(const char *name, int namelen,
212 struct inode *dir, 212 struct inode *dir,
213 struct ocfs2_dir_entry **res_dir) 213 struct ocfs2_dir_entry **res_dir)
214{ 214{
215 struct super_block *sb; 215 struct super_block *sb;
216 struct buffer_head *bh_use[NAMEI_RA_SIZE]; 216 struct buffer_head *bh_use[NAMEI_RA_SIZE];
diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c
index 41c76ff2fcfb..4e97dcceaf8f 100644
--- a/fs/ocfs2/dlmglue.c
+++ b/fs/ocfs2/dlmglue.c
@@ -670,7 +670,7 @@ static inline void ocfs2_generic_handle_attach_action(struct ocfs2_lock_res *loc
670{ 670{
671 mlog_entry_void(); 671 mlog_entry_void();
672 672
673 BUG_ON((!lockres->l_flags & OCFS2_LOCK_BUSY)); 673 BUG_ON((!(lockres->l_flags & OCFS2_LOCK_BUSY)));
674 BUG_ON(lockres->l_flags & OCFS2_LOCK_ATTACHED); 674 BUG_ON(lockres->l_flags & OCFS2_LOCK_ATTACHED);
675 675
676 if (lockres->l_requested > LKM_NLMODE && 676 if (lockres->l_requested > LKM_NLMODE &&
@@ -980,18 +980,6 @@ again:
980 goto unlock; 980 goto unlock;
981 } 981 }
982 982
983 if (!(lockres->l_flags & OCFS2_LOCK_ATTACHED)) {
984 /* lock has not been created yet. */
985 spin_unlock_irqrestore(&lockres->l_lock, flags);
986
987 ret = ocfs2_lock_create(osb, lockres, LKM_NLMODE, 0);
988 if (ret < 0) {
989 mlog_errno(ret);
990 goto out;
991 }
992 goto again;
993 }
994
995 if (lockres->l_flags & OCFS2_LOCK_BLOCKED && 983 if (lockres->l_flags & OCFS2_LOCK_BLOCKED &&
996 !ocfs2_may_continue_on_blocked_lock(lockres, level)) { 984 !ocfs2_may_continue_on_blocked_lock(lockres, level)) {
997 /* is the lock is currently blocked on behalf of 985 /* is the lock is currently blocked on behalf of
@@ -1006,7 +994,14 @@ again:
1006 mlog(ML_ERROR, "lockres %s has action %u pending\n", 994 mlog(ML_ERROR, "lockres %s has action %u pending\n",
1007 lockres->l_name, lockres->l_action); 995 lockres->l_name, lockres->l_action);
1008 996
1009 lockres->l_action = OCFS2_AST_CONVERT; 997 if (!(lockres->l_flags & OCFS2_LOCK_ATTACHED)) {
998 lockres->l_action = OCFS2_AST_ATTACH;
999 lkm_flags &= ~LKM_CONVERT;
1000 } else {
1001 lockres->l_action = OCFS2_AST_CONVERT;
1002 lkm_flags |= LKM_CONVERT;
1003 }
1004
1010 lockres->l_requested = level; 1005 lockres->l_requested = level;
1011 lockres_or_flags(lockres, OCFS2_LOCK_BUSY); 1006 lockres_or_flags(lockres, OCFS2_LOCK_BUSY);
1012 spin_unlock_irqrestore(&lockres->l_lock, flags); 1007 spin_unlock_irqrestore(&lockres->l_lock, flags);
@@ -1021,7 +1016,7 @@ again:
1021 status = dlmlock(osb->dlm, 1016 status = dlmlock(osb->dlm,
1022 level, 1017 level,
1023 &lockres->l_lksb, 1018 &lockres->l_lksb,
1024 lkm_flags|LKM_CONVERT, 1019 lkm_flags,
1025 lockres->l_name, 1020 lockres->l_name,
1026 OCFS2_LOCK_ID_MAX_LEN - 1, 1021 OCFS2_LOCK_ID_MAX_LEN - 1,
1027 ocfs2_locking_ast, 1022 ocfs2_locking_ast,
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index f92fe91ff260..bbac7cd33e0b 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -1891,9 +1891,11 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb,
1891 ssize_t written = 0; 1891 ssize_t written = 0;
1892 size_t ocount; /* original count */ 1892 size_t ocount; /* original count */
1893 size_t count; /* after file limit checks */ 1893 size_t count; /* after file limit checks */
1894 loff_t *ppos = &iocb->ki_pos; 1894 loff_t old_size, *ppos = &iocb->ki_pos;
1895 u32 old_clusters;
1895 struct file *file = iocb->ki_filp; 1896 struct file *file = iocb->ki_filp;
1896 struct inode *inode = file->f_path.dentry->d_inode; 1897 struct inode *inode = file->f_path.dentry->d_inode;
1898 struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
1897 1899
1898 mlog_entry("(0x%p, %u, '%.*s')\n", file, 1900 mlog_entry("(0x%p, %u, '%.*s')\n", file,
1899 (unsigned int)nr_segs, 1901 (unsigned int)nr_segs,
@@ -1949,6 +1951,13 @@ relock:
1949 goto relock; 1951 goto relock;
1950 } 1952 }
1951 1953
1954 /*
1955 * To later detect whether a journal commit for sync writes is
1956 * necessary, we sample i_size, and cluster count here.
1957 */
1958 old_size = i_size_read(inode);
1959 old_clusters = OCFS2_I(inode)->ip_clusters;
1960
1952 /* communicate with ocfs2_dio_end_io */ 1961 /* communicate with ocfs2_dio_end_io */
1953 ocfs2_iocb_set_rw_locked(iocb, rw_level); 1962 ocfs2_iocb_set_rw_locked(iocb, rw_level);
1954 1963
@@ -1978,6 +1987,21 @@ out_dio:
1978 /* buffered aio wouldn't have proper lock coverage today */ 1987 /* buffered aio wouldn't have proper lock coverage today */
1979 BUG_ON(ret == -EIOCBQUEUED && !(file->f_flags & O_DIRECT)); 1988 BUG_ON(ret == -EIOCBQUEUED && !(file->f_flags & O_DIRECT));
1980 1989
1990 if ((file->f_flags & O_SYNC && !direct_io) || IS_SYNC(inode)) {
1991 /*
1992 * The generic write paths have handled getting data
1993 * to disk, but since we don't make use of the dirty
1994 * inode list, a manual journal commit is necessary
1995 * here.
1996 */
1997 if (old_size != i_size_read(inode) ||
1998 old_clusters != OCFS2_I(inode)->ip_clusters) {
1999 ret = journal_force_commit(osb->journal->j_journal);
2000 if (ret < 0)
2001 written = ret;
2002 }
2003 }
2004
1981 /* 2005 /*
1982 * deep in g_f_a_w_n()->ocfs2_direct_IO we pass in a ocfs2_dio_end_io 2006 * deep in g_f_a_w_n()->ocfs2_direct_IO we pass in a ocfs2_dio_end_io
1983 * function pointer which is called when o_direct io completes so that 2007 * function pointer which is called when o_direct io completes so that
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c
index 729259016c18..989ac2718587 100644
--- a/fs/ocfs2/namei.c
+++ b/fs/ocfs2/namei.c
@@ -1105,9 +1105,16 @@ static int ocfs2_rename(struct inode *old_dir,
1105 goto bail; 1105 goto bail;
1106 } 1106 }
1107 1107
1108 if (!new_de && new_inode) 1108 if (!new_de && new_inode) {
1109 mlog(ML_ERROR, "inode %lu does not exist in it's parent " 1109 /*
1110 "directory!", new_inode->i_ino); 1110 * Target was unlinked by another node while we were
1111 * waiting to get to ocfs2_rename(). There isn't
1112 * anything we can do here to help the situation, so
1113 * bubble up the appropriate error.
1114 */
1115 status = -ENOENT;
1116 goto bail;
1117 }
1111 1118
1112 /* In case we need to overwrite an existing file, we blow it 1119 /* In case we need to overwrite an existing file, we blow it
1113 * away first */ 1120 * away first */
diff --git a/fs/proc/proc_net.c b/fs/proc/proc_net.c
index 749def054a34..153554cf5575 100644
--- a/fs/proc/proc_net.c
+++ b/fs/proc/proc_net.c
@@ -26,13 +26,6 @@
26#include "internal.h" 26#include "internal.h"
27 27
28 28
29struct proc_dir_entry *proc_net_create(struct net *net,
30 const char *name, mode_t mode, get_info_t *get_info)
31{
32 return create_proc_info_entry(name,mode, net->proc_net, get_info);
33}
34EXPORT_SYMBOL_GPL(proc_net_create);
35
36struct proc_dir_entry *proc_net_fops_create(struct net *net, 29struct proc_dir_entry *proc_net_fops_create(struct net *net,
37 const char *name, mode_t mode, const struct file_operations *fops) 30 const char *name, mode_t mode, const struct file_operations *fops)
38{ 31{
diff --git a/include/asm-arm/hardware/iop3xx.h b/include/asm-arm/hardware/iop3xx.h
index fb90b421f31c..ede377ec9147 100644
--- a/include/asm-arm/hardware/iop3xx.h
+++ b/include/asm-arm/hardware/iop3xx.h
@@ -231,7 +231,7 @@ extern int init_atu;
231 IOP3XX_PCI_IO_WINDOW_SIZE - 1) 231 IOP3XX_PCI_IO_WINDOW_SIZE - 1)
232#define IOP3XX_PCI_UPPER_IO_VA (IOP3XX_PCI_LOWER_IO_VA +\ 232#define IOP3XX_PCI_UPPER_IO_VA (IOP3XX_PCI_LOWER_IO_VA +\
233 IOP3XX_PCI_IO_WINDOW_SIZE - 1) 233 IOP3XX_PCI_IO_WINDOW_SIZE - 1)
234#define IOP3XX_PCI_IO_PHYS_TO_VIRT(addr) (((u32) addr -\ 234#define IOP3XX_PCI_IO_PHYS_TO_VIRT(addr) (((u32) (addr) -\
235 IOP3XX_PCI_LOWER_IO_PA) +\ 235 IOP3XX_PCI_LOWER_IO_PA) +\
236 IOP3XX_PCI_LOWER_IO_VA) 236 IOP3XX_PCI_LOWER_IO_VA)
237 237
diff --git a/include/asm-arm/pgtable.h b/include/asm-arm/pgtable.h
index d2e8171d1d4e..5e0182485d8c 100644
--- a/include/asm-arm/pgtable.h
+++ b/include/asm-arm/pgtable.h
@@ -249,7 +249,7 @@ extern struct page *empty_zero_page;
249#define set_pte_ext(ptep,pte,ext) cpu_set_pte_ext(ptep,pte,ext) 249#define set_pte_ext(ptep,pte,ext) cpu_set_pte_ext(ptep,pte,ext)
250 250
251#define set_pte_at(mm,addr,ptep,pteval) do { \ 251#define set_pte_at(mm,addr,ptep,pteval) do { \
252 set_pte_ext(ptep, pteval, (addr) >= PAGE_OFFSET ? 0 : PTE_EXT_NG); \ 252 set_pte_ext(ptep, pteval, (addr) >= TASK_SIZE ? 0 : PTE_EXT_NG); \
253 } while (0) 253 } while (0)
254 254
255/* 255/*
diff --git a/include/asm-frv/irq.h b/include/asm-frv/irq.h
index 8fefd6b827aa..3a66ebd754bd 100644
--- a/include/asm-frv/irq.h
+++ b/include/asm-frv/irq.h
@@ -12,9 +12,6 @@
12#ifndef _ASM_IRQ_H_ 12#ifndef _ASM_IRQ_H_
13#define _ASM_IRQ_H_ 13#define _ASM_IRQ_H_
14 14
15/* this number is used when no interrupt has been assigned */
16#define NO_IRQ (-1)
17
18#define NR_IRQS 48 15#define NR_IRQS 48
19#define IRQ_BASE_CPU (0 * 16) 16#define IRQ_BASE_CPU (0 * 16)
20#define IRQ_BASE_FPGA (1 * 16) 17#define IRQ_BASE_FPGA (1 * 16)
diff --git a/include/asm-powerpc/pgtable-ppc32.h b/include/asm-powerpc/pgtable-ppc32.h
index 86a54a4a8a2a..fea2d8ff1e73 100644
--- a/include/asm-powerpc/pgtable-ppc32.h
+++ b/include/asm-powerpc/pgtable-ppc32.h
@@ -11,6 +11,11 @@
11extern unsigned long va_to_phys(unsigned long address); 11extern unsigned long va_to_phys(unsigned long address);
12extern pte_t *va_to_pte(unsigned long address); 12extern pte_t *va_to_pte(unsigned long address);
13extern unsigned long ioremap_bot, ioremap_base; 13extern unsigned long ioremap_bot, ioremap_base;
14
15#ifdef CONFIG_44x
16extern int icache_44x_need_flush;
17#endif
18
14#endif /* __ASSEMBLY__ */ 19#endif /* __ASSEMBLY__ */
15 20
16/* 21/*
@@ -562,6 +567,10 @@ static inline unsigned long pte_update(pte_t *p, unsigned long clr,
562 : "=&r" (old), "=&r" (tmp), "=m" (*p) 567 : "=&r" (old), "=&r" (tmp), "=m" (*p)
563 : "r" (p), "r" (clr), "r" (set), "m" (*p) 568 : "r" (p), "r" (clr), "r" (set), "m" (*p)
564 : "cc" ); 569 : "cc" );
570#ifdef CONFIG_44x
571 if ((old & _PAGE_USER) && (old & _PAGE_HWEXEC))
572 icache_44x_need_flush = 1;
573#endif
565 return old; 574 return old;
566} 575}
567#else 576#else
@@ -582,6 +591,10 @@ static inline unsigned long long pte_update(pte_t *p, unsigned long clr,
582 : "=&r" (old), "=&r" (tmp), "=m" (*p) 591 : "=&r" (old), "=&r" (tmp), "=m" (*p)
583 : "r" (p), "r" ((unsigned long)(p) + 4), "r" (clr), "r" (set), "m" (*p) 592 : "r" (p), "r" ((unsigned long)(p) + 4), "r" (clr), "r" (set), "m" (*p)
584 : "cc" ); 593 : "cc" );
594#ifdef CONFIG_44x
595 if ((old & _PAGE_USER) && (old & _PAGE_HWEXEC))
596 icache_44x_need_flush = 1;
597#endif
585 return old; 598 return old;
586} 599}
587#endif 600#endif
diff --git a/include/asm-powerpc/systbl.h b/include/asm-powerpc/systbl.h
index cc6d87228258..11d5383b2f09 100644
--- a/include/asm-powerpc/systbl.h
+++ b/include/asm-powerpc/systbl.h
@@ -308,8 +308,8 @@ COMPAT_SYS_SPU(move_pages)
308SYSCALL_SPU(getcpu) 308SYSCALL_SPU(getcpu)
309COMPAT_SYS(epoll_pwait) 309COMPAT_SYS(epoll_pwait)
310COMPAT_SYS_SPU(utimensat) 310COMPAT_SYS_SPU(utimensat)
311COMPAT_SYS(fallocate)
312COMPAT_SYS_SPU(signalfd) 311COMPAT_SYS_SPU(signalfd)
313COMPAT_SYS_SPU(timerfd) 312COMPAT_SYS_SPU(timerfd)
314SYSCALL_SPU(eventfd) 313SYSCALL_SPU(eventfd)
315COMPAT_SYS_SPU(sync_file_range2) 314COMPAT_SYS_SPU(sync_file_range2)
315COMPAT_SYS(fallocate)
diff --git a/include/asm-powerpc/time.h b/include/asm-powerpc/time.h
index f05895522f7f..780f82642756 100644
--- a/include/asm-powerpc/time.h
+++ b/include/asm-powerpc/time.h
@@ -176,25 +176,31 @@ static inline unsigned int get_dec(void)
176#endif 176#endif
177} 177}
178 178
179/*
180 * Note: Book E and 4xx processors differ from other PowerPC processors
181 * in when the decrementer generates its interrupt: on the 1 to 0
182 * transition for Book E/4xx, but on the 0 to -1 transition for others.
183 */
179static inline void set_dec(int val) 184static inline void set_dec(int val)
180{ 185{
181#if defined(CONFIG_40x) 186#if defined(CONFIG_40x)
182 mtspr(SPRN_PIT, val); 187 mtspr(SPRN_PIT, val);
183#elif defined(CONFIG_8xx_CPU6) 188#elif defined(CONFIG_8xx_CPU6)
184 set_dec_cpu6(val); 189 set_dec_cpu6(val - 1);
185#else 190#else
191#ifndef CONFIG_BOOKE
192 --val;
193#endif
186#ifdef CONFIG_PPC_ISERIES 194#ifdef CONFIG_PPC_ISERIES
187 int cur_dec;
188
189 if (firmware_has_feature(FW_FEATURE_ISERIES) && 195 if (firmware_has_feature(FW_FEATURE_ISERIES) &&
190 get_lppaca()->shared_proc) { 196 get_lppaca()->shared_proc) {
191 get_lppaca()->virtual_decr = val; 197 get_lppaca()->virtual_decr = val;
192 cur_dec = get_dec(); 198 if (get_dec() > val)
193 if (cur_dec > val)
194 HvCall_setVirtualDecr(); 199 HvCall_setVirtualDecr();
195 } else 200 return;
201 }
196#endif 202#endif
197 mtspr(SPRN_DEC, val); 203 mtspr(SPRN_DEC, val);
198#endif /* not 40x or 8xx_CPU6 */ 204#endif /* not 40x or 8xx_CPU6 */
199} 205}
200 206
diff --git a/include/asm-powerpc/tlbflush.h b/include/asm-powerpc/tlbflush.h
index b6b036ccee34..e7b4c0d298ae 100644
--- a/include/asm-powerpc/tlbflush.h
+++ b/include/asm-powerpc/tlbflush.h
@@ -1,5 +1,6 @@
1#ifndef _ASM_POWERPC_TLBFLUSH_H 1#ifndef _ASM_POWERPC_TLBFLUSH_H
2#define _ASM_POWERPC_TLBFLUSH_H 2#define _ASM_POWERPC_TLBFLUSH_H
3
3/* 4/*
4 * TLB flushing: 5 * TLB flushing:
5 * 6 *
@@ -16,9 +17,6 @@
16 */ 17 */
17#ifdef __KERNEL__ 18#ifdef __KERNEL__
18 19
19struct mm_struct;
20struct vm_area_struct;
21
22#if defined(CONFIG_4xx) || defined(CONFIG_8xx) || defined(CONFIG_FSL_BOOKE) 20#if defined(CONFIG_4xx) || defined(CONFIG_8xx) || defined(CONFIG_FSL_BOOKE)
23/* 21/*
24 * TLB flushing for software loaded TLB chips 22 * TLB flushing for software loaded TLB chips
@@ -28,7 +26,9 @@ struct vm_area_struct;
28 * specific tlbie's 26 * specific tlbie's
29 */ 27 */
30 28
31extern void _tlbie(unsigned long address); 29#include <linux/mm.h>
30
31extern void _tlbie(unsigned long address, unsigned int pid);
32 32
33#if defined(CONFIG_40x) || defined(CONFIG_8xx) 33#if defined(CONFIG_40x) || defined(CONFIG_8xx)
34#define _tlbia() asm volatile ("tlbia; sync" : : : "memory") 34#define _tlbia() asm volatile ("tlbia; sync" : : : "memory")
@@ -44,13 +44,13 @@ static inline void flush_tlb_mm(struct mm_struct *mm)
44static inline void flush_tlb_page(struct vm_area_struct *vma, 44static inline void flush_tlb_page(struct vm_area_struct *vma,
45 unsigned long vmaddr) 45 unsigned long vmaddr)
46{ 46{
47 _tlbie(vmaddr); 47 _tlbie(vmaddr, vma->vm_mm->context.id);
48} 48}
49 49
50static inline void flush_tlb_page_nohash(struct vm_area_struct *vma, 50static inline void flush_tlb_page_nohash(struct vm_area_struct *vma,
51 unsigned long vmaddr) 51 unsigned long vmaddr)
52{ 52{
53 _tlbie(vmaddr); 53 _tlbie(vmaddr, vma->vm_mm->context.id);
54} 54}
55 55
56static inline void flush_tlb_range(struct vm_area_struct *vma, 56static inline void flush_tlb_range(struct vm_area_struct *vma,
diff --git a/include/asm-sparc64/vio.h b/include/asm-sparc64/vio.h
index f7417e91b170..d4de32f0f8af 100644
--- a/include/asm-sparc64/vio.h
+++ b/include/asm-sparc64/vio.h
@@ -8,6 +8,7 @@
8#include <linux/spinlock.h> 8#include <linux/spinlock.h>
9#include <linux/completion.h> 9#include <linux/completion.h>
10#include <linux/list.h> 10#include <linux/list.h>
11#include <linux/log2.h>
11 12
12#include <asm/ldc.h> 13#include <asm/ldc.h>
13#include <asm/mdesc.h> 14#include <asm/mdesc.h>
@@ -257,8 +258,7 @@ static inline void *vio_dring_entry(struct vio_dring_state *dr,
257static inline u32 vio_dring_avail(struct vio_dring_state *dr, 258static inline u32 vio_dring_avail(struct vio_dring_state *dr,
258 unsigned int ring_size) 259 unsigned int ring_size)
259{ 260{
260 /* Ensure build-time power-of-2. */ 261 BUILD_BUG_ON(!is_power_of_2(ring_size));
261 BUILD_BUG_ON(ring_size & (ring_size - 1));
262 262
263 return (dr->pending - 263 return (dr->pending -
264 ((dr->prod - dr->cons) & (ring_size - 1))); 264 ((dr->prod - dr->cons) & (ring_size - 1)));
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 8396db24d019..d18ee67b40f8 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -697,6 +697,7 @@ extern int blk_execute_rq(struct request_queue *, struct gendisk *,
697extern void blk_execute_rq_nowait(struct request_queue *, struct gendisk *, 697extern void blk_execute_rq_nowait(struct request_queue *, struct gendisk *,
698 struct request *, int, rq_end_io_fn *); 698 struct request *, int, rq_end_io_fn *);
699extern int blk_verify_command(unsigned char *, int); 699extern int blk_verify_command(unsigned char *, int);
700extern void blk_unplug(struct request_queue *q);
700 701
701static inline struct request_queue *bdev_get_queue(struct block_device *bdev) 702static inline struct request_queue *bdev_get_queue(struct block_device *bdev)
702{ 703{
diff --git a/include/linux/mroute.h b/include/linux/mroute.h
index 7da2cee8e132..35a8277ec1bd 100644
--- a/include/linux/mroute.h
+++ b/include/linux/mroute.h
@@ -128,6 +128,18 @@ struct igmpmsg
128#ifdef __KERNEL__ 128#ifdef __KERNEL__
129#include <net/sock.h> 129#include <net/sock.h>
130 130
131#ifdef CONFIG_IP_MROUTE
132static inline int ip_mroute_opt(int opt)
133{
134 return (opt >= MRT_BASE) && (opt <= MRT_BASE + 10);
135}
136#else
137static inline int ip_mroute_opt(int opt)
138{
139 return 0;
140}
141#endif
142
131extern int ip_mroute_setsockopt(struct sock *, int, char __user *, int); 143extern int ip_mroute_setsockopt(struct sock *, int, char __user *, int);
132extern int ip_mroute_getsockopt(struct sock *, int, char __user *, int __user *); 144extern int ip_mroute_getsockopt(struct sock *, int, char __user *, int __user *);
133extern int ipmr_ioctl(struct sock *sk, int cmd, void __user *arg); 145extern int ipmr_ioctl(struct sock *sk, int cmd, void __user *arg);
diff --git a/include/linux/netfilter/Kbuild b/include/linux/netfilter/Kbuild
index f2eaea2234ec..b87e83a5e070 100644
--- a/include/linux/netfilter/Kbuild
+++ b/include/linux/netfilter/Kbuild
@@ -4,25 +4,28 @@ header-y += nfnetlink_conntrack.h
4header-y += nfnetlink_log.h 4header-y += nfnetlink_log.h
5header-y += nfnetlink_queue.h 5header-y += nfnetlink_queue.h
6header-y += xt_CLASSIFY.h 6header-y += xt_CLASSIFY.h
7header-y += xt_CONNMARK.h
8header-y += xt_CONNSECMARK.h
9header-y += xt_DSCP.h
10header-y += xt_MARK.h
11header-y += xt_NFLOG.h
12header-y += xt_NFQUEUE.h
13header-y += xt_SECMARK.h
14header-y += xt_TCPMSS.h
7header-y += xt_comment.h 15header-y += xt_comment.h
8header-y += xt_connbytes.h 16header-y += xt_connbytes.h
9header-y += xt_connmark.h 17header-y += xt_connmark.h
10header-y += xt_CONNMARK.h
11header-y += xt_conntrack.h 18header-y += xt_conntrack.h
12header-y += xt_dccp.h 19header-y += xt_dccp.h
13header-y += xt_dscp.h 20header-y += xt_dscp.h
14header-y += xt_DSCP.h
15header-y += xt_esp.h 21header-y += xt_esp.h
16header-y += xt_helper.h
17header-y += xt_hashlimit.h 22header-y += xt_hashlimit.h
23header-y += xt_helper.h
18header-y += xt_length.h 24header-y += xt_length.h
19header-y += xt_limit.h 25header-y += xt_limit.h
20header-y += xt_mac.h 26header-y += xt_mac.h
21header-y += xt_mark.h 27header-y += xt_mark.h
22header-y += xt_MARK.h
23header-y += xt_multiport.h 28header-y += xt_multiport.h
24header-y += xt_NFQUEUE.h
25header-y += xt_NFLOG.h
26header-y += xt_pkttype.h 29header-y += xt_pkttype.h
27header-y += xt_policy.h 30header-y += xt_policy.h
28header-y += xt_realm.h 31header-y += xt_realm.h
@@ -32,9 +35,6 @@ header-y += xt_statistic.h
32header-y += xt_string.h 35header-y += xt_string.h
33header-y += xt_tcpmss.h 36header-y += xt_tcpmss.h
34header-y += xt_tcpudp.h 37header-y += xt_tcpudp.h
35header-y += xt_SECMARK.h
36header-y += xt_CONNSECMARK.h
37header-y += xt_TCPMSS.h
38 38
39unifdef-y += nf_conntrack_common.h 39unifdef-y += nf_conntrack_common.h
40unifdef-y += nf_conntrack_ftp.h 40unifdef-y += nf_conntrack_ftp.h
diff --git a/include/linux/netfilter_ipv4/Kbuild b/include/linux/netfilter_ipv4/Kbuild
index 7185792b900f..3a7105bb8f33 100644
--- a/include/linux/netfilter_ipv4/Kbuild
+++ b/include/linux/netfilter_ipv4/Kbuild
@@ -1,47 +1,47 @@
1header-y += ipt_addrtype.h
2header-y += ipt_ah.h
3header-y += ipt_CLASSIFY.h 1header-y += ipt_CLASSIFY.h
4header-y += ipt_CLUSTERIP.h 2header-y += ipt_CLUSTERIP.h
3header-y += ipt_CONNMARK.h
4header-y += ipt_DSCP.h
5header-y += ipt_ECN.h
6header-y += ipt_LOG.h
7header-y += ipt_MARK.h
8header-y += ipt_NFQUEUE.h
9header-y += ipt_REJECT.h
10header-y += ipt_SAME.h
11header-y += ipt_TCPMSS.h
12header-y += ipt_TOS.h
13header-y += ipt_TTL.h
14header-y += ipt_ULOG.h
15header-y += ipt_addrtype.h
16header-y += ipt_ah.h
5header-y += ipt_comment.h 17header-y += ipt_comment.h
6header-y += ipt_connbytes.h 18header-y += ipt_connbytes.h
7header-y += ipt_connmark.h 19header-y += ipt_connmark.h
8header-y += ipt_CONNMARK.h
9header-y += ipt_conntrack.h 20header-y += ipt_conntrack.h
10header-y += ipt_dccp.h 21header-y += ipt_dccp.h
11header-y += ipt_dscp.h 22header-y += ipt_dscp.h
12header-y += ipt_DSCP.h
13header-y += ipt_ecn.h 23header-y += ipt_ecn.h
14header-y += ipt_ECN.h
15header-y += ipt_esp.h 24header-y += ipt_esp.h
16header-y += ipt_hashlimit.h 25header-y += ipt_hashlimit.h
17header-y += ipt_helper.h 26header-y += ipt_helper.h
18header-y += ipt_iprange.h 27header-y += ipt_iprange.h
19header-y += ipt_length.h 28header-y += ipt_length.h
20header-y += ipt_limit.h 29header-y += ipt_limit.h
21header-y += ipt_LOG.h
22header-y += ipt_mac.h 30header-y += ipt_mac.h
23header-y += ipt_mark.h 31header-y += ipt_mark.h
24header-y += ipt_MARK.h
25header-y += ipt_multiport.h 32header-y += ipt_multiport.h
26header-y += ipt_NFQUEUE.h
27header-y += ipt_owner.h 33header-y += ipt_owner.h
28header-y += ipt_physdev.h 34header-y += ipt_physdev.h
29header-y += ipt_pkttype.h 35header-y += ipt_pkttype.h
30header-y += ipt_policy.h 36header-y += ipt_policy.h
31header-y += ipt_realm.h 37header-y += ipt_realm.h
32header-y += ipt_recent.h 38header-y += ipt_recent.h
33header-y += ipt_REJECT.h
34header-y += ipt_SAME.h
35header-y += ipt_sctp.h 39header-y += ipt_sctp.h
36header-y += ipt_state.h 40header-y += ipt_state.h
37header-y += ipt_string.h 41header-y += ipt_string.h
38header-y += ipt_tcpmss.h 42header-y += ipt_tcpmss.h
39header-y += ipt_TCPMSS.h
40header-y += ipt_tos.h 43header-y += ipt_tos.h
41header-y += ipt_TOS.h
42header-y += ipt_ttl.h 44header-y += ipt_ttl.h
43header-y += ipt_TTL.h
44header-y += ipt_ULOG.h
45 45
46unifdef-y += ip_queue.h 46unifdef-y += ip_queue.h
47unifdef-y += ip_tables.h 47unifdef-y += ip_tables.h
diff --git a/include/linux/netfilter_ipv6/Kbuild b/include/linux/netfilter_ipv6/Kbuild
index 9dd978d149ff..8887a5fcd1d0 100644
--- a/include/linux/netfilter_ipv6/Kbuild
+++ b/include/linux/netfilter_ipv6/Kbuild
@@ -14,8 +14,8 @@ header-y += ip6t_mark.h
14header-y += ip6t_multiport.h 14header-y += ip6t_multiport.h
15header-y += ip6t_opts.h 15header-y += ip6t_opts.h
16header-y += ip6t_owner.h 16header-y += ip6t_owner.h
17header-y += ip6t_policy.h
18header-y += ip6t_physdev.h 17header-y += ip6t_physdev.h
18header-y += ip6t_policy.h
19header-y += ip6t_rt.h 19header-y += ip6t_rt.h
20 20
21unifdef-y += ip6_tables.h 21unifdef-y += ip6_tables.h
diff --git a/include/linux/netlink.h b/include/linux/netlink.h
index 7c1f3b1d2ee5..d5bfaba595c7 100644
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -192,7 +192,7 @@ extern int netlink_unregister_notifier(struct notifier_block *nb);
192/* finegrained unicast helpers: */ 192/* finegrained unicast helpers: */
193struct sock *netlink_getsockbyfilp(struct file *filp); 193struct sock *netlink_getsockbyfilp(struct file *filp);
194int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock, 194int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock,
195 long timeo, struct sock *ssk); 195 long *timeo, struct sock *ssk);
196void netlink_detachskb(struct sock *sk, struct sk_buff *skb); 196void netlink_detachskb(struct sock *sk, struct sk_buff *skb);
197int netlink_sendskb(struct sock *sk, struct sk_buff *skb); 197int netlink_sendskb(struct sock *sk, struct sk_buff *skb);
198 198
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 1ff461672060..1273c6ec535c 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -196,8 +196,6 @@ static inline struct proc_dir_entry *create_proc_info_entry(const char *name,
196 return res; 196 return res;
197} 197}
198 198
199extern struct proc_dir_entry *proc_net_create(struct net *net,
200 const char *name, mode_t mode, get_info_t *get_info);
201extern struct proc_dir_entry *proc_net_fops_create(struct net *net, 199extern struct proc_dir_entry *proc_net_fops_create(struct net *net,
202 const char *name, mode_t mode, const struct file_operations *fops); 200 const char *name, mode_t mode, const struct file_operations *fops);
203extern void proc_net_remove(struct net *net, const char *name); 201extern void proc_net_remove(struct net *net, const char *name);
@@ -208,7 +206,6 @@ extern void proc_net_remove(struct net *net, const char *name);
208#define proc_bus NULL 206#define proc_bus NULL
209 207
210#define proc_net_fops_create(net, name, mode, fops) ({ (void)(mode), NULL; }) 208#define proc_net_fops_create(net, name, mode, fops) ({ (void)(mode), NULL; })
211#define proc_net_create(net, name, mode, info) ({ (void)(mode), NULL; })
212static inline void proc_net_remove(struct net *net, const char *name) {} 209static inline void proc_net_remove(struct net *net, const char *name) {}
213 210
214static inline void proc_flush_task(struct task_struct *task) 211static inline void proc_flush_task(struct task_struct *task)
diff --git a/include/linux/tty.h b/include/linux/tty.h
index 56164d7ba0ad..c555f5442bd7 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -332,7 +332,9 @@ extern void tty_ldisc_flush(struct tty_struct *tty);
332 332
333extern int tty_ioctl(struct inode *inode, struct file *file, unsigned int cmd, 333extern int tty_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
334 unsigned long arg); 334 unsigned long arg);
335 335extern int tty_mode_ioctl(struct tty_struct *tty, struct file *file,
336 unsigned int cmd, unsigned long arg);
337extern int tty_perform_flush(struct tty_struct *tty, unsigned long arg);
336extern dev_t tty_devnum(struct tty_struct *tty); 338extern dev_t tty_devnum(struct tty_struct *tty);
337extern void proc_clear_tty(struct task_struct *p); 339extern void proc_clear_tty(struct task_struct *p);
338extern struct tty_struct *get_current_tty(void); 340extern struct tty_struct *get_current_tty(void);
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h
index 4427dcd1e53a..8461cda37490 100644
--- a/include/net/inet_hashtables.h
+++ b/include/net/inet_hashtables.h
@@ -37,7 +37,6 @@
37 * I'll experiment with dynamic table growth later. 37 * I'll experiment with dynamic table growth later.
38 */ 38 */
39struct inet_ehash_bucket { 39struct inet_ehash_bucket {
40 rwlock_t lock;
41 struct hlist_head chain; 40 struct hlist_head chain;
42 struct hlist_head twchain; 41 struct hlist_head twchain;
43}; 42};
@@ -100,6 +99,9 @@ struct inet_hashinfo {
100 * TIME_WAIT sockets use a separate chain (twchain). 99 * TIME_WAIT sockets use a separate chain (twchain).
101 */ 100 */
102 struct inet_ehash_bucket *ehash; 101 struct inet_ehash_bucket *ehash;
102 rwlock_t *ehash_locks;
103 unsigned int ehash_size;
104 unsigned int ehash_locks_mask;
103 105
104 /* Ok, let's try this, I give up, we do need a local binding 106 /* Ok, let's try this, I give up, we do need a local binding
105 * TCP hash as well as the others for fast bind/connect. 107 * TCP hash as well as the others for fast bind/connect.
@@ -107,7 +109,7 @@ struct inet_hashinfo {
107 struct inet_bind_hashbucket *bhash; 109 struct inet_bind_hashbucket *bhash;
108 110
109 unsigned int bhash_size; 111 unsigned int bhash_size;
110 unsigned int ehash_size; 112 /* Note : 4 bytes padding on 64 bit arches */
111 113
112 /* All sockets in TCP_LISTEN state will be in here. This is the only 114 /* All sockets in TCP_LISTEN state will be in here. This is the only
113 * table where wildcard'd TCP sockets can exist. Hash function here 115 * table where wildcard'd TCP sockets can exist. Hash function here
@@ -134,6 +136,62 @@ static inline struct inet_ehash_bucket *inet_ehash_bucket(
134 return &hashinfo->ehash[hash & (hashinfo->ehash_size - 1)]; 136 return &hashinfo->ehash[hash & (hashinfo->ehash_size - 1)];
135} 137}
136 138
139static inline rwlock_t *inet_ehash_lockp(
140 struct inet_hashinfo *hashinfo,
141 unsigned int hash)
142{
143 return &hashinfo->ehash_locks[hash & hashinfo->ehash_locks_mask];
144}
145
146static inline int inet_ehash_locks_alloc(struct inet_hashinfo *hashinfo)
147{
148 unsigned int i, size = 256;
149#if defined(CONFIG_PROVE_LOCKING)
150 unsigned int nr_pcpus = 2;
151#else
152 unsigned int nr_pcpus = num_possible_cpus();
153#endif
154 if (nr_pcpus >= 4)
155 size = 512;
156 if (nr_pcpus >= 8)
157 size = 1024;
158 if (nr_pcpus >= 16)
159 size = 2048;
160 if (nr_pcpus >= 32)
161 size = 4096;
162 if (sizeof(rwlock_t) != 0) {
163#ifdef CONFIG_NUMA
164 if (size * sizeof(rwlock_t) > PAGE_SIZE)
165 hashinfo->ehash_locks = vmalloc(size * sizeof(rwlock_t));
166 else
167#endif
168 hashinfo->ehash_locks = kmalloc(size * sizeof(rwlock_t),
169 GFP_KERNEL);
170 if (!hashinfo->ehash_locks)
171 return ENOMEM;
172 for (i = 0; i < size; i++)
173 rwlock_init(&hashinfo->ehash_locks[i]);
174 }
175 hashinfo->ehash_locks_mask = size - 1;
176 return 0;
177}
178
179static inline void inet_ehash_locks_free(struct inet_hashinfo *hashinfo)
180{
181 if (hashinfo->ehash_locks) {
182#ifdef CONFIG_NUMA
183 unsigned int size = (hashinfo->ehash_locks_mask + 1) *
184 sizeof(rwlock_t);
185 if (size > PAGE_SIZE)
186 vfree(hashinfo->ehash_locks);
187 else
188#else
189 kfree(hashinfo->ehash_locks);
190#endif
191 hashinfo->ehash_locks = NULL;
192 }
193}
194
137extern struct inet_bind_bucket * 195extern struct inet_bind_bucket *
138 inet_bind_bucket_create(struct kmem_cache *cachep, 196 inet_bind_bucket_create(struct kmem_cache *cachep,
139 struct inet_bind_hashbucket *head, 197 struct inet_bind_hashbucket *head,
@@ -222,7 +280,7 @@ static inline void __inet_hash(struct inet_hashinfo *hashinfo,
222 sk->sk_hash = inet_sk_ehashfn(sk); 280 sk->sk_hash = inet_sk_ehashfn(sk);
223 head = inet_ehash_bucket(hashinfo, sk->sk_hash); 281 head = inet_ehash_bucket(hashinfo, sk->sk_hash);
224 list = &head->chain; 282 list = &head->chain;
225 lock = &head->lock; 283 lock = inet_ehash_lockp(hashinfo, sk->sk_hash);
226 write_lock(lock); 284 write_lock(lock);
227 } 285 }
228 __sk_add_node(sk, list); 286 __sk_add_node(sk, list);
@@ -253,7 +311,7 @@ static inline void inet_unhash(struct inet_hashinfo *hashinfo, struct sock *sk)
253 inet_listen_wlock(hashinfo); 311 inet_listen_wlock(hashinfo);
254 lock = &hashinfo->lhash_lock; 312 lock = &hashinfo->lhash_lock;
255 } else { 313 } else {
256 lock = &inet_ehash_bucket(hashinfo, sk->sk_hash)->lock; 314 lock = inet_ehash_lockp(hashinfo, sk->sk_hash);
257 write_lock_bh(lock); 315 write_lock_bh(lock);
258 } 316 }
259 317
@@ -354,9 +412,10 @@ static inline struct sock *
354 */ 412 */
355 unsigned int hash = inet_ehashfn(daddr, hnum, saddr, sport); 413 unsigned int hash = inet_ehashfn(daddr, hnum, saddr, sport);
356 struct inet_ehash_bucket *head = inet_ehash_bucket(hashinfo, hash); 414 struct inet_ehash_bucket *head = inet_ehash_bucket(hashinfo, hash);
415 rwlock_t *lock = inet_ehash_lockp(hashinfo, hash);
357 416
358 prefetch(head->chain.first); 417 prefetch(head->chain.first);
359 read_lock(&head->lock); 418 read_lock(lock);
360 sk_for_each(sk, node, &head->chain) { 419 sk_for_each(sk, node, &head->chain) {
361 if (INET_MATCH(sk, hash, acookie, saddr, daddr, ports, dif)) 420 if (INET_MATCH(sk, hash, acookie, saddr, daddr, ports, dif))
362 goto hit; /* You sunk my battleship! */ 421 goto hit; /* You sunk my battleship! */
@@ -369,7 +428,7 @@ static inline struct sock *
369 } 428 }
370 sk = NULL; 429 sk = NULL;
371out: 430out:
372 read_unlock(&head->lock); 431 read_unlock(lock);
373 return sk; 432 return sk;
374hit: 433hit:
375 sock_hold(sk); 434 sock_hold(sk);
diff --git a/include/net/ip_fib.h b/include/net/ip_fib.h
index 8cadc77c7df4..ed514bfb61ba 100644
--- a/include/net/ip_fib.h
+++ b/include/net/ip_fib.h
@@ -185,6 +185,12 @@ static inline void fib_select_default(const struct flowi *flp, struct fib_result
185} 185}
186 186
187#else /* CONFIG_IP_MULTIPLE_TABLES */ 187#else /* CONFIG_IP_MULTIPLE_TABLES */
188extern void __init fib4_rules_init(void);
189
190#ifdef CONFIG_NET_CLS_ROUTE
191extern u32 fib_rules_tclass(struct fib_result *res);
192#endif
193
188#define ip_fib_local_table fib_get_table(RT_TABLE_LOCAL) 194#define ip_fib_local_table fib_get_table(RT_TABLE_LOCAL)
189#define ip_fib_main_table fib_get_table(RT_TABLE_MAIN) 195#define ip_fib_main_table fib_get_table(RT_TABLE_MAIN)
190 196
@@ -214,15 +220,6 @@ extern __be32 __fib_res_prefsrc(struct fib_result *res);
214/* Exported by fib_hash.c */ 220/* Exported by fib_hash.c */
215extern struct fib_table *fib_hash_init(u32 id); 221extern struct fib_table *fib_hash_init(u32 id);
216 222
217#ifdef CONFIG_IP_MULTIPLE_TABLES
218extern void __init fib4_rules_init(void);
219
220#ifdef CONFIG_NET_CLS_ROUTE
221extern u32 fib_rules_tclass(struct fib_result *res);
222#endif
223
224#endif
225
226static inline void fib_combine_itag(u32 *itag, struct fib_result *res) 223static inline void fib_combine_itag(u32 *itag, struct fib_result *res)
227{ 224{
228#ifdef CONFIG_NET_CLS_ROUTE 225#ifdef CONFIG_NET_CLS_ROUTE
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index 41870564df8e..67ea2c0c0ab7 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -520,6 +520,10 @@ struct ip_vs_conn {
520 spinlock_t lock; /* lock for state transition */ 520 spinlock_t lock; /* lock for state transition */
521 volatile __u16 flags; /* status flags */ 521 volatile __u16 flags; /* status flags */
522 volatile __u16 state; /* state info */ 522 volatile __u16 state; /* state info */
523 volatile __u16 old_state; /* old state, to be used for
524 * state transition triggerd
525 * synchronization
526 */
523 527
524 /* Control members */ 528 /* Control members */
525 struct ip_vs_conn *control; /* Master control connection */ 529 struct ip_vs_conn *control; /* Master control connection */
@@ -901,6 +905,10 @@ extern int ip_vs_use_count_inc(void);
901extern void ip_vs_use_count_dec(void); 905extern void ip_vs_use_count_dec(void);
902extern int ip_vs_control_init(void); 906extern int ip_vs_control_init(void);
903extern void ip_vs_control_cleanup(void); 907extern void ip_vs_control_cleanup(void);
908extern struct ip_vs_dest *
909ip_vs_find_dest(__be32 daddr, __be16 dport,
910 __be32 vaddr, __be16 vport, __u16 protocol);
911extern struct ip_vs_dest *ip_vs_try_bind_dest(struct ip_vs_conn *cp);
904 912
905 913
906/* 914/*
diff --git a/include/net/sock.h b/include/net/sock.h
index 20de3fa7ae40..5504fb9fa88a 100644
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -560,6 +560,14 @@ struct proto {
560 void (*unhash)(struct sock *sk); 560 void (*unhash)(struct sock *sk);
561 int (*get_port)(struct sock *sk, unsigned short snum); 561 int (*get_port)(struct sock *sk, unsigned short snum);
562 562
563#ifdef CONFIG_SMP
564 /* Keeping track of sockets in use */
565 void (*inuse_add)(struct proto *prot, int inc);
566 int (*inuse_getval)(const struct proto *prot);
567 int *inuse_ptr;
568#else
569 int inuse;
570#endif
563 /* Memory pressure */ 571 /* Memory pressure */
564 void (*enter_memory_pressure)(void); 572 void (*enter_memory_pressure)(void);
565 atomic_t *memory_allocated; /* Current allocated memory. */ 573 atomic_t *memory_allocated; /* Current allocated memory. */
@@ -592,12 +600,38 @@ struct proto {
592#ifdef SOCK_REFCNT_DEBUG 600#ifdef SOCK_REFCNT_DEBUG
593 atomic_t socks; 601 atomic_t socks;
594#endif 602#endif
595 struct {
596 int inuse;
597 u8 __pad[SMP_CACHE_BYTES - sizeof(int)];
598 } stats[NR_CPUS];
599}; 603};
600 604
605/*
606 * Special macros to let protos use a fast version of inuse{get|add}
607 * using a static percpu variable per proto instead of an allocated one,
608 * saving one dereference.
609 * This might be changed if/when dynamic percpu vars become fast.
610 */
611#ifdef CONFIG_SMP
612# define DEFINE_PROTO_INUSE(NAME) \
613static DEFINE_PER_CPU(int, NAME##_inuse); \
614static void NAME##_inuse_add(struct proto *prot, int inc) \
615{ \
616 __get_cpu_var(NAME##_inuse) += inc; \
617} \
618 \
619static int NAME##_inuse_getval(const struct proto *prot)\
620{ \
621 int res = 0, cpu; \
622 \
623 for_each_possible_cpu(cpu) \
624 res += per_cpu(NAME##_inuse, cpu); \
625 return res; \
626}
627# define REF_PROTO_INUSE(NAME) \
628 .inuse_add = NAME##_inuse_add, \
629 .inuse_getval = NAME##_inuse_getval,
630#else
631# define DEFINE_PROTO_INUSE(NAME)
632# define REF_PROTO_INUSE(NAME)
633#endif
634
601extern int proto_register(struct proto *prot, int alloc_slab); 635extern int proto_register(struct proto *prot, int alloc_slab);
602extern void proto_unregister(struct proto *prot); 636extern void proto_unregister(struct proto *prot);
603 637
@@ -629,12 +663,29 @@ static inline void sk_refcnt_debug_release(const struct sock *sk)
629/* Called with local bh disabled */ 663/* Called with local bh disabled */
630static __inline__ void sock_prot_inc_use(struct proto *prot) 664static __inline__ void sock_prot_inc_use(struct proto *prot)
631{ 665{
632 prot->stats[smp_processor_id()].inuse++; 666#ifdef CONFIG_SMP
667 prot->inuse_add(prot, 1);
668#else
669 prot->inuse++;
670#endif
633} 671}
634 672
635static __inline__ void sock_prot_dec_use(struct proto *prot) 673static __inline__ void sock_prot_dec_use(struct proto *prot)
636{ 674{
637 prot->stats[smp_processor_id()].inuse--; 675#ifdef CONFIG_SMP
676 prot->inuse_add(prot, -1);
677#else
678 prot->inuse--;
679#endif
680}
681
682static __inline__ int sock_prot_inuse(struct proto *proto)
683{
684#ifdef CONFIG_SMP
685 return proto->inuse_getval(proto);
686#else
687 return proto->inuse;
688#endif
638} 689}
639 690
640/* With per-bucket locks this operation is not-atomic, so that 691/* With per-bucket locks this operation is not-atomic, so that
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index bfa274ba9ed4..1e04cd464af9 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -1010,6 +1010,8 @@ asmlinkage long sys_mq_notify(mqd_t mqdes,
1010 return -EINVAL; 1010 return -EINVAL;
1011 } 1011 }
1012 if (notification.sigev_notify == SIGEV_THREAD) { 1012 if (notification.sigev_notify == SIGEV_THREAD) {
1013 long timeo;
1014
1013 /* create the notify skb */ 1015 /* create the notify skb */
1014 nc = alloc_skb(NOTIFY_COOKIE_LEN, GFP_KERNEL); 1016 nc = alloc_skb(NOTIFY_COOKIE_LEN, GFP_KERNEL);
1015 ret = -ENOMEM; 1017 ret = -ENOMEM;
@@ -1038,8 +1040,8 @@ retry:
1038 goto out; 1040 goto out;
1039 } 1041 }
1040 1042
1041 ret = netlink_attachskb(sock, nc, 0, 1043 timeo = MAX_SCHEDULE_TIMEOUT;
1042 MAX_SCHEDULE_TIMEOUT, NULL); 1044 ret = netlink_attachskb(sock, nc, 0, &timeo, NULL);
1043 if (ret == 1) 1045 if (ret == 1)
1044 goto retry; 1046 goto retry;
1045 if (ret) { 1047 if (ret) {
diff --git a/lib/libcrc32c.c b/lib/libcrc32c.c
index 802f11f0bf5b..b5c3287d8ea4 100644
--- a/lib/libcrc32c.c
+++ b/lib/libcrc32c.c
@@ -33,7 +33,6 @@
33#include <linux/crc32c.h> 33#include <linux/crc32c.h>
34#include <linux/compiler.h> 34#include <linux/compiler.h>
35#include <linux/module.h> 35#include <linux/module.h>
36#include <asm/byteorder.h>
37 36
38MODULE_AUTHOR("Clay Haapala <chaapala@cisco.com>"); 37MODULE_AUTHOR("Clay Haapala <chaapala@cisco.com>");
39MODULE_DESCRIPTION("CRC32c (Castagnoli) calculations"); 38MODULE_DESCRIPTION("CRC32c (Castagnoli) calculations");
@@ -161,15 +160,13 @@ static const u32 crc32c_table[256] = {
161 */ 160 */
162 161
163u32 __pure 162u32 __pure
164crc32c_le(u32 seed, unsigned char const *data, size_t length) 163crc32c_le(u32 crc, unsigned char const *data, size_t length)
165{ 164{
166 u32 crc = __cpu_to_le32(seed);
167
168 while (length--) 165 while (length--)
169 crc = 166 crc =
170 crc32c_table[(crc ^ *data++) & 0xFFL] ^ (crc >> 8); 167 crc32c_table[(crc ^ *data++) & 0xFFL] ^ (crc >> 8);
171 168
172 return __le32_to_cpu(crc); 169 return crc;
173} 170}
174 171
175#endif /* CRC_LE_BITS == 8 */ 172#endif /* CRC_LE_BITS == 8 */
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index 3fe4fc86055f..1037748c14db 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -747,6 +747,7 @@ static int vlan_ioctl_handler(struct net *net, void __user *arg)
747 vlan_dev_set_ingress_priority(dev, 747 vlan_dev_set_ingress_priority(dev,
748 args.u.skb_priority, 748 args.u.skb_priority,
749 args.vlan_qos); 749 args.vlan_qos);
750 err = 0;
750 break; 751 break;
751 752
752 case SET_VLAN_EGRESS_PRIORITY_CMD: 753 case SET_VLAN_EGRESS_PRIORITY_CMD:
diff --git a/net/bridge/netfilter/ebt_arp.c b/net/bridge/netfilter/ebt_arp.c
index 1a46952a56d9..18141392a9b4 100644
--- a/net/bridge/netfilter/ebt_arp.c
+++ b/net/bridge/netfilter/ebt_arp.c
@@ -34,7 +34,7 @@ static int ebt_filter_arp(const struct sk_buff *skb, const struct net_device *in
34 ah->ar_pro, EBT_ARP_PTYPE)) 34 ah->ar_pro, EBT_ARP_PTYPE))
35 return EBT_NOMATCH; 35 return EBT_NOMATCH;
36 36
37 if (info->bitmask & (EBT_ARP_SRC_IP | EBT_ARP_DST_IP)) { 37 if (info->bitmask & (EBT_ARP_SRC_IP | EBT_ARP_DST_IP | EBT_ARP_GRAT)) {
38 __be32 saddr, daddr, *sap, *dap; 38 __be32 saddr, daddr, *sap, *dap;
39 39
40 if (ah->ar_pln != sizeof(__be32) || ah->ar_pro != htons(ETH_P_IP)) 40 if (ah->ar_pln != sizeof(__be32) || ah->ar_pro != htons(ETH_P_IP))
diff --git a/net/core/dst.c b/net/core/dst.c
index 16958e64e577..03daead3592a 100644
--- a/net/core/dst.c
+++ b/net/core/dst.c
@@ -18,7 +18,6 @@
18#include <linux/types.h> 18#include <linux/types.h>
19#include <net/net_namespace.h> 19#include <net/net_namespace.h>
20 20
21#include <net/net_namespace.h>
22#include <net/dst.h> 21#include <net/dst.h>
23 22
24/* 23/*
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 05979e356963..29b8ee4e35d6 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -1435,6 +1435,8 @@ int neigh_table_clear(struct neigh_table *tbl)
1435 kfree(tbl->phash_buckets); 1435 kfree(tbl->phash_buckets);
1436 tbl->phash_buckets = NULL; 1436 tbl->phash_buckets = NULL;
1437 1437
1438 remove_proc_entry(tbl->id, init_net.proc_net_stat);
1439
1438 free_percpu(tbl->stats); 1440 free_percpu(tbl->stats);
1439 tbl->stats = NULL; 1441 tbl->stats = NULL;
1440 1442
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c
index e9f0964ce70b..3f6d37deac45 100644
--- a/net/core/net_namespace.c
+++ b/net/core/net_namespace.c
@@ -64,6 +64,20 @@ static struct net *net_alloc(void)
64 return kmem_cache_zalloc(net_cachep, GFP_KERNEL); 64 return kmem_cache_zalloc(net_cachep, GFP_KERNEL);
65} 65}
66 66
67static void net_free(struct net *net)
68{
69 if (!net)
70 return;
71
72 if (unlikely(atomic_read(&net->use_count) != 0)) {
73 printk(KERN_EMERG "network namespace not free! Usage: %d\n",
74 atomic_read(&net->use_count));
75 return;
76 }
77
78 kmem_cache_free(net_cachep, net);
79}
80
67struct net *copy_net_ns(unsigned long flags, struct net *old_net) 81struct net *copy_net_ns(unsigned long flags, struct net *old_net)
68{ 82{
69 struct net *new_net = NULL; 83 struct net *new_net = NULL;
@@ -100,20 +114,6 @@ out:
100 return new_net; 114 return new_net;
101} 115}
102 116
103static void net_free(struct net *net)
104{
105 if (!net)
106 return;
107
108 if (unlikely(atomic_read(&net->use_count) != 0)) {
109 printk(KERN_EMERG "network namespace not free! Usage: %d\n",
110 atomic_read(&net->use_count));
111 return;
112 }
113
114 kmem_cache_free(net_cachep, net);
115}
116
117static void cleanup_net(struct work_struct *work) 117static void cleanup_net(struct work_struct *work)
118{ 118{
119 struct pernet_operations *ops; 119 struct pernet_operations *ops;
diff --git a/net/core/sock.c b/net/core/sock.c
index 12ad2067a988..8fc2f84209e4 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1801,11 +1801,65 @@ EXPORT_SYMBOL(sk_common_release);
1801static DEFINE_RWLOCK(proto_list_lock); 1801static DEFINE_RWLOCK(proto_list_lock);
1802static LIST_HEAD(proto_list); 1802static LIST_HEAD(proto_list);
1803 1803
1804#ifdef CONFIG_SMP
1805/*
1806 * Define default functions to keep track of inuse sockets per protocol
1807 * Note that often used protocols use dedicated functions to get a speed increase.
1808 * (see DEFINE_PROTO_INUSE/REF_PROTO_INUSE)
1809 */
1810static void inuse_add(struct proto *prot, int inc)
1811{
1812 per_cpu_ptr(prot->inuse_ptr, smp_processor_id())[0] += inc;
1813}
1814
1815static int inuse_get(const struct proto *prot)
1816{
1817 int res = 0, cpu;
1818 for_each_possible_cpu(cpu)
1819 res += per_cpu_ptr(prot->inuse_ptr, cpu)[0];
1820 return res;
1821}
1822
1823static int inuse_init(struct proto *prot)
1824{
1825 if (!prot->inuse_getval || !prot->inuse_add) {
1826 prot->inuse_ptr = alloc_percpu(int);
1827 if (prot->inuse_ptr == NULL)
1828 return -ENOBUFS;
1829
1830 prot->inuse_getval = inuse_get;
1831 prot->inuse_add = inuse_add;
1832 }
1833 return 0;
1834}
1835
1836static void inuse_fini(struct proto *prot)
1837{
1838 if (prot->inuse_ptr != NULL) {
1839 free_percpu(prot->inuse_ptr);
1840 prot->inuse_ptr = NULL;
1841 prot->inuse_getval = NULL;
1842 prot->inuse_add = NULL;
1843 }
1844}
1845#else
1846static inline int inuse_init(struct proto *prot)
1847{
1848 return 0;
1849}
1850
1851static inline void inuse_fini(struct proto *prot)
1852{
1853}
1854#endif
1855
1804int proto_register(struct proto *prot, int alloc_slab) 1856int proto_register(struct proto *prot, int alloc_slab)
1805{ 1857{
1806 char *request_sock_slab_name = NULL; 1858 char *request_sock_slab_name = NULL;
1807 char *timewait_sock_slab_name; 1859 char *timewait_sock_slab_name;
1808 int rc = -ENOBUFS; 1860
1861 if (inuse_init(prot))
1862 goto out;
1809 1863
1810 if (alloc_slab) { 1864 if (alloc_slab) {
1811 prot->slab = kmem_cache_create(prot->name, prot->obj_size, 0, 1865 prot->slab = kmem_cache_create(prot->name, prot->obj_size, 0,
@@ -1814,7 +1868,7 @@ int proto_register(struct proto *prot, int alloc_slab)
1814 if (prot->slab == NULL) { 1868 if (prot->slab == NULL) {
1815 printk(KERN_CRIT "%s: Can't create sock SLAB cache!\n", 1869 printk(KERN_CRIT "%s: Can't create sock SLAB cache!\n",
1816 prot->name); 1870 prot->name);
1817 goto out; 1871 goto out_free_inuse;
1818 } 1872 }
1819 1873
1820 if (prot->rsk_prot != NULL) { 1874 if (prot->rsk_prot != NULL) {
@@ -1858,9 +1912,8 @@ int proto_register(struct proto *prot, int alloc_slab)
1858 write_lock(&proto_list_lock); 1912 write_lock(&proto_list_lock);
1859 list_add(&prot->node, &proto_list); 1913 list_add(&prot->node, &proto_list);
1860 write_unlock(&proto_list_lock); 1914 write_unlock(&proto_list_lock);
1861 rc = 0; 1915 return 0;
1862out: 1916
1863 return rc;
1864out_free_timewait_sock_slab_name: 1917out_free_timewait_sock_slab_name:
1865 kfree(timewait_sock_slab_name); 1918 kfree(timewait_sock_slab_name);
1866out_free_request_sock_slab: 1919out_free_request_sock_slab:
@@ -1873,7 +1926,10 @@ out_free_request_sock_slab_name:
1873out_free_sock_slab: 1926out_free_sock_slab:
1874 kmem_cache_destroy(prot->slab); 1927 kmem_cache_destroy(prot->slab);
1875 prot->slab = NULL; 1928 prot->slab = NULL;
1876 goto out; 1929out_free_inuse:
1930 inuse_fini(prot);
1931out:
1932 return -ENOBUFS;
1877} 1933}
1878 1934
1879EXPORT_SYMBOL(proto_register); 1935EXPORT_SYMBOL(proto_register);
@@ -1884,6 +1940,7 @@ void proto_unregister(struct proto *prot)
1884 list_del(&prot->node); 1940 list_del(&prot->node);
1885 write_unlock(&proto_list_lock); 1941 write_unlock(&proto_list_lock);
1886 1942
1943 inuse_fini(prot);
1887 if (prot->slab != NULL) { 1944 if (prot->slab != NULL) {
1888 kmem_cache_destroy(prot->slab); 1945 kmem_cache_destroy(prot->slab);
1889 prot->slab = NULL; 1946 prot->slab = NULL;
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index 01a6a808bdb7..db17b83e8d3e 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -922,6 +922,8 @@ static struct timewait_sock_ops dccp_timewait_sock_ops = {
922 .twsk_obj_size = sizeof(struct inet_timewait_sock), 922 .twsk_obj_size = sizeof(struct inet_timewait_sock),
923}; 923};
924 924
925DEFINE_PROTO_INUSE(dccp_v4)
926
925static struct proto dccp_v4_prot = { 927static struct proto dccp_v4_prot = {
926 .name = "DCCP", 928 .name = "DCCP",
927 .owner = THIS_MODULE, 929 .owner = THIS_MODULE,
@@ -950,6 +952,7 @@ static struct proto dccp_v4_prot = {
950 .compat_setsockopt = compat_dccp_setsockopt, 952 .compat_setsockopt = compat_dccp_setsockopt,
951 .compat_getsockopt = compat_dccp_getsockopt, 953 .compat_getsockopt = compat_dccp_getsockopt,
952#endif 954#endif
955 REF_PROTO_INUSE(dccp_v4)
953}; 956};
954 957
955static struct net_protocol dccp_v4_protocol = { 958static struct net_protocol dccp_v4_protocol = {
diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
index 62428ff137dd..87c98fb86fa8 100644
--- a/net/dccp/ipv6.c
+++ b/net/dccp/ipv6.c
@@ -1107,6 +1107,8 @@ static struct timewait_sock_ops dccp6_timewait_sock_ops = {
1107 .twsk_obj_size = sizeof(struct dccp6_timewait_sock), 1107 .twsk_obj_size = sizeof(struct dccp6_timewait_sock),
1108}; 1108};
1109 1109
1110DEFINE_PROTO_INUSE(dccp_v6)
1111
1110static struct proto dccp_v6_prot = { 1112static struct proto dccp_v6_prot = {
1111 .name = "DCCPv6", 1113 .name = "DCCPv6",
1112 .owner = THIS_MODULE, 1114 .owner = THIS_MODULE,
@@ -1135,6 +1137,7 @@ static struct proto dccp_v6_prot = {
1135 .compat_setsockopt = compat_dccp_setsockopt, 1137 .compat_setsockopt = compat_dccp_setsockopt,
1136 .compat_getsockopt = compat_dccp_getsockopt, 1138 .compat_getsockopt = compat_dccp_getsockopt,
1137#endif 1139#endif
1140 REF_PROTO_INUSE(dccp_v6)
1138}; 1141};
1139 1142
1140static struct inet6_protocol dccp_v6_protocol = { 1143static struct inet6_protocol dccp_v6_protocol = {
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index d84973928033..7a3bea9c28c1 100644
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -1072,11 +1072,13 @@ static int __init dccp_init(void)
1072 } 1072 }
1073 1073
1074 for (i = 0; i < dccp_hashinfo.ehash_size; i++) { 1074 for (i = 0; i < dccp_hashinfo.ehash_size; i++) {
1075 rwlock_init(&dccp_hashinfo.ehash[i].lock);
1076 INIT_HLIST_HEAD(&dccp_hashinfo.ehash[i].chain); 1075 INIT_HLIST_HEAD(&dccp_hashinfo.ehash[i].chain);
1077 INIT_HLIST_HEAD(&dccp_hashinfo.ehash[i].twchain); 1076 INIT_HLIST_HEAD(&dccp_hashinfo.ehash[i].twchain);
1078 } 1077 }
1079 1078
1079 if (inet_ehash_locks_alloc(&dccp_hashinfo))
1080 goto out_free_dccp_ehash;
1081
1080 bhash_order = ehash_order; 1082 bhash_order = ehash_order;
1081 1083
1082 do { 1084 do {
@@ -1091,7 +1093,7 @@ static int __init dccp_init(void)
1091 1093
1092 if (!dccp_hashinfo.bhash) { 1094 if (!dccp_hashinfo.bhash) {
1093 DCCP_CRIT("Failed to allocate DCCP bind hash table"); 1095 DCCP_CRIT("Failed to allocate DCCP bind hash table");
1094 goto out_free_dccp_ehash; 1096 goto out_free_dccp_locks;
1095 } 1097 }
1096 1098
1097 for (i = 0; i < dccp_hashinfo.bhash_size; i++) { 1099 for (i = 0; i < dccp_hashinfo.bhash_size; i++) {
@@ -1121,6 +1123,8 @@ out_free_dccp_mib:
1121out_free_dccp_bhash: 1123out_free_dccp_bhash:
1122 free_pages((unsigned long)dccp_hashinfo.bhash, bhash_order); 1124 free_pages((unsigned long)dccp_hashinfo.bhash, bhash_order);
1123 dccp_hashinfo.bhash = NULL; 1125 dccp_hashinfo.bhash = NULL;
1126out_free_dccp_locks:
1127 inet_ehash_locks_free(&dccp_hashinfo);
1124out_free_dccp_ehash: 1128out_free_dccp_ehash:
1125 free_pages((unsigned long)dccp_hashinfo.ehash, ehash_order); 1129 free_pages((unsigned long)dccp_hashinfo.ehash, ehash_order);
1126 dccp_hashinfo.ehash = NULL; 1130 dccp_hashinfo.ehash = NULL;
@@ -1139,6 +1143,7 @@ static void __exit dccp_fini(void)
1139 free_pages((unsigned long)dccp_hashinfo.ehash, 1143 free_pages((unsigned long)dccp_hashinfo.ehash,
1140 get_order(dccp_hashinfo.ehash_size * 1144 get_order(dccp_hashinfo.ehash_size *
1141 sizeof(struct inet_ehash_bucket))); 1145 sizeof(struct inet_ehash_bucket)));
1146 inet_ehash_locks_free(&dccp_hashinfo);
1142 kmem_cache_destroy(dccp_hashinfo.bind_bucket_cachep); 1147 kmem_cache_destroy(dccp_hashinfo.bind_bucket_cachep);
1143 dccp_ackvec_exit(); 1148 dccp_ackvec_exit();
1144 dccp_sysctl_exit(); 1149 dccp_sysctl_exit();
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c
index 26130afd8029..66e266fb5908 100644
--- a/net/decnet/dn_dev.c
+++ b/net/decnet/dn_dev.c
@@ -1439,7 +1439,7 @@ static const struct file_operations dn_dev_seq_fops = {
1439 1439
1440#endif /* CONFIG_PROC_FS */ 1440#endif /* CONFIG_PROC_FS */
1441 1441
1442static int __initdata addr[2]; 1442static int addr[2];
1443module_param_array(addr, int, NULL, 0444); 1443module_param_array(addr, int, NULL, 0444);
1444MODULE_PARM_DESC(addr, "The DECnet address of this machine: area,node"); 1444MODULE_PARM_DESC(addr, "The DECnet address of this machine: area,node");
1445 1445
diff --git a/net/ieee80211/ieee80211_crypt_tkip.c b/net/ieee80211/ieee80211_crypt_tkip.c
index 4cce3534e408..58b22619ab15 100644
--- a/net/ieee80211/ieee80211_crypt_tkip.c
+++ b/net/ieee80211/ieee80211_crypt_tkip.c
@@ -25,7 +25,6 @@
25#include <net/ieee80211.h> 25#include <net/ieee80211.h>
26 26
27#include <linux/crypto.h> 27#include <linux/crypto.h>
28#include <linux/scatterlist.h>
29#include <linux/crc32.h> 28#include <linux/crc32.h>
30 29
31MODULE_AUTHOR("Jouni Malinen"); 30MODULE_AUTHOR("Jouni Malinen");
diff --git a/net/ieee80211/ieee80211_crypt_wep.c b/net/ieee80211/ieee80211_crypt_wep.c
index 866fc04c44f9..3fa30c40779f 100644
--- a/net/ieee80211/ieee80211_crypt_wep.c
+++ b/net/ieee80211/ieee80211_crypt_wep.c
@@ -22,7 +22,6 @@
22#include <net/ieee80211.h> 22#include <net/ieee80211.h>
23 23
24#include <linux/crypto.h> 24#include <linux/crypto.h>
25#include <linux/scatterlist.h>
26#include <linux/crc32.h> 25#include <linux/crc32.h>
27 26
28MODULE_AUTHOR("Jouni Malinen"); 27MODULE_AUTHOR("Jouni Malinen");
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index 60123905dbbf..732d8f088b13 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -59,6 +59,13 @@ struct fib_table *ip_fib_main_table;
59#define FIB_TABLE_HASHSZ 1 59#define FIB_TABLE_HASHSZ 1
60static struct hlist_head fib_table_hash[FIB_TABLE_HASHSZ]; 60static struct hlist_head fib_table_hash[FIB_TABLE_HASHSZ];
61 61
62static void __init fib4_rules_init(void)
63{
64 ip_fib_local_table = fib_hash_init(RT_TABLE_LOCAL);
65 hlist_add_head_rcu(&ip_fib_local_table->tb_hlist, &fib_table_hash[0]);
66 ip_fib_main_table = fib_hash_init(RT_TABLE_MAIN);
67 hlist_add_head_rcu(&ip_fib_main_table->tb_hlist, &fib_table_hash[0]);
68}
62#else 69#else
63 70
64#define FIB_TABLE_HASHSZ 256 71#define FIB_TABLE_HASHSZ 256
@@ -905,14 +912,8 @@ void __init ip_fib_init(void)
905 912
906 for (i = 0; i < FIB_TABLE_HASHSZ; i++) 913 for (i = 0; i < FIB_TABLE_HASHSZ; i++)
907 INIT_HLIST_HEAD(&fib_table_hash[i]); 914 INIT_HLIST_HEAD(&fib_table_hash[i]);
908#ifndef CONFIG_IP_MULTIPLE_TABLES 915
909 ip_fib_local_table = fib_hash_init(RT_TABLE_LOCAL);
910 hlist_add_head_rcu(&ip_fib_local_table->tb_hlist, &fib_table_hash[0]);
911 ip_fib_main_table = fib_hash_init(RT_TABLE_MAIN);
912 hlist_add_head_rcu(&ip_fib_main_table->tb_hlist, &fib_table_hash[0]);
913#else
914 fib4_rules_init(); 916 fib4_rules_init();
915#endif
916 917
917 register_netdevice_notifier(&fib_netdev_notifier); 918 register_netdevice_notifier(&fib_netdev_notifier);
918 register_inetaddr_notifier(&fib_inetaddr_notifier); 919 register_inetaddr_notifier(&fib_inetaddr_notifier);
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
index dc429b6b0ba6..b0170732b5e9 100644
--- a/net/ipv4/inet_diag.c
+++ b/net/ipv4/inet_diag.c
@@ -747,13 +747,14 @@ skip_listen_ht:
747 747
748 for (i = s_i; i < hashinfo->ehash_size; i++) { 748 for (i = s_i; i < hashinfo->ehash_size; i++) {
749 struct inet_ehash_bucket *head = &hashinfo->ehash[i]; 749 struct inet_ehash_bucket *head = &hashinfo->ehash[i];
750 rwlock_t *lock = inet_ehash_lockp(hashinfo, i);
750 struct sock *sk; 751 struct sock *sk;
751 struct hlist_node *node; 752 struct hlist_node *node;
752 753
753 if (i > s_i) 754 if (i > s_i)
754 s_num = 0; 755 s_num = 0;
755 756
756 read_lock_bh(&head->lock); 757 read_lock_bh(lock);
757 num = 0; 758 num = 0;
758 sk_for_each(sk, node, &head->chain) { 759 sk_for_each(sk, node, &head->chain) {
759 struct inet_sock *inet = inet_sk(sk); 760 struct inet_sock *inet = inet_sk(sk);
@@ -769,7 +770,7 @@ skip_listen_ht:
769 r->id.idiag_dport) 770 r->id.idiag_dport)
770 goto next_normal; 771 goto next_normal;
771 if (inet_csk_diag_dump(sk, skb, cb) < 0) { 772 if (inet_csk_diag_dump(sk, skb, cb) < 0) {
772 read_unlock_bh(&head->lock); 773 read_unlock_bh(lock);
773 goto done; 774 goto done;
774 } 775 }
775next_normal: 776next_normal:
@@ -791,14 +792,14 @@ next_normal:
791 r->id.idiag_dport) 792 r->id.idiag_dport)
792 goto next_dying; 793 goto next_dying;
793 if (inet_twsk_diag_dump(tw, skb, cb) < 0) { 794 if (inet_twsk_diag_dump(tw, skb, cb) < 0) {
794 read_unlock_bh(&head->lock); 795 read_unlock_bh(lock);
795 goto done; 796 goto done;
796 } 797 }
797next_dying: 798next_dying:
798 ++num; 799 ++num;
799 } 800 }
800 } 801 }
801 read_unlock_bh(&head->lock); 802 read_unlock_bh(lock);
802 } 803 }
803 804
804done: 805done:
diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c
index 16eecc7046a3..67704da04fc4 100644
--- a/net/ipv4/inet_hashtables.c
+++ b/net/ipv4/inet_hashtables.c
@@ -204,12 +204,13 @@ static int __inet_check_established(struct inet_timewait_death_row *death_row,
204 const __portpair ports = INET_COMBINED_PORTS(inet->dport, lport); 204 const __portpair ports = INET_COMBINED_PORTS(inet->dport, lport);
205 unsigned int hash = inet_ehashfn(daddr, lport, saddr, inet->dport); 205 unsigned int hash = inet_ehashfn(daddr, lport, saddr, inet->dport);
206 struct inet_ehash_bucket *head = inet_ehash_bucket(hinfo, hash); 206 struct inet_ehash_bucket *head = inet_ehash_bucket(hinfo, hash);
207 rwlock_t *lock = inet_ehash_lockp(hinfo, hash);
207 struct sock *sk2; 208 struct sock *sk2;
208 const struct hlist_node *node; 209 const struct hlist_node *node;
209 struct inet_timewait_sock *tw; 210 struct inet_timewait_sock *tw;
210 211
211 prefetch(head->chain.first); 212 prefetch(head->chain.first);
212 write_lock(&head->lock); 213 write_lock(lock);
213 214
214 /* Check TIME-WAIT sockets first. */ 215 /* Check TIME-WAIT sockets first. */
215 sk_for_each(sk2, node, &head->twchain) { 216 sk_for_each(sk2, node, &head->twchain) {
@@ -239,7 +240,7 @@ unique:
239 BUG_TRAP(sk_unhashed(sk)); 240 BUG_TRAP(sk_unhashed(sk));
240 __sk_add_node(sk, &head->chain); 241 __sk_add_node(sk, &head->chain);
241 sock_prot_inc_use(sk->sk_prot); 242 sock_prot_inc_use(sk->sk_prot);
242 write_unlock(&head->lock); 243 write_unlock(lock);
243 244
244 if (twp) { 245 if (twp) {
245 *twp = tw; 246 *twp = tw;
@@ -255,7 +256,7 @@ unique:
255 return 0; 256 return 0;
256 257
257not_unique: 258not_unique:
258 write_unlock(&head->lock); 259 write_unlock(lock);
259 return -EADDRNOTAVAIL; 260 return -EADDRNOTAVAIL;
260} 261}
261 262
diff --git a/net/ipv4/inet_timewait_sock.c b/net/ipv4/inet_timewait_sock.c
index 4e189e28f306..a60b99e0ebdc 100644
--- a/net/ipv4/inet_timewait_sock.c
+++ b/net/ipv4/inet_timewait_sock.c
@@ -20,16 +20,16 @@ static void __inet_twsk_kill(struct inet_timewait_sock *tw,
20 struct inet_bind_hashbucket *bhead; 20 struct inet_bind_hashbucket *bhead;
21 struct inet_bind_bucket *tb; 21 struct inet_bind_bucket *tb;
22 /* Unlink from established hashes. */ 22 /* Unlink from established hashes. */
23 struct inet_ehash_bucket *ehead = inet_ehash_bucket(hashinfo, tw->tw_hash); 23 rwlock_t *lock = inet_ehash_lockp(hashinfo, tw->tw_hash);
24 24
25 write_lock(&ehead->lock); 25 write_lock(lock);
26 if (hlist_unhashed(&tw->tw_node)) { 26 if (hlist_unhashed(&tw->tw_node)) {
27 write_unlock(&ehead->lock); 27 write_unlock(lock);
28 return; 28 return;
29 } 29 }
30 __hlist_del(&tw->tw_node); 30 __hlist_del(&tw->tw_node);
31 sk_node_init(&tw->tw_node); 31 sk_node_init(&tw->tw_node);
32 write_unlock(&ehead->lock); 32 write_unlock(lock);
33 33
34 /* Disassociate with bind bucket. */ 34 /* Disassociate with bind bucket. */
35 bhead = &hashinfo->bhash[inet_bhashfn(tw->tw_num, hashinfo->bhash_size)]; 35 bhead = &hashinfo->bhash[inet_bhashfn(tw->tw_num, hashinfo->bhash_size)];
@@ -59,6 +59,7 @@ void __inet_twsk_hashdance(struct inet_timewait_sock *tw, struct sock *sk,
59 const struct inet_sock *inet = inet_sk(sk); 59 const struct inet_sock *inet = inet_sk(sk);
60 const struct inet_connection_sock *icsk = inet_csk(sk); 60 const struct inet_connection_sock *icsk = inet_csk(sk);
61 struct inet_ehash_bucket *ehead = inet_ehash_bucket(hashinfo, sk->sk_hash); 61 struct inet_ehash_bucket *ehead = inet_ehash_bucket(hashinfo, sk->sk_hash);
62 rwlock_t *lock = inet_ehash_lockp(hashinfo, sk->sk_hash);
62 struct inet_bind_hashbucket *bhead; 63 struct inet_bind_hashbucket *bhead;
63 /* Step 1: Put TW into bind hash. Original socket stays there too. 64 /* Step 1: Put TW into bind hash. Original socket stays there too.
64 Note, that any socket with inet->num != 0 MUST be bound in 65 Note, that any socket with inet->num != 0 MUST be bound in
@@ -71,7 +72,7 @@ void __inet_twsk_hashdance(struct inet_timewait_sock *tw, struct sock *sk,
71 inet_twsk_add_bind_node(tw, &tw->tw_tb->owners); 72 inet_twsk_add_bind_node(tw, &tw->tw_tb->owners);
72 spin_unlock(&bhead->lock); 73 spin_unlock(&bhead->lock);
73 74
74 write_lock(&ehead->lock); 75 write_lock(lock);
75 76
76 /* Step 2: Remove SK from established hash. */ 77 /* Step 2: Remove SK from established hash. */
77 if (__sk_del_node_init(sk)) 78 if (__sk_del_node_init(sk))
@@ -81,7 +82,7 @@ void __inet_twsk_hashdance(struct inet_timewait_sock *tw, struct sock *sk,
81 inet_twsk_add_node(tw, &ehead->twchain); 82 inet_twsk_add_node(tw, &ehead->twchain);
82 atomic_inc(&tw->tw_refcnt); 83 atomic_inc(&tw->tw_refcnt);
83 84
84 write_unlock(&ehead->lock); 85 write_unlock(lock);
85} 86}
86 87
87EXPORT_SYMBOL_GPL(__inet_twsk_hashdance); 88EXPORT_SYMBOL_GPL(__inet_twsk_hashdance);
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index e5f7dc2de303..fd99fbd685ea 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -1183,6 +1183,17 @@ error:
1183 return err; 1183 return err;
1184} 1184}
1185 1185
1186static void ip_cork_release(struct inet_sock *inet)
1187{
1188 inet->cork.flags &= ~IPCORK_OPT;
1189 kfree(inet->cork.opt);
1190 inet->cork.opt = NULL;
1191 if (inet->cork.rt) {
1192 ip_rt_put(inet->cork.rt);
1193 inet->cork.rt = NULL;
1194 }
1195}
1196
1186/* 1197/*
1187 * Combined all pending IP fragments on the socket as one IP datagram 1198 * Combined all pending IP fragments on the socket as one IP datagram
1188 * and push them out. 1199 * and push them out.
@@ -1276,13 +1287,7 @@ int ip_push_pending_frames(struct sock *sk)
1276 } 1287 }
1277 1288
1278out: 1289out:
1279 inet->cork.flags &= ~IPCORK_OPT; 1290 ip_cork_release(inet);
1280 kfree(inet->cork.opt);
1281 inet->cork.opt = NULL;
1282 if (inet->cork.rt) {
1283 ip_rt_put(inet->cork.rt);
1284 inet->cork.rt = NULL;
1285 }
1286 return err; 1291 return err;
1287 1292
1288error: 1293error:
@@ -1295,19 +1300,12 @@ error:
1295 */ 1300 */
1296void ip_flush_pending_frames(struct sock *sk) 1301void ip_flush_pending_frames(struct sock *sk)
1297{ 1302{
1298 struct inet_sock *inet = inet_sk(sk);
1299 struct sk_buff *skb; 1303 struct sk_buff *skb;
1300 1304
1301 while ((skb = __skb_dequeue_tail(&sk->sk_write_queue)) != NULL) 1305 while ((skb = __skb_dequeue_tail(&sk->sk_write_queue)) != NULL)
1302 kfree_skb(skb); 1306 kfree_skb(skb);
1303 1307
1304 inet->cork.flags &= ~IPCORK_OPT; 1308 ip_cork_release(inet_sk(sk));
1305 kfree(inet->cork.opt);
1306 inet->cork.opt = NULL;
1307 if (inet->cork.rt) {
1308 ip_rt_put(inet->cork.rt);
1309 inet->cork.rt = NULL;
1310 }
1311} 1309}
1312 1310
1313 1311
diff --git a/net/ipv4/ip_sockglue.c b/net/ipv4/ip_sockglue.c
index f51f20e487c8..82817e554363 100644
--- a/net/ipv4/ip_sockglue.c
+++ b/net/ipv4/ip_sockglue.c
@@ -437,10 +437,8 @@ static int do_ip_setsockopt(struct sock *sk, int level,
437 437
438 /* If optlen==0, it is equivalent to val == 0 */ 438 /* If optlen==0, it is equivalent to val == 0 */
439 439
440#ifdef CONFIG_IP_MROUTE 440 if (ip_mroute_opt(optname))
441 if (optname >= MRT_BASE && optname <= (MRT_BASE + 10))
442 return ip_mroute_setsockopt(sk,optname,optval,optlen); 441 return ip_mroute_setsockopt(sk,optname,optval,optlen);
443#endif
444 442
445 err = 0; 443 err = 0;
446 lock_sock(sk); 444 lock_sock(sk);
@@ -909,11 +907,9 @@ int ip_setsockopt(struct sock *sk, int level,
909#ifdef CONFIG_NETFILTER 907#ifdef CONFIG_NETFILTER
910 /* we need to exclude all possible ENOPROTOOPTs except default case */ 908 /* we need to exclude all possible ENOPROTOOPTs except default case */
911 if (err == -ENOPROTOOPT && optname != IP_HDRINCL && 909 if (err == -ENOPROTOOPT && optname != IP_HDRINCL &&
912 optname != IP_IPSEC_POLICY && optname != IP_XFRM_POLICY 910 optname != IP_IPSEC_POLICY &&
913#ifdef CONFIG_IP_MROUTE 911 optname != IP_XFRM_POLICY &&
914 && (optname < MRT_BASE || optname > (MRT_BASE + 10)) 912 !ip_mroute_opt(optname)) {
915#endif
916 ) {
917 lock_sock(sk); 913 lock_sock(sk);
918 err = nf_setsockopt(sk, PF_INET, optname, optval, optlen); 914 err = nf_setsockopt(sk, PF_INET, optname, optval, optlen);
919 release_sock(sk); 915 release_sock(sk);
@@ -935,11 +931,9 @@ int compat_ip_setsockopt(struct sock *sk, int level, int optname,
935#ifdef CONFIG_NETFILTER 931#ifdef CONFIG_NETFILTER
936 /* we need to exclude all possible ENOPROTOOPTs except default case */ 932 /* we need to exclude all possible ENOPROTOOPTs except default case */
937 if (err == -ENOPROTOOPT && optname != IP_HDRINCL && 933 if (err == -ENOPROTOOPT && optname != IP_HDRINCL &&
938 optname != IP_IPSEC_POLICY && optname != IP_XFRM_POLICY 934 optname != IP_IPSEC_POLICY &&
939#ifdef CONFIG_IP_MROUTE 935 optname != IP_XFRM_POLICY &&
940 && (optname < MRT_BASE || optname > (MRT_BASE + 10)) 936 !ip_mroute_opt(optname)) {
941#endif
942 ) {
943 lock_sock(sk); 937 lock_sock(sk);
944 err = compat_nf_setsockopt(sk, PF_INET, optname, 938 err = compat_nf_setsockopt(sk, PF_INET, optname,
945 optval, optlen); 939 optval, optlen);
@@ -967,11 +961,8 @@ static int do_ip_getsockopt(struct sock *sk, int level, int optname,
967 if (level != SOL_IP) 961 if (level != SOL_IP)
968 return -EOPNOTSUPP; 962 return -EOPNOTSUPP;
969 963
970#ifdef CONFIG_IP_MROUTE 964 if (ip_mroute_opt(optname))
971 if (optname >= MRT_BASE && optname <= MRT_BASE+10) {
972 return ip_mroute_getsockopt(sk,optname,optval,optlen); 965 return ip_mroute_getsockopt(sk,optname,optval,optlen);
973 }
974#endif
975 966
976 if (get_user(len,optlen)) 967 if (get_user(len,optlen))
977 return -EFAULT; 968 return -EFAULT;
@@ -1171,11 +1162,8 @@ int ip_getsockopt(struct sock *sk, int level,
1171 err = do_ip_getsockopt(sk, level, optname, optval, optlen); 1162 err = do_ip_getsockopt(sk, level, optname, optval, optlen);
1172#ifdef CONFIG_NETFILTER 1163#ifdef CONFIG_NETFILTER
1173 /* we need to exclude all possible ENOPROTOOPTs except default case */ 1164 /* we need to exclude all possible ENOPROTOOPTs except default case */
1174 if (err == -ENOPROTOOPT && optname != IP_PKTOPTIONS 1165 if (err == -ENOPROTOOPT && optname != IP_PKTOPTIONS &&
1175#ifdef CONFIG_IP_MROUTE 1166 !ip_mroute_opt(optname)) {
1176 && (optname < MRT_BASE || optname > MRT_BASE+10)
1177#endif
1178 ) {
1179 int len; 1167 int len;
1180 1168
1181 if (get_user(len,optlen)) 1169 if (get_user(len,optlen))
@@ -1200,11 +1188,8 @@ int compat_ip_getsockopt(struct sock *sk, int level, int optname,
1200 int err = do_ip_getsockopt(sk, level, optname, optval, optlen); 1188 int err = do_ip_getsockopt(sk, level, optname, optval, optlen);
1201#ifdef CONFIG_NETFILTER 1189#ifdef CONFIG_NETFILTER
1202 /* we need to exclude all possible ENOPROTOOPTs except default case */ 1190 /* we need to exclude all possible ENOPROTOOPTs except default case */
1203 if (err == -ENOPROTOOPT && optname != IP_PKTOPTIONS 1191 if (err == -ENOPROTOOPT && optname != IP_PKTOPTIONS &&
1204#ifdef CONFIG_IP_MROUTE 1192 !ip_mroute_opt(optname)) {
1205 && (optname < MRT_BASE || optname > MRT_BASE+10)
1206#endif
1207 ) {
1208 int len; 1193 int len;
1209 1194
1210 if (get_user(len, optlen)) 1195 if (get_user(len, optlen))
diff --git a/net/ipv4/ipcomp.c b/net/ipv4/ipcomp.c
index ca1b5fdb8d31..2c44a94c2135 100644
--- a/net/ipv4/ipcomp.c
+++ b/net/ipv4/ipcomp.c
@@ -16,6 +16,7 @@
16#include <linux/module.h> 16#include <linux/module.h>
17#include <asm/semaphore.h> 17#include <asm/semaphore.h>
18#include <linux/crypto.h> 18#include <linux/crypto.h>
19#include <linux/err.h>
19#include <linux/pfkeyv2.h> 20#include <linux/pfkeyv2.h>
20#include <linux/percpu.h> 21#include <linux/percpu.h>
21#include <linux/smp.h> 22#include <linux/smp.h>
@@ -344,7 +345,7 @@ static struct crypto_comp **ipcomp_alloc_tfms(const char *alg_name)
344 for_each_possible_cpu(cpu) { 345 for_each_possible_cpu(cpu) {
345 struct crypto_comp *tfm = crypto_alloc_comp(alg_name, 0, 346 struct crypto_comp *tfm = crypto_alloc_comp(alg_name, 0,
346 CRYPTO_ALG_ASYNC); 347 CRYPTO_ALG_ASYNC);
347 if (!tfm) 348 if (IS_ERR(tfm))
348 goto error; 349 goto error;
349 *per_cpu_ptr(tfms, cpu) = tfm; 350 *per_cpu_ptr(tfms, cpu) = tfm;
350 } 351 }
diff --git a/net/ipv4/ipvs/ip_vs_conn.c b/net/ipv4/ipvs/ip_vs_conn.c
index 4b702f708d30..b7eeae622d9b 100644
--- a/net/ipv4/ipvs/ip_vs_conn.c
+++ b/net/ipv4/ipvs/ip_vs_conn.c
@@ -426,6 +426,25 @@ ip_vs_bind_dest(struct ip_vs_conn *cp, struct ip_vs_dest *dest)
426 426
427 427
428/* 428/*
429 * Check if there is a destination for the connection, if so
430 * bind the connection to the destination.
431 */
432struct ip_vs_dest *ip_vs_try_bind_dest(struct ip_vs_conn *cp)
433{
434 struct ip_vs_dest *dest;
435
436 if ((cp) && (!cp->dest)) {
437 dest = ip_vs_find_dest(cp->daddr, cp->dport,
438 cp->vaddr, cp->vport, cp->protocol);
439 ip_vs_bind_dest(cp, dest);
440 return dest;
441 } else
442 return NULL;
443}
444EXPORT_SYMBOL(ip_vs_try_bind_dest);
445
446
447/*
429 * Unbind a connection entry with its VS destination 448 * Unbind a connection entry with its VS destination
430 * Called by the ip_vs_conn_expire function. 449 * Called by the ip_vs_conn_expire function.
431 */ 450 */
diff --git a/net/ipv4/ipvs/ip_vs_core.c b/net/ipv4/ipvs/ip_vs_core.c
index c6ed7654e839..20c884a57721 100644
--- a/net/ipv4/ipvs/ip_vs_core.c
+++ b/net/ipv4/ipvs/ip_vs_core.c
@@ -979,15 +979,23 @@ ip_vs_in(unsigned int hooknum, struct sk_buff *skb,
979 ret = NF_ACCEPT; 979 ret = NF_ACCEPT;
980 } 980 }
981 981
982 /* increase its packet counter and check if it is needed 982 /* Increase its packet counter and check if it is needed
983 to be synchronized */ 983 * to be synchronized
984 *
985 * Sync connection if it is about to close to
986 * encorage the standby servers to update the connections timeout
987 */
984 atomic_inc(&cp->in_pkts); 988 atomic_inc(&cp->in_pkts);
985 if ((ip_vs_sync_state & IP_VS_STATE_MASTER) && 989 if ((ip_vs_sync_state & IP_VS_STATE_MASTER) &&
986 (cp->protocol != IPPROTO_TCP || 990 (((cp->protocol != IPPROTO_TCP ||
987 cp->state == IP_VS_TCP_S_ESTABLISHED) && 991 cp->state == IP_VS_TCP_S_ESTABLISHED) &&
988 (atomic_read(&cp->in_pkts) % sysctl_ip_vs_sync_threshold[1] 992 (atomic_read(&cp->in_pkts) % sysctl_ip_vs_sync_threshold[1]
989 == sysctl_ip_vs_sync_threshold[0])) 993 == sysctl_ip_vs_sync_threshold[0])) ||
994 ((cp->protocol == IPPROTO_TCP) && (cp->old_state != cp->state) &&
995 ((cp->state == IP_VS_TCP_S_FIN_WAIT) ||
996 (cp->state == IP_VS_TCP_S_CLOSE)))))
990 ip_vs_sync_conn(cp); 997 ip_vs_sync_conn(cp);
998 cp->old_state = cp->state;
991 999
992 ip_vs_conn_put(cp); 1000 ip_vs_conn_put(cp);
993 return ret; 1001 return ret;
diff --git a/net/ipv4/ipvs/ip_vs_ctl.c b/net/ipv4/ipvs/ip_vs_ctl.c
index 7345fc252a23..3c4d22a468ec 100644
--- a/net/ipv4/ipvs/ip_vs_ctl.c
+++ b/net/ipv4/ipvs/ip_vs_ctl.c
@@ -579,6 +579,32 @@ ip_vs_lookup_dest(struct ip_vs_service *svc, __be32 daddr, __be16 dport)
579 return NULL; 579 return NULL;
580} 580}
581 581
582/*
583 * Find destination by {daddr,dport,vaddr,protocol}
584 * Cretaed to be used in ip_vs_process_message() in
585 * the backup synchronization daemon. It finds the
586 * destination to be bound to the received connection
587 * on the backup.
588 *
589 * ip_vs_lookup_real_service() looked promissing, but
590 * seems not working as expected.
591 */
592struct ip_vs_dest *ip_vs_find_dest(__be32 daddr, __be16 dport,
593 __be32 vaddr, __be16 vport, __u16 protocol)
594{
595 struct ip_vs_dest *dest;
596 struct ip_vs_service *svc;
597
598 svc = ip_vs_service_get(0, protocol, vaddr, vport);
599 if (!svc)
600 return NULL;
601 dest = ip_vs_lookup_dest(svc, daddr, dport);
602 if (dest)
603 atomic_inc(&dest->refcnt);
604 ip_vs_service_put(svc);
605 return dest;
606}
607EXPORT_SYMBOL(ip_vs_find_dest);
582 608
583/* 609/*
584 * Lookup dest by {svc,addr,port} in the destination trash. 610 * Lookup dest by {svc,addr,port} in the destination trash.
diff --git a/net/ipv4/ipvs/ip_vs_sync.c b/net/ipv4/ipvs/ip_vs_sync.c
index 0d4d9721cbd4..bd930efc18da 100644
--- a/net/ipv4/ipvs/ip_vs_sync.c
+++ b/net/ipv4/ipvs/ip_vs_sync.c
@@ -284,6 +284,7 @@ static void ip_vs_process_message(const char *buffer, const size_t buflen)
284 struct ip_vs_sync_conn_options *opt; 284 struct ip_vs_sync_conn_options *opt;
285 struct ip_vs_conn *cp; 285 struct ip_vs_conn *cp;
286 struct ip_vs_protocol *pp; 286 struct ip_vs_protocol *pp;
287 struct ip_vs_dest *dest;
287 char *p; 288 char *p;
288 int i; 289 int i;
289 290
@@ -317,20 +318,34 @@ static void ip_vs_process_message(const char *buffer, const size_t buflen)
317 s->caddr, s->cport, 318 s->caddr, s->cport,
318 s->vaddr, s->vport); 319 s->vaddr, s->vport);
319 if (!cp) { 320 if (!cp) {
321 /*
322 * Find the appropriate destination for the connection.
323 * If it is not found the connection will remain unbound
324 * but still handled.
325 */
326 dest = ip_vs_find_dest(s->daddr, s->dport,
327 s->vaddr, s->vport,
328 s->protocol);
320 cp = ip_vs_conn_new(s->protocol, 329 cp = ip_vs_conn_new(s->protocol,
321 s->caddr, s->cport, 330 s->caddr, s->cport,
322 s->vaddr, s->vport, 331 s->vaddr, s->vport,
323 s->daddr, s->dport, 332 s->daddr, s->dport,
324 flags, NULL); 333 flags, dest);
334 if (dest)
335 atomic_dec(&dest->refcnt);
325 if (!cp) { 336 if (!cp) {
326 IP_VS_ERR("ip_vs_conn_new failed\n"); 337 IP_VS_ERR("ip_vs_conn_new failed\n");
327 return; 338 return;
328 } 339 }
329 cp->state = ntohs(s->state); 340 cp->state = ntohs(s->state);
330 } else if (!cp->dest) { 341 } else if (!cp->dest) {
331 /* it is an entry created by the synchronization */ 342 dest = ip_vs_try_bind_dest(cp);
332 cp->state = ntohs(s->state); 343 if (!dest) {
333 cp->flags = flags | IP_VS_CONN_F_HASHED; 344 /* it is an unbound entry created by
345 * synchronization */
346 cp->flags = flags | IP_VS_CONN_F_HASHED;
347 } else
348 atomic_dec(&dest->refcnt);
334 } /* Note that we don't touch its state and flags 349 } /* Note that we don't touch its state and flags
335 if it is a normal entry. */ 350 if it is a normal entry. */
336 351
@@ -342,6 +357,7 @@ static void ip_vs_process_message(const char *buffer, const size_t buflen)
342 p += SIMPLE_CONN_SIZE; 357 p += SIMPLE_CONN_SIZE;
343 358
344 atomic_set(&cp->in_pkts, sysctl_ip_vs_sync_threshold[0]); 359 atomic_set(&cp->in_pkts, sysctl_ip_vs_sync_threshold[0]);
360 cp->state = ntohs(s->state);
345 pp = ip_vs_proto_get(s->protocol); 361 pp = ip_vs_proto_get(s->protocol);
346 cp->timeout = pp->timeout_table[cp->state]; 362 cp->timeout = pp->timeout_table[cp->state];
347 ip_vs_conn_put(cp); 363 ip_vs_conn_put(cp);
diff --git a/net/ipv4/netfilter/Makefile b/net/ipv4/netfilter/Makefile
index 409d273f6f82..7456833d6ade 100644
--- a/net/ipv4/netfilter/Makefile
+++ b/net/ipv4/netfilter/Makefile
@@ -41,27 +41,27 @@ obj-$(CONFIG_NF_NAT) += iptable_nat.o
41obj-$(CONFIG_IP_NF_RAW) += iptable_raw.o 41obj-$(CONFIG_IP_NF_RAW) += iptable_raw.o
42 42
43# matches 43# matches
44obj-$(CONFIG_IP_NF_MATCH_ADDRTYPE) += ipt_addrtype.o
45obj-$(CONFIG_IP_NF_MATCH_AH) += ipt_ah.o
46obj-$(CONFIG_IP_NF_MATCH_ECN) += ipt_ecn.o
44obj-$(CONFIG_IP_NF_MATCH_IPRANGE) += ipt_iprange.o 47obj-$(CONFIG_IP_NF_MATCH_IPRANGE) += ipt_iprange.o
45obj-$(CONFIG_IP_NF_MATCH_OWNER) += ipt_owner.o 48obj-$(CONFIG_IP_NF_MATCH_OWNER) += ipt_owner.o
46obj-$(CONFIG_IP_NF_MATCH_TOS) += ipt_tos.o
47obj-$(CONFIG_IP_NF_MATCH_RECENT) += ipt_recent.o 49obj-$(CONFIG_IP_NF_MATCH_RECENT) += ipt_recent.o
48obj-$(CONFIG_IP_NF_MATCH_ECN) += ipt_ecn.o 50obj-$(CONFIG_IP_NF_MATCH_TOS) += ipt_tos.o
49obj-$(CONFIG_IP_NF_MATCH_AH) += ipt_ah.o
50obj-$(CONFIG_IP_NF_MATCH_TTL) += ipt_ttl.o 51obj-$(CONFIG_IP_NF_MATCH_TTL) += ipt_ttl.o
51obj-$(CONFIG_IP_NF_MATCH_ADDRTYPE) += ipt_addrtype.o
52 52
53# targets 53# targets
54obj-$(CONFIG_IP_NF_TARGET_REJECT) += ipt_REJECT.o 54obj-$(CONFIG_IP_NF_TARGET_CLUSTERIP) += ipt_CLUSTERIP.o
55obj-$(CONFIG_IP_NF_TARGET_TOS) += ipt_TOS.o
56obj-$(CONFIG_IP_NF_TARGET_ECN) += ipt_ECN.o 55obj-$(CONFIG_IP_NF_TARGET_ECN) += ipt_ECN.o
56obj-$(CONFIG_IP_NF_TARGET_LOG) += ipt_LOG.o
57obj-$(CONFIG_IP_NF_TARGET_MASQUERADE) += ipt_MASQUERADE.o 57obj-$(CONFIG_IP_NF_TARGET_MASQUERADE) += ipt_MASQUERADE.o
58obj-$(CONFIG_IP_NF_TARGET_REDIRECT) += ipt_REDIRECT.o
59obj-$(CONFIG_IP_NF_TARGET_NETMAP) += ipt_NETMAP.o 58obj-$(CONFIG_IP_NF_TARGET_NETMAP) += ipt_NETMAP.o
59obj-$(CONFIG_IP_NF_TARGET_REDIRECT) += ipt_REDIRECT.o
60obj-$(CONFIG_IP_NF_TARGET_REJECT) += ipt_REJECT.o
60obj-$(CONFIG_IP_NF_TARGET_SAME) += ipt_SAME.o 61obj-$(CONFIG_IP_NF_TARGET_SAME) += ipt_SAME.o
61obj-$(CONFIG_IP_NF_TARGET_LOG) += ipt_LOG.o 62obj-$(CONFIG_IP_NF_TARGET_TOS) += ipt_TOS.o
62obj-$(CONFIG_IP_NF_TARGET_ULOG) += ipt_ULOG.o
63obj-$(CONFIG_IP_NF_TARGET_CLUSTERIP) += ipt_CLUSTERIP.o
64obj-$(CONFIG_IP_NF_TARGET_TTL) += ipt_TTL.o 63obj-$(CONFIG_IP_NF_TARGET_TTL) += ipt_TTL.o
64obj-$(CONFIG_IP_NF_TARGET_ULOG) += ipt_ULOG.o
65 65
66# generic ARP tables 66# generic ARP tables
67obj-$(CONFIG_IP_NF_ARPTABLES) += arp_tables.o 67obj-$(CONFIG_IP_NF_ARPTABLES) += arp_tables.o
diff --git a/net/ipv4/netfilter/ip_queue.c b/net/ipv4/netfilter/ip_queue.c
index 10a2ce09fd8e..14d64a383db1 100644
--- a/net/ipv4/netfilter/ip_queue.c
+++ b/net/ipv4/netfilter/ip_queue.c
@@ -22,6 +22,7 @@
22#include <linux/spinlock.h> 22#include <linux/spinlock.h>
23#include <linux/sysctl.h> 23#include <linux/sysctl.h>
24#include <linux/proc_fs.h> 24#include <linux/proc_fs.h>
25#include <linux/seq_file.h>
25#include <linux/security.h> 26#include <linux/security.h>
26#include <linux/mutex.h> 27#include <linux/mutex.h>
27#include <net/net_namespace.h> 28#include <net/net_namespace.h>
@@ -607,15 +608,11 @@ static ctl_table ipq_root_table[] = {
607 { .ctl_name = 0 } 608 { .ctl_name = 0 }
608}; 609};
609 610
610#ifdef CONFIG_PROC_FS 611static int ip_queue_show(struct seq_file *m, void *v)
611static int
612ipq_get_info(char *buffer, char **start, off_t offset, int length)
613{ 612{
614 int len;
615
616 read_lock_bh(&queue_lock); 613 read_lock_bh(&queue_lock);
617 614
618 len = sprintf(buffer, 615 seq_printf(m,
619 "Peer PID : %d\n" 616 "Peer PID : %d\n"
620 "Copy mode : %hu\n" 617 "Copy mode : %hu\n"
621 "Copy range : %u\n" 618 "Copy range : %u\n"
@@ -632,16 +629,21 @@ ipq_get_info(char *buffer, char **start, off_t offset, int length)
632 queue_user_dropped); 629 queue_user_dropped);
633 630
634 read_unlock_bh(&queue_lock); 631 read_unlock_bh(&queue_lock);
632 return 0;
633}
635 634
636 *start = buffer + offset; 635static int ip_queue_open(struct inode *inode, struct file *file)
637 len -= offset; 636{
638 if (len > length) 637 return single_open(file, ip_queue_show, NULL);
639 len = length;
640 else if (len < 0)
641 len = 0;
642 return len;
643} 638}
644#endif /* CONFIG_PROC_FS */ 639
640static const struct file_operations ip_queue_proc_fops = {
641 .open = ip_queue_open,
642 .read = seq_read,
643 .llseek = seq_lseek,
644 .release = single_release,
645 .owner = THIS_MODULE,
646};
645 647
646static struct nf_queue_handler nfqh = { 648static struct nf_queue_handler nfqh = {
647 .name = "ip_queue", 649 .name = "ip_queue",
@@ -661,10 +663,11 @@ static int __init ip_queue_init(void)
661 goto cleanup_netlink_notifier; 663 goto cleanup_netlink_notifier;
662 } 664 }
663 665
664 proc = proc_net_create(&init_net, IPQ_PROC_FS_NAME, 0, ipq_get_info); 666 proc = create_proc_entry(IPQ_PROC_FS_NAME, 0, init_net.proc_net);
665 if (proc) 667 if (proc) {
666 proc->owner = THIS_MODULE; 668 proc->owner = THIS_MODULE;
667 else { 669 proc->proc_fops = &ip_queue_proc_fops;
670 } else {
668 printk(KERN_ERR "ip_queue: failed to create proc entry\n"); 671 printk(KERN_ERR "ip_queue: failed to create proc entry\n");
669 goto cleanup_ipqnl; 672 goto cleanup_ipqnl;
670 } 673 }
diff --git a/net/ipv4/netfilter/nf_nat_amanda.c b/net/ipv4/netfilter/nf_nat_amanda.c
index 35a5aa69cd92..c31b87668250 100644
--- a/net/ipv4/netfilter/nf_nat_amanda.c
+++ b/net/ipv4/netfilter/nf_nat_amanda.c
@@ -69,7 +69,7 @@ static void __exit nf_nat_amanda_fini(void)
69 69
70static int __init nf_nat_amanda_init(void) 70static int __init nf_nat_amanda_init(void)
71{ 71{
72 BUG_ON(rcu_dereference(nf_nat_amanda_hook)); 72 BUG_ON(nf_nat_amanda_hook != NULL);
73 rcu_assign_pointer(nf_nat_amanda_hook, help); 73 rcu_assign_pointer(nf_nat_amanda_hook, help);
74 return 0; 74 return 0;
75} 75}
diff --git a/net/ipv4/netfilter/nf_nat_ftp.c b/net/ipv4/netfilter/nf_nat_ftp.c
index e1a16d3ea4cb..a1d5d58a58bf 100644
--- a/net/ipv4/netfilter/nf_nat_ftp.c
+++ b/net/ipv4/netfilter/nf_nat_ftp.c
@@ -147,7 +147,7 @@ static void __exit nf_nat_ftp_fini(void)
147 147
148static int __init nf_nat_ftp_init(void) 148static int __init nf_nat_ftp_init(void)
149{ 149{
150 BUG_ON(rcu_dereference(nf_nat_ftp_hook)); 150 BUG_ON(nf_nat_ftp_hook != NULL);
151 rcu_assign_pointer(nf_nat_ftp_hook, nf_nat_ftp); 151 rcu_assign_pointer(nf_nat_ftp_hook, nf_nat_ftp);
152 return 0; 152 return 0;
153} 153}
diff --git a/net/ipv4/netfilter/nf_nat_h323.c b/net/ipv4/netfilter/nf_nat_h323.c
index a868c8c41328..93e18ef114f2 100644
--- a/net/ipv4/netfilter/nf_nat_h323.c
+++ b/net/ipv4/netfilter/nf_nat_h323.c
@@ -544,15 +544,15 @@ static int nat_callforwarding(struct sk_buff *skb, struct nf_conn *ct,
544/****************************************************************************/ 544/****************************************************************************/
545static int __init init(void) 545static int __init init(void)
546{ 546{
547 BUG_ON(rcu_dereference(set_h245_addr_hook) != NULL); 547 BUG_ON(set_h245_addr_hook != NULL);
548 BUG_ON(rcu_dereference(set_h225_addr_hook) != NULL); 548 BUG_ON(set_h225_addr_hook != NULL);
549 BUG_ON(rcu_dereference(set_sig_addr_hook) != NULL); 549 BUG_ON(set_sig_addr_hook != NULL);
550 BUG_ON(rcu_dereference(set_ras_addr_hook) != NULL); 550 BUG_ON(set_ras_addr_hook != NULL);
551 BUG_ON(rcu_dereference(nat_rtp_rtcp_hook) != NULL); 551 BUG_ON(nat_rtp_rtcp_hook != NULL);
552 BUG_ON(rcu_dereference(nat_t120_hook) != NULL); 552 BUG_ON(nat_t120_hook != NULL);
553 BUG_ON(rcu_dereference(nat_h245_hook) != NULL); 553 BUG_ON(nat_h245_hook != NULL);
554 BUG_ON(rcu_dereference(nat_callforwarding_hook) != NULL); 554 BUG_ON(nat_callforwarding_hook != NULL);
555 BUG_ON(rcu_dereference(nat_q931_hook) != NULL); 555 BUG_ON(nat_q931_hook != NULL);
556 556
557 rcu_assign_pointer(set_h245_addr_hook, set_h245_addr); 557 rcu_assign_pointer(set_h245_addr_hook, set_h245_addr);
558 rcu_assign_pointer(set_h225_addr_hook, set_h225_addr); 558 rcu_assign_pointer(set_h225_addr_hook, set_h225_addr);
diff --git a/net/ipv4/netfilter/nf_nat_irc.c b/net/ipv4/netfilter/nf_nat_irc.c
index 766e2c16c6b9..fe6f9cef6c85 100644
--- a/net/ipv4/netfilter/nf_nat_irc.c
+++ b/net/ipv4/netfilter/nf_nat_irc.c
@@ -74,7 +74,7 @@ static void __exit nf_nat_irc_fini(void)
74 74
75static int __init nf_nat_irc_init(void) 75static int __init nf_nat_irc_init(void)
76{ 76{
77 BUG_ON(rcu_dereference(nf_nat_irc_hook)); 77 BUG_ON(nf_nat_irc_hook != NULL);
78 rcu_assign_pointer(nf_nat_irc_hook, help); 78 rcu_assign_pointer(nf_nat_irc_hook, help);
79 return 0; 79 return 0;
80} 80}
diff --git a/net/ipv4/netfilter/nf_nat_pptp.c b/net/ipv4/netfilter/nf_nat_pptp.c
index e1385a099079..6817e7995f35 100644
--- a/net/ipv4/netfilter/nf_nat_pptp.c
+++ b/net/ipv4/netfilter/nf_nat_pptp.c
@@ -281,16 +281,16 @@ static int __init nf_nat_helper_pptp_init(void)
281{ 281{
282 nf_nat_need_gre(); 282 nf_nat_need_gre();
283 283
284 BUG_ON(rcu_dereference(nf_nat_pptp_hook_outbound)); 284 BUG_ON(nf_nat_pptp_hook_outbound != NULL);
285 rcu_assign_pointer(nf_nat_pptp_hook_outbound, pptp_outbound_pkt); 285 rcu_assign_pointer(nf_nat_pptp_hook_outbound, pptp_outbound_pkt);
286 286
287 BUG_ON(rcu_dereference(nf_nat_pptp_hook_inbound)); 287 BUG_ON(nf_nat_pptp_hook_inbound != NULL);
288 rcu_assign_pointer(nf_nat_pptp_hook_inbound, pptp_inbound_pkt); 288 rcu_assign_pointer(nf_nat_pptp_hook_inbound, pptp_inbound_pkt);
289 289
290 BUG_ON(rcu_dereference(nf_nat_pptp_hook_exp_gre)); 290 BUG_ON(nf_nat_pptp_hook_exp_gre != NULL);
291 rcu_assign_pointer(nf_nat_pptp_hook_exp_gre, pptp_exp_gre); 291 rcu_assign_pointer(nf_nat_pptp_hook_exp_gre, pptp_exp_gre);
292 292
293 BUG_ON(rcu_dereference(nf_nat_pptp_hook_expectfn)); 293 BUG_ON(nf_nat_pptp_hook_expectfn != NULL);
294 rcu_assign_pointer(nf_nat_pptp_hook_expectfn, pptp_nat_expected); 294 rcu_assign_pointer(nf_nat_pptp_hook_expectfn, pptp_nat_expected);
295 return 0; 295 return 0;
296} 296}
diff --git a/net/ipv4/netfilter/nf_nat_sip.c b/net/ipv4/netfilter/nf_nat_sip.c
index ce9edbcc01e3..3ca98971a1e9 100644
--- a/net/ipv4/netfilter/nf_nat_sip.c
+++ b/net/ipv4/netfilter/nf_nat_sip.c
@@ -293,8 +293,8 @@ static void __exit nf_nat_sip_fini(void)
293 293
294static int __init nf_nat_sip_init(void) 294static int __init nf_nat_sip_init(void)
295{ 295{
296 BUG_ON(rcu_dereference(nf_nat_sip_hook)); 296 BUG_ON(nf_nat_sip_hook != NULL);
297 BUG_ON(rcu_dereference(nf_nat_sdp_hook)); 297 BUG_ON(nf_nat_sdp_hook != NULL);
298 rcu_assign_pointer(nf_nat_sip_hook, ip_nat_sip); 298 rcu_assign_pointer(nf_nat_sip_hook, ip_nat_sip);
299 rcu_assign_pointer(nf_nat_sdp_hook, ip_nat_sdp); 299 rcu_assign_pointer(nf_nat_sdp_hook, ip_nat_sdp);
300 return 0; 300 return 0;
diff --git a/net/ipv4/netfilter/nf_nat_tftp.c b/net/ipv4/netfilter/nf_nat_tftp.c
index 0ecec701cb44..1360a94766dd 100644
--- a/net/ipv4/netfilter/nf_nat_tftp.c
+++ b/net/ipv4/netfilter/nf_nat_tftp.c
@@ -43,7 +43,7 @@ static void __exit nf_nat_tftp_fini(void)
43 43
44static int __init nf_nat_tftp_init(void) 44static int __init nf_nat_tftp_init(void)
45{ 45{
46 BUG_ON(rcu_dereference(nf_nat_tftp_hook)); 46 BUG_ON(nf_nat_tftp_hook != NULL);
47 rcu_assign_pointer(nf_nat_tftp_hook, help); 47 rcu_assign_pointer(nf_nat_tftp_hook, help);
48 return 0; 48 return 0;
49} 49}
diff --git a/net/ipv4/proc.c b/net/ipv4/proc.c
index ffdccc0972e0..ce34b281803f 100644
--- a/net/ipv4/proc.c
+++ b/net/ipv4/proc.c
@@ -46,17 +46,6 @@
46#include <net/sock.h> 46#include <net/sock.h>
47#include <net/raw.h> 47#include <net/raw.h>
48 48
49static int fold_prot_inuse(struct proto *proto)
50{
51 int res = 0;
52 int cpu;
53
54 for_each_possible_cpu(cpu)
55 res += proto->stats[cpu].inuse;
56
57 return res;
58}
59
60/* 49/*
61 * Report socket allocation statistics [mea@utu.fi] 50 * Report socket allocation statistics [mea@utu.fi]
62 */ 51 */
@@ -64,12 +53,12 @@ static int sockstat_seq_show(struct seq_file *seq, void *v)
64{ 53{
65 socket_seq_show(seq); 54 socket_seq_show(seq);
66 seq_printf(seq, "TCP: inuse %d orphan %d tw %d alloc %d mem %d\n", 55 seq_printf(seq, "TCP: inuse %d orphan %d tw %d alloc %d mem %d\n",
67 fold_prot_inuse(&tcp_prot), atomic_read(&tcp_orphan_count), 56 sock_prot_inuse(&tcp_prot), atomic_read(&tcp_orphan_count),
68 tcp_death_row.tw_count, atomic_read(&tcp_sockets_allocated), 57 tcp_death_row.tw_count, atomic_read(&tcp_sockets_allocated),
69 atomic_read(&tcp_memory_allocated)); 58 atomic_read(&tcp_memory_allocated));
70 seq_printf(seq, "UDP: inuse %d\n", fold_prot_inuse(&udp_prot)); 59 seq_printf(seq, "UDP: inuse %d\n", sock_prot_inuse(&udp_prot));
71 seq_printf(seq, "UDPLITE: inuse %d\n", fold_prot_inuse(&udplite_prot)); 60 seq_printf(seq, "UDPLITE: inuse %d\n", sock_prot_inuse(&udplite_prot));
72 seq_printf(seq, "RAW: inuse %d\n", fold_prot_inuse(&raw_prot)); 61 seq_printf(seq, "RAW: inuse %d\n", sock_prot_inuse(&raw_prot));
73 seq_printf(seq, "FRAG: inuse %d memory %d\n", 62 seq_printf(seq, "FRAG: inuse %d memory %d\n",
74 ip_frag_nqueues(), ip_frag_mem()); 63 ip_frag_nqueues(), ip_frag_mem());
75 return 0; 64 return 0;
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index 3916faca3afe..66b42f547bf9 100644
--- a/net/ipv4/raw.c
+++ b/net/ipv4/raw.c
@@ -760,6 +760,8 @@ static int raw_ioctl(struct sock *sk, int cmd, unsigned long arg)
760 } 760 }
761} 761}
762 762
763DEFINE_PROTO_INUSE(raw)
764
763struct proto raw_prot = { 765struct proto raw_prot = {
764 .name = "RAW", 766 .name = "RAW",
765 .owner = THIS_MODULE, 767 .owner = THIS_MODULE,
@@ -781,6 +783,7 @@ struct proto raw_prot = {
781 .compat_setsockopt = compat_raw_setsockopt, 783 .compat_setsockopt = compat_raw_setsockopt,
782 .compat_getsockopt = compat_raw_getsockopt, 784 .compat_getsockopt = compat_raw_getsockopt,
783#endif 785#endif
786 REF_PROTO_INUSE(raw)
784}; 787};
785 788
786#ifdef CONFIG_PROC_FS 789#ifdef CONFIG_PROC_FS
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index c64072bb504b..8e65182f7af1 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2456,11 +2456,11 @@ void __init tcp_init(void)
2456 thash_entries ? 0 : 512 * 1024); 2456 thash_entries ? 0 : 512 * 1024);
2457 tcp_hashinfo.ehash_size = 1 << tcp_hashinfo.ehash_size; 2457 tcp_hashinfo.ehash_size = 1 << tcp_hashinfo.ehash_size;
2458 for (i = 0; i < tcp_hashinfo.ehash_size; i++) { 2458 for (i = 0; i < tcp_hashinfo.ehash_size; i++) {
2459 rwlock_init(&tcp_hashinfo.ehash[i].lock);
2460 INIT_HLIST_HEAD(&tcp_hashinfo.ehash[i].chain); 2459 INIT_HLIST_HEAD(&tcp_hashinfo.ehash[i].chain);
2461 INIT_HLIST_HEAD(&tcp_hashinfo.ehash[i].twchain); 2460 INIT_HLIST_HEAD(&tcp_hashinfo.ehash[i].twchain);
2462 } 2461 }
2463 2462 if (inet_ehash_locks_alloc(&tcp_hashinfo))
2463 panic("TCP: failed to alloc ehash_locks");
2464 tcp_hashinfo.bhash = 2464 tcp_hashinfo.bhash =
2465 alloc_large_system_hash("TCP bind", 2465 alloc_large_system_hash("TCP bind",
2466 sizeof(struct inet_bind_hashbucket), 2466 sizeof(struct inet_bind_hashbucket),
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index d438dfb0c8f3..e566f3c67677 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -2049,8 +2049,9 @@ static void *established_get_first(struct seq_file *seq)
2049 struct sock *sk; 2049 struct sock *sk;
2050 struct hlist_node *node; 2050 struct hlist_node *node;
2051 struct inet_timewait_sock *tw; 2051 struct inet_timewait_sock *tw;
2052 rwlock_t *lock = inet_ehash_lockp(&tcp_hashinfo, st->bucket);
2052 2053
2053 read_lock_bh(&tcp_hashinfo.ehash[st->bucket].lock); 2054 read_lock_bh(lock);
2054 sk_for_each(sk, node, &tcp_hashinfo.ehash[st->bucket].chain) { 2055 sk_for_each(sk, node, &tcp_hashinfo.ehash[st->bucket].chain) {
2055 if (sk->sk_family != st->family) { 2056 if (sk->sk_family != st->family) {
2056 continue; 2057 continue;
@@ -2067,7 +2068,7 @@ static void *established_get_first(struct seq_file *seq)
2067 rc = tw; 2068 rc = tw;
2068 goto out; 2069 goto out;
2069 } 2070 }
2070 read_unlock_bh(&tcp_hashinfo.ehash[st->bucket].lock); 2071 read_unlock_bh(lock);
2071 st->state = TCP_SEQ_STATE_ESTABLISHED; 2072 st->state = TCP_SEQ_STATE_ESTABLISHED;
2072 } 2073 }
2073out: 2074out:
@@ -2094,11 +2095,11 @@ get_tw:
2094 cur = tw; 2095 cur = tw;
2095 goto out; 2096 goto out;
2096 } 2097 }
2097 read_unlock_bh(&tcp_hashinfo.ehash[st->bucket].lock); 2098 read_unlock_bh(inet_ehash_lockp(&tcp_hashinfo, st->bucket));
2098 st->state = TCP_SEQ_STATE_ESTABLISHED; 2099 st->state = TCP_SEQ_STATE_ESTABLISHED;
2099 2100
2100 if (++st->bucket < tcp_hashinfo.ehash_size) { 2101 if (++st->bucket < tcp_hashinfo.ehash_size) {
2101 read_lock_bh(&tcp_hashinfo.ehash[st->bucket].lock); 2102 read_lock_bh(inet_ehash_lockp(&tcp_hashinfo, st->bucket));
2102 sk = sk_head(&tcp_hashinfo.ehash[st->bucket].chain); 2103 sk = sk_head(&tcp_hashinfo.ehash[st->bucket].chain);
2103 } else { 2104 } else {
2104 cur = NULL; 2105 cur = NULL;
@@ -2206,7 +2207,7 @@ static void tcp_seq_stop(struct seq_file *seq, void *v)
2206 case TCP_SEQ_STATE_TIME_WAIT: 2207 case TCP_SEQ_STATE_TIME_WAIT:
2207 case TCP_SEQ_STATE_ESTABLISHED: 2208 case TCP_SEQ_STATE_ESTABLISHED:
2208 if (v) 2209 if (v)
2209 read_unlock_bh(&tcp_hashinfo.ehash[st->bucket].lock); 2210 read_unlock_bh(inet_ehash_lockp(&tcp_hashinfo, st->bucket));
2210 break; 2211 break;
2211 } 2212 }
2212} 2213}
@@ -2417,6 +2418,8 @@ void tcp4_proc_exit(void)
2417} 2418}
2418#endif /* CONFIG_PROC_FS */ 2419#endif /* CONFIG_PROC_FS */
2419 2420
2421DEFINE_PROTO_INUSE(tcp)
2422
2420struct proto tcp_prot = { 2423struct proto tcp_prot = {
2421 .name = "TCP", 2424 .name = "TCP",
2422 .owner = THIS_MODULE, 2425 .owner = THIS_MODULE,
@@ -2451,6 +2454,7 @@ struct proto tcp_prot = {
2451 .compat_setsockopt = compat_tcp_setsockopt, 2454 .compat_setsockopt = compat_tcp_setsockopt,
2452 .compat_getsockopt = compat_tcp_getsockopt, 2455 .compat_getsockopt = compat_tcp_getsockopt,
2453#endif 2456#endif
2457 REF_PROTO_INUSE(tcp)
2454}; 2458};
2455 2459
2456void __init tcp_v4_init(struct net_proto_family *ops) 2460void __init tcp_v4_init(struct net_proto_family *ops)
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 4bc25b46f33f..03c400ca14c5 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1430,6 +1430,8 @@ unsigned int udp_poll(struct file *file, struct socket *sock, poll_table *wait)
1430 1430
1431} 1431}
1432 1432
1433DEFINE_PROTO_INUSE(udp)
1434
1433struct proto udp_prot = { 1435struct proto udp_prot = {
1434 .name = "UDP", 1436 .name = "UDP",
1435 .owner = THIS_MODULE, 1437 .owner = THIS_MODULE,
@@ -1452,6 +1454,7 @@ struct proto udp_prot = {
1452 .compat_setsockopt = compat_udp_setsockopt, 1454 .compat_setsockopt = compat_udp_setsockopt,
1453 .compat_getsockopt = compat_udp_getsockopt, 1455 .compat_getsockopt = compat_udp_getsockopt,
1454#endif 1456#endif
1457 REF_PROTO_INUSE(udp)
1455}; 1458};
1456 1459
1457/* ------------------------------------------------------------------------ */ 1460/* ------------------------------------------------------------------------ */
diff --git a/net/ipv4/udplite.c b/net/ipv4/udplite.c
index 94977205abb4..f5baeb3e8b85 100644
--- a/net/ipv4/udplite.c
+++ b/net/ipv4/udplite.c
@@ -44,6 +44,8 @@ static struct net_protocol udplite_protocol = {
44 .no_policy = 1, 44 .no_policy = 1,
45}; 45};
46 46
47DEFINE_PROTO_INUSE(udplite)
48
47struct proto udplite_prot = { 49struct proto udplite_prot = {
48 .name = "UDP-Lite", 50 .name = "UDP-Lite",
49 .owner = THIS_MODULE, 51 .owner = THIS_MODULE,
@@ -67,6 +69,7 @@ struct proto udplite_prot = {
67 .compat_setsockopt = compat_udp_setsockopt, 69 .compat_setsockopt = compat_udp_setsockopt,
68 .compat_getsockopt = compat_udp_getsockopt, 70 .compat_getsockopt = compat_udp_getsockopt,
69#endif 71#endif
72 REF_PROTO_INUSE(udplite)
70}; 73};
71 74
72static struct inet_protosw udplite4_protosw = { 75static struct inet_protosw udplite4_protosw = {
diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c
index d6f1026f1943..adc73adadfae 100644
--- a/net/ipv6/inet6_hashtables.c
+++ b/net/ipv6/inet6_hashtables.c
@@ -37,9 +37,8 @@ void __inet6_hash(struct inet_hashinfo *hashinfo,
37 } else { 37 } else {
38 unsigned int hash; 38 unsigned int hash;
39 sk->sk_hash = hash = inet6_sk_ehashfn(sk); 39 sk->sk_hash = hash = inet6_sk_ehashfn(sk);
40 hash &= (hashinfo->ehash_size - 1); 40 list = &inet_ehash_bucket(hashinfo, hash)->chain;
41 list = &hashinfo->ehash[hash].chain; 41 lock = inet_ehash_lockp(hashinfo, hash);
42 lock = &hashinfo->ehash[hash].lock;
43 write_lock(lock); 42 write_lock(lock);
44 } 43 }
45 44
@@ -70,9 +69,10 @@ struct sock *__inet6_lookup_established(struct inet_hashinfo *hashinfo,
70 */ 69 */
71 unsigned int hash = inet6_ehashfn(daddr, hnum, saddr, sport); 70 unsigned int hash = inet6_ehashfn(daddr, hnum, saddr, sport);
72 struct inet_ehash_bucket *head = inet_ehash_bucket(hashinfo, hash); 71 struct inet_ehash_bucket *head = inet_ehash_bucket(hashinfo, hash);
72 rwlock_t *lock = inet_ehash_lockp(hashinfo, hash);
73 73
74 prefetch(head->chain.first); 74 prefetch(head->chain.first);
75 read_lock(&head->lock); 75 read_lock(lock);
76 sk_for_each(sk, node, &head->chain) { 76 sk_for_each(sk, node, &head->chain) {
77 /* For IPV6 do the cheaper port and family tests first. */ 77 /* For IPV6 do the cheaper port and family tests first. */
78 if (INET6_MATCH(sk, hash, saddr, daddr, ports, dif)) 78 if (INET6_MATCH(sk, hash, saddr, daddr, ports, dif))
@@ -92,12 +92,12 @@ struct sock *__inet6_lookup_established(struct inet_hashinfo *hashinfo,
92 goto hit; 92 goto hit;
93 } 93 }
94 } 94 }
95 read_unlock(&head->lock); 95 read_unlock(lock);
96 return NULL; 96 return NULL;
97 97
98hit: 98hit:
99 sock_hold(sk); 99 sock_hold(sk);
100 read_unlock(&head->lock); 100 read_unlock(lock);
101 return sk; 101 return sk;
102} 102}
103EXPORT_SYMBOL(__inet6_lookup_established); 103EXPORT_SYMBOL(__inet6_lookup_established);
@@ -175,12 +175,13 @@ static int __inet6_check_established(struct inet_timewait_death_row *death_row,
175 const unsigned int hash = inet6_ehashfn(daddr, lport, saddr, 175 const unsigned int hash = inet6_ehashfn(daddr, lport, saddr,
176 inet->dport); 176 inet->dport);
177 struct inet_ehash_bucket *head = inet_ehash_bucket(hinfo, hash); 177 struct inet_ehash_bucket *head = inet_ehash_bucket(hinfo, hash);
178 rwlock_t *lock = inet_ehash_lockp(hinfo, hash);
178 struct sock *sk2; 179 struct sock *sk2;
179 const struct hlist_node *node; 180 const struct hlist_node *node;
180 struct inet_timewait_sock *tw; 181 struct inet_timewait_sock *tw;
181 182
182 prefetch(head->chain.first); 183 prefetch(head->chain.first);
183 write_lock(&head->lock); 184 write_lock(lock);
184 185
185 /* Check TIME-WAIT sockets first. */ 186 /* Check TIME-WAIT sockets first. */
186 sk_for_each(sk2, node, &head->twchain) { 187 sk_for_each(sk2, node, &head->twchain) {
@@ -216,7 +217,7 @@ unique:
216 __sk_add_node(sk, &head->chain); 217 __sk_add_node(sk, &head->chain);
217 sk->sk_hash = hash; 218 sk->sk_hash = hash;
218 sock_prot_inc_use(sk->sk_prot); 219 sock_prot_inc_use(sk->sk_prot);
219 write_unlock(&head->lock); 220 write_unlock(lock);
220 221
221 if (twp != NULL) { 222 if (twp != NULL) {
222 *twp = tw; 223 *twp = tw;
@@ -231,7 +232,7 @@ unique:
231 return 0; 232 return 0;
232 233
233not_unique: 234not_unique:
234 write_unlock(&head->lock); 235 write_unlock(lock);
235 return -EADDRNOTAVAIL; 236 return -EADDRNOTAVAIL;
236} 237}
237 238
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 653fc0a8235b..86e1835ce4e4 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1339,6 +1339,19 @@ error:
1339 return err; 1339 return err;
1340} 1340}
1341 1341
1342static void ip6_cork_release(struct inet_sock *inet, struct ipv6_pinfo *np)
1343{
1344 inet->cork.flags &= ~IPCORK_OPT;
1345 kfree(np->cork.opt);
1346 np->cork.opt = NULL;
1347 if (np->cork.rt) {
1348 dst_release(&np->cork.rt->u.dst);
1349 np->cork.rt = NULL;
1350 inet->cork.flags &= ~IPCORK_ALLFRAG;
1351 }
1352 memset(&inet->cork.fl, 0, sizeof(inet->cork.fl));
1353}
1354
1342int ip6_push_pending_frames(struct sock *sk) 1355int ip6_push_pending_frames(struct sock *sk)
1343{ 1356{
1344 struct sk_buff *skb, *tmp_skb; 1357 struct sk_buff *skb, *tmp_skb;
@@ -1415,15 +1428,7 @@ int ip6_push_pending_frames(struct sock *sk)
1415 } 1428 }
1416 1429
1417out: 1430out:
1418 inet->cork.flags &= ~IPCORK_OPT; 1431 ip6_cork_release(inet, np);
1419 kfree(np->cork.opt);
1420 np->cork.opt = NULL;
1421 if (np->cork.rt) {
1422 dst_release(&np->cork.rt->u.dst);
1423 np->cork.rt = NULL;
1424 inet->cork.flags &= ~IPCORK_ALLFRAG;
1425 }
1426 memset(&inet->cork.fl, 0, sizeof(inet->cork.fl));
1427 return err; 1432 return err;
1428error: 1433error:
1429 goto out; 1434 goto out;
@@ -1431,8 +1436,6 @@ error:
1431 1436
1432void ip6_flush_pending_frames(struct sock *sk) 1437void ip6_flush_pending_frames(struct sock *sk)
1433{ 1438{
1434 struct inet_sock *inet = inet_sk(sk);
1435 struct ipv6_pinfo *np = inet6_sk(sk);
1436 struct sk_buff *skb; 1439 struct sk_buff *skb;
1437 1440
1438 while ((skb = __skb_dequeue_tail(&sk->sk_write_queue)) != NULL) { 1441 while ((skb = __skb_dequeue_tail(&sk->sk_write_queue)) != NULL) {
@@ -1442,14 +1445,5 @@ void ip6_flush_pending_frames(struct sock *sk)
1442 kfree_skb(skb); 1445 kfree_skb(skb);
1443 } 1446 }
1444 1447
1445 inet->cork.flags &= ~IPCORK_OPT; 1448 ip6_cork_release(inet_sk(sk), inet6_sk(sk));
1446
1447 kfree(np->cork.opt);
1448 np->cork.opt = NULL;
1449 if (np->cork.rt) {
1450 dst_release(&np->cork.rt->u.dst);
1451 np->cork.rt = NULL;
1452 inet->cork.flags &= ~IPCORK_ALLFRAG;
1453 }
1454 memset(&inet->cork.fl, 0, sizeof(inet->cork.fl));
1455} 1449}
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c
index 85eb4798d8d2..0cd4056f9127 100644
--- a/net/ipv6/ipcomp6.c
+++ b/net/ipv6/ipcomp6.c
@@ -36,6 +36,7 @@
36#include <net/ipcomp.h> 36#include <net/ipcomp.h>
37#include <asm/semaphore.h> 37#include <asm/semaphore.h>
38#include <linux/crypto.h> 38#include <linux/crypto.h>
39#include <linux/err.h>
39#include <linux/pfkeyv2.h> 40#include <linux/pfkeyv2.h>
40#include <linux/random.h> 41#include <linux/random.h>
41#include <linux/percpu.h> 42#include <linux/percpu.h>
@@ -358,7 +359,7 @@ static struct crypto_comp **ipcomp6_alloc_tfms(const char *alg_name)
358 for_each_possible_cpu(cpu) { 359 for_each_possible_cpu(cpu) {
359 struct crypto_comp *tfm = crypto_alloc_comp(alg_name, 0, 360 struct crypto_comp *tfm = crypto_alloc_comp(alg_name, 0,
360 CRYPTO_ALG_ASYNC); 361 CRYPTO_ALG_ASYNC);
361 if (!tfm) 362 if (IS_ERR(tfm))
362 goto error; 363 goto error;
363 *per_cpu_ptr(tfms, cpu) = tfm; 364 *per_cpu_ptr(tfms, cpu) = tfm;
364 } 365 }
diff --git a/net/ipv6/netfilter/Makefile b/net/ipv6/netfilter/Makefile
index 4513eab77397..e789ec44d23b 100644
--- a/net/ipv6/netfilter/Makefile
+++ b/net/ipv6/netfilter/Makefile
@@ -4,25 +4,29 @@
4 4
5# Link order matters here. 5# Link order matters here.
6obj-$(CONFIG_IP6_NF_IPTABLES) += ip6_tables.o 6obj-$(CONFIG_IP6_NF_IPTABLES) += ip6_tables.o
7obj-$(CONFIG_IP6_NF_MATCH_RT) += ip6t_rt.o
8obj-$(CONFIG_IP6_NF_MATCH_OPTS) += ip6t_hbh.o
9obj-$(CONFIG_IP6_NF_MATCH_IPV6HEADER) += ip6t_ipv6header.o
10obj-$(CONFIG_IP6_NF_MATCH_FRAG) += ip6t_frag.o
11obj-$(CONFIG_IP6_NF_MATCH_AH) += ip6t_ah.o
12obj-$(CONFIG_IP6_NF_MATCH_EUI64) += ip6t_eui64.o
13obj-$(CONFIG_IP6_NF_MATCH_OWNER) += ip6t_owner.o
14obj-$(CONFIG_IP6_NF_FILTER) += ip6table_filter.o 7obj-$(CONFIG_IP6_NF_FILTER) += ip6table_filter.o
15obj-$(CONFIG_IP6_NF_MANGLE) += ip6table_mangle.o 8obj-$(CONFIG_IP6_NF_MANGLE) += ip6table_mangle.o
16obj-$(CONFIG_IP6_NF_TARGET_HL) += ip6t_HL.o
17obj-$(CONFIG_IP6_NF_QUEUE) += ip6_queue.o 9obj-$(CONFIG_IP6_NF_QUEUE) += ip6_queue.o
18obj-$(CONFIG_IP6_NF_TARGET_LOG) += ip6t_LOG.o
19obj-$(CONFIG_IP6_NF_RAW) += ip6table_raw.o 10obj-$(CONFIG_IP6_NF_RAW) += ip6table_raw.o
20obj-$(CONFIG_IP6_NF_MATCH_HL) += ip6t_hl.o
21obj-$(CONFIG_IP6_NF_TARGET_REJECT) += ip6t_REJECT.o
22obj-$(CONFIG_IP6_NF_MATCH_MH) += ip6t_mh.o
23 11
24# objects for l3 independent conntrack 12# objects for l3 independent conntrack
25nf_conntrack_ipv6-objs := nf_conntrack_l3proto_ipv6.o nf_conntrack_proto_icmpv6.o nf_conntrack_reasm.o 13nf_conntrack_ipv6-objs := nf_conntrack_l3proto_ipv6.o nf_conntrack_proto_icmpv6.o nf_conntrack_reasm.o
26 14
27# l3 independent conntrack 15# l3 independent conntrack
28obj-$(CONFIG_NF_CONNTRACK_IPV6) += nf_conntrack_ipv6.o 16obj-$(CONFIG_NF_CONNTRACK_IPV6) += nf_conntrack_ipv6.o
17
18# matches
19obj-$(CONFIG_IP6_NF_MATCH_AH) += ip6t_ah.o
20obj-$(CONFIG_IP6_NF_MATCH_EUI64) += ip6t_eui64.o
21obj-$(CONFIG_IP6_NF_MATCH_FRAG) += ip6t_frag.o
22obj-$(CONFIG_IP6_NF_MATCH_HL) += ip6t_hl.o
23obj-$(CONFIG_IP6_NF_MATCH_IPV6HEADER) += ip6t_ipv6header.o
24obj-$(CONFIG_IP6_NF_MATCH_MH) += ip6t_mh.o
25obj-$(CONFIG_IP6_NF_MATCH_OPTS) += ip6t_hbh.o
26obj-$(CONFIG_IP6_NF_MATCH_OWNER) += ip6t_owner.o
27obj-$(CONFIG_IP6_NF_MATCH_RT) += ip6t_rt.o
28
29# targets
30obj-$(CONFIG_IP6_NF_TARGET_HL) += ip6t_HL.o
31obj-$(CONFIG_IP6_NF_TARGET_LOG) += ip6t_LOG.o
32obj-$(CONFIG_IP6_NF_TARGET_REJECT) += ip6t_REJECT.o
diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c
index 6413a30d9f68..e273605eef85 100644
--- a/net/ipv6/netfilter/ip6_queue.c
+++ b/net/ipv6/netfilter/ip6_queue.c
@@ -23,6 +23,7 @@
23#include <linux/spinlock.h> 23#include <linux/spinlock.h>
24#include <linux/sysctl.h> 24#include <linux/sysctl.h>
25#include <linux/proc_fs.h> 25#include <linux/proc_fs.h>
26#include <linux/seq_file.h>
26#include <linux/mutex.h> 27#include <linux/mutex.h>
27#include <net/net_namespace.h> 28#include <net/net_namespace.h>
28#include <net/sock.h> 29#include <net/sock.h>
@@ -596,15 +597,11 @@ static ctl_table ipq_root_table[] = {
596 { .ctl_name = 0 } 597 { .ctl_name = 0 }
597}; 598};
598 599
599#ifdef CONFIG_PROC_FS 600static int ip6_queue_show(struct seq_file *m, void *v)
600static int
601ipq_get_info(char *buffer, char **start, off_t offset, int length)
602{ 601{
603 int len;
604
605 read_lock_bh(&queue_lock); 602 read_lock_bh(&queue_lock);
606 603
607 len = sprintf(buffer, 604 seq_printf(m,
608 "Peer PID : %d\n" 605 "Peer PID : %d\n"
609 "Copy mode : %hu\n" 606 "Copy mode : %hu\n"
610 "Copy range : %u\n" 607 "Copy range : %u\n"
@@ -621,16 +618,21 @@ ipq_get_info(char *buffer, char **start, off_t offset, int length)
621 queue_user_dropped); 618 queue_user_dropped);
622 619
623 read_unlock_bh(&queue_lock); 620 read_unlock_bh(&queue_lock);
621 return 0;
622}
624 623
625 *start = buffer + offset; 624static int ip6_queue_open(struct inode *inode, struct file *file)
626 len -= offset; 625{
627 if (len > length) 626 return single_open(file, ip6_queue_show, NULL);
628 len = length;
629 else if (len < 0)
630 len = 0;
631 return len;
632} 627}
633#endif /* CONFIG_PROC_FS */ 628
629static const struct file_operations ip6_queue_proc_fops = {
630 .open = ip6_queue_open,
631 .read = seq_read,
632 .llseek = seq_lseek,
633 .release = single_release,
634 .owner = THIS_MODULE,
635};
634 636
635static struct nf_queue_handler nfqh = { 637static struct nf_queue_handler nfqh = {
636 .name = "ip6_queue", 638 .name = "ip6_queue",
@@ -650,10 +652,11 @@ static int __init ip6_queue_init(void)
650 goto cleanup_netlink_notifier; 652 goto cleanup_netlink_notifier;
651 } 653 }
652 654
653 proc = proc_net_create(&init_net, IPQ_PROC_FS_NAME, 0, ipq_get_info); 655 proc = create_proc_entry(IPQ_PROC_FS_NAME, 0, init_net.proc_net);
654 if (proc) 656 if (proc) {
655 proc->owner = THIS_MODULE; 657 proc->owner = THIS_MODULE;
656 else { 658 proc->proc_fops = &ip6_queue_proc_fops;
659 } else {
657 printk(KERN_ERR "ip6_queue: failed to create proc entry\n"); 660 printk(KERN_ERR "ip6_queue: failed to create proc entry\n");
658 goto cleanup_ipqnl; 661 goto cleanup_ipqnl;
659 } 662 }
diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c
index be526ad92543..8631ed7fe8a9 100644
--- a/net/ipv6/proc.c
+++ b/net/ipv6/proc.c
@@ -32,27 +32,16 @@
32 32
33static struct proc_dir_entry *proc_net_devsnmp6; 33static struct proc_dir_entry *proc_net_devsnmp6;
34 34
35static int fold_prot_inuse(struct proto *proto)
36{
37 int res = 0;
38 int cpu;
39
40 for_each_possible_cpu(cpu)
41 res += proto->stats[cpu].inuse;
42
43 return res;
44}
45
46static int sockstat6_seq_show(struct seq_file *seq, void *v) 35static int sockstat6_seq_show(struct seq_file *seq, void *v)
47{ 36{
48 seq_printf(seq, "TCP6: inuse %d\n", 37 seq_printf(seq, "TCP6: inuse %d\n",
49 fold_prot_inuse(&tcpv6_prot)); 38 sock_prot_inuse(&tcpv6_prot));
50 seq_printf(seq, "UDP6: inuse %d\n", 39 seq_printf(seq, "UDP6: inuse %d\n",
51 fold_prot_inuse(&udpv6_prot)); 40 sock_prot_inuse(&udpv6_prot));
52 seq_printf(seq, "UDPLITE6: inuse %d\n", 41 seq_printf(seq, "UDPLITE6: inuse %d\n",
53 fold_prot_inuse(&udplitev6_prot)); 42 sock_prot_inuse(&udplitev6_prot));
54 seq_printf(seq, "RAW6: inuse %d\n", 43 seq_printf(seq, "RAW6: inuse %d\n",
55 fold_prot_inuse(&rawv6_prot)); 44 sock_prot_inuse(&rawv6_prot));
56 seq_printf(seq, "FRAG6: inuse %d memory %d\n", 45 seq_printf(seq, "FRAG6: inuse %d memory %d\n",
57 ip6_frag_nqueues(), ip6_frag_mem()); 46 ip6_frag_nqueues(), ip6_frag_mem());
58 return 0; 47 return 0;
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index ca24ef19cd8f..807260d03586 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -1144,6 +1144,8 @@ static int rawv6_init_sk(struct sock *sk)
1144 return(0); 1144 return(0);
1145} 1145}
1146 1146
1147DEFINE_PROTO_INUSE(rawv6)
1148
1147struct proto rawv6_prot = { 1149struct proto rawv6_prot = {
1148 .name = "RAWv6", 1150 .name = "RAWv6",
1149 .owner = THIS_MODULE, 1151 .owner = THIS_MODULE,
@@ -1166,6 +1168,7 @@ struct proto rawv6_prot = {
1166 .compat_setsockopt = compat_rawv6_setsockopt, 1168 .compat_setsockopt = compat_rawv6_setsockopt,
1167 .compat_getsockopt = compat_rawv6_getsockopt, 1169 .compat_getsockopt = compat_rawv6_getsockopt,
1168#endif 1170#endif
1171 REF_PROTO_INUSE(rawv6)
1169}; 1172};
1170 1173
1171#ifdef CONFIG_PROC_FS 1174#ifdef CONFIG_PROC_FS
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 95f8e4a62f68..973a97abc446 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -38,12 +38,8 @@
38#include <linux/in6.h> 38#include <linux/in6.h>
39#include <linux/init.h> 39#include <linux/init.h>
40#include <linux/if_arp.h> 40#include <linux/if_arp.h>
41
42#ifdef CONFIG_PROC_FS
43#include <linux/proc_fs.h> 41#include <linux/proc_fs.h>
44#include <linux/seq_file.h> 42#include <linux/seq_file.h>
45#endif
46
47#include <net/net_namespace.h> 43#include <net/net_namespace.h>
48#include <net/snmp.h> 44#include <net/snmp.h>
49#include <net/ipv6.h> 45#include <net/ipv6.h>
@@ -2288,71 +2284,50 @@ struct rt6_proc_arg
2288 2284
2289static int rt6_info_route(struct rt6_info *rt, void *p_arg) 2285static int rt6_info_route(struct rt6_info *rt, void *p_arg)
2290{ 2286{
2291 struct rt6_proc_arg *arg = (struct rt6_proc_arg *) p_arg; 2287 struct seq_file *m = p_arg;
2292 2288
2293 if (arg->skip < arg->offset / RT6_INFO_LEN) { 2289 seq_printf(m, NIP6_SEQFMT " %02x ", NIP6(rt->rt6i_dst.addr),
2294 arg->skip++; 2290 rt->rt6i_dst.plen);
2295 return 0;
2296 }
2297
2298 if (arg->len >= arg->length)
2299 return 0;
2300
2301 arg->len += sprintf(arg->buffer + arg->len,
2302 NIP6_SEQFMT " %02x ",
2303 NIP6(rt->rt6i_dst.addr),
2304 rt->rt6i_dst.plen);
2305 2291
2306#ifdef CONFIG_IPV6_SUBTREES 2292#ifdef CONFIG_IPV6_SUBTREES
2307 arg->len += sprintf(arg->buffer + arg->len, 2293 seq_printf(m, NIP6_SEQFMT " %02x ", NIP6(rt->rt6i_src.addr),
2308 NIP6_SEQFMT " %02x ", 2294 rt->rt6i_src.plen);
2309 NIP6(rt->rt6i_src.addr),
2310 rt->rt6i_src.plen);
2311#else 2295#else
2312 arg->len += sprintf(arg->buffer + arg->len, 2296 seq_puts(m, "00000000000000000000000000000000 00 ");
2313 "00000000000000000000000000000000 00 ");
2314#endif 2297#endif
2315 2298
2316 if (rt->rt6i_nexthop) { 2299 if (rt->rt6i_nexthop) {
2317 arg->len += sprintf(arg->buffer + arg->len, 2300 seq_printf(m, NIP6_SEQFMT,
2318 NIP6_SEQFMT, 2301 NIP6(*((struct in6_addr *)rt->rt6i_nexthop->primary_key)));
2319 NIP6(*((struct in6_addr *)rt->rt6i_nexthop->primary_key)));
2320 } else { 2302 } else {
2321 arg->len += sprintf(arg->buffer + arg->len, 2303 seq_puts(m, "00000000000000000000000000000000");
2322 "00000000000000000000000000000000");
2323 } 2304 }
2324 arg->len += sprintf(arg->buffer + arg->len, 2305 seq_printf(m, " %08x %08x %08x %08x %8s\n",
2325 " %08x %08x %08x %08x %8s\n", 2306 rt->rt6i_metric, atomic_read(&rt->u.dst.__refcnt),
2326 rt->rt6i_metric, atomic_read(&rt->u.dst.__refcnt), 2307 rt->u.dst.__use, rt->rt6i_flags,
2327 rt->u.dst.__use, rt->rt6i_flags, 2308 rt->rt6i_dev ? rt->rt6i_dev->name : "");
2328 rt->rt6i_dev ? rt->rt6i_dev->name : "");
2329 return 0; 2309 return 0;
2330} 2310}
2331 2311
2332static int rt6_proc_info(char *buffer, char **start, off_t offset, int length) 2312static int ipv6_route_show(struct seq_file *m, void *v)
2333{ 2313{
2334 struct rt6_proc_arg arg = { 2314 fib6_clean_all(rt6_info_route, 0, m);
2335 .buffer = buffer, 2315 return 0;
2336 .offset = offset, 2316}
2337 .length = length,
2338 };
2339
2340 fib6_clean_all(rt6_info_route, 0, &arg);
2341
2342 *start = buffer;
2343 if (offset)
2344 *start += offset % RT6_INFO_LEN;
2345
2346 arg.len -= offset % RT6_INFO_LEN;
2347
2348 if (arg.len > length)
2349 arg.len = length;
2350 if (arg.len < 0)
2351 arg.len = 0;
2352 2317
2353 return arg.len; 2318static int ipv6_route_open(struct inode *inode, struct file *file)
2319{
2320 return single_open(file, ipv6_route_show, NULL);
2354} 2321}
2355 2322
2323static const struct file_operations ipv6_route_proc_fops = {
2324 .owner = THIS_MODULE,
2325 .open = ipv6_route_open,
2326 .read = seq_read,
2327 .llseek = seq_lseek,
2328 .release = single_release,
2329};
2330
2356static int rt6_stats_seq_show(struct seq_file *seq, void *v) 2331static int rt6_stats_seq_show(struct seq_file *seq, void *v)
2357{ 2332{
2358 seq_printf(seq, "%04x %04x %04x %04x %04x %04x %04x\n", 2333 seq_printf(seq, "%04x %04x %04x %04x %04x %04x %04x\n",
@@ -2489,22 +2464,14 @@ ctl_table ipv6_route_table[] = {
2489 2464
2490void __init ip6_route_init(void) 2465void __init ip6_route_init(void)
2491{ 2466{
2492#ifdef CONFIG_PROC_FS
2493 struct proc_dir_entry *p;
2494#endif
2495 ip6_dst_ops.kmem_cachep = 2467 ip6_dst_ops.kmem_cachep =
2496 kmem_cache_create("ip6_dst_cache", sizeof(struct rt6_info), 0, 2468 kmem_cache_create("ip6_dst_cache", sizeof(struct rt6_info), 0,
2497 SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); 2469 SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL);
2498 ip6_dst_blackhole_ops.kmem_cachep = ip6_dst_ops.kmem_cachep; 2470 ip6_dst_blackhole_ops.kmem_cachep = ip6_dst_ops.kmem_cachep;
2499 2471
2500 fib6_init(); 2472 fib6_init();
2501#ifdef CONFIG_PROC_FS 2473 proc_net_fops_create(&init_net, "ipv6_route", 0, &ipv6_route_proc_fops);
2502 p = proc_net_create(&init_net, "ipv6_route", 0, rt6_proc_info);
2503 if (p)
2504 p->owner = THIS_MODULE;
2505
2506 proc_net_fops_create(&init_net, "rt6_stats", S_IRUGO, &rt6_stats_seq_fops); 2474 proc_net_fops_create(&init_net, "rt6_stats", S_IRUGO, &rt6_stats_seq_fops);
2507#endif
2508#ifdef CONFIG_XFRM 2475#ifdef CONFIG_XFRM
2509 xfrm6_init(); 2476 xfrm6_init();
2510#endif 2477#endif
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 06be2a1f2730..3aad861975a0 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -2107,6 +2107,8 @@ void tcp6_proc_exit(void)
2107} 2107}
2108#endif 2108#endif
2109 2109
2110DEFINE_PROTO_INUSE(tcpv6)
2111
2110struct proto tcpv6_prot = { 2112struct proto tcpv6_prot = {
2111 .name = "TCPv6", 2113 .name = "TCPv6",
2112 .owner = THIS_MODULE, 2114 .owner = THIS_MODULE,
@@ -2141,6 +2143,7 @@ struct proto tcpv6_prot = {
2141 .compat_setsockopt = compat_tcp_setsockopt, 2143 .compat_setsockopt = compat_tcp_setsockopt,
2142 .compat_getsockopt = compat_tcp_getsockopt, 2144 .compat_getsockopt = compat_tcp_getsockopt,
2143#endif 2145#endif
2146 REF_PROTO_INUSE(tcpv6)
2144}; 2147};
2145 2148
2146static struct inet6_protocol tcpv6_protocol = { 2149static struct inet6_protocol tcpv6_protocol = {
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index caebad6ee510..ee1cc3f8599f 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -205,12 +205,11 @@ out:
205 return err; 205 return err;
206 206
207csum_copy_err: 207csum_copy_err:
208 UDP6_INC_STATS_USER(UDP_MIB_INERRORS, is_udplite);
208 skb_kill_datagram(sk, skb, flags); 209 skb_kill_datagram(sk, skb, flags);
209 210
210 if (flags & MSG_DONTWAIT) { 211 if (flags & MSG_DONTWAIT)
211 UDP6_INC_STATS_USER(UDP_MIB_INERRORS, is_udplite);
212 return -EAGAIN; 212 return -EAGAIN;
213 }
214 goto try_again; 213 goto try_again;
215} 214}
216 215
@@ -971,6 +970,8 @@ void udp6_proc_exit(void) {
971 970
972/* ------------------------------------------------------------------------ */ 971/* ------------------------------------------------------------------------ */
973 972
973DEFINE_PROTO_INUSE(udpv6)
974
974struct proto udpv6_prot = { 975struct proto udpv6_prot = {
975 .name = "UDPv6", 976 .name = "UDPv6",
976 .owner = THIS_MODULE, 977 .owner = THIS_MODULE,
@@ -992,6 +993,7 @@ struct proto udpv6_prot = {
992 .compat_setsockopt = compat_udpv6_setsockopt, 993 .compat_setsockopt = compat_udpv6_setsockopt,
993 .compat_getsockopt = compat_udpv6_getsockopt, 994 .compat_getsockopt = compat_udpv6_getsockopt,
994#endif 995#endif
996 REF_PROTO_INUSE(udpv6)
995}; 997};
996 998
997static struct inet_protosw udpv6_protosw = { 999static struct inet_protosw udpv6_protosw = {
diff --git a/net/ipv6/udplite.c b/net/ipv6/udplite.c
index 766566f7de47..5a0379f71415 100644
--- a/net/ipv6/udplite.c
+++ b/net/ipv6/udplite.c
@@ -40,6 +40,8 @@ static int udplite_v6_get_port(struct sock *sk, unsigned short snum)
40 return udplite_get_port(sk, snum, ipv6_rcv_saddr_equal); 40 return udplite_get_port(sk, snum, ipv6_rcv_saddr_equal);
41} 41}
42 42
43DEFINE_PROTO_INUSE(udplitev6)
44
43struct proto udplitev6_prot = { 45struct proto udplitev6_prot = {
44 .name = "UDPLITEv6", 46 .name = "UDPLITEv6",
45 .owner = THIS_MODULE, 47 .owner = THIS_MODULE,
@@ -62,6 +64,7 @@ struct proto udplitev6_prot = {
62 .compat_setsockopt = compat_udpv6_setsockopt, 64 .compat_setsockopt = compat_udpv6_setsockopt,
63 .compat_getsockopt = compat_udpv6_getsockopt, 65 .compat_getsockopt = compat_udpv6_getsockopt,
64#endif 66#endif
67 REF_PROTO_INUSE(udplitev6)
65}; 68};
66 69
67static struct inet_protosw udplite6_protosw = { 70static struct inet_protosw udplite6_protosw = {
diff --git a/net/netfilter/Makefile b/net/netfilter/Makefile
index 93c58f973831..ad0e36ebea3d 100644
--- a/net/netfilter/Makefile
+++ b/net/netfilter/Makefile
@@ -40,15 +40,15 @@ obj-$(CONFIG_NETFILTER_XTABLES) += x_tables.o xt_tcpudp.o
40# targets 40# targets
41obj-$(CONFIG_NETFILTER_XT_TARGET_CLASSIFY) += xt_CLASSIFY.o 41obj-$(CONFIG_NETFILTER_XT_TARGET_CLASSIFY) += xt_CLASSIFY.o
42obj-$(CONFIG_NETFILTER_XT_TARGET_CONNMARK) += xt_CONNMARK.o 42obj-$(CONFIG_NETFILTER_XT_TARGET_CONNMARK) += xt_CONNMARK.o
43obj-$(CONFIG_NETFILTER_XT_TARGET_CONNSECMARK) += xt_CONNSECMARK.o
43obj-$(CONFIG_NETFILTER_XT_TARGET_DSCP) += xt_DSCP.o 44obj-$(CONFIG_NETFILTER_XT_TARGET_DSCP) += xt_DSCP.o
44obj-$(CONFIG_NETFILTER_XT_TARGET_MARK) += xt_MARK.o 45obj-$(CONFIG_NETFILTER_XT_TARGET_MARK) += xt_MARK.o
45obj-$(CONFIG_NETFILTER_XT_TARGET_NFQUEUE) += xt_NFQUEUE.o
46obj-$(CONFIG_NETFILTER_XT_TARGET_NFLOG) += xt_NFLOG.o 46obj-$(CONFIG_NETFILTER_XT_TARGET_NFLOG) += xt_NFLOG.o
47obj-$(CONFIG_NETFILTER_XT_TARGET_NFQUEUE) += xt_NFQUEUE.o
47obj-$(CONFIG_NETFILTER_XT_TARGET_NOTRACK) += xt_NOTRACK.o 48obj-$(CONFIG_NETFILTER_XT_TARGET_NOTRACK) += xt_NOTRACK.o
48obj-$(CONFIG_NETFILTER_XT_TARGET_TRACE) += xt_TRACE.o
49obj-$(CONFIG_NETFILTER_XT_TARGET_SECMARK) += xt_SECMARK.o 49obj-$(CONFIG_NETFILTER_XT_TARGET_SECMARK) += xt_SECMARK.o
50obj-$(CONFIG_NETFILTER_XT_TARGET_TCPMSS) += xt_TCPMSS.o 50obj-$(CONFIG_NETFILTER_XT_TARGET_TCPMSS) += xt_TCPMSS.o
51obj-$(CONFIG_NETFILTER_XT_TARGET_CONNSECMARK) += xt_CONNSECMARK.o 51obj-$(CONFIG_NETFILTER_XT_TARGET_TRACE) += xt_TRACE.o
52 52
53# matches 53# matches
54obj-$(CONFIG_NETFILTER_XT_MATCH_COMMENT) += xt_comment.o 54obj-$(CONFIG_NETFILTER_XT_MATCH_COMMENT) += xt_comment.o
@@ -59,22 +59,22 @@ obj-$(CONFIG_NETFILTER_XT_MATCH_CONNTRACK) += xt_conntrack.o
59obj-$(CONFIG_NETFILTER_XT_MATCH_DCCP) += xt_dccp.o 59obj-$(CONFIG_NETFILTER_XT_MATCH_DCCP) += xt_dccp.o
60obj-$(CONFIG_NETFILTER_XT_MATCH_DSCP) += xt_dscp.o 60obj-$(CONFIG_NETFILTER_XT_MATCH_DSCP) += xt_dscp.o
61obj-$(CONFIG_NETFILTER_XT_MATCH_ESP) += xt_esp.o 61obj-$(CONFIG_NETFILTER_XT_MATCH_ESP) += xt_esp.o
62obj-$(CONFIG_NETFILTER_XT_MATCH_HASHLIMIT) += xt_hashlimit.o
62obj-$(CONFIG_NETFILTER_XT_MATCH_HELPER) += xt_helper.o 63obj-$(CONFIG_NETFILTER_XT_MATCH_HELPER) += xt_helper.o
63obj-$(CONFIG_NETFILTER_XT_MATCH_LENGTH) += xt_length.o 64obj-$(CONFIG_NETFILTER_XT_MATCH_LENGTH) += xt_length.o
64obj-$(CONFIG_NETFILTER_XT_MATCH_LIMIT) += xt_limit.o 65obj-$(CONFIG_NETFILTER_XT_MATCH_LIMIT) += xt_limit.o
65obj-$(CONFIG_NETFILTER_XT_MATCH_MAC) += xt_mac.o 66obj-$(CONFIG_NETFILTER_XT_MATCH_MAC) += xt_mac.o
66obj-$(CONFIG_NETFILTER_XT_MATCH_MARK) += xt_mark.o 67obj-$(CONFIG_NETFILTER_XT_MATCH_MARK) += xt_mark.o
67obj-$(CONFIG_NETFILTER_XT_MATCH_MULTIPORT) += xt_multiport.o 68obj-$(CONFIG_NETFILTER_XT_MATCH_MULTIPORT) += xt_multiport.o
68obj-$(CONFIG_NETFILTER_XT_MATCH_POLICY) += xt_policy.o 69obj-$(CONFIG_NETFILTER_XT_MATCH_PHYSDEV) += xt_physdev.o
69obj-$(CONFIG_NETFILTER_XT_MATCH_PKTTYPE) += xt_pkttype.o 70obj-$(CONFIG_NETFILTER_XT_MATCH_PKTTYPE) += xt_pkttype.o
71obj-$(CONFIG_NETFILTER_XT_MATCH_POLICY) += xt_policy.o
70obj-$(CONFIG_NETFILTER_XT_MATCH_QUOTA) += xt_quota.o 72obj-$(CONFIG_NETFILTER_XT_MATCH_QUOTA) += xt_quota.o
71obj-$(CONFIG_NETFILTER_XT_MATCH_REALM) += xt_realm.o 73obj-$(CONFIG_NETFILTER_XT_MATCH_REALM) += xt_realm.o
72obj-$(CONFIG_NETFILTER_XT_MATCH_SCTP) += xt_sctp.o 74obj-$(CONFIG_NETFILTER_XT_MATCH_SCTP) += xt_sctp.o
73obj-$(CONFIG_NETFILTER_XT_MATCH_STATE) += xt_state.o 75obj-$(CONFIG_NETFILTER_XT_MATCH_STATE) += xt_state.o
74obj-$(CONFIG_NETFILTER_XT_MATCH_STATISTIC) += xt_statistic.o 76obj-$(CONFIG_NETFILTER_XT_MATCH_STATISTIC) += xt_statistic.o
75obj-$(CONFIG_NETFILTER_XT_MATCH_STRING) += xt_string.o 77obj-$(CONFIG_NETFILTER_XT_MATCH_STRING) += xt_string.o
76obj-$(CONFIG_NETFILTER_XT_MATCH_TIME) += xt_time.o
77obj-$(CONFIG_NETFILTER_XT_MATCH_TCPMSS) += xt_tcpmss.o 78obj-$(CONFIG_NETFILTER_XT_MATCH_TCPMSS) += xt_tcpmss.o
78obj-$(CONFIG_NETFILTER_XT_MATCH_PHYSDEV) += xt_physdev.o 79obj-$(CONFIG_NETFILTER_XT_MATCH_TIME) += xt_time.o
79obj-$(CONFIG_NETFILTER_XT_MATCH_U32) += xt_u32.o 80obj-$(CONFIG_NETFILTER_XT_MATCH_U32) += xt_u32.o
80obj-$(CONFIG_NETFILTER_XT_MATCH_HASHLIMIT) += xt_hashlimit.o
diff --git a/net/netfilter/nf_sockopt.c b/net/netfilter/nf_sockopt.c
index aa2831587b82..2dfac3253569 100644
--- a/net/netfilter/nf_sockopt.c
+++ b/net/netfilter/nf_sockopt.c
@@ -23,14 +23,13 @@ static inline int overlap(int min1, int max1, int min2, int max2)
23/* Functions to register sockopt ranges (exclusive). */ 23/* Functions to register sockopt ranges (exclusive). */
24int nf_register_sockopt(struct nf_sockopt_ops *reg) 24int nf_register_sockopt(struct nf_sockopt_ops *reg)
25{ 25{
26 struct list_head *i; 26 struct nf_sockopt_ops *ops;
27 int ret = 0; 27 int ret = 0;
28 28
29 if (mutex_lock_interruptible(&nf_sockopt_mutex) != 0) 29 if (mutex_lock_interruptible(&nf_sockopt_mutex) != 0)
30 return -EINTR; 30 return -EINTR;
31 31
32 list_for_each(i, &nf_sockopts) { 32 list_for_each_entry(ops, &nf_sockopts, list) {
33 struct nf_sockopt_ops *ops = (struct nf_sockopt_ops *)i;
34 if (ops->pf == reg->pf 33 if (ops->pf == reg->pf
35 && (overlap(ops->set_optmin, ops->set_optmax, 34 && (overlap(ops->set_optmin, ops->set_optmax,
36 reg->set_optmin, reg->set_optmax) 35 reg->set_optmin, reg->set_optmax)
@@ -65,7 +64,6 @@ EXPORT_SYMBOL(nf_unregister_sockopt);
65static int nf_sockopt(struct sock *sk, int pf, int val, 64static int nf_sockopt(struct sock *sk, int pf, int val,
66 char __user *opt, int *len, int get) 65 char __user *opt, int *len, int get)
67{ 66{
68 struct list_head *i;
69 struct nf_sockopt_ops *ops; 67 struct nf_sockopt_ops *ops;
70 int ret; 68 int ret;
71 69
@@ -75,8 +73,7 @@ static int nf_sockopt(struct sock *sk, int pf, int val,
75 if (mutex_lock_interruptible(&nf_sockopt_mutex) != 0) 73 if (mutex_lock_interruptible(&nf_sockopt_mutex) != 0)
76 return -EINTR; 74 return -EINTR;
77 75
78 list_for_each(i, &nf_sockopts) { 76 list_for_each_entry(ops, &nf_sockopts, list) {
79 ops = (struct nf_sockopt_ops *)i;
80 if (ops->pf == pf) { 77 if (ops->pf == pf) {
81 if (!try_module_get(ops->owner)) 78 if (!try_module_get(ops->owner))
82 goto out_nosup; 79 goto out_nosup;
@@ -124,7 +121,6 @@ EXPORT_SYMBOL(nf_getsockopt);
124static int compat_nf_sockopt(struct sock *sk, int pf, int val, 121static int compat_nf_sockopt(struct sock *sk, int pf, int val,
125 char __user *opt, int *len, int get) 122 char __user *opt, int *len, int get)
126{ 123{
127 struct list_head *i;
128 struct nf_sockopt_ops *ops; 124 struct nf_sockopt_ops *ops;
129 int ret; 125 int ret;
130 126
@@ -135,8 +131,7 @@ static int compat_nf_sockopt(struct sock *sk, int pf, int val,
135 if (mutex_lock_interruptible(&nf_sockopt_mutex) != 0) 131 if (mutex_lock_interruptible(&nf_sockopt_mutex) != 0)
136 return -EINTR; 132 return -EINTR;
137 133
138 list_for_each(i, &nf_sockopts) { 134 list_for_each_entry(ops, &nf_sockopts, list) {
139 ops = (struct nf_sockopt_ops *)i;
140 if (ops->pf == pf) { 135 if (ops->pf == pf) {
141 if (!try_module_get(ops->owner)) 136 if (!try_module_get(ops->owner))
142 goto out_nosup; 137 goto out_nosup;
diff --git a/net/netfilter/xt_connlimit.c b/net/netfilter/xt_connlimit.c
index 06cff1d13690..d7becf08a93a 100644
--- a/net/netfilter/xt_connlimit.c
+++ b/net/netfilter/xt_connlimit.c
@@ -4,7 +4,8 @@
4 * (c) 2000 Gerd Knorr <kraxel@bytesex.org> 4 * (c) 2000 Gerd Knorr <kraxel@bytesex.org>
5 * Nov 2002: Martin Bene <martin.bene@icomedias.com>: 5 * Nov 2002: Martin Bene <martin.bene@icomedias.com>:
6 * only ignore TIME_WAIT or gone connections 6 * only ignore TIME_WAIT or gone connections
7 * Copyright © Jan Engelhardt <jengelh@gmx.de>, 2007 7 * (C) CC Computer Consultants GmbH, 2007
8 * Contact: <jengelh@computergmbh.de>
8 * 9 *
9 * based on ... 10 * based on ...
10 * 11 *
@@ -306,7 +307,7 @@ static void __exit xt_connlimit_exit(void)
306 307
307module_init(xt_connlimit_init); 308module_init(xt_connlimit_init);
308module_exit(xt_connlimit_exit); 309module_exit(xt_connlimit_exit);
309MODULE_AUTHOR("Jan Engelhardt <jengelh@gmx.de>"); 310MODULE_AUTHOR("Jan Engelhardt <jengelh@computergmbh.de>");
310MODULE_DESCRIPTION("netfilter xt_connlimit match module"); 311MODULE_DESCRIPTION("netfilter xt_connlimit match module");
311MODULE_LICENSE("GPL"); 312MODULE_LICENSE("GPL");
312MODULE_ALIAS("ipt_connlimit"); 313MODULE_ALIAS("ipt_connlimit");
diff --git a/net/netfilter/xt_time.c b/net/netfilter/xt_time.c
index ef48bbd93573..ff44f86c24ce 100644
--- a/net/netfilter/xt_time.c
+++ b/net/netfilter/xt_time.c
@@ -1,6 +1,7 @@
1/* 1/*
2 * xt_time 2 * xt_time
3 * Copyright © Jan Engelhardt <jengelh@computergmbh.de>, 2007 3 * Copyright © CC Computer Consultants GmbH, 2007
4 * Contact: <jengelh@computergmbh.de>
4 * 5 *
5 * based on ipt_time by Fabrice MARIE <fabrice@netfilter.org> 6 * based on ipt_time by Fabrice MARIE <fabrice@netfilter.org>
6 * This is a module which is used for time matching 7 * This is a module which is used for time matching
diff --git a/net/netfilter/xt_u32.c b/net/netfilter/xt_u32.c
index bec427915b30..af75b8c3f20b 100644
--- a/net/netfilter/xt_u32.c
+++ b/net/netfilter/xt_u32.c
@@ -2,7 +2,8 @@
2 * xt_u32 - kernel module to match u32 packet content 2 * xt_u32 - kernel module to match u32 packet content
3 * 3 *
4 * Original author: Don Cohen <don@isis.cs3-inc.com> 4 * Original author: Don Cohen <don@isis.cs3-inc.com>
5 * © Jan Engelhardt <jengelh@gmx.de>, 2007 5 * (C) CC Computer Consultants GmbH, 2007
6 * Contact: <jengelh@computergmbh.de>
6 */ 7 */
7 8
8#include <linux/module.h> 9#include <linux/module.h>
@@ -129,7 +130,7 @@ static void __exit xt_u32_exit(void)
129 130
130module_init(xt_u32_init); 131module_init(xt_u32_init);
131module_exit(xt_u32_exit); 132module_exit(xt_u32_exit);
132MODULE_AUTHOR("Jan Engelhardt <jengelh@gmx.de>"); 133MODULE_AUTHOR("Jan Engelhardt <jengelh@computergmbh.de>");
133MODULE_DESCRIPTION("netfilter u32 match module"); 134MODULE_DESCRIPTION("netfilter u32 match module");
134MODULE_LICENSE("GPL"); 135MODULE_LICENSE("GPL");
135MODULE_ALIAS("ipt_u32"); 136MODULE_ALIAS("ipt_u32");
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 260171255576..415c97236f63 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -752,7 +752,7 @@ struct sock *netlink_getsockbyfilp(struct file *filp)
752 * 1: repeat lookup - reference dropped while waiting for socket memory. 752 * 1: repeat lookup - reference dropped while waiting for socket memory.
753 */ 753 */
754int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock, 754int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock,
755 long timeo, struct sock *ssk) 755 long *timeo, struct sock *ssk)
756{ 756{
757 struct netlink_sock *nlk; 757 struct netlink_sock *nlk;
758 758
@@ -761,7 +761,7 @@ int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock,
761 if (atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf || 761 if (atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf ||
762 test_bit(0, &nlk->state)) { 762 test_bit(0, &nlk->state)) {
763 DECLARE_WAITQUEUE(wait, current); 763 DECLARE_WAITQUEUE(wait, current);
764 if (!timeo) { 764 if (!*timeo) {
765 if (!ssk || netlink_is_kernel(ssk)) 765 if (!ssk || netlink_is_kernel(ssk))
766 netlink_overrun(sk); 766 netlink_overrun(sk);
767 sock_put(sk); 767 sock_put(sk);
@@ -775,7 +775,7 @@ int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock,
775 if ((atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf || 775 if ((atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf ||
776 test_bit(0, &nlk->state)) && 776 test_bit(0, &nlk->state)) &&
777 !sock_flag(sk, SOCK_DEAD)) 777 !sock_flag(sk, SOCK_DEAD))
778 timeo = schedule_timeout(timeo); 778 *timeo = schedule_timeout(*timeo);
779 779
780 __set_current_state(TASK_RUNNING); 780 __set_current_state(TASK_RUNNING);
781 remove_wait_queue(&nlk->wait, &wait); 781 remove_wait_queue(&nlk->wait, &wait);
@@ -783,7 +783,7 @@ int netlink_attachskb(struct sock *sk, struct sk_buff *skb, int nonblock,
783 783
784 if (signal_pending(current)) { 784 if (signal_pending(current)) {
785 kfree_skb(skb); 785 kfree_skb(skb);
786 return sock_intr_errno(timeo); 786 return sock_intr_errno(*timeo);
787 } 787 }
788 return 1; 788 return 1;
789 } 789 }
@@ -877,7 +877,7 @@ retry:
877 if (netlink_is_kernel(sk)) 877 if (netlink_is_kernel(sk))
878 return netlink_unicast_kernel(sk, skb); 878 return netlink_unicast_kernel(sk, skb);
879 879
880 err = netlink_attachskb(sk, skb, nonblock, timeo, ssk); 880 err = netlink_attachskb(sk, skb, nonblock, &timeo, ssk);
881 if (err == 1) 881 if (err == 1)
882 goto retry; 882 goto retry;
883 if (err) 883 if (err)
diff --git a/net/sched/cls_u32.c b/net/sched/cls_u32.c
index 9e98c6e567dd..53171029439f 100644
--- a/net/sched/cls_u32.c
+++ b/net/sched/cls_u32.c
@@ -91,7 +91,7 @@ static struct tc_u_common *u32_list;
91 91
92static __inline__ unsigned u32_hash_fold(u32 key, struct tc_u32_sel *sel, u8 fshift) 92static __inline__ unsigned u32_hash_fold(u32 key, struct tc_u32_sel *sel, u8 fshift)
93{ 93{
94 unsigned h = (key & sel->hmask)>>fshift; 94 unsigned h = ntohl(key & sel->hmask)>>fshift;
95 95
96 return h; 96 return h;
97} 97}
@@ -615,7 +615,7 @@ static int u32_change(struct tcf_proto *tp, unsigned long base, u32 handle,
615 n->handle = handle; 615 n->handle = handle;
616{ 616{
617 u8 i = 0; 617 u8 i = 0;
618 u32 mask = s->hmask; 618 u32 mask = ntohl(s->hmask);
619 if (mask) { 619 if (mask) {
620 while (!(mask & 1)) { 620 while (!(mask & 1)) {
621 i++; 621 i++;
diff --git a/net/sched/sch_teql.c b/net/sched/sch_teql.c
index 421281d9dd1d..c0ed06d4a504 100644
--- a/net/sched/sch_teql.c
+++ b/net/sched/sch_teql.c
@@ -252,6 +252,9 @@ __teql_resolve(struct sk_buff *skb, struct sk_buff *skb_res, struct net_device *
252static inline int teql_resolve(struct sk_buff *skb, 252static inline int teql_resolve(struct sk_buff *skb,
253 struct sk_buff *skb_res, struct net_device *dev) 253 struct sk_buff *skb_res, struct net_device *dev)
254{ 254{
255 if (dev->qdisc == &noop_qdisc)
256 return -ENODEV;
257
255 if (dev->header_ops == NULL || 258 if (dev->header_ops == NULL ||
256 skb->dst == NULL || 259 skb->dst == NULL ||
257 skb->dst->neighbour == NULL) 260 skb->dst->neighbour == NULL)
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index bd6f42a15a4b..a7ecf3159e53 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -6455,6 +6455,8 @@ static void sctp_sock_migrate(struct sock *oldsk, struct sock *newsk,
6455} 6455}
6456 6456
6457 6457
6458DEFINE_PROTO_INUSE(sctp)
6459
6458/* This proto struct describes the ULP interface for SCTP. */ 6460/* This proto struct describes the ULP interface for SCTP. */
6459struct proto sctp_prot = { 6461struct proto sctp_prot = {
6460 .name = "SCTP", 6462 .name = "SCTP",
@@ -6483,9 +6485,12 @@ struct proto sctp_prot = {
6483 .memory_pressure = &sctp_memory_pressure, 6485 .memory_pressure = &sctp_memory_pressure,
6484 .enter_memory_pressure = sctp_enter_memory_pressure, 6486 .enter_memory_pressure = sctp_enter_memory_pressure,
6485 .memory_allocated = &sctp_memory_allocated, 6487 .memory_allocated = &sctp_memory_allocated,
6488 REF_PROTO_INUSE(sctp)
6486}; 6489};
6487 6490
6488#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) 6491#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
6492DEFINE_PROTO_INUSE(sctpv6)
6493
6489struct proto sctpv6_prot = { 6494struct proto sctpv6_prot = {
6490 .name = "SCTPv6", 6495 .name = "SCTPv6",
6491 .owner = THIS_MODULE, 6496 .owner = THIS_MODULE,
@@ -6513,5 +6518,6 @@ struct proto sctpv6_prot = {
6513 .memory_pressure = &sctp_memory_pressure, 6518 .memory_pressure = &sctp_memory_pressure,
6514 .enter_memory_pressure = sctp_enter_memory_pressure, 6519 .enter_memory_pressure = sctp_enter_memory_pressure,
6515 .memory_allocated = &sctp_memory_allocated, 6520 .memory_allocated = &sctp_memory_allocated,
6521 REF_PROTO_INUSE(sctpv6)
6516}; 6522};
6517#endif /* defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) */ 6523#endif /* defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) */
diff --git a/security/selinux/ss/avtab.c b/security/selinux/ss/avtab.c
index 7551af1f7899..9e70a160d7da 100644
--- a/security/selinux/ss/avtab.c
+++ b/security/selinux/ss/avtab.c
@@ -325,7 +325,7 @@ static uint16_t spec_order[] = {
325 AVTAB_MEMBER 325 AVTAB_MEMBER
326}; 326};
327 327
328int avtab_read_item(void *fp, u32 vers, struct avtab *a, 328int avtab_read_item(struct avtab *a, void *fp, struct policydb *pol,
329 int (*insertf)(struct avtab *a, struct avtab_key *k, 329 int (*insertf)(struct avtab *a, struct avtab_key *k,
330 struct avtab_datum *d, void *p), 330 struct avtab_datum *d, void *p),
331 void *p) 331 void *p)
@@ -333,10 +333,11 @@ int avtab_read_item(void *fp, u32 vers, struct avtab *a,
333 __le16 buf16[4]; 333 __le16 buf16[4];
334 u16 enabled; 334 u16 enabled;
335 __le32 buf32[7]; 335 __le32 buf32[7];
336 u32 items, items2, val; 336 u32 items, items2, val, vers = pol->policyvers;
337 struct avtab_key key; 337 struct avtab_key key;
338 struct avtab_datum datum; 338 struct avtab_datum datum;
339 int i, rc; 339 int i, rc;
340 unsigned set;
340 341
341 memset(&key, 0, sizeof(struct avtab_key)); 342 memset(&key, 0, sizeof(struct avtab_key));
342 memset(&datum, 0, sizeof(struct avtab_datum)); 343 memset(&datum, 0, sizeof(struct avtab_datum));
@@ -420,12 +421,35 @@ int avtab_read_item(void *fp, u32 vers, struct avtab *a,
420 key.target_class = le16_to_cpu(buf16[items++]); 421 key.target_class = le16_to_cpu(buf16[items++]);
421 key.specified = le16_to_cpu(buf16[items++]); 422 key.specified = le16_to_cpu(buf16[items++]);
422 423
424 if (!policydb_type_isvalid(pol, key.source_type) ||
425 !policydb_type_isvalid(pol, key.target_type) ||
426 !policydb_class_isvalid(pol, key.target_class)) {
427 printk(KERN_WARNING "security: avtab: invalid type or class\n");
428 return -1;
429 }
430
431 set = 0;
432 for (i = 0; i < ARRAY_SIZE(spec_order); i++) {
433 if (key.specified & spec_order[i])
434 set++;
435 }
436 if (!set || set > 1) {
437 printk(KERN_WARNING
438 "security: avtab: more than one specifier\n");
439 return -1;
440 }
441
423 rc = next_entry(buf32, fp, sizeof(u32)); 442 rc = next_entry(buf32, fp, sizeof(u32));
424 if (rc < 0) { 443 if (rc < 0) {
425 printk("security: avtab: truncated entry\n"); 444 printk("security: avtab: truncated entry\n");
426 return -1; 445 return -1;
427 } 446 }
428 datum.data = le32_to_cpu(*buf32); 447 datum.data = le32_to_cpu(*buf32);
448 if ((key.specified & AVTAB_TYPE) &&
449 !policydb_type_isvalid(pol, datum.data)) {
450 printk(KERN_WARNING "security: avtab: invalid type\n");
451 return -1;
452 }
429 return insertf(a, &key, &datum, p); 453 return insertf(a, &key, &datum, p);
430} 454}
431 455
@@ -435,7 +459,7 @@ static int avtab_insertf(struct avtab *a, struct avtab_key *k,
435 return avtab_insert(a, k, d); 459 return avtab_insert(a, k, d);
436} 460}
437 461
438int avtab_read(struct avtab *a, void *fp, u32 vers) 462int avtab_read(struct avtab *a, void *fp, struct policydb *pol)
439{ 463{
440 int rc; 464 int rc;
441 __le32 buf[1]; 465 __le32 buf[1];
@@ -459,7 +483,7 @@ int avtab_read(struct avtab *a, void *fp, u32 vers)
459 goto bad; 483 goto bad;
460 484
461 for (i = 0; i < nel; i++) { 485 for (i = 0; i < nel; i++) {
462 rc = avtab_read_item(fp,vers, a, avtab_insertf, NULL); 486 rc = avtab_read_item(a, fp, pol, avtab_insertf, NULL);
463 if (rc) { 487 if (rc) {
464 if (rc == -ENOMEM) 488 if (rc == -ENOMEM)
465 printk(KERN_ERR "security: avtab: out of memory\n"); 489 printk(KERN_ERR "security: avtab: out of memory\n");
diff --git a/security/selinux/ss/avtab.h b/security/selinux/ss/avtab.h
index d8edf8ca56d1..8da6a8428086 100644
--- a/security/selinux/ss/avtab.h
+++ b/security/selinux/ss/avtab.h
@@ -64,12 +64,13 @@ struct avtab_datum *avtab_search(struct avtab *h, struct avtab_key *k);
64void avtab_destroy(struct avtab *h); 64void avtab_destroy(struct avtab *h);
65void avtab_hash_eval(struct avtab *h, char *tag); 65void avtab_hash_eval(struct avtab *h, char *tag);
66 66
67int avtab_read_item(void *fp, uint32_t vers, struct avtab *a, 67struct policydb;
68int avtab_read_item(struct avtab *a, void *fp, struct policydb *pol,
68 int (*insert)(struct avtab *a, struct avtab_key *k, 69 int (*insert)(struct avtab *a, struct avtab_key *k,
69 struct avtab_datum *d, void *p), 70 struct avtab_datum *d, void *p),
70 void *p); 71 void *p);
71 72
72int avtab_read(struct avtab *a, void *fp, u32 vers); 73int avtab_read(struct avtab *a, void *fp, struct policydb *pol);
73 74
74struct avtab_node *avtab_insert_nonunique(struct avtab *h, struct avtab_key *key, 75struct avtab_node *avtab_insert_nonunique(struct avtab *h, struct avtab_key *key,
75 struct avtab_datum *datum); 76 struct avtab_datum *datum);
diff --git a/security/selinux/ss/conditional.c b/security/selinux/ss/conditional.c
index 45b93a827c80..50ad85d4b77c 100644
--- a/security/selinux/ss/conditional.c
+++ b/security/selinux/ss/conditional.c
@@ -362,7 +362,8 @@ static int cond_read_av_list(struct policydb *p, void *fp, struct cond_av_list *
362 data.head = NULL; 362 data.head = NULL;
363 data.tail = NULL; 363 data.tail = NULL;
364 for (i = 0; i < len; i++) { 364 for (i = 0; i < len; i++) {
365 rc = avtab_read_item(fp, p->policyvers, &p->te_cond_avtab, cond_insertf, &data); 365 rc = avtab_read_item(&p->te_cond_avtab, fp, p, cond_insertf,
366 &data);
366 if (rc) 367 if (rc)
367 return rc; 368 return rc;
368 369
diff --git a/security/selinux/ss/ebitmap.c b/security/selinux/ss/ebitmap.c
index c1a6b22d48d9..920b5e36a1af 100644
--- a/security/selinux/ss/ebitmap.c
+++ b/security/selinux/ss/ebitmap.c
@@ -129,8 +129,8 @@ int ebitmap_netlbl_export(struct ebitmap *ebmap,
129 cmap_sft = delta % NETLBL_CATMAP_MAPSIZE; 129 cmap_sft = delta % NETLBL_CATMAP_MAPSIZE;
130 c_iter->bitmap[cmap_idx] 130 c_iter->bitmap[cmap_idx]
131 |= e_iter->maps[cmap_idx] << cmap_sft; 131 |= e_iter->maps[cmap_idx] << cmap_sft;
132 e_iter = e_iter->next;
133 } 132 }
133 e_iter = e_iter->next;
134 } 134 }
135 135
136 return 0; 136 return 0;
diff --git a/security/selinux/ss/mls.c b/security/selinux/ss/mls.c
index 9a11deaaa9e7..fb5d70a6628d 100644
--- a/security/selinux/ss/mls.c
+++ b/security/selinux/ss/mls.c
@@ -157,49 +157,55 @@ void mls_sid_to_context(struct context *context,
157 return; 157 return;
158} 158}
159 159
160int mls_level_isvalid(struct policydb *p, struct mls_level *l)
161{
162 struct level_datum *levdatum;
163 struct ebitmap_node *node;
164 int i;
165
166 if (!l->sens || l->sens > p->p_levels.nprim)
167 return 0;
168 levdatum = hashtab_search(p->p_levels.table,
169 p->p_sens_val_to_name[l->sens - 1]);
170 if (!levdatum)
171 return 0;
172
173 ebitmap_for_each_positive_bit(&l->cat, node, i) {
174 if (i > p->p_cats.nprim)
175 return 0;
176 if (!ebitmap_get_bit(&levdatum->level->cat, i)) {
177 /*
178 * Category may not be associated with
179 * sensitivity.
180 */
181 return 0;
182 }
183 }
184
185 return 1;
186}
187
188int mls_range_isvalid(struct policydb *p, struct mls_range *r)
189{
190 return (mls_level_isvalid(p, &r->level[0]) &&
191 mls_level_isvalid(p, &r->level[1]) &&
192 mls_level_dom(&r->level[1], &r->level[0]));
193}
194
160/* 195/*
161 * Return 1 if the MLS fields in the security context 196 * Return 1 if the MLS fields in the security context
162 * structure `c' are valid. Return 0 otherwise. 197 * structure `c' are valid. Return 0 otherwise.
163 */ 198 */
164int mls_context_isvalid(struct policydb *p, struct context *c) 199int mls_context_isvalid(struct policydb *p, struct context *c)
165{ 200{
166 struct level_datum *levdatum;
167 struct user_datum *usrdatum; 201 struct user_datum *usrdatum;
168 struct ebitmap_node *node;
169 int i, l;
170 202
171 if (!selinux_mls_enabled) 203 if (!selinux_mls_enabled)
172 return 1; 204 return 1;
173 205
174 /* 206 if (!mls_range_isvalid(p, &c->range))
175 * MLS range validity checks: high must dominate low, low level must
176 * be valid (category set <-> sensitivity check), and high level must
177 * be valid (category set <-> sensitivity check)
178 */
179 if (!mls_level_dom(&c->range.level[1], &c->range.level[0]))
180 /* High does not dominate low. */
181 return 0; 207 return 0;
182 208
183 for (l = 0; l < 2; l++) {
184 if (!c->range.level[l].sens || c->range.level[l].sens > p->p_levels.nprim)
185 return 0;
186 levdatum = hashtab_search(p->p_levels.table,
187 p->p_sens_val_to_name[c->range.level[l].sens - 1]);
188 if (!levdatum)
189 return 0;
190
191 ebitmap_for_each_positive_bit(&c->range.level[l].cat, node, i) {
192 if (i > p->p_cats.nprim)
193 return 0;
194 if (!ebitmap_get_bit(&levdatum->level->cat, i))
195 /*
196 * Category may not be associated with
197 * sensitivity in low level.
198 */
199 return 0;
200 }
201 }
202
203 if (c->role == OBJECT_R_VAL) 209 if (c->role == OBJECT_R_VAL)
204 return 1; 210 return 1;
205 211
diff --git a/security/selinux/ss/mls.h b/security/selinux/ss/mls.h
index 096d1b4ef7fb..ab53663d9f5f 100644
--- a/security/selinux/ss/mls.h
+++ b/security/selinux/ss/mls.h
@@ -27,6 +27,8 @@
27int mls_compute_context_len(struct context *context); 27int mls_compute_context_len(struct context *context);
28void mls_sid_to_context(struct context *context, char **scontext); 28void mls_sid_to_context(struct context *context, char **scontext);
29int mls_context_isvalid(struct policydb *p, struct context *c); 29int mls_context_isvalid(struct policydb *p, struct context *c);
30int mls_range_isvalid(struct policydb *p, struct mls_range *r);
31int mls_level_isvalid(struct policydb *p, struct mls_level *l);
30 32
31int mls_context_to_sid(char oldc, 33int mls_context_to_sid(char oldc,
32 char **scontext, 34 char **scontext,
diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c
index 539828b229b2..b582aae3c62c 100644
--- a/security/selinux/ss/policydb.c
+++ b/security/selinux/ss/policydb.c
@@ -713,6 +713,27 @@ out:
713 return rc; 713 return rc;
714} 714}
715 715
716int policydb_class_isvalid(struct policydb *p, unsigned int class)
717{
718 if (!class || class > p->p_classes.nprim)
719 return 0;
720 return 1;
721}
722
723int policydb_role_isvalid(struct policydb *p, unsigned int role)
724{
725 if (!role || role > p->p_roles.nprim)
726 return 0;
727 return 1;
728}
729
730int policydb_type_isvalid(struct policydb *p, unsigned int type)
731{
732 if (!type || type > p->p_types.nprim)
733 return 0;
734 return 1;
735}
736
716/* 737/*
717 * Return 1 if the fields in the security context 738 * Return 1 if the fields in the security context
718 * structure `c' are valid. Return 0 otherwise. 739 * structure `c' are valid. Return 0 otherwise.
@@ -1260,6 +1281,7 @@ static int mls_read_level(struct mls_level *lp, void *fp)
1260 "categories\n"); 1281 "categories\n");
1261 goto bad; 1282 goto bad;
1262 } 1283 }
1284
1263 return 0; 1285 return 0;
1264 1286
1265bad: 1287bad:
@@ -1563,7 +1585,7 @@ int policydb_read(struct policydb *p, void *fp)
1563 p->symtab[i].nprim = nprim; 1585 p->symtab[i].nprim = nprim;
1564 } 1586 }
1565 1587
1566 rc = avtab_read(&p->te_avtab, fp, p->policyvers); 1588 rc = avtab_read(&p->te_avtab, fp, p);
1567 if (rc) 1589 if (rc)
1568 goto bad; 1590 goto bad;
1569 1591
@@ -1595,6 +1617,12 @@ int policydb_read(struct policydb *p, void *fp)
1595 tr->role = le32_to_cpu(buf[0]); 1617 tr->role = le32_to_cpu(buf[0]);
1596 tr->type = le32_to_cpu(buf[1]); 1618 tr->type = le32_to_cpu(buf[1]);
1597 tr->new_role = le32_to_cpu(buf[2]); 1619 tr->new_role = le32_to_cpu(buf[2]);
1620 if (!policydb_role_isvalid(p, tr->role) ||
1621 !policydb_type_isvalid(p, tr->type) ||
1622 !policydb_role_isvalid(p, tr->new_role)) {
1623 rc = -EINVAL;
1624 goto bad;
1625 }
1598 ltr = tr; 1626 ltr = tr;
1599 } 1627 }
1600 1628
@@ -1619,6 +1647,11 @@ int policydb_read(struct policydb *p, void *fp)
1619 goto bad; 1647 goto bad;
1620 ra->role = le32_to_cpu(buf[0]); 1648 ra->role = le32_to_cpu(buf[0]);
1621 ra->new_role = le32_to_cpu(buf[1]); 1649 ra->new_role = le32_to_cpu(buf[1]);
1650 if (!policydb_role_isvalid(p, ra->role) ||
1651 !policydb_role_isvalid(p, ra->new_role)) {
1652 rc = -EINVAL;
1653 goto bad;
1654 }
1622 lra = ra; 1655 lra = ra;
1623 } 1656 }
1624 1657
@@ -1872,9 +1905,19 @@ int policydb_read(struct policydb *p, void *fp)
1872 rt->target_class = le32_to_cpu(buf[0]); 1905 rt->target_class = le32_to_cpu(buf[0]);
1873 } else 1906 } else
1874 rt->target_class = SECCLASS_PROCESS; 1907 rt->target_class = SECCLASS_PROCESS;
1908 if (!policydb_type_isvalid(p, rt->source_type) ||
1909 !policydb_type_isvalid(p, rt->target_type) ||
1910 !policydb_class_isvalid(p, rt->target_class)) {
1911 rc = -EINVAL;
1912 goto bad;
1913 }
1875 rc = mls_read_range_helper(&rt->target_range, fp); 1914 rc = mls_read_range_helper(&rt->target_range, fp);
1876 if (rc) 1915 if (rc)
1877 goto bad; 1916 goto bad;
1917 if (!mls_range_isvalid(p, &rt->target_range)) {
1918 printk(KERN_WARNING "security: rangetrans: invalid range\n");
1919 goto bad;
1920 }
1878 lrt = rt; 1921 lrt = rt;
1879 } 1922 }
1880 } 1923 }
diff --git a/security/selinux/ss/policydb.h b/security/selinux/ss/policydb.h
index 844d310f4f1b..ed6fc687c66f 100644
--- a/security/selinux/ss/policydb.h
+++ b/security/selinux/ss/policydb.h
@@ -251,6 +251,9 @@ struct policydb {
251extern void policydb_destroy(struct policydb *p); 251extern void policydb_destroy(struct policydb *p);
252extern int policydb_load_isids(struct policydb *p, struct sidtab *s); 252extern int policydb_load_isids(struct policydb *p, struct sidtab *s);
253extern int policydb_context_isvalid(struct policydb *p, struct context *c); 253extern int policydb_context_isvalid(struct policydb *p, struct context *c);
254extern int policydb_class_isvalid(struct policydb *p, unsigned int class);
255extern int policydb_type_isvalid(struct policydb *p, unsigned int type);
256extern int policydb_role_isvalid(struct policydb *p, unsigned int role);
254extern int policydb_read(struct policydb *p, void *fp); 257extern int policydb_read(struct policydb *p, void *fp);
255 258
256#define PERM_SYMTAB_SIZE 32 259#define PERM_SYMTAB_SIZE 32
diff --git a/security/selinux/xfrm.c b/security/selinux/xfrm.c
index 36a191e7004e..e07603969033 100644
--- a/security/selinux/xfrm.c
+++ b/security/selinux/xfrm.c
@@ -211,26 +211,27 @@ static int selinux_xfrm_sec_ctx_alloc(struct xfrm_sec_ctx **ctxp,
211 if (uctx->ctx_doi != XFRM_SC_ALG_SELINUX) 211 if (uctx->ctx_doi != XFRM_SC_ALG_SELINUX)
212 return -EINVAL; 212 return -EINVAL;
213 213
214 if (uctx->ctx_len >= PAGE_SIZE) 214 str_len = uctx->ctx_len;
215 if (str_len >= PAGE_SIZE)
215 return -ENOMEM; 216 return -ENOMEM;
216 217
217 *ctxp = ctx = kmalloc(sizeof(*ctx) + 218 *ctxp = ctx = kmalloc(sizeof(*ctx) +
218 uctx->ctx_len + 1, 219 str_len + 1,
219 GFP_KERNEL); 220 GFP_KERNEL);
220 221
221 if (!ctx) 222 if (!ctx)
222 return -ENOMEM; 223 return -ENOMEM;
223 224
224 ctx->ctx_doi = uctx->ctx_doi; 225 ctx->ctx_doi = uctx->ctx_doi;
225 ctx->ctx_len = uctx->ctx_len; 226 ctx->ctx_len = str_len;
226 ctx->ctx_alg = uctx->ctx_alg; 227 ctx->ctx_alg = uctx->ctx_alg;
227 228
228 memcpy(ctx->ctx_str, 229 memcpy(ctx->ctx_str,
229 uctx+1, 230 uctx+1,
230 ctx->ctx_len); 231 str_len);
231 ctx->ctx_str[ctx->ctx_len] = 0; 232 ctx->ctx_str[str_len] = 0;
232 rc = security_context_to_sid(ctx->ctx_str, 233 rc = security_context_to_sid(ctx->ctx_str,
233 ctx->ctx_len, 234 str_len,
234 &ctx->ctx_sid); 235 &ctx->ctx_sid);
235 236
236 if (rc) 237 if (rc)