aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore30
-rw-r--r--Documentation/connector/connector.txt44
-rw-r--r--MAINTAINERS7
-rw-r--r--Makefile8
-rw-r--r--arch/arm/Makefile2
-rw-r--r--arch/arm/kernel/armksyms.c4
-rw-r--r--arch/arm/kernel/entry-common.S7
-rw-r--r--arch/arm/kernel/vmlinux.lds.S15
-rw-r--r--arch/arm/mach-integrator/impd1.c15
-rw-r--r--arch/arm/mach-l7200/core.c20
-rw-r--r--arch/arm/mach-pxa/corgi_lcd.c20
-rw-r--r--arch/arm/mach-pxa/generic.c25
-rw-r--r--arch/arm/mach-pxa/spitz.c4
-rw-r--r--arch/arm/mach-s3c2410/Kconfig1
-rw-r--r--arch/arm/mach-s3c2410/clock.c5
-rw-r--r--arch/arm/mach-s3c2410/mach-anubis.c2
-rw-r--r--arch/arm/mach-s3c2410/mach-bast.c10
-rw-r--r--arch/arm/mach-s3c2410/mach-vr1000.c2
-rw-r--r--arch/arm/mach-s3c2410/s3c2410.c3
-rw-r--r--arch/arm/mach-s3c2410/s3c2440.c4
-rw-r--r--arch/arm/mach-s3c2410/time.c1
-rw-r--r--arch/arm/mm/alignment.c44
-rw-r--r--arch/arm/mm/proc-v6.S9
-rw-r--r--arch/arm/nwfpe/fpa11.c5
-rw-r--r--arch/arm/nwfpe/fpa11.h20
-rw-r--r--arch/arm/nwfpe/fpa11_cprt.c3
-rw-r--r--arch/arm/nwfpe/fpopcode.h6
-rw-r--r--arch/arm/nwfpe/softfloat.h3
-rw-r--r--arch/cris/arch-v32/kernel/smp.c2
-rw-r--r--arch/i386/kernel/cpu/cpufreq/powernow-k8.c30
-rw-r--r--arch/ia64/lib/swiotlb.c4
-rw-r--r--arch/m32r/kernel/smp.c12
-rw-r--r--arch/mips/pci/fixup-tb0226.c33
-rw-r--r--arch/powerpc/kernel/cputable.c5
-rw-r--r--arch/powerpc/mm/mem.c3
-rw-r--r--arch/powerpc/platforms/iseries/htab.c2
-rw-r--r--arch/powerpc/platforms/powermac/setup.c14
-rw-r--r--arch/ppc64/configs/bpa_defconfig79
-rw-r--r--arch/ppc64/configs/g5_defconfig124
-rw-r--r--arch/ppc64/configs/iSeries_defconfig78
-rw-r--r--arch/ppc64/configs/maple_defconfig67
-rw-r--r--arch/ppc64/configs/pSeries_defconfig95
-rw-r--r--arch/ppc64/defconfig100
-rw-r--r--arch/ppc64/kernel/vdso32/gettimeofday.S2
-rw-r--r--arch/sh/kernel/smp.c3
-rw-r--r--arch/sparc64/kernel/dtlb_base.S14
-rw-r--r--arch/sparc64/kernel/dtlb_prot.S12
-rw-r--r--arch/sparc64/kernel/head.S61
-rw-r--r--arch/sparc64/kernel/itlb_base.S26
-rw-r--r--arch/sparc64/kernel/ktlb.S92
-rw-r--r--arch/sparc64/kernel/pci_iommu.c363
-rw-r--r--arch/sparc64/kernel/pci_psycho.c44
-rw-r--r--arch/sparc64/kernel/pci_sabre.c39
-rw-r--r--arch/sparc64/kernel/pci_schizo.c57
-rw-r--r--arch/sparc64/kernel/smp.c7
-rw-r--r--arch/sparc64/mm/init.c187
-rw-r--r--arch/sparc64/mm/ultra.S16
-rw-r--r--arch/sparc64/prom/misc.c12
-rw-r--r--arch/um/drivers/Makefile2
-rw-r--r--arch/um/drivers/ubd_kern.c556
-rw-r--r--arch/um/drivers/ubd_user.c75
-rw-r--r--arch/um/include/aio.h18
-rw-r--r--arch/um/include/os.h5
-rw-r--r--arch/um/include/sysdep-x86_64/ptrace.h4
-rw-r--r--arch/um/os-Linux/aio.c205
-rw-r--r--drivers/acpi/event.c5
-rw-r--r--drivers/acpi/glue.c8
-rw-r--r--drivers/char/.gitignore3
-rw-r--r--drivers/char/drm/drm_vm.c3
-rw-r--r--drivers/char/drm/mga_dma.c22
-rw-r--r--drivers/char/drm/mga_drv.h2
-rw-r--r--drivers/char/drm/mga_state.c2
-rw-r--r--drivers/char/mbcs.c3
-rw-r--r--drivers/char/n_r3964.c8
-rw-r--r--drivers/ieee1394/ohci1394.c6
-rw-r--r--drivers/ieee1394/raw1394.c100
-rw-r--r--drivers/input/keyboard/Kconfig2
-rw-r--r--drivers/input/keyboard/spitzkbd.c2
-rw-r--r--drivers/input/misc/uinput.c4
-rw-r--r--drivers/md/md.c4
-rw-r--r--drivers/media/radio/radio-cadet.c2
-rw-r--r--drivers/media/video/vpx3220.c32
-rw-r--r--drivers/message/fusion/mptsas.c12
-rw-r--r--drivers/net/e100.c224
-rw-r--r--drivers/net/wireless/Kconfig2
-rw-r--r--drivers/net/wireless/orinoco.c5
-rw-r--r--drivers/pci/.gitignore4
-rw-r--r--drivers/pci/quirks.c4
-rw-r--r--drivers/pcmcia/soc_common.c14
-rw-r--r--drivers/scsi/Kconfig5
-rw-r--r--drivers/scsi/aacraid/linit.c2
-rw-r--r--drivers/scsi/qlogicpti.c39
-rw-r--r--drivers/scsi/sata_nv.c14
-rw-r--r--drivers/scsi/scsi_error.c2
-rw-r--r--drivers/serial/8250_pnp.c4
-rw-r--r--drivers/serial/imx.c39
-rw-r--r--drivers/serial/pxa.c2
-rw-r--r--drivers/serial/s3c2410.c15
-rw-r--r--drivers/serial/sh-sci.c2
-rw-r--r--drivers/usb/host/isp116x-hcd.c3
-rw-r--r--drivers/usb/input/hid-core.c3
-rw-r--r--drivers/usb/serial/generic.c2
-rw-r--r--drivers/video/console/vgacon.c9
-rw-r--r--drivers/video/logo/.gitignore7
-rw-r--r--drivers/video/sa1100fb.c2
-rw-r--r--drivers/video/vesafb.c6
-rw-r--r--drivers/w1/w1.c3
-rw-r--r--fs/aio.c26
-rw-r--r--fs/nfs/delegation.c4
-rw-r--r--fs/nfs/file.c3
-rw-r--r--fs/nfs/inode.c9
-rw-r--r--fs/proc/base.c12
-rw-r--r--fs/proc/nommu.c1
-rw-r--r--include/asm-arm/arch-ixp4xx/entry-macro.S9
-rw-r--r--include/asm-arm/arch-ixp4xx/hardware.h2
-rw-r--r--include/asm-arm/arch-pxa/pxa-regs.h9
-rw-r--r--include/asm-arm/arch-pxa/pxafb.h1
-rw-r--r--include/asm-arm/arch-s3c2410/hardware.h7
-rw-r--r--include/asm-arm/arch-s3c2410/io.h58
-rw-r--r--include/asm-arm/arch-s3c2410/regs-clock.h21
-rw-r--r--include/asm-arm/locks.h4
-rw-r--r--include/asm-powerpc/cputable.h1
-rw-r--r--include/asm-powerpc/timex.h2
-rw-r--r--include/asm-sparc64/pbm.h30
-rw-r--r--include/linux/acct.h4
-rw-r--r--include/linux/aio.h7
-rw-r--r--include/linux/bootmem.h32
-rw-r--r--include/linux/cpumask.h10
-rw-r--r--include/linux/hugetlb.h3
-rw-r--r--include/linux/list.h39
-rw-r--r--include/linux/netfilter/nfnetlink.h12
-rw-r--r--include/linux/netfilter/nfnetlink_conntrack.h15
-rw-r--r--include/linux/netfilter_ipv4/ip_conntrack.h8
-rw-r--r--include/linux/netfilter_ipv4/ip_conntrack_protocol.h3
-rw-r--r--include/linux/netfilter_ipv4/ip_conntrack_tuple.h2
-rw-r--r--include/linux/netfilter_ipv4/ip_nat.h4
-rw-r--r--include/linux/netpoll.h2
-rw-r--r--include/linux/rcupdate.h1
-rw-r--r--include/net/inet_timewait_sock.h3
-rw-r--r--kernel/exit.c1
-rw-r--r--kernel/fork.c2
-rw-r--r--kernel/posix-cpu-timers.c3
-rw-r--r--kernel/posix-timers.c2
-rw-r--r--kernel/rcupdate.c13
-rw-r--r--kernel/signal.c14
-rw-r--r--kernel/time.c1
-rw-r--r--lib/.gitignore6
-rw-r--r--mm/bootmem.c31
-rw-r--r--mm/hugetlb.c57
-rw-r--r--mm/memory.c4
-rw-r--r--mm/vmscan.c13
-rw-r--r--net/bridge/br_if.c2
-rw-r--r--net/bridge/netfilter/ebtables.c27
-rw-r--r--net/dccp/ccid.h4
-rw-r--r--net/dccp/input.c6
-rw-r--r--net/dccp/ipv4.c2
-rw-r--r--net/dccp/output.c10
-rw-r--r--net/dccp/proto.c2
-rw-r--r--net/ipv4/esp4.c17
-rw-r--r--net/ipv4/inet_timewait_sock.c1
-rw-r--r--net/ipv4/netfilter/Kconfig8
-rw-r--r--net/ipv4/netfilter/arp_tables.c14
-rw-r--r--net/ipv4/netfilter/ip_conntrack_core.c13
-rw-r--r--net/ipv4/netfilter/ip_conntrack_netlink.c48
-rw-r--r--net/ipv4/netfilter/ip_conntrack_proto_icmp.c3
-rw-r--r--net/ipv4/netfilter/ip_conntrack_proto_tcp.c27
-rw-r--r--net/ipv4/netfilter/ip_tables.c17
-rw-r--r--net/ipv4/tcp_output.c3
-rw-r--r--net/ipv6/esp6.c18
-rw-r--r--net/ipv6/netfilter/ip6_tables.c17
-rw-r--r--net/netfilter/nfnetlink.c4
-rw-r--r--net/sched/Kconfig4
-rw-r--r--scripts/.gitignore4
-rw-r--r--scripts/basic/.gitignore3
-rw-r--r--scripts/kconfig/.gitignore16
-rw-r--r--scripts/mod/.gitignore4
-rw-r--r--usr/.gitignore7
177 files changed, 2329 insertions, 1842 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..5014bfa48ac1
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,30 @@
1#
2# NOTE! Don't add files that are generated in specific
3# subdirectories here. Add them in the ".gitignore" file
4# in that subdirectory instead.
5#
6# Normal rules
7#
8.*
9*.o
10*.a
11*.s
12*.ko
13*.mod.c
14
15#
16# Top-level generic files
17#
18vmlinux*
19System.map
20Module.symvers
21
22#
23# Generated include files
24#
25include/asm
26include/config
27include/linux/autoconf.h
28include/linux/compile.h
29include/linux/version.h
30
diff --git a/Documentation/connector/connector.txt b/Documentation/connector/connector.txt
index 54a0a14bfbe3..57a314b14cf8 100644
--- a/Documentation/connector/connector.txt
+++ b/Documentation/connector/connector.txt
@@ -131,3 +131,47 @@ Netlink itself is not reliable protocol, that means that messages can
131be lost due to memory pressure or process' receiving queue overflowed, 131be lost due to memory pressure or process' receiving queue overflowed,
132so caller is warned must be prepared. That is why struct cn_msg [main 132so caller is warned must be prepared. That is why struct cn_msg [main
133connector's message header] contains u32 seq and u32 ack fields. 133connector's message header] contains u32 seq and u32 ack fields.
134
135/*****************************************/
136Userspace usage.
137/*****************************************/
1382.6.14 has a new netlink socket implementation, which by default does not
139allow to send data to netlink groups other than 1.
140So, if to use netlink socket (for example using connector)
141with different group number userspace application must subscribe to
142that group. It can be achieved by following pseudocode:
143
144s = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_CONNECTOR);
145
146l_local.nl_family = AF_NETLINK;
147l_local.nl_groups = 12345;
148l_local.nl_pid = 0;
149
150if (bind(s, (struct sockaddr *)&l_local, sizeof(struct sockaddr_nl)) == -1) {
151 perror("bind");
152 close(s);
153 return -1;
154}
155
156{
157 int on = l_local.nl_groups;
158 setsockopt(s, 270, 1, &on, sizeof(on));
159}
160
161Where 270 above is SOL_NETLINK, and 1 is a NETLINK_ADD_MEMBERSHIP socket
162option. To drop multicast subscription one should call above socket option
163with NETLINK_DROP_MEMBERSHIP parameter which is defined as 0.
164
1652.6.14 netlink code only allows to select a group which is less or equal to
166the maximum group number, which is used at netlink_kernel_create() time.
167In case of connector it is CN_NETLINK_USERS + 0xf, so if you want to use
168group number 12345, you must increment CN_NETLINK_USERS to that number.
169Additional 0xf numbers are allocated to be used by non-in-kernel users.
170
171Due to this limitation, group 0xffffffff does not work now, so one can
172not use add/remove connector's group notifications, but as far as I know,
173only cn_test.c test module used it.
174
175Some work in netlink area is still being done, so things can be changed in
1762.6.15 timeframe, if it will happen, documentation will be updated for that
177kernel.
diff --git a/MAINTAINERS b/MAINTAINERS
index abf7f7a17ae0..767fb610963e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1618,6 +1618,13 @@ M: vandrove@vc.cvut.cz
1618L: linux-fbdev-devel@lists.sourceforge.net 1618L: linux-fbdev-devel@lists.sourceforge.net
1619S: Maintained 1619S: Maintained
1620 1620
1621MEGARAID SCSI DRIVERS
1622P: Neela Syam Kolli
1623M: Neela.Kolli@engenio.com
1624S: linux-scsi@vger.kernel.org
1625W: http://megaraid.lsilogic.com
1626S: Maintained
1627
1621MEMORY TECHNOLOGY DEVICES 1628MEMORY TECHNOLOGY DEVICES
1622P: David Woodhouse 1629P: David Woodhouse
1623M: dwmw2@infradead.org 1630M: dwmw2@infradead.org
diff --git a/Makefile b/Makefile
index 504ba3ceb296..4a7000e353b5 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
1VERSION = 2 1VERSION = 2
2PATCHLEVEL = 6 2PATCHLEVEL = 6
3SUBLEVEL = 14 3SUBLEVEL = 14
4EXTRAVERSION =-rc4 4EXTRAVERSION =-rc5
5NAME=Affluent Albatross 5NAME=Affluent Albatross
6 6
7# *DOCUMENTATION* 7# *DOCUMENTATION*
@@ -372,7 +372,7 @@ export MODVERDIR := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/).tmp_ve
372# Files to ignore in find ... statements 372# Files to ignore in find ... statements
373 373
374RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS -o -name .pc -o -name .hg \) -prune -o 374RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS -o -name .pc -o -name .hg \) -prune -o
375RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn --exclude CVS --exclude .pc --exclude .hg 375export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn --exclude CVS --exclude .pc --exclude .hg
376 376
377# =========================================================================== 377# ===========================================================================
378# Rules shared between *config targets and build targets 378# Rules shared between *config targets and build targets
@@ -660,8 +660,10 @@ quiet_cmd_sysmap = SYSMAP
660# Link of vmlinux 660# Link of vmlinux
661# If CONFIG_KALLSYMS is set .version is already updated 661# If CONFIG_KALLSYMS is set .version is already updated
662# Generate System.map and verify that the content is consistent 662# Generate System.map and verify that the content is consistent
663 663# Use + in front of the vmlinux_version rule to silent warning with make -j2
664# First command is ':' to allow us to use + in front of the rule
664define rule_vmlinux__ 665define rule_vmlinux__
666 :
665 $(if $(CONFIG_KALLSYMS),,+$(call cmd,vmlinux_version)) 667 $(if $(CONFIG_KALLSYMS),,+$(call cmd,vmlinux_version))
666 668
667 $(call cmd,vmlinux__) 669 $(call cmd,vmlinux__)
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 7779f2d1acad..299bc0468702 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -53,7 +53,7 @@ tune-$(CONFIG_CPU_ARM926T) :=-mtune=arm9tdmi
53tune-$(CONFIG_CPU_SA110) :=-mtune=strongarm110 53tune-$(CONFIG_CPU_SA110) :=-mtune=strongarm110
54tune-$(CONFIG_CPU_SA1100) :=-mtune=strongarm1100 54tune-$(CONFIG_CPU_SA1100) :=-mtune=strongarm1100
55tune-$(CONFIG_CPU_XSCALE) :=$(call cc-option,-mtune=xscale,-mtune=strongarm110) -Wa,-mcpu=xscale 55tune-$(CONFIG_CPU_XSCALE) :=$(call cc-option,-mtune=xscale,-mtune=strongarm110) -Wa,-mcpu=xscale
56tune-$(CONFIG_CPU_V6) :=-mtune=strongarm 56tune-$(CONFIG_CPU_V6) :=$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm)
57 57
58# Need -Uarm for gcc < 3.x 58# Need -Uarm for gcc < 3.x
59CFLAGS_ABI :=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) $(call cc-option,-mno-thumb-interwork,) 59CFLAGS_ABI :=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) $(call cc-option,-mno-thumb-interwork,)
diff --git a/arch/arm/kernel/armksyms.c b/arch/arm/kernel/armksyms.c
index 835d450797a1..7b17a87a3311 100644
--- a/arch/arm/kernel/armksyms.c
+++ b/arch/arm/kernel/armksyms.c
@@ -45,8 +45,8 @@ extern void fp_enter(void);
45 45
46#define EXPORT_SYMBOL_ALIAS(sym,orig) \ 46#define EXPORT_SYMBOL_ALIAS(sym,orig) \
47 EXPORT_CRC_ALIAS(sym) \ 47 EXPORT_CRC_ALIAS(sym) \
48 const struct kernel_symbol __ksymtab_##sym \ 48 static const struct kernel_symbol __ksymtab_##sym \
49 __attribute__((section("__ksymtab"))) = \ 49 __attribute_used__ __attribute__((section("__ksymtab"))) = \
50 { (unsigned long)&orig, #sym }; 50 { (unsigned long)&orig, #sym };
51 51
52/* 52/*
diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index 81d450ac3fab..066597f4345a 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -106,15 +106,10 @@ ENTRY(ret_from_fork)
106 .endm 106 .endm
107 107
108.Larm700bug: 108.Larm700bug:
109 ldr r0, [sp, #S_PSR] @ Get calling cpsr
110 sub lr, lr, #4
111 str lr, [r8]
112 msr spsr_cxsf, r0
113 ldmia sp, {r0 - lr}^ @ Get calling r0 - lr 109 ldmia sp, {r0 - lr}^ @ Get calling r0 - lr
114 mov r0, r0 110 mov r0, r0
115 ldr lr, [sp, #S_PC] @ Get PC
116 add sp, sp, #S_FRAME_SIZE 111 add sp, sp, #S_FRAME_SIZE
117 movs pc, lr 112 subs pc, lr, #4
118#else 113#else
119 .macro arm710_bug_check, instr, temp 114 .macro arm710_bug_check, instr, temp
120 .endm 115 .endm
diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
index 08e58ecd44be..0d5db5279c5c 100644
--- a/arch/arm/kernel/vmlinux.lds.S
+++ b/arch/arm/kernel/vmlinux.lds.S
@@ -89,13 +89,6 @@ SECTIONS
89 *(.got) /* Global offset table */ 89 *(.got) /* Global offset table */
90 } 90 }
91 91
92 . = ALIGN(16);
93 __ex_table : { /* Exception table */
94 __start___ex_table = .;
95 *(__ex_table)
96 __stop___ex_table = .;
97 }
98
99 RODATA 92 RODATA
100 93
101 _etext = .; /* End of text and rodata section */ 94 _etext = .; /* End of text and rodata section */
@@ -138,6 +131,14 @@ SECTIONS
138 *(.data.cacheline_aligned) 131 *(.data.cacheline_aligned)
139 132
140 /* 133 /*
134 * The exception fixup table (might need resorting at runtime)
135 */
136 . = ALIGN(32);
137 __start___ex_table = .;
138 *(__ex_table)
139 __stop___ex_table = .;
140
141 /*
141 * and the usual data section 142 * and the usual data section
142 */ 143 */
143 *(.data) 144 *(.data)
diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c
index c3c2f17d030e..a1b153d1626c 100644
--- a/arch/arm/mach-integrator/impd1.c
+++ b/arch/arm/mach-integrator/impd1.c
@@ -67,7 +67,7 @@ static void impd1_setvco(struct clk *clk, struct icst525_vco vco)
67 } 67 }
68 writel(0, impd1->base + IMPD1_LOCK); 68 writel(0, impd1->base + IMPD1_LOCK);
69 69
70#if DEBUG 70#ifdef DEBUG
71 vco.v = val & 0x1ff; 71 vco.v = val & 0x1ff;
72 vco.r = (val >> 9) & 0x7f; 72 vco.r = (val >> 9) & 0x7f;
73 vco.s = (val >> 16) & 7; 73 vco.s = (val >> 16) & 7;
@@ -427,17 +427,18 @@ static int impd1_probe(struct lm_device *dev)
427 return ret; 427 return ret;
428} 428}
429 429
430static int impd1_remove_one(struct device *dev, void *data)
431{
432 device_unregister(dev);
433 return 0;
434}
435
430static void impd1_remove(struct lm_device *dev) 436static void impd1_remove(struct lm_device *dev)
431{ 437{
432 struct impd1_module *impd1 = lm_get_drvdata(dev); 438 struct impd1_module *impd1 = lm_get_drvdata(dev);
433 struct list_head *l, *n;
434 int i; 439 int i;
435 440
436 list_for_each_safe(l, n, &dev->dev.children) { 441 device_for_each_child(&dev->dev, NULL, impd1_remove_one);
437 struct device *d = list_to_dev(l);
438
439 device_unregister(d);
440 }
441 442
442 for (i = 0; i < ARRAY_SIZE(impd1->vcos); i++) 443 for (i = 0; i < ARRAY_SIZE(impd1->vcos); i++)
443 clk_unregister(&impd1->vcos[i]); 444 clk_unregister(&impd1->vcos[i]);
diff --git a/arch/arm/mach-l7200/core.c b/arch/arm/mach-l7200/core.c
index 5fd8c9f97f9a..03ed742ae2be 100644
--- a/arch/arm/mach-l7200/core.c
+++ b/arch/arm/mach-l7200/core.c
@@ -7,11 +7,17 @@
7 */ 7 */
8#include <linux/kernel.h> 8#include <linux/kernel.h>
9#include <linux/init.h> 9#include <linux/init.h>
10#include <linux/device.h>
10 11
12#include <asm/types.h>
13#include <asm/irq.h>
14#include <asm/mach-types.h>
11#include <asm/hardware.h> 15#include <asm/hardware.h>
12#include <asm/page.h> 16#include <asm/page.h>
13 17
18#include <asm/mach/arch.h>
14#include <asm/mach/map.h> 19#include <asm/mach/map.h>
20#include <asm/mach/irq.h>
15 21
16/* 22/*
17 * IRQ base register 23 * IRQ base register
@@ -47,6 +53,12 @@ static void l7200_unmask_irq(unsigned int irq)
47{ 53{
48 IRQ_ENABLE = 1 << irq; 54 IRQ_ENABLE = 1 << irq;
49} 55}
56
57static struct irqchip l7200_irq_chip = {
58 .ack = l7200_mask_irq,
59 .mask = l7200_mask_irq,
60 .unmask = l7200_unmask_irq
61};
50 62
51static void __init l7200_init_irq(void) 63static void __init l7200_init_irq(void)
52{ 64{
@@ -56,11 +68,9 @@ static void __init l7200_init_irq(void)
56 FIQ_ENABLECLEAR = 0xffffffff; /* clear all fast interrupt enables */ 68 FIQ_ENABLECLEAR = 0xffffffff; /* clear all fast interrupt enables */
57 69
58 for (irq = 0; irq < NR_IRQS; irq++) { 70 for (irq = 0; irq < NR_IRQS; irq++) {
59 irq_desc[irq].valid = 1; 71 set_irq_chip(irq, &l7200_irq_chip);
60 irq_desc[irq].probe_ok = 1; 72 set_irq_flags(irq, IRQF_VALID);
61 irq_desc[irq].mask_ack = l7200_mask_irq; 73 set_irq_handler(irq, do_level_IRQ);
62 irq_desc[irq].mask = l7200_mask_irq;
63 irq_desc[irq].unmask = l7200_unmask_irq;
64 } 74 }
65 75
66 init_FIQ(); 76 init_FIQ();
diff --git a/arch/arm/mach-pxa/corgi_lcd.c b/arch/arm/mach-pxa/corgi_lcd.c
index c02ef7c0f7ef..850538fadece 100644
--- a/arch/arm/mach-pxa/corgi_lcd.c
+++ b/arch/arm/mach-pxa/corgi_lcd.c
@@ -467,6 +467,7 @@ void corgi_put_hsync(void)
467{ 467{
468 if (get_hsync_time) 468 if (get_hsync_time)
469 symbol_put(w100fb_get_hsynclen); 469 symbol_put(w100fb_get_hsynclen);
470 get_hsync_time = NULL;
470} 471}
471 472
472void corgi_wait_hsync(void) 473void corgi_wait_hsync(void)
@@ -476,20 +477,37 @@ void corgi_wait_hsync(void)
476#endif 477#endif
477 478
478#ifdef CONFIG_PXA_SHARP_Cxx00 479#ifdef CONFIG_PXA_SHARP_Cxx00
480static struct device *spitz_pxafb_dev;
481
482static int is_pxafb_device(struct device * dev, void * data)
483{
484 struct platform_device *pdev = container_of(dev, struct platform_device, dev);
485
486 return (strncmp(pdev->name, "pxa2xx-fb", 9) == 0);
487}
488
479unsigned long spitz_get_hsync_len(void) 489unsigned long spitz_get_hsync_len(void)
480{ 490{
491 if (!spitz_pxafb_dev) {
492 spitz_pxafb_dev = bus_find_device(&platform_bus_type, NULL, NULL, is_pxafb_device);
493 if (!spitz_pxafb_dev)
494 return 0;
495 }
481 if (!get_hsync_time) 496 if (!get_hsync_time)
482 get_hsync_time = symbol_get(pxafb_get_hsync_time); 497 get_hsync_time = symbol_get(pxafb_get_hsync_time);
483 if (!get_hsync_time) 498 if (!get_hsync_time)
484 return 0; 499 return 0;
485 500
486 return pxafb_get_hsync_time(&pxafb_device.dev); 501 return pxafb_get_hsync_time(spitz_pxafb_dev);
487} 502}
488 503
489void spitz_put_hsync(void) 504void spitz_put_hsync(void)
490{ 505{
506 put_device(spitz_pxafb_dev);
491 if (get_hsync_time) 507 if (get_hsync_time)
492 symbol_put(pxafb_get_hsync_time); 508 symbol_put(pxafb_get_hsync_time);
509 spitz_pxafb_dev = NULL;
510 get_hsync_time = NULL;
493} 511}
494 512
495void spitz_wait_hsync(void) 513void spitz_wait_hsync(void)
diff --git a/arch/arm/mach-pxa/generic.c b/arch/arm/mach-pxa/generic.c
index d0660a8c4b70..1d7677669a76 100644
--- a/arch/arm/mach-pxa/generic.c
+++ b/arch/arm/mach-pxa/generic.c
@@ -208,6 +208,11 @@ static struct platform_device pxafb_device = {
208 .resource = pxafb_resources, 208 .resource = pxafb_resources,
209}; 209};
210 210
211void __init set_pxa_fb_parent(struct device *parent_dev)
212{
213 pxafb_device.dev.parent = parent_dev;
214}
215
211static struct platform_device ffuart_device = { 216static struct platform_device ffuart_device = {
212 .name = "pxa2xx-uart", 217 .name = "pxa2xx-uart",
213 .id = 0, 218 .id = 0,
@@ -245,6 +250,25 @@ void __init pxa_set_i2c_info(struct i2c_pxa_platform_data *info)
245 i2c_device.dev.platform_data = info; 250 i2c_device.dev.platform_data = info;
246} 251}
247 252
253static struct resource i2s_resources[] = {
254 {
255 .start = 0x40400000,
256 .end = 0x40400083,
257 .flags = IORESOURCE_MEM,
258 }, {
259 .start = IRQ_I2S,
260 .end = IRQ_I2S,
261 .flags = IORESOURCE_IRQ,
262 },
263};
264
265static struct platform_device i2s_device = {
266 .name = "pxa2xx-i2s",
267 .id = -1,
268 .resource = i2c_resources,
269 .num_resources = ARRAY_SIZE(i2s_resources),
270};
271
248static struct platform_device *devices[] __initdata = { 272static struct platform_device *devices[] __initdata = {
249 &pxamci_device, 273 &pxamci_device,
250 &udc_device, 274 &udc_device,
@@ -253,6 +277,7 @@ static struct platform_device *devices[] __initdata = {
253 &btuart_device, 277 &btuart_device,
254 &stuart_device, 278 &stuart_device,
255 &i2c_device, 279 &i2c_device,
280 &i2s_device,
256}; 281};
257 282
258static int __init pxa_init(void) 283static int __init pxa_init(void)
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index 568afe3d6e1a..d0ab428c2d7d 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -36,7 +36,6 @@
36#include <asm/arch/irq.h> 36#include <asm/arch/irq.h>
37#include <asm/arch/mmc.h> 37#include <asm/arch/mmc.h>
38#include <asm/arch/udc.h> 38#include <asm/arch/udc.h>
39#include <asm/arch/ohci.h>
40#include <asm/arch/pxafb.h> 39#include <asm/arch/pxafb.h>
41#include <asm/arch/akita.h> 40#include <asm/arch/akita.h>
42#include <asm/arch/spitz.h> 41#include <asm/arch/spitz.h>
@@ -304,7 +303,6 @@ static struct platform_device *devices[] __initdata = {
304 &spitzkbd_device, 303 &spitzkbd_device,
305 &spitzts_device, 304 &spitzts_device,
306 &spitzbl_device, 305 &spitzbl_device,
307 &spitzbattery_device,
308}; 306};
309 307
310static void __init common_init(void) 308static void __init common_init(void)
@@ -328,7 +326,7 @@ static void __init common_init(void)
328 326
329 platform_add_devices(devices, ARRAY_SIZE(devices)); 327 platform_add_devices(devices, ARRAY_SIZE(devices));
330 pxa_set_mci_info(&spitz_mci_platform_data); 328 pxa_set_mci_info(&spitz_mci_platform_data);
331 pxafb_device.dev.parent = &spitzssp_device.dev; 329 set_pxa_fb_parent(&spitzssp_device.dev);
332 set_pxa_fb_info(&spitz_pxafb_info); 330 set_pxa_fb_info(&spitz_pxafb_info);
333} 331}
334 332
diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig
index 06807c6ee68a..c796bcdd6158 100644
--- a/arch/arm/mach-s3c2410/Kconfig
+++ b/arch/arm/mach-s3c2410/Kconfig
@@ -12,6 +12,7 @@ config MACH_ANUBIS
12config ARCH_BAST 12config ARCH_BAST
13 bool "Simtec Electronics BAST (EB2410ITX)" 13 bool "Simtec Electronics BAST (EB2410ITX)"
14 select CPU_S3C2410 14 select CPU_S3C2410
15 select ISA
15 help 16 help
16 Say Y here if you are using the Simtec Electronics EB2410ITX 17 Say Y here if you are using the Simtec Electronics EB2410ITX
17 development board (also known as BAST) 18 development board (also known as BAST)
diff --git a/arch/arm/mach-s3c2410/clock.c b/arch/arm/mach-s3c2410/clock.c
index f59608268751..8b3d5dc35de5 100644
--- a/arch/arm/mach-s3c2410/clock.c
+++ b/arch/arm/mach-s3c2410/clock.c
@@ -98,7 +98,10 @@ struct clk *clk_get(struct device *dev, const char *id)
98 struct clk *clk = ERR_PTR(-ENOENT); 98 struct clk *clk = ERR_PTR(-ENOENT);
99 int idno; 99 int idno;
100 100
101 idno = (dev == NULL) ? -1 : to_platform_device(dev)->id; 101 if (dev == NULL || dev->bus != &platform_bus_type)
102 idno = -1;
103 else
104 idno = to_platform_device(dev)->id;
102 105
103 down(&clocks_sem); 106 down(&clocks_sem);
104 107
diff --git a/arch/arm/mach-s3c2410/mach-anubis.c b/arch/arm/mach-s3c2410/mach-anubis.c
index 7c05f27fe1d6..5ae80f4e3e67 100644
--- a/arch/arm/mach-s3c2410/mach-anubis.c
+++ b/arch/arm/mach-s3c2410/mach-anubis.c
@@ -125,7 +125,7 @@ static int external_map[] = { 2 };
125static int chip0_map[] = { 0 }; 125static int chip0_map[] = { 0 };
126static int chip1_map[] = { 1 }; 126static int chip1_map[] = { 1 };
127 127
128struct mtd_partition anubis_default_nand_part[] = { 128static struct mtd_partition anubis_default_nand_part[] = {
129 [0] = { 129 [0] = {
130 .name = "Boot Agent", 130 .name = "Boot Agent",
131 .size = SZ_16K, 131 .size = SZ_16K,
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c
index ed1f07d7252f..7b51bfd0ba6d 100644
--- a/arch/arm/mach-s3c2410/mach-bast.c
+++ b/arch/arm/mach-s3c2410/mach-bast.c
@@ -230,7 +230,7 @@ static int chip0_map[] = { 1 };
230static int chip1_map[] = { 2 }; 230static int chip1_map[] = { 2 };
231static int chip2_map[] = { 3 }; 231static int chip2_map[] = { 3 };
232 232
233struct mtd_partition bast_default_nand_part[] = { 233static struct mtd_partition bast_default_nand_part[] = {
234 [0] = { 234 [0] = {
235 .name = "Boot Agent", 235 .name = "Boot Agent",
236 .size = SZ_16K, 236 .size = SZ_16K,
@@ -307,9 +307,9 @@ static void bast_nand_select(struct s3c2410_nand_set *set, int slot)
307} 307}
308 308
309static struct s3c2410_platform_nand bast_nand_info = { 309static struct s3c2410_platform_nand bast_nand_info = {
310 .tacls = 40, 310 .tacls = 30,
311 .twrph0 = 80, 311 .twrph0 = 60,
312 .twrph1 = 80, 312 .twrph1 = 60,
313 .nr_sets = ARRAY_SIZE(bast_nand_sets), 313 .nr_sets = ARRAY_SIZE(bast_nand_sets),
314 .sets = bast_nand_sets, 314 .sets = bast_nand_sets,
315 .select_chip = bast_nand_select, 315 .select_chip = bast_nand_select,
@@ -340,7 +340,7 @@ static struct resource bast_dm9k_resource[] = {
340 * better IO routines can be written and tested 340 * better IO routines can be written and tested
341*/ 341*/
342 342
343struct dm9000_plat_data bast_dm9k_platdata = { 343static struct dm9000_plat_data bast_dm9k_platdata = {
344 .flags = DM9000_PLATF_16BITONLY 344 .flags = DM9000_PLATF_16BITONLY
345}; 345};
346 346
diff --git a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c
index 663a7f98fc0b..46b259673c18 100644
--- a/arch/arm/mach-s3c2410/mach-vr1000.c
+++ b/arch/arm/mach-s3c2410/mach-vr1000.c
@@ -288,7 +288,7 @@ static struct resource vr1000_dm9k1_resource[] = {
288 * better IO routines can be written and tested 288 * better IO routines can be written and tested
289*/ 289*/
290 290
291struct dm9000_plat_data vr1000_dm9k_platdata = { 291static struct dm9000_plat_data vr1000_dm9k_platdata = {
292 .flags = DM9000_PLATF_16BITONLY, 292 .flags = DM9000_PLATF_16BITONLY,
293}; 293};
294 294
diff --git a/arch/arm/mach-s3c2410/s3c2410.c b/arch/arm/mach-s3c2410/s3c2410.c
index 0b88993dfd27..a8bf5ec82602 100644
--- a/arch/arm/mach-s3c2410/s3c2410.c
+++ b/arch/arm/mach-s3c2410/s3c2410.c
@@ -125,9 +125,6 @@ static struct platform_device *uart_devices[] __initdata = {
125 &s3c_uart2 125 &s3c_uart2
126}; 126};
127 127
128/* store our uart devices for the serial driver console */
129struct platform_device *s3c2410_uart_devices[3];
130
131static int s3c2410_uart_count = 0; 128static int s3c2410_uart_count = 0;
132 129
133/* uart registration process */ 130/* uart registration process */
diff --git a/arch/arm/mach-s3c2410/s3c2440.c b/arch/arm/mach-s3c2410/s3c2440.c
index d4c8281b55f6..833fa36bce05 100644
--- a/arch/arm/mach-s3c2410/s3c2440.c
+++ b/arch/arm/mach-s3c2410/s3c2440.c
@@ -151,7 +151,7 @@ void __init s3c2440_init_uarts(struct s3c2410_uartcfg *cfg, int no)
151 151
152#ifdef CONFIG_PM 152#ifdef CONFIG_PM
153 153
154struct sleep_save s3c2440_sleep[] = { 154static struct sleep_save s3c2440_sleep[] = {
155 SAVE_ITEM(S3C2440_DSC0), 155 SAVE_ITEM(S3C2440_DSC0),
156 SAVE_ITEM(S3C2440_DSC1), 156 SAVE_ITEM(S3C2440_DSC1),
157 SAVE_ITEM(S3C2440_GPJDAT), 157 SAVE_ITEM(S3C2440_GPJDAT),
@@ -260,7 +260,7 @@ void __init s3c2440_init_clocks(int xtal)
260 * as a driver which may support both 2410 and 2440 may try and use it. 260 * as a driver which may support both 2410 and 2440 may try and use it.
261*/ 261*/
262 262
263int __init s3c2440_core_init(void) 263static int __init s3c2440_core_init(void)
264{ 264{
265 return sysdev_class_register(&s3c2440_sysclass); 265 return sysdev_class_register(&s3c2440_sysclass);
266} 266}
diff --git a/arch/arm/mach-s3c2410/time.c b/arch/arm/mach-s3c2410/time.c
index c0acfb2ad790..8a00e3c3cd08 100644
--- a/arch/arm/mach-s3c2410/time.c
+++ b/arch/arm/mach-s3c2410/time.c
@@ -38,6 +38,7 @@
38#include <asm/hardware/clock.h> 38#include <asm/hardware/clock.h>
39 39
40#include "clock.h" 40#include "clock.h"
41#include "cpu.h"
41 42
42static unsigned long timer_startval; 43static unsigned long timer_startval;
43static unsigned long timer_usec_ticks; 44static unsigned long timer_usec_ticks;
diff --git a/arch/arm/mm/alignment.c b/arch/arm/mm/alignment.c
index f35e69e9c65c..705c98921c37 100644
--- a/arch/arm/mm/alignment.c
+++ b/arch/arm/mm/alignment.c
@@ -111,7 +111,7 @@ proc_alignment_read(char *page, char **start, off_t off, int count, int *eof,
111} 111}
112 112
113static int proc_alignment_write(struct file *file, const char __user *buffer, 113static int proc_alignment_write(struct file *file, const char __user *buffer,
114 unsigned long count, void *data) 114 unsigned long count, void *data)
115{ 115{
116 char mode; 116 char mode;
117 117
@@ -119,7 +119,7 @@ static int proc_alignment_write(struct file *file, const char __user *buffer,
119 if (get_user(mode, buffer)) 119 if (get_user(mode, buffer))
120 return -EFAULT; 120 return -EFAULT;
121 if (mode >= '0' && mode <= '5') 121 if (mode >= '0' && mode <= '5')
122 ai_usermode = mode - '0'; 122 ai_usermode = mode - '0';
123 } 123 }
124 return count; 124 return count;
125} 125}
@@ -262,7 +262,7 @@ union offset_union {
262 goto fault; \ 262 goto fault; \
263 } while (0) 263 } while (0)
264 264
265#define put32_unaligned_check(val,addr) \ 265#define put32_unaligned_check(val,addr) \
266 __put32_unaligned_check("strb", val, addr) 266 __put32_unaligned_check("strb", val, addr)
267 267
268#define put32t_unaligned_check(val,addr) \ 268#define put32t_unaligned_check(val,addr) \
@@ -306,19 +306,19 @@ do_alignment_ldrhstrh(unsigned long addr, unsigned long instr, struct pt_regs *r
306 return TYPE_LDST; 306 return TYPE_LDST;
307 307
308 user: 308 user:
309 if (LDST_L_BIT(instr)) { 309 if (LDST_L_BIT(instr)) {
310 unsigned long val; 310 unsigned long val;
311 get16t_unaligned_check(val, addr); 311 get16t_unaligned_check(val, addr);
312 312
313 /* signed half-word? */ 313 /* signed half-word? */
314 if (instr & 0x40) 314 if (instr & 0x40)
315 val = (signed long)((signed short) val); 315 val = (signed long)((signed short) val);
316 316
317 regs->uregs[rd] = val; 317 regs->uregs[rd] = val;
318 } else 318 } else
319 put16t_unaligned_check(regs->uregs[rd], addr); 319 put16t_unaligned_check(regs->uregs[rd], addr);
320 320
321 return TYPE_LDST; 321 return TYPE_LDST;
322 322
323 fault: 323 fault:
324 return TYPE_FAULT; 324 return TYPE_FAULT;
@@ -342,11 +342,11 @@ do_alignment_ldrdstrd(unsigned long addr, unsigned long instr,
342 unsigned long val; 342 unsigned long val;
343 get32_unaligned_check(val, addr); 343 get32_unaligned_check(val, addr);
344 regs->uregs[rd] = val; 344 regs->uregs[rd] = val;
345 get32_unaligned_check(val, addr+4); 345 get32_unaligned_check(val, addr + 4);
346 regs->uregs[rd+1] = val; 346 regs->uregs[rd + 1] = val;
347 } else { 347 } else {
348 put32_unaligned_check(regs->uregs[rd], addr); 348 put32_unaligned_check(regs->uregs[rd], addr);
349 put32_unaligned_check(regs->uregs[rd+1], addr+4); 349 put32_unaligned_check(regs->uregs[rd + 1], addr + 4);
350 } 350 }
351 351
352 return TYPE_LDST; 352 return TYPE_LDST;
@@ -356,11 +356,11 @@ do_alignment_ldrdstrd(unsigned long addr, unsigned long instr,
356 unsigned long val; 356 unsigned long val;
357 get32t_unaligned_check(val, addr); 357 get32t_unaligned_check(val, addr);
358 regs->uregs[rd] = val; 358 regs->uregs[rd] = val;
359 get32t_unaligned_check(val, addr+4); 359 get32t_unaligned_check(val, addr + 4);
360 regs->uregs[rd+1] = val; 360 regs->uregs[rd + 1] = val;
361 } else { 361 } else {
362 put32t_unaligned_check(regs->uregs[rd], addr); 362 put32t_unaligned_check(regs->uregs[rd], addr);
363 put32t_unaligned_check(regs->uregs[rd+1], addr+4); 363 put32t_unaligned_check(regs->uregs[rd + 1], addr + 4);
364 } 364 }
365 365
366 return TYPE_LDST; 366 return TYPE_LDST;
@@ -443,7 +443,7 @@ do_alignment_ldmstm(unsigned long addr, unsigned long instr, struct pt_regs *reg
443 if (LDST_P_EQ_U(instr)) /* U = P */ 443 if (LDST_P_EQ_U(instr)) /* U = P */
444 eaddr += 4; 444 eaddr += 4;
445 445
446 /* 446 /*
447 * For alignment faults on the ARM922T/ARM920T the MMU makes 447 * For alignment faults on the ARM922T/ARM920T the MMU makes
448 * the FSR (and hence addr) equal to the updated base address 448 * the FSR (and hence addr) equal to the updated base address
449 * of the multiple access rather than the restored value. 449 * of the multiple access rather than the restored value.
@@ -570,7 +570,7 @@ thumb2arm(u16 tinstr)
570 /* 6.5.1 Format 3: */ 570 /* 6.5.1 Format 3: */
571 case 0x4800 >> 11: /* 7.1.28 LDR(3) */ 571 case 0x4800 >> 11: /* 7.1.28 LDR(3) */
572 /* NOTE: This case is not technically possible. We're 572 /* NOTE: This case is not technically possible. We're
573 * loading 32-bit memory data via PC relative 573 * loading 32-bit memory data via PC relative
574 * addressing mode. So we can and should eliminate 574 * addressing mode. So we can and should eliminate
575 * this case. But I'll leave it here for now. 575 * this case. But I'll leave it here for now.
576 */ 576 */
@@ -642,7 +642,7 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
642 642
643 if (fault) { 643 if (fault) {
644 type = TYPE_FAULT; 644 type = TYPE_FAULT;
645 goto bad_or_fault; 645 goto bad_or_fault;
646 } 646 }
647 647
648 if (user_mode(regs)) 648 if (user_mode(regs))
diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S
index caf3b19b167f..9bb5fff406fb 100644
--- a/arch/arm/mm/proc-v6.S
+++ b/arch/arm/mm/proc-v6.S
@@ -55,7 +55,14 @@ ENTRY(cpu_v6_proc_init)
55 mov pc, lr 55 mov pc, lr
56 56
57ENTRY(cpu_v6_proc_fin) 57ENTRY(cpu_v6_proc_fin)
58 mov pc, lr 58 stmfd sp!, {lr}
59 cpsid if @ disable interrupts
60 bl v6_flush_kern_cache_all
61 mrc p15, 0, r0, c1, c0, 0 @ ctrl register
62 bic r0, r0, #0x1000 @ ...i............
63 bic r0, r0, #0x0006 @ .............ca.
64 mcr p15, 0, r0, c1, c0, 0 @ disable caches
65 ldmfd sp!, {pc}
59 66
60/* 67/*
61 * cpu_v6_reset(loc) 68 * cpu_v6_reset(loc)
diff --git a/arch/arm/nwfpe/fpa11.c b/arch/arm/nwfpe/fpa11.c
index 7690f731ee87..7b3d74d73c80 100644
--- a/arch/arm/nwfpe/fpa11.c
+++ b/arch/arm/nwfpe/fpa11.c
@@ -31,11 +31,6 @@
31#include <linux/string.h> 31#include <linux/string.h>
32#include <asm/system.h> 32#include <asm/system.h>
33 33
34/* forward declarations */
35unsigned int EmulateCPDO(const unsigned int);
36unsigned int EmulateCPDT(const unsigned int);
37unsigned int EmulateCPRT(const unsigned int);
38
39/* Reset the FPA11 chip. Called to initialize and reset the emulator. */ 34/* Reset the FPA11 chip. Called to initialize and reset the emulator. */
40static void resetFPA11(void) 35static void resetFPA11(void)
41{ 36{
diff --git a/arch/arm/nwfpe/fpa11.h b/arch/arm/nwfpe/fpa11.h
index 93523ae4b7a1..9677ae8448e8 100644
--- a/arch/arm/nwfpe/fpa11.h
+++ b/arch/arm/nwfpe/fpa11.h
@@ -95,4 +95,24 @@ extern int8 SetRoundingMode(const unsigned int);
95extern int8 SetRoundingPrecision(const unsigned int); 95extern int8 SetRoundingPrecision(const unsigned int);
96extern void nwfpe_init_fpa(union fp_state *fp); 96extern void nwfpe_init_fpa(union fp_state *fp);
97 97
98extern unsigned int EmulateAll(unsigned int opcode);
99
100extern unsigned int EmulateCPDT(const unsigned int opcode);
101extern unsigned int EmulateCPDO(const unsigned int opcode);
102extern unsigned int EmulateCPRT(const unsigned int opcode);
103
104/* fpa11_cpdt.c */
105extern unsigned int PerformLDF(const unsigned int opcode);
106extern unsigned int PerformSTF(const unsigned int opcode);
107extern unsigned int PerformLFM(const unsigned int opcode);
108extern unsigned int PerformSFM(const unsigned int opcode);
109
110/* single_cpdo.c */
111
112extern unsigned int SingleCPDO(struct roundingData *roundData,
113 const unsigned int opcode, FPREG * rFd);
114/* double_cpdo.c */
115extern unsigned int DoubleCPDO(struct roundingData *roundData,
116 const unsigned int opcode, FPREG * rFd);
117
98#endif 118#endif
diff --git a/arch/arm/nwfpe/fpa11_cprt.c b/arch/arm/nwfpe/fpa11_cprt.c
index adf8d3000540..7c67023655e4 100644
--- a/arch/arm/nwfpe/fpa11_cprt.c
+++ b/arch/arm/nwfpe/fpa11_cprt.c
@@ -26,12 +26,11 @@
26#include "fpa11.inl" 26#include "fpa11.inl"
27#include "fpmodule.h" 27#include "fpmodule.h"
28#include "fpmodule.inl" 28#include "fpmodule.inl"
29#include "softfloat.h"
29 30
30#ifdef CONFIG_FPE_NWFPE_XP 31#ifdef CONFIG_FPE_NWFPE_XP
31extern flag floatx80_is_nan(floatx80); 32extern flag floatx80_is_nan(floatx80);
32#endif 33#endif
33extern flag float64_is_nan(float64);
34extern flag float32_is_nan(float32);
35 34
36unsigned int PerformFLT(const unsigned int opcode); 35unsigned int PerformFLT(const unsigned int opcode);
37unsigned int PerformFIX(const unsigned int opcode); 36unsigned int PerformFIX(const unsigned int opcode);
diff --git a/arch/arm/nwfpe/fpopcode.h b/arch/arm/nwfpe/fpopcode.h
index 1777e92a88e6..6528e081c83f 100644
--- a/arch/arm/nwfpe/fpopcode.h
+++ b/arch/arm/nwfpe/fpopcode.h
@@ -476,4 +476,10 @@ static inline unsigned int getDestinationSize(const unsigned int opcode)
476 return (nRc); 476 return (nRc);
477} 477}
478 478
479extern unsigned int checkCondition(const unsigned int opcode,
480 const unsigned int ccodes);
481
482extern const float64 float64Constant[];
483extern const float32 float32Constant[];
484
479#endif 485#endif
diff --git a/arch/arm/nwfpe/softfloat.h b/arch/arm/nwfpe/softfloat.h
index 1c8799b9ee4d..14151700b6b2 100644
--- a/arch/arm/nwfpe/softfloat.h
+++ b/arch/arm/nwfpe/softfloat.h
@@ -265,4 +265,7 @@ static inline flag float64_lt_nocheck(float64 a, float64 b)
265 return (a != b) && (aSign ^ (a < b)); 265 return (a != b) && (aSign ^ (a < b));
266} 266}
267 267
268extern flag float32_is_nan( float32 a );
269extern flag float64_is_nan( float64 a );
270
268#endif 271#endif
diff --git a/arch/cris/arch-v32/kernel/smp.c b/arch/cris/arch-v32/kernel/smp.c
index 2c5cae04a95c..957f551ba5ce 100644
--- a/arch/cris/arch-v32/kernel/smp.c
+++ b/arch/cris/arch-v32/kernel/smp.c
@@ -15,6 +15,7 @@
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/cpumask.h> 16#include <linux/cpumask.h>
17#include <linux/interrupt.h> 17#include <linux/interrupt.h>
18#include <linux/module.h>
18 19
19#define IPI_SCHEDULE 1 20#define IPI_SCHEDULE 1
20#define IPI_CALL 2 21#define IPI_CALL 2
@@ -28,6 +29,7 @@ spinlock_t cris_atomic_locks[] = { [0 ... LOCK_COUNT - 1] = SPIN_LOCK_UNLOCKED};
28/* CPU masks */ 29/* CPU masks */
29cpumask_t cpu_online_map = CPU_MASK_NONE; 30cpumask_t cpu_online_map = CPU_MASK_NONE;
30cpumask_t phys_cpu_present_map = CPU_MASK_NONE; 31cpumask_t phys_cpu_present_map = CPU_MASK_NONE;
32EXPORT_SYMBOL(phys_cpu_present_map);
31 33
32/* Variables used during SMP boot */ 34/* Variables used during SMP boot */
33volatile int cpu_now_booting = 0; 35volatile int cpu_now_booting = 0;
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
index ab6e0611303d..58ca98fdc2ca 100644
--- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
+++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
@@ -44,7 +44,7 @@
44 44
45#define PFX "powernow-k8: " 45#define PFX "powernow-k8: "
46#define BFX PFX "BIOS error: " 46#define BFX PFX "BIOS error: "
47#define VERSION "version 1.50.3" 47#define VERSION "version 1.50.4"
48#include "powernow-k8.h" 48#include "powernow-k8.h"
49 49
50/* serialize freq changes */ 50/* serialize freq changes */
@@ -111,8 +111,8 @@ static int query_current_values_with_pending_wait(struct powernow_k8_data *data)
111 u32 i = 0; 111 u32 i = 0;
112 112
113 do { 113 do {
114 if (i++ > 0x1000000) { 114 if (i++ > 10000) {
115 printk(KERN_ERR PFX "detected change pending stuck\n"); 115 dprintk("detected change pending stuck\n");
116 return 1; 116 return 1;
117 } 117 }
118 rdmsr(MSR_FIDVID_STATUS, lo, hi); 118 rdmsr(MSR_FIDVID_STATUS, lo, hi);
@@ -159,6 +159,7 @@ static int write_new_fid(struct powernow_k8_data *data, u32 fid)
159{ 159{
160 u32 lo; 160 u32 lo;
161 u32 savevid = data->currvid; 161 u32 savevid = data->currvid;
162 u32 i = 0;
162 163
163 if ((fid & INVALID_FID_MASK) || (data->currvid & INVALID_VID_MASK)) { 164 if ((fid & INVALID_FID_MASK) || (data->currvid & INVALID_VID_MASK)) {
164 printk(KERN_ERR PFX "internal error - overflow on fid write\n"); 165 printk(KERN_ERR PFX "internal error - overflow on fid write\n");
@@ -170,10 +171,13 @@ static int write_new_fid(struct powernow_k8_data *data, u32 fid)
170 dprintk("writing fid 0x%x, lo 0x%x, hi 0x%x\n", 171 dprintk("writing fid 0x%x, lo 0x%x, hi 0x%x\n",
171 fid, lo, data->plllock * PLL_LOCK_CONVERSION); 172 fid, lo, data->plllock * PLL_LOCK_CONVERSION);
172 173
173 wrmsr(MSR_FIDVID_CTL, lo, data->plllock * PLL_LOCK_CONVERSION); 174 do {
174 175 wrmsr(MSR_FIDVID_CTL, lo, data->plllock * PLL_LOCK_CONVERSION);
175 if (query_current_values_with_pending_wait(data)) 176 if (i++ > 100) {
176 return 1; 177 printk(KERN_ERR PFX "internal error - pending bit very stuck - no further pstate changes possible\n");
178 return 1;
179 }
180 } while (query_current_values_with_pending_wait(data));
177 181
178 count_off_irt(data); 182 count_off_irt(data);
179 183
@@ -197,6 +201,7 @@ static int write_new_vid(struct powernow_k8_data *data, u32 vid)
197{ 201{
198 u32 lo; 202 u32 lo;
199 u32 savefid = data->currfid; 203 u32 savefid = data->currfid;
204 int i = 0;
200 205
201 if ((data->currfid & INVALID_FID_MASK) || (vid & INVALID_VID_MASK)) { 206 if ((data->currfid & INVALID_FID_MASK) || (vid & INVALID_VID_MASK)) {
202 printk(KERN_ERR PFX "internal error - overflow on vid write\n"); 207 printk(KERN_ERR PFX "internal error - overflow on vid write\n");
@@ -208,10 +213,13 @@ static int write_new_vid(struct powernow_k8_data *data, u32 vid)
208 dprintk("writing vid 0x%x, lo 0x%x, hi 0x%x\n", 213 dprintk("writing vid 0x%x, lo 0x%x, hi 0x%x\n",
209 vid, lo, STOP_GRANT_5NS); 214 vid, lo, STOP_GRANT_5NS);
210 215
211 wrmsr(MSR_FIDVID_CTL, lo, STOP_GRANT_5NS); 216 do {
212 217 wrmsr(MSR_FIDVID_CTL, lo, STOP_GRANT_5NS);
213 if (query_current_values_with_pending_wait(data)) 218 if (i++ > 100) {
214 return 1; 219 printk(KERN_ERR PFX "internal error - pending bit very stuck - no further pstate changes possible\n");
220 return 1;
221 }
222 } while (query_current_values_with_pending_wait(data));
215 223
216 if (savefid != data->currfid) { 224 if (savefid != data->currfid) {
217 printk(KERN_ERR PFX "fid changed on vid trans, old 0x%x new 0x%x\n", 225 printk(KERN_ERR PFX "fid changed on vid trans, old 0x%x new 0x%x\n",
diff --git a/arch/ia64/lib/swiotlb.c b/arch/ia64/lib/swiotlb.c
index dbc0b3e449c5..a604efc7f6c9 100644
--- a/arch/ia64/lib/swiotlb.c
+++ b/arch/ia64/lib/swiotlb.c
@@ -123,8 +123,8 @@ swiotlb_init_with_default_size (size_t default_size)
123 /* 123 /*
124 * Get IO TLB memory from the low pages 124 * Get IO TLB memory from the low pages
125 */ 125 */
126 io_tlb_start = alloc_bootmem_low_pages(io_tlb_nslabs * 126 io_tlb_start = alloc_bootmem_low_pages_limit(io_tlb_nslabs *
127 (1 << IO_TLB_SHIFT)); 127 (1 << IO_TLB_SHIFT), 0x100000000);
128 if (!io_tlb_start) 128 if (!io_tlb_start)
129 panic("Cannot allocate SWIOTLB buffer"); 129 panic("Cannot allocate SWIOTLB buffer");
130 io_tlb_end = io_tlb_start + io_tlb_nslabs * (1 << IO_TLB_SHIFT); 130 io_tlb_end = io_tlb_start + io_tlb_nslabs * (1 << IO_TLB_SHIFT);
diff --git a/arch/m32r/kernel/smp.c b/arch/m32r/kernel/smp.c
index a4576ac7e870..8b1f6eb76870 100644
--- a/arch/m32r/kernel/smp.c
+++ b/arch/m32r/kernel/smp.c
@@ -275,12 +275,14 @@ static void flush_tlb_all_ipi(void *info)
275 *==========================================================================*/ 275 *==========================================================================*/
276void smp_flush_tlb_mm(struct mm_struct *mm) 276void smp_flush_tlb_mm(struct mm_struct *mm)
277{ 277{
278 int cpu_id = smp_processor_id(); 278 int cpu_id;
279 cpumask_t cpu_mask; 279 cpumask_t cpu_mask;
280 unsigned long *mmc = &mm->context[cpu_id]; 280 unsigned long *mmc;
281 unsigned long flags; 281 unsigned long flags;
282 282
283 preempt_disable(); 283 preempt_disable();
284 cpu_id = smp_processor_id();
285 mmc = &mm->context[cpu_id];
284 cpu_mask = mm->cpu_vm_mask; 286 cpu_mask = mm->cpu_vm_mask;
285 cpu_clear(cpu_id, cpu_mask); 287 cpu_clear(cpu_id, cpu_mask);
286 288
@@ -343,12 +345,14 @@ void smp_flush_tlb_range(struct vm_area_struct *vma, unsigned long start,
343void smp_flush_tlb_page(struct vm_area_struct *vma, unsigned long va) 345void smp_flush_tlb_page(struct vm_area_struct *vma, unsigned long va)
344{ 346{
345 struct mm_struct *mm = vma->vm_mm; 347 struct mm_struct *mm = vma->vm_mm;
346 int cpu_id = smp_processor_id(); 348 int cpu_id;
347 cpumask_t cpu_mask; 349 cpumask_t cpu_mask;
348 unsigned long *mmc = &mm->context[cpu_id]; 350 unsigned long *mmc;
349 unsigned long flags; 351 unsigned long flags;
350 352
351 preempt_disable(); 353 preempt_disable();
354 cpu_id = smp_processor_id();
355 mmc = &mm->context[cpu_id];
352 cpu_mask = mm->cpu_vm_mask; 356 cpu_mask = mm->cpu_vm_mask;
353 cpu_clear(cpu_id, cpu_mask); 357 cpu_clear(cpu_id, cpu_mask);
354 358
diff --git a/arch/mips/pci/fixup-tb0226.c b/arch/mips/pci/fixup-tb0226.c
index 61513d5d97da..b5d42b12de10 100644
--- a/arch/mips/pci/fixup-tb0226.c
+++ b/arch/mips/pci/fixup-tb0226.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * fixup-tb0226.c, The TANBAC TB0226 specific PCI fixups. 2 * fixup-tb0226.c, The TANBAC TB0226 specific PCI fixups.
3 * 3 *
4 * Copyright (C) 2002-2004 Yoichi Yuasa <yuasa@hh.iij4u.or.jp> 4 * Copyright (C) 2002-2005 Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
5 * 5 *
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU General Public License as published by
@@ -20,6 +20,7 @@
20#include <linux/init.h> 20#include <linux/init.h>
21#include <linux/pci.h> 21#include <linux/pci.h>
22 22
23#include <asm/vr41xx/giu.h>
23#include <asm/vr41xx/tb0226.h> 24#include <asm/vr41xx/tb0226.h>
24 25
25int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 26int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
@@ -29,42 +30,42 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
29 switch (slot) { 30 switch (slot) {
30 case 12: 31 case 12:
31 vr41xx_set_irq_trigger(GD82559_1_PIN, 32 vr41xx_set_irq_trigger(GD82559_1_PIN,
32 TRIGGER_LEVEL, 33 IRQ_TRIGGER_LEVEL,
33 SIGNAL_THROUGH); 34 IRQ_SIGNAL_THROUGH);
34 vr41xx_set_irq_level(GD82559_1_PIN, LEVEL_LOW); 35 vr41xx_set_irq_level(GD82559_1_PIN, IRQ_LEVEL_LOW);
35 irq = GD82559_1_IRQ; 36 irq = GD82559_1_IRQ;
36 break; 37 break;
37 case 13: 38 case 13:
38 vr41xx_set_irq_trigger(GD82559_2_PIN, 39 vr41xx_set_irq_trigger(GD82559_2_PIN,
39 TRIGGER_LEVEL, 40 IRQ_TRIGGER_LEVEL,
40 SIGNAL_THROUGH); 41 IRQ_SIGNAL_THROUGH);
41 vr41xx_set_irq_level(GD82559_2_PIN, LEVEL_LOW); 42 vr41xx_set_irq_level(GD82559_2_PIN, IRQ_LEVEL_LOW);
42 irq = GD82559_2_IRQ; 43 irq = GD82559_2_IRQ;
43 break; 44 break;
44 case 14: 45 case 14:
45 switch (pin) { 46 switch (pin) {
46 case 1: 47 case 1:
47 vr41xx_set_irq_trigger(UPD720100_INTA_PIN, 48 vr41xx_set_irq_trigger(UPD720100_INTA_PIN,
48 TRIGGER_LEVEL, 49 IRQ_TRIGGER_LEVEL,
49 SIGNAL_THROUGH); 50 IRQ_SIGNAL_THROUGH);
50 vr41xx_set_irq_level(UPD720100_INTA_PIN, 51 vr41xx_set_irq_level(UPD720100_INTA_PIN,
51 LEVEL_LOW); 52 IRQ_LEVEL_LOW);
52 irq = UPD720100_INTA_IRQ; 53 irq = UPD720100_INTA_IRQ;
53 break; 54 break;
54 case 2: 55 case 2:
55 vr41xx_set_irq_trigger(UPD720100_INTB_PIN, 56 vr41xx_set_irq_trigger(UPD720100_INTB_PIN,
56 TRIGGER_LEVEL, 57 IRQ_TRIGGER_LEVEL,
57 SIGNAL_THROUGH); 58 IRQ_SIGNAL_THROUGH);
58 vr41xx_set_irq_level(UPD720100_INTB_PIN, 59 vr41xx_set_irq_level(UPD720100_INTB_PIN,
59 LEVEL_LOW); 60 IRQ_LEVEL_LOW);
60 irq = UPD720100_INTB_IRQ; 61 irq = UPD720100_INTB_IRQ;
61 break; 62 break;
62 case 3: 63 case 3:
63 vr41xx_set_irq_trigger(UPD720100_INTC_PIN, 64 vr41xx_set_irq_trigger(UPD720100_INTC_PIN,
64 TRIGGER_LEVEL, 65 IRQ_TRIGGER_LEVEL,
65 SIGNAL_THROUGH); 66 IRQ_SIGNAL_THROUGH);
66 vr41xx_set_irq_level(UPD720100_INTC_PIN, 67 vr41xx_set_irq_level(UPD720100_INTC_PIN,
67 LEVEL_LOW); 68 IRQ_LEVEL_LOW);
68 irq = UPD720100_INTC_IRQ; 69 irq = UPD720100_INTC_IRQ;
69 break; 70 break;
70 default: 71 default:
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index 214f3b088edf..1fb80baebc87 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -303,7 +303,7 @@ struct cpu_spec cpu_specs[] = {
303 .cpu_name = "601", 303 .cpu_name = "601",
304 .cpu_features = CPU_FTRS_PPC601, 304 .cpu_features = CPU_FTRS_PPC601,
305 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR | 305 .cpu_user_features = COMMON_USER | PPC_FEATURE_601_INSTR |
306 PPC_FEATURE_UNIFIED_CACHE, 306 PPC_FEATURE_UNIFIED_CACHE | PPC_FEATURE_NO_TB,
307 .icache_bsize = 32, 307 .icache_bsize = 32,
308 .dcache_bsize = 32, 308 .dcache_bsize = 32,
309 }, 309 },
@@ -724,7 +724,8 @@ struct cpu_spec cpu_specs[] = {
724 .pvr_value = 0x00201400, 724 .pvr_value = 0x00201400,
725 .cpu_name = "403GCX", 725 .cpu_name = "403GCX",
726 .cpu_features = CPU_FTRS_40X, 726 .cpu_features = CPU_FTRS_40X,
727 .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, 727 .cpu_user_features = PPC_FEATURE_32 |
728 PPC_FEATURE_HAS_MMU | PPC_FEATURE_NO_TB,
728 .icache_bsize = 16, 729 .icache_bsize = 16,
729 .dcache_bsize = 16, 730 .dcache_bsize = 16,
730 }, 731 },
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index 55b5860ed3c9..5e9206715f09 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -477,8 +477,7 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address,
477 if (cpus_equal(vma->vm_mm->cpu_vm_mask, tmp)) 477 if (cpus_equal(vma->vm_mm->cpu_vm_mask, tmp))
478 local = 1; 478 local = 1;
479 479
480 __hash_page(address, pte_val(pte) & (_PAGE_USER|_PAGE_RW), vsid, ptep, 480 __hash_page(address, 0, vsid, ptep, 0x300, local);
481 0x300, local);
482 local_irq_restore(flags); 481 local_irq_restore(flags);
483#endif 482#endif
484#endif 483#endif
diff --git a/arch/powerpc/platforms/iseries/htab.c b/arch/powerpc/platforms/iseries/htab.c
index c00b8e9e2b3c..b3c6c3374ca6 100644
--- a/arch/powerpc/platforms/iseries/htab.c
+++ b/arch/powerpc/platforms/iseries/htab.c
@@ -68,7 +68,7 @@ static long iSeries_hpte_insert(unsigned long hpte_group, unsigned long va,
68 } 68 }
69 69
70 if (slot < 0) { /* MSB set means secondary group */ 70 if (slot < 0) { /* MSB set means secondary group */
71 vflags |= HPTE_V_VALID; 71 vflags |= HPTE_V_SECONDARY;
72 secondary = 1; 72 secondary = 1;
73 slot &= 0x7fffffffffffffff; 73 slot &= 0x7fffffffffffffff;
74 } 74 }
diff --git a/arch/powerpc/platforms/powermac/setup.c b/arch/powerpc/platforms/powermac/setup.c
index da0cb165dfc6..50f5dd787900 100644
--- a/arch/powerpc/platforms/powermac/setup.c
+++ b/arch/powerpc/platforms/powermac/setup.c
@@ -669,7 +669,7 @@ static int pmac_check_legacy_ioport(unsigned int baseport)
669 669
670static int __init pmac_declare_of_platform_devices(void) 670static int __init pmac_declare_of_platform_devices(void)
671{ 671{
672 struct device_node *np; 672 struct device_node *np, *npp;
673 673
674 np = find_devices("uni-n"); 674 np = find_devices("uni-n");
675 if (np) { 675 if (np) {
@@ -687,14 +687,16 @@ static int __init pmac_declare_of_platform_devices(void)
687 if (np) 687 if (np)
688 of_platform_device_create(np, "platinum", NULL); 688 of_platform_device_create(np, "platinum", NULL);
689 689
690 np = find_devices("u3"); 690 npp = of_find_node_by_name(NULL, "u3");
691 if (np) { 691 if (npp) {
692 for (np = np->child; np != NULL; np = np->sibling) 692 for (np = NULL; (np = of_get_next_child(npp, np)) != NULL;) {
693 if (strncmp(np->name, "i2c", 3) == 0) { 693 if (strncmp(np->name, "i2c", 3) == 0) {
694 of_platform_device_create(np, "u3-i2c", 694 of_platform_device_create(np, "u3-i2c", NULL);
695 NULL); 695 of_node_put(np);
696 break; 696 break;
697 } 697 }
698 }
699 of_node_put(npp);
698 } 700 }
699 np = of_find_node_by_type(NULL, "smu"); 701 np = of_find_node_by_type(NULL, "smu");
700 if (np) { 702 if (np) {
diff --git a/arch/ppc64/configs/bpa_defconfig b/arch/ppc64/configs/bpa_defconfig
index 46c5da41c3ae..67ffecbc05cb 100644
--- a/arch/ppc64/configs/bpa_defconfig
+++ b/arch/ppc64/configs/bpa_defconfig
@@ -1,17 +1,17 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.13-rc6 3# Linux kernel version: 2.6.14-rc4
4# Mon Aug 8 14:12:19 2005 4# Thu Oct 20 08:29:10 2005
5# 5#
6CONFIG_64BIT=y 6CONFIG_64BIT=y
7CONFIG_MMU=y 7CONFIG_MMU=y
8CONFIG_RWSEM_XCHGADD_ALGORITHM=y 8CONFIG_RWSEM_XCHGADD_ALGORITHM=y
9CONFIG_GENERIC_CALIBRATE_DELAY=y 9CONFIG_GENERIC_CALIBRATE_DELAY=y
10CONFIG_GENERIC_ISA_DMA=y 10CONFIG_GENERIC_ISA_DMA=y
11CONFIG_HAVE_DEC_LOCK=y
12CONFIG_EARLY_PRINTK=y 11CONFIG_EARLY_PRINTK=y
13CONFIG_COMPAT=y 12CONFIG_COMPAT=y
14CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 13CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
14CONFIG_ARCH_MAY_HAVE_PC_FDC=y
15CONFIG_FORCE_MAX_ZONEORDER=13 15CONFIG_FORCE_MAX_ZONEORDER=13
16 16
17# 17#
@@ -26,6 +26,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
26# General setup 26# General setup
27# 27#
28CONFIG_LOCALVERSION="" 28CONFIG_LOCALVERSION=""
29CONFIG_LOCALVERSION_AUTO=y
29CONFIG_SWAP=y 30CONFIG_SWAP=y
30CONFIG_SYSVIPC=y 31CONFIG_SYSVIPC=y
31# CONFIG_POSIX_MQUEUE is not set 32# CONFIG_POSIX_MQUEUE is not set
@@ -36,6 +37,7 @@ CONFIG_HOTPLUG=y
36CONFIG_KOBJECT_UEVENT=y 37CONFIG_KOBJECT_UEVENT=y
37# CONFIG_IKCONFIG is not set 38# CONFIG_IKCONFIG is not set
38# CONFIG_CPUSETS is not set 39# CONFIG_CPUSETS is not set
40CONFIG_INITRAMFS_SOURCE=""
39# CONFIG_EMBEDDED is not set 41# CONFIG_EMBEDDED is not set
40CONFIG_KALLSYMS=y 42CONFIG_KALLSYMS=y
41# CONFIG_KALLSYMS_ALL is not set 43# CONFIG_KALLSYMS_ALL is not set
@@ -95,6 +97,7 @@ CONFIG_FLATMEM_MANUAL=y
95# CONFIG_SPARSEMEM_MANUAL is not set 97# CONFIG_SPARSEMEM_MANUAL is not set
96CONFIG_FLATMEM=y 98CONFIG_FLATMEM=y
97CONFIG_FLAT_NODE_MEM_MAP=y 99CONFIG_FLAT_NODE_MEM_MAP=y
100# CONFIG_SPARSEMEM_STATIC is not set
98# CONFIG_NUMA is not set 101# CONFIG_NUMA is not set
99CONFIG_SCHED_SMT=y 102CONFIG_SCHED_SMT=y
100CONFIG_PREEMPT_NONE=y 103CONFIG_PREEMPT_NONE=y
@@ -110,17 +113,18 @@ CONFIG_PPC_RTAS=y
110CONFIG_RTAS_PROC=y 113CONFIG_RTAS_PROC=y
111CONFIG_RTAS_FLASH=y 114CONFIG_RTAS_FLASH=y
112CONFIG_SECCOMP=y 115CONFIG_SECCOMP=y
116CONFIG_BINFMT_ELF=y
117# CONFIG_BINFMT_MISC is not set
118CONFIG_PROC_DEVICETREE=y
119# CONFIG_CMDLINE_BOOL is not set
113CONFIG_ISA_DMA_API=y 120CONFIG_ISA_DMA_API=y
114 121
115# 122#
116# General setup 123# Bus Options
117# 124#
118CONFIG_PCI=y 125CONFIG_PCI=y
119CONFIG_PCI_DOMAINS=y 126CONFIG_PCI_DOMAINS=y
120CONFIG_BINFMT_ELF=y
121# CONFIG_BINFMT_MISC is not set
122CONFIG_PCI_LEGACY_PROC=y 127CONFIG_PCI_LEGACY_PROC=y
123CONFIG_PCI_NAMES=y
124# CONFIG_PCI_DEBUG is not set 128# CONFIG_PCI_DEBUG is not set
125 129
126# 130#
@@ -132,8 +136,6 @@ CONFIG_PCI_NAMES=y
132# PCI Hotplug Support 136# PCI Hotplug Support
133# 137#
134# CONFIG_HOTPLUG_PCI is not set 138# CONFIG_HOTPLUG_PCI is not set
135CONFIG_PROC_DEVICETREE=y
136# CONFIG_CMDLINE_BOOL is not set
137 139
138# 140#
139# Networking 141# Networking
@@ -163,8 +165,8 @@ CONFIG_SYN_COOKIES=y
163# CONFIG_INET_ESP is not set 165# CONFIG_INET_ESP is not set
164# CONFIG_INET_IPCOMP is not set 166# CONFIG_INET_IPCOMP is not set
165CONFIG_INET_TUNNEL=y 167CONFIG_INET_TUNNEL=y
166CONFIG_IP_TCPDIAG=y 168CONFIG_INET_DIAG=y
167CONFIG_IP_TCPDIAG_IPV6=y 169CONFIG_INET_TCP_DIAG=y
168# CONFIG_TCP_CONG_ADVANCED is not set 170# CONFIG_TCP_CONG_ADVANCED is not set
169CONFIG_TCP_CONG_BIC=y 171CONFIG_TCP_CONG_BIC=y
170 172
@@ -181,6 +183,7 @@ CONFIG_INET6_TUNNEL=m
181CONFIG_IPV6_TUNNEL=m 183CONFIG_IPV6_TUNNEL=m
182CONFIG_NETFILTER=y 184CONFIG_NETFILTER=y
183# CONFIG_NETFILTER_DEBUG is not set 185# CONFIG_NETFILTER_DEBUG is not set
186# CONFIG_NETFILTER_NETLINK is not set
184 187
185# 188#
186# IP: Netfilter Configuration 189# IP: Netfilter Configuration
@@ -188,11 +191,14 @@ CONFIG_NETFILTER=y
188CONFIG_IP_NF_CONNTRACK=y 191CONFIG_IP_NF_CONNTRACK=y
189# CONFIG_IP_NF_CT_ACCT is not set 192# CONFIG_IP_NF_CT_ACCT is not set
190# CONFIG_IP_NF_CONNTRACK_MARK is not set 193# CONFIG_IP_NF_CONNTRACK_MARK is not set
194# CONFIG_IP_NF_CONNTRACK_EVENTS is not set
191CONFIG_IP_NF_CT_PROTO_SCTP=y 195CONFIG_IP_NF_CT_PROTO_SCTP=y
192CONFIG_IP_NF_FTP=m 196CONFIG_IP_NF_FTP=m
193CONFIG_IP_NF_IRC=m 197CONFIG_IP_NF_IRC=m
198# CONFIG_IP_NF_NETBIOS_NS is not set
194CONFIG_IP_NF_TFTP=m 199CONFIG_IP_NF_TFTP=m
195CONFIG_IP_NF_AMANDA=m 200CONFIG_IP_NF_AMANDA=m
201# CONFIG_IP_NF_PPTP is not set
196CONFIG_IP_NF_QUEUE=m 202CONFIG_IP_NF_QUEUE=m
197CONFIG_IP_NF_IPTABLES=m 203CONFIG_IP_NF_IPTABLES=m
198CONFIG_IP_NF_MATCH_LIMIT=m 204CONFIG_IP_NF_MATCH_LIMIT=m
@@ -216,13 +222,16 @@ CONFIG_IP_NF_MATCH_OWNER=m
216CONFIG_IP_NF_MATCH_ADDRTYPE=m 222CONFIG_IP_NF_MATCH_ADDRTYPE=m
217CONFIG_IP_NF_MATCH_REALM=m 223CONFIG_IP_NF_MATCH_REALM=m
218CONFIG_IP_NF_MATCH_SCTP=m 224CONFIG_IP_NF_MATCH_SCTP=m
225# CONFIG_IP_NF_MATCH_DCCP is not set
219CONFIG_IP_NF_MATCH_COMMENT=m 226CONFIG_IP_NF_MATCH_COMMENT=m
220CONFIG_IP_NF_MATCH_HASHLIMIT=m 227CONFIG_IP_NF_MATCH_HASHLIMIT=m
228CONFIG_IP_NF_MATCH_STRING=m
221CONFIG_IP_NF_FILTER=m 229CONFIG_IP_NF_FILTER=m
222CONFIG_IP_NF_TARGET_REJECT=m 230CONFIG_IP_NF_TARGET_REJECT=m
223CONFIG_IP_NF_TARGET_LOG=m 231CONFIG_IP_NF_TARGET_LOG=m
224CONFIG_IP_NF_TARGET_ULOG=m 232CONFIG_IP_NF_TARGET_ULOG=m
225CONFIG_IP_NF_TARGET_TCPMSS=m 233CONFIG_IP_NF_TARGET_TCPMSS=m
234CONFIG_IP_NF_TARGET_NFQUEUE=m
226CONFIG_IP_NF_NAT=m 235CONFIG_IP_NF_NAT=m
227CONFIG_IP_NF_NAT_NEEDED=y 236CONFIG_IP_NF_NAT_NEEDED=y
228CONFIG_IP_NF_TARGET_MASQUERADE=m 237CONFIG_IP_NF_TARGET_MASQUERADE=m
@@ -240,6 +249,7 @@ CONFIG_IP_NF_TARGET_ECN=m
240CONFIG_IP_NF_TARGET_DSCP=m 249CONFIG_IP_NF_TARGET_DSCP=m
241CONFIG_IP_NF_TARGET_MARK=m 250CONFIG_IP_NF_TARGET_MARK=m
242CONFIG_IP_NF_TARGET_CLASSIFY=m 251CONFIG_IP_NF_TARGET_CLASSIFY=m
252CONFIG_IP_NF_TARGET_TTL=m
243CONFIG_IP_NF_RAW=m 253CONFIG_IP_NF_RAW=m
244CONFIG_IP_NF_TARGET_NOTRACK=m 254CONFIG_IP_NF_TARGET_NOTRACK=m
245CONFIG_IP_NF_ARPTABLES=m 255CONFIG_IP_NF_ARPTABLES=m
@@ -251,6 +261,12 @@ CONFIG_IP_NF_ARP_MANGLE=m
251# 261#
252# CONFIG_IP6_NF_QUEUE is not set 262# CONFIG_IP6_NF_QUEUE is not set
253# CONFIG_IP6_NF_IPTABLES is not set 263# CONFIG_IP6_NF_IPTABLES is not set
264# CONFIG_IP6_NF_TARGET_NFQUEUE is not set
265
266#
267# DCCP Configuration (EXPERIMENTAL)
268#
269# CONFIG_IP_DCCP is not set
254 270
255# 271#
256# SCTP Configuration (EXPERIMENTAL) 272# SCTP Configuration (EXPERIMENTAL)
@@ -278,6 +294,7 @@ CONFIG_NET_CLS_ROUTE=y
278# CONFIG_HAMRADIO is not set 294# CONFIG_HAMRADIO is not set
279# CONFIG_IRDA is not set 295# CONFIG_IRDA is not set
280# CONFIG_BT is not set 296# CONFIG_BT is not set
297# CONFIG_IEEE80211 is not set
281 298
282# 299#
283# Device Drivers 300# Device Drivers
@@ -292,6 +309,11 @@ CONFIG_FW_LOADER=y
292# CONFIG_DEBUG_DRIVER is not set 309# CONFIG_DEBUG_DRIVER is not set
293 310
294# 311#
312# Connector - unified userspace <-> kernelspace linker
313#
314# CONFIG_CONNECTOR is not set
315
316#
295# Memory Technology Devices (MTD) 317# Memory Technology Devices (MTD)
296# 318#
297# CONFIG_MTD is not set 319# CONFIG_MTD is not set
@@ -322,7 +344,6 @@ CONFIG_BLK_DEV_RAM=y
322CONFIG_BLK_DEV_RAM_COUNT=16 344CONFIG_BLK_DEV_RAM_COUNT=16
323CONFIG_BLK_DEV_RAM_SIZE=131072 345CONFIG_BLK_DEV_RAM_SIZE=131072
324CONFIG_BLK_DEV_INITRD=y 346CONFIG_BLK_DEV_INITRD=y
325CONFIG_INITRAMFS_SOURCE=""
326# CONFIG_CDROM_PKTCDVD is not set 347# CONFIG_CDROM_PKTCDVD is not set
327 348
328# 349#
@@ -395,6 +416,7 @@ CONFIG_IDEDMA_AUTO=y
395# 416#
396# SCSI device support 417# SCSI device support
397# 418#
419# CONFIG_RAID_ATTRS is not set
398# CONFIG_SCSI is not set 420# CONFIG_SCSI is not set
399 421
400# 422#
@@ -436,12 +458,18 @@ CONFIG_NETDEVICES=y
436# CONFIG_ARCNET is not set 458# CONFIG_ARCNET is not set
437 459
438# 460#
461# PHY device support
462#
463# CONFIG_PHYLIB is not set
464
465#
439# Ethernet (10 or 100Mbit) 466# Ethernet (10 or 100Mbit)
440# 467#
441CONFIG_NET_ETHERNET=y 468CONFIG_NET_ETHERNET=y
442CONFIG_MII=y 469CONFIG_MII=y
443# CONFIG_HAPPYMEAL is not set 470# CONFIG_HAPPYMEAL is not set
444# CONFIG_SUNGEM is not set 471# CONFIG_SUNGEM is not set
472# CONFIG_CASSINI is not set
445# CONFIG_NET_VENDOR_3COM is not set 473# CONFIG_NET_VENDOR_3COM is not set
446 474
447# 475#
@@ -462,15 +490,18 @@ CONFIG_E1000=m
462# CONFIG_HAMACHI is not set 490# CONFIG_HAMACHI is not set
463# CONFIG_YELLOWFIN is not set 491# CONFIG_YELLOWFIN is not set
464# CONFIG_R8169 is not set 492# CONFIG_R8169 is not set
493# CONFIG_SIS190 is not set
465CONFIG_SKGE=m 494CONFIG_SKGE=m
466# CONFIG_SK98LIN is not set 495# CONFIG_SK98LIN is not set
467# CONFIG_TIGON3 is not set 496# CONFIG_TIGON3 is not set
468# CONFIG_BNX2 is not set 497# CONFIG_BNX2 is not set
498# CONFIG_SPIDER_NET is not set
469# CONFIG_MV643XX_ETH is not set 499# CONFIG_MV643XX_ETH is not set
470 500
471# 501#
472# Ethernet (10000 Mbit) 502# Ethernet (10000 Mbit)
473# 503#
504# CONFIG_CHELSIO_T1 is not set
474# CONFIG_IXGB is not set 505# CONFIG_IXGB is not set
475# CONFIG_S2IO is not set 506# CONFIG_S2IO is not set
476 507
@@ -552,6 +583,7 @@ CONFIG_HW_CONSOLE=y
552CONFIG_SERIAL_NONSTANDARD=y 583CONFIG_SERIAL_NONSTANDARD=y
553# CONFIG_ROCKETPORT is not set 584# CONFIG_ROCKETPORT is not set
554# CONFIG_CYCLADES is not set 585# CONFIG_CYCLADES is not set
586# CONFIG_DIGIEPCA is not set
555# CONFIG_MOXA_SMARTIO is not set 587# CONFIG_MOXA_SMARTIO is not set
556# CONFIG_ISI is not set 588# CONFIG_ISI is not set
557# CONFIG_SYNCLINK is not set 589# CONFIG_SYNCLINK is not set
@@ -642,7 +674,6 @@ CONFIG_I2C_ALGOBIT=y
642# CONFIG_I2C_I801 is not set 674# CONFIG_I2C_I801 is not set
643# CONFIG_I2C_I810 is not set 675# CONFIG_I2C_I810 is not set
644# CONFIG_I2C_PIIX4 is not set 676# CONFIG_I2C_PIIX4 is not set
645# CONFIG_I2C_ISA is not set
646# CONFIG_I2C_NFORCE2 is not set 677# CONFIG_I2C_NFORCE2 is not set
647# CONFIG_I2C_PARPORT_LIGHT is not set 678# CONFIG_I2C_PARPORT_LIGHT is not set
648# CONFIG_I2C_PROSAVAGE is not set 679# CONFIG_I2C_PROSAVAGE is not set
@@ -656,7 +687,6 @@ CONFIG_I2C_ALGOBIT=y
656# CONFIG_I2C_VIAPRO is not set 687# CONFIG_I2C_VIAPRO is not set
657# CONFIG_I2C_VOODOO3 is not set 688# CONFIG_I2C_VOODOO3 is not set
658# CONFIG_I2C_PCA_ISA is not set 689# CONFIG_I2C_PCA_ISA is not set
659# CONFIG_I2C_SENSOR is not set
660 690
661# 691#
662# Miscellaneous I2C Chip support 692# Miscellaneous I2C Chip support
@@ -683,12 +713,17 @@ CONFIG_I2C_ALGOBIT=y
683# Hardware Monitoring support 713# Hardware Monitoring support
684# 714#
685# CONFIG_HWMON is not set 715# CONFIG_HWMON is not set
716# CONFIG_HWMON_VID is not set
686 717
687# 718#
688# Misc devices 719# Misc devices
689# 720#
690 721
691# 722#
723# Multimedia Capabilities Port drivers
724#
725
726#
692# Multimedia devices 727# Multimedia devices
693# 728#
694# CONFIG_VIDEO_DEV is not set 729# CONFIG_VIDEO_DEV is not set
@@ -756,10 +791,6 @@ CONFIG_FS_MBCACHE=y
756# CONFIG_REISERFS_FS is not set 791# CONFIG_REISERFS_FS is not set
757# CONFIG_JFS_FS is not set 792# CONFIG_JFS_FS is not set
758CONFIG_FS_POSIX_ACL=y 793CONFIG_FS_POSIX_ACL=y
759
760#
761# XFS support
762#
763# CONFIG_XFS_FS is not set 794# CONFIG_XFS_FS is not set
764# CONFIG_MINIX_FS is not set 795# CONFIG_MINIX_FS is not set
765# CONFIG_ROMFS_FS is not set 796# CONFIG_ROMFS_FS is not set
@@ -768,6 +799,7 @@ CONFIG_INOTIFY=y
768CONFIG_DNOTIFY=y 799CONFIG_DNOTIFY=y
769# CONFIG_AUTOFS_FS is not set 800# CONFIG_AUTOFS_FS is not set
770# CONFIG_AUTOFS4_FS is not set 801# CONFIG_AUTOFS4_FS is not set
802# CONFIG_FUSE_FS is not set
771 803
772# 804#
773# CD-ROM/DVD Filesystems 805# CD-ROM/DVD Filesystems
@@ -794,13 +826,11 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
794CONFIG_PROC_FS=y 826CONFIG_PROC_FS=y
795CONFIG_PROC_KCORE=y 827CONFIG_PROC_KCORE=y
796CONFIG_SYSFS=y 828CONFIG_SYSFS=y
797# CONFIG_DEVPTS_FS_XATTR is not set
798CONFIG_TMPFS=y 829CONFIG_TMPFS=y
799CONFIG_TMPFS_XATTR=y
800# CONFIG_TMPFS_SECURITY is not set
801CONFIG_HUGETLBFS=y 830CONFIG_HUGETLBFS=y
802CONFIG_HUGETLB_PAGE=y 831CONFIG_HUGETLB_PAGE=y
803CONFIG_RAMFS=y 832CONFIG_RAMFS=y
833# CONFIG_RELAYFS_FS is not set
804 834
805# 835#
806# Miscellaneous filesystems 836# Miscellaneous filesystems
@@ -846,6 +876,7 @@ CONFIG_SUNRPC=m
846# CONFIG_NCP_FS is not set 876# CONFIG_NCP_FS is not set
847# CONFIG_CODA_FS is not set 877# CONFIG_CODA_FS is not set
848# CONFIG_AFS_FS is not set 878# CONFIG_AFS_FS is not set
879# CONFIG_9P_FS is not set
849 880
850# 881#
851# Partition Types 882# Partition Types
@@ -923,6 +954,7 @@ CONFIG_NLS_ISO8859_15=m
923CONFIG_DEBUG_KERNEL=y 954CONFIG_DEBUG_KERNEL=y
924CONFIG_MAGIC_SYSRQ=y 955CONFIG_MAGIC_SYSRQ=y
925CONFIG_LOG_BUF_SHIFT=15 956CONFIG_LOG_BUF_SHIFT=15
957CONFIG_DETECT_SOFTLOCKUP=y
926# CONFIG_SCHEDSTATS is not set 958# CONFIG_SCHEDSTATS is not set
927# CONFIG_DEBUG_SLAB is not set 959# CONFIG_DEBUG_SLAB is not set
928# CONFIG_DEBUG_SPINLOCK is not set 960# CONFIG_DEBUG_SPINLOCK is not set
@@ -981,7 +1013,12 @@ CONFIG_CRYPTO_DEFLATE=m
981# Library routines 1013# Library routines
982# 1014#
983# CONFIG_CRC_CCITT is not set 1015# CONFIG_CRC_CCITT is not set
1016# CONFIG_CRC16 is not set
984CONFIG_CRC32=y 1017CONFIG_CRC32=y
985# CONFIG_LIBCRC32C is not set 1018# CONFIG_LIBCRC32C is not set
986CONFIG_ZLIB_INFLATE=m 1019CONFIG_ZLIB_INFLATE=m
987CONFIG_ZLIB_DEFLATE=m 1020CONFIG_ZLIB_DEFLATE=m
1021CONFIG_TEXTSEARCH=y
1022CONFIG_TEXTSEARCH_KMP=m
1023CONFIG_TEXTSEARCH_BM=m
1024CONFIG_TEXTSEARCH_FSM=m
diff --git a/arch/ppc64/configs/g5_defconfig b/arch/ppc64/configs/g5_defconfig
index fc83d9330282..6323065fbf2c 100644
--- a/arch/ppc64/configs/g5_defconfig
+++ b/arch/ppc64/configs/g5_defconfig
@@ -1,17 +1,17 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.13-rc6 3# Linux kernel version: 2.6.14-rc4
4# Mon Aug 8 14:16:59 2005 4# Thu Oct 20 08:30:23 2005
5# 5#
6CONFIG_64BIT=y 6CONFIG_64BIT=y
7CONFIG_MMU=y 7CONFIG_MMU=y
8CONFIG_RWSEM_XCHGADD_ALGORITHM=y 8CONFIG_RWSEM_XCHGADD_ALGORITHM=y
9CONFIG_GENERIC_CALIBRATE_DELAY=y 9CONFIG_GENERIC_CALIBRATE_DELAY=y
10CONFIG_GENERIC_ISA_DMA=y 10CONFIG_GENERIC_ISA_DMA=y
11CONFIG_HAVE_DEC_LOCK=y
12CONFIG_EARLY_PRINTK=y 11CONFIG_EARLY_PRINTK=y
13CONFIG_COMPAT=y 12CONFIG_COMPAT=y
14CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 13CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
14CONFIG_ARCH_MAY_HAVE_PC_FDC=y
15CONFIG_FORCE_MAX_ZONEORDER=13 15CONFIG_FORCE_MAX_ZONEORDER=13
16 16
17# 17#
@@ -26,6 +26,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
26# General setup 26# General setup
27# 27#
28CONFIG_LOCALVERSION="" 28CONFIG_LOCALVERSION=""
29CONFIG_LOCALVERSION_AUTO=y
29CONFIG_SWAP=y 30CONFIG_SWAP=y
30CONFIG_SYSVIPC=y 31CONFIG_SYSVIPC=y
31CONFIG_POSIX_MQUEUE=y 32CONFIG_POSIX_MQUEUE=y
@@ -37,6 +38,7 @@ CONFIG_KOBJECT_UEVENT=y
37CONFIG_IKCONFIG=y 38CONFIG_IKCONFIG=y
38CONFIG_IKCONFIG_PROC=y 39CONFIG_IKCONFIG_PROC=y
39# CONFIG_CPUSETS is not set 40# CONFIG_CPUSETS is not set
41CONFIG_INITRAMFS_SOURCE=""
40# CONFIG_EMBEDDED is not set 42# CONFIG_EMBEDDED is not set
41CONFIG_KALLSYMS=y 43CONFIG_KALLSYMS=y
42# CONFIG_KALLSYMS_ALL is not set 44# CONFIG_KALLSYMS_ALL is not set
@@ -97,6 +99,7 @@ CONFIG_FLATMEM_MANUAL=y
97# CONFIG_SPARSEMEM_MANUAL is not set 99# CONFIG_SPARSEMEM_MANUAL is not set
98CONFIG_FLATMEM=y 100CONFIG_FLATMEM=y
99CONFIG_FLAT_NODE_MEM_MAP=y 101CONFIG_FLAT_NODE_MEM_MAP=y
102# CONFIG_SPARSEMEM_STATIC is not set
100# CONFIG_NUMA is not set 103# CONFIG_NUMA is not set
101# CONFIG_SCHED_SMT is not set 104# CONFIG_SCHED_SMT is not set
102CONFIG_PREEMPT_NONE=y 105CONFIG_PREEMPT_NONE=y
@@ -109,19 +112,20 @@ CONFIG_HZ_250=y
109CONFIG_HZ=250 112CONFIG_HZ=250
110CONFIG_GENERIC_HARDIRQS=y 113CONFIG_GENERIC_HARDIRQS=y
111CONFIG_SECCOMP=y 114CONFIG_SECCOMP=y
115CONFIG_BINFMT_ELF=y
116# CONFIG_BINFMT_MISC is not set
117# CONFIG_HOTPLUG_CPU is not set
118CONFIG_PROC_DEVICETREE=y
119# CONFIG_CMDLINE_BOOL is not set
112CONFIG_ISA_DMA_API=y 120CONFIG_ISA_DMA_API=y
113 121
114# 122#
115# General setup 123# Bus Options
116# 124#
117CONFIG_PCI=y 125CONFIG_PCI=y
118CONFIG_PCI_DOMAINS=y 126CONFIG_PCI_DOMAINS=y
119CONFIG_BINFMT_ELF=y
120# CONFIG_BINFMT_MISC is not set
121CONFIG_PCI_LEGACY_PROC=y 127CONFIG_PCI_LEGACY_PROC=y
122CONFIG_PCI_NAMES=y
123# CONFIG_PCI_DEBUG is not set 128# CONFIG_PCI_DEBUG is not set
124# CONFIG_HOTPLUG_CPU is not set
125 129
126# 130#
127# PCCARD (PCMCIA/CardBus) support 131# PCCARD (PCMCIA/CardBus) support
@@ -132,8 +136,6 @@ CONFIG_PCI_NAMES=y
132# PCI Hotplug Support 136# PCI Hotplug Support
133# 137#
134# CONFIG_HOTPLUG_PCI is not set 138# CONFIG_HOTPLUG_PCI is not set
135CONFIG_PROC_DEVICETREE=y
136# CONFIG_CMDLINE_BOOL is not set
137 139
138# 140#
139# Networking 141# Networking
@@ -163,8 +165,8 @@ CONFIG_INET_AH=m
163CONFIG_INET_ESP=m 165CONFIG_INET_ESP=m
164CONFIG_INET_IPCOMP=m 166CONFIG_INET_IPCOMP=m
165CONFIG_INET_TUNNEL=y 167CONFIG_INET_TUNNEL=y
166CONFIG_IP_TCPDIAG=m 168CONFIG_INET_DIAG=y
167# CONFIG_IP_TCPDIAG_IPV6 is not set 169CONFIG_INET_TCP_DIAG=y
168# CONFIG_TCP_CONG_ADVANCED is not set 170# CONFIG_TCP_CONG_ADVANCED is not set
169CONFIG_TCP_CONG_BIC=y 171CONFIG_TCP_CONG_BIC=y
170 172
@@ -175,6 +177,7 @@ CONFIG_TCP_CONG_BIC=y
175# CONFIG_IPV6 is not set 177# CONFIG_IPV6 is not set
176CONFIG_NETFILTER=y 178CONFIG_NETFILTER=y
177# CONFIG_NETFILTER_DEBUG is not set 179# CONFIG_NETFILTER_DEBUG is not set
180# CONFIG_NETFILTER_NETLINK is not set
178 181
179# 182#
180# IP: Netfilter Configuration 183# IP: Netfilter Configuration
@@ -182,11 +185,14 @@ CONFIG_NETFILTER=y
182CONFIG_IP_NF_CONNTRACK=m 185CONFIG_IP_NF_CONNTRACK=m
183CONFIG_IP_NF_CT_ACCT=y 186CONFIG_IP_NF_CT_ACCT=y
184CONFIG_IP_NF_CONNTRACK_MARK=y 187CONFIG_IP_NF_CONNTRACK_MARK=y
188CONFIG_IP_NF_CONNTRACK_EVENTS=y
185CONFIG_IP_NF_CT_PROTO_SCTP=m 189CONFIG_IP_NF_CT_PROTO_SCTP=m
186CONFIG_IP_NF_FTP=m 190CONFIG_IP_NF_FTP=m
187CONFIG_IP_NF_IRC=m 191CONFIG_IP_NF_IRC=m
192# CONFIG_IP_NF_NETBIOS_NS is not set
188CONFIG_IP_NF_TFTP=m 193CONFIG_IP_NF_TFTP=m
189CONFIG_IP_NF_AMANDA=m 194CONFIG_IP_NF_AMANDA=m
195# CONFIG_IP_NF_PPTP is not set
190CONFIG_IP_NF_QUEUE=m 196CONFIG_IP_NF_QUEUE=m
191CONFIG_IP_NF_IPTABLES=m 197CONFIG_IP_NF_IPTABLES=m
192CONFIG_IP_NF_MATCH_LIMIT=m 198CONFIG_IP_NF_MATCH_LIMIT=m
@@ -210,14 +216,18 @@ CONFIG_IP_NF_MATCH_OWNER=m
210CONFIG_IP_NF_MATCH_ADDRTYPE=m 216CONFIG_IP_NF_MATCH_ADDRTYPE=m
211CONFIG_IP_NF_MATCH_REALM=m 217CONFIG_IP_NF_MATCH_REALM=m
212CONFIG_IP_NF_MATCH_SCTP=m 218CONFIG_IP_NF_MATCH_SCTP=m
219# CONFIG_IP_NF_MATCH_DCCP is not set
213CONFIG_IP_NF_MATCH_COMMENT=m 220CONFIG_IP_NF_MATCH_COMMENT=m
214CONFIG_IP_NF_MATCH_CONNMARK=m 221CONFIG_IP_NF_MATCH_CONNMARK=m
222CONFIG_IP_NF_MATCH_CONNBYTES=m
215CONFIG_IP_NF_MATCH_HASHLIMIT=m 223CONFIG_IP_NF_MATCH_HASHLIMIT=m
224CONFIG_IP_NF_MATCH_STRING=m
216CONFIG_IP_NF_FILTER=m 225CONFIG_IP_NF_FILTER=m
217CONFIG_IP_NF_TARGET_REJECT=m 226CONFIG_IP_NF_TARGET_REJECT=m
218CONFIG_IP_NF_TARGET_LOG=m 227CONFIG_IP_NF_TARGET_LOG=m
219CONFIG_IP_NF_TARGET_ULOG=m 228CONFIG_IP_NF_TARGET_ULOG=m
220CONFIG_IP_NF_TARGET_TCPMSS=m 229CONFIG_IP_NF_TARGET_TCPMSS=m
230CONFIG_IP_NF_TARGET_NFQUEUE=m
221CONFIG_IP_NF_NAT=m 231CONFIG_IP_NF_NAT=m
222CONFIG_IP_NF_NAT_NEEDED=y 232CONFIG_IP_NF_NAT_NEEDED=y
223CONFIG_IP_NF_TARGET_MASQUERADE=m 233CONFIG_IP_NF_TARGET_MASQUERADE=m
@@ -235,6 +245,7 @@ CONFIG_IP_NF_TARGET_ECN=m
235CONFIG_IP_NF_TARGET_DSCP=m 245CONFIG_IP_NF_TARGET_DSCP=m
236CONFIG_IP_NF_TARGET_MARK=m 246CONFIG_IP_NF_TARGET_MARK=m
237CONFIG_IP_NF_TARGET_CLASSIFY=m 247CONFIG_IP_NF_TARGET_CLASSIFY=m
248CONFIG_IP_NF_TARGET_TTL=m
238CONFIG_IP_NF_TARGET_CONNMARK=m 249CONFIG_IP_NF_TARGET_CONNMARK=m
239CONFIG_IP_NF_TARGET_CLUSTERIP=m 250CONFIG_IP_NF_TARGET_CLUSTERIP=m
240CONFIG_IP_NF_RAW=m 251CONFIG_IP_NF_RAW=m
@@ -244,6 +255,11 @@ CONFIG_IP_NF_ARPFILTER=m
244CONFIG_IP_NF_ARP_MANGLE=m 255CONFIG_IP_NF_ARP_MANGLE=m
245 256
246# 257#
258# DCCP Configuration (EXPERIMENTAL)
259#
260# CONFIG_IP_DCCP is not set
261
262#
247# SCTP Configuration (EXPERIMENTAL) 263# SCTP Configuration (EXPERIMENTAL)
248# 264#
249# CONFIG_IP_SCTP is not set 265# CONFIG_IP_SCTP is not set
@@ -270,6 +286,7 @@ CONFIG_NET_CLS_ROUTE=y
270# CONFIG_HAMRADIO is not set 286# CONFIG_HAMRADIO is not set
271# CONFIG_IRDA is not set 287# CONFIG_IRDA is not set
272# CONFIG_BT is not set 288# CONFIG_BT is not set
289# CONFIG_IEEE80211 is not set
273 290
274# 291#
275# Device Drivers 292# Device Drivers
@@ -284,6 +301,11 @@ CONFIG_FW_LOADER=y
284# CONFIG_DEBUG_DRIVER is not set 301# CONFIG_DEBUG_DRIVER is not set
285 302
286# 303#
304# Connector - unified userspace <-> kernelspace linker
305#
306# CONFIG_CONNECTOR is not set
307
308#
287# Memory Technology Devices (MTD) 309# Memory Technology Devices (MTD)
288# 310#
289# CONFIG_MTD is not set 311# CONFIG_MTD is not set
@@ -315,7 +337,6 @@ CONFIG_BLK_DEV_RAM=y
315CONFIG_BLK_DEV_RAM_COUNT=16 337CONFIG_BLK_DEV_RAM_COUNT=16
316CONFIG_BLK_DEV_RAM_SIZE=65536 338CONFIG_BLK_DEV_RAM_SIZE=65536
317CONFIG_BLK_DEV_INITRD=y 339CONFIG_BLK_DEV_INITRD=y
318CONFIG_INITRAMFS_SOURCE=""
319CONFIG_CDROM_PKTCDVD=m 340CONFIG_CDROM_PKTCDVD=m
320CONFIG_CDROM_PKTCDVD_BUFFERS=8 341CONFIG_CDROM_PKTCDVD_BUFFERS=8
321# CONFIG_CDROM_PKTCDVD_WCACHE is not set 342# CONFIG_CDROM_PKTCDVD_WCACHE is not set
@@ -395,6 +416,7 @@ CONFIG_IDEDMA_AUTO=y
395# 416#
396# SCSI device support 417# SCSI device support
397# 418#
419# CONFIG_RAID_ATTRS is not set
398CONFIG_SCSI=y 420CONFIG_SCSI=y
399CONFIG_SCSI_PROC_FS=y 421CONFIG_SCSI_PROC_FS=y
400 422
@@ -422,6 +444,7 @@ CONFIG_SCSI_CONSTANTS=y
422CONFIG_SCSI_SPI_ATTRS=y 444CONFIG_SCSI_SPI_ATTRS=y
423# CONFIG_SCSI_FC_ATTRS is not set 445# CONFIG_SCSI_FC_ATTRS is not set
424# CONFIG_SCSI_ISCSI_ATTRS is not set 446# CONFIG_SCSI_ISCSI_ATTRS is not set
447# CONFIG_SCSI_SAS_ATTRS is not set
425 448
426# 449#
427# SCSI low-level drivers 450# SCSI low-level drivers
@@ -435,10 +458,12 @@ CONFIG_SCSI_SPI_ATTRS=y
435# CONFIG_SCSI_AIC79XX is not set 458# CONFIG_SCSI_AIC79XX is not set
436# CONFIG_MEGARAID_NEWGEN is not set 459# CONFIG_MEGARAID_NEWGEN is not set
437# CONFIG_MEGARAID_LEGACY is not set 460# CONFIG_MEGARAID_LEGACY is not set
461# CONFIG_MEGARAID_SAS is not set
438CONFIG_SCSI_SATA=y 462CONFIG_SCSI_SATA=y
439# CONFIG_SCSI_SATA_AHCI is not set 463# CONFIG_SCSI_SATA_AHCI is not set
440CONFIG_SCSI_SATA_SVW=y 464CONFIG_SCSI_SATA_SVW=y
441# CONFIG_SCSI_ATA_PIIX is not set 465# CONFIG_SCSI_ATA_PIIX is not set
466# CONFIG_SCSI_SATA_MV is not set
442# CONFIG_SCSI_SATA_NV is not set 467# CONFIG_SCSI_SATA_NV is not set
443# CONFIG_SCSI_SATA_PROMISE is not set 468# CONFIG_SCSI_SATA_PROMISE is not set
444# CONFIG_SCSI_SATA_QSTOR is not set 469# CONFIG_SCSI_SATA_QSTOR is not set
@@ -498,6 +523,7 @@ CONFIG_DM_ZERO=m
498# CONFIG_FUSION is not set 523# CONFIG_FUSION is not set
499# CONFIG_FUSION_SPI is not set 524# CONFIG_FUSION_SPI is not set
500# CONFIG_FUSION_FC is not set 525# CONFIG_FUSION_FC is not set
526# CONFIG_FUSION_SAS is not set
501 527
502# 528#
503# IEEE 1394 (FireWire) support 529# IEEE 1394 (FireWire) support
@@ -540,7 +566,6 @@ CONFIG_IEEE1394_RAWIO=y
540# 566#
541CONFIG_ADB_PMU=y 567CONFIG_ADB_PMU=y
542CONFIG_PMAC_SMU=y 568CONFIG_PMAC_SMU=y
543# CONFIG_PMAC_BACKLIGHT is not set
544CONFIG_THERM_PM72=y 569CONFIG_THERM_PM72=y
545 570
546# 571#
@@ -558,12 +583,18 @@ CONFIG_TUN=m
558# CONFIG_ARCNET is not set 583# CONFIG_ARCNET is not set
559 584
560# 585#
586# PHY device support
587#
588# CONFIG_PHYLIB is not set
589
590#
561# Ethernet (10 or 100Mbit) 591# Ethernet (10 or 100Mbit)
562# 592#
563CONFIG_NET_ETHERNET=y 593CONFIG_NET_ETHERNET=y
564CONFIG_MII=y 594CONFIG_MII=y
565# CONFIG_HAPPYMEAL is not set 595# CONFIG_HAPPYMEAL is not set
566CONFIG_SUNGEM=y 596CONFIG_SUNGEM=y
597# CONFIG_CASSINI is not set
567# CONFIG_NET_VENDOR_3COM is not set 598# CONFIG_NET_VENDOR_3COM is not set
568 599
569# 600#
@@ -585,6 +616,7 @@ CONFIG_E1000=y
585# CONFIG_HAMACHI is not set 616# CONFIG_HAMACHI is not set
586# CONFIG_YELLOWFIN is not set 617# CONFIG_YELLOWFIN is not set
587# CONFIG_R8169 is not set 618# CONFIG_R8169 is not set
619# CONFIG_SIS190 is not set
588# CONFIG_SKGE is not set 620# CONFIG_SKGE is not set
589# CONFIG_SK98LIN is not set 621# CONFIG_SK98LIN is not set
590CONFIG_TIGON3=m 622CONFIG_TIGON3=m
@@ -594,6 +626,7 @@ CONFIG_TIGON3=m
594# 626#
595# Ethernet (10000 Mbit) 627# Ethernet (10000 Mbit)
596# 628#
629# CONFIG_CHELSIO_T1 is not set
597# CONFIG_IXGB is not set 630# CONFIG_IXGB is not set
598# CONFIG_S2IO is not set 631# CONFIG_S2IO is not set
599 632
@@ -760,8 +793,8 @@ CONFIG_I2C_ALGOBIT=y
760# CONFIG_I2C_I801 is not set 793# CONFIG_I2C_I801 is not set
761# CONFIG_I2C_I810 is not set 794# CONFIG_I2C_I810 is not set
762# CONFIG_I2C_PIIX4 is not set 795# CONFIG_I2C_PIIX4 is not set
763# CONFIG_I2C_ISA is not set
764CONFIG_I2C_KEYWEST=y 796CONFIG_I2C_KEYWEST=y
797CONFIG_I2C_PMAC_SMU=y
765# CONFIG_I2C_NFORCE2 is not set 798# CONFIG_I2C_NFORCE2 is not set
766# CONFIG_I2C_PARPORT_LIGHT is not set 799# CONFIG_I2C_PARPORT_LIGHT is not set
767# CONFIG_I2C_PROSAVAGE is not set 800# CONFIG_I2C_PROSAVAGE is not set
@@ -775,7 +808,6 @@ CONFIG_I2C_KEYWEST=y
775# CONFIG_I2C_VIAPRO is not set 808# CONFIG_I2C_VIAPRO is not set
776# CONFIG_I2C_VOODOO3 is not set 809# CONFIG_I2C_VOODOO3 is not set
777# CONFIG_I2C_PCA_ISA is not set 810# CONFIG_I2C_PCA_ISA is not set
778# CONFIG_I2C_SENSOR is not set
779 811
780# 812#
781# Miscellaneous I2C Chip support 813# Miscellaneous I2C Chip support
@@ -802,12 +834,17 @@ CONFIG_I2C_KEYWEST=y
802# Hardware Monitoring support 834# Hardware Monitoring support
803# 835#
804# CONFIG_HWMON is not set 836# CONFIG_HWMON is not set
837# CONFIG_HWMON_VID is not set
805 838
806# 839#
807# Misc devices 840# Misc devices
808# 841#
809 842
810# 843#
844# Multimedia Capabilities Port drivers
845#
846
847#
811# Multimedia devices 848# Multimedia devices
812# 849#
813# CONFIG_VIDEO_DEV is not set 850# CONFIG_VIDEO_DEV is not set
@@ -856,6 +893,7 @@ CONFIG_FB_RADEON_I2C=y
856# CONFIG_FB_KYRO is not set 893# CONFIG_FB_KYRO is not set
857# CONFIG_FB_3DFX is not set 894# CONFIG_FB_3DFX is not set
858# CONFIG_FB_VOODOO1 is not set 895# CONFIG_FB_VOODOO1 is not set
896# CONFIG_FB_CYBLA is not set
859# CONFIG_FB_TRIDENT is not set 897# CONFIG_FB_TRIDENT is not set
860# CONFIG_FB_S1D13XXX is not set 898# CONFIG_FB_S1D13XXX is not set
861# CONFIG_FB_VIRTUAL is not set 899# CONFIG_FB_VIRTUAL is not set
@@ -937,6 +975,7 @@ CONFIG_USB_STORAGE_DPCM=y
937CONFIG_USB_STORAGE_SDDR09=y 975CONFIG_USB_STORAGE_SDDR09=y
938CONFIG_USB_STORAGE_SDDR55=y 976CONFIG_USB_STORAGE_SDDR55=y
939CONFIG_USB_STORAGE_JUMPSHOT=y 977CONFIG_USB_STORAGE_JUMPSHOT=y
978# CONFIG_USB_STORAGE_ONETOUCH is not set
940 979
941# 980#
942# USB Input Devices 981# USB Input Devices
@@ -956,9 +995,11 @@ CONFIG_USB_HIDDEV=y
956# CONFIG_USB_MTOUCH is not set 995# CONFIG_USB_MTOUCH is not set
957# CONFIG_USB_ITMTOUCH is not set 996# CONFIG_USB_ITMTOUCH is not set
958# CONFIG_USB_EGALAX is not set 997# CONFIG_USB_EGALAX is not set
998# CONFIG_USB_YEALINK is not set
959# CONFIG_USB_XPAD is not set 999# CONFIG_USB_XPAD is not set
960# CONFIG_USB_ATI_REMOTE is not set 1000# CONFIG_USB_ATI_REMOTE is not set
961# CONFIG_USB_KEYSPAN_REMOTE is not set 1001# CONFIG_USB_KEYSPAN_REMOTE is not set
1002# CONFIG_USB_APPLETOUCH is not set
962 1003
963# 1004#
964# USB Imaging devices 1005# USB Imaging devices
@@ -983,30 +1024,14 @@ CONFIG_USB_KAWETH=m
983CONFIG_USB_PEGASUS=m 1024CONFIG_USB_PEGASUS=m
984CONFIG_USB_RTL8150=m 1025CONFIG_USB_RTL8150=m
985CONFIG_USB_USBNET=m 1026CONFIG_USB_USBNET=m
986 1027# CONFIG_USB_NET_AX8817X is not set
987# 1028CONFIG_USB_NET_CDCETHER=m
988# USB Host-to-Host Cables 1029# CONFIG_USB_NET_GL620A is not set
989# 1030# CONFIG_USB_NET_NET1080 is not set
990CONFIG_USB_ALI_M5632=y 1031# CONFIG_USB_NET_PLUSB is not set
991CONFIG_USB_AN2720=y 1032# CONFIG_USB_NET_RNDIS_HOST is not set
992CONFIG_USB_BELKIN=y 1033# CONFIG_USB_NET_CDC_SUBSET is not set
993CONFIG_USB_GENESYS=y 1034# CONFIG_USB_NET_ZAURUS is not set
994CONFIG_USB_NET1080=y
995CONFIG_USB_PL2301=y
996CONFIG_USB_KC2190=y
997
998#
999# Intelligent USB Devices/Gadgets
1000#
1001CONFIG_USB_ARMLINUX=y
1002CONFIG_USB_EPSON2888=y
1003CONFIG_USB_ZAURUS=y
1004CONFIG_USB_CDCETHER=y
1005
1006#
1007# USB Network Adapters
1008#
1009CONFIG_USB_AX8817X=y
1010CONFIG_USB_MON=y 1035CONFIG_USB_MON=y
1011 1036
1012# 1037#
@@ -1124,16 +1149,12 @@ CONFIG_REISERFS_FS_POSIX_ACL=y
1124CONFIG_REISERFS_FS_SECURITY=y 1149CONFIG_REISERFS_FS_SECURITY=y
1125# CONFIG_JFS_FS is not set 1150# CONFIG_JFS_FS is not set
1126CONFIG_FS_POSIX_ACL=y 1151CONFIG_FS_POSIX_ACL=y
1127
1128#
1129# XFS support
1130#
1131CONFIG_XFS_FS=m 1152CONFIG_XFS_FS=m
1132CONFIG_XFS_EXPORT=y 1153CONFIG_XFS_EXPORT=y
1133# CONFIG_XFS_RT is not set
1134# CONFIG_XFS_QUOTA is not set 1154# CONFIG_XFS_QUOTA is not set
1135CONFIG_XFS_SECURITY=y 1155CONFIG_XFS_SECURITY=y
1136CONFIG_XFS_POSIX_ACL=y 1156CONFIG_XFS_POSIX_ACL=y
1157# CONFIG_XFS_RT is not set
1137# CONFIG_MINIX_FS is not set 1158# CONFIG_MINIX_FS is not set
1138# CONFIG_ROMFS_FS is not set 1159# CONFIG_ROMFS_FS is not set
1139CONFIG_INOTIFY=y 1160CONFIG_INOTIFY=y
@@ -1141,6 +1162,7 @@ CONFIG_INOTIFY=y
1141CONFIG_DNOTIFY=y 1162CONFIG_DNOTIFY=y
1142CONFIG_AUTOFS_FS=m 1163CONFIG_AUTOFS_FS=m
1143# CONFIG_AUTOFS4_FS is not set 1164# CONFIG_AUTOFS4_FS is not set
1165# CONFIG_FUSE_FS is not set
1144 1166
1145# 1167#
1146# CD-ROM/DVD Filesystems 1168# CD-ROM/DVD Filesystems
@@ -1168,14 +1190,11 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1168CONFIG_PROC_FS=y 1190CONFIG_PROC_FS=y
1169CONFIG_PROC_KCORE=y 1191CONFIG_PROC_KCORE=y
1170CONFIG_SYSFS=y 1192CONFIG_SYSFS=y
1171CONFIG_DEVPTS_FS_XATTR=y
1172# CONFIG_DEVPTS_FS_SECURITY is not set
1173CONFIG_TMPFS=y 1193CONFIG_TMPFS=y
1174CONFIG_TMPFS_XATTR=y
1175CONFIG_TMPFS_SECURITY=y
1176CONFIG_HUGETLBFS=y 1194CONFIG_HUGETLBFS=y
1177CONFIG_HUGETLB_PAGE=y 1195CONFIG_HUGETLB_PAGE=y
1178CONFIG_RAMFS=y 1196CONFIG_RAMFS=y
1197# CONFIG_RELAYFS_FS is not set
1179 1198
1180# 1199#
1181# Miscellaneous filesystems 1200# Miscellaneous filesystems
@@ -1225,6 +1244,7 @@ CONFIG_CIFS=m
1225# CONFIG_NCP_FS is not set 1244# CONFIG_NCP_FS is not set
1226# CONFIG_CODA_FS is not set 1245# CONFIG_CODA_FS is not set
1227# CONFIG_AFS_FS is not set 1246# CONFIG_AFS_FS is not set
1247# CONFIG_9P_FS is not set
1228 1248
1229# 1249#
1230# Partition Types 1250# Partition Types
@@ -1303,6 +1323,7 @@ CONFIG_OPROFILE=y
1303CONFIG_DEBUG_KERNEL=y 1323CONFIG_DEBUG_KERNEL=y
1304CONFIG_MAGIC_SYSRQ=y 1324CONFIG_MAGIC_SYSRQ=y
1305CONFIG_LOG_BUF_SHIFT=17 1325CONFIG_LOG_BUF_SHIFT=17
1326CONFIG_DETECT_SOFTLOCKUP=y
1306# CONFIG_SCHEDSTATS is not set 1327# CONFIG_SCHEDSTATS is not set
1307# CONFIG_DEBUG_SLAB is not set 1328# CONFIG_DEBUG_SLAB is not set
1308# CONFIG_DEBUG_SPINLOCK is not set 1329# CONFIG_DEBUG_SPINLOCK is not set
@@ -1360,7 +1381,12 @@ CONFIG_CRYPTO_TEST=m
1360# Library routines 1381# Library routines
1361# 1382#
1362CONFIG_CRC_CCITT=m 1383CONFIG_CRC_CCITT=m
1384# CONFIG_CRC16 is not set
1363CONFIG_CRC32=y 1385CONFIG_CRC32=y
1364CONFIG_LIBCRC32C=m 1386CONFIG_LIBCRC32C=m
1365CONFIG_ZLIB_INFLATE=y 1387CONFIG_ZLIB_INFLATE=y
1366CONFIG_ZLIB_DEFLATE=m 1388CONFIG_ZLIB_DEFLATE=m
1389CONFIG_TEXTSEARCH=y
1390CONFIG_TEXTSEARCH_KMP=m
1391CONFIG_TEXTSEARCH_BM=m
1392CONFIG_TEXTSEARCH_FSM=m
diff --git a/arch/ppc64/configs/iSeries_defconfig b/arch/ppc64/configs/iSeries_defconfig
index 013d4e0e4003..62e92c7e9e27 100644
--- a/arch/ppc64/configs/iSeries_defconfig
+++ b/arch/ppc64/configs/iSeries_defconfig
@@ -1,17 +1,17 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.13-rc6 3# Linux kernel version: 2.6.14-rc4
4# Mon Aug 8 14:17:02 2005 4# Thu Oct 20 08:30:56 2005
5# 5#
6CONFIG_64BIT=y 6CONFIG_64BIT=y
7CONFIG_MMU=y 7CONFIG_MMU=y
8CONFIG_RWSEM_XCHGADD_ALGORITHM=y 8CONFIG_RWSEM_XCHGADD_ALGORITHM=y
9CONFIG_GENERIC_CALIBRATE_DELAY=y 9CONFIG_GENERIC_CALIBRATE_DELAY=y
10CONFIG_GENERIC_ISA_DMA=y 10CONFIG_GENERIC_ISA_DMA=y
11CONFIG_HAVE_DEC_LOCK=y
12CONFIG_EARLY_PRINTK=y 11CONFIG_EARLY_PRINTK=y
13CONFIG_COMPAT=y 12CONFIG_COMPAT=y
14CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 13CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
14CONFIG_ARCH_MAY_HAVE_PC_FDC=y
15CONFIG_FORCE_MAX_ZONEORDER=13 15CONFIG_FORCE_MAX_ZONEORDER=13
16 16
17# 17#
@@ -26,6 +26,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
26# General setup 26# General setup
27# 27#
28CONFIG_LOCALVERSION="" 28CONFIG_LOCALVERSION=""
29CONFIG_LOCALVERSION_AUTO=y
29CONFIG_SWAP=y 30CONFIG_SWAP=y
30CONFIG_SYSVIPC=y 31CONFIG_SYSVIPC=y
31CONFIG_POSIX_MQUEUE=y 32CONFIG_POSIX_MQUEUE=y
@@ -38,6 +39,7 @@ CONFIG_KOBJECT_UEVENT=y
38CONFIG_IKCONFIG=y 39CONFIG_IKCONFIG=y
39CONFIG_IKCONFIG_PROC=y 40CONFIG_IKCONFIG_PROC=y
40# CONFIG_CPUSETS is not set 41# CONFIG_CPUSETS is not set
42CONFIG_INITRAMFS_SOURCE=""
41# CONFIG_EMBEDDED is not set 43# CONFIG_EMBEDDED is not set
42CONFIG_KALLSYMS=y 44CONFIG_KALLSYMS=y
43# CONFIG_KALLSYMS_ALL is not set 45# CONFIG_KALLSYMS_ALL is not set
@@ -88,6 +90,7 @@ CONFIG_FLATMEM_MANUAL=y
88# CONFIG_SPARSEMEM_MANUAL is not set 90# CONFIG_SPARSEMEM_MANUAL is not set
89CONFIG_FLATMEM=y 91CONFIG_FLATMEM=y
90CONFIG_FLAT_NODE_MEM_MAP=y 92CONFIG_FLAT_NODE_MEM_MAP=y
93# CONFIG_SPARSEMEM_STATIC is not set
91# CONFIG_NUMA is not set 94# CONFIG_NUMA is not set
92# CONFIG_SCHED_SMT is not set 95# CONFIG_SCHED_SMT is not set
93CONFIG_PREEMPT_NONE=y 96CONFIG_PREEMPT_NONE=y
@@ -101,17 +104,16 @@ CONFIG_HZ=250
101CONFIG_GENERIC_HARDIRQS=y 104CONFIG_GENERIC_HARDIRQS=y
102CONFIG_LPARCFG=y 105CONFIG_LPARCFG=y
103CONFIG_SECCOMP=y 106CONFIG_SECCOMP=y
107CONFIG_BINFMT_ELF=y
108# CONFIG_BINFMT_MISC is not set
104CONFIG_ISA_DMA_API=y 109CONFIG_ISA_DMA_API=y
105 110
106# 111#
107# General setup 112# Bus Options
108# 113#
109CONFIG_PCI=y 114CONFIG_PCI=y
110CONFIG_PCI_DOMAINS=y 115CONFIG_PCI_DOMAINS=y
111CONFIG_BINFMT_ELF=y
112# CONFIG_BINFMT_MISC is not set
113CONFIG_PCI_LEGACY_PROC=y 116CONFIG_PCI_LEGACY_PROC=y
114CONFIG_PCI_NAMES=y
115# CONFIG_PCI_DEBUG is not set 117# CONFIG_PCI_DEBUG is not set
116 118
117# 119#
@@ -152,8 +154,8 @@ CONFIG_INET_AH=m
152CONFIG_INET_ESP=m 154CONFIG_INET_ESP=m
153CONFIG_INET_IPCOMP=m 155CONFIG_INET_IPCOMP=m
154CONFIG_INET_TUNNEL=y 156CONFIG_INET_TUNNEL=y
155CONFIG_IP_TCPDIAG=m 157CONFIG_INET_DIAG=y
156# CONFIG_IP_TCPDIAG_IPV6 is not set 158CONFIG_INET_TCP_DIAG=y
157# CONFIG_TCP_CONG_ADVANCED is not set 159# CONFIG_TCP_CONG_ADVANCED is not set
158CONFIG_TCP_CONG_BIC=y 160CONFIG_TCP_CONG_BIC=y
159 161
@@ -164,6 +166,7 @@ CONFIG_TCP_CONG_BIC=y
164# CONFIG_IPV6 is not set 166# CONFIG_IPV6 is not set
165CONFIG_NETFILTER=y 167CONFIG_NETFILTER=y
166# CONFIG_NETFILTER_DEBUG is not set 168# CONFIG_NETFILTER_DEBUG is not set
169# CONFIG_NETFILTER_NETLINK is not set
167 170
168# 171#
169# IP: Netfilter Configuration 172# IP: Netfilter Configuration
@@ -171,11 +174,14 @@ CONFIG_NETFILTER=y
171CONFIG_IP_NF_CONNTRACK=m 174CONFIG_IP_NF_CONNTRACK=m
172CONFIG_IP_NF_CT_ACCT=y 175CONFIG_IP_NF_CT_ACCT=y
173CONFIG_IP_NF_CONNTRACK_MARK=y 176CONFIG_IP_NF_CONNTRACK_MARK=y
177CONFIG_IP_NF_CONNTRACK_EVENTS=y
174CONFIG_IP_NF_CT_PROTO_SCTP=m 178CONFIG_IP_NF_CT_PROTO_SCTP=m
175CONFIG_IP_NF_FTP=m 179CONFIG_IP_NF_FTP=m
176CONFIG_IP_NF_IRC=m 180CONFIG_IP_NF_IRC=m
181# CONFIG_IP_NF_NETBIOS_NS is not set
177CONFIG_IP_NF_TFTP=m 182CONFIG_IP_NF_TFTP=m
178CONFIG_IP_NF_AMANDA=m 183CONFIG_IP_NF_AMANDA=m
184# CONFIG_IP_NF_PPTP is not set
179CONFIG_IP_NF_QUEUE=m 185CONFIG_IP_NF_QUEUE=m
180CONFIG_IP_NF_IPTABLES=m 186CONFIG_IP_NF_IPTABLES=m
181CONFIG_IP_NF_MATCH_LIMIT=m 187CONFIG_IP_NF_MATCH_LIMIT=m
@@ -199,14 +205,18 @@ CONFIG_IP_NF_MATCH_OWNER=m
199CONFIG_IP_NF_MATCH_ADDRTYPE=m 205CONFIG_IP_NF_MATCH_ADDRTYPE=m
200CONFIG_IP_NF_MATCH_REALM=m 206CONFIG_IP_NF_MATCH_REALM=m
201CONFIG_IP_NF_MATCH_SCTP=m 207CONFIG_IP_NF_MATCH_SCTP=m
208# CONFIG_IP_NF_MATCH_DCCP is not set
202CONFIG_IP_NF_MATCH_COMMENT=m 209CONFIG_IP_NF_MATCH_COMMENT=m
203CONFIG_IP_NF_MATCH_CONNMARK=m 210CONFIG_IP_NF_MATCH_CONNMARK=m
211CONFIG_IP_NF_MATCH_CONNBYTES=m
204CONFIG_IP_NF_MATCH_HASHLIMIT=m 212CONFIG_IP_NF_MATCH_HASHLIMIT=m
213CONFIG_IP_NF_MATCH_STRING=m
205CONFIG_IP_NF_FILTER=m 214CONFIG_IP_NF_FILTER=m
206CONFIG_IP_NF_TARGET_REJECT=m 215CONFIG_IP_NF_TARGET_REJECT=m
207CONFIG_IP_NF_TARGET_LOG=m 216CONFIG_IP_NF_TARGET_LOG=m
208CONFIG_IP_NF_TARGET_ULOG=m 217CONFIG_IP_NF_TARGET_ULOG=m
209CONFIG_IP_NF_TARGET_TCPMSS=m 218CONFIG_IP_NF_TARGET_TCPMSS=m
219CONFIG_IP_NF_TARGET_NFQUEUE=m
210CONFIG_IP_NF_NAT=m 220CONFIG_IP_NF_NAT=m
211CONFIG_IP_NF_NAT_NEEDED=y 221CONFIG_IP_NF_NAT_NEEDED=y
212CONFIG_IP_NF_TARGET_MASQUERADE=m 222CONFIG_IP_NF_TARGET_MASQUERADE=m
@@ -224,6 +234,7 @@ CONFIG_IP_NF_TARGET_ECN=m
224CONFIG_IP_NF_TARGET_DSCP=m 234CONFIG_IP_NF_TARGET_DSCP=m
225CONFIG_IP_NF_TARGET_MARK=m 235CONFIG_IP_NF_TARGET_MARK=m
226CONFIG_IP_NF_TARGET_CLASSIFY=m 236CONFIG_IP_NF_TARGET_CLASSIFY=m
237CONFIG_IP_NF_TARGET_TTL=m
227CONFIG_IP_NF_TARGET_CONNMARK=m 238CONFIG_IP_NF_TARGET_CONNMARK=m
228CONFIG_IP_NF_TARGET_CLUSTERIP=m 239CONFIG_IP_NF_TARGET_CLUSTERIP=m
229CONFIG_IP_NF_RAW=m 240CONFIG_IP_NF_RAW=m
@@ -233,6 +244,11 @@ CONFIG_IP_NF_ARPFILTER=m
233CONFIG_IP_NF_ARP_MANGLE=m 244CONFIG_IP_NF_ARP_MANGLE=m
234 245
235# 246#
247# DCCP Configuration (EXPERIMENTAL)
248#
249# CONFIG_IP_DCCP is not set
250
251#
236# SCTP Configuration (EXPERIMENTAL) 252# SCTP Configuration (EXPERIMENTAL)
237# 253#
238# CONFIG_IP_SCTP is not set 254# CONFIG_IP_SCTP is not set
@@ -259,6 +275,7 @@ CONFIG_NET_CLS_ROUTE=y
259# CONFIG_HAMRADIO is not set 275# CONFIG_HAMRADIO is not set
260# CONFIG_IRDA is not set 276# CONFIG_IRDA is not set
261# CONFIG_BT is not set 277# CONFIG_BT is not set
278# CONFIG_IEEE80211 is not set
262 279
263# 280#
264# Device Drivers 281# Device Drivers
@@ -273,6 +290,11 @@ CONFIG_FW_LOADER=m
273# CONFIG_DEBUG_DRIVER is not set 290# CONFIG_DEBUG_DRIVER is not set
274 291
275# 292#
293# Connector - unified userspace <-> kernelspace linker
294#
295# CONFIG_CONNECTOR is not set
296
297#
276# Memory Technology Devices (MTD) 298# Memory Technology Devices (MTD)
277# 299#
278# CONFIG_MTD is not set 300# CONFIG_MTD is not set
@@ -303,7 +325,6 @@ CONFIG_BLK_DEV_RAM=y
303CONFIG_BLK_DEV_RAM_COUNT=16 325CONFIG_BLK_DEV_RAM_COUNT=16
304CONFIG_BLK_DEV_RAM_SIZE=65536 326CONFIG_BLK_DEV_RAM_SIZE=65536
305CONFIG_BLK_DEV_INITRD=y 327CONFIG_BLK_DEV_INITRD=y
306CONFIG_INITRAMFS_SOURCE=""
307# CONFIG_CDROM_PKTCDVD is not set 328# CONFIG_CDROM_PKTCDVD is not set
308 329
309# 330#
@@ -323,6 +344,7 @@ CONFIG_IOSCHED_CFQ=y
323# 344#
324# SCSI device support 345# SCSI device support
325# 346#
347# CONFIG_RAID_ATTRS is not set
326CONFIG_SCSI=y 348CONFIG_SCSI=y
327CONFIG_SCSI_PROC_FS=y 349CONFIG_SCSI_PROC_FS=y
328 350
@@ -350,6 +372,7 @@ CONFIG_SCSI_CONSTANTS=y
350CONFIG_SCSI_SPI_ATTRS=y 372CONFIG_SCSI_SPI_ATTRS=y
351CONFIG_SCSI_FC_ATTRS=y 373CONFIG_SCSI_FC_ATTRS=y
352# CONFIG_SCSI_ISCSI_ATTRS is not set 374# CONFIG_SCSI_ISCSI_ATTRS is not set
375# CONFIG_SCSI_SAS_ATTRS is not set
353 376
354# 377#
355# SCSI low-level drivers 378# SCSI low-level drivers
@@ -363,6 +386,7 @@ CONFIG_SCSI_FC_ATTRS=y
363# CONFIG_SCSI_AIC79XX is not set 386# CONFIG_SCSI_AIC79XX is not set
364# CONFIG_MEGARAID_NEWGEN is not set 387# CONFIG_MEGARAID_NEWGEN is not set
365# CONFIG_MEGARAID_LEGACY is not set 388# CONFIG_MEGARAID_LEGACY is not set
389# CONFIG_MEGARAID_SAS is not set
366# CONFIG_SCSI_SATA is not set 390# CONFIG_SCSI_SATA is not set
367# CONFIG_SCSI_BUSLOGIC is not set 391# CONFIG_SCSI_BUSLOGIC is not set
368# CONFIG_SCSI_DMX3191D is not set 392# CONFIG_SCSI_DMX3191D is not set
@@ -415,6 +439,7 @@ CONFIG_DM_ZERO=m
415# CONFIG_FUSION is not set 439# CONFIG_FUSION is not set
416# CONFIG_FUSION_SPI is not set 440# CONFIG_FUSION_SPI is not set
417# CONFIG_FUSION_FC is not set 441# CONFIG_FUSION_FC is not set
442# CONFIG_FUSION_SAS is not set
418 443
419# 444#
420# IEEE 1394 (FireWire) support 445# IEEE 1394 (FireWire) support
@@ -445,12 +470,18 @@ CONFIG_TUN=m
445# CONFIG_ARCNET is not set 470# CONFIG_ARCNET is not set
446 471
447# 472#
473# PHY device support
474#
475# CONFIG_PHYLIB is not set
476
477#
448# Ethernet (10 or 100Mbit) 478# Ethernet (10 or 100Mbit)
449# 479#
450CONFIG_NET_ETHERNET=y 480CONFIG_NET_ETHERNET=y
451CONFIG_MII=y 481CONFIG_MII=y
452# CONFIG_HAPPYMEAL is not set 482# CONFIG_HAPPYMEAL is not set
453# CONFIG_SUNGEM is not set 483# CONFIG_SUNGEM is not set
484# CONFIG_CASSINI is not set
454# CONFIG_NET_VENDOR_3COM is not set 485# CONFIG_NET_VENDOR_3COM is not set
455 486
456# 487#
@@ -489,6 +520,7 @@ CONFIG_E1000=m
489# CONFIG_HAMACHI is not set 520# CONFIG_HAMACHI is not set
490# CONFIG_YELLOWFIN is not set 521# CONFIG_YELLOWFIN is not set
491# CONFIG_R8169 is not set 522# CONFIG_R8169 is not set
523# CONFIG_SIS190 is not set
492# CONFIG_SKGE is not set 524# CONFIG_SKGE is not set
493# CONFIG_SK98LIN is not set 525# CONFIG_SK98LIN is not set
494# CONFIG_VIA_VELOCITY is not set 526# CONFIG_VIA_VELOCITY is not set
@@ -498,6 +530,7 @@ CONFIG_E1000=m
498# 530#
499# Ethernet (10000 Mbit) 531# Ethernet (10000 Mbit)
500# 532#
533# CONFIG_CHELSIO_T1 is not set
501# CONFIG_IXGB is not set 534# CONFIG_IXGB is not set
502# CONFIG_S2IO is not set 535# CONFIG_S2IO is not set
503 536
@@ -632,7 +665,6 @@ CONFIG_MAX_RAW_DEVS=256
632# I2C support 665# I2C support
633# 666#
634# CONFIG_I2C is not set 667# CONFIG_I2C is not set
635# CONFIG_I2C_SENSOR is not set
636 668
637# 669#
638# Dallas's 1-wire bus 670# Dallas's 1-wire bus
@@ -643,12 +675,17 @@ CONFIG_MAX_RAW_DEVS=256
643# Hardware Monitoring support 675# Hardware Monitoring support
644# 676#
645# CONFIG_HWMON is not set 677# CONFIG_HWMON is not set
678# CONFIG_HWMON_VID is not set
646 679
647# 680#
648# Misc devices 681# Misc devices
649# 682#
650 683
651# 684#
685# Multimedia Capabilities Port drivers
686#
687
688#
652# Multimedia devices 689# Multimedia devices
653# 690#
654# CONFIG_VIDEO_DEV is not set 691# CONFIG_VIDEO_DEV is not set
@@ -722,16 +759,12 @@ CONFIG_JFS_SECURITY=y
722# CONFIG_JFS_DEBUG is not set 759# CONFIG_JFS_DEBUG is not set
723# CONFIG_JFS_STATISTICS is not set 760# CONFIG_JFS_STATISTICS is not set
724CONFIG_FS_POSIX_ACL=y 761CONFIG_FS_POSIX_ACL=y
725
726#
727# XFS support
728#
729CONFIG_XFS_FS=m 762CONFIG_XFS_FS=m
730CONFIG_XFS_EXPORT=y 763CONFIG_XFS_EXPORT=y
731# CONFIG_XFS_RT is not set
732# CONFIG_XFS_QUOTA is not set 764# CONFIG_XFS_QUOTA is not set
733CONFIG_XFS_SECURITY=y 765CONFIG_XFS_SECURITY=y
734CONFIG_XFS_POSIX_ACL=y 766CONFIG_XFS_POSIX_ACL=y
767# CONFIG_XFS_RT is not set
735# CONFIG_MINIX_FS is not set 768# CONFIG_MINIX_FS is not set
736# CONFIG_ROMFS_FS is not set 769# CONFIG_ROMFS_FS is not set
737CONFIG_INOTIFY=y 770CONFIG_INOTIFY=y
@@ -739,6 +772,7 @@ CONFIG_INOTIFY=y
739CONFIG_DNOTIFY=y 772CONFIG_DNOTIFY=y
740CONFIG_AUTOFS_FS=m 773CONFIG_AUTOFS_FS=m
741# CONFIG_AUTOFS4_FS is not set 774# CONFIG_AUTOFS4_FS is not set
775# CONFIG_FUSE_FS is not set
742 776
743# 777#
744# CD-ROM/DVD Filesystems 778# CD-ROM/DVD Filesystems
@@ -766,14 +800,11 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
766CONFIG_PROC_FS=y 800CONFIG_PROC_FS=y
767CONFIG_PROC_KCORE=y 801CONFIG_PROC_KCORE=y
768CONFIG_SYSFS=y 802CONFIG_SYSFS=y
769CONFIG_DEVPTS_FS_XATTR=y
770CONFIG_DEVPTS_FS_SECURITY=y
771CONFIG_TMPFS=y 803CONFIG_TMPFS=y
772CONFIG_TMPFS_XATTR=y
773CONFIG_TMPFS_SECURITY=y
774# CONFIG_HUGETLBFS is not set 804# CONFIG_HUGETLBFS is not set
775# CONFIG_HUGETLB_PAGE is not set 805# CONFIG_HUGETLB_PAGE is not set
776CONFIG_RAMFS=y 806CONFIG_RAMFS=y
807# CONFIG_RELAYFS_FS is not set
777 808
778# 809#
779# Miscellaneous filesystems 810# Miscellaneous filesystems
@@ -824,6 +855,7 @@ CONFIG_CIFS_POSIX=y
824# CONFIG_NCP_FS is not set 855# CONFIG_NCP_FS is not set
825# CONFIG_CODA_FS is not set 856# CONFIG_CODA_FS is not set
826# CONFIG_AFS_FS is not set 857# CONFIG_AFS_FS is not set
858# CONFIG_9P_FS is not set
827 859
828# 860#
829# Partition Types 861# Partition Types
@@ -897,6 +929,7 @@ CONFIG_OPROFILE=y
897CONFIG_DEBUG_KERNEL=y 929CONFIG_DEBUG_KERNEL=y
898CONFIG_MAGIC_SYSRQ=y 930CONFIG_MAGIC_SYSRQ=y
899CONFIG_LOG_BUF_SHIFT=17 931CONFIG_LOG_BUF_SHIFT=17
932CONFIG_DETECT_SOFTLOCKUP=y
900# CONFIG_SCHEDSTATS is not set 933# CONFIG_SCHEDSTATS is not set
901# CONFIG_DEBUG_SLAB is not set 934# CONFIG_DEBUG_SLAB is not set
902# CONFIG_DEBUG_SPINLOCK is not set 935# CONFIG_DEBUG_SPINLOCK is not set
@@ -954,7 +987,12 @@ CONFIG_CRYPTO_TEST=m
954# Library routines 987# Library routines
955# 988#
956CONFIG_CRC_CCITT=m 989CONFIG_CRC_CCITT=m
990# CONFIG_CRC16 is not set
957CONFIG_CRC32=y 991CONFIG_CRC32=y
958CONFIG_LIBCRC32C=m 992CONFIG_LIBCRC32C=m
959CONFIG_ZLIB_INFLATE=y 993CONFIG_ZLIB_INFLATE=y
960CONFIG_ZLIB_DEFLATE=m 994CONFIG_ZLIB_DEFLATE=m
995CONFIG_TEXTSEARCH=y
996CONFIG_TEXTSEARCH_KMP=m
997CONFIG_TEXTSEARCH_BM=m
998CONFIG_TEXTSEARCH_FSM=m
diff --git a/arch/ppc64/configs/maple_defconfig b/arch/ppc64/configs/maple_defconfig
index dd42892cd873..7b480f3d1406 100644
--- a/arch/ppc64/configs/maple_defconfig
+++ b/arch/ppc64/configs/maple_defconfig
@@ -1,17 +1,17 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.13-rc6 3# Linux kernel version: 2.6.14-rc4
4# Mon Aug 8 14:17:04 2005 4# Thu Oct 20 08:31:24 2005
5# 5#
6CONFIG_64BIT=y 6CONFIG_64BIT=y
7CONFIG_MMU=y 7CONFIG_MMU=y
8CONFIG_RWSEM_XCHGADD_ALGORITHM=y 8CONFIG_RWSEM_XCHGADD_ALGORITHM=y
9CONFIG_GENERIC_CALIBRATE_DELAY=y 9CONFIG_GENERIC_CALIBRATE_DELAY=y
10CONFIG_GENERIC_ISA_DMA=y 10CONFIG_GENERIC_ISA_DMA=y
11CONFIG_HAVE_DEC_LOCK=y
12CONFIG_EARLY_PRINTK=y 11CONFIG_EARLY_PRINTK=y
13CONFIG_COMPAT=y 12CONFIG_COMPAT=y
14CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 13CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
14CONFIG_ARCH_MAY_HAVE_PC_FDC=y
15CONFIG_FORCE_MAX_ZONEORDER=13 15CONFIG_FORCE_MAX_ZONEORDER=13
16 16
17# 17#
@@ -26,6 +26,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
26# General setup 26# General setup
27# 27#
28CONFIG_LOCALVERSION="" 28CONFIG_LOCALVERSION=""
29CONFIG_LOCALVERSION_AUTO=y
29CONFIG_SWAP=y 30CONFIG_SWAP=y
30CONFIG_SYSVIPC=y 31CONFIG_SYSVIPC=y
31CONFIG_POSIX_MQUEUE=y 32CONFIG_POSIX_MQUEUE=y
@@ -37,6 +38,7 @@ CONFIG_KOBJECT_UEVENT=y
37CONFIG_IKCONFIG=y 38CONFIG_IKCONFIG=y
38CONFIG_IKCONFIG_PROC=y 39CONFIG_IKCONFIG_PROC=y
39# CONFIG_CPUSETS is not set 40# CONFIG_CPUSETS is not set
41CONFIG_INITRAMFS_SOURCE=""
40# CONFIG_EMBEDDED is not set 42# CONFIG_EMBEDDED is not set
41CONFIG_KALLSYMS=y 43CONFIG_KALLSYMS=y
42CONFIG_KALLSYMS_ALL=y 44CONFIG_KALLSYMS_ALL=y
@@ -97,6 +99,7 @@ CONFIG_FLATMEM_MANUAL=y
97# CONFIG_SPARSEMEM_MANUAL is not set 99# CONFIG_SPARSEMEM_MANUAL is not set
98CONFIG_FLATMEM=y 100CONFIG_FLATMEM=y
99CONFIG_FLAT_NODE_MEM_MAP=y 101CONFIG_FLAT_NODE_MEM_MAP=y
102# CONFIG_SPARSEMEM_STATIC is not set
100# CONFIG_NUMA is not set 103# CONFIG_NUMA is not set
101# CONFIG_SCHED_SMT is not set 104# CONFIG_SCHED_SMT is not set
102CONFIG_PREEMPT_NONE=y 105CONFIG_PREEMPT_NONE=y
@@ -109,17 +112,18 @@ CONFIG_HZ_250=y
109CONFIG_HZ=250 112CONFIG_HZ=250
110CONFIG_GENERIC_HARDIRQS=y 113CONFIG_GENERIC_HARDIRQS=y
111CONFIG_SECCOMP=y 114CONFIG_SECCOMP=y
115CONFIG_BINFMT_ELF=y
116# CONFIG_BINFMT_MISC is not set
117CONFIG_PROC_DEVICETREE=y
118# CONFIG_CMDLINE_BOOL is not set
112CONFIG_ISA_DMA_API=y 119CONFIG_ISA_DMA_API=y
113 120
114# 121#
115# General setup 122# Bus Options
116# 123#
117CONFIG_PCI=y 124CONFIG_PCI=y
118CONFIG_PCI_DOMAINS=y 125CONFIG_PCI_DOMAINS=y
119CONFIG_BINFMT_ELF=y
120# CONFIG_BINFMT_MISC is not set
121CONFIG_PCI_LEGACY_PROC=y 126CONFIG_PCI_LEGACY_PROC=y
122CONFIG_PCI_NAMES=y
123# CONFIG_PCI_DEBUG is not set 127# CONFIG_PCI_DEBUG is not set
124 128
125# 129#
@@ -131,8 +135,6 @@ CONFIG_PCI_NAMES=y
131# PCI Hotplug Support 135# PCI Hotplug Support
132# 136#
133# CONFIG_HOTPLUG_PCI is not set 137# CONFIG_HOTPLUG_PCI is not set
134CONFIG_PROC_DEVICETREE=y
135# CONFIG_CMDLINE_BOOL is not set
136 138
137# 139#
138# Networking 140# Networking
@@ -163,14 +165,19 @@ CONFIG_IP_PNP_DHCP=y
163# CONFIG_INET_ESP is not set 165# CONFIG_INET_ESP is not set
164# CONFIG_INET_IPCOMP is not set 166# CONFIG_INET_IPCOMP is not set
165# CONFIG_INET_TUNNEL is not set 167# CONFIG_INET_TUNNEL is not set
166CONFIG_IP_TCPDIAG=y 168CONFIG_INET_DIAG=y
167# CONFIG_IP_TCPDIAG_IPV6 is not set 169CONFIG_INET_TCP_DIAG=y
168# CONFIG_TCP_CONG_ADVANCED is not set 170# CONFIG_TCP_CONG_ADVANCED is not set
169CONFIG_TCP_CONG_BIC=y 171CONFIG_TCP_CONG_BIC=y
170# CONFIG_IPV6 is not set 172# CONFIG_IPV6 is not set
171# CONFIG_NETFILTER is not set 173# CONFIG_NETFILTER is not set
172 174
173# 175#
176# DCCP Configuration (EXPERIMENTAL)
177#
178# CONFIG_IP_DCCP is not set
179
180#
174# SCTP Configuration (EXPERIMENTAL) 181# SCTP Configuration (EXPERIMENTAL)
175# 182#
176# CONFIG_IP_SCTP is not set 183# CONFIG_IP_SCTP is not set
@@ -196,6 +203,7 @@ CONFIG_TCP_CONG_BIC=y
196# CONFIG_HAMRADIO is not set 203# CONFIG_HAMRADIO is not set
197# CONFIG_IRDA is not set 204# CONFIG_IRDA is not set
198# CONFIG_BT is not set 205# CONFIG_BT is not set
206# CONFIG_IEEE80211 is not set
199 207
200# 208#
201# Device Drivers 209# Device Drivers
@@ -210,6 +218,11 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
210# CONFIG_DEBUG_DRIVER is not set 218# CONFIG_DEBUG_DRIVER is not set
211 219
212# 220#
221# Connector - unified userspace <-> kernelspace linker
222#
223# CONFIG_CONNECTOR is not set
224
225#
213# Memory Technology Devices (MTD) 226# Memory Technology Devices (MTD)
214# 227#
215# CONFIG_MTD is not set 228# CONFIG_MTD is not set
@@ -240,7 +253,6 @@ CONFIG_BLK_DEV_RAM=y
240CONFIG_BLK_DEV_RAM_COUNT=16 253CONFIG_BLK_DEV_RAM_COUNT=16
241CONFIG_BLK_DEV_RAM_SIZE=8192 254CONFIG_BLK_DEV_RAM_SIZE=8192
242# CONFIG_BLK_DEV_INITRD is not set 255# CONFIG_BLK_DEV_INITRD is not set
243CONFIG_INITRAMFS_SOURCE=""
244# CONFIG_CDROM_PKTCDVD is not set 256# CONFIG_CDROM_PKTCDVD is not set
245 257
246# 258#
@@ -313,6 +325,7 @@ CONFIG_IDEDMA_AUTO=y
313# 325#
314# SCSI device support 326# SCSI device support
315# 327#
328# CONFIG_RAID_ATTRS is not set
316# CONFIG_SCSI is not set 329# CONFIG_SCSI is not set
317 330
318# 331#
@@ -354,12 +367,18 @@ CONFIG_NETDEVICES=y
354# CONFIG_ARCNET is not set 367# CONFIG_ARCNET is not set
355 368
356# 369#
370# PHY device support
371#
372# CONFIG_PHYLIB is not set
373
374#
357# Ethernet (10 or 100Mbit) 375# Ethernet (10 or 100Mbit)
358# 376#
359CONFIG_NET_ETHERNET=y 377CONFIG_NET_ETHERNET=y
360CONFIG_MII=y 378CONFIG_MII=y
361# CONFIG_HAPPYMEAL is not set 379# CONFIG_HAPPYMEAL is not set
362# CONFIG_SUNGEM is not set 380# CONFIG_SUNGEM is not set
381# CONFIG_CASSINI is not set
363# CONFIG_NET_VENDOR_3COM is not set 382# CONFIG_NET_VENDOR_3COM is not set
364 383
365# 384#
@@ -398,6 +417,7 @@ CONFIG_E1000=y
398# CONFIG_HAMACHI is not set 417# CONFIG_HAMACHI is not set
399# CONFIG_YELLOWFIN is not set 418# CONFIG_YELLOWFIN is not set
400# CONFIG_R8169 is not set 419# CONFIG_R8169 is not set
420# CONFIG_SIS190 is not set
401# CONFIG_SKGE is not set 421# CONFIG_SKGE is not set
402# CONFIG_SK98LIN is not set 422# CONFIG_SK98LIN is not set
403# CONFIG_VIA_VELOCITY is not set 423# CONFIG_VIA_VELOCITY is not set
@@ -408,6 +428,7 @@ CONFIG_E1000=y
408# 428#
409# Ethernet (10000 Mbit) 429# Ethernet (10000 Mbit)
410# 430#
431# CONFIG_CHELSIO_T1 is not set
411# CONFIG_IXGB is not set 432# CONFIG_IXGB is not set
412# CONFIG_S2IO is not set 433# CONFIG_S2IO is not set
413 434
@@ -553,7 +574,6 @@ CONFIG_I2C_AMD8111=y
553# CONFIG_I2C_I801 is not set 574# CONFIG_I2C_I801 is not set
554# CONFIG_I2C_I810 is not set 575# CONFIG_I2C_I810 is not set
555# CONFIG_I2C_PIIX4 is not set 576# CONFIG_I2C_PIIX4 is not set
556# CONFIG_I2C_ISA is not set
557# CONFIG_I2C_NFORCE2 is not set 577# CONFIG_I2C_NFORCE2 is not set
558# CONFIG_I2C_PARPORT_LIGHT is not set 578# CONFIG_I2C_PARPORT_LIGHT is not set
559# CONFIG_I2C_PROSAVAGE is not set 579# CONFIG_I2C_PROSAVAGE is not set
@@ -567,7 +587,6 @@ CONFIG_I2C_AMD8111=y
567# CONFIG_I2C_VIAPRO is not set 587# CONFIG_I2C_VIAPRO is not set
568# CONFIG_I2C_VOODOO3 is not set 588# CONFIG_I2C_VOODOO3 is not set
569# CONFIG_I2C_PCA_ISA is not set 589# CONFIG_I2C_PCA_ISA is not set
570# CONFIG_I2C_SENSOR is not set
571 590
572# 591#
573# Miscellaneous I2C Chip support 592# Miscellaneous I2C Chip support
@@ -594,12 +613,17 @@ CONFIG_I2C_AMD8111=y
594# Hardware Monitoring support 613# Hardware Monitoring support
595# 614#
596# CONFIG_HWMON is not set 615# CONFIG_HWMON is not set
616# CONFIG_HWMON_VID is not set
597 617
598# 618#
599# Misc devices 619# Misc devices
600# 620#
601 621
602# 622#
623# Multimedia Capabilities Port drivers
624#
625
626#
603# Multimedia devices 627# Multimedia devices
604# 628#
605# CONFIG_VIDEO_DEV is not set 629# CONFIG_VIDEO_DEV is not set
@@ -681,9 +705,11 @@ CONFIG_USB_HIDINPUT=y
681# CONFIG_USB_MTOUCH is not set 705# CONFIG_USB_MTOUCH is not set
682# CONFIG_USB_ITMTOUCH is not set 706# CONFIG_USB_ITMTOUCH is not set
683# CONFIG_USB_EGALAX is not set 707# CONFIG_USB_EGALAX is not set
708# CONFIG_USB_YEALINK is not set
684# CONFIG_USB_XPAD is not set 709# CONFIG_USB_XPAD is not set
685# CONFIG_USB_ATI_REMOTE is not set 710# CONFIG_USB_ATI_REMOTE is not set
686# CONFIG_USB_KEYSPAN_REMOTE is not set 711# CONFIG_USB_KEYSPAN_REMOTE is not set
712# CONFIG_USB_APPLETOUCH is not set
687 713
688# 714#
689# USB Imaging devices 715# USB Imaging devices
@@ -814,10 +840,6 @@ CONFIG_JBD=y
814# CONFIG_REISERFS_FS is not set 840# CONFIG_REISERFS_FS is not set
815# CONFIG_JFS_FS is not set 841# CONFIG_JFS_FS is not set
816CONFIG_FS_POSIX_ACL=y 842CONFIG_FS_POSIX_ACL=y
817
818#
819# XFS support
820#
821# CONFIG_XFS_FS is not set 843# CONFIG_XFS_FS is not set
822# CONFIG_MINIX_FS is not set 844# CONFIG_MINIX_FS is not set
823# CONFIG_ROMFS_FS is not set 845# CONFIG_ROMFS_FS is not set
@@ -826,6 +848,7 @@ CONFIG_INOTIFY=y
826CONFIG_DNOTIFY=y 848CONFIG_DNOTIFY=y
827# CONFIG_AUTOFS_FS is not set 849# CONFIG_AUTOFS_FS is not set
828# CONFIG_AUTOFS4_FS is not set 850# CONFIG_AUTOFS4_FS is not set
851# CONFIG_FUSE_FS is not set
829 852
830# 853#
831# CD-ROM/DVD Filesystems 854# CD-ROM/DVD Filesystems
@@ -849,14 +872,11 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
849CONFIG_PROC_FS=y 872CONFIG_PROC_FS=y
850CONFIG_PROC_KCORE=y 873CONFIG_PROC_KCORE=y
851CONFIG_SYSFS=y 874CONFIG_SYSFS=y
852CONFIG_DEVPTS_FS_XATTR=y
853# CONFIG_DEVPTS_FS_SECURITY is not set
854CONFIG_TMPFS=y 875CONFIG_TMPFS=y
855CONFIG_TMPFS_XATTR=y
856CONFIG_TMPFS_SECURITY=y
857CONFIG_HUGETLBFS=y 876CONFIG_HUGETLBFS=y
858CONFIG_HUGETLB_PAGE=y 877CONFIG_HUGETLB_PAGE=y
859CONFIG_RAMFS=y 878CONFIG_RAMFS=y
879# CONFIG_RELAYFS_FS is not set
860 880
861# 881#
862# Miscellaneous filesystems 882# Miscellaneous filesystems
@@ -898,6 +918,7 @@ CONFIG_RPCSEC_GSS_KRB5=y
898# CONFIG_NCP_FS is not set 918# CONFIG_NCP_FS is not set
899# CONFIG_CODA_FS is not set 919# CONFIG_CODA_FS is not set
900# CONFIG_AFS_FS is not set 920# CONFIG_AFS_FS is not set
921# CONFIG_9P_FS is not set
901 922
902# 923#
903# Partition Types 924# Partition Types
@@ -975,6 +996,7 @@ CONFIG_NLS_UTF8=y
975CONFIG_DEBUG_KERNEL=y 996CONFIG_DEBUG_KERNEL=y
976CONFIG_MAGIC_SYSRQ=y 997CONFIG_MAGIC_SYSRQ=y
977CONFIG_LOG_BUF_SHIFT=17 998CONFIG_LOG_BUF_SHIFT=17
999CONFIG_DETECT_SOFTLOCKUP=y
978# CONFIG_SCHEDSTATS is not set 1000# CONFIG_SCHEDSTATS is not set
979CONFIG_DEBUG_SLAB=y 1001CONFIG_DEBUG_SLAB=y
980# CONFIG_DEBUG_SPINLOCK is not set 1002# CONFIG_DEBUG_SPINLOCK is not set
@@ -1034,6 +1056,7 @@ CONFIG_CRYPTO_DES=y
1034# Library routines 1056# Library routines
1035# 1057#
1036CONFIG_CRC_CCITT=y 1058CONFIG_CRC_CCITT=y
1059# CONFIG_CRC16 is not set
1037CONFIG_CRC32=y 1060CONFIG_CRC32=y
1038# CONFIG_LIBCRC32C is not set 1061# CONFIG_LIBCRC32C is not set
1039CONFIG_ZLIB_INFLATE=y 1062CONFIG_ZLIB_INFLATE=y
diff --git a/arch/ppc64/configs/pSeries_defconfig b/arch/ppc64/configs/pSeries_defconfig
index 29f7b80b0efc..9f09dff9e11a 100644
--- a/arch/ppc64/configs/pSeries_defconfig
+++ b/arch/ppc64/configs/pSeries_defconfig
@@ -1,17 +1,17 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.13-rc6 3# Linux kernel version: 2.6.14-rc4
4# Mon Aug 8 14:17:07 2005 4# Thu Oct 20 08:32:17 2005
5# 5#
6CONFIG_64BIT=y 6CONFIG_64BIT=y
7CONFIG_MMU=y 7CONFIG_MMU=y
8CONFIG_RWSEM_XCHGADD_ALGORITHM=y 8CONFIG_RWSEM_XCHGADD_ALGORITHM=y
9CONFIG_GENERIC_CALIBRATE_DELAY=y 9CONFIG_GENERIC_CALIBRATE_DELAY=y
10CONFIG_GENERIC_ISA_DMA=y 10CONFIG_GENERIC_ISA_DMA=y
11CONFIG_HAVE_DEC_LOCK=y
12CONFIG_EARLY_PRINTK=y 11CONFIG_EARLY_PRINTK=y
13CONFIG_COMPAT=y 12CONFIG_COMPAT=y
14CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 13CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
14CONFIG_ARCH_MAY_HAVE_PC_FDC=y
15CONFIG_FORCE_MAX_ZONEORDER=13 15CONFIG_FORCE_MAX_ZONEORDER=13
16 16
17# 17#
@@ -26,6 +26,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
26# General setup 26# General setup
27# 27#
28CONFIG_LOCALVERSION="" 28CONFIG_LOCALVERSION=""
29CONFIG_LOCALVERSION_AUTO=y
29CONFIG_SWAP=y 30CONFIG_SWAP=y
30CONFIG_SYSVIPC=y 31CONFIG_SYSVIPC=y
31CONFIG_POSIX_MQUEUE=y 32CONFIG_POSIX_MQUEUE=y
@@ -38,6 +39,7 @@ CONFIG_KOBJECT_UEVENT=y
38CONFIG_IKCONFIG=y 39CONFIG_IKCONFIG=y
39CONFIG_IKCONFIG_PROC=y 40CONFIG_IKCONFIG_PROC=y
40CONFIG_CPUSETS=y 41CONFIG_CPUSETS=y
42CONFIG_INITRAMFS_SOURCE=""
41# CONFIG_EMBEDDED is not set 43# CONFIG_EMBEDDED is not set
42CONFIG_KALLSYMS=y 44CONFIG_KALLSYMS=y
43CONFIG_KALLSYMS_ALL=y 45CONFIG_KALLSYMS_ALL=y
@@ -104,6 +106,7 @@ CONFIG_DISCONTIGMEM_MANUAL=y
104CONFIG_DISCONTIGMEM=y 106CONFIG_DISCONTIGMEM=y
105CONFIG_FLAT_NODE_MEM_MAP=y 107CONFIG_FLAT_NODE_MEM_MAP=y
106CONFIG_NEED_MULTIPLE_NODES=y 108CONFIG_NEED_MULTIPLE_NODES=y
109# CONFIG_SPARSEMEM_STATIC is not set
107CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y 110CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
108CONFIG_NODES_SPAN_OTHER_NODES=y 111CONFIG_NODES_SPAN_OTHER_NODES=y
109CONFIG_NUMA=y 112CONFIG_NUMA=y
@@ -124,19 +127,20 @@ CONFIG_RTAS_FLASH=m
124CONFIG_SCANLOG=m 127CONFIG_SCANLOG=m
125CONFIG_LPARCFG=y 128CONFIG_LPARCFG=y
126CONFIG_SECCOMP=y 129CONFIG_SECCOMP=y
130CONFIG_BINFMT_ELF=y
131# CONFIG_BINFMT_MISC is not set
132CONFIG_HOTPLUG_CPU=y
133CONFIG_PROC_DEVICETREE=y
134# CONFIG_CMDLINE_BOOL is not set
127CONFIG_ISA_DMA_API=y 135CONFIG_ISA_DMA_API=y
128 136
129# 137#
130# General setup 138# Bus Options
131# 139#
132CONFIG_PCI=y 140CONFIG_PCI=y
133CONFIG_PCI_DOMAINS=y 141CONFIG_PCI_DOMAINS=y
134CONFIG_BINFMT_ELF=y
135# CONFIG_BINFMT_MISC is not set
136CONFIG_PCI_LEGACY_PROC=y 142CONFIG_PCI_LEGACY_PROC=y
137CONFIG_PCI_NAMES=y
138# CONFIG_PCI_DEBUG is not set 143# CONFIG_PCI_DEBUG is not set
139CONFIG_HOTPLUG_CPU=y
140 144
141# 145#
142# PCCARD (PCMCIA/CardBus) support 146# PCCARD (PCMCIA/CardBus) support
@@ -152,8 +156,6 @@ CONFIG_HOTPLUG_PCI=m
152# CONFIG_HOTPLUG_PCI_SHPC is not set 156# CONFIG_HOTPLUG_PCI_SHPC is not set
153CONFIG_HOTPLUG_PCI_RPA=m 157CONFIG_HOTPLUG_PCI_RPA=m
154CONFIG_HOTPLUG_PCI_RPA_DLPAR=m 158CONFIG_HOTPLUG_PCI_RPA_DLPAR=m
155CONFIG_PROC_DEVICETREE=y
156# CONFIG_CMDLINE_BOOL is not set
157 159
158# 160#
159# Networking 161# Networking
@@ -183,8 +185,8 @@ CONFIG_INET_AH=m
183CONFIG_INET_ESP=m 185CONFIG_INET_ESP=m
184CONFIG_INET_IPCOMP=m 186CONFIG_INET_IPCOMP=m
185CONFIG_INET_TUNNEL=y 187CONFIG_INET_TUNNEL=y
186CONFIG_IP_TCPDIAG=m 188CONFIG_INET_DIAG=y
187# CONFIG_IP_TCPDIAG_IPV6 is not set 189CONFIG_INET_TCP_DIAG=y
188# CONFIG_TCP_CONG_ADVANCED is not set 190# CONFIG_TCP_CONG_ADVANCED is not set
189CONFIG_TCP_CONG_BIC=y 191CONFIG_TCP_CONG_BIC=y
190 192
@@ -195,6 +197,9 @@ CONFIG_TCP_CONG_BIC=y
195# CONFIG_IPV6 is not set 197# CONFIG_IPV6 is not set
196CONFIG_NETFILTER=y 198CONFIG_NETFILTER=y
197# CONFIG_NETFILTER_DEBUG is not set 199# CONFIG_NETFILTER_DEBUG is not set
200CONFIG_NETFILTER_NETLINK=y
201CONFIG_NETFILTER_NETLINK_QUEUE=m
202CONFIG_NETFILTER_NETLINK_LOG=m
198 203
199# 204#
200# IP: Netfilter Configuration 205# IP: Netfilter Configuration
@@ -202,11 +207,15 @@ CONFIG_NETFILTER=y
202CONFIG_IP_NF_CONNTRACK=m 207CONFIG_IP_NF_CONNTRACK=m
203CONFIG_IP_NF_CT_ACCT=y 208CONFIG_IP_NF_CT_ACCT=y
204CONFIG_IP_NF_CONNTRACK_MARK=y 209CONFIG_IP_NF_CONNTRACK_MARK=y
210CONFIG_IP_NF_CONNTRACK_EVENTS=y
211CONFIG_IP_NF_CONNTRACK_NETLINK=m
205CONFIG_IP_NF_CT_PROTO_SCTP=m 212CONFIG_IP_NF_CT_PROTO_SCTP=m
206CONFIG_IP_NF_FTP=m 213CONFIG_IP_NF_FTP=m
207CONFIG_IP_NF_IRC=m 214CONFIG_IP_NF_IRC=m
215# CONFIG_IP_NF_NETBIOS_NS is not set
208CONFIG_IP_NF_TFTP=m 216CONFIG_IP_NF_TFTP=m
209CONFIG_IP_NF_AMANDA=m 217CONFIG_IP_NF_AMANDA=m
218# CONFIG_IP_NF_PPTP is not set
210CONFIG_IP_NF_QUEUE=m 219CONFIG_IP_NF_QUEUE=m
211CONFIG_IP_NF_IPTABLES=m 220CONFIG_IP_NF_IPTABLES=m
212CONFIG_IP_NF_MATCH_LIMIT=m 221CONFIG_IP_NF_MATCH_LIMIT=m
@@ -230,14 +239,18 @@ CONFIG_IP_NF_MATCH_OWNER=m
230CONFIG_IP_NF_MATCH_ADDRTYPE=m 239CONFIG_IP_NF_MATCH_ADDRTYPE=m
231CONFIG_IP_NF_MATCH_REALM=m 240CONFIG_IP_NF_MATCH_REALM=m
232CONFIG_IP_NF_MATCH_SCTP=m 241CONFIG_IP_NF_MATCH_SCTP=m
242# CONFIG_IP_NF_MATCH_DCCP is not set
233CONFIG_IP_NF_MATCH_COMMENT=m 243CONFIG_IP_NF_MATCH_COMMENT=m
234CONFIG_IP_NF_MATCH_CONNMARK=m 244CONFIG_IP_NF_MATCH_CONNMARK=m
245CONFIG_IP_NF_MATCH_CONNBYTES=m
235CONFIG_IP_NF_MATCH_HASHLIMIT=m 246CONFIG_IP_NF_MATCH_HASHLIMIT=m
247CONFIG_IP_NF_MATCH_STRING=m
236CONFIG_IP_NF_FILTER=m 248CONFIG_IP_NF_FILTER=m
237CONFIG_IP_NF_TARGET_REJECT=m 249CONFIG_IP_NF_TARGET_REJECT=m
238CONFIG_IP_NF_TARGET_LOG=m 250CONFIG_IP_NF_TARGET_LOG=m
239CONFIG_IP_NF_TARGET_ULOG=m 251CONFIG_IP_NF_TARGET_ULOG=m
240CONFIG_IP_NF_TARGET_TCPMSS=m 252CONFIG_IP_NF_TARGET_TCPMSS=m
253CONFIG_IP_NF_TARGET_NFQUEUE=m
241CONFIG_IP_NF_NAT=m 254CONFIG_IP_NF_NAT=m
242CONFIG_IP_NF_NAT_NEEDED=y 255CONFIG_IP_NF_NAT_NEEDED=y
243CONFIG_IP_NF_TARGET_MASQUERADE=m 256CONFIG_IP_NF_TARGET_MASQUERADE=m
@@ -255,6 +268,7 @@ CONFIG_IP_NF_TARGET_ECN=m
255CONFIG_IP_NF_TARGET_DSCP=m 268CONFIG_IP_NF_TARGET_DSCP=m
256CONFIG_IP_NF_TARGET_MARK=m 269CONFIG_IP_NF_TARGET_MARK=m
257CONFIG_IP_NF_TARGET_CLASSIFY=m 270CONFIG_IP_NF_TARGET_CLASSIFY=m
271CONFIG_IP_NF_TARGET_TTL=m
258CONFIG_IP_NF_TARGET_CONNMARK=m 272CONFIG_IP_NF_TARGET_CONNMARK=m
259CONFIG_IP_NF_TARGET_CLUSTERIP=m 273CONFIG_IP_NF_TARGET_CLUSTERIP=m
260CONFIG_IP_NF_RAW=m 274CONFIG_IP_NF_RAW=m
@@ -264,6 +278,11 @@ CONFIG_IP_NF_ARPFILTER=m
264CONFIG_IP_NF_ARP_MANGLE=m 278CONFIG_IP_NF_ARP_MANGLE=m
265 279
266# 280#
281# DCCP Configuration (EXPERIMENTAL)
282#
283# CONFIG_IP_DCCP is not set
284
285#
267# SCTP Configuration (EXPERIMENTAL) 286# SCTP Configuration (EXPERIMENTAL)
268# 287#
269# CONFIG_IP_SCTP is not set 288# CONFIG_IP_SCTP is not set
@@ -290,6 +309,7 @@ CONFIG_NET_CLS_ROUTE=y
290# CONFIG_HAMRADIO is not set 309# CONFIG_HAMRADIO is not set
291# CONFIG_IRDA is not set 310# CONFIG_IRDA is not set
292# CONFIG_BT is not set 311# CONFIG_BT is not set
312# CONFIG_IEEE80211 is not set
293 313
294# 314#
295# Device Drivers 315# Device Drivers
@@ -304,6 +324,11 @@ CONFIG_FW_LOADER=y
304# CONFIG_DEBUG_DRIVER is not set 324# CONFIG_DEBUG_DRIVER is not set
305 325
306# 326#
327# Connector - unified userspace <-> kernelspace linker
328#
329# CONFIG_CONNECTOR is not set
330
331#
307# Memory Technology Devices (MTD) 332# Memory Technology Devices (MTD)
308# 333#
309# CONFIG_MTD is not set 334# CONFIG_MTD is not set
@@ -342,7 +367,6 @@ CONFIG_BLK_DEV_RAM=y
342CONFIG_BLK_DEV_RAM_COUNT=16 367CONFIG_BLK_DEV_RAM_COUNT=16
343CONFIG_BLK_DEV_RAM_SIZE=65536 368CONFIG_BLK_DEV_RAM_SIZE=65536
344CONFIG_BLK_DEV_INITRD=y 369CONFIG_BLK_DEV_INITRD=y
345CONFIG_INITRAMFS_SOURCE=""
346# CONFIG_CDROM_PKTCDVD is not set 370# CONFIG_CDROM_PKTCDVD is not set
347 371
348# 372#
@@ -416,6 +440,7 @@ CONFIG_IDEDMA_AUTO=y
416# 440#
417# SCSI device support 441# SCSI device support
418# 442#
443# CONFIG_RAID_ATTRS is not set
419CONFIG_SCSI=y 444CONFIG_SCSI=y
420CONFIG_SCSI_PROC_FS=y 445CONFIG_SCSI_PROC_FS=y
421 446
@@ -443,6 +468,7 @@ CONFIG_SCSI_CONSTANTS=y
443CONFIG_SCSI_SPI_ATTRS=y 468CONFIG_SCSI_SPI_ATTRS=y
444CONFIG_SCSI_FC_ATTRS=y 469CONFIG_SCSI_FC_ATTRS=y
445CONFIG_SCSI_ISCSI_ATTRS=m 470CONFIG_SCSI_ISCSI_ATTRS=m
471# CONFIG_SCSI_SAS_ATTRS is not set
446 472
447# 473#
448# SCSI low-level drivers 474# SCSI low-level drivers
@@ -456,6 +482,7 @@ CONFIG_SCSI_ISCSI_ATTRS=m
456# CONFIG_SCSI_AIC79XX is not set 482# CONFIG_SCSI_AIC79XX is not set
457# CONFIG_MEGARAID_NEWGEN is not set 483# CONFIG_MEGARAID_NEWGEN is not set
458# CONFIG_MEGARAID_LEGACY is not set 484# CONFIG_MEGARAID_LEGACY is not set
485# CONFIG_MEGARAID_SAS is not set
459# CONFIG_SCSI_SATA is not set 486# CONFIG_SCSI_SATA is not set
460# CONFIG_SCSI_BUSLOGIC is not set 487# CONFIG_SCSI_BUSLOGIC is not set
461# CONFIG_SCSI_DMX3191D is not set 488# CONFIG_SCSI_DMX3191D is not set
@@ -517,6 +544,7 @@ CONFIG_DM_MULTIPATH_EMC=m
517# CONFIG_FUSION is not set 544# CONFIG_FUSION is not set
518# CONFIG_FUSION_SPI is not set 545# CONFIG_FUSION_SPI is not set
519# CONFIG_FUSION_FC is not set 546# CONFIG_FUSION_FC is not set
547# CONFIG_FUSION_SAS is not set
520 548
521# 549#
522# IEEE 1394 (FireWire) support 550# IEEE 1394 (FireWire) support
@@ -547,12 +575,18 @@ CONFIG_TUN=m
547# CONFIG_ARCNET is not set 575# CONFIG_ARCNET is not set
548 576
549# 577#
578# PHY device support
579#
580# CONFIG_PHYLIB is not set
581
582#
550# Ethernet (10 or 100Mbit) 583# Ethernet (10 or 100Mbit)
551# 584#
552CONFIG_NET_ETHERNET=y 585CONFIG_NET_ETHERNET=y
553CONFIG_MII=y 586CONFIG_MII=y
554# CONFIG_HAPPYMEAL is not set 587# CONFIG_HAPPYMEAL is not set
555# CONFIG_SUNGEM is not set 588# CONFIG_SUNGEM is not set
589# CONFIG_CASSINI is not set
556CONFIG_NET_VENDOR_3COM=y 590CONFIG_NET_VENDOR_3COM=y
557CONFIG_VORTEX=y 591CONFIG_VORTEX=y
558# CONFIG_TYPHOON is not set 592# CONFIG_TYPHOON is not set
@@ -581,6 +615,7 @@ CONFIG_E100=y
581# CONFIG_EPIC100 is not set 615# CONFIG_EPIC100 is not set
582# CONFIG_SUNDANCE is not set 616# CONFIG_SUNDANCE is not set
583# CONFIG_VIA_RHINE is not set 617# CONFIG_VIA_RHINE is not set
618# CONFIG_NET_POCKET is not set
584 619
585# 620#
586# Ethernet (1000 Mbit) 621# Ethernet (1000 Mbit)
@@ -594,6 +629,7 @@ CONFIG_E1000=y
594# CONFIG_HAMACHI is not set 629# CONFIG_HAMACHI is not set
595# CONFIG_YELLOWFIN is not set 630# CONFIG_YELLOWFIN is not set
596# CONFIG_R8169 is not set 631# CONFIG_R8169 is not set
632# CONFIG_SIS190 is not set
597# CONFIG_SKGE is not set 633# CONFIG_SKGE is not set
598# CONFIG_SK98LIN is not set 634# CONFIG_SK98LIN is not set
599# CONFIG_VIA_VELOCITY is not set 635# CONFIG_VIA_VELOCITY is not set
@@ -604,6 +640,7 @@ CONFIG_TIGON3=y
604# 640#
605# Ethernet (10000 Mbit) 641# Ethernet (10000 Mbit)
606# 642#
643# CONFIG_CHELSIO_T1 is not set
607CONFIG_IXGB=m 644CONFIG_IXGB=m
608# CONFIG_IXGB_NAPI is not set 645# CONFIG_IXGB_NAPI is not set
609CONFIG_S2IO=m 646CONFIG_S2IO=m
@@ -789,7 +826,6 @@ CONFIG_I2C_ALGOBIT=y
789# CONFIG_I2C_I801 is not set 826# CONFIG_I2C_I801 is not set
790# CONFIG_I2C_I810 is not set 827# CONFIG_I2C_I810 is not set
791# CONFIG_I2C_PIIX4 is not set 828# CONFIG_I2C_PIIX4 is not set
792# CONFIG_I2C_ISA is not set
793# CONFIG_I2C_NFORCE2 is not set 829# CONFIG_I2C_NFORCE2 is not set
794# CONFIG_I2C_PARPORT is not set 830# CONFIG_I2C_PARPORT is not set
795# CONFIG_I2C_PARPORT_LIGHT is not set 831# CONFIG_I2C_PARPORT_LIGHT is not set
@@ -804,7 +840,6 @@ CONFIG_I2C_ALGOBIT=y
804# CONFIG_I2C_VIAPRO is not set 840# CONFIG_I2C_VIAPRO is not set
805# CONFIG_I2C_VOODOO3 is not set 841# CONFIG_I2C_VOODOO3 is not set
806# CONFIG_I2C_PCA_ISA is not set 842# CONFIG_I2C_PCA_ISA is not set
807# CONFIG_I2C_SENSOR is not set
808 843
809# 844#
810# Miscellaneous I2C Chip support 845# Miscellaneous I2C Chip support
@@ -831,12 +866,17 @@ CONFIG_I2C_ALGOBIT=y
831# Hardware Monitoring support 866# Hardware Monitoring support
832# 867#
833# CONFIG_HWMON is not set 868# CONFIG_HWMON is not set
869# CONFIG_HWMON_VID is not set
834 870
835# 871#
836# Misc devices 872# Misc devices
837# 873#
838 874
839# 875#
876# Multimedia Capabilities Port drivers
877#
878
879#
840# Multimedia devices 880# Multimedia devices
841# 881#
842# CONFIG_VIDEO_DEV is not set 882# CONFIG_VIDEO_DEV is not set
@@ -885,6 +925,7 @@ CONFIG_FB_RADEON_I2C=y
885# CONFIG_FB_KYRO is not set 925# CONFIG_FB_KYRO is not set
886# CONFIG_FB_3DFX is not set 926# CONFIG_FB_3DFX is not set
887# CONFIG_FB_VOODOO1 is not set 927# CONFIG_FB_VOODOO1 is not set
928# CONFIG_FB_CYBLA is not set
888# CONFIG_FB_TRIDENT is not set 929# CONFIG_FB_TRIDENT is not set
889# CONFIG_FB_S1D13XXX is not set 930# CONFIG_FB_S1D13XXX is not set
890# CONFIG_FB_VIRTUAL is not set 931# CONFIG_FB_VIRTUAL is not set
@@ -982,9 +1023,11 @@ CONFIG_USB_HIDDEV=y
982# CONFIG_USB_MTOUCH is not set 1023# CONFIG_USB_MTOUCH is not set
983# CONFIG_USB_ITMTOUCH is not set 1024# CONFIG_USB_ITMTOUCH is not set
984# CONFIG_USB_EGALAX is not set 1025# CONFIG_USB_EGALAX is not set
1026# CONFIG_USB_YEALINK is not set
985# CONFIG_USB_XPAD is not set 1027# CONFIG_USB_XPAD is not set
986# CONFIG_USB_ATI_REMOTE is not set 1028# CONFIG_USB_ATI_REMOTE is not set
987# CONFIG_USB_KEYSPAN_REMOTE is not set 1029# CONFIG_USB_KEYSPAN_REMOTE is not set
1030# CONFIG_USB_APPLETOUCH is not set
988 1031
989# 1032#
990# USB Imaging devices 1033# USB Imaging devices
@@ -1057,7 +1100,8 @@ CONFIG_USB_MON=y
1057# InfiniBand support 1100# InfiniBand support
1058# 1101#
1059CONFIG_INFINIBAND=m 1102CONFIG_INFINIBAND=m
1060CONFIG_INFINIBAND_USER_VERBS=m 1103# CONFIG_INFINIBAND_USER_MAD is not set
1104# CONFIG_INFINIBAND_USER_ACCESS is not set
1061CONFIG_INFINIBAND_MTHCA=m 1105CONFIG_INFINIBAND_MTHCA=m
1062# CONFIG_INFINIBAND_MTHCA_DEBUG is not set 1106# CONFIG_INFINIBAND_MTHCA_DEBUG is not set
1063CONFIG_INFINIBAND_IPOIB=m 1107CONFIG_INFINIBAND_IPOIB=m
@@ -1095,16 +1139,12 @@ CONFIG_JFS_SECURITY=y
1095# CONFIG_JFS_DEBUG is not set 1139# CONFIG_JFS_DEBUG is not set
1096# CONFIG_JFS_STATISTICS is not set 1140# CONFIG_JFS_STATISTICS is not set
1097CONFIG_FS_POSIX_ACL=y 1141CONFIG_FS_POSIX_ACL=y
1098
1099#
1100# XFS support
1101#
1102CONFIG_XFS_FS=m 1142CONFIG_XFS_FS=m
1103CONFIG_XFS_EXPORT=y 1143CONFIG_XFS_EXPORT=y
1104# CONFIG_XFS_RT is not set
1105# CONFIG_XFS_QUOTA is not set 1144# CONFIG_XFS_QUOTA is not set
1106CONFIG_XFS_SECURITY=y 1145CONFIG_XFS_SECURITY=y
1107CONFIG_XFS_POSIX_ACL=y 1146CONFIG_XFS_POSIX_ACL=y
1147# CONFIG_XFS_RT is not set
1108# CONFIG_MINIX_FS is not set 1148# CONFIG_MINIX_FS is not set
1109# CONFIG_ROMFS_FS is not set 1149# CONFIG_ROMFS_FS is not set
1110CONFIG_INOTIFY=y 1150CONFIG_INOTIFY=y
@@ -1112,6 +1152,7 @@ CONFIG_INOTIFY=y
1112CONFIG_DNOTIFY=y 1152CONFIG_DNOTIFY=y
1113CONFIG_AUTOFS_FS=m 1153CONFIG_AUTOFS_FS=m
1114# CONFIG_AUTOFS4_FS is not set 1154# CONFIG_AUTOFS4_FS is not set
1155# CONFIG_FUSE_FS is not set
1115 1156
1116# 1157#
1117# CD-ROM/DVD Filesystems 1158# CD-ROM/DVD Filesystems
@@ -1139,14 +1180,11 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1139CONFIG_PROC_FS=y 1180CONFIG_PROC_FS=y
1140CONFIG_PROC_KCORE=y 1181CONFIG_PROC_KCORE=y
1141CONFIG_SYSFS=y 1182CONFIG_SYSFS=y
1142CONFIG_DEVPTS_FS_XATTR=y
1143CONFIG_DEVPTS_FS_SECURITY=y
1144CONFIG_TMPFS=y 1183CONFIG_TMPFS=y
1145CONFIG_TMPFS_XATTR=y
1146CONFIG_TMPFS_SECURITY=y
1147CONFIG_HUGETLBFS=y 1184CONFIG_HUGETLBFS=y
1148CONFIG_HUGETLB_PAGE=y 1185CONFIG_HUGETLB_PAGE=y
1149CONFIG_RAMFS=y 1186CONFIG_RAMFS=y
1187# CONFIG_RELAYFS_FS is not set
1150 1188
1151# 1189#
1152# Miscellaneous filesystems 1190# Miscellaneous filesystems
@@ -1197,6 +1235,7 @@ CONFIG_CIFS_POSIX=y
1197# CONFIG_NCP_FS is not set 1235# CONFIG_NCP_FS is not set
1198# CONFIG_CODA_FS is not set 1236# CONFIG_CODA_FS is not set
1199# CONFIG_AFS_FS is not set 1237# CONFIG_AFS_FS is not set
1238# CONFIG_9P_FS is not set
1200 1239
1201# 1240#
1202# Partition Types 1241# Partition Types
@@ -1261,6 +1300,7 @@ CONFIG_OPROFILE=y
1261CONFIG_DEBUG_KERNEL=y 1300CONFIG_DEBUG_KERNEL=y
1262CONFIG_MAGIC_SYSRQ=y 1301CONFIG_MAGIC_SYSRQ=y
1263CONFIG_LOG_BUF_SHIFT=17 1302CONFIG_LOG_BUF_SHIFT=17
1303CONFIG_DETECT_SOFTLOCKUP=y
1264# CONFIG_SCHEDSTATS is not set 1304# CONFIG_SCHEDSTATS is not set
1265# CONFIG_DEBUG_SLAB is not set 1305# CONFIG_DEBUG_SLAB is not set
1266# CONFIG_DEBUG_SPINLOCK is not set 1306# CONFIG_DEBUG_SPINLOCK is not set
@@ -1320,7 +1360,12 @@ CONFIG_CRYPTO_TEST=m
1320# Library routines 1360# Library routines
1321# 1361#
1322CONFIG_CRC_CCITT=m 1362CONFIG_CRC_CCITT=m
1363# CONFIG_CRC16 is not set
1323CONFIG_CRC32=y 1364CONFIG_CRC32=y
1324CONFIG_LIBCRC32C=m 1365CONFIG_LIBCRC32C=m
1325CONFIG_ZLIB_INFLATE=y 1366CONFIG_ZLIB_INFLATE=y
1326CONFIG_ZLIB_DEFLATE=m 1367CONFIG_ZLIB_DEFLATE=m
1368CONFIG_TEXTSEARCH=y
1369CONFIG_TEXTSEARCH_KMP=m
1370CONFIG_TEXTSEARCH_BM=m
1371CONFIG_TEXTSEARCH_FSM=m
diff --git a/arch/ppc64/defconfig b/arch/ppc64/defconfig
index 7cb4750bb7a9..37c157c93cef 100644
--- a/arch/ppc64/defconfig
+++ b/arch/ppc64/defconfig
@@ -1,17 +1,17 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.13-rc6 3# Linux kernel version: 2.6.14-rc4
4# Mon Aug 8 14:16:54 2005 4# Thu Oct 20 08:28:33 2005
5# 5#
6CONFIG_64BIT=y 6CONFIG_64BIT=y
7CONFIG_MMU=y 7CONFIG_MMU=y
8CONFIG_RWSEM_XCHGADD_ALGORITHM=y 8CONFIG_RWSEM_XCHGADD_ALGORITHM=y
9CONFIG_GENERIC_CALIBRATE_DELAY=y 9CONFIG_GENERIC_CALIBRATE_DELAY=y
10CONFIG_GENERIC_ISA_DMA=y 10CONFIG_GENERIC_ISA_DMA=y
11CONFIG_HAVE_DEC_LOCK=y
12CONFIG_EARLY_PRINTK=y 11CONFIG_EARLY_PRINTK=y
13CONFIG_COMPAT=y 12CONFIG_COMPAT=y
14CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y 13CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
14CONFIG_ARCH_MAY_HAVE_PC_FDC=y
15CONFIG_FORCE_MAX_ZONEORDER=13 15CONFIG_FORCE_MAX_ZONEORDER=13
16 16
17# 17#
@@ -26,6 +26,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
26# General setup 26# General setup
27# 27#
28CONFIG_LOCALVERSION="" 28CONFIG_LOCALVERSION=""
29CONFIG_LOCALVERSION_AUTO=y
29CONFIG_SWAP=y 30CONFIG_SWAP=y
30CONFIG_SYSVIPC=y 31CONFIG_SYSVIPC=y
31CONFIG_POSIX_MQUEUE=y 32CONFIG_POSIX_MQUEUE=y
@@ -37,6 +38,7 @@ CONFIG_KOBJECT_UEVENT=y
37CONFIG_IKCONFIG=y 38CONFIG_IKCONFIG=y
38CONFIG_IKCONFIG_PROC=y 39CONFIG_IKCONFIG_PROC=y
39CONFIG_CPUSETS=y 40CONFIG_CPUSETS=y
41CONFIG_INITRAMFS_SOURCE=""
40# CONFIG_EMBEDDED is not set 42# CONFIG_EMBEDDED is not set
41CONFIG_KALLSYMS=y 43CONFIG_KALLSYMS=y
42# CONFIG_KALLSYMS_ALL is not set 44# CONFIG_KALLSYMS_ALL is not set
@@ -106,6 +108,7 @@ CONFIG_DISCONTIGMEM_MANUAL=y
106CONFIG_DISCONTIGMEM=y 108CONFIG_DISCONTIGMEM=y
107CONFIG_FLAT_NODE_MEM_MAP=y 109CONFIG_FLAT_NODE_MEM_MAP=y
108CONFIG_NEED_MULTIPLE_NODES=y 110CONFIG_NEED_MULTIPLE_NODES=y
111# CONFIG_SPARSEMEM_STATIC is not set
109CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y 112CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
110CONFIG_NODES_SPAN_OTHER_NODES=y 113CONFIG_NODES_SPAN_OTHER_NODES=y
111# CONFIG_NUMA is not set 114# CONFIG_NUMA is not set
@@ -126,19 +129,20 @@ CONFIG_RTAS_FLASH=m
126CONFIG_SCANLOG=m 129CONFIG_SCANLOG=m
127CONFIG_LPARCFG=y 130CONFIG_LPARCFG=y
128CONFIG_SECCOMP=y 131CONFIG_SECCOMP=y
132CONFIG_BINFMT_ELF=y
133CONFIG_BINFMT_MISC=m
134CONFIG_HOTPLUG_CPU=y
135CONFIG_PROC_DEVICETREE=y
136# CONFIG_CMDLINE_BOOL is not set
129CONFIG_ISA_DMA_API=y 137CONFIG_ISA_DMA_API=y
130 138
131# 139#
132# General setup 140# Bus Options
133# 141#
134CONFIG_PCI=y 142CONFIG_PCI=y
135CONFIG_PCI_DOMAINS=y 143CONFIG_PCI_DOMAINS=y
136CONFIG_BINFMT_ELF=y
137CONFIG_BINFMT_MISC=m
138# CONFIG_PCI_LEGACY_PROC is not set 144# CONFIG_PCI_LEGACY_PROC is not set
139# CONFIG_PCI_NAMES is not set
140# CONFIG_PCI_DEBUG is not set 145# CONFIG_PCI_DEBUG is not set
141CONFIG_HOTPLUG_CPU=y
142 146
143# 147#
144# PCCARD (PCMCIA/CardBus) support 148# PCCARD (PCMCIA/CardBus) support
@@ -154,8 +158,6 @@ CONFIG_HOTPLUG_PCI=m
154# CONFIG_HOTPLUG_PCI_SHPC is not set 158# CONFIG_HOTPLUG_PCI_SHPC is not set
155CONFIG_HOTPLUG_PCI_RPA=m 159CONFIG_HOTPLUG_PCI_RPA=m
156CONFIG_HOTPLUG_PCI_RPA_DLPAR=m 160CONFIG_HOTPLUG_PCI_RPA_DLPAR=m
157CONFIG_PROC_DEVICETREE=y
158# CONFIG_CMDLINE_BOOL is not set
159 161
160# 162#
161# Networking 163# Networking
@@ -185,8 +187,8 @@ CONFIG_INET_AH=m
185CONFIG_INET_ESP=m 187CONFIG_INET_ESP=m
186CONFIG_INET_IPCOMP=m 188CONFIG_INET_IPCOMP=m
187CONFIG_INET_TUNNEL=y 189CONFIG_INET_TUNNEL=y
188# CONFIG_IP_TCPDIAG is not set 190CONFIG_INET_DIAG=y
189# CONFIG_IP_TCPDIAG_IPV6 is not set 191CONFIG_INET_TCP_DIAG=y
190# CONFIG_TCP_CONG_ADVANCED is not set 192# CONFIG_TCP_CONG_ADVANCED is not set
191CONFIG_TCP_CONG_BIC=y 193CONFIG_TCP_CONG_BIC=y
192 194
@@ -197,6 +199,9 @@ CONFIG_TCP_CONG_BIC=y
197# CONFIG_IPV6 is not set 199# CONFIG_IPV6 is not set
198CONFIG_NETFILTER=y 200CONFIG_NETFILTER=y
199# CONFIG_NETFILTER_DEBUG is not set 201# CONFIG_NETFILTER_DEBUG is not set
202CONFIG_NETFILTER_NETLINK=y
203CONFIG_NETFILTER_NETLINK_QUEUE=m
204CONFIG_NETFILTER_NETLINK_LOG=m
200 205
201# 206#
202# IP: Netfilter Configuration 207# IP: Netfilter Configuration
@@ -204,11 +209,15 @@ CONFIG_NETFILTER=y
204CONFIG_IP_NF_CONNTRACK=m 209CONFIG_IP_NF_CONNTRACK=m
205CONFIG_IP_NF_CT_ACCT=y 210CONFIG_IP_NF_CT_ACCT=y
206CONFIG_IP_NF_CONNTRACK_MARK=y 211CONFIG_IP_NF_CONNTRACK_MARK=y
212CONFIG_IP_NF_CONNTRACK_EVENTS=y
213CONFIG_IP_NF_CONNTRACK_NETLINK=m
207CONFIG_IP_NF_CT_PROTO_SCTP=m 214CONFIG_IP_NF_CT_PROTO_SCTP=m
208CONFIG_IP_NF_FTP=m 215CONFIG_IP_NF_FTP=m
209CONFIG_IP_NF_IRC=m 216CONFIG_IP_NF_IRC=m
217# CONFIG_IP_NF_NETBIOS_NS is not set
210CONFIG_IP_NF_TFTP=m 218CONFIG_IP_NF_TFTP=m
211CONFIG_IP_NF_AMANDA=m 219CONFIG_IP_NF_AMANDA=m
220# CONFIG_IP_NF_PPTP is not set
212CONFIG_IP_NF_QUEUE=m 221CONFIG_IP_NF_QUEUE=m
213CONFIG_IP_NF_IPTABLES=m 222CONFIG_IP_NF_IPTABLES=m
214CONFIG_IP_NF_MATCH_LIMIT=m 223CONFIG_IP_NF_MATCH_LIMIT=m
@@ -232,14 +241,18 @@ CONFIG_IP_NF_MATCH_OWNER=m
232CONFIG_IP_NF_MATCH_ADDRTYPE=m 241CONFIG_IP_NF_MATCH_ADDRTYPE=m
233CONFIG_IP_NF_MATCH_REALM=m 242CONFIG_IP_NF_MATCH_REALM=m
234CONFIG_IP_NF_MATCH_SCTP=m 243CONFIG_IP_NF_MATCH_SCTP=m
244CONFIG_IP_NF_MATCH_DCCP=m
235CONFIG_IP_NF_MATCH_COMMENT=m 245CONFIG_IP_NF_MATCH_COMMENT=m
236CONFIG_IP_NF_MATCH_CONNMARK=m 246CONFIG_IP_NF_MATCH_CONNMARK=m
247CONFIG_IP_NF_MATCH_CONNBYTES=m
237CONFIG_IP_NF_MATCH_HASHLIMIT=m 248CONFIG_IP_NF_MATCH_HASHLIMIT=m
249CONFIG_IP_NF_MATCH_STRING=m
238CONFIG_IP_NF_FILTER=m 250CONFIG_IP_NF_FILTER=m
239CONFIG_IP_NF_TARGET_REJECT=m 251CONFIG_IP_NF_TARGET_REJECT=m
240CONFIG_IP_NF_TARGET_LOG=m 252CONFIG_IP_NF_TARGET_LOG=m
241CONFIG_IP_NF_TARGET_ULOG=m 253CONFIG_IP_NF_TARGET_ULOG=m
242CONFIG_IP_NF_TARGET_TCPMSS=m 254CONFIG_IP_NF_TARGET_TCPMSS=m
255CONFIG_IP_NF_TARGET_NFQUEUE=m
243CONFIG_IP_NF_NAT=m 256CONFIG_IP_NF_NAT=m
244CONFIG_IP_NF_NAT_NEEDED=y 257CONFIG_IP_NF_NAT_NEEDED=y
245CONFIG_IP_NF_TARGET_MASQUERADE=m 258CONFIG_IP_NF_TARGET_MASQUERADE=m
@@ -257,6 +270,7 @@ CONFIG_IP_NF_TARGET_ECN=m
257CONFIG_IP_NF_TARGET_DSCP=m 270CONFIG_IP_NF_TARGET_DSCP=m
258CONFIG_IP_NF_TARGET_MARK=m 271CONFIG_IP_NF_TARGET_MARK=m
259CONFIG_IP_NF_TARGET_CLASSIFY=m 272CONFIG_IP_NF_TARGET_CLASSIFY=m
273CONFIG_IP_NF_TARGET_TTL=m
260CONFIG_IP_NF_TARGET_CONNMARK=m 274CONFIG_IP_NF_TARGET_CONNMARK=m
261CONFIG_IP_NF_TARGET_CLUSTERIP=m 275CONFIG_IP_NF_TARGET_CLUSTERIP=m
262CONFIG_IP_NF_RAW=m 276CONFIG_IP_NF_RAW=m
@@ -266,6 +280,11 @@ CONFIG_IP_NF_ARPFILTER=m
266CONFIG_IP_NF_ARP_MANGLE=m 280CONFIG_IP_NF_ARP_MANGLE=m
267 281
268# 282#
283# DCCP Configuration (EXPERIMENTAL)
284#
285# CONFIG_IP_DCCP is not set
286
287#
269# SCTP Configuration (EXPERIMENTAL) 288# SCTP Configuration (EXPERIMENTAL)
270# 289#
271# CONFIG_IP_SCTP is not set 290# CONFIG_IP_SCTP is not set
@@ -292,6 +311,7 @@ CONFIG_NET_CLS_ROUTE=y
292# CONFIG_HAMRADIO is not set 311# CONFIG_HAMRADIO is not set
293# CONFIG_IRDA is not set 312# CONFIG_IRDA is not set
294# CONFIG_BT is not set 313# CONFIG_BT is not set
314# CONFIG_IEEE80211 is not set
295 315
296# 316#
297# Device Drivers 317# Device Drivers
@@ -306,6 +326,11 @@ CONFIG_FW_LOADER=y
306# CONFIG_DEBUG_DRIVER is not set 326# CONFIG_DEBUG_DRIVER is not set
307 327
308# 328#
329# Connector - unified userspace <-> kernelspace linker
330#
331# CONFIG_CONNECTOR is not set
332
333#
309# Memory Technology Devices (MTD) 334# Memory Technology Devices (MTD)
310# 335#
311# CONFIG_MTD is not set 336# CONFIG_MTD is not set
@@ -344,7 +369,6 @@ CONFIG_BLK_DEV_RAM=y
344CONFIG_BLK_DEV_RAM_COUNT=16 369CONFIG_BLK_DEV_RAM_COUNT=16
345CONFIG_BLK_DEV_RAM_SIZE=65536 370CONFIG_BLK_DEV_RAM_SIZE=65536
346CONFIG_BLK_DEV_INITRD=y 371CONFIG_BLK_DEV_INITRD=y
347CONFIG_INITRAMFS_SOURCE=""
348# CONFIG_CDROM_PKTCDVD is not set 372# CONFIG_CDROM_PKTCDVD is not set
349 373
350# 374#
@@ -422,6 +446,7 @@ CONFIG_IDEDMA_AUTO=y
422# 446#
423# SCSI device support 447# SCSI device support
424# 448#
449# CONFIG_RAID_ATTRS is not set
425CONFIG_SCSI=y 450CONFIG_SCSI=y
426CONFIG_SCSI_PROC_FS=y 451CONFIG_SCSI_PROC_FS=y
427 452
@@ -449,6 +474,7 @@ CONFIG_SCSI_CONSTANTS=y
449CONFIG_SCSI_SPI_ATTRS=y 474CONFIG_SCSI_SPI_ATTRS=y
450CONFIG_SCSI_FC_ATTRS=y 475CONFIG_SCSI_FC_ATTRS=y
451CONFIG_SCSI_ISCSI_ATTRS=m 476CONFIG_SCSI_ISCSI_ATTRS=m
477# CONFIG_SCSI_SAS_ATTRS is not set
452 478
453# 479#
454# SCSI low-level drivers 480# SCSI low-level drivers
@@ -462,10 +488,12 @@ CONFIG_SCSI_ISCSI_ATTRS=m
462# CONFIG_SCSI_AIC79XX is not set 488# CONFIG_SCSI_AIC79XX is not set
463# CONFIG_MEGARAID_NEWGEN is not set 489# CONFIG_MEGARAID_NEWGEN is not set
464# CONFIG_MEGARAID_LEGACY is not set 490# CONFIG_MEGARAID_LEGACY is not set
491# CONFIG_MEGARAID_SAS is not set
465CONFIG_SCSI_SATA=y 492CONFIG_SCSI_SATA=y
466# CONFIG_SCSI_SATA_AHCI is not set 493# CONFIG_SCSI_SATA_AHCI is not set
467CONFIG_SCSI_SATA_SVW=y 494CONFIG_SCSI_SATA_SVW=y
468# CONFIG_SCSI_ATA_PIIX is not set 495# CONFIG_SCSI_ATA_PIIX is not set
496# CONFIG_SCSI_SATA_MV is not set
469# CONFIG_SCSI_SATA_NV is not set 497# CONFIG_SCSI_SATA_NV is not set
470# CONFIG_SCSI_SATA_PROMISE is not set 498# CONFIG_SCSI_SATA_PROMISE is not set
471# CONFIG_SCSI_SATA_QSTOR is not set 499# CONFIG_SCSI_SATA_QSTOR is not set
@@ -535,6 +563,7 @@ CONFIG_DM_MULTIPATH_EMC=m
535# CONFIG_FUSION is not set 563# CONFIG_FUSION is not set
536# CONFIG_FUSION_SPI is not set 564# CONFIG_FUSION_SPI is not set
537# CONFIG_FUSION_FC is not set 565# CONFIG_FUSION_FC is not set
566# CONFIG_FUSION_SAS is not set
538 567
539# 568#
540# IEEE 1394 (FireWire) support 569# IEEE 1394 (FireWire) support
@@ -578,7 +607,6 @@ CONFIG_IEEE1394_AMDTP=m
578# 607#
579CONFIG_ADB_PMU=y 608CONFIG_ADB_PMU=y
580CONFIG_PMAC_SMU=y 609CONFIG_PMAC_SMU=y
581# CONFIG_PMAC_BACKLIGHT is not set
582CONFIG_THERM_PM72=y 610CONFIG_THERM_PM72=y
583 611
584# 612#
@@ -596,12 +624,18 @@ CONFIG_TUN=m
596# CONFIG_ARCNET is not set 624# CONFIG_ARCNET is not set
597 625
598# 626#
627# PHY device support
628#
629# CONFIG_PHYLIB is not set
630
631#
599# Ethernet (10 or 100Mbit) 632# Ethernet (10 or 100Mbit)
600# 633#
601CONFIG_NET_ETHERNET=y 634CONFIG_NET_ETHERNET=y
602CONFIG_MII=y 635CONFIG_MII=y
603# CONFIG_HAPPYMEAL is not set 636# CONFIG_HAPPYMEAL is not set
604CONFIG_SUNGEM=y 637CONFIG_SUNGEM=y
638# CONFIG_CASSINI is not set
605CONFIG_NET_VENDOR_3COM=y 639CONFIG_NET_VENDOR_3COM=y
606CONFIG_VORTEX=y 640CONFIG_VORTEX=y
607# CONFIG_TYPHOON is not set 641# CONFIG_TYPHOON is not set
@@ -630,6 +664,7 @@ CONFIG_E100=y
630# CONFIG_EPIC100 is not set 664# CONFIG_EPIC100 is not set
631# CONFIG_SUNDANCE is not set 665# CONFIG_SUNDANCE is not set
632# CONFIG_VIA_RHINE is not set 666# CONFIG_VIA_RHINE is not set
667# CONFIG_NET_POCKET is not set
633 668
634# 669#
635# Ethernet (1000 Mbit) 670# Ethernet (1000 Mbit)
@@ -643,16 +678,19 @@ CONFIG_E1000=y
643# CONFIG_HAMACHI is not set 678# CONFIG_HAMACHI is not set
644# CONFIG_YELLOWFIN is not set 679# CONFIG_YELLOWFIN is not set
645# CONFIG_R8169 is not set 680# CONFIG_R8169 is not set
681# CONFIG_SIS190 is not set
646# CONFIG_SKGE is not set 682# CONFIG_SKGE is not set
647# CONFIG_SK98LIN is not set 683# CONFIG_SK98LIN is not set
648# CONFIG_VIA_VELOCITY is not set 684# CONFIG_VIA_VELOCITY is not set
649CONFIG_TIGON3=y 685CONFIG_TIGON3=y
650# CONFIG_BNX2 is not set 686# CONFIG_BNX2 is not set
687# CONFIG_SPIDER_NET is not set
651# CONFIG_MV643XX_ETH is not set 688# CONFIG_MV643XX_ETH is not set
652 689
653# 690#
654# Ethernet (10000 Mbit) 691# Ethernet (10000 Mbit)
655# 692#
693# CONFIG_CHELSIO_T1 is not set
656CONFIG_IXGB=m 694CONFIG_IXGB=m
657# CONFIG_IXGB_NAPI is not set 695# CONFIG_IXGB_NAPI is not set
658# CONFIG_S2IO is not set 696# CONFIG_S2IO is not set
@@ -838,8 +876,8 @@ CONFIG_I2C_AMD8111=y
838# CONFIG_I2C_I801 is not set 876# CONFIG_I2C_I801 is not set
839# CONFIG_I2C_I810 is not set 877# CONFIG_I2C_I810 is not set
840# CONFIG_I2C_PIIX4 is not set 878# CONFIG_I2C_PIIX4 is not set
841# CONFIG_I2C_ISA is not set
842CONFIG_I2C_KEYWEST=y 879CONFIG_I2C_KEYWEST=y
880CONFIG_I2C_PMAC_SMU=y
843# CONFIG_I2C_NFORCE2 is not set 881# CONFIG_I2C_NFORCE2 is not set
844# CONFIG_I2C_PARPORT is not set 882# CONFIG_I2C_PARPORT is not set
845# CONFIG_I2C_PARPORT_LIGHT is not set 883# CONFIG_I2C_PARPORT_LIGHT is not set
@@ -854,7 +892,6 @@ CONFIG_I2C_KEYWEST=y
854# CONFIG_I2C_VIAPRO is not set 892# CONFIG_I2C_VIAPRO is not set
855# CONFIG_I2C_VOODOO3 is not set 893# CONFIG_I2C_VOODOO3 is not set
856# CONFIG_I2C_PCA_ISA is not set 894# CONFIG_I2C_PCA_ISA is not set
857# CONFIG_I2C_SENSOR is not set
858 895
859# 896#
860# Miscellaneous I2C Chip support 897# Miscellaneous I2C Chip support
@@ -881,12 +918,17 @@ CONFIG_I2C_KEYWEST=y
881# Hardware Monitoring support 918# Hardware Monitoring support
882# 919#
883# CONFIG_HWMON is not set 920# CONFIG_HWMON is not set
921# CONFIG_HWMON_VID is not set
884 922
885# 923#
886# Misc devices 924# Misc devices
887# 925#
888 926
889# 927#
928# Multimedia Capabilities Port drivers
929#
930
931#
890# Multimedia devices 932# Multimedia devices
891# 933#
892# CONFIG_VIDEO_DEV is not set 934# CONFIG_VIDEO_DEV is not set
@@ -939,6 +981,7 @@ CONFIG_FB_RADEON_I2C=y
939# CONFIG_FB_KYRO is not set 981# CONFIG_FB_KYRO is not set
940# CONFIG_FB_3DFX is not set 982# CONFIG_FB_3DFX is not set
941# CONFIG_FB_VOODOO1 is not set 983# CONFIG_FB_VOODOO1 is not set
984# CONFIG_FB_CYBLA is not set
942# CONFIG_FB_TRIDENT is not set 985# CONFIG_FB_TRIDENT is not set
943# CONFIG_FB_S1D13XXX is not set 986# CONFIG_FB_S1D13XXX is not set
944# CONFIG_FB_VIRTUAL is not set 987# CONFIG_FB_VIRTUAL is not set
@@ -1020,6 +1063,7 @@ CONFIG_USB_STORAGE=m
1020# CONFIG_USB_STORAGE_SDDR09 is not set 1063# CONFIG_USB_STORAGE_SDDR09 is not set
1021# CONFIG_USB_STORAGE_SDDR55 is not set 1064# CONFIG_USB_STORAGE_SDDR55 is not set
1022# CONFIG_USB_STORAGE_JUMPSHOT is not set 1065# CONFIG_USB_STORAGE_JUMPSHOT is not set
1066# CONFIG_USB_STORAGE_ONETOUCH is not set
1023 1067
1024# 1068#
1025# USB Input Devices 1069# USB Input Devices
@@ -1036,9 +1080,11 @@ CONFIG_USB_HIDDEV=y
1036# CONFIG_USB_MTOUCH is not set 1080# CONFIG_USB_MTOUCH is not set
1037# CONFIG_USB_ITMTOUCH is not set 1081# CONFIG_USB_ITMTOUCH is not set
1038# CONFIG_USB_EGALAX is not set 1082# CONFIG_USB_EGALAX is not set
1083# CONFIG_USB_YEALINK is not set
1039# CONFIG_USB_XPAD is not set 1084# CONFIG_USB_XPAD is not set
1040# CONFIG_USB_ATI_REMOTE is not set 1085# CONFIG_USB_ATI_REMOTE is not set
1041# CONFIG_USB_KEYSPAN_REMOTE is not set 1086# CONFIG_USB_KEYSPAN_REMOTE is not set
1087# CONFIG_USB_APPLETOUCH is not set
1042 1088
1043# 1089#
1044# USB Imaging devices 1090# USB Imaging devices
@@ -1111,7 +1157,8 @@ CONFIG_USB_PEGASUS=y
1111# InfiniBand support 1157# InfiniBand support
1112# 1158#
1113CONFIG_INFINIBAND=m 1159CONFIG_INFINIBAND=m
1114CONFIG_INFINIBAND_USER_VERBS=m 1160# CONFIG_INFINIBAND_USER_MAD is not set
1161# CONFIG_INFINIBAND_USER_ACCESS is not set
1115CONFIG_INFINIBAND_MTHCA=m 1162CONFIG_INFINIBAND_MTHCA=m
1116# CONFIG_INFINIBAND_MTHCA_DEBUG is not set 1163# CONFIG_INFINIBAND_MTHCA_DEBUG is not set
1117CONFIG_INFINIBAND_IPOIB=m 1164CONFIG_INFINIBAND_IPOIB=m
@@ -1149,16 +1196,12 @@ CONFIG_JFS_SECURITY=y
1149# CONFIG_JFS_DEBUG is not set 1196# CONFIG_JFS_DEBUG is not set
1150# CONFIG_JFS_STATISTICS is not set 1197# CONFIG_JFS_STATISTICS is not set
1151CONFIG_FS_POSIX_ACL=y 1198CONFIG_FS_POSIX_ACL=y
1152
1153#
1154# XFS support
1155#
1156CONFIG_XFS_FS=m 1199CONFIG_XFS_FS=m
1157CONFIG_XFS_EXPORT=y 1200CONFIG_XFS_EXPORT=y
1158# CONFIG_XFS_RT is not set
1159# CONFIG_XFS_QUOTA is not set 1201# CONFIG_XFS_QUOTA is not set
1160CONFIG_XFS_SECURITY=y 1202CONFIG_XFS_SECURITY=y
1161CONFIG_XFS_POSIX_ACL=y 1203CONFIG_XFS_POSIX_ACL=y
1204# CONFIG_XFS_RT is not set
1162# CONFIG_MINIX_FS is not set 1205# CONFIG_MINIX_FS is not set
1163# CONFIG_ROMFS_FS is not set 1206# CONFIG_ROMFS_FS is not set
1164CONFIG_INOTIFY=y 1207CONFIG_INOTIFY=y
@@ -1166,6 +1209,7 @@ CONFIG_INOTIFY=y
1166CONFIG_DNOTIFY=y 1209CONFIG_DNOTIFY=y
1167CONFIG_AUTOFS_FS=y 1210CONFIG_AUTOFS_FS=y
1168# CONFIG_AUTOFS4_FS is not set 1211# CONFIG_AUTOFS4_FS is not set
1212# CONFIG_FUSE_FS is not set
1169 1213
1170# 1214#
1171# CD-ROM/DVD Filesystems 1215# CD-ROM/DVD Filesystems
@@ -1192,14 +1236,11 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
1192CONFIG_PROC_FS=y 1236CONFIG_PROC_FS=y
1193CONFIG_PROC_KCORE=y 1237CONFIG_PROC_KCORE=y
1194CONFIG_SYSFS=y 1238CONFIG_SYSFS=y
1195CONFIG_DEVPTS_FS_XATTR=y
1196CONFIG_DEVPTS_FS_SECURITY=y
1197CONFIG_TMPFS=y 1239CONFIG_TMPFS=y
1198CONFIG_TMPFS_XATTR=y
1199CONFIG_TMPFS_SECURITY=y
1200CONFIG_HUGETLBFS=y 1240CONFIG_HUGETLBFS=y
1201CONFIG_HUGETLB_PAGE=y 1241CONFIG_HUGETLB_PAGE=y
1202CONFIG_RAMFS=y 1242CONFIG_RAMFS=y
1243# CONFIG_RELAYFS_FS is not set
1203 1244
1204# 1245#
1205# Miscellaneous filesystems 1246# Miscellaneous filesystems
@@ -1250,6 +1291,7 @@ CONFIG_CIFS_POSIX=y
1250# CONFIG_NCP_FS is not set 1291# CONFIG_NCP_FS is not set
1251# CONFIG_CODA_FS is not set 1292# CONFIG_CODA_FS is not set
1252# CONFIG_AFS_FS is not set 1293# CONFIG_AFS_FS is not set
1294# CONFIG_9P_FS is not set
1253 1295
1254# 1296#
1255# Partition Types 1297# Partition Types
@@ -1328,6 +1370,7 @@ CONFIG_OPROFILE=y
1328CONFIG_DEBUG_KERNEL=y 1370CONFIG_DEBUG_KERNEL=y
1329CONFIG_MAGIC_SYSRQ=y 1371CONFIG_MAGIC_SYSRQ=y
1330CONFIG_LOG_BUF_SHIFT=17 1372CONFIG_LOG_BUF_SHIFT=17
1373CONFIG_DETECT_SOFTLOCKUP=y
1331# CONFIG_SCHEDSTATS is not set 1374# CONFIG_SCHEDSTATS is not set
1332# CONFIG_DEBUG_SLAB is not set 1375# CONFIG_DEBUG_SLAB is not set
1333# CONFIG_DEBUG_SPINLOCK is not set 1376# CONFIG_DEBUG_SPINLOCK is not set
@@ -1387,7 +1430,12 @@ CONFIG_CRYPTO_TEST=m
1387# Library routines 1430# Library routines
1388# 1431#
1389CONFIG_CRC_CCITT=m 1432CONFIG_CRC_CCITT=m
1433# CONFIG_CRC16 is not set
1390CONFIG_CRC32=y 1434CONFIG_CRC32=y
1391CONFIG_LIBCRC32C=m 1435CONFIG_LIBCRC32C=m
1392CONFIG_ZLIB_INFLATE=y 1436CONFIG_ZLIB_INFLATE=y
1393CONFIG_ZLIB_DEFLATE=m 1437CONFIG_ZLIB_DEFLATE=m
1438CONFIG_TEXTSEARCH=y
1439CONFIG_TEXTSEARCH_KMP=m
1440CONFIG_TEXTSEARCH_BM=m
1441CONFIG_TEXTSEARCH_FSM=m
diff --git a/arch/ppc64/kernel/vdso32/gettimeofday.S b/arch/ppc64/kernel/vdso32/gettimeofday.S
index 07f1c1c650c8..e243c1d24af7 100644
--- a/arch/ppc64/kernel/vdso32/gettimeofday.S
+++ b/arch/ppc64/kernel/vdso32/gettimeofday.S
@@ -109,7 +109,7 @@ __do_get_xsec:
109 lwz r6,(CFG_TB_TO_XS+4)(r9) 109 lwz r6,(CFG_TB_TO_XS+4)(r9)
110 mulhwu r4,r7,r5 110 mulhwu r4,r7,r5
111 mulhwu r6,r7,r6 111 mulhwu r6,r7,r6
112 mullw r6,r7,r5 112 mullw r0,r7,r5
113 addc r6,r6,r0 113 addc r6,r6,r0
114 114
115 /* At this point, we have the scaled xsec value in r4 + XER:CA 115 /* At this point, we have the scaled xsec value in r4 + XER:CA
diff --git a/arch/sh/kernel/smp.c b/arch/sh/kernel/smp.c
index 56a39d69e080..5ecefc02896a 100644
--- a/arch/sh/kernel/smp.c
+++ b/arch/sh/kernel/smp.c
@@ -22,6 +22,7 @@
22#include <linux/time.h> 22#include <linux/time.h>
23#include <linux/timex.h> 23#include <linux/timex.h>
24#include <linux/sched.h> 24#include <linux/sched.h>
25#include <linux/module.h>
25 26
26#include <asm/atomic.h> 27#include <asm/atomic.h>
27#include <asm/processor.h> 28#include <asm/processor.h>
@@ -39,6 +40,8 @@ struct sh_cpuinfo cpu_data[NR_CPUS];
39extern void per_cpu_trap_init(void); 40extern void per_cpu_trap_init(void);
40 41
41cpumask_t cpu_possible_map; 42cpumask_t cpu_possible_map;
43EXPORT_SYMBOL(cpu_possible_map);
44
42cpumask_t cpu_online_map; 45cpumask_t cpu_online_map;
43static atomic_t cpus_booted = ATOMIC_INIT(0); 46static atomic_t cpus_booted = ATOMIC_INIT(0);
44 47
diff --git a/arch/sparc64/kernel/dtlb_base.S b/arch/sparc64/kernel/dtlb_base.S
index 702d349c1e88..6528786840c0 100644
--- a/arch/sparc64/kernel/dtlb_base.S
+++ b/arch/sparc64/kernel/dtlb_base.S
@@ -53,19 +53,18 @@
53 * be guaranteed to be 0 ... mmu_context.h does guarantee this 53 * be guaranteed to be 0 ... mmu_context.h does guarantee this
54 * by only using 10 bits in the hwcontext value. 54 * by only using 10 bits in the hwcontext value.
55 */ 55 */
56#define CREATE_VPTE_OFFSET1(r1, r2) 56#define CREATE_VPTE_OFFSET1(r1, r2) nop
57#define CREATE_VPTE_OFFSET2(r1, r2) \ 57#define CREATE_VPTE_OFFSET2(r1, r2) \
58 srax r1, 10, r2 58 srax r1, 10, r2
59#define CREATE_VPTE_NOP nop
60#else 59#else
61#define CREATE_VPTE_OFFSET1(r1, r2) \ 60#define CREATE_VPTE_OFFSET1(r1, r2) \
62 srax r1, PAGE_SHIFT, r2 61 srax r1, PAGE_SHIFT, r2
63#define CREATE_VPTE_OFFSET2(r1, r2) \ 62#define CREATE_VPTE_OFFSET2(r1, r2) \
64 sllx r2, 3, r2 63 sllx r2, 3, r2
65#define CREATE_VPTE_NOP
66#endif 64#endif
67 65
68/* DTLB ** ICACHE line 1: Quick user TLB misses */ 66/* DTLB ** ICACHE line 1: Quick user TLB misses */
67 mov TLB_SFSR, %g1
69 ldxa [%g1 + %g1] ASI_DMMU, %g4 ! Get TAG_ACCESS 68 ldxa [%g1 + %g1] ASI_DMMU, %g4 ! Get TAG_ACCESS
70 andcc %g4, TAG_CONTEXT_BITS, %g0 ! From Nucleus? 69 andcc %g4, TAG_CONTEXT_BITS, %g0 ! From Nucleus?
71from_tl1_trap: 70from_tl1_trap:
@@ -74,18 +73,16 @@ from_tl1_trap:
74 be,pn %xcc, kvmap ! Yep, special processing 73 be,pn %xcc, kvmap ! Yep, special processing
75 CREATE_VPTE_OFFSET2(%g4, %g6) ! Create VPTE offset 74 CREATE_VPTE_OFFSET2(%g4, %g6) ! Create VPTE offset
76 cmp %g5, 4 ! Last trap level? 75 cmp %g5, 4 ! Last trap level?
77 be,pn %xcc, longpath ! Yep, cannot risk VPTE miss
78 nop ! delay slot
79 76
80/* DTLB ** ICACHE line 2: User finish + quick kernel TLB misses */ 77/* DTLB ** ICACHE line 2: User finish + quick kernel TLB misses */
78 be,pn %xcc, longpath ! Yep, cannot risk VPTE miss
79 nop ! delay slot
81 ldxa [%g3 + %g6] ASI_S, %g5 ! Load VPTE 80 ldxa [%g3 + %g6] ASI_S, %g5 ! Load VPTE
821: brgez,pn %g5, longpath ! Invalid, branch out 811: brgez,pn %g5, longpath ! Invalid, branch out
83 nop ! Delay-slot 82 nop ! Delay-slot
849: stxa %g5, [%g0] ASI_DTLB_DATA_IN ! Reload TLB 839: stxa %g5, [%g0] ASI_DTLB_DATA_IN ! Reload TLB
85 retry ! Trap return 84 retry ! Trap return
86 nop 85 nop
87 nop
88 nop
89 86
90/* DTLB ** ICACHE line 3: winfixups+real_faults */ 87/* DTLB ** ICACHE line 3: winfixups+real_faults */
91longpath: 88longpath:
@@ -106,8 +103,7 @@ longpath:
106 nop 103 nop
107 nop 104 nop
108 nop 105 nop
109 CREATE_VPTE_NOP 106 nop
110 107
111#undef CREATE_VPTE_OFFSET1 108#undef CREATE_VPTE_OFFSET1
112#undef CREATE_VPTE_OFFSET2 109#undef CREATE_VPTE_OFFSET2
113#undef CREATE_VPTE_NOP
diff --git a/arch/sparc64/kernel/dtlb_prot.S b/arch/sparc64/kernel/dtlb_prot.S
index d848bb7374bb..e0a920162604 100644
--- a/arch/sparc64/kernel/dtlb_prot.S
+++ b/arch/sparc64/kernel/dtlb_prot.S
@@ -14,14 +14,14 @@
14 */ 14 */
15 15
16/* PROT ** ICACHE line 1: User DTLB protection trap */ 16/* PROT ** ICACHE line 1: User DTLB protection trap */
17 stxa %g0, [%g1] ASI_DMMU ! Clear SFSR FaultValid bit 17 mov TLB_SFSR, %g1
18 membar #Sync ! Synchronize ASI stores 18 stxa %g0, [%g1] ASI_DMMU ! Clear FaultValid bit
19 rdpr %pstate, %g5 ! Move into alternate globals 19 membar #Sync ! Synchronize stores
20 rdpr %pstate, %g5 ! Move into alt-globals
20 wrpr %g5, PSTATE_AG|PSTATE_MG, %pstate 21 wrpr %g5, PSTATE_AG|PSTATE_MG, %pstate
21 rdpr %tl, %g1 ! Need to do a winfixup? 22 rdpr %tl, %g1 ! Need a winfixup?
22 cmp %g1, 1 ! Trap level >1? 23 cmp %g1, 1 ! Trap level >1?
23 mov TLB_TAG_ACCESS, %g4 ! Prepare reload of vaddr 24 mov TLB_TAG_ACCESS, %g4 ! For reload of vaddr
24 nop
25 25
26/* PROT ** ICACHE line 2: More real fault processing */ 26/* PROT ** ICACHE line 2: More real fault processing */
27 bgu,pn %xcc, winfix_trampoline ! Yes, perform winfixup 27 bgu,pn %xcc, winfix_trampoline ! Yes, perform winfixup
diff --git a/arch/sparc64/kernel/head.S b/arch/sparc64/kernel/head.S
index 4c942f71184d..b49dcd4504b0 100644
--- a/arch/sparc64/kernel/head.S
+++ b/arch/sparc64/kernel/head.S
@@ -28,19 +28,14 @@
28#include <asm/mmu.h> 28#include <asm/mmu.h>
29 29
30/* This section from from _start to sparc64_boot_end should fit into 30/* This section from from _start to sparc64_boot_end should fit into
31 * 0x0000.0000.0040.4000 to 0x0000.0000.0040.8000 and will be sharing space 31 * 0x0000000000404000 to 0x0000000000408000.
32 * with bootup_user_stack, which is from 0x0000.0000.0040.4000 to
33 * 0x0000.0000.0040.6000 and empty_bad_page, which is from
34 * 0x0000.0000.0040.6000 to 0x0000.0000.0040.8000.
35 */ 32 */
36
37 .text 33 .text
38 .globl start, _start, stext, _stext 34 .globl start, _start, stext, _stext
39_start: 35_start:
40start: 36start:
41_stext: 37_stext:
42stext: 38stext:
43bootup_user_stack:
44! 0x0000000000404000 39! 0x0000000000404000
45 b sparc64_boot 40 b sparc64_boot
46 flushw /* Flush register file. */ 41 flushw /* Flush register file. */
@@ -392,31 +387,30 @@ tlb_fixup_done:
392 * former does use this code, the latter does not yet due 387 * former does use this code, the latter does not yet due
393 * to some complexities. That should be fixed up at some 388 * to some complexities. That should be fixed up at some
394 * point. 389 * point.
390 *
391 * There used to be enormous complexity wrt. transferring
392 * over from the firwmare's trap table to the Linux kernel's.
393 * For example, there was a chicken & egg problem wrt. building
394 * the OBP page tables, yet needing to be on the Linux kernel
395 * trap table (to translate PAGE_OFFSET addresses) in order to
396 * do that.
397 *
398 * We now handle OBP tlb misses differently, via linear lookups
399 * into the prom_trans[] array. So that specific problem no
400 * longer exists. Yet, unfortunately there are still some issues
401 * preventing trampoline.S from using this code... ho hum.
395 */ 402 */
396 .globl setup_trap_table 403 .globl setup_trap_table
397setup_trap_table: 404setup_trap_table:
398 save %sp, -192, %sp 405 save %sp, -192, %sp
399 406
400 /* Force interrupts to be disabled. Transferring over to 407 /* Force interrupts to be disabled. */
401 * the Linux trap table is a very delicate operation.
402 * Until we are actually on the Linux trap table, we cannot
403 * get the PAGE_OFFSET linear mappings translated. We need
404 * that mapping to be setup in order to initialize the firmware
405 * page tables.
406 *
407 * So there is this window of time, from the return from
408 * prom_set_trap_table() until inherit_prom_mappings_post()
409 * (in arch/sparc64/mm/init.c) completes, during which no
410 * firmware address space accesses can be made.
411 */
412 rdpr %pstate, %o1 408 rdpr %pstate, %o1
413 andn %o1, PSTATE_IE, %o1 409 andn %o1, PSTATE_IE, %o1
414 wrpr %o1, 0x0, %pstate 410 wrpr %o1, 0x0, %pstate
415 wrpr %g0, 15, %pil 411 wrpr %g0, 15, %pil
416 412
417 /* Ok, now make the final valid firmware call to jump over 413 /* Make the firmware call to jump over to the Linux trap table. */
418 * to the Linux trap table.
419 */
420 call prom_set_trap_table 414 call prom_set_trap_table
421 sethi %hi(sparc64_ttable_tl0), %o0 415 sethi %hi(sparc64_ttable_tl0), %o0
422 416
@@ -540,15 +534,21 @@ setup_tba: /* i0 = is_starfire */
540 534
541 ret 535 ret
542 restore 536 restore
537sparc64_boot_end:
538
539#include "systbls.S"
540#include "ktlb.S"
541#include "etrap.S"
542#include "rtrap.S"
543#include "winfixup.S"
544#include "entry.S"
543 545
544/* 546/*
545 * The following skips make sure the trap table in ttable.S is aligned 547 * The following skip makes sure the trap table in ttable.S is aligned
546 * on a 32K boundary as required by the v9 specs for TBA register. 548 * on a 32K boundary as required by the v9 specs for TBA register.
547 */ 549 */
548sparc64_boot_end: 5501:
549 .skip 0x2000 + _start - sparc64_boot_end 551 .skip 0x4000 + _start - 1b
550bootup_user_stack_end:
551 .skip 0x2000
552 552
553#ifdef CONFIG_SBUS 553#ifdef CONFIG_SBUS
554/* This is just a hack to fool make depend config.h discovering 554/* This is just a hack to fool make depend config.h discovering
@@ -560,15 +560,6 @@ bootup_user_stack_end:
560! 0x0000000000408000 560! 0x0000000000408000
561 561
562#include "ttable.S" 562#include "ttable.S"
563#include "systbls.S"
564#include "ktlb.S"
565#include "etrap.S"
566#include "rtrap.S"
567#include "winfixup.S"
568#include "entry.S"
569
570 /* This is just anal retentiveness on my part... */
571 .align 16384
572 563
573 .data 564 .data
574 .align 8 565 .align 8
diff --git a/arch/sparc64/kernel/itlb_base.S b/arch/sparc64/kernel/itlb_base.S
index b5e32dfa4fbc..4951ff8f6877 100644
--- a/arch/sparc64/kernel/itlb_base.S
+++ b/arch/sparc64/kernel/itlb_base.S
@@ -15,14 +15,12 @@
15 */ 15 */
16#define CREATE_VPTE_OFFSET1(r1, r2) \ 16#define CREATE_VPTE_OFFSET1(r1, r2) \
17 srax r1, 10, r2 17 srax r1, 10, r2
18#define CREATE_VPTE_OFFSET2(r1, r2) 18#define CREATE_VPTE_OFFSET2(r1, r2) nop
19#define CREATE_VPTE_NOP nop
20#else /* PAGE_SHIFT */ 19#else /* PAGE_SHIFT */
21#define CREATE_VPTE_OFFSET1(r1, r2) \ 20#define CREATE_VPTE_OFFSET1(r1, r2) \
22 srax r1, PAGE_SHIFT, r2 21 srax r1, PAGE_SHIFT, r2
23#define CREATE_VPTE_OFFSET2(r1, r2) \ 22#define CREATE_VPTE_OFFSET2(r1, r2) \
24 sllx r2, 3, r2 23 sllx r2, 3, r2
25#define CREATE_VPTE_NOP
26#endif /* PAGE_SHIFT */ 24#endif /* PAGE_SHIFT */
27 25
28 26
@@ -36,6 +34,7 @@
36 */ 34 */
37 35
38/* ITLB ** ICACHE line 1: Quick user TLB misses */ 36/* ITLB ** ICACHE line 1: Quick user TLB misses */
37 mov TLB_SFSR, %g1
39 ldxa [%g1 + %g1] ASI_IMMU, %g4 ! Get TAG_ACCESS 38 ldxa [%g1 + %g1] ASI_IMMU, %g4 ! Get TAG_ACCESS
40 CREATE_VPTE_OFFSET1(%g4, %g6) ! Create VPTE offset 39 CREATE_VPTE_OFFSET1(%g4, %g6) ! Create VPTE offset
41 CREATE_VPTE_OFFSET2(%g4, %g6) ! Create VPTE offset 40 CREATE_VPTE_OFFSET2(%g4, %g6) ! Create VPTE offset
@@ -43,41 +42,38 @@
431: brgez,pn %g5, 3f ! Not valid, branch out 421: brgez,pn %g5, 3f ! Not valid, branch out
44 sethi %hi(_PAGE_EXEC), %g4 ! Delay-slot 43 sethi %hi(_PAGE_EXEC), %g4 ! Delay-slot
45 andcc %g5, %g4, %g0 ! Executable? 44 andcc %g5, %g4, %g0 ! Executable?
45
46/* ITLB ** ICACHE line 2: Real faults */
46 be,pn %xcc, 3f ! Nope, branch. 47 be,pn %xcc, 3f ! Nope, branch.
47 nop ! Delay-slot 48 nop ! Delay-slot
482: stxa %g5, [%g0] ASI_ITLB_DATA_IN ! Load PTE into TLB 492: stxa %g5, [%g0] ASI_ITLB_DATA_IN ! Load PTE into TLB
49 retry ! Trap return 50 retry ! Trap return
503: rdpr %pstate, %g4 ! Move into alternate globals 513: rdpr %pstate, %g4 ! Move into alt-globals
51
52/* ITLB ** ICACHE line 2: Real faults */
53 wrpr %g4, PSTATE_AG|PSTATE_MG, %pstate 52 wrpr %g4, PSTATE_AG|PSTATE_MG, %pstate
54 rdpr %tpc, %g5 ! And load faulting VA 53 rdpr %tpc, %g5 ! And load faulting VA
55 mov FAULT_CODE_ITLB, %g4 ! It was read from ITLB 54 mov FAULT_CODE_ITLB, %g4 ! It was read from ITLB
56sparc64_realfault_common: ! Called by TL0 dtlb_miss too 55
56/* ITLB ** ICACHE line 3: Finish faults */
57sparc64_realfault_common: ! Called by dtlb_miss
57 stb %g4, [%g6 + TI_FAULT_CODE] 58 stb %g4, [%g6 + TI_FAULT_CODE]
58 stx %g5, [%g6 + TI_FAULT_ADDR] 59 stx %g5, [%g6 + TI_FAULT_ADDR]
59 ba,pt %xcc, etrap ! Save state 60 ba,pt %xcc, etrap ! Save state
601: rd %pc, %g7 ! ... 611: rd %pc, %g7 ! ...
61 nop
62
63/* ITLB ** ICACHE line 3: Finish faults + window fixups */
64 call do_sparc64_fault ! Call fault handler 62 call do_sparc64_fault ! Call fault handler
65 add %sp, PTREGS_OFF, %o0! Compute pt_regs arg 63 add %sp, PTREGS_OFF, %o0! Compute pt_regs arg
66 ba,pt %xcc, rtrap_clr_l6 ! Restore cpu state 64 ba,pt %xcc, rtrap_clr_l6 ! Restore cpu state
67 nop 65 nop
66
67/* ITLB ** ICACHE line 4: Window fixups */
68winfix_trampoline: 68winfix_trampoline:
69 rdpr %tpc, %g3 ! Prepare winfixup TNPC 69 rdpr %tpc, %g3 ! Prepare winfixup TNPC
70 or %g3, 0x7c, %g3 ! Compute offset to branch 70 or %g3, 0x7c, %g3 ! Compute branch offset
71 wrpr %g3, %tnpc ! Write it into TNPC 71 wrpr %g3, %tnpc ! Write it into TNPC
72 done ! Do it to it 72 done ! Do it to it
73
74/* ITLB ** ICACHE line 4: Unused... */
75 nop 73 nop
76 nop 74 nop
77 nop 75 nop
78 nop 76 nop
79 CREATE_VPTE_NOP
80 77
81#undef CREATE_VPTE_OFFSET1 78#undef CREATE_VPTE_OFFSET1
82#undef CREATE_VPTE_OFFSET2 79#undef CREATE_VPTE_OFFSET2
83#undef CREATE_VPTE_NOP
diff --git a/arch/sparc64/kernel/ktlb.S b/arch/sparc64/kernel/ktlb.S
index 7796b37f478c..d9244d3c9f73 100644
--- a/arch/sparc64/kernel/ktlb.S
+++ b/arch/sparc64/kernel/ktlb.S
@@ -58,9 +58,6 @@ vpte_noent:
58 done 58 done
59 59
60vpte_insn_obp: 60vpte_insn_obp:
61 sethi %hi(prom_pmd_phys), %g5
62 ldx [%g5 + %lo(prom_pmd_phys)], %g5
63
64 /* Behave as if we are at TL0. */ 61 /* Behave as if we are at TL0. */
65 wrpr %g0, 1, %tl 62 wrpr %g0, 1, %tl
66 rdpr %tpc, %g4 /* Find original faulting iaddr */ 63 rdpr %tpc, %g4 /* Find original faulting iaddr */
@@ -71,58 +68,57 @@ vpte_insn_obp:
71 mov TLB_SFSR, %g1 68 mov TLB_SFSR, %g1
72 stxa %g4, [%g1 + %g1] ASI_IMMU 69 stxa %g4, [%g1 + %g1] ASI_IMMU
73 70
74 /* Get PMD offset. */ 71 sethi %hi(prom_trans), %g5
75 srlx %g4, 23, %g6 72 or %g5, %lo(prom_trans), %g5
76 and %g6, 0x7ff, %g6 73
77 sllx %g6, 2, %g6 741: ldx [%g5 + 0x00], %g6 ! base
78 75 brz,a,pn %g6, longpath ! no more entries, fail
79 /* Load PMD, is it valid? */ 76 mov TLB_SFSR, %g1 ! and restore %g1
80 lduwa [%g5 + %g6] ASI_PHYS_USE_EC, %g5 77 ldx [%g5 + 0x08], %g1 ! len
81 brz,pn %g5, longpath 78 add %g6, %g1, %g1 ! end
82 sllx %g5, 11, %g5 79 cmp %g6, %g4
83 80 bgu,pt %xcc, 2f
84 /* Get PTE offset. */ 81 cmp %g4, %g1
85 srlx %g4, 13, %g6 82 bgeu,pt %xcc, 2f
86 and %g6, 0x3ff, %g6 83 ldx [%g5 + 0x10], %g1 ! PTE
87 sllx %g6, 3, %g6 84
88 85 /* TLB load, restore %g1, and return from trap. */
89 /* Load PTE. */ 86 sub %g4, %g6, %g6
90 ldxa [%g5 + %g6] ASI_PHYS_USE_EC, %g5 87 add %g1, %g6, %g5
91 brgez,pn %g5, longpath 88 mov TLB_SFSR, %g1
92 nop
93
94 /* TLB load and return from trap. */
95 stxa %g5, [%g0] ASI_ITLB_DATA_IN 89 stxa %g5, [%g0] ASI_ITLB_DATA_IN
96 retry 90 retry
97 91
98kvmap_do_obp: 922: ba,pt %xcc, 1b
99 sethi %hi(prom_pmd_phys), %g5 93 add %g5, (3 * 8), %g5 ! next entry
100 ldx [%g5 + %lo(prom_pmd_phys)], %g5
101
102 /* Get PMD offset. */
103 srlx %g4, 23, %g6
104 and %g6, 0x7ff, %g6
105 sllx %g6, 2, %g6
106
107 /* Load PMD, is it valid? */
108 lduwa [%g5 + %g6] ASI_PHYS_USE_EC, %g5
109 brz,pn %g5, longpath
110 sllx %g5, 11, %g5
111
112 /* Get PTE offset. */
113 srlx %g4, 13, %g6
114 and %g6, 0x3ff, %g6
115 sllx %g6, 3, %g6
116
117 /* Load PTE. */
118 ldxa [%g5 + %g6] ASI_PHYS_USE_EC, %g5
119 brgez,pn %g5, longpath
120 nop
121 94
122 /* TLB load and return from trap. */ 95kvmap_do_obp:
96 sethi %hi(prom_trans), %g5
97 or %g5, %lo(prom_trans), %g5
98 srlx %g4, 13, %g4
99 sllx %g4, 13, %g4
100
1011: ldx [%g5 + 0x00], %g6 ! base
102 brz,a,pn %g6, longpath ! no more entries, fail
103 mov TLB_SFSR, %g1 ! and restore %g1
104 ldx [%g5 + 0x08], %g1 ! len
105 add %g6, %g1, %g1 ! end
106 cmp %g6, %g4
107 bgu,pt %xcc, 2f
108 cmp %g4, %g1
109 bgeu,pt %xcc, 2f
110 ldx [%g5 + 0x10], %g1 ! PTE
111
112 /* TLB load, restore %g1, and return from trap. */
113 sub %g4, %g6, %g6
114 add %g1, %g6, %g5
115 mov TLB_SFSR, %g1
123 stxa %g5, [%g0] ASI_DTLB_DATA_IN 116 stxa %g5, [%g0] ASI_DTLB_DATA_IN
124 retry 117 retry
125 118
1192: ba,pt %xcc, 1b
120 add %g5, (3 * 8), %g5 ! next entry
121
126/* 122/*
127 * On a first level data miss, check whether this is to the OBP range (note 123 * On a first level data miss, check whether this is to the OBP range (note
128 * that such accesses can be made by prom, as well as by kernel using 124 * that such accesses can be made by prom, as well as by kernel using
diff --git a/arch/sparc64/kernel/pci_iommu.c b/arch/sparc64/kernel/pci_iommu.c
index 425c60cfea19..a11910be1013 100644
--- a/arch/sparc64/kernel/pci_iommu.c
+++ b/arch/sparc64/kernel/pci_iommu.c
@@ -49,12 +49,6 @@ static void __iommu_flushall(struct pci_iommu *iommu)
49 49
50 /* Ensure completion of previous PIO writes. */ 50 /* Ensure completion of previous PIO writes. */
51 (void) pci_iommu_read(iommu->write_complete_reg); 51 (void) pci_iommu_read(iommu->write_complete_reg);
52
53 /* Now update everyone's flush point. */
54 for (entry = 0; entry < PBM_NCLUSTERS; entry++) {
55 iommu->alloc_info[entry].flush =
56 iommu->alloc_info[entry].next;
57 }
58} 52}
59 53
60#define IOPTE_CONSISTENT(CTX) \ 54#define IOPTE_CONSISTENT(CTX) \
@@ -80,120 +74,117 @@ static void inline iopte_make_dummy(struct pci_iommu *iommu, iopte_t *iopte)
80 iopte_val(*iopte) = val; 74 iopte_val(*iopte) = val;
81} 75}
82 76
83void pci_iommu_table_init(struct pci_iommu *iommu, int tsbsize) 77/* Based largely upon the ppc64 iommu allocator. */
78static long pci_arena_alloc(struct pci_iommu *iommu, unsigned long npages)
84{ 79{
85 int i; 80 struct pci_iommu_arena *arena = &iommu->arena;
86 81 unsigned long n, i, start, end, limit;
87 tsbsize /= sizeof(iopte_t); 82 int pass;
88 83
89 for (i = 0; i < tsbsize; i++) 84 limit = arena->limit;
90 iopte_make_dummy(iommu, &iommu->page_table[i]); 85 start = arena->hint;
91} 86 pass = 0;
92 87
93static iopte_t *alloc_streaming_cluster(struct pci_iommu *iommu, unsigned long npages) 88again:
94{ 89 n = find_next_zero_bit(arena->map, limit, start);
95 iopte_t *iopte, *limit, *first; 90 end = n + npages;
96 unsigned long cnum, ent, flush_point; 91 if (unlikely(end >= limit)) {
97 92 if (likely(pass < 1)) {
98 cnum = 0; 93 limit = start;
99 while ((1UL << cnum) < npages) 94 start = 0;
100 cnum++; 95 __iommu_flushall(iommu);
101 iopte = (iommu->page_table + 96 pass++;
102 (cnum << (iommu->page_table_sz_bits - PBM_LOGCLUSTERS))); 97 goto again;
103 98 } else {
104 if (cnum == 0) 99 /* Scanned the whole thing, give up. */
105 limit = (iommu->page_table + 100 return -1;
106 iommu->lowest_consistent_map);
107 else
108 limit = (iopte +
109 (1 << (iommu->page_table_sz_bits - PBM_LOGCLUSTERS)));
110
111 iopte += ((ent = iommu->alloc_info[cnum].next) << cnum);
112 flush_point = iommu->alloc_info[cnum].flush;
113
114 first = iopte;
115 for (;;) {
116 if (IOPTE_IS_DUMMY(iommu, iopte)) {
117 if ((iopte + (1 << cnum)) >= limit)
118 ent = 0;
119 else
120 ent = ent + 1;
121 iommu->alloc_info[cnum].next = ent;
122 if (ent == flush_point)
123 __iommu_flushall(iommu);
124 break;
125 } 101 }
126 iopte += (1 << cnum); 102 }
127 ent++; 103
128 if (iopte >= limit) { 104 for (i = n; i < end; i++) {
129 iopte = (iommu->page_table + 105 if (test_bit(i, arena->map)) {
130 (cnum << 106 start = i + 1;
131 (iommu->page_table_sz_bits - PBM_LOGCLUSTERS))); 107 goto again;
132 ent = 0;
133 } 108 }
134 if (ent == flush_point)
135 __iommu_flushall(iommu);
136 if (iopte == first)
137 goto bad;
138 } 109 }
139 110
140 /* I've got your streaming cluster right here buddy boy... */ 111 for (i = n; i < end; i++)
141 return iopte; 112 __set_bit(i, arena->map);
142 113
143bad: 114 arena->hint = end;
144 printk(KERN_EMERG "pci_iommu: alloc_streaming_cluster of npages(%ld) failed!\n", 115
145 npages); 116 return n;
146 return NULL;
147} 117}
148 118
149static void free_streaming_cluster(struct pci_iommu *iommu, dma_addr_t base, 119static void pci_arena_free(struct pci_iommu_arena *arena, unsigned long base, unsigned long npages)
150 unsigned long npages, unsigned long ctx)
151{ 120{
152 unsigned long cnum, ent; 121 unsigned long i;
153 122
154 cnum = 0; 123 for (i = base; i < (base + npages); i++)
155 while ((1UL << cnum) < npages) 124 __clear_bit(i, arena->map);
156 cnum++; 125}
157 126
158 ent = (base << (32 - IO_PAGE_SHIFT + PBM_LOGCLUSTERS - iommu->page_table_sz_bits)) 127void pci_iommu_table_init(struct pci_iommu *iommu, int tsbsize, u32 dma_offset, u32 dma_addr_mask)
159 >> (32 + PBM_LOGCLUSTERS + cnum - iommu->page_table_sz_bits); 128{
129 unsigned long i, tsbbase, order, sz, num_tsb_entries;
130
131 num_tsb_entries = tsbsize / sizeof(iopte_t);
132
133 /* Setup initial software IOMMU state. */
134 spin_lock_init(&iommu->lock);
135 iommu->ctx_lowest_free = 1;
136 iommu->page_table_map_base = dma_offset;
137 iommu->dma_addr_mask = dma_addr_mask;
138
139 /* Allocate and initialize the free area map. */
140 sz = num_tsb_entries / 8;
141 sz = (sz + 7UL) & ~7UL;
142 iommu->arena.map = kmalloc(sz, GFP_KERNEL);
143 if (!iommu->arena.map) {
144 prom_printf("PCI_IOMMU: Error, kmalloc(arena.map) failed.\n");
145 prom_halt();
146 }
147 memset(iommu->arena.map, 0, sz);
148 iommu->arena.limit = num_tsb_entries;
160 149
161 /* If the global flush might not have caught this entry, 150 /* Allocate and initialize the dummy page which we
162 * adjust the flush point such that we will flush before 151 * set inactive IO PTEs to point to.
163 * ever trying to reuse it.
164 */ 152 */
165#define between(X,Y,Z) (((Z) - (Y)) >= ((X) - (Y))) 153 iommu->dummy_page = __get_free_pages(GFP_KERNEL, 0);
166 if (between(ent, iommu->alloc_info[cnum].next, iommu->alloc_info[cnum].flush)) 154 if (!iommu->dummy_page) {
167 iommu->alloc_info[cnum].flush = ent; 155 prom_printf("PCI_IOMMU: Error, gfp(dummy_page) failed.\n");
168#undef between 156 prom_halt();
157 }
158 memset((void *)iommu->dummy_page, 0, PAGE_SIZE);
159 iommu->dummy_page_pa = (unsigned long) __pa(iommu->dummy_page);
160
161 /* Now allocate and setup the IOMMU page table itself. */
162 order = get_order(tsbsize);
163 tsbbase = __get_free_pages(GFP_KERNEL, order);
164 if (!tsbbase) {
165 prom_printf("PCI_IOMMU: Error, gfp(tsb) failed.\n");
166 prom_halt();
167 }
168 iommu->page_table = (iopte_t *)tsbbase;
169
170 for (i = 0; i < num_tsb_entries; i++)
171 iopte_make_dummy(iommu, &iommu->page_table[i]);
169} 172}
170 173
171/* We allocate consistent mappings from the end of cluster zero. */ 174static inline iopte_t *alloc_npages(struct pci_iommu *iommu, unsigned long npages)
172static iopte_t *alloc_consistent_cluster(struct pci_iommu *iommu, unsigned long npages)
173{ 175{
174 iopte_t *iopte; 176 long entry;
175 177
176 iopte = iommu->page_table + (1 << (iommu->page_table_sz_bits - PBM_LOGCLUSTERS)); 178 entry = pci_arena_alloc(iommu, npages);
177 while (iopte > iommu->page_table) { 179 if (unlikely(entry < 0))
178 iopte--; 180 return NULL;
179 if (IOPTE_IS_DUMMY(iommu, iopte)) {
180 unsigned long tmp = npages;
181 181
182 while (--tmp) { 182 return iommu->page_table + entry;
183 iopte--; 183}
184 if (!IOPTE_IS_DUMMY(iommu, iopte))
185 break;
186 }
187 if (tmp == 0) {
188 u32 entry = (iopte - iommu->page_table);
189 184
190 if (entry < iommu->lowest_consistent_map) 185static inline void free_npages(struct pci_iommu *iommu, dma_addr_t base, unsigned long npages)
191 iommu->lowest_consistent_map = entry; 186{
192 return iopte; 187 pci_arena_free(&iommu->arena, base >> IO_PAGE_SHIFT, npages);
193 }
194 }
195 }
196 return NULL;
197} 188}
198 189
199static int iommu_alloc_ctx(struct pci_iommu *iommu) 190static int iommu_alloc_ctx(struct pci_iommu *iommu)
@@ -233,7 +224,7 @@ void *pci_alloc_consistent(struct pci_dev *pdev, size_t size, dma_addr_t *dma_ad
233 struct pcidev_cookie *pcp; 224 struct pcidev_cookie *pcp;
234 struct pci_iommu *iommu; 225 struct pci_iommu *iommu;
235 iopte_t *iopte; 226 iopte_t *iopte;
236 unsigned long flags, order, first_page, ctx; 227 unsigned long flags, order, first_page;
237 void *ret; 228 void *ret;
238 int npages; 229 int npages;
239 230
@@ -251,9 +242,10 @@ void *pci_alloc_consistent(struct pci_dev *pdev, size_t size, dma_addr_t *dma_ad
251 iommu = pcp->pbm->iommu; 242 iommu = pcp->pbm->iommu;
252 243
253 spin_lock_irqsave(&iommu->lock, flags); 244 spin_lock_irqsave(&iommu->lock, flags);
254 iopte = alloc_consistent_cluster(iommu, size >> IO_PAGE_SHIFT); 245 iopte = alloc_npages(iommu, size >> IO_PAGE_SHIFT);
255 if (iopte == NULL) { 246 spin_unlock_irqrestore(&iommu->lock, flags);
256 spin_unlock_irqrestore(&iommu->lock, flags); 247
248 if (unlikely(iopte == NULL)) {
257 free_pages(first_page, order); 249 free_pages(first_page, order);
258 return NULL; 250 return NULL;
259 } 251 }
@@ -262,31 +254,15 @@ void *pci_alloc_consistent(struct pci_dev *pdev, size_t size, dma_addr_t *dma_ad
262 ((iopte - iommu->page_table) << IO_PAGE_SHIFT)); 254 ((iopte - iommu->page_table) << IO_PAGE_SHIFT));
263 ret = (void *) first_page; 255 ret = (void *) first_page;
264 npages = size >> IO_PAGE_SHIFT; 256 npages = size >> IO_PAGE_SHIFT;
265 ctx = 0;
266 if (iommu->iommu_ctxflush)
267 ctx = iommu_alloc_ctx(iommu);
268 first_page = __pa(first_page); 257 first_page = __pa(first_page);
269 while (npages--) { 258 while (npages--) {
270 iopte_val(*iopte) = (IOPTE_CONSISTENT(ctx) | 259 iopte_val(*iopte) = (IOPTE_CONSISTENT(0UL) |
271 IOPTE_WRITE | 260 IOPTE_WRITE |
272 (first_page & IOPTE_PAGE)); 261 (first_page & IOPTE_PAGE));
273 iopte++; 262 iopte++;
274 first_page += IO_PAGE_SIZE; 263 first_page += IO_PAGE_SIZE;
275 } 264 }
276 265
277 {
278 int i;
279 u32 daddr = *dma_addrp;
280
281 npages = size >> IO_PAGE_SHIFT;
282 for (i = 0; i < npages; i++) {
283 pci_iommu_write(iommu->iommu_flush, daddr);
284 daddr += IO_PAGE_SIZE;
285 }
286 }
287
288 spin_unlock_irqrestore(&iommu->lock, flags);
289
290 return ret; 266 return ret;
291} 267}
292 268
@@ -296,7 +272,7 @@ void pci_free_consistent(struct pci_dev *pdev, size_t size, void *cpu, dma_addr_
296 struct pcidev_cookie *pcp; 272 struct pcidev_cookie *pcp;
297 struct pci_iommu *iommu; 273 struct pci_iommu *iommu;
298 iopte_t *iopte; 274 iopte_t *iopte;
299 unsigned long flags, order, npages, i, ctx; 275 unsigned long flags, order, npages;
300 276
301 npages = IO_PAGE_ALIGN(size) >> IO_PAGE_SHIFT; 277 npages = IO_PAGE_ALIGN(size) >> IO_PAGE_SHIFT;
302 pcp = pdev->sysdata; 278 pcp = pdev->sysdata;
@@ -306,46 +282,7 @@ void pci_free_consistent(struct pci_dev *pdev, size_t size, void *cpu, dma_addr_
306 282
307 spin_lock_irqsave(&iommu->lock, flags); 283 spin_lock_irqsave(&iommu->lock, flags);
308 284
309 if ((iopte - iommu->page_table) == 285 free_npages(iommu, dvma, npages);
310 iommu->lowest_consistent_map) {
311 iopte_t *walk = iopte + npages;
312 iopte_t *limit;
313
314 limit = (iommu->page_table +
315 (1 << (iommu->page_table_sz_bits - PBM_LOGCLUSTERS)));
316 while (walk < limit) {
317 if (!IOPTE_IS_DUMMY(iommu, walk))
318 break;
319 walk++;
320 }
321 iommu->lowest_consistent_map =
322 (walk - iommu->page_table);
323 }
324
325 /* Data for consistent mappings cannot enter the streaming
326 * buffers, so we only need to update the TSB. We flush
327 * the IOMMU here as well to prevent conflicts with the
328 * streaming mapping deferred tlb flush scheme.
329 */
330
331 ctx = 0;
332 if (iommu->iommu_ctxflush)
333 ctx = (iopte_val(*iopte) & IOPTE_CONTEXT) >> 47UL;
334
335 for (i = 0; i < npages; i++, iopte++)
336 iopte_make_dummy(iommu, iopte);
337
338 if (iommu->iommu_ctxflush) {
339 pci_iommu_write(iommu->iommu_ctxflush, ctx);
340 } else {
341 for (i = 0; i < npages; i++) {
342 u32 daddr = dvma + (i << IO_PAGE_SHIFT);
343
344 pci_iommu_write(iommu->iommu_flush, daddr);
345 }
346 }
347
348 iommu_free_ctx(iommu, ctx);
349 286
350 spin_unlock_irqrestore(&iommu->lock, flags); 287 spin_unlock_irqrestore(&iommu->lock, flags);
351 288
@@ -372,25 +309,27 @@ dma_addr_t pci_map_single(struct pci_dev *pdev, void *ptr, size_t sz, int direct
372 iommu = pcp->pbm->iommu; 309 iommu = pcp->pbm->iommu;
373 strbuf = &pcp->pbm->stc; 310 strbuf = &pcp->pbm->stc;
374 311
375 if (direction == PCI_DMA_NONE) 312 if (unlikely(direction == PCI_DMA_NONE))
376 BUG(); 313 goto bad_no_ctx;
377 314
378 oaddr = (unsigned long)ptr; 315 oaddr = (unsigned long)ptr;
379 npages = IO_PAGE_ALIGN(oaddr + sz) - (oaddr & IO_PAGE_MASK); 316 npages = IO_PAGE_ALIGN(oaddr + sz) - (oaddr & IO_PAGE_MASK);
380 npages >>= IO_PAGE_SHIFT; 317 npages >>= IO_PAGE_SHIFT;
381 318
382 spin_lock_irqsave(&iommu->lock, flags); 319 spin_lock_irqsave(&iommu->lock, flags);
320 base = alloc_npages(iommu, npages);
321 ctx = 0;
322 if (iommu->iommu_ctxflush)
323 ctx = iommu_alloc_ctx(iommu);
324 spin_unlock_irqrestore(&iommu->lock, flags);
383 325
384 base = alloc_streaming_cluster(iommu, npages); 326 if (unlikely(!base))
385 if (base == NULL)
386 goto bad; 327 goto bad;
328
387 bus_addr = (iommu->page_table_map_base + 329 bus_addr = (iommu->page_table_map_base +
388 ((base - iommu->page_table) << IO_PAGE_SHIFT)); 330 ((base - iommu->page_table) << IO_PAGE_SHIFT));
389 ret = bus_addr | (oaddr & ~IO_PAGE_MASK); 331 ret = bus_addr | (oaddr & ~IO_PAGE_MASK);
390 base_paddr = __pa(oaddr & IO_PAGE_MASK); 332 base_paddr = __pa(oaddr & IO_PAGE_MASK);
391 ctx = 0;
392 if (iommu->iommu_ctxflush)
393 ctx = iommu_alloc_ctx(iommu);
394 if (strbuf->strbuf_enabled) 333 if (strbuf->strbuf_enabled)
395 iopte_protection = IOPTE_STREAMING(ctx); 334 iopte_protection = IOPTE_STREAMING(ctx);
396 else 335 else
@@ -401,12 +340,13 @@ dma_addr_t pci_map_single(struct pci_dev *pdev, void *ptr, size_t sz, int direct
401 for (i = 0; i < npages; i++, base++, base_paddr += IO_PAGE_SIZE) 340 for (i = 0; i < npages; i++, base++, base_paddr += IO_PAGE_SIZE)
402 iopte_val(*base) = iopte_protection | base_paddr; 341 iopte_val(*base) = iopte_protection | base_paddr;
403 342
404 spin_unlock_irqrestore(&iommu->lock, flags);
405
406 return ret; 343 return ret;
407 344
408bad: 345bad:
409 spin_unlock_irqrestore(&iommu->lock, flags); 346 iommu_free_ctx(iommu, ctx);
347bad_no_ctx:
348 if (printk_ratelimit())
349 WARN_ON(1);
410 return PCI_DMA_ERROR_CODE; 350 return PCI_DMA_ERROR_CODE;
411} 351}
412 352
@@ -481,10 +421,13 @@ void pci_unmap_single(struct pci_dev *pdev, dma_addr_t bus_addr, size_t sz, int
481 struct pci_iommu *iommu; 421 struct pci_iommu *iommu;
482 struct pci_strbuf *strbuf; 422 struct pci_strbuf *strbuf;
483 iopte_t *base; 423 iopte_t *base;
484 unsigned long flags, npages, ctx; 424 unsigned long flags, npages, ctx, i;
485 425
486 if (direction == PCI_DMA_NONE) 426 if (unlikely(direction == PCI_DMA_NONE)) {
487 BUG(); 427 if (printk_ratelimit())
428 WARN_ON(1);
429 return;
430 }
488 431
489 pcp = pdev->sysdata; 432 pcp = pdev->sysdata;
490 iommu = pcp->pbm->iommu; 433 iommu = pcp->pbm->iommu;
@@ -510,13 +453,14 @@ void pci_unmap_single(struct pci_dev *pdev, dma_addr_t bus_addr, size_t sz, int
510 453
511 /* Step 1: Kick data out of streaming buffers if necessary. */ 454 /* Step 1: Kick data out of streaming buffers if necessary. */
512 if (strbuf->strbuf_enabled) 455 if (strbuf->strbuf_enabled)
513 pci_strbuf_flush(strbuf, iommu, bus_addr, ctx, npages, direction); 456 pci_strbuf_flush(strbuf, iommu, bus_addr, ctx,
457 npages, direction);
514 458
515 /* Step 2: Clear out first TSB entry. */ 459 /* Step 2: Clear out TSB entries. */
516 iopte_make_dummy(iommu, base); 460 for (i = 0; i < npages; i++)
461 iopte_make_dummy(iommu, base + i);
517 462
518 free_streaming_cluster(iommu, bus_addr - iommu->page_table_map_base, 463 free_npages(iommu, bus_addr - iommu->page_table_map_base, npages);
519 npages, ctx);
520 464
521 iommu_free_ctx(iommu, ctx); 465 iommu_free_ctx(iommu, ctx);
522 466
@@ -621,6 +565,8 @@ int pci_map_sg(struct pci_dev *pdev, struct scatterlist *sglist, int nelems, int
621 pci_map_single(pdev, 565 pci_map_single(pdev,
622 (page_address(sglist->page) + sglist->offset), 566 (page_address(sglist->page) + sglist->offset),
623 sglist->length, direction); 567 sglist->length, direction);
568 if (unlikely(sglist->dma_address == PCI_DMA_ERROR_CODE))
569 return 0;
624 sglist->dma_length = sglist->length; 570 sglist->dma_length = sglist->length;
625 return 1; 571 return 1;
626 } 572 }
@@ -629,21 +575,29 @@ int pci_map_sg(struct pci_dev *pdev, struct scatterlist *sglist, int nelems, int
629 iommu = pcp->pbm->iommu; 575 iommu = pcp->pbm->iommu;
630 strbuf = &pcp->pbm->stc; 576 strbuf = &pcp->pbm->stc;
631 577
632 if (direction == PCI_DMA_NONE) 578 if (unlikely(direction == PCI_DMA_NONE))
633 BUG(); 579 goto bad_no_ctx;
634 580
635 /* Step 1: Prepare scatter list. */ 581 /* Step 1: Prepare scatter list. */
636 582
637 npages = prepare_sg(sglist, nelems); 583 npages = prepare_sg(sglist, nelems);
638 584
639 /* Step 2: Allocate a cluster. */ 585 /* Step 2: Allocate a cluster and context, if necessary. */
640 586
641 spin_lock_irqsave(&iommu->lock, flags); 587 spin_lock_irqsave(&iommu->lock, flags);
642 588
643 base = alloc_streaming_cluster(iommu, npages); 589 base = alloc_npages(iommu, npages);
590 ctx = 0;
591 if (iommu->iommu_ctxflush)
592 ctx = iommu_alloc_ctx(iommu);
593
594 spin_unlock_irqrestore(&iommu->lock, flags);
595
644 if (base == NULL) 596 if (base == NULL)
645 goto bad; 597 goto bad;
646 dma_base = iommu->page_table_map_base + ((base - iommu->page_table) << IO_PAGE_SHIFT); 598
599 dma_base = iommu->page_table_map_base +
600 ((base - iommu->page_table) << IO_PAGE_SHIFT);
647 601
648 /* Step 3: Normalize DMA addresses. */ 602 /* Step 3: Normalize DMA addresses. */
649 used = nelems; 603 used = nelems;
@@ -656,30 +610,28 @@ int pci_map_sg(struct pci_dev *pdev, struct scatterlist *sglist, int nelems, int
656 } 610 }
657 used = nelems - used; 611 used = nelems - used;
658 612
659 /* Step 4: Choose a context if necessary. */ 613 /* Step 4: Create the mappings. */
660 ctx = 0;
661 if (iommu->iommu_ctxflush)
662 ctx = iommu_alloc_ctx(iommu);
663
664 /* Step 5: Create the mappings. */
665 if (strbuf->strbuf_enabled) 614 if (strbuf->strbuf_enabled)
666 iopte_protection = IOPTE_STREAMING(ctx); 615 iopte_protection = IOPTE_STREAMING(ctx);
667 else 616 else
668 iopte_protection = IOPTE_CONSISTENT(ctx); 617 iopte_protection = IOPTE_CONSISTENT(ctx);
669 if (direction != PCI_DMA_TODEVICE) 618 if (direction != PCI_DMA_TODEVICE)
670 iopte_protection |= IOPTE_WRITE; 619 iopte_protection |= IOPTE_WRITE;
671 fill_sg (base, sglist, used, nelems, iopte_protection); 620
621 fill_sg(base, sglist, used, nelems, iopte_protection);
622
672#ifdef VERIFY_SG 623#ifdef VERIFY_SG
673 verify_sglist(sglist, nelems, base, npages); 624 verify_sglist(sglist, nelems, base, npages);
674#endif 625#endif
675 626
676 spin_unlock_irqrestore(&iommu->lock, flags);
677
678 return used; 627 return used;
679 628
680bad: 629bad:
681 spin_unlock_irqrestore(&iommu->lock, flags); 630 iommu_free_ctx(iommu, ctx);
682 return PCI_DMA_ERROR_CODE; 631bad_no_ctx:
632 if (printk_ratelimit())
633 WARN_ON(1);
634 return 0;
683} 635}
684 636
685/* Unmap a set of streaming mode DMA translations. */ 637/* Unmap a set of streaming mode DMA translations. */
@@ -692,8 +644,10 @@ void pci_unmap_sg(struct pci_dev *pdev, struct scatterlist *sglist, int nelems,
692 unsigned long flags, ctx, i, npages; 644 unsigned long flags, ctx, i, npages;
693 u32 bus_addr; 645 u32 bus_addr;
694 646
695 if (direction == PCI_DMA_NONE) 647 if (unlikely(direction == PCI_DMA_NONE)) {
696 BUG(); 648 if (printk_ratelimit())
649 WARN_ON(1);
650 }
697 651
698 pcp = pdev->sysdata; 652 pcp = pdev->sysdata;
699 iommu = pcp->pbm->iommu; 653 iommu = pcp->pbm->iommu;
@@ -705,7 +659,8 @@ void pci_unmap_sg(struct pci_dev *pdev, struct scatterlist *sglist, int nelems,
705 if (sglist[i].dma_length == 0) 659 if (sglist[i].dma_length == 0)
706 break; 660 break;
707 i--; 661 i--;
708 npages = (IO_PAGE_ALIGN(sglist[i].dma_address + sglist[i].dma_length) - bus_addr) >> IO_PAGE_SHIFT; 662 npages = (IO_PAGE_ALIGN(sglist[i].dma_address + sglist[i].dma_length) -
663 bus_addr) >> IO_PAGE_SHIFT;
709 664
710 base = iommu->page_table + 665 base = iommu->page_table +
711 ((bus_addr - iommu->page_table_map_base) >> IO_PAGE_SHIFT); 666 ((bus_addr - iommu->page_table_map_base) >> IO_PAGE_SHIFT);
@@ -726,11 +681,11 @@ void pci_unmap_sg(struct pci_dev *pdev, struct scatterlist *sglist, int nelems,
726 if (strbuf->strbuf_enabled) 681 if (strbuf->strbuf_enabled)
727 pci_strbuf_flush(strbuf, iommu, bus_addr, ctx, npages, direction); 682 pci_strbuf_flush(strbuf, iommu, bus_addr, ctx, npages, direction);
728 683
729 /* Step 2: Clear out first TSB entry. */ 684 /* Step 2: Clear out the TSB entries. */
730 iopte_make_dummy(iommu, base); 685 for (i = 0; i < npages; i++)
686 iopte_make_dummy(iommu, base + i);
731 687
732 free_streaming_cluster(iommu, bus_addr - iommu->page_table_map_base, 688 free_npages(iommu, bus_addr - iommu->page_table_map_base, npages);
733 npages, ctx);
734 689
735 iommu_free_ctx(iommu, ctx); 690 iommu_free_ctx(iommu, ctx);
736 691
diff --git a/arch/sparc64/kernel/pci_psycho.c b/arch/sparc64/kernel/pci_psycho.c
index 6ed1ef25e0ac..c03ed5f49d31 100644
--- a/arch/sparc64/kernel/pci_psycho.c
+++ b/arch/sparc64/kernel/pci_psycho.c
@@ -1207,13 +1207,9 @@ static void psycho_scan_bus(struct pci_controller_info *p)
1207static void psycho_iommu_init(struct pci_controller_info *p) 1207static void psycho_iommu_init(struct pci_controller_info *p)
1208{ 1208{
1209 struct pci_iommu *iommu = p->pbm_A.iommu; 1209 struct pci_iommu *iommu = p->pbm_A.iommu;
1210 unsigned long tsbbase, i; 1210 unsigned long i;
1211 u64 control; 1211 u64 control;
1212 1212
1213 /* Setup initial software IOMMU state. */
1214 spin_lock_init(&iommu->lock);
1215 iommu->ctx_lowest_free = 1;
1216
1217 /* Register addresses. */ 1213 /* Register addresses. */
1218 iommu->iommu_control = p->pbm_A.controller_regs + PSYCHO_IOMMU_CONTROL; 1214 iommu->iommu_control = p->pbm_A.controller_regs + PSYCHO_IOMMU_CONTROL;
1219 iommu->iommu_tsbbase = p->pbm_A.controller_regs + PSYCHO_IOMMU_TSBBASE; 1215 iommu->iommu_tsbbase = p->pbm_A.controller_regs + PSYCHO_IOMMU_TSBBASE;
@@ -1240,40 +1236,10 @@ static void psycho_iommu_init(struct pci_controller_info *p)
1240 /* Leave diag mode enabled for full-flushing done 1236 /* Leave diag mode enabled for full-flushing done
1241 * in pci_iommu.c 1237 * in pci_iommu.c
1242 */ 1238 */
1239 pci_iommu_table_init(iommu, IO_TSB_SIZE, 0xc0000000, 0xffffffff);
1243 1240
1244 iommu->dummy_page = __get_free_pages(GFP_KERNEL, 0); 1241 psycho_write(p->pbm_A.controller_regs + PSYCHO_IOMMU_TSBBASE,
1245 if (!iommu->dummy_page) { 1242 __pa(iommu->page_table));
1246 prom_printf("PSYCHO_IOMMU: Error, gfp(dummy_page) failed.\n");
1247 prom_halt();
1248 }
1249 memset((void *)iommu->dummy_page, 0, PAGE_SIZE);
1250 iommu->dummy_page_pa = (unsigned long) __pa(iommu->dummy_page);
1251
1252 /* Using assumed page size 8K with 128K entries we need 1MB iommu page
1253 * table (128K ioptes * 8 bytes per iopte). This is
1254 * page order 7 on UltraSparc.
1255 */
1256 tsbbase = __get_free_pages(GFP_KERNEL, get_order(IO_TSB_SIZE));
1257 if (!tsbbase) {
1258 prom_printf("PSYCHO_IOMMU: Error, gfp(tsb) failed.\n");
1259 prom_halt();
1260 }
1261 iommu->page_table = (iopte_t *)tsbbase;
1262 iommu->page_table_sz_bits = 17;
1263 iommu->page_table_map_base = 0xc0000000;
1264 iommu->dma_addr_mask = 0xffffffff;
1265 pci_iommu_table_init(iommu, IO_TSB_SIZE);
1266
1267 /* We start with no consistent mappings. */
1268 iommu->lowest_consistent_map =
1269 1 << (iommu->page_table_sz_bits - PBM_LOGCLUSTERS);
1270
1271 for (i = 0; i < PBM_NCLUSTERS; i++) {
1272 iommu->alloc_info[i].flush = 0;
1273 iommu->alloc_info[i].next = 0;
1274 }
1275
1276 psycho_write(p->pbm_A.controller_regs + PSYCHO_IOMMU_TSBBASE, __pa(tsbbase));
1277 1243
1278 control = psycho_read(p->pbm_A.controller_regs + PSYCHO_IOMMU_CONTROL); 1244 control = psycho_read(p->pbm_A.controller_regs + PSYCHO_IOMMU_CONTROL);
1279 control &= ~(PSYCHO_IOMMU_CTRL_TSBSZ | PSYCHO_IOMMU_CTRL_TBWSZ); 1245 control &= ~(PSYCHO_IOMMU_CTRL_TSBSZ | PSYCHO_IOMMU_CTRL_TBWSZ);
@@ -1281,7 +1247,7 @@ static void psycho_iommu_init(struct pci_controller_info *p)
1281 psycho_write(p->pbm_A.controller_regs + PSYCHO_IOMMU_CONTROL, control); 1247 psycho_write(p->pbm_A.controller_regs + PSYCHO_IOMMU_CONTROL, control);
1282 1248
1283 /* If necessary, hook us up for starfire IRQ translations. */ 1249 /* If necessary, hook us up for starfire IRQ translations. */
1284 if(this_is_starfire) 1250 if (this_is_starfire)
1285 p->starfire_cookie = starfire_hookup(p->pbm_A.portid); 1251 p->starfire_cookie = starfire_hookup(p->pbm_A.portid);
1286 else 1252 else
1287 p->starfire_cookie = NULL; 1253 p->starfire_cookie = NULL;
diff --git a/arch/sparc64/kernel/pci_sabre.c b/arch/sparc64/kernel/pci_sabre.c
index 0ee6bd5b9ac6..da8e1364194f 100644
--- a/arch/sparc64/kernel/pci_sabre.c
+++ b/arch/sparc64/kernel/pci_sabre.c
@@ -1267,13 +1267,9 @@ static void sabre_iommu_init(struct pci_controller_info *p,
1267 u32 dma_mask) 1267 u32 dma_mask)
1268{ 1268{
1269 struct pci_iommu *iommu = p->pbm_A.iommu; 1269 struct pci_iommu *iommu = p->pbm_A.iommu;
1270 unsigned long tsbbase, i, order; 1270 unsigned long i;
1271 u64 control; 1271 u64 control;
1272 1272
1273 /* Setup initial software IOMMU state. */
1274 spin_lock_init(&iommu->lock);
1275 iommu->ctx_lowest_free = 1;
1276
1277 /* Register addresses. */ 1273 /* Register addresses. */
1278 iommu->iommu_control = p->pbm_A.controller_regs + SABRE_IOMMU_CONTROL; 1274 iommu->iommu_control = p->pbm_A.controller_regs + SABRE_IOMMU_CONTROL;
1279 iommu->iommu_tsbbase = p->pbm_A.controller_regs + SABRE_IOMMU_TSBBASE; 1275 iommu->iommu_tsbbase = p->pbm_A.controller_regs + SABRE_IOMMU_TSBBASE;
@@ -1295,26 +1291,10 @@ static void sabre_iommu_init(struct pci_controller_info *p,
1295 /* Leave diag mode enabled for full-flushing done 1291 /* Leave diag mode enabled for full-flushing done
1296 * in pci_iommu.c 1292 * in pci_iommu.c
1297 */ 1293 */
1294 pci_iommu_table_init(iommu, tsbsize * 1024 * 8, dvma_offset, dma_mask);
1298 1295
1299 iommu->dummy_page = __get_free_pages(GFP_KERNEL, 0); 1296 sabre_write(p->pbm_A.controller_regs + SABRE_IOMMU_TSBBASE,
1300 if (!iommu->dummy_page) { 1297 __pa(iommu->page_table));
1301 prom_printf("PSYCHO_IOMMU: Error, gfp(dummy_page) failed.\n");
1302 prom_halt();
1303 }
1304 memset((void *)iommu->dummy_page, 0, PAGE_SIZE);
1305 iommu->dummy_page_pa = (unsigned long) __pa(iommu->dummy_page);
1306
1307 tsbbase = __get_free_pages(GFP_KERNEL, order = get_order(tsbsize * 1024 * 8));
1308 if (!tsbbase) {
1309 prom_printf("SABRE_IOMMU: Error, gfp(tsb) failed.\n");
1310 prom_halt();
1311 }
1312 iommu->page_table = (iopte_t *)tsbbase;
1313 iommu->page_table_map_base = dvma_offset;
1314 iommu->dma_addr_mask = dma_mask;
1315 pci_iommu_table_init(iommu, PAGE_SIZE << order);
1316
1317 sabre_write(p->pbm_A.controller_regs + SABRE_IOMMU_TSBBASE, __pa(tsbbase));
1318 1298
1319 control = sabre_read(p->pbm_A.controller_regs + SABRE_IOMMU_CONTROL); 1299 control = sabre_read(p->pbm_A.controller_regs + SABRE_IOMMU_CONTROL);
1320 control &= ~(SABRE_IOMMUCTRL_TSBSZ | SABRE_IOMMUCTRL_TBWSZ); 1300 control &= ~(SABRE_IOMMUCTRL_TSBSZ | SABRE_IOMMUCTRL_TBWSZ);
@@ -1322,11 +1302,9 @@ static void sabre_iommu_init(struct pci_controller_info *p,
1322 switch(tsbsize) { 1302 switch(tsbsize) {
1323 case 64: 1303 case 64:
1324 control |= SABRE_IOMMU_TSBSZ_64K; 1304 control |= SABRE_IOMMU_TSBSZ_64K;
1325 iommu->page_table_sz_bits = 16;
1326 break; 1305 break;
1327 case 128: 1306 case 128:
1328 control |= SABRE_IOMMU_TSBSZ_128K; 1307 control |= SABRE_IOMMU_TSBSZ_128K;
1329 iommu->page_table_sz_bits = 17;
1330 break; 1308 break;
1331 default: 1309 default:
1332 prom_printf("iommu_init: Illegal TSB size %d\n", tsbsize); 1310 prom_printf("iommu_init: Illegal TSB size %d\n", tsbsize);
@@ -1334,15 +1312,6 @@ static void sabre_iommu_init(struct pci_controller_info *p,
1334 break; 1312 break;
1335 } 1313 }
1336 sabre_write(p->pbm_A.controller_regs + SABRE_IOMMU_CONTROL, control); 1314 sabre_write(p->pbm_A.controller_regs + SABRE_IOMMU_CONTROL, control);
1337
1338 /* We start with no consistent mappings. */
1339 iommu->lowest_consistent_map =
1340 1 << (iommu->page_table_sz_bits - PBM_LOGCLUSTERS);
1341
1342 for (i = 0; i < PBM_NCLUSTERS; i++) {
1343 iommu->alloc_info[i].flush = 0;
1344 iommu->alloc_info[i].next = 0;
1345 }
1346} 1315}
1347 1316
1348static void pbm_register_toplevel_resources(struct pci_controller_info *p, 1317static void pbm_register_toplevel_resources(struct pci_controller_info *p,
diff --git a/arch/sparc64/kernel/pci_schizo.c b/arch/sparc64/kernel/pci_schizo.c
index cae5b61fe2f0..d8c4e0919b4e 100644
--- a/arch/sparc64/kernel/pci_schizo.c
+++ b/arch/sparc64/kernel/pci_schizo.c
@@ -1765,7 +1765,7 @@ static void schizo_pbm_strbuf_init(struct pci_pbm_info *pbm)
1765static void schizo_pbm_iommu_init(struct pci_pbm_info *pbm) 1765static void schizo_pbm_iommu_init(struct pci_pbm_info *pbm)
1766{ 1766{
1767 struct pci_iommu *iommu = pbm->iommu; 1767 struct pci_iommu *iommu = pbm->iommu;
1768 unsigned long tsbbase, i, tagbase, database, order; 1768 unsigned long i, tagbase, database;
1769 u32 vdma[2], dma_mask; 1769 u32 vdma[2], dma_mask;
1770 u64 control; 1770 u64 control;
1771 int err, tsbsize; 1771 int err, tsbsize;
@@ -1800,10 +1800,6 @@ static void schizo_pbm_iommu_init(struct pci_pbm_info *pbm)
1800 prom_halt(); 1800 prom_halt();
1801 }; 1801 };
1802 1802
1803 /* Setup initial software IOMMU state. */
1804 spin_lock_init(&iommu->lock);
1805 iommu->ctx_lowest_free = 1;
1806
1807 /* Register addresses, SCHIZO has iommu ctx flushing. */ 1803 /* Register addresses, SCHIZO has iommu ctx flushing. */
1808 iommu->iommu_control = pbm->pbm_regs + SCHIZO_IOMMU_CONTROL; 1804 iommu->iommu_control = pbm->pbm_regs + SCHIZO_IOMMU_CONTROL;
1809 iommu->iommu_tsbbase = pbm->pbm_regs + SCHIZO_IOMMU_TSBBASE; 1805 iommu->iommu_tsbbase = pbm->pbm_regs + SCHIZO_IOMMU_TSBBASE;
@@ -1832,56 +1828,9 @@ static void schizo_pbm_iommu_init(struct pci_pbm_info *pbm)
1832 /* Leave diag mode enabled for full-flushing done 1828 /* Leave diag mode enabled for full-flushing done
1833 * in pci_iommu.c 1829 * in pci_iommu.c
1834 */ 1830 */
1831 pci_iommu_table_init(iommu, tsbsize * 8 * 1024, vdma[0], dma_mask);
1835 1832
1836 iommu->dummy_page = __get_free_pages(GFP_KERNEL, 0); 1833 schizo_write(iommu->iommu_tsbbase, __pa(iommu->page_table));
1837 if (!iommu->dummy_page) {
1838 prom_printf("PSYCHO_IOMMU: Error, gfp(dummy_page) failed.\n");
1839 prom_halt();
1840 }
1841 memset((void *)iommu->dummy_page, 0, PAGE_SIZE);
1842 iommu->dummy_page_pa = (unsigned long) __pa(iommu->dummy_page);
1843
1844 /* Using assumed page size 8K with 128K entries we need 1MB iommu page
1845 * table (128K ioptes * 8 bytes per iopte). This is
1846 * page order 7 on UltraSparc.
1847 */
1848 order = get_order(tsbsize * 8 * 1024);
1849 tsbbase = __get_free_pages(GFP_KERNEL, order);
1850 if (!tsbbase) {
1851 prom_printf("%s: Error, gfp(tsb) failed.\n", pbm->name);
1852 prom_halt();
1853 }
1854
1855 iommu->page_table = (iopte_t *)tsbbase;
1856 iommu->page_table_map_base = vdma[0];
1857 iommu->dma_addr_mask = dma_mask;
1858 pci_iommu_table_init(iommu, PAGE_SIZE << order);
1859
1860 switch (tsbsize) {
1861 case 64:
1862 iommu->page_table_sz_bits = 16;
1863 break;
1864
1865 case 128:
1866 iommu->page_table_sz_bits = 17;
1867 break;
1868
1869 default:
1870 prom_printf("iommu_init: Illegal TSB size %d\n", tsbsize);
1871 prom_halt();
1872 break;
1873 };
1874
1875 /* We start with no consistent mappings. */
1876 iommu->lowest_consistent_map =
1877 1 << (iommu->page_table_sz_bits - PBM_LOGCLUSTERS);
1878
1879 for (i = 0; i < PBM_NCLUSTERS; i++) {
1880 iommu->alloc_info[i].flush = 0;
1881 iommu->alloc_info[i].next = 0;
1882 }
1883
1884 schizo_write(iommu->iommu_tsbbase, __pa(tsbbase));
1885 1834
1886 control = schizo_read(iommu->iommu_control); 1835 control = schizo_read(iommu->iommu_control);
1887 control &= ~(SCHIZO_IOMMU_CTRL_TSBSZ | SCHIZO_IOMMU_CTRL_TBWSZ); 1836 control &= ~(SCHIZO_IOMMU_CTRL_TSBSZ | SCHIZO_IOMMU_CTRL_TBWSZ);
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c
index 590df5a16f5a..b137fd63f5e1 100644
--- a/arch/sparc64/kernel/smp.c
+++ b/arch/sparc64/kernel/smp.c
@@ -1001,13 +1001,6 @@ void smp_penguin_jailcell(int irq, struct pt_regs *regs)
1001 preempt_enable(); 1001 preempt_enable();
1002} 1002}
1003 1003
1004extern unsigned long xcall_promstop;
1005
1006void smp_promstop_others(void)
1007{
1008 smp_cross_call(&xcall_promstop, 0, 0, 0);
1009}
1010
1011#define prof_multiplier(__cpu) cpu_data(__cpu).multiplier 1004#define prof_multiplier(__cpu) cpu_data(__cpu).multiplier
1012#define prof_counter(__cpu) cpu_data(__cpu).counter 1005#define prof_counter(__cpu) cpu_data(__cpu).counter
1013 1006
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c
index 0d2e967c7200..1e44ee26cee8 100644
--- a/arch/sparc64/mm/init.c
+++ b/arch/sparc64/mm/init.c
@@ -105,7 +105,7 @@ static void __init read_obp_memory(const char *property,
105 regs[i].phys_addr = base; 105 regs[i].phys_addr = base;
106 regs[i].reg_size = size; 106 regs[i].reg_size = size;
107 } 107 }
108 sort(regs, ents, sizeof(struct linux_prom64_registers), 108 sort(regs, ents, sizeof(struct linux_prom64_registers),
109 cmp_p64, NULL); 109 cmp_p64, NULL);
110} 110}
111 111
@@ -367,8 +367,11 @@ struct linux_prom_translation {
367 unsigned long size; 367 unsigned long size;
368 unsigned long data; 368 unsigned long data;
369}; 369};
370static struct linux_prom_translation prom_trans[512] __initdata; 370
371static unsigned int prom_trans_ents __initdata; 371/* Exported for kernel TLB miss handling in ktlb.S */
372struct linux_prom_translation prom_trans[512] __read_mostly;
373unsigned int prom_trans_ents __read_mostly;
374unsigned int swapper_pgd_zero __read_mostly;
372 375
373extern unsigned long prom_boot_page; 376extern unsigned long prom_boot_page;
374extern void prom_remap(unsigned long physpage, unsigned long virtpage, int mmu_ihandle); 377extern void prom_remap(unsigned long physpage, unsigned long virtpage, int mmu_ihandle);
@@ -378,122 +381,57 @@ extern void register_prom_callbacks(void);
378/* Exported for SMP bootup purposes. */ 381/* Exported for SMP bootup purposes. */
379unsigned long kern_locked_tte_data; 382unsigned long kern_locked_tte_data;
380 383
381/* Exported for kernel TLB miss handling in ktlb.S */
382unsigned long prom_pmd_phys __read_mostly;
383unsigned int swapper_pgd_zero __read_mostly;
384
385static pmd_t *prompmd __read_mostly;
386
387#define BASE_PAGE_SIZE 8192
388
389/* 384/*
390 * Translate PROM's mapping we capture at boot time into physical address. 385 * Translate PROM's mapping we capture at boot time into physical address.
391 * The second parameter is only set from prom_callback() invocations. 386 * The second parameter is only set from prom_callback() invocations.
392 */ 387 */
393unsigned long prom_virt_to_phys(unsigned long promva, int *error) 388unsigned long prom_virt_to_phys(unsigned long promva, int *error)
394{ 389{
395 pmd_t *pmdp = prompmd + ((promva >> 23) & 0x7ff); 390 int i;
396 pte_t *ptep;
397 unsigned long base;
398
399 if (pmd_none(*pmdp)) {
400 if (error)
401 *error = 1;
402 return 0;
403 }
404 ptep = (pte_t *)__pmd_page(*pmdp) + ((promva >> 13) & 0x3ff);
405 if (!pte_present(*ptep)) {
406 if (error)
407 *error = 1;
408 return 0;
409 }
410 if (error) {
411 *error = 0;
412 return pte_val(*ptep);
413 }
414 base = pte_val(*ptep) & _PAGE_PADDR;
415
416 return base + (promva & (BASE_PAGE_SIZE - 1));
417}
418 391
419/* The obp translations are saved based on 8k pagesize, since obp can 392 for (i = 0; i < prom_trans_ents; i++) {
420 * use a mixture of pagesizes. Misses to the LOW_OBP_ADDRESS -> 393 struct linux_prom_translation *p = &prom_trans[i];
421 * HI_OBP_ADDRESS range are handled in entry.S and do not use the vpte
422 * scheme (also, see rant in inherit_locked_prom_mappings()).
423 */
424static void __init build_obp_range(unsigned long start, unsigned long end, unsigned long data)
425{
426 unsigned long vaddr;
427 394
428 for (vaddr = start; vaddr < end; vaddr += BASE_PAGE_SIZE) { 395 if (promva >= p->virt &&
429 unsigned long val; 396 promva < (p->virt + p->size)) {
430 pmd_t *pmd; 397 unsigned long base = p->data & _PAGE_PADDR;
431 pte_t *pte;
432 398
433 pmd = prompmd + ((vaddr >> 23) & 0x7ff); 399 if (error)
434 if (pmd_none(*pmd)) { 400 *error = 0;
435 pte = __alloc_bootmem(BASE_PAGE_SIZE, BASE_PAGE_SIZE, 401 return base + (promva & (8192 - 1));
436 PAGE_SIZE);
437 if (!pte)
438 prom_halt();
439 memset(pte, 0, BASE_PAGE_SIZE);
440 pmd_set(pmd, pte);
441 } 402 }
442 pte = (pte_t *) __pmd_page(*pmd) + ((vaddr >> 13) & 0x3ff);
443
444 val = data;
445
446 /* Clear diag TTE bits. */
447 if (tlb_type == spitfire)
448 val &= ~0x0003fe0000000000UL;
449
450 set_pte_at(&init_mm, vaddr, pte,
451 __pte(val | _PAGE_MODIFIED));
452
453 data += BASE_PAGE_SIZE;
454 } 403 }
404 if (error)
405 *error = 1;
406 return 0UL;
455} 407}
456 408
409/* The obp translations are saved based on 8k pagesize, since obp can
410 * use a mixture of pagesizes. Misses to the LOW_OBP_ADDRESS ->
411 * HI_OBP_ADDRESS range are handled in ktlb.S and do not use the vpte
412 * scheme (also, see rant in inherit_locked_prom_mappings()).
413 */
457static inline int in_obp_range(unsigned long vaddr) 414static inline int in_obp_range(unsigned long vaddr)
458{ 415{
459 return (vaddr >= LOW_OBP_ADDRESS && 416 return (vaddr >= LOW_OBP_ADDRESS &&
460 vaddr < HI_OBP_ADDRESS); 417 vaddr < HI_OBP_ADDRESS);
461} 418}
462 419
463#define OBP_PMD_SIZE 2048 420static int cmp_ptrans(const void *a, const void *b)
464static void __init build_obp_pgtable(void)
465{ 421{
466 unsigned long i; 422 const struct linux_prom_translation *x = a, *y = b;
467
468 prompmd = __alloc_bootmem(OBP_PMD_SIZE, OBP_PMD_SIZE, PAGE_SIZE);
469 if (!prompmd)
470 prom_halt();
471
472 memset(prompmd, 0, OBP_PMD_SIZE);
473
474 prom_pmd_phys = __pa(prompmd);
475
476 for (i = 0; i < prom_trans_ents; i++) {
477 unsigned long start, end;
478
479 if (!in_obp_range(prom_trans[i].virt))
480 continue;
481 423
482 start = prom_trans[i].virt; 424 if (x->virt > y->virt)
483 end = start + prom_trans[i].size; 425 return 1;
484 if (end > HI_OBP_ADDRESS) 426 if (x->virt < y->virt)
485 end = HI_OBP_ADDRESS; 427 return -1;
486 428 return 0;
487 build_obp_range(start, end, prom_trans[i].data);
488 }
489} 429}
490 430
491/* Read OBP translations property into 'prom_trans[]'. 431/* Read OBP translations property into 'prom_trans[]'. */
492 * Return the number of entries.
493 */
494static void __init read_obp_translations(void) 432static void __init read_obp_translations(void)
495{ 433{
496 int n, node; 434 int n, node, ents, first, last, i;
497 435
498 node = prom_finddevice("/virtual-memory"); 436 node = prom_finddevice("/virtual-memory");
499 n = prom_getproplen(node, "translations"); 437 n = prom_getproplen(node, "translations");
@@ -515,7 +453,41 @@ static void __init read_obp_translations(void)
515 453
516 n = n / sizeof(struct linux_prom_translation); 454 n = n / sizeof(struct linux_prom_translation);
517 455
518 prom_trans_ents = n; 456 ents = n;
457
458 sort(prom_trans, ents, sizeof(struct linux_prom_translation),
459 cmp_ptrans, NULL);
460
461 /* Now kick out all the non-OBP entries. */
462 for (i = 0; i < ents; i++) {
463 if (in_obp_range(prom_trans[i].virt))
464 break;
465 }
466 first = i;
467 for (; i < ents; i++) {
468 if (!in_obp_range(prom_trans[i].virt))
469 break;
470 }
471 last = i;
472
473 for (i = 0; i < (last - first); i++) {
474 struct linux_prom_translation *src = &prom_trans[i + first];
475 struct linux_prom_translation *dest = &prom_trans[i];
476
477 *dest = *src;
478 }
479 for (; i < ents; i++) {
480 struct linux_prom_translation *dest = &prom_trans[i];
481 dest->virt = dest->size = dest->data = 0x0UL;
482 }
483
484 prom_trans_ents = last - first;
485
486 if (tlb_type == spitfire) {
487 /* Clear diag TTE bits. */
488 for (i = 0; i < prom_trans_ents; i++)
489 prom_trans[i].data &= ~0x0003fe0000000000UL;
490 }
519} 491}
520 492
521static void __init remap_kernel(void) 493static void __init remap_kernel(void)
@@ -553,21 +525,18 @@ static void __init remap_kernel(void)
553} 525}
554 526
555 527
556static void __init inherit_prom_mappings_pre(void) 528static void __init inherit_prom_mappings(void)
557{ 529{
558 read_obp_translations(); 530 read_obp_translations();
559 531
560 /* Now fixup OBP's idea about where we really are mapped. */ 532 /* Now fixup OBP's idea about where we really are mapped. */
561 prom_printf("Remapping the kernel... "); 533 prom_printf("Remapping the kernel... ");
562 remap_kernel(); 534 remap_kernel();
563
564 prom_printf("done.\n"); 535 prom_printf("done.\n");
565}
566 536
567static void __init inherit_prom_mappings_post(void) 537 prom_printf("Registering callbacks... ");
568{
569 build_obp_pgtable();
570 register_prom_callbacks(); 538 register_prom_callbacks();
539 prom_printf("done.\n");
571} 540}
572 541
573/* The OBP specifications for sun4u mark 0xfffffffc00000000 and 542/* The OBP specifications for sun4u mark 0xfffffffc00000000 and
@@ -1519,7 +1488,7 @@ void __init paging_init(void)
1519 1488
1520 swapper_pgd_zero = pgd_val(swapper_pg_dir[0]); 1489 swapper_pgd_zero = pgd_val(swapper_pg_dir[0]);
1521 1490
1522 inherit_prom_mappings_pre(); 1491 inherit_prom_mappings();
1523 1492
1524 /* Ok, we can use our TLB miss and window trap handlers safely. 1493 /* Ok, we can use our TLB miss and window trap handlers safely.
1525 * We need to do a quick peek here to see if we are on StarFire 1494 * We need to do a quick peek here to see if we are on StarFire
@@ -1530,23 +1499,15 @@ void __init paging_init(void)
1530 extern void setup_tba(int); 1499 extern void setup_tba(int);
1531 setup_tba(this_is_starfire); 1500 setup_tba(this_is_starfire);
1532 } 1501 }
1533 __flush_tlb_all();
1534 1502
1535 /* Everything from this point forward, until we are done with 1503 inherit_locked_prom_mappings(1);
1536 * inherit_prom_mappings_post(), must complete successfully 1504
1537 * without calling into the firmware. The firwmare page tables 1505 __flush_tlb_all();
1538 * have not been built, but we are running on the Linux kernel's
1539 * trap table.
1540 */
1541 1506
1542 /* Setup bootmem... */ 1507 /* Setup bootmem... */
1543 pages_avail = 0; 1508 pages_avail = 0;
1544 last_valid_pfn = end_pfn = bootmem_init(&pages_avail); 1509 last_valid_pfn = end_pfn = bootmem_init(&pages_avail);
1545 1510
1546 inherit_prom_mappings_post();
1547
1548 inherit_locked_prom_mappings(1);
1549
1550#ifdef CONFIG_DEBUG_PAGEALLOC 1511#ifdef CONFIG_DEBUG_PAGEALLOC
1551 kernel_physical_mapping_init(); 1512 kernel_physical_mapping_init();
1552#endif 1513#endif
diff --git a/arch/sparc64/mm/ultra.S b/arch/sparc64/mm/ultra.S
index 058b8126c1a7..e4c9151fa116 100644
--- a/arch/sparc64/mm/ultra.S
+++ b/arch/sparc64/mm/ultra.S
@@ -453,22 +453,6 @@ xcall_flush_dcache_page_spitfire: /* %g1 == physical page address
453 nop 453 nop
454 nop 454 nop
455 455
456 .globl xcall_promstop
457xcall_promstop:
458 rdpr %pstate, %g2
459 wrpr %g2, PSTATE_IG | PSTATE_AG, %pstate
460 rdpr %pil, %g2
461 wrpr %g0, 15, %pil
462 sethi %hi(109f), %g7
463 b,pt %xcc, etrap_irq
464109: or %g7, %lo(109b), %g7
465 flushw
466 call prom_stopself
467 nop
468 /* We should not return, just spin if we do... */
4691: b,a,pt %xcc, 1b
470 nop
471
472 .data 456 .data
473 457
474errata32_hwbug: 458errata32_hwbug:
diff --git a/arch/sparc64/prom/misc.c b/arch/sparc64/prom/misc.c
index 9b895faf077b..87f5cfce23bb 100644
--- a/arch/sparc64/prom/misc.c
+++ b/arch/sparc64/prom/misc.c
@@ -68,19 +68,11 @@ void prom_cmdline(void)
68 local_irq_restore(flags); 68 local_irq_restore(flags);
69} 69}
70 70
71#ifdef CONFIG_SMP
72extern void smp_promstop_others(void);
73#endif
74
75/* Drop into the prom, but completely terminate the program. 71/* Drop into the prom, but completely terminate the program.
76 * No chance of continuing. 72 * No chance of continuing.
77 */ 73 */
78void prom_halt(void) 74void prom_halt(void)
79{ 75{
80#ifdef CONFIG_SMP
81 smp_promstop_others();
82 udelay(8000);
83#endif
84again: 76again:
85 p1275_cmd("exit", P1275_INOUT(0, 0)); 77 p1275_cmd("exit", P1275_INOUT(0, 0));
86 goto again; /* PROM is out to get me -DaveM */ 78 goto again; /* PROM is out to get me -DaveM */
@@ -88,10 +80,6 @@ again:
88 80
89void prom_halt_power_off(void) 81void prom_halt_power_off(void)
90{ 82{
91#ifdef CONFIG_SMP
92 smp_promstop_others();
93 udelay(8000);
94#endif
95 p1275_cmd("SUNW,power-off", P1275_INOUT(0, 0)); 83 p1275_cmd("SUNW,power-off", P1275_INOUT(0, 0));
96 84
97 /* if nothing else helps, we just halt */ 85 /* if nothing else helps, we just halt */
diff --git a/arch/um/drivers/Makefile b/arch/um/drivers/Makefile
index 783e18cae090..de17d4c6e02d 100644
--- a/arch/um/drivers/Makefile
+++ b/arch/um/drivers/Makefile
@@ -13,7 +13,7 @@ mcast-objs := mcast_kern.o mcast_user.o
13net-objs := net_kern.o net_user.o 13net-objs := net_kern.o net_user.o
14mconsole-objs := mconsole_kern.o mconsole_user.o 14mconsole-objs := mconsole_kern.o mconsole_user.o
15hostaudio-objs := hostaudio_kern.o 15hostaudio-objs := hostaudio_kern.o
16ubd-objs := ubd_kern.o 16ubd-objs := ubd_kern.o ubd_user.o
17port-objs := port_kern.o port_user.o 17port-objs := port_kern.o port_user.o
18harddog-objs := harddog_kern.o harddog_user.o 18harddog-objs := harddog_kern.o harddog_user.o
19 19
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index e77a38da4350..f73134333f64 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -35,7 +35,6 @@
35#include "linux/blkpg.h" 35#include "linux/blkpg.h"
36#include "linux/genhd.h" 36#include "linux/genhd.h"
37#include "linux/spinlock.h" 37#include "linux/spinlock.h"
38#include "asm/atomic.h"
39#include "asm/segment.h" 38#include "asm/segment.h"
40#include "asm/uaccess.h" 39#include "asm/uaccess.h"
41#include "asm/irq.h" 40#include "asm/irq.h"
@@ -54,21 +53,20 @@
54#include "mem.h" 53#include "mem.h"
55#include "mem_kern.h" 54#include "mem_kern.h"
56#include "cow.h" 55#include "cow.h"
57#include "aio.h"
58 56
59enum ubd_req { UBD_READ, UBD_WRITE }; 57enum ubd_req { UBD_READ, UBD_WRITE };
60 58
61struct io_thread_req { 59struct io_thread_req {
62 enum aio_type op; 60 enum ubd_req op;
63 int fds[2]; 61 int fds[2];
64 unsigned long offsets[2]; 62 unsigned long offsets[2];
65 unsigned long long offset; 63 unsigned long long offset;
66 unsigned long length; 64 unsigned long length;
67 char *buffer; 65 char *buffer;
68 int sectorsize; 66 int sectorsize;
69 int bitmap_offset; 67 unsigned long sector_mask;
70 long bitmap_start; 68 unsigned long long cow_offset;
71 long bitmap_end; 69 unsigned long bitmap_words[2];
72 int error; 70 int error;
73}; 71};
74 72
@@ -82,31 +80,28 @@ extern int create_cow_file(char *cow_file, char *backing_file,
82 unsigned long *bitmap_len_out, 80 unsigned long *bitmap_len_out,
83 int *data_offset_out); 81 int *data_offset_out);
84extern int read_cow_bitmap(int fd, void *buf, int offset, int len); 82extern int read_cow_bitmap(int fd, void *buf, int offset, int len);
85extern void do_io(struct io_thread_req *req, struct request *r, 83extern void do_io(struct io_thread_req *req);
86 unsigned long *bitmap);
87 84
88static inline int ubd_test_bit(__u64 bit, void *data) 85static inline int ubd_test_bit(__u64 bit, unsigned char *data)
89{ 86{
90 unsigned char *buffer = data;
91 __u64 n; 87 __u64 n;
92 int bits, off; 88 int bits, off;
93 89
94 bits = sizeof(buffer[0]) * 8; 90 bits = sizeof(data[0]) * 8;
95 n = bit / bits; 91 n = bit / bits;
96 off = bit % bits; 92 off = bit % bits;
97 return((buffer[n] & (1 << off)) != 0); 93 return((data[n] & (1 << off)) != 0);
98} 94}
99 95
100static inline void ubd_set_bit(__u64 bit, void *data) 96static inline void ubd_set_bit(__u64 bit, unsigned char *data)
101{ 97{
102 unsigned char *buffer = data;
103 __u64 n; 98 __u64 n;
104 int bits, off; 99 int bits, off;
105 100
106 bits = sizeof(buffer[0]) * 8; 101 bits = sizeof(data[0]) * 8;
107 n = bit / bits; 102 n = bit / bits;
108 off = bit % bits; 103 off = bit % bits;
109 buffer[n] |= (1 << off); 104 data[n] |= (1 << off);
110} 105}
111/*End stuff from ubd_user.h*/ 106/*End stuff from ubd_user.h*/
112 107
@@ -115,6 +110,8 @@ static inline void ubd_set_bit(__u64 bit, void *data)
115static DEFINE_SPINLOCK(ubd_io_lock); 110static DEFINE_SPINLOCK(ubd_io_lock);
116static DEFINE_SPINLOCK(ubd_lock); 111static DEFINE_SPINLOCK(ubd_lock);
117 112
113static void (*do_ubd)(void);
114
118static int ubd_open(struct inode * inode, struct file * filp); 115static int ubd_open(struct inode * inode, struct file * filp);
119static int ubd_release(struct inode * inode, struct file * file); 116static int ubd_release(struct inode * inode, struct file * file);
120static int ubd_ioctl(struct inode * inode, struct file * file, 117static int ubd_ioctl(struct inode * inode, struct file * file,
@@ -161,8 +158,6 @@ struct cow {
161 int data_offset; 158 int data_offset;
162}; 159};
163 160
164#define MAX_SG 64
165
166struct ubd { 161struct ubd {
167 char *file; 162 char *file;
168 int count; 163 int count;
@@ -173,7 +168,6 @@ struct ubd {
173 int no_cow; 168 int no_cow;
174 struct cow cow; 169 struct cow cow;
175 struct platform_device pdev; 170 struct platform_device pdev;
176 struct scatterlist sg[MAX_SG];
177}; 171};
178 172
179#define DEFAULT_COW { \ 173#define DEFAULT_COW { \
@@ -466,114 +460,81 @@ __uml_help(fakehd,
466); 460);
467 461
468static void do_ubd_request(request_queue_t * q); 462static void do_ubd_request(request_queue_t * q);
469static int in_ubd; 463
464/* Only changed by ubd_init, which is an initcall. */
465int thread_fd = -1;
470 466
471/* Changed by ubd_handler, which is serialized because interrupts only 467/* Changed by ubd_handler, which is serialized because interrupts only
472 * happen on CPU 0. 468 * happen on CPU 0.
473 */ 469 */
474int intr_count = 0; 470int intr_count = 0;
475 471
476static void ubd_end_request(struct request *req, int bytes, int uptodate) 472/* call ubd_finish if you need to serialize */
473static void __ubd_finish(struct request *req, int error)
477{ 474{
478 if (!end_that_request_first(req, uptodate, bytes >> 9)) { 475 int nsect;
479 add_disk_randomness(req->rq_disk); 476
480 end_that_request_last(req); 477 if(error){
478 end_request(req, 0);
479 return;
481 } 480 }
481 nsect = req->current_nr_sectors;
482 req->sector += nsect;
483 req->buffer += nsect << 9;
484 req->errors = 0;
485 req->nr_sectors -= nsect;
486 req->current_nr_sectors = 0;
487 end_request(req, 1);
482} 488}
483 489
484/* call ubd_finish if you need to serialize */ 490static inline void ubd_finish(struct request *req, int error)
485static void __ubd_finish(struct request *req, int bytes)
486{ 491{
487 if(bytes < 0){ 492 spin_lock(&ubd_io_lock);
488 ubd_end_request(req, 0, 0); 493 __ubd_finish(req, error);
489 return; 494 spin_unlock(&ubd_io_lock);
490 }
491
492 ubd_end_request(req, bytes, 1);
493} 495}
494 496
495static inline void ubd_finish(struct request *req, int bytes) 497/* Called without ubd_io_lock held */
498static void ubd_handler(void)
496{ 499{
497 spin_lock(&ubd_io_lock); 500 struct io_thread_req req;
498 __ubd_finish(req, bytes); 501 struct request *rq = elv_next_request(ubd_queue);
499 spin_unlock(&ubd_io_lock); 502 int n;
503
504 do_ubd = NULL;
505 intr_count++;
506 n = os_read_file(thread_fd, &req, sizeof(req));
507 if(n != sizeof(req)){
508 printk(KERN_ERR "Pid %d - spurious interrupt in ubd_handler, "
509 "err = %d\n", os_getpid(), -n);
510 spin_lock(&ubd_io_lock);
511 end_request(rq, 0);
512 spin_unlock(&ubd_io_lock);
513 return;
514 }
515
516 ubd_finish(rq, req.error);
517 reactivate_fd(thread_fd, UBD_IRQ);
518 do_ubd_request(ubd_queue);
500} 519}
501 520
502struct bitmap_io {
503 atomic_t count;
504 struct aio_context aio;
505};
506
507struct ubd_aio {
508 struct aio_context aio;
509 struct request *req;
510 int len;
511 struct bitmap_io *bitmap;
512 void *bitmap_buf;
513};
514
515static int ubd_reply_fd = -1;
516
517static irqreturn_t ubd_intr(int irq, void *dev, struct pt_regs *unused) 521static irqreturn_t ubd_intr(int irq, void *dev, struct pt_regs *unused)
518{ 522{
519 struct aio_thread_reply reply; 523 ubd_handler();
520 struct ubd_aio *aio; 524 return(IRQ_HANDLED);
521 struct request *req; 525}
522 int err, n, fd = (int) (long) dev;
523
524 while(1){
525 err = os_read_file(fd, &reply, sizeof(reply));
526 if(err == -EAGAIN)
527 break;
528 if(err < 0){
529 printk("ubd_aio_handler - read returned err %d\n",
530 -err);
531 break;
532 }
533
534 aio = container_of(reply.data, struct ubd_aio, aio);
535 n = reply.err;
536
537 if(n == 0){
538 req = aio->req;
539 req->nr_sectors -= aio->len >> 9;
540
541 if((aio->bitmap != NULL) &&
542 (atomic_dec_and_test(&aio->bitmap->count))){
543 aio->aio = aio->bitmap->aio;
544 aio->len = 0;
545 kfree(aio->bitmap);
546 aio->bitmap = NULL;
547 submit_aio(&aio->aio);
548 }
549 else {
550 if((req->nr_sectors == 0) &&
551 (aio->bitmap == NULL)){
552 int len = req->hard_nr_sectors << 9;
553 ubd_finish(req, len);
554 }
555
556 if(aio->bitmap_buf != NULL)
557 kfree(aio->bitmap_buf);
558 kfree(aio);
559 }
560 }
561 else if(n < 0){
562 ubd_finish(aio->req, n);
563 if(aio->bitmap != NULL)
564 kfree(aio->bitmap);
565 if(aio->bitmap_buf != NULL)
566 kfree(aio->bitmap_buf);
567 kfree(aio);
568 }
569 }
570 reactivate_fd(fd, UBD_IRQ);
571 526
572 do_ubd_request(ubd_queue); 527/* Only changed by ubd_init, which is an initcall. */
528static int io_pid = -1;
573 529
574 return(IRQ_HANDLED); 530void kill_io_thread(void)
531{
532 if(io_pid != -1)
533 os_kill_process(io_pid, 1);
575} 534}
576 535
536__uml_exitcall(kill_io_thread);
537
577static int ubd_file_size(struct ubd *dev, __u64 *size_out) 538static int ubd_file_size(struct ubd *dev, __u64 *size_out)
578{ 539{
579 char *file; 540 char *file;
@@ -608,7 +569,7 @@ static int ubd_open_dev(struct ubd *dev)
608 &dev->cow.data_offset, create_ptr); 569 &dev->cow.data_offset, create_ptr);
609 570
610 if((dev->fd == -ENOENT) && create_cow){ 571 if((dev->fd == -ENOENT) && create_cow){
611 dev->fd = create_cow_file(dev->file, dev->cow.file, 572 dev->fd = create_cow_file(dev->file, dev->cow.file,
612 dev->openflags, 1 << 9, PAGE_SIZE, 573 dev->openflags, 1 << 9, PAGE_SIZE,
613 &dev->cow.bitmap_offset, 574 &dev->cow.bitmap_offset,
614 &dev->cow.bitmap_len, 575 &dev->cow.bitmap_len,
@@ -870,10 +831,6 @@ int ubd_init(void)
870{ 831{
871 int i; 832 int i;
872 833
873 ubd_reply_fd = init_aio_irq(UBD_IRQ, "ubd", ubd_intr);
874 if(ubd_reply_fd < 0)
875 printk("Setting up ubd AIO failed, err = %d\n", ubd_reply_fd);
876
877 devfs_mk_dir("ubd"); 834 devfs_mk_dir("ubd");
878 if (register_blkdev(MAJOR_NR, "ubd")) 835 if (register_blkdev(MAJOR_NR, "ubd"))
879 return -1; 836 return -1;
@@ -884,7 +841,6 @@ int ubd_init(void)
884 return -1; 841 return -1;
885 } 842 }
886 843
887 blk_queue_max_hw_segments(ubd_queue, MAX_SG);
888 if (fake_major != MAJOR_NR) { 844 if (fake_major != MAJOR_NR) {
889 char name[sizeof("ubd_nnn\0")]; 845 char name[sizeof("ubd_nnn\0")];
890 846
@@ -896,12 +852,40 @@ int ubd_init(void)
896 driver_register(&ubd_driver); 852 driver_register(&ubd_driver);
897 for (i = 0; i < MAX_DEV; i++) 853 for (i = 0; i < MAX_DEV; i++)
898 ubd_add(i); 854 ubd_add(i);
899
900 return 0; 855 return 0;
901} 856}
902 857
903late_initcall(ubd_init); 858late_initcall(ubd_init);
904 859
860int ubd_driver_init(void){
861 unsigned long stack;
862 int err;
863
864 /* Set by CONFIG_BLK_DEV_UBD_SYNC or ubd=sync.*/
865 if(global_openflags.s){
866 printk(KERN_INFO "ubd: Synchronous mode\n");
867 /* Letting ubd=sync be like using ubd#s= instead of ubd#= is
868 * enough. So use anyway the io thread. */
869 }
870 stack = alloc_stack(0, 0);
871 io_pid = start_io_thread(stack + PAGE_SIZE - sizeof(void *),
872 &thread_fd);
873 if(io_pid < 0){
874 printk(KERN_ERR
875 "ubd : Failed to start I/O thread (errno = %d) - "
876 "falling back to synchronous I/O\n", -io_pid);
877 io_pid = -1;
878 return(0);
879 }
880 err = um_request_irq(UBD_IRQ, thread_fd, IRQ_READ, ubd_intr,
881 SA_INTERRUPT, "ubd", ubd_dev);
882 if(err != 0)
883 printk(KERN_ERR "um_request_irq failed - errno = %d\n", -err);
884 return(err);
885}
886
887device_initcall(ubd_driver_init);
888
905static int ubd_open(struct inode *inode, struct file *filp) 889static int ubd_open(struct inode *inode, struct file *filp)
906{ 890{
907 struct gendisk *disk = inode->i_bdev->bd_disk; 891 struct gendisk *disk = inode->i_bdev->bd_disk;
@@ -939,55 +923,105 @@ static int ubd_release(struct inode * inode, struct file * file)
939 return(0); 923 return(0);
940} 924}
941 925
942static void cowify_bitmap(struct io_thread_req *req, unsigned long *bitmap) 926static void cowify_bitmap(__u64 io_offset, int length, unsigned long *cow_mask,
927 __u64 *cow_offset, unsigned long *bitmap,
928 __u64 bitmap_offset, unsigned long *bitmap_words,
929 __u64 bitmap_len)
943{ 930{
944 __u64 sector = req->offset / req->sectorsize; 931 __u64 sector = io_offset >> 9;
945 int i; 932 int i, update_bitmap = 0;
933
934 for(i = 0; i < length >> 9; i++){
935 if(cow_mask != NULL)
936 ubd_set_bit(i, (unsigned char *) cow_mask);
937 if(ubd_test_bit(sector + i, (unsigned char *) bitmap))
938 continue;
946 939
947 for(i = 0; i < req->length / req->sectorsize; i++){ 940 update_bitmap = 1;
948 if(ubd_test_bit(sector + i, bitmap)) 941 ubd_set_bit(sector + i, (unsigned char *) bitmap);
949 continue; 942 }
943
944 if(!update_bitmap)
945 return;
950 946
951 if(req->bitmap_start == -1) 947 *cow_offset = sector / (sizeof(unsigned long) * 8);
952 req->bitmap_start = sector + i;
953 req->bitmap_end = sector + i + 1;
954 948
955 ubd_set_bit(sector + i, bitmap); 949 /* This takes care of the case where we're exactly at the end of the
956 } 950 * device, and *cow_offset + 1 is off the end. So, just back it up
951 * by one word. Thanks to Lynn Kerby for the fix and James McMechan
952 * for the original diagnosis.
953 */
954 if(*cow_offset == ((bitmap_len + sizeof(unsigned long) - 1) /
955 sizeof(unsigned long) - 1))
956 (*cow_offset)--;
957
958 bitmap_words[0] = bitmap[*cow_offset];
959 bitmap_words[1] = bitmap[*cow_offset + 1];
960
961 *cow_offset *= sizeof(unsigned long);
962 *cow_offset += bitmap_offset;
963}
964
965static void cowify_req(struct io_thread_req *req, unsigned long *bitmap,
966 __u64 bitmap_offset, __u64 bitmap_len)
967{
968 __u64 sector = req->offset >> 9;
969 int i;
970
971 if(req->length > (sizeof(req->sector_mask) * 8) << 9)
972 panic("Operation too long");
973
974 if(req->op == UBD_READ) {
975 for(i = 0; i < req->length >> 9; i++){
976 if(ubd_test_bit(sector + i, (unsigned char *) bitmap))
977 ubd_set_bit(i, (unsigned char *)
978 &req->sector_mask);
979 }
980 }
981 else cowify_bitmap(req->offset, req->length, &req->sector_mask,
982 &req->cow_offset, bitmap, bitmap_offset,
983 req->bitmap_words, bitmap_len);
957} 984}
958 985
959/* Called with ubd_io_lock held */ 986/* Called with ubd_io_lock held */
960static int prepare_request(struct request *req, struct io_thread_req *io_req, 987static int prepare_request(struct request *req, struct io_thread_req *io_req)
961 unsigned long long offset, int page_offset,
962 int len, struct page *page)
963{ 988{
964 struct gendisk *disk = req->rq_disk; 989 struct gendisk *disk = req->rq_disk;
965 struct ubd *dev = disk->private_data; 990 struct ubd *dev = disk->private_data;
991 __u64 offset;
992 int len;
993
994 if(req->rq_status == RQ_INACTIVE) return(1);
966 995
967 /* This should be impossible now */ 996 /* This should be impossible now */
968 if((rq_data_dir(req) == WRITE) && !dev->openflags.w){ 997 if((rq_data_dir(req) == WRITE) && !dev->openflags.w){
969 printk("Write attempted on readonly ubd device %s\n", 998 printk("Write attempted on readonly ubd device %s\n",
970 disk->disk_name); 999 disk->disk_name);
971 ubd_end_request(req, 0, 0); 1000 end_request(req, 0);
972 return(1); 1001 return(1);
973 } 1002 }
974 1003
1004 offset = ((__u64) req->sector) << 9;
1005 len = req->current_nr_sectors << 9;
1006
975 io_req->fds[0] = (dev->cow.file != NULL) ? dev->cow.fd : dev->fd; 1007 io_req->fds[0] = (dev->cow.file != NULL) ? dev->cow.fd : dev->fd;
976 io_req->fds[1] = dev->fd; 1008 io_req->fds[1] = dev->fd;
1009 io_req->cow_offset = -1;
977 io_req->offset = offset; 1010 io_req->offset = offset;
978 io_req->length = len; 1011 io_req->length = len;
979 io_req->error = 0; 1012 io_req->error = 0;
980 io_req->op = (rq_data_dir(req) == READ) ? AIO_READ : AIO_WRITE; 1013 io_req->sector_mask = 0;
1014
1015 io_req->op = (rq_data_dir(req) == READ) ? UBD_READ : UBD_WRITE;
981 io_req->offsets[0] = 0; 1016 io_req->offsets[0] = 0;
982 io_req->offsets[1] = dev->cow.data_offset; 1017 io_req->offsets[1] = dev->cow.data_offset;
983 io_req->buffer = page_address(page) + page_offset; 1018 io_req->buffer = req->buffer;
984 io_req->sectorsize = 1 << 9; 1019 io_req->sectorsize = 1 << 9;
985 io_req->bitmap_offset = dev->cow.bitmap_offset;
986 io_req->bitmap_start = -1;
987 io_req->bitmap_end = -1;
988 1020
989 if((dev->cow.file != NULL) && (io_req->op == UBD_WRITE)) 1021 if(dev->cow.file != NULL)
990 cowify_bitmap(io_req, dev->cow.bitmap); 1022 cowify_req(io_req, dev->cow.bitmap, dev->cow.bitmap_offset,
1023 dev->cow.bitmap_len);
1024
991 return(0); 1025 return(0);
992} 1026}
993 1027
@@ -996,36 +1030,30 @@ static void do_ubd_request(request_queue_t *q)
996{ 1030{
997 struct io_thread_req io_req; 1031 struct io_thread_req io_req;
998 struct request *req; 1032 struct request *req;
999 __u64 sector; 1033 int err, n;
1000 int err; 1034
1001 1035 if(thread_fd == -1){
1002 if(in_ubd) 1036 while((req = elv_next_request(q)) != NULL){
1003 return; 1037 err = prepare_request(req, &io_req);
1004 in_ubd = 1; 1038 if(!err){
1005 while((req = elv_next_request(q)) != NULL){ 1039 do_io(&io_req);
1006 struct gendisk *disk = req->rq_disk; 1040 __ubd_finish(req, io_req.error);
1007 struct ubd *dev = disk->private_data; 1041 }
1008 int n, i; 1042 }
1009 1043 }
1010 blkdev_dequeue_request(req); 1044 else {
1011 1045 if(do_ubd || (req = elv_next_request(q)) == NULL)
1012 sector = req->sector; 1046 return;
1013 n = blk_rq_map_sg(q, req, dev->sg); 1047 err = prepare_request(req, &io_req);
1014 1048 if(!err){
1015 for(i = 0; i < n; i++){ 1049 do_ubd = ubd_handler;
1016 struct scatterlist *sg = &dev->sg[i]; 1050 n = os_write_file(thread_fd, (char *) &io_req,
1017 1051 sizeof(io_req));
1018 err = prepare_request(req, &io_req, sector << 9, 1052 if(n != sizeof(io_req))
1019 sg->offset, sg->length, 1053 printk("write to io thread failed, "
1020 sg->page); 1054 "errno = %d\n", -n);
1021 if(err)
1022 continue;
1023
1024 sector += sg->length >> 9;
1025 do_io(&io_req, req, dev->cow.bitmap);
1026 } 1055 }
1027 } 1056 }
1028 in_ubd = 0;
1029} 1057}
1030 1058
1031static int ubd_ioctl(struct inode * inode, struct file * file, 1059static int ubd_ioctl(struct inode * inode, struct file * file,
@@ -1241,95 +1269,131 @@ int create_cow_file(char *cow_file, char *backing_file, struct openflags flags,
1241 return(err); 1269 return(err);
1242} 1270}
1243 1271
1244void do_io(struct io_thread_req *req, struct request *r, unsigned long *bitmap) 1272static int update_bitmap(struct io_thread_req *req)
1245{ 1273{
1246 struct ubd_aio *aio; 1274 int n;
1247 struct bitmap_io *bitmap_io = NULL;
1248 char *buf;
1249 void *bitmap_buf = NULL;
1250 unsigned long len, sector;
1251 int nsectors, start, end, bit, err;
1252 __u64 off;
1253
1254 if(req->bitmap_start != -1){
1255 /* Round up to the nearest word */
1256 int round = sizeof(unsigned long);
1257 len = (req->bitmap_end - req->bitmap_start +
1258 round * 8 - 1) / (round * 8);
1259 len *= round;
1260
1261 off = req->bitmap_start / (8 * round);
1262 off *= round;
1263
1264 bitmap_io = kmalloc(sizeof(*bitmap_io), GFP_KERNEL);
1265 if(bitmap_io == NULL){
1266 printk("Failed to kmalloc bitmap IO\n");
1267 req->error = 1;
1268 return;
1269 }
1270 1275
1271 bitmap_buf = kmalloc(len, GFP_KERNEL); 1276 if(req->cow_offset == -1)
1272 if(bitmap_buf == NULL){ 1277 return(0);
1273 printk("do_io : kmalloc of bitmap chunk "
1274 "failed\n");
1275 kfree(bitmap_io);
1276 req->error = 1;
1277 return;
1278 }
1279 memcpy(bitmap_buf, &bitmap[off / sizeof(bitmap[0])], len);
1280
1281 *bitmap_io = ((struct bitmap_io)
1282 { .count = ATOMIC_INIT(0),
1283 .aio = INIT_AIO(AIO_WRITE, req->fds[1],
1284 bitmap_buf, len,
1285 req->bitmap_offset + off,
1286 ubd_reply_fd) } );
1287 }
1288 1278
1289 nsectors = req->length / req->sectorsize; 1279 n = os_seek_file(req->fds[1], req->cow_offset);
1290 start = 0; 1280 if(n < 0){
1291 end = nsectors; 1281 printk("do_io - bitmap lseek failed : err = %d\n", -n);
1292 bit = 0; 1282 return(1);
1293 do { 1283 }
1294 if(bitmap != NULL){
1295 sector = req->offset / req->sectorsize;
1296 bit = ubd_test_bit(sector + start, bitmap);
1297 end = start;
1298 while((end < nsectors) &&
1299 (ubd_test_bit(sector + end, bitmap) == bit))
1300 end++;
1301 }
1302 1284
1303 off = req->offsets[bit] + req->offset + 1285 n = os_write_file(req->fds[1], &req->bitmap_words,
1304 start * req->sectorsize; 1286 sizeof(req->bitmap_words));
1305 len = (end - start) * req->sectorsize; 1287 if(n != sizeof(req->bitmap_words)){
1306 buf = &req->buffer[start * req->sectorsize]; 1288 printk("do_io - bitmap update failed, err = %d fd = %d\n", -n,
1289 req->fds[1]);
1290 return(1);
1291 }
1307 1292
1308 aio = kmalloc(sizeof(*aio), GFP_KERNEL); 1293 return(0);
1309 if(aio == NULL){ 1294}
1310 req->error = 1;
1311 return;
1312 }
1313 1295
1314 *aio = ((struct ubd_aio) 1296void do_io(struct io_thread_req *req)
1315 { .aio = INIT_AIO(req->op, req->fds[bit], buf, 1297{
1316 len, off, ubd_reply_fd), 1298 char *buf;
1317 .len = len, 1299 unsigned long len;
1318 .req = r, 1300 int n, nsectors, start, end, bit;
1319 .bitmap = bitmap_io, 1301 int err;
1320 .bitmap_buf = bitmap_buf }); 1302 __u64 off;
1321 1303
1322 if(aio->bitmap != NULL) 1304 nsectors = req->length / req->sectorsize;
1323 atomic_inc(&aio->bitmap->count); 1305 start = 0;
1324 1306 do {
1325 err = submit_aio(&aio->aio); 1307 bit = ubd_test_bit(start, (unsigned char *) &req->sector_mask);
1326 if(err){ 1308 end = start;
1327 printk("do_io - submit_aio failed, " 1309 while((end < nsectors) &&
1328 "err = %d\n", err); 1310 (ubd_test_bit(end, (unsigned char *)
1329 req->error = 1; 1311 &req->sector_mask) == bit))
1330 return; 1312 end++;
1331 } 1313
1314 off = req->offset + req->offsets[bit] +
1315 start * req->sectorsize;
1316 len = (end - start) * req->sectorsize;
1317 buf = &req->buffer[start * req->sectorsize];
1318
1319 err = os_seek_file(req->fds[bit], off);
1320 if(err < 0){
1321 printk("do_io - lseek failed : err = %d\n", -err);
1322 req->error = 1;
1323 return;
1324 }
1325 if(req->op == UBD_READ){
1326 n = 0;
1327 do {
1328 buf = &buf[n];
1329 len -= n;
1330 n = os_read_file(req->fds[bit], buf, len);
1331 if (n < 0) {
1332 printk("do_io - read failed, err = %d "
1333 "fd = %d\n", -n, req->fds[bit]);
1334 req->error = 1;
1335 return;
1336 }
1337 } while((n < len) && (n != 0));
1338 if (n < len) memset(&buf[n], 0, len - n);
1339 } else {
1340 n = os_write_file(req->fds[bit], buf, len);
1341 if(n != len){
1342 printk("do_io - write failed err = %d "
1343 "fd = %d\n", -n, req->fds[bit]);
1344 req->error = 1;
1345 return;
1346 }
1347 }
1348
1349 start = end;
1350 } while(start < nsectors);
1332 1351
1333 start = end; 1352 req->error = update_bitmap(req);
1334 } while(start < nsectors);
1335} 1353}
1354
1355/* Changed in start_io_thread, which is serialized by being called only
1356 * from ubd_init, which is an initcall.
1357 */
1358int kernel_fd = -1;
1359
1360/* Only changed by the io thread */
1361int io_count = 0;
1362
1363int io_thread(void *arg)
1364{
1365 struct io_thread_req req;
1366 int n;
1367
1368 ignore_sigwinch_sig();
1369 while(1){
1370 n = os_read_file(kernel_fd, &req, sizeof(req));
1371 if(n != sizeof(req)){
1372 if(n < 0)
1373 printk("io_thread - read failed, fd = %d, "
1374 "err = %d\n", kernel_fd, -n);
1375 else {
1376 printk("io_thread - short read, fd = %d, "
1377 "length = %d\n", kernel_fd, n);
1378 }
1379 continue;
1380 }
1381 io_count++;
1382 do_io(&req);
1383 n = os_write_file(kernel_fd, &req, sizeof(req));
1384 if(n != sizeof(req))
1385 printk("io_thread - write failed, fd = %d, err = %d\n",
1386 kernel_fd, -n);
1387 }
1388}
1389
1390/*
1391 * Overrides for Emacs so that we follow Linus's tabbing style.
1392 * Emacs will notice this stuff at the end of the file and automatically
1393 * adjust the settings for this buffer only. This must remain at the end
1394 * of the file.
1395 * ---------------------------------------------------------------------------
1396 * Local variables:
1397 * c-file-style: "linux"
1398 * End:
1399 */
diff --git a/arch/um/drivers/ubd_user.c b/arch/um/drivers/ubd_user.c
new file mode 100644
index 000000000000..b94d2bc4fe06
--- /dev/null
+++ b/arch/um/drivers/ubd_user.c
@@ -0,0 +1,75 @@
1/*
2 * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com)
3 * Copyright (C) 2001 Ridgerun,Inc (glonnon@ridgerun.com)
4 * Licensed under the GPL
5 */
6
7#include <stddef.h>
8#include <unistd.h>
9#include <errno.h>
10#include <sched.h>
11#include <signal.h>
12#include <string.h>
13#include <netinet/in.h>
14#include <sys/time.h>
15#include <sys/socket.h>
16#include <sys/mman.h>
17#include <sys/param.h>
18#include "asm/types.h"
19#include "user_util.h"
20#include "kern_util.h"
21#include "user.h"
22#include "ubd_user.h"
23#include "os.h"
24#include "cow.h"
25
26#include <endian.h>
27#include <byteswap.h>
28
29void ignore_sigwinch_sig(void)
30{
31 signal(SIGWINCH, SIG_IGN);
32}
33
34int start_io_thread(unsigned long sp, int *fd_out)
35{
36 int pid, fds[2], err;
37
38 err = os_pipe(fds, 1, 1);
39 if(err < 0){
40 printk("start_io_thread - os_pipe failed, err = %d\n", -err);
41 goto out;
42 }
43
44 kernel_fd = fds[0];
45 *fd_out = fds[1];
46
47 pid = clone(io_thread, (void *) sp, CLONE_FILES | CLONE_VM | SIGCHLD,
48 NULL);
49 if(pid < 0){
50 printk("start_io_thread - clone failed : errno = %d\n", errno);
51 err = -errno;
52 goto out_close;
53 }
54
55 return(pid);
56
57 out_close:
58 os_close_file(fds[0]);
59 os_close_file(fds[1]);
60 kernel_fd = -1;
61 *fd_out = -1;
62 out:
63 return(err);
64}
65
66/*
67 * Overrides for Emacs so that we follow Linus's tabbing style.
68 * Emacs will notice this stuff at the end of the file and automatically
69 * adjust the settings for this buffer only. This must remain at the end
70 * of the file.
71 * ---------------------------------------------------------------------------
72 * Local variables:
73 * c-file-style: "linux"
74 * End:
75 */
diff --git a/arch/um/include/aio.h b/arch/um/include/aio.h
index 83f16877ab08..423bae9153f8 100644
--- a/arch/um/include/aio.h
+++ b/arch/um/include/aio.h
@@ -14,27 +14,15 @@ struct aio_thread_reply {
14}; 14};
15 15
16struct aio_context { 16struct aio_context {
17 enum aio_type type;
18 int fd;
19 void *data;
20 int len;
21 unsigned long long offset;
22 int reply_fd; 17 int reply_fd;
23 struct aio_context *next; 18 struct aio_context *next;
24}; 19};
25 20
26#define INIT_AIO(aio_type, aio_fd, aio_data, aio_len, aio_offset, \
27 aio_reply_fd) \
28 { .type = aio_type, \
29 .fd = aio_fd, \
30 .data = aio_data, \
31 .len = aio_len, \
32 .offset = aio_offset, \
33 .reply_fd = aio_reply_fd }
34
35#define INIT_AIO_CONTEXT { .reply_fd = -1, \ 21#define INIT_AIO_CONTEXT { .reply_fd = -1, \
36 .next = NULL } 22 .next = NULL }
37 23
38extern int submit_aio(struct aio_context *aio); 24extern int submit_aio(enum aio_type type, int fd, char *buf, int len,
25 unsigned long long offset, int reply_fd,
26 struct aio_context *aio);
39 27
40#endif 28#endif
diff --git a/arch/um/include/os.h b/arch/um/include/os.h
index 6f766e1faecc..2e58e304b8be 100644
--- a/arch/um/include/os.h
+++ b/arch/um/include/os.h
@@ -6,6 +6,7 @@
6#ifndef __OS_H__ 6#ifndef __OS_H__
7#define __OS_H__ 7#define __OS_H__
8 8
9#include "uml-config.h"
9#include "asm/types.h" 10#include "asm/types.h"
10#include "../os/include/file.h" 11#include "../os/include/file.h"
11 12
@@ -159,7 +160,11 @@ extern int can_do_skas(void);
159 160
160/* Make sure they are clear when running in TT mode. Required by 161/* Make sure they are clear when running in TT mode. Required by
161 * SEGV_MAYBE_FIXABLE */ 162 * SEGV_MAYBE_FIXABLE */
163#ifdef UML_CONFIG_MODE_SKAS
162#define clear_can_do_skas() do { ptrace_faultinfo = proc_mm = 0; } while (0) 164#define clear_can_do_skas() do { ptrace_faultinfo = proc_mm = 0; } while (0)
165#else
166#define clear_can_do_skas() do {} while (0)
167#endif
163 168
164/* mem.c */ 169/* mem.c */
165extern int create_mem_file(unsigned long len); 170extern int create_mem_file(unsigned long len);
diff --git a/arch/um/include/sysdep-x86_64/ptrace.h b/arch/um/include/sysdep-x86_64/ptrace.h
index 8f0656766c21..8d353f0feec1 100644
--- a/arch/um/include/sysdep-x86_64/ptrace.h
+++ b/arch/um/include/sysdep-x86_64/ptrace.h
@@ -183,10 +183,6 @@ struct syscall_args {
183 case RBP: val = UPT_RBP(regs); break; \ 183 case RBP: val = UPT_RBP(regs); break; \
184 case ORIG_RAX: val = UPT_ORIG_RAX(regs); break; \ 184 case ORIG_RAX: val = UPT_ORIG_RAX(regs); break; \
185 case CS: val = UPT_CS(regs); break; \ 185 case CS: val = UPT_CS(regs); break; \
186 case DS: val = UPT_DS(regs); break; \
187 case ES: val = UPT_ES(regs); break; \
188 case FS: val = UPT_FS(regs); break; \
189 case GS: val = UPT_GS(regs); break; \
190 case EFLAGS: val = UPT_EFLAGS(regs); break; \ 186 case EFLAGS: val = UPT_EFLAGS(regs); break; \
191 default : \ 187 default : \
192 panic("Bad register in UPT_REG : %d\n", reg); \ 188 panic("Bad register in UPT_REG : %d\n", reg); \
diff --git a/arch/um/os-Linux/aio.c b/arch/um/os-Linux/aio.c
index f6e64026f995..41cfb0944201 100644
--- a/arch/um/os-Linux/aio.c
+++ b/arch/um/os-Linux/aio.c
@@ -6,7 +6,6 @@
6#include <stdlib.h> 6#include <stdlib.h>
7#include <unistd.h> 7#include <unistd.h>
8#include <signal.h> 8#include <signal.h>
9#include <string.h>
10#include <errno.h> 9#include <errno.h>
11#include <sched.h> 10#include <sched.h>
12#include <sys/syscall.h> 11#include <sys/syscall.h>
@@ -17,31 +16,18 @@
17#include "user.h" 16#include "user.h"
18#include "mode.h" 17#include "mode.h"
19 18
19struct aio_thread_req {
20 enum aio_type type;
21 int io_fd;
22 unsigned long long offset;
23 char *buf;
24 int len;
25 struct aio_context *aio;
26};
27
20static int aio_req_fd_r = -1; 28static int aio_req_fd_r = -1;
21static int aio_req_fd_w = -1; 29static int aio_req_fd_w = -1;
22 30
23static int update_aio(struct aio_context *aio, int res)
24{
25 if(res < 0)
26 aio->len = res;
27 else if((res == 0) && (aio->type == AIO_READ)){
28 /* This is the EOF case - we have hit the end of the file
29 * and it ends in a partial block, so we fill the end of
30 * the block with zeros and claim success.
31 */
32 memset(aio->data, 0, aio->len);
33 aio->len = 0;
34 }
35 else if(res > 0){
36 aio->len -= res;
37 aio->data += res;
38 aio->offset += res;
39 return aio->len;
40 }
41
42 return 0;
43}
44
45#if defined(HAVE_AIO_ABI) 31#if defined(HAVE_AIO_ABI)
46#include <linux/aio_abi.h> 32#include <linux/aio_abi.h>
47 33
@@ -80,7 +66,8 @@ static long io_getevents(aio_context_t ctx_id, long min_nr, long nr,
80 * that it now backs the mmapped area. 66 * that it now backs the mmapped area.
81 */ 67 */
82 68
83static int do_aio(aio_context_t ctx, struct aio_context *aio) 69static int do_aio(aio_context_t ctx, enum aio_type type, int fd, char *buf,
70 int len, unsigned long long offset, struct aio_context *aio)
84{ 71{
85 struct iocb iocb, *iocbp = &iocb; 72 struct iocb iocb, *iocbp = &iocb;
86 char c; 73 char c;
@@ -88,39 +75,40 @@ static int do_aio(aio_context_t ctx, struct aio_context *aio)
88 75
89 iocb = ((struct iocb) { .aio_data = (unsigned long) aio, 76 iocb = ((struct iocb) { .aio_data = (unsigned long) aio,
90 .aio_reqprio = 0, 77 .aio_reqprio = 0,
91 .aio_fildes = aio->fd, 78 .aio_fildes = fd,
92 .aio_buf = (unsigned long) aio->data, 79 .aio_buf = (unsigned long) buf,
93 .aio_nbytes = aio->len, 80 .aio_nbytes = len,
94 .aio_offset = aio->offset, 81 .aio_offset = offset,
95 .aio_reserved1 = 0, 82 .aio_reserved1 = 0,
96 .aio_reserved2 = 0, 83 .aio_reserved2 = 0,
97 .aio_reserved3 = 0 }); 84 .aio_reserved3 = 0 });
98 85
99 switch(aio->type){ 86 switch(type){
100 case AIO_READ: 87 case AIO_READ:
101 iocb.aio_lio_opcode = IOCB_CMD_PREAD; 88 iocb.aio_lio_opcode = IOCB_CMD_PREAD;
89 err = io_submit(ctx, 1, &iocbp);
102 break; 90 break;
103 case AIO_WRITE: 91 case AIO_WRITE:
104 iocb.aio_lio_opcode = IOCB_CMD_PWRITE; 92 iocb.aio_lio_opcode = IOCB_CMD_PWRITE;
93 err = io_submit(ctx, 1, &iocbp);
105 break; 94 break;
106 case AIO_MMAP: 95 case AIO_MMAP:
107 iocb.aio_lio_opcode = IOCB_CMD_PREAD; 96 iocb.aio_lio_opcode = IOCB_CMD_PREAD;
108 iocb.aio_buf = (unsigned long) &c; 97 iocb.aio_buf = (unsigned long) &c;
109 iocb.aio_nbytes = sizeof(c); 98 iocb.aio_nbytes = sizeof(c);
99 err = io_submit(ctx, 1, &iocbp);
110 break; 100 break;
111 default: 101 default:
112 printk("Bogus op in do_aio - %d\n", aio->type); 102 printk("Bogus op in do_aio - %d\n", type);
113 err = -EINVAL; 103 err = -EINVAL;
114 goto out; 104 break;
115 } 105 }
116 106
117 err = io_submit(ctx, 1, &iocbp);
118 if(err > 0) 107 if(err > 0)
119 err = 0; 108 err = 0;
120 else 109 else
121 err = -errno; 110 err = -errno;
122 111
123 out:
124 return err; 112 return err;
125} 113}
126 114
@@ -129,9 +117,8 @@ static aio_context_t ctx = 0;
129static int aio_thread(void *arg) 117static int aio_thread(void *arg)
130{ 118{
131 struct aio_thread_reply reply; 119 struct aio_thread_reply reply;
132 struct aio_context *aio;
133 struct io_event event; 120 struct io_event event;
134 int err, n; 121 int err, n, reply_fd;
135 122
136 signal(SIGWINCH, SIG_IGN); 123 signal(SIGWINCH, SIG_IGN);
137 124
@@ -144,22 +131,14 @@ static int aio_thread(void *arg)
144 "errno = %d\n", errno); 131 "errno = %d\n", errno);
145 } 132 }
146 else { 133 else {
147 /* This is safe as we've just a pointer here. */
148 aio = (struct aio_context *) (long) event.data;
149 if(update_aio(aio, event.res)){
150 do_aio(ctx, aio);
151 continue;
152 }
153
154 reply = ((struct aio_thread_reply) 134 reply = ((struct aio_thread_reply)
155 { .data = aio, 135 { .data = (void *) (long) event.data,
156 .err = aio->len }); 136 .err = event.res });
157 err = os_write_file(aio->reply_fd, &reply, 137 reply_fd = ((struct aio_context *) reply.data)->reply_fd;
158 sizeof(reply)); 138 err = os_write_file(reply_fd, &reply, sizeof(reply));
159 if(err != sizeof(reply)) 139 if(err != sizeof(reply))
160 printk("aio_thread - write failed, " 140 printk("aio_thread - write failed, fd = %d, "
161 "fd = %d, err = %d\n", aio->reply_fd, 141 "err = %d\n", aio_req_fd_r, -err);
162 -err);
163 } 142 }
164 } 143 }
165 return 0; 144 return 0;
@@ -167,35 +146,35 @@ static int aio_thread(void *arg)
167 146
168#endif 147#endif
169 148
170static int do_not_aio(struct aio_context *aio) 149static int do_not_aio(struct aio_thread_req *req)
171{ 150{
172 char c; 151 char c;
173 int err; 152 int err;
174 153
175 switch(aio->type){ 154 switch(req->type){
176 case AIO_READ: 155 case AIO_READ:
177 err = os_seek_file(aio->fd, aio->offset); 156 err = os_seek_file(req->io_fd, req->offset);
178 if(err) 157 if(err)
179 goto out; 158 goto out;
180 159
181 err = os_read_file(aio->fd, aio->data, aio->len); 160 err = os_read_file(req->io_fd, req->buf, req->len);
182 break; 161 break;
183 case AIO_WRITE: 162 case AIO_WRITE:
184 err = os_seek_file(aio->fd, aio->offset); 163 err = os_seek_file(req->io_fd, req->offset);
185 if(err) 164 if(err)
186 goto out; 165 goto out;
187 166
188 err = os_write_file(aio->fd, aio->data, aio->len); 167 err = os_write_file(req->io_fd, req->buf, req->len);
189 break; 168 break;
190 case AIO_MMAP: 169 case AIO_MMAP:
191 err = os_seek_file(aio->fd, aio->offset); 170 err = os_seek_file(req->io_fd, req->offset);
192 if(err) 171 if(err)
193 goto out; 172 goto out;
194 173
195 err = os_read_file(aio->fd, &c, sizeof(c)); 174 err = os_read_file(req->io_fd, &c, sizeof(c));
196 break; 175 break;
197 default: 176 default:
198 printk("do_not_aio - bad request type : %d\n", aio->type); 177 printk("do_not_aio - bad request type : %d\n", req->type);
199 err = -EINVAL; 178 err = -EINVAL;
200 break; 179 break;
201 } 180 }
@@ -206,14 +185,14 @@ static int do_not_aio(struct aio_context *aio)
206 185
207static int not_aio_thread(void *arg) 186static int not_aio_thread(void *arg)
208{ 187{
209 struct aio_context *aio; 188 struct aio_thread_req req;
210 struct aio_thread_reply reply; 189 struct aio_thread_reply reply;
211 int err; 190 int err;
212 191
213 signal(SIGWINCH, SIG_IGN); 192 signal(SIGWINCH, SIG_IGN);
214 while(1){ 193 while(1){
215 err = os_read_file(aio_req_fd_r, &aio, sizeof(aio)); 194 err = os_read_file(aio_req_fd_r, &req, sizeof(req));
216 if(err != sizeof(aio)){ 195 if(err != sizeof(req)){
217 if(err < 0) 196 if(err < 0)
218 printk("not_aio_thread - read failed, " 197 printk("not_aio_thread - read failed, "
219 "fd = %d, err = %d\n", aio_req_fd_r, 198 "fd = %d, err = %d\n", aio_req_fd_r,
@@ -224,34 +203,17 @@ static int not_aio_thread(void *arg)
224 } 203 }
225 continue; 204 continue;
226 } 205 }
227 again: 206 err = do_not_aio(&req);
228 err = do_not_aio(aio); 207 reply = ((struct aio_thread_reply) { .data = req.aio,
229 208 .err = err });
230 if(update_aio(aio, err)) 209 err = os_write_file(req.aio->reply_fd, &reply, sizeof(reply));
231 goto again;
232
233 reply = ((struct aio_thread_reply) { .data = aio,
234 .err = aio->len });
235 err = os_write_file(aio->reply_fd, &reply, sizeof(reply));
236 if(err != sizeof(reply)) 210 if(err != sizeof(reply))
237 printk("not_aio_thread - write failed, fd = %d, " 211 printk("not_aio_thread - write failed, fd = %d, "
238 "err = %d\n", aio_req_fd_r, -err); 212 "err = %d\n", aio_req_fd_r, -err);
239 } 213 }
240} 214}
241 215
242static int submit_aio_24(struct aio_context *aio)
243{
244 int err;
245
246 err = os_write_file(aio_req_fd_w, &aio, sizeof(aio));
247 if(err == sizeof(aio))
248 err = 0;
249
250 return err;
251}
252
253static int aio_pid = -1; 216static int aio_pid = -1;
254static int (*submit_proc)(struct aio_context *aio);
255 217
256static int init_aio_24(void) 218static int init_aio_24(void)
257{ 219{
@@ -283,33 +245,11 @@ static int init_aio_24(void)
283#endif 245#endif
284 printk("2.6 host AIO support not used - falling back to I/O " 246 printk("2.6 host AIO support not used - falling back to I/O "
285 "thread\n"); 247 "thread\n");
286
287 submit_proc = submit_aio_24;
288
289 return 0; 248 return 0;
290} 249}
291 250
292#ifdef HAVE_AIO_ABI 251#ifdef HAVE_AIO_ABI
293#define DEFAULT_24_AIO 0 252#define DEFAULT_24_AIO 0
294static int submit_aio_26(struct aio_context *aio)
295{
296 struct aio_thread_reply reply;
297 int err;
298
299 err = do_aio(ctx, aio);
300 if(err){
301 reply = ((struct aio_thread_reply) { .data = aio,
302 .err = err });
303 err = os_write_file(aio->reply_fd, &reply, sizeof(reply));
304 if(err != sizeof(reply))
305 printk("submit_aio_26 - write failed, "
306 "fd = %d, err = %d\n", aio->reply_fd, -err);
307 else err = 0;
308 }
309
310 return err;
311}
312
313static int init_aio_26(void) 253static int init_aio_26(void)
314{ 254{
315 unsigned long stack; 255 unsigned long stack;
@@ -330,22 +270,39 @@ static int init_aio_26(void)
330 aio_pid = err; 270 aio_pid = err;
331 271
332 printk("Using 2.6 host AIO\n"); 272 printk("Using 2.6 host AIO\n");
273 return 0;
274}
275
276static int submit_aio_26(enum aio_type type, int io_fd, char *buf, int len,
277 unsigned long long offset, struct aio_context *aio)
278{
279 struct aio_thread_reply reply;
280 int err;
333 281
334 submit_proc = submit_aio_26; 282 err = do_aio(ctx, type, io_fd, buf, len, offset, aio);
283 if(err){
284 reply = ((struct aio_thread_reply) { .data = aio,
285 .err = err });
286 err = os_write_file(aio->reply_fd, &reply, sizeof(reply));
287 if(err != sizeof(reply))
288 printk("submit_aio_26 - write failed, "
289 "fd = %d, err = %d\n", aio->reply_fd, -err);
290 else err = 0;
291 }
335 292
336 return 0; 293 return err;
337} 294}
338 295
339#else 296#else
340#define DEFAULT_24_AIO 1 297#define DEFAULT_24_AIO 1
341static int submit_aio_26(struct aio_context *aio) 298static int init_aio_26(void)
342{ 299{
343 return -ENOSYS; 300 return -ENOSYS;
344} 301}
345 302
346static int init_aio_26(void) 303static int submit_aio_26(enum aio_type type, int io_fd, char *buf, int len,
304 unsigned long long offset, struct aio_context *aio)
347{ 305{
348 submit_proc = submit_aio_26;
349 return -ENOSYS; 306 return -ENOSYS;
350} 307}
351#endif 308#endif
@@ -412,7 +369,33 @@ static void exit_aio(void)
412 369
413__uml_exitcall(exit_aio); 370__uml_exitcall(exit_aio);
414 371
415int submit_aio(struct aio_context *aio) 372static int submit_aio_24(enum aio_type type, int io_fd, char *buf, int len,
373 unsigned long long offset, struct aio_context *aio)
416{ 374{
417 return (*submit_proc)(aio); 375 struct aio_thread_req req = { .type = type,
376 .io_fd = io_fd,
377 .offset = offset,
378 .buf = buf,
379 .len = len,
380 .aio = aio,
381 };
382 int err;
383
384 err = os_write_file(aio_req_fd_w, &req, sizeof(req));
385 if(err == sizeof(req))
386 err = 0;
387
388 return err;
389}
390
391int submit_aio(enum aio_type type, int io_fd, char *buf, int len,
392 unsigned long long offset, int reply_fd,
393 struct aio_context *aio)
394{
395 aio->reply_fd = reply_fd;
396 if(aio_24)
397 return submit_aio_24(type, io_fd, buf, len, offset, aio);
398 else {
399 return submit_aio_26(type, io_fd, buf, len, offset, aio);
400 }
418} 401}
diff --git a/drivers/acpi/event.c b/drivers/acpi/event.c
index bfa8b76de403..2dbb1b0f11d5 100644
--- a/drivers/acpi/event.c
+++ b/drivers/acpi/event.c
@@ -58,9 +58,8 @@ acpi_system_read_event(struct file *file, char __user * buffer, size_t count,
58 return_VALUE(-EAGAIN); 58 return_VALUE(-EAGAIN);
59 59
60 result = acpi_bus_receive_event(&event); 60 result = acpi_bus_receive_event(&event);
61 if (result) { 61 if (result)
62 return_VALUE(-EIO); 62 return_VALUE(result);
63 }
64 63
65 chars_remaining = sprintf(str, "%s %s %08x %08x\n", 64 chars_remaining = sprintf(str, "%s %s %08x %08x\n",
66 event.device_class ? event. 65 event.device_class ? event.
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c
index e36c5da2b31a..3937adf4e5e5 100644
--- a/drivers/acpi/glue.c
+++ b/drivers/acpi/glue.c
@@ -96,7 +96,7 @@ struct acpi_find_pci_root {
96static acpi_status 96static acpi_status
97do_root_bridge_busnr_callback(struct acpi_resource *resource, void *data) 97do_root_bridge_busnr_callback(struct acpi_resource *resource, void *data)
98{ 98{
99 int *busnr = (int *)data; 99 unsigned long *busnr = (unsigned long *)data;
100 struct acpi_resource_address64 address; 100 struct acpi_resource_address64 address;
101 101
102 if (resource->id != ACPI_RSTYPE_ADDRESS16 && 102 if (resource->id != ACPI_RSTYPE_ADDRESS16 &&
@@ -115,13 +115,13 @@ do_root_bridge_busnr_callback(struct acpi_resource *resource, void *data)
115static int get_root_bridge_busnr(acpi_handle handle) 115static int get_root_bridge_busnr(acpi_handle handle)
116{ 116{
117 acpi_status status; 117 acpi_status status;
118 int bus, bbn; 118 unsigned long bus, bbn;
119 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 119 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
120 120
121 acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer); 121 acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
122 122
123 status = acpi_evaluate_integer(handle, METHOD_NAME__BBN, NULL, 123 status = acpi_evaluate_integer(handle, METHOD_NAME__BBN, NULL,
124 (unsigned long *)&bbn); 124 &bbn);
125 if (status == AE_NOT_FOUND) { 125 if (status == AE_NOT_FOUND) {
126 /* Assume bus = 0 */ 126 /* Assume bus = 0 */
127 printk(KERN_INFO PREFIX 127 printk(KERN_INFO PREFIX
@@ -153,7 +153,7 @@ static int get_root_bridge_busnr(acpi_handle handle)
153 } 153 }
154 exit: 154 exit:
155 acpi_os_free(buffer.pointer); 155 acpi_os_free(buffer.pointer);
156 return bbn; 156 return (int)bbn;
157} 157}
158 158
159static acpi_status 159static acpi_status
diff --git a/drivers/char/.gitignore b/drivers/char/.gitignore
new file mode 100644
index 000000000000..2b6b1d772ed7
--- /dev/null
+++ b/drivers/char/.gitignore
@@ -0,0 +1,3 @@
1consolemap_deftbl.c
2defkeymap.c
3
diff --git a/drivers/char/drm/drm_vm.c b/drivers/char/drm/drm_vm.c
index ced4215e2275..39ea96e42c5b 100644
--- a/drivers/char/drm/drm_vm.c
+++ b/drivers/char/drm/drm_vm.c
@@ -148,7 +148,8 @@ static __inline__ struct page *drm_do_vm_shm_nopage(struct vm_area_struct *vma,
148 148
149 offset = address - vma->vm_start; 149 offset = address - vma->vm_start;
150 i = (unsigned long)map->handle + offset; 150 i = (unsigned long)map->handle + offset;
151 page = vmalloc_to_page((void *)i); 151 page = (map->type == _DRM_CONSISTENT) ?
152 virt_to_page((void *)i) : vmalloc_to_page((void *)i);
152 if (!page) 153 if (!page)
153 return NOPAGE_OOM; 154 return NOPAGE_OOM;
154 get_page(page); 155 get_page(page);
diff --git a/drivers/char/drm/mga_dma.c b/drivers/char/drm/mga_dma.c
index fc7d4a594bca..c8e1b6c83636 100644
--- a/drivers/char/drm/mga_dma.c
+++ b/drivers/char/drm/mga_dma.c
@@ -437,7 +437,7 @@ static int mga_do_agp_dma_bootstrap(drm_device_t * dev,
437 drm_mga_dma_bootstrap_t * dma_bs) 437 drm_mga_dma_bootstrap_t * dma_bs)
438{ 438{
439 drm_mga_private_t * const dev_priv = (drm_mga_private_t *) dev->dev_private; 439 drm_mga_private_t * const dev_priv = (drm_mga_private_t *) dev->dev_private;
440 const unsigned int warp_size = mga_warp_microcode_size(dev_priv); 440 unsigned int warp_size = mga_warp_microcode_size(dev_priv);
441 int err; 441 int err;
442 unsigned offset; 442 unsigned offset;
443 const unsigned secondary_size = dma_bs->secondary_bin_count 443 const unsigned secondary_size = dma_bs->secondary_bin_count
@@ -499,6 +499,12 @@ static int mga_do_agp_dma_bootstrap(drm_device_t * dev,
499 return err; 499 return err;
500 } 500 }
501 501
502 /* Make drm_addbufs happy by not trying to create a mapping for less
503 * than a page.
504 */
505 if (warp_size < PAGE_SIZE)
506 warp_size = PAGE_SIZE;
507
502 offset = 0; 508 offset = 0;
503 err = drm_addmap( dev, offset, warp_size, 509 err = drm_addmap( dev, offset, warp_size,
504 _DRM_AGP, _DRM_READ_ONLY, & dev_priv->warp ); 510 _DRM_AGP, _DRM_READ_ONLY, & dev_priv->warp );
@@ -587,7 +593,7 @@ static int mga_do_pci_dma_bootstrap(drm_device_t * dev,
587 drm_mga_dma_bootstrap_t * dma_bs) 593 drm_mga_dma_bootstrap_t * dma_bs)
588{ 594{
589 drm_mga_private_t * const dev_priv = (drm_mga_private_t *) dev->dev_private; 595 drm_mga_private_t * const dev_priv = (drm_mga_private_t *) dev->dev_private;
590 const unsigned int warp_size = mga_warp_microcode_size(dev_priv); 596 unsigned int warp_size = mga_warp_microcode_size(dev_priv);
591 unsigned int primary_size; 597 unsigned int primary_size;
592 unsigned int bin_count; 598 unsigned int bin_count;
593 int err; 599 int err;
@@ -599,6 +605,12 @@ static int mga_do_pci_dma_bootstrap(drm_device_t * dev,
599 return DRM_ERR(EFAULT); 605 return DRM_ERR(EFAULT);
600 } 606 }
601 607
608 /* Make drm_addbufs happy by not trying to create a mapping for less
609 * than a page.
610 */
611 if (warp_size < PAGE_SIZE)
612 warp_size = PAGE_SIZE;
613
602 /* The proper alignment is 0x100 for this mapping */ 614 /* The proper alignment is 0x100 for this mapping */
603 err = drm_addmap(dev, 0, warp_size, _DRM_CONSISTENT, 615 err = drm_addmap(dev, 0, warp_size, _DRM_CONSISTENT,
604 _DRM_READ_ONLY, &dev_priv->warp); 616 _DRM_READ_ONLY, &dev_priv->warp);
@@ -812,6 +824,10 @@ static int mga_do_init_dma( drm_device_t *dev, drm_mga_init_t *init )
812 } 824 }
813 825
814 if (! dev_priv->used_new_dma_init) { 826 if (! dev_priv->used_new_dma_init) {
827
828 dev_priv->dma_access = MGA_PAGPXFER;
829 dev_priv->wagp_enable = MGA_WAGP_ENABLE;
830
815 dev_priv->status = drm_core_findmap(dev, init->status_offset); 831 dev_priv->status = drm_core_findmap(dev, init->status_offset);
816 if (!dev_priv->status) { 832 if (!dev_priv->status) {
817 DRM_ERROR("failed to find status page!\n"); 833 DRM_ERROR("failed to find status page!\n");
@@ -928,7 +944,7 @@ static int mga_do_cleanup_dma( drm_device_t *dev )
928 drm_mga_private_t *dev_priv = dev->dev_private; 944 drm_mga_private_t *dev_priv = dev->dev_private;
929 945
930 if ((dev_priv->warp != NULL) 946 if ((dev_priv->warp != NULL)
931 && (dev_priv->mmio->type != _DRM_CONSISTENT)) 947 && (dev_priv->warp->type != _DRM_CONSISTENT))
932 drm_core_ioremapfree(dev_priv->warp, dev); 948 drm_core_ioremapfree(dev_priv->warp, dev);
933 949
934 if ((dev_priv->primary != NULL) 950 if ((dev_priv->primary != NULL)
diff --git a/drivers/char/drm/mga_drv.h b/drivers/char/drm/mga_drv.h
index b22fdbd4f830..6059c5a5b105 100644
--- a/drivers/char/drm/mga_drv.h
+++ b/drivers/char/drm/mga_drv.h
@@ -227,7 +227,7 @@ static inline u32 _MGA_READ(u32 *addr)
227#define MGA_EMIT_STATE( dev_priv, dirty ) \ 227#define MGA_EMIT_STATE( dev_priv, dirty ) \
228do { \ 228do { \
229 if ( (dirty) & ~MGA_UPLOAD_CLIPRECTS ) { \ 229 if ( (dirty) & ~MGA_UPLOAD_CLIPRECTS ) { \
230 if ( dev_priv->chipset == MGA_CARD_TYPE_G400 ) { \ 230 if ( dev_priv->chipset >= MGA_CARD_TYPE_G400 ) { \
231 mga_g400_emit_state( dev_priv ); \ 231 mga_g400_emit_state( dev_priv ); \
232 } else { \ 232 } else { \
233 mga_g200_emit_state( dev_priv ); \ 233 mga_g200_emit_state( dev_priv ); \
diff --git a/drivers/char/drm/mga_state.c b/drivers/char/drm/mga_state.c
index 05bbb4719376..6ac5e006226f 100644
--- a/drivers/char/drm/mga_state.c
+++ b/drivers/char/drm/mga_state.c
@@ -53,7 +53,7 @@ static void mga_emit_clip_rect( drm_mga_private_t *dev_priv,
53 53
54 /* Force reset of DWGCTL on G400 (eliminates clip disable bit). 54 /* Force reset of DWGCTL on G400 (eliminates clip disable bit).
55 */ 55 */
56 if (dev_priv->chipset == MGA_CARD_TYPE_G400) { 56 if (dev_priv->chipset >= MGA_CARD_TYPE_G400) {
57 DMA_BLOCK(MGA_DWGCTL, ctx->dwgctl, 57 DMA_BLOCK(MGA_DWGCTL, ctx->dwgctl,
58 MGA_LEN + MGA_EXEC, 0x80000000, 58 MGA_LEN + MGA_EXEC, 0x80000000,
59 MGA_DWGCTL, ctx->dwgctl, 59 MGA_DWGCTL, ctx->dwgctl,
diff --git a/drivers/char/mbcs.c b/drivers/char/mbcs.c
index 3fa64c631108..c268ee04b2aa 100644
--- a/drivers/char/mbcs.c
+++ b/drivers/char/mbcs.c
@@ -830,6 +830,9 @@ static int __init mbcs_init(void)
830{ 830{
831 int rv; 831 int rv;
832 832
833 if (!ia64_platform_is("sn2"))
834 return -ENODEV;
835
833 // Put driver into chrdevs[]. Get major number. 836 // Put driver into chrdevs[]. Get major number.
834 rv = register_chrdev(mbcs_major, DEVICE_NAME, &mbcs_ops); 837 rv = register_chrdev(mbcs_major, DEVICE_NAME, &mbcs_ops);
835 if (rv < 0) { 838 if (rv < 0) {
diff --git a/drivers/char/n_r3964.c b/drivers/char/n_r3964.c
index 97d6dc24b800..853c98cee64f 100644
--- a/drivers/char/n_r3964.c
+++ b/drivers/char/n_r3964.c
@@ -695,7 +695,7 @@ static void receive_char(struct r3964_info *pInfo, const unsigned char c)
695 { 695 {
696 TRACE_PE("IDLE - got STX but no space in rx_queue!"); 696 TRACE_PE("IDLE - got STX but no space in rx_queue!");
697 pInfo->state=R3964_WAIT_FOR_RX_BUF; 697 pInfo->state=R3964_WAIT_FOR_RX_BUF;
698 mod_timer(&pInfo->tmr, R3964_TO_NO_BUF); 698 mod_timer(&pInfo->tmr, jiffies + R3964_TO_NO_BUF);
699 break; 699 break;
700 } 700 }
701start_receiving: 701start_receiving:
@@ -705,7 +705,7 @@ start_receiving:
705 pInfo->last_rx = 0; 705 pInfo->last_rx = 0;
706 pInfo->flags &= ~R3964_ERROR; 706 pInfo->flags &= ~R3964_ERROR;
707 pInfo->state=R3964_RECEIVING; 707 pInfo->state=R3964_RECEIVING;
708 mod_timer(&pInfo->tmr, R3964_TO_ZVZ); 708 mod_timer(&pInfo->tmr, jiffies + R3964_TO_ZVZ);
709 pInfo->nRetry = 0; 709 pInfo->nRetry = 0;
710 put_char(pInfo, DLE); 710 put_char(pInfo, DLE);
711 flush(pInfo); 711 flush(pInfo);
@@ -732,7 +732,7 @@ start_receiving:
732 if(pInfo->flags & R3964_BCC) 732 if(pInfo->flags & R3964_BCC)
733 { 733 {
734 pInfo->state = R3964_WAIT_FOR_BCC; 734 pInfo->state = R3964_WAIT_FOR_BCC;
735 mod_timer(&pInfo->tmr, R3964_TO_ZVZ); 735 mod_timer(&pInfo->tmr, jiffies + R3964_TO_ZVZ);
736 } 736 }
737 else 737 else
738 { 738 {
@@ -744,7 +744,7 @@ start_receiving:
744 pInfo->last_rx = c; 744 pInfo->last_rx = c;
745char_to_buf: 745char_to_buf:
746 pInfo->rx_buf[pInfo->rx_position++] = c; 746 pInfo->rx_buf[pInfo->rx_position++] = c;
747 mod_timer(&pInfo->tmr, R3964_TO_ZVZ); 747 mod_timer(&pInfo->tmr, jiffies + R3964_TO_ZVZ);
748 } 748 }
749 } 749 }
750 /* else: overflow-msg? BUF_SIZE>MTU; should not happen? */ 750 /* else: overflow-msg? BUF_SIZE>MTU; should not happen? */
diff --git a/drivers/ieee1394/ohci1394.c b/drivers/ieee1394/ohci1394.c
index 6a6acbd80af4..4cf9b8f3e336 100644
--- a/drivers/ieee1394/ohci1394.c
+++ b/drivers/ieee1394/ohci1394.c
@@ -2283,8 +2283,9 @@ static void ohci_schedule_iso_tasklets(struct ti_ohci *ohci,
2283{ 2283{
2284 struct ohci1394_iso_tasklet *t; 2284 struct ohci1394_iso_tasklet *t;
2285 unsigned long mask; 2285 unsigned long mask;
2286 unsigned long flags;
2286 2287
2287 spin_lock(&ohci->iso_tasklet_list_lock); 2288 spin_lock_irqsave(&ohci->iso_tasklet_list_lock, flags);
2288 2289
2289 list_for_each_entry(t, &ohci->iso_tasklet_list, link) { 2290 list_for_each_entry(t, &ohci->iso_tasklet_list, link) {
2290 mask = 1 << t->context; 2291 mask = 1 << t->context;
@@ -2295,8 +2296,7 @@ static void ohci_schedule_iso_tasklets(struct ti_ohci *ohci,
2295 tasklet_schedule(&t->tasklet); 2296 tasklet_schedule(&t->tasklet);
2296 } 2297 }
2297 2298
2298 spin_unlock(&ohci->iso_tasklet_list_lock); 2299 spin_unlock_irqrestore(&ohci->iso_tasklet_list_lock, flags);
2299
2300} 2300}
2301 2301
2302static irqreturn_t ohci_irq_handler(int irq, void *dev_id, 2302static irqreturn_t ohci_irq_handler(int irq, void *dev_id,
diff --git a/drivers/ieee1394/raw1394.c b/drivers/ieee1394/raw1394.c
index 315f5ca8bedb..0470f77a9cd1 100644
--- a/drivers/ieee1394/raw1394.c
+++ b/drivers/ieee1394/raw1394.c
@@ -412,6 +412,7 @@ static void fcp_request(struct hpsb_host *host, int nodeid, int direction,
412static ssize_t raw1394_read(struct file *file, char __user * buffer, 412static ssize_t raw1394_read(struct file *file, char __user * buffer,
413 size_t count, loff_t * offset_is_ignored) 413 size_t count, loff_t * offset_is_ignored)
414{ 414{
415 unsigned long flags;
415 struct file_info *fi = (struct file_info *)file->private_data; 416 struct file_info *fi = (struct file_info *)file->private_data;
416 struct list_head *lh; 417 struct list_head *lh;
417 struct pending_request *req; 418 struct pending_request *req;
@@ -435,10 +436,10 @@ static ssize_t raw1394_read(struct file *file, char __user * buffer,
435 } 436 }
436 } 437 }
437 438
438 spin_lock_irq(&fi->reqlists_lock); 439 spin_lock_irqsave(&fi->reqlists_lock, flags);
439 lh = fi->req_complete.next; 440 lh = fi->req_complete.next;
440 list_del(lh); 441 list_del(lh);
441 spin_unlock_irq(&fi->reqlists_lock); 442 spin_unlock_irqrestore(&fi->reqlists_lock, flags);
442 443
443 req = list_entry(lh, struct pending_request, list); 444 req = list_entry(lh, struct pending_request, list);
444 445
@@ -486,6 +487,7 @@ static int state_opened(struct file_info *fi, struct pending_request *req)
486 487
487static int state_initialized(struct file_info *fi, struct pending_request *req) 488static int state_initialized(struct file_info *fi, struct pending_request *req)
488{ 489{
490 unsigned long flags;
489 struct host_info *hi; 491 struct host_info *hi;
490 struct raw1394_khost_list *khl; 492 struct raw1394_khost_list *khl;
491 493
@@ -499,7 +501,7 @@ static int state_initialized(struct file_info *fi, struct pending_request *req)
499 501
500 switch (req->req.type) { 502 switch (req->req.type) {
501 case RAW1394_REQ_LIST_CARDS: 503 case RAW1394_REQ_LIST_CARDS:
502 spin_lock_irq(&host_info_lock); 504 spin_lock_irqsave(&host_info_lock, flags);
503 khl = kmalloc(sizeof(struct raw1394_khost_list) * host_count, 505 khl = kmalloc(sizeof(struct raw1394_khost_list) * host_count,
504 SLAB_ATOMIC); 506 SLAB_ATOMIC);
505 507
@@ -513,7 +515,7 @@ static int state_initialized(struct file_info *fi, struct pending_request *req)
513 khl++; 515 khl++;
514 } 516 }
515 } 517 }
516 spin_unlock_irq(&host_info_lock); 518 spin_unlock_irqrestore(&host_info_lock, flags);
517 519
518 if (khl != NULL) { 520 if (khl != NULL) {
519 req->req.error = RAW1394_ERROR_NONE; 521 req->req.error = RAW1394_ERROR_NONE;
@@ -528,7 +530,7 @@ static int state_initialized(struct file_info *fi, struct pending_request *req)
528 break; 530 break;
529 531
530 case RAW1394_REQ_SET_CARD: 532 case RAW1394_REQ_SET_CARD:
531 spin_lock_irq(&host_info_lock); 533 spin_lock_irqsave(&host_info_lock, flags);
532 if (req->req.misc < host_count) { 534 if (req->req.misc < host_count) {
533 list_for_each_entry(hi, &host_info_list, list) { 535 list_for_each_entry(hi, &host_info_list, list) {
534 if (!req->req.misc--) 536 if (!req->req.misc--)
@@ -550,7 +552,7 @@ static int state_initialized(struct file_info *fi, struct pending_request *req)
550 } else { 552 } else {
551 req->req.error = RAW1394_ERROR_INVALID_ARG; 553 req->req.error = RAW1394_ERROR_INVALID_ARG;
552 } 554 }
553 spin_unlock_irq(&host_info_lock); 555 spin_unlock_irqrestore(&host_info_lock, flags);
554 556
555 req->req.length = 0; 557 req->req.length = 0;
556 break; 558 break;
@@ -569,7 +571,6 @@ static void handle_iso_listen(struct file_info *fi, struct pending_request *req)
569{ 571{
570 int channel = req->req.misc; 572 int channel = req->req.misc;
571 573
572 spin_lock_irq(&host_info_lock);
573 if ((channel > 63) || (channel < -64)) { 574 if ((channel > 63) || (channel < -64)) {
574 req->req.error = RAW1394_ERROR_INVALID_ARG; 575 req->req.error = RAW1394_ERROR_INVALID_ARG;
575 } else if (channel >= 0) { 576 } else if (channel >= 0) {
@@ -601,7 +602,6 @@ static void handle_iso_listen(struct file_info *fi, struct pending_request *req)
601 602
602 req->req.length = 0; 603 req->req.length = 0;
603 queue_complete_req(req); 604 queue_complete_req(req);
604 spin_unlock_irq(&host_info_lock);
605} 605}
606 606
607static void handle_fcp_listen(struct file_info *fi, struct pending_request *req) 607static void handle_fcp_listen(struct file_info *fi, struct pending_request *req)
@@ -627,6 +627,7 @@ static void handle_fcp_listen(struct file_info *fi, struct pending_request *req)
627static int handle_async_request(struct file_info *fi, 627static int handle_async_request(struct file_info *fi,
628 struct pending_request *req, int node) 628 struct pending_request *req, int node)
629{ 629{
630 unsigned long flags;
630 struct hpsb_packet *packet = NULL; 631 struct hpsb_packet *packet = NULL;
631 u64 addr = req->req.address & 0xffffffffffffULL; 632 u64 addr = req->req.address & 0xffffffffffffULL;
632 633
@@ -761,9 +762,9 @@ static int handle_async_request(struct file_info *fi,
761 hpsb_set_packet_complete_task(packet, 762 hpsb_set_packet_complete_task(packet,
762 (void (*)(void *))queue_complete_cb, req); 763 (void (*)(void *))queue_complete_cb, req);
763 764
764 spin_lock_irq(&fi->reqlists_lock); 765 spin_lock_irqsave(&fi->reqlists_lock, flags);
765 list_add_tail(&req->list, &fi->req_pending); 766 list_add_tail(&req->list, &fi->req_pending);
766 spin_unlock_irq(&fi->reqlists_lock); 767 spin_unlock_irqrestore(&fi->reqlists_lock, flags);
767 768
768 packet->generation = req->req.generation; 769 packet->generation = req->req.generation;
769 770
@@ -779,6 +780,7 @@ static int handle_async_request(struct file_info *fi,
779static int handle_iso_send(struct file_info *fi, struct pending_request *req, 780static int handle_iso_send(struct file_info *fi, struct pending_request *req,
780 int channel) 781 int channel)
781{ 782{
783 unsigned long flags;
782 struct hpsb_packet *packet; 784 struct hpsb_packet *packet;
783 785
784 packet = hpsb_make_isopacket(fi->host, req->req.length, channel & 0x3f, 786 packet = hpsb_make_isopacket(fi->host, req->req.length, channel & 0x3f,
@@ -804,9 +806,9 @@ static int handle_iso_send(struct file_info *fi, struct pending_request *req,
804 (void (*)(void *))queue_complete_req, 806 (void (*)(void *))queue_complete_req,
805 req); 807 req);
806 808
807 spin_lock_irq(&fi->reqlists_lock); 809 spin_lock_irqsave(&fi->reqlists_lock, flags);
808 list_add_tail(&req->list, &fi->req_pending); 810 list_add_tail(&req->list, &fi->req_pending);
809 spin_unlock_irq(&fi->reqlists_lock); 811 spin_unlock_irqrestore(&fi->reqlists_lock, flags);
810 812
811 /* Update the generation of the packet just before sending. */ 813 /* Update the generation of the packet just before sending. */
812 packet->generation = req->req.generation; 814 packet->generation = req->req.generation;
@@ -821,6 +823,7 @@ static int handle_iso_send(struct file_info *fi, struct pending_request *req,
821 823
822static int handle_async_send(struct file_info *fi, struct pending_request *req) 824static int handle_async_send(struct file_info *fi, struct pending_request *req)
823{ 825{
826 unsigned long flags;
824 struct hpsb_packet *packet; 827 struct hpsb_packet *packet;
825 int header_length = req->req.misc & 0xffff; 828 int header_length = req->req.misc & 0xffff;
826 int expect_response = req->req.misc >> 16; 829 int expect_response = req->req.misc >> 16;
@@ -867,9 +870,9 @@ static int handle_async_send(struct file_info *fi, struct pending_request *req)
867 hpsb_set_packet_complete_task(packet, 870 hpsb_set_packet_complete_task(packet,
868 (void (*)(void *))queue_complete_cb, req); 871 (void (*)(void *))queue_complete_cb, req);
869 872
870 spin_lock_irq(&fi->reqlists_lock); 873 spin_lock_irqsave(&fi->reqlists_lock, flags);
871 list_add_tail(&req->list, &fi->req_pending); 874 list_add_tail(&req->list, &fi->req_pending);
872 spin_unlock_irq(&fi->reqlists_lock); 875 spin_unlock_irqrestore(&fi->reqlists_lock, flags);
873 876
874 /* Update the generation of the packet just before sending. */ 877 /* Update the generation of the packet just before sending. */
875 packet->generation = req->req.generation; 878 packet->generation = req->req.generation;
@@ -885,6 +888,7 @@ static int handle_async_send(struct file_info *fi, struct pending_request *req)
885static int arm_read(struct hpsb_host *host, int nodeid, quadlet_t * buffer, 888static int arm_read(struct hpsb_host *host, int nodeid, quadlet_t * buffer,
886 u64 addr, size_t length, u16 flags) 889 u64 addr, size_t length, u16 flags)
887{ 890{
891 unsigned long irqflags;
888 struct pending_request *req; 892 struct pending_request *req;
889 struct host_info *hi; 893 struct host_info *hi;
890 struct file_info *fi = NULL; 894 struct file_info *fi = NULL;
@@ -899,7 +903,7 @@ static int arm_read(struct hpsb_host *host, int nodeid, quadlet_t * buffer,
899 "addr: %4.4x %8.8x length: %Zu", nodeid, 903 "addr: %4.4x %8.8x length: %Zu", nodeid,
900 (u16) ((addr >> 32) & 0xFFFF), (u32) (addr & 0xFFFFFFFF), 904 (u16) ((addr >> 32) & 0xFFFF), (u32) (addr & 0xFFFFFFFF),
901 length); 905 length);
902 spin_lock(&host_info_lock); 906 spin_lock_irqsave(&host_info_lock, irqflags);
903 hi = find_host_info(host); /* search address-entry */ 907 hi = find_host_info(host); /* search address-entry */
904 if (hi != NULL) { 908 if (hi != NULL) {
905 list_for_each_entry(fi, &hi->file_info_list, list) { 909 list_for_each_entry(fi, &hi->file_info_list, list) {
@@ -924,7 +928,7 @@ static int arm_read(struct hpsb_host *host, int nodeid, quadlet_t * buffer,
924 if (!found) { 928 if (!found) {
925 printk(KERN_ERR "raw1394: arm_read FAILED addr_entry not found" 929 printk(KERN_ERR "raw1394: arm_read FAILED addr_entry not found"
926 " -> rcode_address_error\n"); 930 " -> rcode_address_error\n");
927 spin_unlock(&host_info_lock); 931 spin_unlock_irqrestore(&host_info_lock, irqflags);
928 return (RCODE_ADDRESS_ERROR); 932 return (RCODE_ADDRESS_ERROR);
929 } else { 933 } else {
930 DBGMSG("arm_read addr_entry FOUND"); 934 DBGMSG("arm_read addr_entry FOUND");
@@ -954,7 +958,7 @@ static int arm_read(struct hpsb_host *host, int nodeid, quadlet_t * buffer,
954 req = __alloc_pending_request(SLAB_ATOMIC); 958 req = __alloc_pending_request(SLAB_ATOMIC);
955 if (!req) { 959 if (!req) {
956 DBGMSG("arm_read -> rcode_conflict_error"); 960 DBGMSG("arm_read -> rcode_conflict_error");
957 spin_unlock(&host_info_lock); 961 spin_unlock_irqrestore(&host_info_lock, irqflags);
958 return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. 962 return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected.
959 The request may be retried */ 963 The request may be retried */
960 } 964 }
@@ -974,7 +978,7 @@ static int arm_read(struct hpsb_host *host, int nodeid, quadlet_t * buffer,
974 if (!(req->data)) { 978 if (!(req->data)) {
975 free_pending_request(req); 979 free_pending_request(req);
976 DBGMSG("arm_read -> rcode_conflict_error"); 980 DBGMSG("arm_read -> rcode_conflict_error");
977 spin_unlock(&host_info_lock); 981 spin_unlock_irqrestore(&host_info_lock, irqflags);
978 return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. 982 return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected.
979 The request may be retried */ 983 The request may be retried */
980 } 984 }
@@ -1031,13 +1035,14 @@ static int arm_read(struct hpsb_host *host, int nodeid, quadlet_t * buffer,
1031 sizeof(struct arm_request)); 1035 sizeof(struct arm_request));
1032 queue_complete_req(req); 1036 queue_complete_req(req);
1033 } 1037 }
1034 spin_unlock(&host_info_lock); 1038 spin_unlock_irqrestore(&host_info_lock, irqflags);
1035 return (rcode); 1039 return (rcode);
1036} 1040}
1037 1041
1038static int arm_write(struct hpsb_host *host, int nodeid, int destid, 1042static int arm_write(struct hpsb_host *host, int nodeid, int destid,
1039 quadlet_t * data, u64 addr, size_t length, u16 flags) 1043 quadlet_t * data, u64 addr, size_t length, u16 flags)
1040{ 1044{
1045 unsigned long irqflags;
1041 struct pending_request *req; 1046 struct pending_request *req;
1042 struct host_info *hi; 1047 struct host_info *hi;
1043 struct file_info *fi = NULL; 1048 struct file_info *fi = NULL;
@@ -1052,7 +1057,7 @@ static int arm_write(struct hpsb_host *host, int nodeid, int destid,
1052 "addr: %4.4x %8.8x length: %Zu", nodeid, 1057 "addr: %4.4x %8.8x length: %Zu", nodeid,
1053 (u16) ((addr >> 32) & 0xFFFF), (u32) (addr & 0xFFFFFFFF), 1058 (u16) ((addr >> 32) & 0xFFFF), (u32) (addr & 0xFFFFFFFF),
1054 length); 1059 length);
1055 spin_lock(&host_info_lock); 1060 spin_lock_irqsave(&host_info_lock, irqflags);
1056 hi = find_host_info(host); /* search address-entry */ 1061 hi = find_host_info(host); /* search address-entry */
1057 if (hi != NULL) { 1062 if (hi != NULL) {
1058 list_for_each_entry(fi, &hi->file_info_list, list) { 1063 list_for_each_entry(fi, &hi->file_info_list, list) {
@@ -1077,7 +1082,7 @@ static int arm_write(struct hpsb_host *host, int nodeid, int destid,
1077 if (!found) { 1082 if (!found) {
1078 printk(KERN_ERR "raw1394: arm_write FAILED addr_entry not found" 1083 printk(KERN_ERR "raw1394: arm_write FAILED addr_entry not found"
1079 " -> rcode_address_error\n"); 1084 " -> rcode_address_error\n");
1080 spin_unlock(&host_info_lock); 1085 spin_unlock_irqrestore(&host_info_lock, irqflags);
1081 return (RCODE_ADDRESS_ERROR); 1086 return (RCODE_ADDRESS_ERROR);
1082 } else { 1087 } else {
1083 DBGMSG("arm_write addr_entry FOUND"); 1088 DBGMSG("arm_write addr_entry FOUND");
@@ -1106,7 +1111,7 @@ static int arm_write(struct hpsb_host *host, int nodeid, int destid,
1106 req = __alloc_pending_request(SLAB_ATOMIC); 1111 req = __alloc_pending_request(SLAB_ATOMIC);
1107 if (!req) { 1112 if (!req) {
1108 DBGMSG("arm_write -> rcode_conflict_error"); 1113 DBGMSG("arm_write -> rcode_conflict_error");
1109 spin_unlock(&host_info_lock); 1114 spin_unlock_irqrestore(&host_info_lock, irqflags);
1110 return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. 1115 return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected.
1111 The request my be retried */ 1116 The request my be retried */
1112 } 1117 }
@@ -1118,7 +1123,7 @@ static int arm_write(struct hpsb_host *host, int nodeid, int destid,
1118 if (!(req->data)) { 1123 if (!(req->data)) {
1119 free_pending_request(req); 1124 free_pending_request(req);
1120 DBGMSG("arm_write -> rcode_conflict_error"); 1125 DBGMSG("arm_write -> rcode_conflict_error");
1121 spin_unlock(&host_info_lock); 1126 spin_unlock_irqrestore(&host_info_lock, irqflags);
1122 return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. 1127 return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected.
1123 The request may be retried */ 1128 The request may be retried */
1124 } 1129 }
@@ -1165,7 +1170,7 @@ static int arm_write(struct hpsb_host *host, int nodeid, int destid,
1165 sizeof(struct arm_request)); 1170 sizeof(struct arm_request));
1166 queue_complete_req(req); 1171 queue_complete_req(req);
1167 } 1172 }
1168 spin_unlock(&host_info_lock); 1173 spin_unlock_irqrestore(&host_info_lock, irqflags);
1169 return (rcode); 1174 return (rcode);
1170} 1175}
1171 1176
@@ -1173,6 +1178,7 @@ static int arm_lock(struct hpsb_host *host, int nodeid, quadlet_t * store,
1173 u64 addr, quadlet_t data, quadlet_t arg, int ext_tcode, 1178 u64 addr, quadlet_t data, quadlet_t arg, int ext_tcode,
1174 u16 flags) 1179 u16 flags)
1175{ 1180{
1181 unsigned long irqflags;
1176 struct pending_request *req; 1182 struct pending_request *req;
1177 struct host_info *hi; 1183 struct host_info *hi;
1178 struct file_info *fi = NULL; 1184 struct file_info *fi = NULL;
@@ -1198,7 +1204,7 @@ static int arm_lock(struct hpsb_host *host, int nodeid, quadlet_t * store,
1198 (u32) (addr & 0xFFFFFFFF), ext_tcode & 0xFF, 1204 (u32) (addr & 0xFFFFFFFF), ext_tcode & 0xFF,
1199 be32_to_cpu(data), be32_to_cpu(arg)); 1205 be32_to_cpu(data), be32_to_cpu(arg));
1200 } 1206 }
1201 spin_lock(&host_info_lock); 1207 spin_lock_irqsave(&host_info_lock, irqflags);
1202 hi = find_host_info(host); /* search address-entry */ 1208 hi = find_host_info(host); /* search address-entry */
1203 if (hi != NULL) { 1209 if (hi != NULL) {
1204 list_for_each_entry(fi, &hi->file_info_list, list) { 1210 list_for_each_entry(fi, &hi->file_info_list, list) {
@@ -1224,7 +1230,7 @@ static int arm_lock(struct hpsb_host *host, int nodeid, quadlet_t * store,
1224 if (!found) { 1230 if (!found) {
1225 printk(KERN_ERR "raw1394: arm_lock FAILED addr_entry not found" 1231 printk(KERN_ERR "raw1394: arm_lock FAILED addr_entry not found"
1226 " -> rcode_address_error\n"); 1232 " -> rcode_address_error\n");
1227 spin_unlock(&host_info_lock); 1233 spin_unlock_irqrestore(&host_info_lock, irqflags);
1228 return (RCODE_ADDRESS_ERROR); 1234 return (RCODE_ADDRESS_ERROR);
1229 } else { 1235 } else {
1230 DBGMSG("arm_lock addr_entry FOUND"); 1236 DBGMSG("arm_lock addr_entry FOUND");
@@ -1307,7 +1313,7 @@ static int arm_lock(struct hpsb_host *host, int nodeid, quadlet_t * store,
1307 req = __alloc_pending_request(SLAB_ATOMIC); 1313 req = __alloc_pending_request(SLAB_ATOMIC);
1308 if (!req) { 1314 if (!req) {
1309 DBGMSG("arm_lock -> rcode_conflict_error"); 1315 DBGMSG("arm_lock -> rcode_conflict_error");
1310 spin_unlock(&host_info_lock); 1316 spin_unlock_irqrestore(&host_info_lock, irqflags);
1311 return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. 1317 return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected.
1312 The request may be retried */ 1318 The request may be retried */
1313 } 1319 }
@@ -1316,7 +1322,7 @@ static int arm_lock(struct hpsb_host *host, int nodeid, quadlet_t * store,
1316 if (!(req->data)) { 1322 if (!(req->data)) {
1317 free_pending_request(req); 1323 free_pending_request(req);
1318 DBGMSG("arm_lock -> rcode_conflict_error"); 1324 DBGMSG("arm_lock -> rcode_conflict_error");
1319 spin_unlock(&host_info_lock); 1325 spin_unlock_irqrestore(&host_info_lock, irqflags);
1320 return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. 1326 return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected.
1321 The request may be retried */ 1327 The request may be retried */
1322 } 1328 }
@@ -1382,7 +1388,7 @@ static int arm_lock(struct hpsb_host *host, int nodeid, quadlet_t * store,
1382 sizeof(struct arm_response) + 2 * sizeof(*store)); 1388 sizeof(struct arm_response) + 2 * sizeof(*store));
1383 queue_complete_req(req); 1389 queue_complete_req(req);
1384 } 1390 }
1385 spin_unlock(&host_info_lock); 1391 spin_unlock_irqrestore(&host_info_lock, irqflags);
1386 return (rcode); 1392 return (rcode);
1387} 1393}
1388 1394
@@ -1390,6 +1396,7 @@ static int arm_lock64(struct hpsb_host *host, int nodeid, octlet_t * store,
1390 u64 addr, octlet_t data, octlet_t arg, int ext_tcode, 1396 u64 addr, octlet_t data, octlet_t arg, int ext_tcode,
1391 u16 flags) 1397 u16 flags)
1392{ 1398{
1399 unsigned long irqflags;
1393 struct pending_request *req; 1400 struct pending_request *req;
1394 struct host_info *hi; 1401 struct host_info *hi;
1395 struct file_info *fi = NULL; 1402 struct file_info *fi = NULL;
@@ -1422,7 +1429,7 @@ static int arm_lock64(struct hpsb_host *host, int nodeid, octlet_t * store,
1422 (u32) ((be64_to_cpu(arg) >> 32) & 0xFFFFFFFF), 1429 (u32) ((be64_to_cpu(arg) >> 32) & 0xFFFFFFFF),
1423 (u32) (be64_to_cpu(arg) & 0xFFFFFFFF)); 1430 (u32) (be64_to_cpu(arg) & 0xFFFFFFFF));
1424 } 1431 }
1425 spin_lock(&host_info_lock); 1432 spin_lock_irqsave(&host_info_lock, irqflags);
1426 hi = find_host_info(host); /* search addressentry in file_info's for host */ 1433 hi = find_host_info(host); /* search addressentry in file_info's for host */
1427 if (hi != NULL) { 1434 if (hi != NULL) {
1428 list_for_each_entry(fi, &hi->file_info_list, list) { 1435 list_for_each_entry(fi, &hi->file_info_list, list) {
@@ -1449,7 +1456,7 @@ static int arm_lock64(struct hpsb_host *host, int nodeid, octlet_t * store,
1449 printk(KERN_ERR 1456 printk(KERN_ERR
1450 "raw1394: arm_lock64 FAILED addr_entry not found" 1457 "raw1394: arm_lock64 FAILED addr_entry not found"
1451 " -> rcode_address_error\n"); 1458 " -> rcode_address_error\n");
1452 spin_unlock(&host_info_lock); 1459 spin_unlock_irqrestore(&host_info_lock, irqflags);
1453 return (RCODE_ADDRESS_ERROR); 1460 return (RCODE_ADDRESS_ERROR);
1454 } else { 1461 } else {
1455 DBGMSG("arm_lock64 addr_entry FOUND"); 1462 DBGMSG("arm_lock64 addr_entry FOUND");
@@ -1533,7 +1540,7 @@ static int arm_lock64(struct hpsb_host *host, int nodeid, octlet_t * store,
1533 DBGMSG("arm_lock64 -> entering notification-section"); 1540 DBGMSG("arm_lock64 -> entering notification-section");
1534 req = __alloc_pending_request(SLAB_ATOMIC); 1541 req = __alloc_pending_request(SLAB_ATOMIC);
1535 if (!req) { 1542 if (!req) {
1536 spin_unlock(&host_info_lock); 1543 spin_unlock_irqrestore(&host_info_lock, irqflags);
1537 DBGMSG("arm_lock64 -> rcode_conflict_error"); 1544 DBGMSG("arm_lock64 -> rcode_conflict_error");
1538 return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. 1545 return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected.
1539 The request may be retried */ 1546 The request may be retried */
@@ -1542,7 +1549,7 @@ static int arm_lock64(struct hpsb_host *host, int nodeid, octlet_t * store,
1542 req->data = kmalloc(size, SLAB_ATOMIC); 1549 req->data = kmalloc(size, SLAB_ATOMIC);
1543 if (!(req->data)) { 1550 if (!(req->data)) {
1544 free_pending_request(req); 1551 free_pending_request(req);
1545 spin_unlock(&host_info_lock); 1552 spin_unlock_irqrestore(&host_info_lock, irqflags);
1546 DBGMSG("arm_lock64 -> rcode_conflict_error"); 1553 DBGMSG("arm_lock64 -> rcode_conflict_error");
1547 return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected. 1554 return (RCODE_CONFLICT_ERROR); /* A resource conflict was detected.
1548 The request may be retried */ 1555 The request may be retried */
@@ -1609,7 +1616,7 @@ static int arm_lock64(struct hpsb_host *host, int nodeid, octlet_t * store,
1609 sizeof(struct arm_response) + 2 * sizeof(*store)); 1616 sizeof(struct arm_response) + 2 * sizeof(*store));
1610 queue_complete_req(req); 1617 queue_complete_req(req);
1611 } 1618 }
1612 spin_unlock(&host_info_lock); 1619 spin_unlock_irqrestore(&host_info_lock, irqflags);
1613 return (rcode); 1620 return (rcode);
1614} 1621}
1615 1622
@@ -1980,6 +1987,7 @@ static int write_phypacket(struct file_info *fi, struct pending_request *req)
1980 struct hpsb_packet *packet = NULL; 1987 struct hpsb_packet *packet = NULL;
1981 int retval = 0; 1988 int retval = 0;
1982 quadlet_t data; 1989 quadlet_t data;
1990 unsigned long flags;
1983 1991
1984 data = be32_to_cpu((u32) req->req.sendb); 1992 data = be32_to_cpu((u32) req->req.sendb);
1985 DBGMSG("write_phypacket called - quadlet 0x%8.8x ", data); 1993 DBGMSG("write_phypacket called - quadlet 0x%8.8x ", data);
@@ -1990,9 +1998,9 @@ static int write_phypacket(struct file_info *fi, struct pending_request *req)
1990 req->packet = packet; 1998 req->packet = packet;
1991 hpsb_set_packet_complete_task(packet, 1999 hpsb_set_packet_complete_task(packet,
1992 (void (*)(void *))queue_complete_cb, req); 2000 (void (*)(void *))queue_complete_cb, req);
1993 spin_lock_irq(&fi->reqlists_lock); 2001 spin_lock_irqsave(&fi->reqlists_lock, flags);
1994 list_add_tail(&req->list, &fi->req_pending); 2002 list_add_tail(&req->list, &fi->req_pending);
1995 spin_unlock_irq(&fi->reqlists_lock); 2003 spin_unlock_irqrestore(&fi->reqlists_lock, flags);
1996 packet->generation = req->req.generation; 2004 packet->generation = req->req.generation;
1997 retval = hpsb_send_packet(packet); 2005 retval = hpsb_send_packet(packet);
1998 DBGMSG("write_phypacket send_packet called => retval: %d ", retval); 2006 DBGMSG("write_phypacket send_packet called => retval: %d ", retval);
@@ -2659,14 +2667,15 @@ static unsigned int raw1394_poll(struct file *file, poll_table * pt)
2659{ 2667{
2660 struct file_info *fi = file->private_data; 2668 struct file_info *fi = file->private_data;
2661 unsigned int mask = POLLOUT | POLLWRNORM; 2669 unsigned int mask = POLLOUT | POLLWRNORM;
2670 unsigned long flags;
2662 2671
2663 poll_wait(file, &fi->poll_wait_complete, pt); 2672 poll_wait(file, &fi->poll_wait_complete, pt);
2664 2673
2665 spin_lock_irq(&fi->reqlists_lock); 2674 spin_lock_irqsave(&fi->reqlists_lock, flags);
2666 if (!list_empty(&fi->req_complete)) { 2675 if (!list_empty(&fi->req_complete)) {
2667 mask |= POLLIN | POLLRDNORM; 2676 mask |= POLLIN | POLLRDNORM;
2668 } 2677 }
2669 spin_unlock_irq(&fi->reqlists_lock); 2678 spin_unlock_irqrestore(&fi->reqlists_lock, flags);
2670 2679
2671 return mask; 2680 return mask;
2672} 2681}
@@ -2710,6 +2719,7 @@ static int raw1394_release(struct inode *inode, struct file *file)
2710 struct arm_addr *arm_addr = NULL; 2719 struct arm_addr *arm_addr = NULL;
2711 int another_host; 2720 int another_host;
2712 int csr_mod = 0; 2721 int csr_mod = 0;
2722 unsigned long flags;
2713 2723
2714 if (fi->iso_state != RAW1394_ISO_INACTIVE) 2724 if (fi->iso_state != RAW1394_ISO_INACTIVE)
2715 raw1394_iso_shutdown(fi); 2725 raw1394_iso_shutdown(fi);
@@ -2720,13 +2730,11 @@ static int raw1394_release(struct inode *inode, struct file *file)
2720 } 2730 }
2721 } 2731 }
2722 2732
2723 spin_lock_irq(&host_info_lock); 2733 spin_lock_irqsave(&host_info_lock, flags);
2724 fi->listen_channels = 0; 2734 fi->listen_channels = 0;
2725 spin_unlock_irq(&host_info_lock);
2726 2735
2727 fail = 0; 2736 fail = 0;
2728 /* set address-entries invalid */ 2737 /* set address-entries invalid */
2729 spin_lock_irq(&host_info_lock);
2730 2738
2731 while (!list_empty(&fi->addr_list)) { 2739 while (!list_empty(&fi->addr_list)) {
2732 another_host = 0; 2740 another_host = 0;
@@ -2777,14 +2785,14 @@ static int raw1394_release(struct inode *inode, struct file *file)
2777 vfree(addr->addr_space_buffer); 2785 vfree(addr->addr_space_buffer);
2778 kfree(addr); 2786 kfree(addr);
2779 } /* while */ 2787 } /* while */
2780 spin_unlock_irq(&host_info_lock); 2788 spin_unlock_irqrestore(&host_info_lock, flags);
2781 if (fail > 0) { 2789 if (fail > 0) {
2782 printk(KERN_ERR "raw1394: during addr_list-release " 2790 printk(KERN_ERR "raw1394: during addr_list-release "
2783 "error(s) occurred \n"); 2791 "error(s) occurred \n");
2784 } 2792 }
2785 2793
2786 while (!done) { 2794 while (!done) {
2787 spin_lock_irq(&fi->reqlists_lock); 2795 spin_lock_irqsave(&fi->reqlists_lock, flags);
2788 2796
2789 while (!list_empty(&fi->req_complete)) { 2797 while (!list_empty(&fi->req_complete)) {
2790 lh = fi->req_complete.next; 2798 lh = fi->req_complete.next;
@@ -2798,7 +2806,7 @@ static int raw1394_release(struct inode *inode, struct file *file)
2798 if (list_empty(&fi->req_pending)) 2806 if (list_empty(&fi->req_pending))
2799 done = 1; 2807 done = 1;
2800 2808
2801 spin_unlock_irq(&fi->reqlists_lock); 2809 spin_unlock_irqrestore(&fi->reqlists_lock, flags);
2802 2810
2803 if (!done) 2811 if (!done)
2804 down_interruptible(&fi->complete_sem); 2812 down_interruptible(&fi->complete_sem);
@@ -2828,9 +2836,9 @@ static int raw1394_release(struct inode *inode, struct file *file)
2828 fi->host->id); 2836 fi->host->id);
2829 2837
2830 if (fi->state == connected) { 2838 if (fi->state == connected) {
2831 spin_lock_irq(&host_info_lock); 2839 spin_lock_irqsave(&host_info_lock, flags);
2832 list_del(&fi->list); 2840 list_del(&fi->list);
2833 spin_unlock_irq(&host_info_lock); 2841 spin_unlock_irqrestore(&host_info_lock, flags);
2834 2842
2835 put_device(&fi->host->device); 2843 put_device(&fi->host->device);
2836 } 2844 }
diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig
index 444f7756fee6..571a68691a4a 100644
--- a/drivers/input/keyboard/Kconfig
+++ b/drivers/input/keyboard/Kconfig
@@ -93,7 +93,7 @@ config KEYBOARD_LKKBD
93 93
94config KEYBOARD_LOCOMO 94config KEYBOARD_LOCOMO
95 tristate "LoCoMo Keyboard Support" 95 tristate "LoCoMo Keyboard Support"
96 depends on SHARP_LOCOMO 96 depends on SHARP_LOCOMO && INPUT_KEYBOARD
97 help 97 help
98 Say Y here if you are running Linux on a Sharp Zaurus Collie or Poodle based PDA 98 Say Y here if you are running Linux on a Sharp Zaurus Collie or Poodle based PDA
99 99
diff --git a/drivers/input/keyboard/spitzkbd.c b/drivers/input/keyboard/spitzkbd.c
index 1714045a182b..344f46005401 100644
--- a/drivers/input/keyboard/spitzkbd.c
+++ b/drivers/input/keyboard/spitzkbd.c
@@ -53,7 +53,7 @@ static unsigned char spitzkbd_keycode[NR_SCANCODES] = {
53 KEY_LEFTCTRL, KEY_1, KEY_3, KEY_5, KEY_6, KEY_7, KEY_9, KEY_0, KEY_BACKSPACE, SPITZ_KEY_EXOK, SPITZ_KEY_EXCANCEL, 0, 0, 0, 0, 0, /* 1-16 */ 53 KEY_LEFTCTRL, KEY_1, KEY_3, KEY_5, KEY_6, KEY_7, KEY_9, KEY_0, KEY_BACKSPACE, SPITZ_KEY_EXOK, SPITZ_KEY_EXCANCEL, 0, 0, 0, 0, 0, /* 1-16 */
54 0, KEY_2, KEY_4, KEY_R, KEY_Y, KEY_8, KEY_I, KEY_O, KEY_P, SPITZ_KEY_EXJOGDOWN, SPITZ_KEY_EXJOGUP, 0, 0, 0, 0, 0, /* 17-32 */ 54 0, KEY_2, KEY_4, KEY_R, KEY_Y, KEY_8, KEY_I, KEY_O, KEY_P, SPITZ_KEY_EXJOGDOWN, SPITZ_KEY_EXJOGUP, 0, 0, 0, 0, 0, /* 17-32 */
55 KEY_TAB, KEY_Q, KEY_E, KEY_T, KEY_G, KEY_U, KEY_J, KEY_K, 0, 0, 0, 0, 0, 0, 0, 0, /* 33-48 */ 55 KEY_TAB, KEY_Q, KEY_E, KEY_T, KEY_G, KEY_U, KEY_J, KEY_K, 0, 0, 0, 0, 0, 0, 0, 0, /* 33-48 */
56 SPITZ_KEY_CALENDER, KEY_W, KEY_S, KEY_F, KEY_V, KEY_H, KEY_M, KEY_L, 0, 0, KEY_RIGHTSHIFT, 0, 0, 0, 0, 0, /* 49-64 */ 56 SPITZ_KEY_CALENDER, KEY_W, KEY_S, KEY_F, KEY_V, KEY_H, KEY_M, KEY_L, 0, KEY_RIGHTSHIFT, 0, 0, 0, 0, 0, 0, /* 49-64 */
57 SPITZ_KEY_ADDRESS, KEY_A, KEY_D, KEY_C, KEY_B, KEY_N, KEY_DOT, 0, KEY_ENTER, KEY_LEFTSHIFT, 0, 0, 0, 0, 0, 0, /* 65-80 */ 57 SPITZ_KEY_ADDRESS, KEY_A, KEY_D, KEY_C, KEY_B, KEY_N, KEY_DOT, 0, KEY_ENTER, KEY_LEFTSHIFT, 0, 0, 0, 0, 0, 0, /* 65-80 */
58 SPITZ_KEY_MAIL, KEY_Z, KEY_X, KEY_MINUS, KEY_SPACE, KEY_COMMA, 0, KEY_UP, 0, 0, SPITZ_KEY_FN, 0, 0, 0, 0, 0, /* 81-96 */ 58 SPITZ_KEY_MAIL, KEY_Z, KEY_X, KEY_MINUS, KEY_SPACE, KEY_COMMA, 0, KEY_UP, 0, 0, SPITZ_KEY_FN, 0, 0, 0, 0, 0, /* 81-96 */
59 KEY_SYSRQ, SPITZ_KEY_JAP1, SPITZ_KEY_JAP2, SPITZ_KEY_CANCEL, SPITZ_KEY_OK, SPITZ_KEY_MENU, KEY_LEFT, KEY_DOWN, KEY_RIGHT, 0, 0, 0, 0, 0, 0, 0 /* 97-112 */ 59 KEY_SYSRQ, SPITZ_KEY_JAP1, SPITZ_KEY_JAP2, SPITZ_KEY_CANCEL, SPITZ_KEY_OK, SPITZ_KEY_MENU, KEY_LEFT, KEY_DOWN, KEY_RIGHT, 0, 0, 0, 0, 0, 0, 0 /* 97-112 */
diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c
index d5c5b32045af..4015a91f4b6e 100644
--- a/drivers/input/misc/uinput.c
+++ b/drivers/input/misc/uinput.c
@@ -90,11 +90,11 @@ static inline int uinput_request_reserve_slot(struct uinput_device *udev, struct
90 90
91static void uinput_request_done(struct uinput_device *udev, struct uinput_request *request) 91static void uinput_request_done(struct uinput_device *udev, struct uinput_request *request)
92{ 92{
93 complete(&request->done);
94
95 /* Mark slot as available */ 93 /* Mark slot as available */
96 udev->requests[request->id] = NULL; 94 udev->requests[request->id] = NULL;
97 wake_up_interruptible(&udev->requests_waitq); 95 wake_up_interruptible(&udev->requests_waitq);
96
97 complete(&request->done);
98} 98}
99 99
100static int uinput_request_submit(struct input_dev *dev, struct uinput_request *request) 100static int uinput_request_submit(struct input_dev *dev, struct uinput_request *request)
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 2897df90df44..e9476075aa13 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -3063,6 +3063,7 @@ static int md_thread(void * arg)
3063 * many dirty RAID5 blocks. 3063 * many dirty RAID5 blocks.
3064 */ 3064 */
3065 3065
3066 allow_signal(SIGKILL);
3066 complete(thread->event); 3067 complete(thread->event);
3067 while (!kthread_should_stop()) { 3068 while (!kthread_should_stop()) {
3068 void (*run)(mddev_t *); 3069 void (*run)(mddev_t *);
@@ -3111,7 +3112,7 @@ mdk_thread_t *md_register_thread(void (*run) (mddev_t *), mddev_t *mddev,
3111 thread->mddev = mddev; 3112 thread->mddev = mddev;
3112 thread->name = name; 3113 thread->name = name;
3113 thread->timeout = MAX_SCHEDULE_TIMEOUT; 3114 thread->timeout = MAX_SCHEDULE_TIMEOUT;
3114 thread->tsk = kthread_run(md_thread, thread, mdname(thread->mddev)); 3115 thread->tsk = kthread_run(md_thread, thread, name, mdname(thread->mddev));
3115 if (IS_ERR(thread->tsk)) { 3116 if (IS_ERR(thread->tsk)) {
3116 kfree(thread); 3117 kfree(thread);
3117 return NULL; 3118 return NULL;
@@ -3569,6 +3570,7 @@ static void md_do_sync(mddev_t *mddev)
3569 try_again: 3570 try_again:
3570 if (signal_pending(current)) { 3571 if (signal_pending(current)) {
3571 flush_signals(current); 3572 flush_signals(current);
3573 set_bit(MD_RECOVERY_INTR, &mddev->recovery);
3572 goto skip; 3574 goto skip;
3573 } 3575 }
3574 ITERATE_MDDEV(mddev2,tmp) { 3576 ITERATE_MDDEV(mddev2,tmp) {
diff --git a/drivers/media/radio/radio-cadet.c b/drivers/media/radio/radio-cadet.c
index 022913da8c59..9b0406318f2d 100644
--- a/drivers/media/radio/radio-cadet.c
+++ b/drivers/media/radio/radio-cadet.c
@@ -543,7 +543,7 @@ static int cadet_probe(void)
543 543
544 for(i=0;i<8;i++) { 544 for(i=0;i<8;i++) {
545 io=iovals[i]; 545 io=iovals[i];
546 if(request_region(io,2, "cadet-probe")>=0) { 546 if (request_region(io, 2, "cadet-probe")) {
547 cadet_setfreq(1410); 547 cadet_setfreq(1410);
548 if(cadet_getfreq()==1410) { 548 if(cadet_getfreq()==1410) {
549 release_region(io, 2); 549 release_region(io, 2);
diff --git a/drivers/media/video/vpx3220.c b/drivers/media/video/vpx3220.c
index 4437bdebe24f..137b58f2c666 100644
--- a/drivers/media/video/vpx3220.c
+++ b/drivers/media/video/vpx3220.c
@@ -203,7 +203,7 @@ static const unsigned short init_ntsc[] = {
203 0x8c, 640, /* Horizontal length */ 203 0x8c, 640, /* Horizontal length */
204 0x8d, 640, /* Number of pixels */ 204 0x8d, 640, /* Number of pixels */
205 0x8f, 0xc00, /* Disable window 2 */ 205 0x8f, 0xc00, /* Disable window 2 */
206 0xf0, 0x173, /* 13.5 MHz transport, Forced 206 0xf0, 0x73, /* 13.5 MHz transport, Forced
207 * mode, latch windows */ 207 * mode, latch windows */
208 0xf2, 0x13, /* NTSC M, composite input */ 208 0xf2, 0x13, /* NTSC M, composite input */
209 0xe7, 0x1e1, /* Enable vertical standard 209 0xe7, 0x1e1, /* Enable vertical standard
@@ -212,38 +212,36 @@ static const unsigned short init_ntsc[] = {
212 212
213static const unsigned short init_pal[] = { 213static const unsigned short init_pal[] = {
214 0x88, 23, /* Window 1 vertical begin */ 214 0x88, 23, /* Window 1 vertical begin */
215 0x89, 288 + 16, /* Vertical lines in (16 lines 215 0x89, 288, /* Vertical lines in (16 lines
216 * skipped by the VFE) */ 216 * skipped by the VFE) */
217 0x8a, 288 + 16, /* Vertical lines out (16 lines 217 0x8a, 288, /* Vertical lines out (16 lines
218 * skipped by the VFE) */ 218 * skipped by the VFE) */
219 0x8b, 16, /* Horizontal begin */ 219 0x8b, 16, /* Horizontal begin */
220 0x8c, 768, /* Horizontal length */ 220 0x8c, 768, /* Horizontal length */
221 0x8d, 784, /* Number of pixels 221 0x8d, 784, /* Number of pixels
222 * Must be >= Horizontal begin + Horizontal length */ 222 * Must be >= Horizontal begin + Horizontal length */
223 0x8f, 0xc00, /* Disable window 2 */ 223 0x8f, 0xc00, /* Disable window 2 */
224 0xf0, 0x177, /* 13.5 MHz transport, Forced 224 0xf0, 0x77, /* 13.5 MHz transport, Forced
225 * mode, latch windows */ 225 * mode, latch windows */
226 0xf2, 0x3d1, /* PAL B,G,H,I, composite input */ 226 0xf2, 0x3d1, /* PAL B,G,H,I, composite input */
227 0xe7, 0x261, /* PAL/SECAM set to 288 + 16 lines 227 0xe7, 0x241, /* PAL/SECAM set to 288 lines */
228 * change to 0x241 for 288 lines */
229}; 228};
230 229
231static const unsigned short init_secam[] = { 230static const unsigned short init_secam[] = {
232 0x88, 23 - 16, /* Window 1 vertical begin */ 231 0x88, 23, /* Window 1 vertical begin */
233 0x89, 288 + 16, /* Vertical lines in (16 lines 232 0x89, 288, /* Vertical lines in (16 lines
234 * skipped by the VFE) */ 233 * skipped by the VFE) */
235 0x8a, 288 + 16, /* Vertical lines out (16 lines 234 0x8a, 288, /* Vertical lines out (16 lines
236 * skipped by the VFE) */ 235 * skipped by the VFE) */
237 0x8b, 16, /* Horizontal begin */ 236 0x8b, 16, /* Horizontal begin */
238 0x8c, 768, /* Horizontal length */ 237 0x8c, 768, /* Horizontal length */
239 0x8d, 784, /* Number of pixels 238 0x8d, 784, /* Number of pixels
240 * Must be >= Horizontal begin + Horizontal length */ 239 * Must be >= Horizontal begin + Horizontal length */
241 0x8f, 0xc00, /* Disable window 2 */ 240 0x8f, 0xc00, /* Disable window 2 */
242 0xf0, 0x177, /* 13.5 MHz transport, Forced 241 0xf0, 0x77, /* 13.5 MHz transport, Forced
243 * mode, latch windows */ 242 * mode, latch windows */
244 0xf2, 0x3d5, /* SECAM, composite input */ 243 0xf2, 0x3d5, /* SECAM, composite input */
245 0xe7, 0x261, /* PAL/SECAM set to 288 + 16 lines 244 0xe7, 0x241, /* PAL/SECAM set to 288 lines */
246 * change to 0x241 for 288 lines */
247}; 245};
248 246
249static const unsigned char init_common[] = { 247static const unsigned char init_common[] = {
@@ -410,6 +408,12 @@ vpx3220_command (struct i2c_client *client,
410 case DECODER_SET_NORM: 408 case DECODER_SET_NORM:
411 { 409 {
412 int *iarg = arg, data; 410 int *iarg = arg, data;
411 int temp_input;
412
413 /* Here we back up the input selection because it gets
414 overwritten when we fill the registers with the
415 choosen video norm */
416 temp_input = vpx3220_fp_read(client, 0xf2);
413 417
414 dprintk(1, KERN_DEBUG "%s: DECODER_SET_NORM %d\n", 418 dprintk(1, KERN_DEBUG "%s: DECODER_SET_NORM %d\n",
415 I2C_NAME(client), *iarg); 419 I2C_NAME(client), *iarg);
@@ -449,6 +453,10 @@ vpx3220_command (struct i2c_client *client,
449 453
450 } 454 }
451 decoder->norm = *iarg; 455 decoder->norm = *iarg;
456
457 /* And here we set the backed up video input again */
458 vpx3220_fp_write(client, 0xf2, temp_input | 0x0010);
459 udelay(10);
452 } 460 }
453 break; 461 break;
454 462
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
index 429820e48c69..7de19a84dc74 100644
--- a/drivers/message/fusion/mptsas.c
+++ b/drivers/message/fusion/mptsas.c
@@ -257,8 +257,8 @@ static void mptsas_print_device_pg0(SasDevicePage0_t *pg0)
257 printk("SAS Address=0x%llX\n", le64_to_cpu(sas_address)); 257 printk("SAS Address=0x%llX\n", le64_to_cpu(sas_address));
258 printk("Target ID=0x%X\n", pg0->TargetID); 258 printk("Target ID=0x%X\n", pg0->TargetID);
259 printk("Bus=0x%X\n", pg0->Bus); 259 printk("Bus=0x%X\n", pg0->Bus);
260 printk("PhyNum=0x%X\n", pg0->PhyNum); 260 printk("Parent Phy Num=0x%X\n", pg0->PhyNum);
261 printk("AccessStatus=0x%X\n", le16_to_cpu(pg0->AccessStatus)); 261 printk("Access Status=0x%X\n", le16_to_cpu(pg0->AccessStatus));
262 printk("Device Info=0x%X\n", le32_to_cpu(pg0->DeviceInfo)); 262 printk("Device Info=0x%X\n", le32_to_cpu(pg0->DeviceInfo));
263 printk("Flags=0x%X\n", le16_to_cpu(pg0->Flags)); 263 printk("Flags=0x%X\n", le16_to_cpu(pg0->Flags));
264 printk("Physical Port=0x%X\n", pg0->PhysicalPort); 264 printk("Physical Port=0x%X\n", pg0->PhysicalPort);
@@ -270,7 +270,7 @@ static void mptsas_print_expander_pg1(SasExpanderPage1_t *pg1)
270 printk("---- SAS EXPANDER PAGE 1 ------------\n"); 270 printk("---- SAS EXPANDER PAGE 1 ------------\n");
271 271
272 printk("Physical Port=0x%X\n", pg1->PhysicalPort); 272 printk("Physical Port=0x%X\n", pg1->PhysicalPort);
273 printk("PHY Identifier=0x%X\n", pg1->Phy); 273 printk("PHY Identifier=0x%X\n", pg1->PhyIdentifier);
274 printk("Negotiated Link Rate=0x%X\n", pg1->NegotiatedLinkRate); 274 printk("Negotiated Link Rate=0x%X\n", pg1->NegotiatedLinkRate);
275 printk("Programmed Link Rate=0x%X\n", pg1->ProgrammedLinkRate); 275 printk("Programmed Link Rate=0x%X\n", pg1->ProgrammedLinkRate);
276 printk("Hardware Link Rate=0x%X\n", pg1->HwLinkRate); 276 printk("Hardware Link Rate=0x%X\n", pg1->HwLinkRate);
@@ -604,7 +604,7 @@ mptsas_sas_expander_pg1(MPT_ADAPTER *ioc, struct mptsas_phyinfo *phy_info,
604 mptsas_print_expander_pg1(buffer); 604 mptsas_print_expander_pg1(buffer);
605 605
606 /* save config data */ 606 /* save config data */
607 phy_info->phy_id = buffer->Phy; 607 phy_info->phy_id = buffer->PhyIdentifier;
608 phy_info->port_id = buffer->PhysicalPort; 608 phy_info->port_id = buffer->PhysicalPort;
609 phy_info->negotiated_link_rate = buffer->NegotiatedLinkRate; 609 phy_info->negotiated_link_rate = buffer->NegotiatedLinkRate;
610 phy_info->programmed_link_rate = buffer->ProgrammedLinkRate; 610 phy_info->programmed_link_rate = buffer->ProgrammedLinkRate;
@@ -825,6 +825,8 @@ mptsas_probe_hba_phys(MPT_ADAPTER *ioc, int *index)
825 mptsas_sas_device_pg0(ioc, &port_info->phy_info[i].identify, 825 mptsas_sas_device_pg0(ioc, &port_info->phy_info[i].identify,
826 (MPI_SAS_DEVICE_PGAD_FORM_GET_NEXT_HANDLE << 826 (MPI_SAS_DEVICE_PGAD_FORM_GET_NEXT_HANDLE <<
827 MPI_SAS_DEVICE_PGAD_FORM_SHIFT), handle); 827 MPI_SAS_DEVICE_PGAD_FORM_SHIFT), handle);
828 port_info->phy_info[i].identify.phy_id =
829 port_info->phy_info[i].phy_id;
828 handle = port_info->phy_info[i].identify.handle; 830 handle = port_info->phy_info[i].identify.handle;
829 831
830 if (port_info->phy_info[i].attached.handle) { 832 if (port_info->phy_info[i].attached.handle) {
@@ -881,6 +883,8 @@ mptsas_probe_expander_phys(MPT_ADAPTER *ioc, u32 *handle, int *index)
881 (MPI_SAS_DEVICE_PGAD_FORM_HANDLE << 883 (MPI_SAS_DEVICE_PGAD_FORM_HANDLE <<
882 MPI_SAS_DEVICE_PGAD_FORM_SHIFT), 884 MPI_SAS_DEVICE_PGAD_FORM_SHIFT),
883 port_info->phy_info[i].identify.handle); 885 port_info->phy_info[i].identify.handle);
886 port_info->phy_info[i].identify.phy_id =
887 port_info->phy_info[i].phy_id;
884 } 888 }
885 889
886 if (port_info->phy_info[i].attached.handle) { 890 if (port_info->phy_info[i].attached.handle) {
diff --git a/drivers/net/e100.c b/drivers/net/e100.c
index fbf1c06ec5c1..40887f09b681 100644
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -903,8 +903,8 @@ static void mdio_write(struct net_device *netdev, int addr, int reg, int data)
903 903
904static void e100_get_defaults(struct nic *nic) 904static void e100_get_defaults(struct nic *nic)
905{ 905{
906 struct param_range rfds = { .min = 16, .max = 256, .count = 256 }; 906 struct param_range rfds = { .min = 16, .max = 256, .count = 64 };
907 struct param_range cbs = { .min = 64, .max = 256, .count = 128 }; 907 struct param_range cbs = { .min = 64, .max = 256, .count = 64 };
908 908
909 pci_read_config_byte(nic->pdev, PCI_REVISION_ID, &nic->rev_id); 909 pci_read_config_byte(nic->pdev, PCI_REVISION_ID, &nic->rev_id);
910 /* MAC type is encoded as rev ID; exception: ICH is treated as 82559 */ 910 /* MAC type is encoded as rev ID; exception: ICH is treated as 82559 */
@@ -1007,213 +1007,25 @@ static void e100_configure(struct nic *nic, struct cb *cb, struct sk_buff *skb)
1007 c[16], c[17], c[18], c[19], c[20], c[21], c[22], c[23]); 1007 c[16], c[17], c[18], c[19], c[20], c[21], c[22], c[23]);
1008} 1008}
1009 1009
1010/********************************************************/
1011/* Micro code for 8086:1229 Rev 8 */
1012/********************************************************/
1013
1014/* Parameter values for the D101M B-step */
1015#define D101M_CPUSAVER_TIMER_DWORD 78
1016#define D101M_CPUSAVER_BUNDLE_DWORD 65
1017#define D101M_CPUSAVER_MIN_SIZE_DWORD 126
1018
1019#define D101M_B_RCVBUNDLE_UCODE \
1020{\
10210x00550215, 0xFFFF0437, 0xFFFFFFFF, 0x06A70789, 0xFFFFFFFF, 0x0558FFFF, \
10220x000C0001, 0x00101312, 0x000C0008, 0x00380216, \
10230x0010009C, 0x00204056, 0x002380CC, 0x00380056, \
10240x0010009C, 0x00244C0B, 0x00000800, 0x00124818, \
10250x00380438, 0x00000000, 0x00140000, 0x00380555, \
10260x00308000, 0x00100662, 0x00100561, 0x000E0408, \
10270x00134861, 0x000C0002, 0x00103093, 0x00308000, \
10280x00100624, 0x00100561, 0x000E0408, 0x00100861, \
10290x000C007E, 0x00222C21, 0x000C0002, 0x00103093, \
10300x00380C7A, 0x00080000, 0x00103090, 0x00380C7A, \
10310x00000000, 0x00000000, 0x00000000, 0x00000000, \
10320x0010009C, 0x00244C2D, 0x00010004, 0x00041000, \
10330x003A0437, 0x00044010, 0x0038078A, 0x00000000, \
10340x00100099, 0x00206C7A, 0x0010009C, 0x00244C48, \
10350x00130824, 0x000C0001, 0x00101213, 0x00260C75, \
10360x00041000, 0x00010004, 0x00130826, 0x000C0006, \
10370x002206A8, 0x0013C926, 0x00101313, 0x003806A8, \
10380x00000000, 0x00000000, 0x00000000, 0x00000000, \
10390x00000000, 0x00000000, 0x00000000, 0x00000000, \
10400x00080600, 0x00101B10, 0x00050004, 0x00100826, \
10410x00101210, 0x00380C34, 0x00000000, 0x00000000, \
10420x0021155B, 0x00100099, 0x00206559, 0x0010009C, \
10430x00244559, 0x00130836, 0x000C0000, 0x00220C62, \
10440x000C0001, 0x00101B13, 0x00229C0E, 0x00210C0E, \
10450x00226C0E, 0x00216C0E, 0x0022FC0E, 0x00215C0E, \
10460x00214C0E, 0x00380555, 0x00010004, 0x00041000, \
10470x00278C67, 0x00040800, 0x00018100, 0x003A0437, \
10480x00130826, 0x000C0001, 0x00220559, 0x00101313, \
10490x00380559, 0x00000000, 0x00000000, 0x00000000, \
10500x00000000, 0x00000000, 0x00000000, 0x00000000, \
10510x00000000, 0x00130831, 0x0010090B, 0x00124813, \
10520x000CFF80, 0x002606AB, 0x00041000, 0x00010004, \
10530x003806A8, 0x00000000, 0x00000000, 0x00000000, \
1054}
1055
1056/********************************************************/
1057/* Micro code for 8086:1229 Rev 9 */
1058/********************************************************/
1059
1060/* Parameter values for the D101S */
1061#define D101S_CPUSAVER_TIMER_DWORD 78
1062#define D101S_CPUSAVER_BUNDLE_DWORD 67
1063#define D101S_CPUSAVER_MIN_SIZE_DWORD 128
1064
1065#define D101S_RCVBUNDLE_UCODE \
1066{\
10670x00550242, 0xFFFF047E, 0xFFFFFFFF, 0x06FF0818, 0xFFFFFFFF, 0x05A6FFFF, \
10680x000C0001, 0x00101312, 0x000C0008, 0x00380243, \
10690x0010009C, 0x00204056, 0x002380D0, 0x00380056, \
10700x0010009C, 0x00244F8B, 0x00000800, 0x00124818, \
10710x0038047F, 0x00000000, 0x00140000, 0x003805A3, \
10720x00308000, 0x00100610, 0x00100561, 0x000E0408, \
10730x00134861, 0x000C0002, 0x00103093, 0x00308000, \
10740x00100624, 0x00100561, 0x000E0408, 0x00100861, \
10750x000C007E, 0x00222FA1, 0x000C0002, 0x00103093, \
10760x00380F90, 0x00080000, 0x00103090, 0x00380F90, \
10770x00000000, 0x00000000, 0x00000000, 0x00000000, \
10780x0010009C, 0x00244FAD, 0x00010004, 0x00041000, \
10790x003A047E, 0x00044010, 0x00380819, 0x00000000, \
10800x00100099, 0x00206FFD, 0x0010009A, 0x0020AFFD, \
10810x0010009C, 0x00244FC8, 0x00130824, 0x000C0001, \
10820x00101213, 0x00260FF7, 0x00041000, 0x00010004, \
10830x00130826, 0x000C0006, 0x00220700, 0x0013C926, \
10840x00101313, 0x00380700, 0x00000000, 0x00000000, \
10850x00000000, 0x00000000, 0x00000000, 0x00000000, \
10860x00080600, 0x00101B10, 0x00050004, 0x00100826, \
10870x00101210, 0x00380FB6, 0x00000000, 0x00000000, \
10880x002115A9, 0x00100099, 0x002065A7, 0x0010009A, \
10890x0020A5A7, 0x0010009C, 0x002445A7, 0x00130836, \
10900x000C0000, 0x00220FE4, 0x000C0001, 0x00101B13, \
10910x00229F8E, 0x00210F8E, 0x00226F8E, 0x00216F8E, \
10920x0022FF8E, 0x00215F8E, 0x00214F8E, 0x003805A3, \
10930x00010004, 0x00041000, 0x00278FE9, 0x00040800, \
10940x00018100, 0x003A047E, 0x00130826, 0x000C0001, \
10950x002205A7, 0x00101313, 0x003805A7, 0x00000000, \
10960x00000000, 0x00000000, 0x00000000, 0x00000000, \
10970x00000000, 0x00000000, 0x00000000, 0x00130831, \
10980x0010090B, 0x00124813, 0x000CFF80, 0x00260703, \
10990x00041000, 0x00010004, 0x00380700 \
1100}
1101
1102/********************************************************/
1103/* Micro code for the 8086:1229 Rev F/10 */
1104/********************************************************/
1105
1106/* Parameter values for the D102 E-step */
1107#define D102_E_CPUSAVER_TIMER_DWORD 42
1108#define D102_E_CPUSAVER_BUNDLE_DWORD 54
1109#define D102_E_CPUSAVER_MIN_SIZE_DWORD 46
1110
1111#define D102_E_RCVBUNDLE_UCODE \
1112{\
11130x007D028F, 0x0E4204F9, 0x14ED0C85, 0x14FA14E9, 0x0EF70E36, 0x1FFF1FFF, \
11140x00E014B9, 0x00000000, 0x00000000, 0x00000000, \
11150x00E014BD, 0x00000000, 0x00000000, 0x00000000, \
11160x00E014D5, 0x00000000, 0x00000000, 0x00000000, \
11170x00000000, 0x00000000, 0x00000000, 0x00000000, \
11180x00E014C1, 0x00000000, 0x00000000, 0x00000000, \
11190x00000000, 0x00000000, 0x00000000, 0x00000000, \
11200x00000000, 0x00000000, 0x00000000, 0x00000000, \
11210x00000000, 0x00000000, 0x00000000, 0x00000000, \
11220x00E014C8, 0x00000000, 0x00000000, 0x00000000, \
11230x00200600, 0x00E014EE, 0x00000000, 0x00000000, \
11240x0030FF80, 0x00940E46, 0x00038200, 0x00102000, \
11250x00E00E43, 0x00000000, 0x00000000, 0x00000000, \
11260x00300006, 0x00E014FB, 0x00000000, 0x00000000, \
11270x00000000, 0x00000000, 0x00000000, 0x00000000, \
11280x00000000, 0x00000000, 0x00000000, 0x00000000, \
11290x00000000, 0x00000000, 0x00000000, 0x00000000, \
11300x00906E41, 0x00800E3C, 0x00E00E39, 0x00000000, \
11310x00906EFD, 0x00900EFD, 0x00E00EF8, 0x00000000, \
11320x00000000, 0x00000000, 0x00000000, 0x00000000, \
11330x00000000, 0x00000000, 0x00000000, 0x00000000, \
11340x00000000, 0x00000000, 0x00000000, 0x00000000, \
11350x00000000, 0x00000000, 0x00000000, 0x00000000, \
11360x00000000, 0x00000000, 0x00000000, 0x00000000, \
11370x00000000, 0x00000000, 0x00000000, 0x00000000, \
11380x00000000, 0x00000000, 0x00000000, 0x00000000, \
11390x00000000, 0x00000000, 0x00000000, 0x00000000, \
11400x00000000, 0x00000000, 0x00000000, 0x00000000, \
11410x00000000, 0x00000000, 0x00000000, 0x00000000, \
11420x00000000, 0x00000000, 0x00000000, 0x00000000, \
11430x00000000, 0x00000000, 0x00000000, 0x00000000, \
11440x00000000, 0x00000000, 0x00000000, 0x00000000, \
11450x00000000, 0x00000000, 0x00000000, 0x00000000, \
1146}
1147
1148static void e100_load_ucode(struct nic *nic, struct cb *cb, struct sk_buff *skb) 1010static void e100_load_ucode(struct nic *nic, struct cb *cb, struct sk_buff *skb)
1149{ 1011{
1150/* *INDENT-OFF* */ 1012 int i;
1151 static struct { 1013 static const u32 ucode[UCODE_SIZE] = {
1152 u32 ucode[UCODE_SIZE + 1]; 1014 /* NFS packets are misinterpreted as TCO packets and
1153 u8 mac; 1015 * incorrectly routed to the BMC over SMBus. This
1154 u8 timer_dword; 1016 * microcode patch checks the fragmented IP bit in the
1155 u8 bundle_dword; 1017 * NFS/UDP header to distinguish between NFS and TCO. */
1156 u8 min_size_dword; 1018 0x0EF70E36, 0x1FFF1FFF, 0x1FFF1FFF, 0x1FFF1FFF, 0x1FFF1FFF,
1157 } ucode_opts[] = { 1019 0x1FFF1FFF, 0x00906E41, 0x00800E3C, 0x00E00E39, 0x00000000,
1158 { D101M_B_RCVBUNDLE_UCODE, 1020 0x00906EFD, 0x00900EFD, 0x00E00EF8,
1159 mac_82559_D101M, 1021 };
1160 D101M_CPUSAVER_TIMER_DWORD,
1161 D101M_CPUSAVER_BUNDLE_DWORD,
1162 D101M_CPUSAVER_MIN_SIZE_DWORD },
1163 { D101S_RCVBUNDLE_UCODE,
1164 mac_82559_D101S,
1165 D101S_CPUSAVER_TIMER_DWORD,
1166 D101S_CPUSAVER_BUNDLE_DWORD,
1167 D101S_CPUSAVER_MIN_SIZE_DWORD },
1168 { D102_E_RCVBUNDLE_UCODE,
1169 mac_82551_F,
1170 D102_E_CPUSAVER_TIMER_DWORD,
1171 D102_E_CPUSAVER_BUNDLE_DWORD,
1172 D102_E_CPUSAVER_MIN_SIZE_DWORD },
1173 { D102_E_RCVBUNDLE_UCODE,
1174 mac_82551_10,
1175 D102_E_CPUSAVER_TIMER_DWORD,
1176 D102_E_CPUSAVER_BUNDLE_DWORD,
1177 D102_E_CPUSAVER_MIN_SIZE_DWORD },
1178 { {0}, 0, 0, 0, 0}
1179 }, *opts;
1180/* *INDENT-ON* */
1181
1182#define BUNDLESMALL 1
1183#define BUNDLEMAX 50
1184#define INTDELAY 15000
1185
1186 opts = ucode_opts;
1187
1188 /* do not load u-code for ICH devices */
1189 if (nic->flags & ich)
1190 return;
1191
1192 /* Search for ucode match against h/w rev_id */
1193 while (opts->mac) {
1194 if (nic->mac == opts->mac) {
1195 int i;
1196 u32 *ucode = opts->ucode;
1197
1198 /* Insert user-tunable settings */
1199 ucode[opts->timer_dword] &= 0xFFFF0000;
1200 ucode[opts->timer_dword] |=
1201 (u16) INTDELAY;
1202 ucode[opts->bundle_dword] &= 0xFFFF0000;
1203 ucode[opts->bundle_dword] |= (u16) BUNDLEMAX;
1204 ucode[opts->min_size_dword] &= 0xFFFF0000;
1205 ucode[opts->min_size_dword] |=
1206 (BUNDLESMALL) ? 0xFFFF : 0xFF80;
1207
1208 for(i = 0; i < UCODE_SIZE; i++)
1209 cb->u.ucode[i] = cpu_to_le32(ucode[i]);
1210 cb->command = cpu_to_le16(cb_ucode);
1211 return;
1212 }
1213 opts++;
1214 }
1215 1022
1216 cb->command = cpu_to_le16(cb_nop); 1023 if(nic->mac == mac_82551_F || nic->mac == mac_82551_10) {
1024 for(i = 0; i < UCODE_SIZE; i++)
1025 cb->u.ucode[i] = cpu_to_le32(ucode[i]);
1026 cb->command = cpu_to_le16(cb_ucode);
1027 } else
1028 cb->command = cpu_to_le16(cb_nop);
1217} 1029}
1218 1030
1219static void e100_setup_iaaddr(struct nic *nic, struct cb *cb, 1031static void e100_setup_iaaddr(struct nic *nic, struct cb *cb,
diff --git a/drivers/net/wireless/Kconfig b/drivers/net/wireless/Kconfig
index 00a07f32a81e..7187958e40ca 100644
--- a/drivers/net/wireless/Kconfig
+++ b/drivers/net/wireless/Kconfig
@@ -243,7 +243,7 @@ config IPW_DEBUG
243 243
244config AIRO 244config AIRO
245 tristate "Cisco/Aironet 34X/35X/4500/4800 ISA and PCI cards" 245 tristate "Cisco/Aironet 34X/35X/4500/4800 ISA and PCI cards"
246 depends on NET_RADIO && ISA && (PCI || BROKEN) 246 depends on NET_RADIO && ISA_DMA_API && (PCI || BROKEN)
247 ---help--- 247 ---help---
248 This is the standard Linux driver to support Cisco/Aironet ISA and 248 This is the standard Linux driver to support Cisco/Aironet ISA and
249 PCI 802.11 wireless cards. 249 PCI 802.11 wireless cards.
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c
index cf3daaa1b369..15ceaf615756 100644
--- a/drivers/net/wireless/orinoco.c
+++ b/drivers/net/wireless/orinoco.c
@@ -578,8 +578,9 @@ static int orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
578 txfid, NULL); 578 txfid, NULL);
579 if (err) { 579 if (err) {
580 netif_start_queue(dev); 580 netif_start_queue(dev);
581 printk(KERN_ERR "%s: Error %d transmitting packet\n", 581 if (net_ratelimit())
582 dev->name, err); 582 printk(KERN_ERR "%s: Error %d transmitting packet\n",
583 dev->name, err);
583 stats->tx_errors++; 584 stats->tx_errors++;
584 goto fail; 585 goto fail;
585 } 586 }
diff --git a/drivers/pci/.gitignore b/drivers/pci/.gitignore
new file mode 100644
index 000000000000..f297ca8d313e
--- /dev/null
+++ b/drivers/pci/.gitignore
@@ -0,0 +1,4 @@
1classlist.h
2devlist.h
3gen-devlist
4
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 11ca44387cb0..a6a630a950d0 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -1233,7 +1233,7 @@ static void __init quirk_alder_ioapic(struct pci_dev *pdev)
1233DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_EESSC, quirk_alder_ioapic ); 1233DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_EESSC, quirk_alder_ioapic );
1234#endif 1234#endif
1235 1235
1236#ifdef CONFIG_SCSI_SATA 1236#ifdef CONFIG_SCSI_SATA_INTEL_COMBINED
1237static void __devinit quirk_intel_ide_combined(struct pci_dev *pdev) 1237static void __devinit quirk_intel_ide_combined(struct pci_dev *pdev)
1238{ 1238{
1239 u8 prog, comb, tmp; 1239 u8 prog, comb, tmp;
@@ -1310,7 +1310,7 @@ static void __devinit quirk_intel_ide_combined(struct pci_dev *pdev)
1310 request_region(0x170, 8, "libata"); /* port 1 */ 1310 request_region(0x170, 8, "libata"); /* port 1 */
1311} 1311}
1312DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, quirk_intel_ide_combined ); 1312DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, quirk_intel_ide_combined );
1313#endif /* CONFIG_SCSI_SATA */ 1313#endif /* CONFIG_SCSI_SATA_INTEL_COMBINED */
1314 1314
1315 1315
1316int pcie_mch_quirk; 1316int pcie_mch_quirk;
diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c
index 888b70e6a484..9e7ccd8a4321 100644
--- a/drivers/pcmcia/soc_common.c
+++ b/drivers/pcmcia/soc_common.c
@@ -66,7 +66,7 @@ void soc_pcmcia_debug(struct soc_pcmcia_socket *skt, const char *func,
66 if (pc_debug > lvl) { 66 if (pc_debug > lvl) {
67 printk(KERN_DEBUG "skt%u: %s: ", skt->nr, func); 67 printk(KERN_DEBUG "skt%u: %s: ", skt->nr, func);
68 va_start(args, fmt); 68 va_start(args, fmt);
69 printk(fmt, args); 69 vprintk(fmt, args);
70 va_end(args); 70 va_end(args);
71 } 71 }
72} 72}
@@ -321,8 +321,6 @@ soc_common_pcmcia_get_socket(struct pcmcia_socket *sock, socket_state_t *state)
321 * less punt all of this work and let the kernel handle the details 321 * less punt all of this work and let the kernel handle the details
322 * of power configuration, reset, &c. We also record the value of 322 * of power configuration, reset, &c. We also record the value of
323 * `state' in order to regurgitate it to the PCMCIA core later. 323 * `state' in order to regurgitate it to the PCMCIA core later.
324 *
325 * Returns: 0
326 */ 324 */
327static int 325static int
328soc_common_pcmcia_set_socket(struct pcmcia_socket *sock, socket_state_t *state) 326soc_common_pcmcia_set_socket(struct pcmcia_socket *sock, socket_state_t *state)
@@ -407,7 +405,7 @@ soc_common_pcmcia_set_io_map(struct pcmcia_socket *sock, struct pccard_io_map *m
407 * the map speed as requested, but override the address ranges 405 * the map speed as requested, but override the address ranges
408 * supplied by Card Services. 406 * supplied by Card Services.
409 * 407 *
410 * Returns: 0 on success, -1 on error 408 * Returns: 0 on success, -ERRNO on error
411 */ 409 */
412static int 410static int
413soc_common_pcmcia_set_mem_map(struct pcmcia_socket *sock, struct pccard_mem_map *map) 411soc_common_pcmcia_set_mem_map(struct pcmcia_socket *sock, struct pccard_mem_map *map)
@@ -655,8 +653,8 @@ static void soc_pcmcia_cpufreq_unregister(void)
655} 653}
656 654
657#else 655#else
658#define soc_pcmcia_cpufreq_register() 656static int soc_pcmcia_cpufreq_register(void) { return 0; }
659#define soc_pcmcia_cpufreq_unregister() 657static void soc_pcmcia_cpufreq_unregister(void) {}
660#endif 658#endif
661 659
662int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, int first, int nr) 660int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, int first, int nr)
@@ -738,7 +736,7 @@ int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops
738 goto out_err_5; 736 goto out_err_5;
739 } 737 }
740 738
741 if ( list_empty(&soc_pcmcia_sockets) ) 739 if (list_empty(&soc_pcmcia_sockets))
742 soc_pcmcia_cpufreq_register(); 740 soc_pcmcia_cpufreq_register();
743 741
744 list_add(&skt->node, &soc_pcmcia_sockets); 742 list_add(&skt->node, &soc_pcmcia_sockets);
@@ -839,7 +837,7 @@ int soc_common_drv_pcmcia_remove(struct device *dev)
839 release_resource(&skt->res_io); 837 release_resource(&skt->res_io);
840 release_resource(&skt->res_skt); 838 release_resource(&skt->res_skt);
841 } 839 }
842 if ( list_empty(&soc_pcmcia_sockets) ) 840 if (list_empty(&soc_pcmcia_sockets))
843 soc_pcmcia_cpufreq_unregister(); 841 soc_pcmcia_cpufreq_unregister();
844 842
845 up(&soc_pcmcia_sockets_lock); 843 up(&soc_pcmcia_sockets_lock);
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig
index 20019b82b4a8..3ee9b8b33be0 100644
--- a/drivers/scsi/Kconfig
+++ b/drivers/scsi/Kconfig
@@ -553,6 +553,11 @@ config SCSI_SATA_VITESSE
553 553
554 If unsure, say N. 554 If unsure, say N.
555 555
556config SCSI_SATA_INTEL_COMBINED
557 bool
558 depends on IDE=y && !BLK_DEV_IDE_SATA && (SCSI_SATA_AHCI || SCSI_ATA_PIIX)
559 default y
560
556config SCSI_BUSLOGIC 561config SCSI_BUSLOGIC
557 tristate "BusLogic SCSI support" 562 tristate "BusLogic SCSI support"
558 depends on (PCI || ISA || MCA) && SCSI && ISA_DMA_API 563 depends on (PCI || ISA || MCA) && SCSI && ISA_DMA_API
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index de8490a92831..a1f9ceef0ac9 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -453,9 +453,9 @@ static int aac_eh_reset(struct scsi_cmnd* cmd)
453 /* 453 /*
454 * We can exit If all the commands are complete 454 * We can exit If all the commands are complete
455 */ 455 */
456 spin_unlock_irq(host->host_lock);
456 if (active == 0) 457 if (active == 0)
457 return SUCCESS; 458 return SUCCESS;
458 spin_unlock_irq(host->host_lock);
459 ssleep(1); 459 ssleep(1);
460 spin_lock_irq(host->host_lock); 460 spin_lock_irq(host->host_lock);
461 } 461 }
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index a917ab7475ac..1fd5fc6d0fe3 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -1119,6 +1119,36 @@ static inline void update_can_queue(struct Scsi_Host *host, u_int in_ptr, u_int
1119 host->sg_tablesize = QLOGICPTI_MAX_SG(num_free); 1119 host->sg_tablesize = QLOGICPTI_MAX_SG(num_free);
1120} 1120}
1121 1121
1122static unsigned int scsi_rbuf_get(struct scsi_cmnd *cmd, unsigned char **buf_out)
1123{
1124 unsigned char *buf;
1125 unsigned int buflen;
1126
1127 if (cmd->use_sg) {
1128 struct scatterlist *sg;
1129
1130 sg = (struct scatterlist *) cmd->request_buffer;
1131 buf = kmap_atomic(sg->page, KM_IRQ0) + sg->offset;
1132 buflen = sg->length;
1133 } else {
1134 buf = cmd->request_buffer;
1135 buflen = cmd->request_bufflen;
1136 }
1137
1138 *buf_out = buf;
1139 return buflen;
1140}
1141
1142static void scsi_rbuf_put(struct scsi_cmnd *cmd, unsigned char *buf)
1143{
1144 if (cmd->use_sg) {
1145 struct scatterlist *sg;
1146
1147 sg = (struct scatterlist *) cmd->request_buffer;
1148 kunmap_atomic(buf - sg->offset, KM_IRQ0);
1149 }
1150}
1151
1122/* 1152/*
1123 * Until we scan the entire bus with inquiries, go throught this fella... 1153 * Until we scan the entire bus with inquiries, go throught this fella...
1124 */ 1154 */
@@ -1145,11 +1175,9 @@ static void ourdone(struct scsi_cmnd *Cmnd)
1145 int ok = host_byte(Cmnd->result) == DID_OK; 1175 int ok = host_byte(Cmnd->result) == DID_OK;
1146 if (Cmnd->cmnd[0] == 0x12 && ok) { 1176 if (Cmnd->cmnd[0] == 0x12 && ok) {
1147 unsigned char *iqd; 1177 unsigned char *iqd;
1178 unsigned int iqd_len;
1148 1179
1149 if (Cmnd->use_sg != 0) 1180 iqd_len = scsi_rbuf_get(Cmnd, &iqd);
1150 BUG();
1151
1152 iqd = ((unsigned char *)Cmnd->buffer);
1153 1181
1154 /* tags handled in midlayer */ 1182 /* tags handled in midlayer */
1155 /* enable sync mode? */ 1183 /* enable sync mode? */
@@ -1163,6 +1191,9 @@ static void ourdone(struct scsi_cmnd *Cmnd)
1163 if (iqd[7] & 0x20) { 1191 if (iqd[7] & 0x20) {
1164 qpti->dev_param[tgt].device_flags |= 0x20; 1192 qpti->dev_param[tgt].device_flags |= 0x20;
1165 } 1193 }
1194
1195 scsi_rbuf_put(Cmnd, iqd);
1196
1166 qpti->sbits |= (1 << tgt); 1197 qpti->sbits |= (1 << tgt);
1167 } else if (!ok) { 1198 } else if (!ok) {
1168 qpti->sbits |= (1 << tgt); 1199 qpti->sbits |= (1 << tgt);
diff --git a/drivers/scsi/sata_nv.c b/drivers/scsi/sata_nv.c
index c05653c7779d..cb832b03ec5e 100644
--- a/drivers/scsi/sata_nv.c
+++ b/drivers/scsi/sata_nv.c
@@ -29,6 +29,8 @@
29 * NV-specific details such as register offsets, SATA phy location, 29 * NV-specific details such as register offsets, SATA phy location,
30 * hotplug info, etc. 30 * hotplug info, etc.
31 * 31 *
32 * 0.09
33 * - Fixed bug introduced by 0.08's MCP51 and MCP55 support.
32 * 34 *
33 * 0.08 35 * 0.08
34 * - Added support for MCP51 and MCP55. 36 * - Added support for MCP51 and MCP55.
@@ -132,9 +134,7 @@ enum nv_host_type
132 GENERIC, 134 GENERIC,
133 NFORCE2, 135 NFORCE2,
134 NFORCE3, 136 NFORCE3,
135 CK804, 137 CK804
136 MCP51,
137 MCP55
138}; 138};
139 139
140static struct pci_device_id nv_pci_tbl[] = { 140static struct pci_device_id nv_pci_tbl[] = {
@@ -153,13 +153,13 @@ static struct pci_device_id nv_pci_tbl[] = {
153 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2, 153 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2,
154 PCI_ANY_ID, PCI_ANY_ID, 0, 0, CK804 }, 154 PCI_ANY_ID, PCI_ANY_ID, 0, 0, CK804 },
155 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA, 155 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA,
156 PCI_ANY_ID, PCI_ANY_ID, 0, 0, MCP51 }, 156 PCI_ANY_ID, PCI_ANY_ID, 0, 0, GENERIC },
157 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2, 157 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2,
158 PCI_ANY_ID, PCI_ANY_ID, 0, 0, MCP51 }, 158 PCI_ANY_ID, PCI_ANY_ID, 0, 0, GENERIC },
159 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA, 159 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA,
160 PCI_ANY_ID, PCI_ANY_ID, 0, 0, MCP55 }, 160 PCI_ANY_ID, PCI_ANY_ID, 0, 0, GENERIC },
161 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2, 161 { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2,
162 PCI_ANY_ID, PCI_ANY_ID, 0, 0, MCP55 }, 162 PCI_ANY_ID, PCI_ANY_ID, 0, 0, GENERIC },
163 { PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID, 163 { PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID,
164 PCI_ANY_ID, PCI_ANY_ID, 164 PCI_ANY_ID, PCI_ANY_ID,
165 PCI_CLASS_STORAGE_IDE<<8, 0xffff00, GENERIC }, 165 PCI_CLASS_STORAGE_IDE<<8, 0xffff00, GENERIC },
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index ad5342165079..52b348c36d56 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -1645,6 +1645,8 @@ int scsi_error_handler(void *data)
1645 set_current_state(TASK_INTERRUPTIBLE); 1645 set_current_state(TASK_INTERRUPTIBLE);
1646 } 1646 }
1647 1647
1648 __set_current_state(TASK_RUNNING);
1649
1648 SCSI_LOG_ERROR_RECOVERY(1, printk("Error handler scsi_eh_%d" 1650 SCSI_LOG_ERROR_RECOVERY(1, printk("Error handler scsi_eh_%d"
1649 " exiting\n",shost->host_no)); 1651 " exiting\n",shost->host_no));
1650 1652
diff --git a/drivers/serial/8250_pnp.c b/drivers/serial/8250_pnp.c
index 6b321e82cafb..5d8660a42b77 100644
--- a/drivers/serial/8250_pnp.c
+++ b/drivers/serial/8250_pnp.c
@@ -272,8 +272,12 @@ static const struct pnp_device_id pnp_dev_table[] = {
272 { "SUP1421", 0 }, 272 { "SUP1421", 0 },
273 /* SupraExpress 33.6 Data/Fax PnP modem */ 273 /* SupraExpress 33.6 Data/Fax PnP modem */
274 { "SUP1590", 0 }, 274 { "SUP1590", 0 },
275 /* SupraExpress 336i Sp ASVD */
276 { "SUP1620", 0 },
275 /* SupraExpress 33.6 Data/Fax PnP modem */ 277 /* SupraExpress 33.6 Data/Fax PnP modem */
276 { "SUP1760", 0 }, 278 { "SUP1760", 0 },
279 /* SupraExpress 56i Sp Intl */
280 { "SUP2171", 0 },
277 /* Phoebe Micro */ 281 /* Phoebe Micro */
278 /* Phoebe Micro 33.6 Data Fax 1433VQH Plug & Play */ 282 /* Phoebe Micro 33.6 Data Fax 1433VQH Plug & Play */
279 { "TEX0011", 0 }, 283 { "TEX0011", 0 },
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c
index 53e0323d4b83..bdb4e454b8b0 100644
--- a/drivers/serial/imx.c
+++ b/drivers/serial/imx.c
@@ -73,7 +73,7 @@ struct imx_port {
73 struct uart_port port; 73 struct uart_port port;
74 struct timer_list timer; 74 struct timer_list timer;
75 unsigned int old_status; 75 unsigned int old_status;
76 int txirq,rxirq; 76 int txirq,rxirq,rtsirq;
77}; 77};
78 78
79/* 79/*
@@ -181,6 +181,22 @@ static void imx_start_tx(struct uart_port *port)
181 imx_transmit_buffer(sport); 181 imx_transmit_buffer(sport);
182} 182}
183 183
184static irqreturn_t imx_rtsint(int irq, void *dev_id, struct pt_regs *regs)
185{
186 struct imx_port *sport = (struct imx_port *)dev_id;
187 unsigned int val = USR1((u32)sport->port.membase)&USR1_RTSS;
188 unsigned long flags;
189
190 spin_lock_irqsave(&sport->port.lock, flags);
191
192 USR1((u32)sport->port.membase) = USR1_RTSD;
193 uart_handle_cts_change(&sport->port, !!val);
194 wake_up_interruptible(&sport->port.info->delta_msr_wait);
195
196 spin_unlock_irqrestore(&sport->port.lock, flags);
197 return IRQ_HANDLED;
198}
199
184static irqreturn_t imx_txint(int irq, void *dev_id, struct pt_regs *regs) 200static irqreturn_t imx_txint(int irq, void *dev_id, struct pt_regs *regs)
185{ 201{
186 struct imx_port *sport = (struct imx_port *)dev_id; 202 struct imx_port *sport = (struct imx_port *)dev_id;
@@ -386,15 +402,21 @@ static int imx_startup(struct uart_port *port)
386 if (retval) goto error_out1; 402 if (retval) goto error_out1;
387 403
388 retval = request_irq(sport->txirq, imx_txint, 0, 404 retval = request_irq(sport->txirq, imx_txint, 0,
389 "imx-uart", sport); 405 DRIVER_NAME, sport);
390 if (retval) goto error_out2; 406 if (retval) goto error_out2;
391 407
408 retval = request_irq(sport->rtsirq, imx_rtsint, 0,
409 DRIVER_NAME, sport);
410 if (retval) goto error_out3;
411 set_irq_type(sport->rtsirq, IRQT_BOTHEDGE);
412
392 /* 413 /*
393 * Finally, clear and enable interrupts 414 * Finally, clear and enable interrupts
394 */ 415 */
395 416
417 USR1((u32)sport->port.membase) = USR1_RTSD;
396 UCR1((u32)sport->port.membase) |= 418 UCR1((u32)sport->port.membase) |=
397 (UCR1_TXMPTYEN | UCR1_RRDYEN | UCR1_UARTEN); 419 (UCR1_TXMPTYEN | UCR1_RRDYEN | UCR1_RTSDEN | UCR1_UARTEN);
398 420
399 UCR2((u32)sport->port.membase) |= (UCR2_RXEN | UCR2_TXEN); 421 UCR2((u32)sport->port.membase) |= (UCR2_RXEN | UCR2_TXEN);
400 /* 422 /*
@@ -406,6 +428,8 @@ static int imx_startup(struct uart_port *port)
406 428
407 return 0; 429 return 0;
408 430
431error_out3:
432 free_irq(sport->txirq, sport);
409error_out2: 433error_out2:
410 free_irq(sport->rxirq, sport); 434 free_irq(sport->rxirq, sport);
411error_out1: 435error_out1:
@@ -424,6 +448,7 @@ static void imx_shutdown(struct uart_port *port)
424 /* 448 /*
425 * Free the interrupts 449 * Free the interrupts
426 */ 450 */
451 free_irq(sport->rtsirq, sport);
427 free_irq(sport->txirq, sport); 452 free_irq(sport->txirq, sport);
428 free_irq(sport->rxirq, sport); 453 free_irq(sport->rxirq, sport);
429 454
@@ -432,7 +457,7 @@ static void imx_shutdown(struct uart_port *port)
432 */ 457 */
433 458
434 UCR1((u32)sport->port.membase) &= 459 UCR1((u32)sport->port.membase) &=
435 ~(UCR1_TXMPTYEN | UCR1_RRDYEN | UCR1_UARTEN); 460 ~(UCR1_TXMPTYEN | UCR1_RRDYEN | UCR1_RTSDEN | UCR1_UARTEN);
436} 461}
437 462
438static void 463static void
@@ -522,7 +547,7 @@ imx_set_termios(struct uart_port *port, struct termios *termios,
522 * disable interrupts and drain transmitter 547 * disable interrupts and drain transmitter
523 */ 548 */
524 old_ucr1 = UCR1((u32)sport->port.membase); 549 old_ucr1 = UCR1((u32)sport->port.membase);
525 UCR1((u32)sport->port.membase) &= ~(UCR1_TXMPTYEN | UCR1_RRDYEN); 550 UCR1((u32)sport->port.membase) &= ~(UCR1_TXMPTYEN | UCR1_RRDYEN | UCR1_RTSDEN);
526 551
527 while ( !(USR2((u32)sport->port.membase) & USR2_TXDC)) 552 while ( !(USR2((u32)sport->port.membase) & USR2_TXDC))
528 barrier(); 553 barrier();
@@ -643,6 +668,7 @@ static struct imx_port imx_ports[] = {
643 { 668 {
644 .txirq = UART1_MINT_TX, 669 .txirq = UART1_MINT_TX,
645 .rxirq = UART1_MINT_RX, 670 .rxirq = UART1_MINT_RX,
671 .rtsirq = UART1_MINT_RTS,
646 .port = { 672 .port = {
647 .type = PORT_IMX, 673 .type = PORT_IMX,
648 .iotype = SERIAL_IO_MEM, 674 .iotype = SERIAL_IO_MEM,
@@ -658,6 +684,7 @@ static struct imx_port imx_ports[] = {
658 }, { 684 }, {
659 .txirq = UART2_MINT_TX, 685 .txirq = UART2_MINT_TX,
660 .rxirq = UART2_MINT_RX, 686 .rxirq = UART2_MINT_RX,
687 .rtsirq = UART2_MINT_RTS,
661 .port = { 688 .port = {
662 .type = PORT_IMX, 689 .type = PORT_IMX,
663 .iotype = SERIAL_IO_MEM, 690 .iotype = SERIAL_IO_MEM,
@@ -737,7 +764,7 @@ imx_console_write(struct console *co, const char *s, unsigned int count)
737 764
738 UCR1((u32)sport->port.membase) = 765 UCR1((u32)sport->port.membase) =
739 (old_ucr1 | UCR1_UARTCLKEN | UCR1_UARTEN) 766 (old_ucr1 | UCR1_UARTCLKEN | UCR1_UARTEN)
740 & ~(UCR1_TXMPTYEN | UCR1_RRDYEN); 767 & ~(UCR1_TXMPTYEN | UCR1_RRDYEN | UCR1_RTSDEN);
741 UCR2((u32)sport->port.membase) = old_ucr2 | UCR2_TXEN; 768 UCR2((u32)sport->port.membase) = old_ucr2 | UCR2_TXEN;
742 769
743 /* 770 /*
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c
index 672b359b07ce..90c2a86c421b 100644
--- a/drivers/serial/pxa.c
+++ b/drivers/serial/pxa.c
@@ -499,7 +499,7 @@ serial_pxa_set_termios(struct uart_port *port, struct termios *termios,
499 /* 499 /*
500 * Update the per-port timeout. 500 * Update the per-port timeout.
501 */ 501 */
502 uart_update_timeout(port, termios->c_cflag, quot); 502 uart_update_timeout(port, termios->c_cflag, baud);
503 503
504 up->port.read_status_mask = UART_LSR_OE | UART_LSR_THRE | UART_LSR_DR; 504 up->port.read_status_mask = UART_LSR_OE | UART_LSR_THRE | UART_LSR_DR;
505 if (termios->c_iflag & INPCK) 505 if (termios->c_iflag & INPCK)
diff --git a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c
index eff2158024c8..52692aa345ec 100644
--- a/drivers/serial/s3c2410.c
+++ b/drivers/serial/s3c2410.c
@@ -1092,8 +1092,8 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport,
1092 1092
1093static int probe_index = 0; 1093static int probe_index = 0;
1094 1094
1095int s3c24xx_serial_probe(struct device *_dev, 1095static int s3c24xx_serial_probe(struct device *_dev,
1096 struct s3c24xx_uart_info *info) 1096 struct s3c24xx_uart_info *info)
1097{ 1097{
1098 struct s3c24xx_uart_port *ourport; 1098 struct s3c24xx_uart_port *ourport;
1099 struct platform_device *dev = to_platform_device(_dev); 1099 struct platform_device *dev = to_platform_device(_dev);
@@ -1120,7 +1120,7 @@ int s3c24xx_serial_probe(struct device *_dev,
1120 return ret; 1120 return ret;
1121} 1121}
1122 1122
1123int s3c24xx_serial_remove(struct device *_dev) 1123static int s3c24xx_serial_remove(struct device *_dev)
1124{ 1124{
1125 struct uart_port *port = s3c24xx_dev_to_port(_dev); 1125 struct uart_port *port = s3c24xx_dev_to_port(_dev);
1126 1126
@@ -1134,7 +1134,8 @@ int s3c24xx_serial_remove(struct device *_dev)
1134 1134
1135#ifdef CONFIG_PM 1135#ifdef CONFIG_PM
1136 1136
1137int s3c24xx_serial_suspend(struct device *dev, pm_message_t state, u32 level) 1137static int s3c24xx_serial_suspend(struct device *dev, pm_message_t state,
1138 u32 level)
1138{ 1139{
1139 struct uart_port *port = s3c24xx_dev_to_port(dev); 1140 struct uart_port *port = s3c24xx_dev_to_port(dev);
1140 1141
@@ -1144,7 +1145,7 @@ int s3c24xx_serial_suspend(struct device *dev, pm_message_t state, u32 level)
1144 return 0; 1145 return 0;
1145} 1146}
1146 1147
1147int s3c24xx_serial_resume(struct device *dev, u32 level) 1148static int s3c24xx_serial_resume(struct device *dev, u32 level)
1148{ 1149{
1149 struct uart_port *port = s3c24xx_dev_to_port(dev); 1150 struct uart_port *port = s3c24xx_dev_to_port(dev);
1150 struct s3c24xx_uart_port *ourport = to_ourport(port); 1151 struct s3c24xx_uart_port *ourport = to_ourport(port);
@@ -1165,8 +1166,8 @@ int s3c24xx_serial_resume(struct device *dev, u32 level)
1165#define s3c24xx_serial_resume NULL 1166#define s3c24xx_serial_resume NULL
1166#endif 1167#endif
1167 1168
1168int s3c24xx_serial_init(struct device_driver *drv, 1169static int s3c24xx_serial_init(struct device_driver *drv,
1169 struct s3c24xx_uart_info *info) 1170 struct s3c24xx_uart_info *info)
1170{ 1171{
1171 dbg("s3c24xx_serial_init(%p,%p)\n", drv, info); 1172 dbg("s3c24xx_serial_init(%p,%p)\n", drv, info);
1172 return driver_register(drv); 1173 return driver_register(drv);
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c
index 512266307866..430754ebac8a 100644
--- a/drivers/serial/sh-sci.c
+++ b/drivers/serial/sh-sci.c
@@ -967,7 +967,7 @@ static int sci_startup(struct uart_port *port)
967#endif 967#endif
968 968
969 sci_request_irq(s); 969 sci_request_irq(s);
970 sci_start_tx(port, 1); 970 sci_start_tx(port);
971 sci_start_rx(port, 1); 971 sci_start_rx(port, 1);
972 972
973 return 0; 973 return 0;
diff --git a/drivers/usb/host/isp116x-hcd.c b/drivers/usb/host/isp116x-hcd.c
index 41bbae83fc71..e142056b0d2c 100644
--- a/drivers/usb/host/isp116x-hcd.c
+++ b/drivers/usb/host/isp116x-hcd.c
@@ -326,7 +326,8 @@ static void postproc_atl_queue(struct isp116x *isp116x)
326 usb_settoggle(udev, ep->epnum, 326 usb_settoggle(udev, ep->epnum,
327 ep->nextpid == 327 ep->nextpid ==
328 USB_PID_OUT, 328 USB_PID_OUT,
329 PTD_GET_TOGGLE(ptd) ^ 1); 329 PTD_GET_TOGGLE(ptd));
330 urb->actual_length += PTD_GET_COUNT(ptd);
330 urb->status = cc_to_error[TD_DATAUNDERRUN]; 331 urb->status = cc_to_error[TD_DATAUNDERRUN];
331 spin_unlock(&urb->lock); 332 spin_unlock(&urb->lock);
332 continue; 333 continue;
diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c
index a99865c689c5..41f92b924761 100644
--- a/drivers/usb/input/hid-core.c
+++ b/drivers/usb/input/hid-core.c
@@ -1702,10 +1702,7 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf)
1702 if ((endpoint->bmAttributes & 3) != 3) /* Not an interrupt endpoint */ 1702 if ((endpoint->bmAttributes & 3) != 3) /* Not an interrupt endpoint */
1703 continue; 1703 continue;
1704 1704
1705 /* handle potential highspeed HID correctly */
1706 interval = endpoint->bInterval; 1705 interval = endpoint->bInterval;
1707 if (dev->speed == USB_SPEED_HIGH)
1708 interval = 1 << (interval - 1);
1709 1706
1710 /* Change the polling interval of mice. */ 1707 /* Change the polling interval of mice. */
1711 if (hid->collection->usage == HID_GD_MOUSE && hid_mousepoll_interval > 0) 1708 if (hid->collection->usage == HID_GD_MOUSE && hid_mousepoll_interval > 0)
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
index ddde5fb13f6b..5f7d3193d355 100644
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@ -223,7 +223,7 @@ int usb_serial_generic_write_room (struct usb_serial_port *port)
223 dbg("%s - port %d", __FUNCTION__, port->number); 223 dbg("%s - port %d", __FUNCTION__, port->number);
224 224
225 if (serial->num_bulk_out) { 225 if (serial->num_bulk_out) {
226 if (port->write_urb_busy) 226 if (!(port->write_urb_busy))
227 room = port->bulk_out_size; 227 room = port->bulk_out_size;
228 } 228 }
229 229
diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c
index 6ef6f7760e47..809fee2140ac 100644
--- a/drivers/video/console/vgacon.c
+++ b/drivers/video/console/vgacon.c
@@ -565,7 +565,11 @@ static int vgacon_switch(struct vc_data *c)
565 scr_memcpyw((u16 *) c->vc_origin, (u16 *) c->vc_screenbuf, 565 scr_memcpyw((u16 *) c->vc_origin, (u16 *) c->vc_screenbuf,
566 c->vc_screenbuf_size > vga_vram_size ? 566 c->vc_screenbuf_size > vga_vram_size ?
567 vga_vram_size : c->vc_screenbuf_size); 567 vga_vram_size : c->vc_screenbuf_size);
568 vgacon_doresize(c, c->vc_cols, c->vc_rows); 568 if (!(vga_video_num_columns % 2) &&
569 vga_video_num_columns <= ORIG_VIDEO_COLS &&
570 vga_video_num_lines <= (ORIG_VIDEO_LINES *
571 vga_default_font_height) / c->vc_font.height)
572 vgacon_doresize(c, c->vc_cols, c->vc_rows);
569 } 573 }
570 574
571 return 0; /* Redrawing not needed */ 575 return 0; /* Redrawing not needed */
@@ -1023,7 +1027,8 @@ static int vgacon_resize(struct vc_data *c, unsigned int width,
1023 if (width % 2 || width > ORIG_VIDEO_COLS || 1027 if (width % 2 || width > ORIG_VIDEO_COLS ||
1024 height > (ORIG_VIDEO_LINES * vga_default_font_height)/ 1028 height > (ORIG_VIDEO_LINES * vga_default_font_height)/
1025 c->vc_font.height) 1029 c->vc_font.height)
1026 return -EINVAL; 1030 /* let svgatextmode tinker with video timings */
1031 return 0;
1027 1032
1028 if (CON_IS_VISIBLE(c) && !vga_is_gfx) /* who knows */ 1033 if (CON_IS_VISIBLE(c) && !vga_is_gfx) /* who knows */
1029 vgacon_doresize(c, width, height); 1034 vgacon_doresize(c, width, height);
diff --git a/drivers/video/logo/.gitignore b/drivers/video/logo/.gitignore
new file mode 100644
index 000000000000..e48355f538fa
--- /dev/null
+++ b/drivers/video/logo/.gitignore
@@ -0,0 +1,7 @@
1#
2# Generated files
3#
4*_mono.c
5*_vga16.c
6*_clut224.c
7*_gray256.c
diff --git a/drivers/video/sa1100fb.c b/drivers/video/sa1100fb.c
index beeec7b51425..8000890e4271 100644
--- a/drivers/video/sa1100fb.c
+++ b/drivers/video/sa1100fb.c
@@ -592,6 +592,7 @@ sa1100fb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
592 return ret; 592 return ret;
593} 593}
594 594
595#ifdef CONFIG_CPU_FREQ
595/* 596/*
596 * sa1100fb_display_dma_period() 597 * sa1100fb_display_dma_period()
597 * Calculate the minimum period (in picoseconds) between two DMA 598 * Calculate the minimum period (in picoseconds) between two DMA
@@ -606,6 +607,7 @@ static inline unsigned int sa1100fb_display_dma_period(struct fb_var_screeninfo
606 */ 607 */
607 return var->pixclock * 8 * 16 / var->bits_per_pixel; 608 return var->pixclock * 8 * 16 / var->bits_per_pixel;
608} 609}
610#endif
609 611
610/* 612/*
611 * sa1100fb_check_var(): 613 * sa1100fb_check_var():
diff --git a/drivers/video/vesafb.c b/drivers/video/vesafb.c
index 1ca80264c7b0..b1243da55fc5 100644
--- a/drivers/video/vesafb.c
+++ b/drivers/video/vesafb.c
@@ -96,14 +96,14 @@ static int vesafb_blank(int blank, struct fb_info *info)
96 int loop = 10000; 96 int loop = 10000;
97 u8 seq = 0, crtc17 = 0; 97 u8 seq = 0, crtc17 = 0;
98 98
99 err = 0; 99 if (blank == FB_BLANK_POWERDOWN) {
100
101 if (blank) {
102 seq = 0x20; 100 seq = 0x20;
103 crtc17 = 0x00; 101 crtc17 = 0x00;
102 err = 0;
104 } else { 103 } else {
105 seq = 0x00; 104 seq = 0x00;
106 crtc17 = 0x80; 105 crtc17 = 0x80;
106 err = (blank == FB_BLANK_UNBLANK) ? 0 : -EINVAL;
107 } 107 }
108 108
109 vga_wseq(NULL, 0x00, 0x01); 109 vga_wseq(NULL, 0x00, 0x01);
diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c
index 1b6b74c116a9..14016b1cd948 100644
--- a/drivers/w1/w1.c
+++ b/drivers/w1/w1.c
@@ -77,8 +77,7 @@ static void w1_master_release(struct device *dev)
77 77
78 dev_dbg(dev, "%s: Releasing %s.\n", __func__, md->name); 78 dev_dbg(dev, "%s: Releasing %s.\n", __func__, md->name);
79 79
80 if (md->nls && md->nls->sk_socket) 80 dev_fini_netlink(md);
81 sock_release(md->nls->sk_socket);
82 memset(md, 0, sizeof(struct w1_master) + sizeof(struct w1_bus_master)); 81 memset(md, 0, sizeof(struct w1_master) + sizeof(struct w1_bus_master));
83 kfree(md); 82 kfree(md);
84} 83}
diff --git a/fs/aio.c b/fs/aio.c
index d6b1551342b7..9fe7216457d8 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -398,7 +398,7 @@ static struct kiocb fastcall *__aio_get_req(struct kioctx *ctx)
398 if (unlikely(!req)) 398 if (unlikely(!req))
399 return NULL; 399 return NULL;
400 400
401 req->ki_flags = 1 << KIF_LOCKED; 401 req->ki_flags = 0;
402 req->ki_users = 2; 402 req->ki_users = 2;
403 req->ki_key = 0; 403 req->ki_key = 0;
404 req->ki_ctx = ctx; 404 req->ki_ctx = ctx;
@@ -547,25 +547,6 @@ struct kioctx *lookup_ioctx(unsigned long ctx_id)
547 return ioctx; 547 return ioctx;
548} 548}
549 549
550static int lock_kiocb_action(void *param)
551{
552 schedule();
553 return 0;
554}
555
556static inline void lock_kiocb(struct kiocb *iocb)
557{
558 wait_on_bit_lock(&iocb->ki_flags, KIF_LOCKED, lock_kiocb_action,
559 TASK_UNINTERRUPTIBLE);
560}
561
562static inline void unlock_kiocb(struct kiocb *iocb)
563{
564 kiocbClearLocked(iocb);
565 smp_mb__after_clear_bit();
566 wake_up_bit(&iocb->ki_flags, KIF_LOCKED);
567}
568
569/* 550/*
570 * use_mm 551 * use_mm
571 * Makes the calling kernel thread take on the specified 552 * Makes the calling kernel thread take on the specified
@@ -796,9 +777,7 @@ static int __aio_run_iocbs(struct kioctx *ctx)
796 * Hold an extra reference while retrying i/o. 777 * Hold an extra reference while retrying i/o.
797 */ 778 */
798 iocb->ki_users++; /* grab extra reference */ 779 iocb->ki_users++; /* grab extra reference */
799 lock_kiocb(iocb);
800 aio_run_iocb(iocb); 780 aio_run_iocb(iocb);
801 unlock_kiocb(iocb);
802 if (__aio_put_req(ctx, iocb)) /* drop extra ref */ 781 if (__aio_put_req(ctx, iocb)) /* drop extra ref */
803 put_ioctx(ctx); 782 put_ioctx(ctx);
804 } 783 }
@@ -1542,7 +1521,6 @@ int fastcall io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb,
1542 1521
1543 spin_lock_irq(&ctx->ctx_lock); 1522 spin_lock_irq(&ctx->ctx_lock);
1544 aio_run_iocb(req); 1523 aio_run_iocb(req);
1545 unlock_kiocb(req);
1546 if (!list_empty(&ctx->run_list)) { 1524 if (!list_empty(&ctx->run_list)) {
1547 /* drain the run list */ 1525 /* drain the run list */
1548 while (__aio_run_iocbs(ctx)) 1526 while (__aio_run_iocbs(ctx))
@@ -1674,7 +1652,6 @@ asmlinkage long sys_io_cancel(aio_context_t ctx_id, struct iocb __user *iocb,
1674 if (NULL != cancel) { 1652 if (NULL != cancel) {
1675 struct io_event tmp; 1653 struct io_event tmp;
1676 pr_debug("calling cancel\n"); 1654 pr_debug("calling cancel\n");
1677 lock_kiocb(kiocb);
1678 memset(&tmp, 0, sizeof(tmp)); 1655 memset(&tmp, 0, sizeof(tmp));
1679 tmp.obj = (u64)(unsigned long)kiocb->ki_obj.user; 1656 tmp.obj = (u64)(unsigned long)kiocb->ki_obj.user;
1680 tmp.data = kiocb->ki_user_data; 1657 tmp.data = kiocb->ki_user_data;
@@ -1686,7 +1663,6 @@ asmlinkage long sys_io_cancel(aio_context_t ctx_id, struct iocb __user *iocb,
1686 if (copy_to_user(result, &tmp, sizeof(tmp))) 1663 if (copy_to_user(result, &tmp, sizeof(tmp)))
1687 ret = -EFAULT; 1664 ret = -EFAULT;
1688 } 1665 }
1689 unlock_kiocb(kiocb);
1690 } else 1666 } else
1691 ret = -EINVAL; 1667 ret = -EINVAL;
1692 1668
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
index d7f7eb669d03..4a36839f0bbd 100644
--- a/fs/nfs/delegation.c
+++ b/fs/nfs/delegation.c
@@ -85,6 +85,10 @@ int nfs_inode_set_delegation(struct inode *inode, struct rpc_cred *cred, struct
85 struct nfs_delegation *delegation; 85 struct nfs_delegation *delegation;
86 int status = 0; 86 int status = 0;
87 87
88 /* Ensure we first revalidate the attributes and page cache! */
89 if ((nfsi->cache_validity & (NFS_INO_REVAL_PAGECACHE|NFS_INO_INVALID_ATTR)))
90 __nfs_revalidate_inode(NFS_SERVER(inode), inode);
91
88 delegation = nfs_alloc_delegation(); 92 delegation = nfs_alloc_delegation();
89 if (delegation == NULL) 93 if (delegation == NULL)
90 return -ENOMEM; 94 return -ENOMEM;
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index f6b9eda925c5..6bdcfa95de94 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -137,7 +137,8 @@ static int nfs_revalidate_file(struct inode *inode, struct file *filp)
137 struct nfs_inode *nfsi = NFS_I(inode); 137 struct nfs_inode *nfsi = NFS_I(inode);
138 int retval = 0; 138 int retval = 0;
139 139
140 if ((nfsi->cache_validity & NFS_INO_REVAL_PAGECACHE) || nfs_attribute_timeout(inode)) 140 if ((nfsi->cache_validity & (NFS_INO_REVAL_PAGECACHE|NFS_INO_INVALID_ATTR))
141 || nfs_attribute_timeout(inode))
141 retval = __nfs_revalidate_inode(NFS_SERVER(inode), inode); 142 retval = __nfs_revalidate_inode(NFS_SERVER(inode), inode);
142 nfs_revalidate_mapping(inode, filp->f_mapping); 143 nfs_revalidate_mapping(inode, filp->f_mapping);
143 return 0; 144 return 0;
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 6922469d6fc5..d4eadeea128e 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -877,12 +877,10 @@ static int nfs_wait_on_inode(struct inode *inode)
877 sigset_t oldmask; 877 sigset_t oldmask;
878 int error; 878 int error;
879 879
880 atomic_inc(&inode->i_count);
881 rpc_clnt_sigmask(clnt, &oldmask); 880 rpc_clnt_sigmask(clnt, &oldmask);
882 error = wait_on_bit_lock(&nfsi->flags, NFS_INO_REVALIDATING, 881 error = wait_on_bit_lock(&nfsi->flags, NFS_INO_REVALIDATING,
883 nfs_wait_schedule, TASK_INTERRUPTIBLE); 882 nfs_wait_schedule, TASK_INTERRUPTIBLE);
884 rpc_clnt_sigunmask(clnt, &oldmask); 883 rpc_clnt_sigunmask(clnt, &oldmask);
885 iput(inode);
886 884
887 return error; 885 return error;
888} 886}
@@ -1226,10 +1224,6 @@ int nfs_refresh_inode(struct inode *inode, struct nfs_fattr *fattr)
1226 loff_t cur_size, new_isize; 1224 loff_t cur_size, new_isize;
1227 int data_unstable; 1225 int data_unstable;
1228 1226
1229 /* Do we hold a delegation? */
1230 if (nfs_have_delegation(inode, FMODE_READ))
1231 return 0;
1232
1233 spin_lock(&inode->i_lock); 1227 spin_lock(&inode->i_lock);
1234 1228
1235 /* Are we in the process of updating data on the server? */ 1229 /* Are we in the process of updating data on the server? */
@@ -1350,7 +1344,8 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr, unsign
1350 nfsi->read_cache_jiffies = fattr->timestamp; 1344 nfsi->read_cache_jiffies = fattr->timestamp;
1351 1345
1352 /* Are we racing with known updates of the metadata on the server? */ 1346 /* Are we racing with known updates of the metadata on the server? */
1353 data_unstable = ! nfs_verify_change_attribute(inode, verifier); 1347 data_unstable = ! (nfs_verify_change_attribute(inode, verifier) ||
1348 (nfsi->cache_validity & NFS_INO_REVAL_PAGECACHE));
1354 1349
1355 /* Check if our cached file size is stale */ 1350 /* Check if our cached file size is stale */
1356 new_isize = nfs_size_to_loff_t(fattr->size); 1351 new_isize = nfs_size_to_loff_t(fattr->size);
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 3b33f94020db..a170450aadb1 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -103,7 +103,9 @@ enum pid_directory_inos {
103 PROC_TGID_NUMA_MAPS, 103 PROC_TGID_NUMA_MAPS,
104 PROC_TGID_MOUNTS, 104 PROC_TGID_MOUNTS,
105 PROC_TGID_WCHAN, 105 PROC_TGID_WCHAN,
106#ifdef CONFIG_MMU
106 PROC_TGID_SMAPS, 107 PROC_TGID_SMAPS,
108#endif
107#ifdef CONFIG_SCHEDSTATS 109#ifdef CONFIG_SCHEDSTATS
108 PROC_TGID_SCHEDSTAT, 110 PROC_TGID_SCHEDSTAT,
109#endif 111#endif
@@ -141,7 +143,9 @@ enum pid_directory_inos {
141 PROC_TID_NUMA_MAPS, 143 PROC_TID_NUMA_MAPS,
142 PROC_TID_MOUNTS, 144 PROC_TID_MOUNTS,
143 PROC_TID_WCHAN, 145 PROC_TID_WCHAN,
146#ifdef CONFIG_MMU
144 PROC_TID_SMAPS, 147 PROC_TID_SMAPS,
148#endif
145#ifdef CONFIG_SCHEDSTATS 149#ifdef CONFIG_SCHEDSTATS
146 PROC_TID_SCHEDSTAT, 150 PROC_TID_SCHEDSTAT,
147#endif 151#endif
@@ -195,7 +199,9 @@ static struct pid_entry tgid_base_stuff[] = {
195 E(PROC_TGID_ROOT, "root", S_IFLNK|S_IRWXUGO), 199 E(PROC_TGID_ROOT, "root", S_IFLNK|S_IRWXUGO),
196 E(PROC_TGID_EXE, "exe", S_IFLNK|S_IRWXUGO), 200 E(PROC_TGID_EXE, "exe", S_IFLNK|S_IRWXUGO),
197 E(PROC_TGID_MOUNTS, "mounts", S_IFREG|S_IRUGO), 201 E(PROC_TGID_MOUNTS, "mounts", S_IFREG|S_IRUGO),
202#ifdef CONFIG_MMU
198 E(PROC_TGID_SMAPS, "smaps", S_IFREG|S_IRUGO), 203 E(PROC_TGID_SMAPS, "smaps", S_IFREG|S_IRUGO),
204#endif
199#ifdef CONFIG_SECURITY 205#ifdef CONFIG_SECURITY
200 E(PROC_TGID_ATTR, "attr", S_IFDIR|S_IRUGO|S_IXUGO), 206 E(PROC_TGID_ATTR, "attr", S_IFDIR|S_IRUGO|S_IXUGO),
201#endif 207#endif
@@ -235,7 +241,9 @@ static struct pid_entry tid_base_stuff[] = {
235 E(PROC_TID_ROOT, "root", S_IFLNK|S_IRWXUGO), 241 E(PROC_TID_ROOT, "root", S_IFLNK|S_IRWXUGO),
236 E(PROC_TID_EXE, "exe", S_IFLNK|S_IRWXUGO), 242 E(PROC_TID_EXE, "exe", S_IFLNK|S_IRWXUGO),
237 E(PROC_TID_MOUNTS, "mounts", S_IFREG|S_IRUGO), 243 E(PROC_TID_MOUNTS, "mounts", S_IFREG|S_IRUGO),
244#ifdef CONFIG_MMU
238 E(PROC_TID_SMAPS, "smaps", S_IFREG|S_IRUGO), 245 E(PROC_TID_SMAPS, "smaps", S_IFREG|S_IRUGO),
246#endif
239#ifdef CONFIG_SECURITY 247#ifdef CONFIG_SECURITY
240 E(PROC_TID_ATTR, "attr", S_IFDIR|S_IRUGO|S_IXUGO), 248 E(PROC_TID_ATTR, "attr", S_IFDIR|S_IRUGO|S_IXUGO),
241#endif 249#endif
@@ -630,6 +638,7 @@ static struct file_operations proc_numa_maps_operations = {
630}; 638};
631#endif 639#endif
632 640
641#ifdef CONFIG_MMU
633extern struct seq_operations proc_pid_smaps_op; 642extern struct seq_operations proc_pid_smaps_op;
634static int smaps_open(struct inode *inode, struct file *file) 643static int smaps_open(struct inode *inode, struct file *file)
635{ 644{
@@ -648,6 +657,7 @@ static struct file_operations proc_smaps_operations = {
648 .llseek = seq_lseek, 657 .llseek = seq_lseek,
649 .release = seq_release, 658 .release = seq_release,
650}; 659};
660#endif
651 661
652extern struct seq_operations mounts_op; 662extern struct seq_operations mounts_op;
653static int mounts_open(struct inode *inode, struct file *file) 663static int mounts_open(struct inode *inode, struct file *file)
@@ -1681,10 +1691,12 @@ static struct dentry *proc_pident_lookup(struct inode *dir,
1681 case PROC_TGID_MOUNTS: 1691 case PROC_TGID_MOUNTS:
1682 inode->i_fop = &proc_mounts_operations; 1692 inode->i_fop = &proc_mounts_operations;
1683 break; 1693 break;
1694#ifdef CONFIG_MMU
1684 case PROC_TID_SMAPS: 1695 case PROC_TID_SMAPS:
1685 case PROC_TGID_SMAPS: 1696 case PROC_TGID_SMAPS:
1686 inode->i_fop = &proc_smaps_operations; 1697 inode->i_fop = &proc_smaps_operations;
1687 break; 1698 break;
1699#endif
1688#ifdef CONFIG_SECURITY 1700#ifdef CONFIG_SECURITY
1689 case PROC_TID_ATTR: 1701 case PROC_TID_ATTR:
1690 inode->i_nlink = 2; 1702 inode->i_nlink = 2;
diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c
index f3bf016d5ee3..cff10ab1af63 100644
--- a/fs/proc/nommu.c
+++ b/fs/proc/nommu.c
@@ -91,6 +91,7 @@ static void *nommu_vma_list_start(struct seq_file *m, loff_t *_pos)
91 next = _rb; 91 next = _rb;
92 break; 92 break;
93 } 93 }
94 pos--;
94 } 95 }
95 96
96 return next; 97 return next;
diff --git a/include/asm-arm/arch-ixp4xx/entry-macro.S b/include/asm-arm/arch-ixp4xx/entry-macro.S
index 455da64832de..323b0bc4a39c 100644
--- a/include/asm-arm/arch-ixp4xx/entry-macro.S
+++ b/include/asm-arm/arch-ixp4xx/entry-macro.S
@@ -15,25 +15,26 @@
15 ldr \irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP_OFFSET) 15 ldr \irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP_OFFSET)
16 ldr \irqstat, [\irqstat] @ get interrupts 16 ldr \irqstat, [\irqstat] @ get interrupts
17 cmp \irqstat, #0 17 cmp \irqstat, #0
18 beq 1001f 18 beq 1001f @ upper IRQ?
19 clz \irqnr, \irqstat 19 clz \irqnr, \irqstat
20 mov \base, #31 20 mov \base, #31
21 subs \irqnr, \base, \irqnr 21 sub \irqnr, \base, \irqnr
22 b 1002f @ lower IRQ being
23 @ handled
22 24
231001: 251001:
24 /* 26 /*
25 * IXP465 has an upper IRQ status register 27 * IXP465 has an upper IRQ status register
26 */ 28 */
27#if defined(CONFIG_CPU_IXP46X) 29#if defined(CONFIG_CPU_IXP46X)
28 bne 1002f
29 ldr \irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP2_OFFSET) 30 ldr \irqstat, =(IXP4XX_INTC_BASE_VIRT+IXP4XX_ICIP2_OFFSET)
30 ldr \irqstat, [\irqstat] @ get upper interrupts 31 ldr \irqstat, [\irqstat] @ get upper interrupts
31 mov \irqnr, #63 32 mov \irqnr, #63
32 clz \irqstat, \irqstat 33 clz \irqstat, \irqstat
33 cmp \irqstat, #32 34 cmp \irqstat, #32
34 subne \irqnr, \irqnr, \irqstat 35 subne \irqnr, \irqnr, \irqstat
351002:
36#endif 36#endif
371002:
37 .endm 38 .endm
38 39
39 40
diff --git a/include/asm-arm/arch-ixp4xx/hardware.h b/include/asm-arm/arch-ixp4xx/hardware.h
index 4ac964b9078a..55d85eea8c1a 100644
--- a/include/asm-arm/arch-ixp4xx/hardware.h
+++ b/include/asm-arm/arch-ixp4xx/hardware.h
@@ -27,7 +27,7 @@
27 27
28#define pcibios_assign_all_busses() 1 28#define pcibios_assign_all_busses() 1
29 29
30#if defined(CONFIG_CPU_IXP465) && !defined(__ASSEMBLY__) 30#if defined(CONFIG_CPU_IXP46X) && !defined(__ASSEMBLY__)
31extern unsigned int processor_id; 31extern unsigned int processor_id;
32#define cpu_is_ixp465() ((processor_id & 0xffffffc0) == 0x69054200) 32#define cpu_is_ixp465() ((processor_id & 0xffffffc0) == 0x69054200)
33#else 33#else
diff --git a/include/asm-arm/arch-pxa/pxa-regs.h b/include/asm-arm/arch-pxa/pxa-regs.h
index 939d9e5020a0..3af7165ab0d7 100644
--- a/include/asm-arm/arch-pxa/pxa-regs.h
+++ b/include/asm-arm/arch-pxa/pxa-regs.h
@@ -126,8 +126,8 @@
126#define DRCMR12 __REG(0x40000130) /* Request to Channel Map Register for AC97 audio transmit Request */ 126#define DRCMR12 __REG(0x40000130) /* Request to Channel Map Register for AC97 audio transmit Request */
127#define DRCMR13 __REG(0x40000134) /* Request to Channel Map Register for SSP receive Request */ 127#define DRCMR13 __REG(0x40000134) /* Request to Channel Map Register for SSP receive Request */
128#define DRCMR14 __REG(0x40000138) /* Request to Channel Map Register for SSP transmit Request */ 128#define DRCMR14 __REG(0x40000138) /* Request to Channel Map Register for SSP transmit Request */
129#define DRCMR15 __REG(0x4000013c) /* Reserved */ 129#define DRCMR15 __REG(0x4000013c) /* Request to Channel Map Register for SSP2 receive Request */
130#define DRCMR16 __REG(0x40000140) /* Reserved */ 130#define DRCMR16 __REG(0x40000140) /* Request to Channel Map Register for SSP2 transmit Request */
131#define DRCMR17 __REG(0x40000144) /* Request to Channel Map Register for ICP receive Request */ 131#define DRCMR17 __REG(0x40000144) /* Request to Channel Map Register for ICP receive Request */
132#define DRCMR18 __REG(0x40000148) /* Request to Channel Map Register for ICP transmit Request */ 132#define DRCMR18 __REG(0x40000148) /* Request to Channel Map Register for ICP transmit Request */
133#define DRCMR19 __REG(0x4000014c) /* Request to Channel Map Register for STUART receive Request */ 133#define DRCMR19 __REG(0x4000014c) /* Request to Channel Map Register for STUART receive Request */
@@ -151,7 +151,8 @@
151#define DRCMR37 __REG(0x40000194) /* Request to Channel Map Register for USB endpoint 13 Request */ 151#define DRCMR37 __REG(0x40000194) /* Request to Channel Map Register for USB endpoint 13 Request */
152#define DRCMR38 __REG(0x40000198) /* Request to Channel Map Register for USB endpoint 14 Request */ 152#define DRCMR38 __REG(0x40000198) /* Request to Channel Map Register for USB endpoint 14 Request */
153#define DRCMR39 __REG(0x4000019C) /* Reserved */ 153#define DRCMR39 __REG(0x4000019C) /* Reserved */
154 154#define DRCMR66 __REG(0x40001108) /* Request to Channel Map Register for SSP3 receive Request */
155#define DRCMR67 __REG(0x4000110C) /* Request to Channel Map Register for SSP3 transmit Request */
155#define DRCMR68 __REG(0x40001110) /* Request to Channel Map Register for Camera FIFO 0 Request */ 156#define DRCMR68 __REG(0x40001110) /* Request to Channel Map Register for Camera FIFO 0 Request */
156#define DRCMR69 __REG(0x40001114) /* Request to Channel Map Register for Camera FIFO 1 Request */ 157#define DRCMR69 __REG(0x40001114) /* Request to Channel Map Register for Camera FIFO 1 Request */
157#define DRCMR70 __REG(0x40001118) /* Request to Channel Map Register for Camera FIFO 2 Request */ 158#define DRCMR70 __REG(0x40001118) /* Request to Channel Map Register for Camera FIFO 2 Request */
@@ -652,7 +653,7 @@
652 653
653#define UDCCS_IO_RFS (1 << 0) /* Receive FIFO service */ 654#define UDCCS_IO_RFS (1 << 0) /* Receive FIFO service */
654#define UDCCS_IO_RPC (1 << 1) /* Receive packet complete */ 655#define UDCCS_IO_RPC (1 << 1) /* Receive packet complete */
655#define UDCCS_IO_ROF (1 << 3) /* Receive overflow */ 656#define UDCCS_IO_ROF (1 << 2) /* Receive overflow */
656#define UDCCS_IO_DME (1 << 3) /* DMA enable */ 657#define UDCCS_IO_DME (1 << 3) /* DMA enable */
657#define UDCCS_IO_RNE (1 << 6) /* Receive FIFO not empty */ 658#define UDCCS_IO_RNE (1 << 6) /* Receive FIFO not empty */
658#define UDCCS_IO_RSP (1 << 7) /* Receive short packet */ 659#define UDCCS_IO_RSP (1 << 7) /* Receive short packet */
diff --git a/include/asm-arm/arch-pxa/pxafb.h b/include/asm-arm/arch-pxa/pxafb.h
index 21c0e16dce5f..aba9b30f4249 100644
--- a/include/asm-arm/arch-pxa/pxafb.h
+++ b/include/asm-arm/arch-pxa/pxafb.h
@@ -66,4 +66,5 @@ struct pxafb_mach_info {
66 66
67}; 67};
68void set_pxa_fb_info(struct pxafb_mach_info *hard_pxa_fb_info); 68void set_pxa_fb_info(struct pxafb_mach_info *hard_pxa_fb_info);
69void set_pxa_fb_parent(struct device *parent_dev);
69unsigned long pxafb_get_hsync_time(struct device *dev); 70unsigned long pxafb_get_hsync_time(struct device *dev);
diff --git a/include/asm-arm/arch-s3c2410/hardware.h b/include/asm-arm/arch-s3c2410/hardware.h
index 48a39918a760..1c9de29cafef 100644
--- a/include/asm-arm/arch-s3c2410/hardware.h
+++ b/include/asm-arm/arch-s3c2410/hardware.h
@@ -92,6 +92,13 @@ extern unsigned int s3c2410_gpio_getpin(unsigned int pin);
92 92
93extern unsigned int s3c2410_modify_misccr(unsigned int clr, unsigned int chg); 93extern unsigned int s3c2410_modify_misccr(unsigned int clr, unsigned int chg);
94 94
95#ifdef CONFIG_CPU_S3C2440
96
97extern int s3c2440_set_dsc(unsigned int pin, unsigned int value);
98
99#endif /* CONFIG_CPU_S3C2440 */
100
101
95#endif /* __ASSEMBLY__ */ 102#endif /* __ASSEMBLY__ */
96 103
97#include <asm/sizes.h> 104#include <asm/sizes.h>
diff --git a/include/asm-arm/arch-s3c2410/io.h b/include/asm-arm/arch-s3c2410/io.h
index 418233a7ee6f..4bf272ed9add 100644
--- a/include/asm-arm/arch-s3c2410/io.h
+++ b/include/asm-arm/arch-s3c2410/io.h
@@ -9,7 +9,7 @@
9 * 06-Dec-1997 RMK Created. 9 * 06-Dec-1997 RMK Created.
10 * 02-Sep-2003 BJD Modified for S3C2410 10 * 02-Sep-2003 BJD Modified for S3C2410
11 * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA 11 * 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
12 * 12 * 13-Oct-2005 BJD Fixed problems with LDRH/STRH offset range
13 */ 13 */
14 14
15#ifndef __ASM_ARM_ARCH_IO_H 15#ifndef __ASM_ARM_ARCH_IO_H
@@ -97,7 +97,7 @@ DECLARE_IO(int,l,"")
97 else \ 97 else \
98 __asm__ __volatile__( \ 98 __asm__ __volatile__( \
99 "strb %0, [%1, #0] @ outbc" \ 99 "strb %0, [%1, #0] @ outbc" \
100 : : "r" (value), "r" ((port))); \ 100 : : "r" (value), "r" ((port))); \
101}) 101})
102 102
103#define __inbc(port) \ 103#define __inbc(port) \
@@ -110,35 +110,61 @@ DECLARE_IO(int,l,"")
110 else \ 110 else \
111 __asm__ __volatile__( \ 111 __asm__ __volatile__( \
112 "ldrb %0, [%1, #0] @ inbc" \ 112 "ldrb %0, [%1, #0] @ inbc" \
113 : "=r" (result) : "r" ((port))); \ 113 : "=r" (result) : "r" ((port))); \
114 result; \ 114 result; \
115}) 115})
116 116
117#define __outwc(value,port) \ 117#define __outwc(value,port) \
118({ \ 118({ \
119 unsigned long v = value; \ 119 unsigned long v = value; \
120 if (__PORT_PCIO((port))) \ 120 if (__PORT_PCIO((port))) { \
121 __asm__ __volatile__( \ 121 if ((port) < 256 && (port) > -256) \
122 "strh %0, [%1, %2] @ outwc" \ 122 __asm__ __volatile__( \
123 : : "r" (v), "r" (PCIO_BASE), "Jr" ((port))); \ 123 "strh %0, [%1, %2] @ outwc" \
124 else \ 124 : : "r" (v), "r" (PCIO_BASE), "Jr" ((port))); \
125 else if ((port) > 0) \
126 __asm__ __volatile__( \
127 "strh %0, [%1, %2] @ outwc" \
128 : : "r" (v), \
129 "r" (PCIO_BASE + ((port) & ~0xff)), \
130 "Jr" (((port) & 0xff))); \
131 else \
132 __asm__ __volatile__( \
133 "strh %0, [%1, #0] @ outwc" \
134 : : "r" (v), \
135 "r" (PCIO_BASE + (port))); \
136 } else \
125 __asm__ __volatile__( \ 137 __asm__ __volatile__( \
126 "strh %0, [%1, #0] @ outwc" \ 138 "strh %0, [%1, #0] @ outwc" \
127 : : "r" (v), "r" ((port))); \ 139 : : "r" (v), "r" ((port))); \
128}) 140})
129 141
130#define __inwc(port) \ 142#define __inwc(port) \
131({ \ 143({ \
132 unsigned short result; \ 144 unsigned short result; \
133 if (__PORT_PCIO((port))) \ 145 if (__PORT_PCIO((port))) { \
134 __asm__ __volatile__( \ 146 if ((port) < 256 && (port) > -256 ) \
135 "ldrh %0, [%1, %2] @ inwc" \ 147 __asm__ __volatile__( \
136 : "=r" (result) : "r" (PCIO_BASE), "Jr" ((port))); \ 148 "ldrh %0, [%1, %2] @ inwc" \
137 else \ 149 : "=r" (result) \
150 : "r" (PCIO_BASE), \
151 "Jr" ((port))); \
152 else if ((port) > 0) \
153 __asm__ __volatile__( \
154 "ldrh %0, [%1, %2] @ inwc" \
155 : "=r" (result) \
156 : "r" (PCIO_BASE + ((port) & ~0xff)), \
157 "Jr" (((port) & 0xff))); \
158 else \
159 __asm__ __volatile__( \
160 "ldrh %0, [%1, #0] @ inwc" \
161 : "=r" (result) \
162 : "r" (PCIO_BASE + ((port)))); \
163 } else \
138 __asm__ __volatile__( \ 164 __asm__ __volatile__( \
139 "ldrh %0, [%1, #0] @ inwc" \ 165 "ldrh %0, [%1, #0] @ inwc" \
140 : "=r" (result) : "r" ((port))); \ 166 : "=r" (result) : "r" ((port))); \
141 result; \ 167 result; \
142}) 168})
143 169
144#define __outlc(value,port) \ 170#define __outlc(value,port) \
diff --git a/include/asm-arm/arch-s3c2410/regs-clock.h b/include/asm-arm/arch-s3c2410/regs-clock.h
index 16f4c3cc1388..34360706e016 100644
--- a/include/asm-arm/arch-s3c2410/regs-clock.h
+++ b/include/asm-arm/arch-s3c2410/regs-clock.h
@@ -18,7 +18,9 @@
18 * 10-Feb-2005 Ben Dooks Fixed CAMDIVN address (Guillaume Gourat) 18 * 10-Feb-2005 Ben Dooks Fixed CAMDIVN address (Guillaume Gourat)
19 * 10-Mar-2005 Lucas Villa Real Changed S3C2410_VA to S3C24XX_VA 19 * 10-Mar-2005 Lucas Villa Real Changed S3C2410_VA to S3C24XX_VA
20 * 27-Aug-2005 Ben Dooks Add clock-slow info 20 * 27-Aug-2005 Ben Dooks Add clock-slow info
21 */ 21 * 20-Oct-2005 Ben Dooks Fixed overflow in PLL (Guillaume Gourat)
22 * 20-Oct-2005 Ben Dooks Add masks for DCLK (Guillaume Gourat)
23*/
22 24
23#ifndef __ASM_ARM_REGS_CLOCK 25#ifndef __ASM_ARM_REGS_CLOCK
24#define __ASM_ARM_REGS_CLOCK "$Id: clock.h,v 1.4 2003/04/30 14:50:51 ben Exp $" 26#define __ASM_ARM_REGS_CLOCK "$Id: clock.h,v 1.4 2003/04/30 14:50:51 ben Exp $"
@@ -66,11 +68,16 @@
66#define S3C2410_DCLKCON_DCLK0_UCLK (1<<1) 68#define S3C2410_DCLKCON_DCLK0_UCLK (1<<1)
67#define S3C2410_DCLKCON_DCLK0_DIV(x) (((x) - 1 )<<4) 69#define S3C2410_DCLKCON_DCLK0_DIV(x) (((x) - 1 )<<4)
68#define S3C2410_DCLKCON_DCLK0_CMP(x) (((x) - 1 )<<8) 70#define S3C2410_DCLKCON_DCLK0_CMP(x) (((x) - 1 )<<8)
71#define S3C2410_DCLKCON_DCLK0_DIV_MASK ((0xf)<<4)
72#define S3C2410_DCLKCON_DCLK0_CMP_MASK ((0xf)<<8)
69 73
70#define S3C2410_DCLKCON_DCLK1EN (1<<16) 74#define S3C2410_DCLKCON_DCLK1EN (1<<16)
71#define S3C2410_DCLKCON_DCLK1_PCLK (0<<17) 75#define S3C2410_DCLKCON_DCLK1_PCLK (0<<17)
72#define S3C2410_DCLKCON_DCLK1_UCLK (1<<17) 76#define S3C2410_DCLKCON_DCLK1_UCLK (1<<17)
73#define S3C2410_DCLKCON_DCLK1_DIV(x) (((x) - 1) <<20) 77#define S3C2410_DCLKCON_DCLK1_DIV(x) (((x) - 1) <<20)
78#define S3C2410_DCLKCON_DCLK1_CMP(x) (((x) - 1) <<24)
79#define S3C2410_DCLKCON_DCLK1_DIV_MASK ((0xf) <<20)
80#define S3C2410_DCLKCON_DCLK1_CMP_MASK ((0xf) <<24)
74 81
75#define S3C2410_CLKDIVN_PDIVN (1<<0) 82#define S3C2410_CLKDIVN_PDIVN (1<<0)
76#define S3C2410_CLKDIVN_HDIVN (1<<1) 83#define S3C2410_CLKDIVN_HDIVN (1<<1)
@@ -83,10 +90,13 @@
83 90
84#ifndef __ASSEMBLY__ 91#ifndef __ASSEMBLY__
85 92
93#include <asm/div64.h>
94
86static inline unsigned int 95static inline unsigned int
87s3c2410_get_pll(int pllval, int baseclk) 96s3c2410_get_pll(unsigned int pllval, unsigned int baseclk)
88{ 97{
89 int mdiv, pdiv, sdiv; 98 unsigned int mdiv, pdiv, sdiv;
99 uint64_t fvco;
90 100
91 mdiv = pllval >> S3C2410_PLLCON_MDIVSHIFT; 101 mdiv = pllval >> S3C2410_PLLCON_MDIVSHIFT;
92 pdiv = pllval >> S3C2410_PLLCON_PDIVSHIFT; 102 pdiv = pllval >> S3C2410_PLLCON_PDIVSHIFT;
@@ -96,7 +106,10 @@ s3c2410_get_pll(int pllval, int baseclk)
96 pdiv &= S3C2410_PLLCON_PDIVMASK; 106 pdiv &= S3C2410_PLLCON_PDIVMASK;
97 sdiv &= S3C2410_PLLCON_SDIVMASK; 107 sdiv &= S3C2410_PLLCON_SDIVMASK;
98 108
99 return (baseclk * (mdiv + 8)) / ((pdiv + 2) << sdiv); 109 fvco = (uint64_t)baseclk * (mdiv + 8);
110 do_div(fvco, (pdiv + 2) << sdiv);
111
112 return (unsigned int)fvco;
100} 113}
101 114
102#endif /* __ASSEMBLY__ */ 115#endif /* __ASSEMBLY__ */
diff --git a/include/asm-arm/locks.h b/include/asm-arm/locks.h
index f08dc8447913..852220eecdbc 100644
--- a/include/asm-arm/locks.h
+++ b/include/asm-arm/locks.h
@@ -103,7 +103,7 @@
103 ({ \ 103 ({ \
104 smp_mb(); \ 104 smp_mb(); \
105 __asm__ __volatile__( \ 105 __asm__ __volatile__( \
106 "@ up_op_read\n" \ 106 "@ up_op_write\n" \
107"1: ldrex lr, [%0]\n" \ 107"1: ldrex lr, [%0]\n" \
108" adds lr, lr, %1\n" \ 108" adds lr, lr, %1\n" \
109" strex ip, lr, [%0]\n" \ 109" strex ip, lr, [%0]\n" \
@@ -231,7 +231,7 @@
231#define __up_op_write(ptr,wake) \ 231#define __up_op_write(ptr,wake) \
232 ({ \ 232 ({ \
233 __asm__ __volatile__( \ 233 __asm__ __volatile__( \
234 "@ up_op_read\n" \ 234 "@ up_op_write\n" \
235" mrs ip, cpsr\n" \ 235" mrs ip, cpsr\n" \
236" orr lr, ip, #128\n" \ 236" orr lr, ip, #128\n" \
237" msr cpsr_c, lr\n" \ 237" msr cpsr_c, lr\n" \
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h
index 373642aff7d8..c019501daceb 100644
--- a/include/asm-powerpc/cputable.h
+++ b/include/asm-powerpc/cputable.h
@@ -15,6 +15,7 @@
15#define PPC_FEATURE_HAS_SPE 0x00800000 15#define PPC_FEATURE_HAS_SPE 0x00800000
16#define PPC_FEATURE_HAS_EFP_SINGLE 0x00400000 16#define PPC_FEATURE_HAS_EFP_SINGLE 0x00400000
17#define PPC_FEATURE_HAS_EFP_DOUBLE 0x00200000 17#define PPC_FEATURE_HAS_EFP_DOUBLE 0x00200000
18#define PPC_FEATURE_NO_TB 0x00100000
18 19
19#ifdef __KERNEL__ 20#ifdef __KERNEL__
20#ifndef __ASSEMBLY__ 21#ifndef __ASSEMBLY__
diff --git a/include/asm-powerpc/timex.h b/include/asm-powerpc/timex.h
index 51c5b316be55..c02d15aced91 100644
--- a/include/asm-powerpc/timex.h
+++ b/include/asm-powerpc/timex.h
@@ -10,7 +10,7 @@
10#include <linux/config.h> 10#include <linux/config.h>
11#include <asm/cputable.h> 11#include <asm/cputable.h>
12 12
13#define CLOCK_TICK_RATE 1193180 /* Underlying HZ */ 13#define CLOCK_TICK_RATE 1024000 /* Underlying HZ */
14 14
15typedef unsigned long cycles_t; 15typedef unsigned long cycles_t;
16 16
diff --git a/include/asm-sparc64/pbm.h b/include/asm-sparc64/pbm.h
index 38bbbccb4068..dd35a2c7798a 100644
--- a/include/asm-sparc64/pbm.h
+++ b/include/asm-sparc64/pbm.h
@@ -27,23 +27,27 @@
27 * PCI bus. 27 * PCI bus.
28 */ 28 */
29 29
30#define PBM_LOGCLUSTERS 3
31#define PBM_NCLUSTERS (1 << PBM_LOGCLUSTERS)
32
33struct pci_controller_info; 30struct pci_controller_info;
34 31
35/* This contains the software state necessary to drive a PCI 32/* This contains the software state necessary to drive a PCI
36 * controller's IOMMU. 33 * controller's IOMMU.
37 */ 34 */
35struct pci_iommu_arena {
36 unsigned long *map;
37 unsigned int hint;
38 unsigned int limit;
39};
40
38struct pci_iommu { 41struct pci_iommu {
39 /* This protects the controller's IOMMU and all 42 /* This protects the controller's IOMMU and all
40 * streaming buffers underneath. 43 * streaming buffers underneath.
41 */ 44 */
42 spinlock_t lock; 45 spinlock_t lock;
43 46
47 struct pci_iommu_arena arena;
48
44 /* IOMMU page table, a linear array of ioptes. */ 49 /* IOMMU page table, a linear array of ioptes. */
45 iopte_t *page_table; /* The page table itself. */ 50 iopte_t *page_table; /* The page table itself. */
46 int page_table_sz_bits; /* log2 of ow many pages does it map? */
47 51
48 /* Base PCI memory space address where IOMMU mappings 52 /* Base PCI memory space address where IOMMU mappings
49 * begin. 53 * begin.
@@ -62,12 +66,6 @@ struct pci_iommu {
62 */ 66 */
63 unsigned long write_complete_reg; 67 unsigned long write_complete_reg;
64 68
65 /* The lowest used consistent mapping entry. Since
66 * we allocate consistent maps out of cluster 0 this
67 * is relative to the beginning of closter 0.
68 */
69 u32 lowest_consistent_map;
70
71 /* In order to deal with some buggy third-party PCI bridges that 69 /* In order to deal with some buggy third-party PCI bridges that
72 * do wrong prefetching, we never mark valid mappings as invalid. 70 * do wrong prefetching, we never mark valid mappings as invalid.
73 * Instead we point them at this dummy page. 71 * Instead we point them at this dummy page.
@@ -75,16 +73,6 @@ struct pci_iommu {
75 unsigned long dummy_page; 73 unsigned long dummy_page;
76 unsigned long dummy_page_pa; 74 unsigned long dummy_page_pa;
77 75
78 /* If PBM_NCLUSTERS is ever decreased to 4 or lower,
79 * or if largest supported page_table_sz * 8K goes above
80 * 2GB, you must increase the size of the type of
81 * these counters. You have been duly warned. -DaveM
82 */
83 struct {
84 u16 next;
85 u16 flush;
86 } alloc_info[PBM_NCLUSTERS];
87
88 /* CTX allocation. */ 76 /* CTX allocation. */
89 unsigned long ctx_lowest_free; 77 unsigned long ctx_lowest_free;
90 unsigned long ctx_bitmap[IOMMU_NUM_CTXS / (sizeof(unsigned long) * 8)]; 78 unsigned long ctx_bitmap[IOMMU_NUM_CTXS / (sizeof(unsigned long) * 8)];
@@ -102,7 +90,7 @@ struct pci_iommu {
102 u32 dma_addr_mask; 90 u32 dma_addr_mask;
103}; 91};
104 92
105extern void pci_iommu_table_init(struct pci_iommu *, int); 93extern void pci_iommu_table_init(struct pci_iommu *iommu, int tsbsize, u32 dma_offset, u32 dma_addr_mask);
106 94
107/* This describes a PCI bus module's streaming buffer. */ 95/* This describes a PCI bus module's streaming buffer. */
108struct pci_strbuf { 96struct pci_strbuf {
diff --git a/include/linux/acct.h b/include/linux/acct.h
index 1993a3691768..19f70462b3be 100644
--- a/include/linux/acct.h
+++ b/include/linux/acct.h
@@ -162,13 +162,13 @@ typedef struct acct acct_t;
162#ifdef __KERNEL__ 162#ifdef __KERNEL__
163/* 163/*
164 * Yet another set of HZ to *HZ helper functions. 164 * Yet another set of HZ to *HZ helper functions.
165 * See <linux/times.h> for the original. 165 * See <linux/jiffies.h> for the original.
166 */ 166 */
167 167
168static inline u32 jiffies_to_AHZ(unsigned long x) 168static inline u32 jiffies_to_AHZ(unsigned long x)
169{ 169{
170#if (TICK_NSEC % (NSEC_PER_SEC / AHZ)) == 0 170#if (TICK_NSEC % (NSEC_PER_SEC / AHZ)) == 0
171 return x / (HZ / USER_HZ); 171 return x / (HZ / AHZ);
172#else 172#else
173 u64 tmp = (u64)x * TICK_NSEC; 173 u64 tmp = (u64)x * TICK_NSEC;
174 do_div(tmp, (NSEC_PER_SEC / AHZ)); 174 do_div(tmp, (NSEC_PER_SEC / AHZ));
diff --git a/include/linux/aio.h b/include/linux/aio.h
index 60def658b246..0decf66117c1 100644
--- a/include/linux/aio.h
+++ b/include/linux/aio.h
@@ -24,7 +24,12 @@ struct kioctx;
24#define KIOCB_SYNC_KEY (~0U) 24#define KIOCB_SYNC_KEY (~0U)
25 25
26/* ki_flags bits */ 26/* ki_flags bits */
27#define KIF_LOCKED 0 27/*
28 * This may be used for cancel/retry serialization in the future, but
29 * for now it's unused and we probably don't want modules to even
30 * think they can use it.
31 */
32/* #define KIF_LOCKED 0 */
28#define KIF_KICKED 1 33#define KIF_KICKED 1
29#define KIF_CANCELLED 2 34#define KIF_CANCELLED 2
30 35
diff --git a/include/linux/bootmem.h b/include/linux/bootmem.h
index 82bd8842d11c..3b03b0b868dd 100644
--- a/include/linux/bootmem.h
+++ b/include/linux/bootmem.h
@@ -43,7 +43,7 @@ typedef struct bootmem_data {
43extern unsigned long __init bootmem_bootmap_pages (unsigned long); 43extern unsigned long __init bootmem_bootmap_pages (unsigned long);
44extern unsigned long __init init_bootmem (unsigned long addr, unsigned long memend); 44extern unsigned long __init init_bootmem (unsigned long addr, unsigned long memend);
45extern void __init free_bootmem (unsigned long addr, unsigned long size); 45extern void __init free_bootmem (unsigned long addr, unsigned long size);
46extern void * __init __alloc_bootmem (unsigned long size, unsigned long align, unsigned long goal); 46extern void * __init __alloc_bootmem_limit (unsigned long size, unsigned long align, unsigned long goal, unsigned long limit);
47#ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE 47#ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE
48extern void __init reserve_bootmem (unsigned long addr, unsigned long size); 48extern void __init reserve_bootmem (unsigned long addr, unsigned long size);
49#define alloc_bootmem(x) \ 49#define alloc_bootmem(x) \
@@ -54,6 +54,16 @@ extern void __init reserve_bootmem (unsigned long addr, unsigned long size);
54 __alloc_bootmem((x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) 54 __alloc_bootmem((x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS))
55#define alloc_bootmem_low_pages(x) \ 55#define alloc_bootmem_low_pages(x) \
56 __alloc_bootmem((x), PAGE_SIZE, 0) 56 __alloc_bootmem((x), PAGE_SIZE, 0)
57
58#define alloc_bootmem_limit(x, limit) \
59 __alloc_bootmem_limit((x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS), (limit))
60#define alloc_bootmem_low_limit(x, limit) \
61 __alloc_bootmem_limit((x), SMP_CACHE_BYTES, 0, (limit))
62#define alloc_bootmem_pages_limit(x, limit) \
63 __alloc_bootmem_limit((x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS), (limit))
64#define alloc_bootmem_low_pages_limit(x, limit) \
65 __alloc_bootmem_limit((x), PAGE_SIZE, 0, (limit))
66
57#endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */ 67#endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */
58extern unsigned long __init free_all_bootmem (void); 68extern unsigned long __init free_all_bootmem (void);
59 69
@@ -61,7 +71,7 @@ extern unsigned long __init init_bootmem_node (pg_data_t *pgdat, unsigned long f
61extern void __init reserve_bootmem_node (pg_data_t *pgdat, unsigned long physaddr, unsigned long size); 71extern void __init reserve_bootmem_node (pg_data_t *pgdat, unsigned long physaddr, unsigned long size);
62extern void __init free_bootmem_node (pg_data_t *pgdat, unsigned long addr, unsigned long size); 72extern void __init free_bootmem_node (pg_data_t *pgdat, unsigned long addr, unsigned long size);
63extern unsigned long __init free_all_bootmem_node (pg_data_t *pgdat); 73extern unsigned long __init free_all_bootmem_node (pg_data_t *pgdat);
64extern void * __init __alloc_bootmem_node (pg_data_t *pgdat, unsigned long size, unsigned long align, unsigned long goal); 74extern void * __init __alloc_bootmem_node_limit (pg_data_t *pgdat, unsigned long size, unsigned long align, unsigned long goal, unsigned long limit);
65#ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE 75#ifndef CONFIG_HAVE_ARCH_BOOTMEM_NODE
66#define alloc_bootmem_node(pgdat, x) \ 76#define alloc_bootmem_node(pgdat, x) \
67 __alloc_bootmem_node((pgdat), (x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS)) 77 __alloc_bootmem_node((pgdat), (x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS))
@@ -69,6 +79,14 @@ extern void * __init __alloc_bootmem_node (pg_data_t *pgdat, unsigned long size,
69 __alloc_bootmem_node((pgdat), (x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS)) 79 __alloc_bootmem_node((pgdat), (x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS))
70#define alloc_bootmem_low_pages_node(pgdat, x) \ 80#define alloc_bootmem_low_pages_node(pgdat, x) \
71 __alloc_bootmem_node((pgdat), (x), PAGE_SIZE, 0) 81 __alloc_bootmem_node((pgdat), (x), PAGE_SIZE, 0)
82
83#define alloc_bootmem_node_limit(pgdat, x, limit) \
84 __alloc_bootmem_node_limit((pgdat), (x), SMP_CACHE_BYTES, __pa(MAX_DMA_ADDRESS), (limit))
85#define alloc_bootmem_pages_node_limit(pgdat, x, limit) \
86 __alloc_bootmem_node_limit((pgdat), (x), PAGE_SIZE, __pa(MAX_DMA_ADDRESS), (limit))
87#define alloc_bootmem_low_pages_node_limit(pgdat, x, limit) \
88 __alloc_bootmem_node_limit((pgdat), (x), PAGE_SIZE, 0, (limit))
89
72#endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */ 90#endif /* !CONFIG_HAVE_ARCH_BOOTMEM_NODE */
73 91
74#ifdef CONFIG_HAVE_ARCH_ALLOC_REMAP 92#ifdef CONFIG_HAVE_ARCH_ALLOC_REMAP
@@ -105,5 +123,15 @@ extern void *__init alloc_large_system_hash(const char *tablename,
105#endif 123#endif
106extern int __initdata hashdist; /* Distribute hashes across NUMA nodes? */ 124extern int __initdata hashdist; /* Distribute hashes across NUMA nodes? */
107 125
126static inline void *__alloc_bootmem (unsigned long size, unsigned long align, unsigned long goal)
127{
128 return __alloc_bootmem_limit(size, align, goal, 0);
129}
130
131static inline void *__alloc_bootmem_node (pg_data_t *pgdat, unsigned long size, unsigned long align,
132 unsigned long goal)
133{
134 return __alloc_bootmem_node_limit(pgdat, size, align, goal, 0);
135}
108 136
109#endif /* _LINUX_BOOTMEM_H */ 137#endif /* _LINUX_BOOTMEM_H */
diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
index b15826f6e3a2..9bdba8169b41 100644
--- a/include/linux/cpumask.h
+++ b/include/linux/cpumask.h
@@ -392,4 +392,14 @@ extern cpumask_t cpu_present_map;
392#define for_each_online_cpu(cpu) for_each_cpu_mask((cpu), cpu_online_map) 392#define for_each_online_cpu(cpu) for_each_cpu_mask((cpu), cpu_online_map)
393#define for_each_present_cpu(cpu) for_each_cpu_mask((cpu), cpu_present_map) 393#define for_each_present_cpu(cpu) for_each_cpu_mask((cpu), cpu_present_map)
394 394
395/* Find the highest possible smp_processor_id() */
396#define highest_possible_processor_id() \
397({ \
398 unsigned int cpu, highest = 0; \
399 for_each_cpu_mask(cpu, cpu_possible_map) \
400 highest = cpu; \
401 highest; \
402})
403
404
395#endif /* __LINUX_CPUMASK_H */ 405#endif /* __LINUX_CPUMASK_H */
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index e670b0d13fe0..d664330d900e 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -25,6 +25,8 @@ int is_hugepage_mem_enough(size_t);
25unsigned long hugetlb_total_pages(void); 25unsigned long hugetlb_total_pages(void);
26struct page *alloc_huge_page(void); 26struct page *alloc_huge_page(void);
27void free_huge_page(struct page *); 27void free_huge_page(struct page *);
28int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
29 unsigned long address, int write_access);
28 30
29extern unsigned long max_huge_pages; 31extern unsigned long max_huge_pages;
30extern const unsigned long hugetlb_zero, hugetlb_infinity; 32extern const unsigned long hugetlb_zero, hugetlb_infinity;
@@ -99,6 +101,7 @@ static inline unsigned long hugetlb_total_pages(void)
99 do { } while (0) 101 do { } while (0)
100#define alloc_huge_page() ({ NULL; }) 102#define alloc_huge_page() ({ NULL; })
101#define free_huge_page(p) ({ (void)(p); BUG(); }) 103#define free_huge_page(p) ({ (void)(p); BUG(); })
104#define hugetlb_fault(mm, vma, addr, write) ({ BUG(); 0; })
102 105
103#ifndef HPAGE_MASK 106#ifndef HPAGE_MASK
104#define HPAGE_MASK 0 /* Keep the compiler happy */ 107#define HPAGE_MASK 0 /* Keep the compiler happy */
diff --git a/include/linux/list.h b/include/linux/list.h
index e6ec59682274..084971f333fe 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -442,12 +442,14 @@ static inline void list_splice_init(struct list_head *list,
442 * as long as the traversal is guarded by rcu_read_lock(). 442 * as long as the traversal is guarded by rcu_read_lock().
443 */ 443 */
444#define list_for_each_rcu(pos, head) \ 444#define list_for_each_rcu(pos, head) \
445 for (pos = (head)->next; prefetch(pos->next), pos != (head); \ 445 for (pos = (head)->next; \
446 pos = rcu_dereference(pos->next)) 446 prefetch(rcu_dereference(pos)->next), pos != (head); \
447 pos = pos->next)
447 448
448#define __list_for_each_rcu(pos, head) \ 449#define __list_for_each_rcu(pos, head) \
449 for (pos = (head)->next; pos != (head); \ 450 for (pos = (head)->next; \
450 pos = rcu_dereference(pos->next)) 451 rcu_dereference(pos) != (head); \
452 pos = pos->next)
451 453
452/** 454/**
453 * list_for_each_safe_rcu - iterate over an rcu-protected list safe 455 * list_for_each_safe_rcu - iterate over an rcu-protected list safe
@@ -461,8 +463,9 @@ static inline void list_splice_init(struct list_head *list,
461 * as long as the traversal is guarded by rcu_read_lock(). 463 * as long as the traversal is guarded by rcu_read_lock().
462 */ 464 */
463#define list_for_each_safe_rcu(pos, n, head) \ 465#define list_for_each_safe_rcu(pos, n, head) \
464 for (pos = (head)->next, n = pos->next; pos != (head); \ 466 for (pos = (head)->next; \
465 pos = rcu_dereference(n), n = pos->next) 467 n = rcu_dereference(pos)->next, pos != (head); \
468 pos = n)
466 469
467/** 470/**
468 * list_for_each_entry_rcu - iterate over rcu list of given type 471 * list_for_each_entry_rcu - iterate over rcu list of given type
@@ -474,11 +477,11 @@ static inline void list_splice_init(struct list_head *list,
474 * the _rcu list-mutation primitives such as list_add_rcu() 477 * the _rcu list-mutation primitives such as list_add_rcu()
475 * as long as the traversal is guarded by rcu_read_lock(). 478 * as long as the traversal is guarded by rcu_read_lock().
476 */ 479 */
477#define list_for_each_entry_rcu(pos, head, member) \ 480#define list_for_each_entry_rcu(pos, head, member) \
478 for (pos = list_entry((head)->next, typeof(*pos), member); \ 481 for (pos = list_entry((head)->next, typeof(*pos), member); \
479 prefetch(pos->member.next), &pos->member != (head); \ 482 prefetch(rcu_dereference(pos)->member.next), \
480 pos = rcu_dereference(list_entry(pos->member.next, \ 483 &pos->member != (head); \
481 typeof(*pos), member))) 484 pos = list_entry(pos->member.next, typeof(*pos), member))
482 485
483 486
484/** 487/**
@@ -492,8 +495,9 @@ static inline void list_splice_init(struct list_head *list,
492 * as long as the traversal is guarded by rcu_read_lock(). 495 * as long as the traversal is guarded by rcu_read_lock().
493 */ 496 */
494#define list_for_each_continue_rcu(pos, head) \ 497#define list_for_each_continue_rcu(pos, head) \
495 for ((pos) = (pos)->next; prefetch((pos)->next), (pos) != (head); \ 498 for ((pos) = (pos)->next; \
496 (pos) = rcu_dereference((pos)->next)) 499 prefetch(rcu_dereference((pos))->next), (pos) != (head); \
500 (pos) = (pos)->next)
497 501
498/* 502/*
499 * Double linked lists with a single pointer list head. 503 * Double linked lists with a single pointer list head.
@@ -696,8 +700,9 @@ static inline void hlist_add_after_rcu(struct hlist_node *prev,
696 pos = n) 700 pos = n)
697 701
698#define hlist_for_each_rcu(pos, head) \ 702#define hlist_for_each_rcu(pos, head) \
699 for ((pos) = (head)->first; pos && ({ prefetch((pos)->next); 1; }); \ 703 for ((pos) = (head)->first; \
700 (pos) = rcu_dereference((pos)->next)) 704 rcu_dereference((pos)) && ({ prefetch((pos)->next); 1; }); \
705 (pos) = (pos)->next)
701 706
702/** 707/**
703 * hlist_for_each_entry - iterate over list of given type 708 * hlist_for_each_entry - iterate over list of given type
@@ -762,9 +767,9 @@ static inline void hlist_add_after_rcu(struct hlist_node *prev,
762 */ 767 */
763#define hlist_for_each_entry_rcu(tpos, pos, head, member) \ 768#define hlist_for_each_entry_rcu(tpos, pos, head, member) \
764 for (pos = (head)->first; \ 769 for (pos = (head)->first; \
765 pos && ({ prefetch(pos->next); 1;}) && \ 770 rcu_dereference(pos) && ({ prefetch(pos->next); 1;}) && \
766 ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \ 771 ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \
767 pos = rcu_dereference(pos->next)) 772 pos = pos->next)
768 773
769#else 774#else
770#warning "don't include kernel headers in userspace" 775#warning "don't include kernel headers in userspace"
diff --git a/include/linux/netfilter/nfnetlink.h b/include/linux/netfilter/nfnetlink.h
index 1d5b10ae2399..f08e870100f4 100644
--- a/include/linux/netfilter/nfnetlink.h
+++ b/include/linux/netfilter/nfnetlink.h
@@ -41,11 +41,15 @@ enum nfnetlink_groups {
41struct nfattr 41struct nfattr
42{ 42{
43 u_int16_t nfa_len; 43 u_int16_t nfa_len;
44 u_int16_t nfa_type; 44 u_int16_t nfa_type; /* we use 15 bits for the type, and the highest
45 * bit to indicate whether the payload is nested */
45} __attribute__ ((packed)); 46} __attribute__ ((packed));
46 47
47/* FIXME: Shamelessly copy and pasted from rtnetlink.h, it's time 48/* FIXME: Apart from NFNL_NFA_NESTED shamelessly copy and pasted from
48 * to put this in a generic file */ 49 * rtnetlink.h, it's time to put this in a generic file */
50
51#define NFNL_NFA_NEST 0x8000
52#define NFA_TYPE(attr) ((attr)->nfa_type & 0x7fff)
49 53
50#define NFA_ALIGNTO 4 54#define NFA_ALIGNTO 4
51#define NFA_ALIGN(len) (((len) + NFA_ALIGNTO - 1) & ~(NFA_ALIGNTO - 1)) 55#define NFA_ALIGN(len) (((len) + NFA_ALIGNTO - 1) & ~(NFA_ALIGNTO - 1))
@@ -59,7 +63,7 @@ struct nfattr
59#define NFA_PAYLOAD(nfa) ((int)((nfa)->nfa_len) - NFA_LENGTH(0)) 63#define NFA_PAYLOAD(nfa) ((int)((nfa)->nfa_len) - NFA_LENGTH(0))
60#define NFA_NEST(skb, type) \ 64#define NFA_NEST(skb, type) \
61({ struct nfattr *__start = (struct nfattr *) (skb)->tail; \ 65({ struct nfattr *__start = (struct nfattr *) (skb)->tail; \
62 NFA_PUT(skb, type, 0, NULL); \ 66 NFA_PUT(skb, (NFNL_NFA_NEST | type), 0, NULL); \
63 __start; }) 67 __start; })
64#define NFA_NEST_END(skb, start) \ 68#define NFA_NEST_END(skb, start) \
65({ (start)->nfa_len = ((skb)->tail - (unsigned char *) (start)); \ 69({ (start)->nfa_len = ((skb)->tail - (unsigned char *) (start)); \
diff --git a/include/linux/netfilter/nfnetlink_conntrack.h b/include/linux/netfilter/nfnetlink_conntrack.h
index 5c55751c78e4..116fcaced909 100644
--- a/include/linux/netfilter/nfnetlink_conntrack.h
+++ b/include/linux/netfilter/nfnetlink_conntrack.h
@@ -70,15 +70,24 @@ enum ctattr_l4proto {
70 70
71enum ctattr_protoinfo { 71enum ctattr_protoinfo {
72 CTA_PROTOINFO_UNSPEC, 72 CTA_PROTOINFO_UNSPEC,
73 CTA_PROTOINFO_TCP_STATE, 73 CTA_PROTOINFO_TCP,
74 __CTA_PROTOINFO_MAX 74 __CTA_PROTOINFO_MAX
75}; 75};
76#define CTA_PROTOINFO_MAX (__CTA_PROTOINFO_MAX - 1) 76#define CTA_PROTOINFO_MAX (__CTA_PROTOINFO_MAX - 1)
77 77
78enum ctattr_protoinfo_tcp {
79 CTA_PROTOINFO_TCP_UNSPEC,
80 CTA_PROTOINFO_TCP_STATE,
81 __CTA_PROTOINFO_TCP_MAX
82};
83#define CTA_PROTOINFO_TCP_MAX (__CTA_PROTOINFO_TCP_MAX - 1)
84
78enum ctattr_counters { 85enum ctattr_counters {
79 CTA_COUNTERS_UNSPEC, 86 CTA_COUNTERS_UNSPEC,
80 CTA_COUNTERS_PACKETS, 87 CTA_COUNTERS_PACKETS, /* old 64bit counters */
81 CTA_COUNTERS_BYTES, 88 CTA_COUNTERS_BYTES, /* old 64bit counters */
89 CTA_COUNTERS32_PACKETS,
90 CTA_COUNTERS32_BYTES,
82 __CTA_COUNTERS_MAX 91 __CTA_COUNTERS_MAX
83}; 92};
84#define CTA_COUNTERS_MAX (__CTA_COUNTERS_MAX - 1) 93#define CTA_COUNTERS_MAX (__CTA_COUNTERS_MAX - 1)
diff --git a/include/linux/netfilter_ipv4/ip_conntrack.h b/include/linux/netfilter_ipv4/ip_conntrack.h
index 4ced38736813..d078bb91d9e5 100644
--- a/include/linux/netfilter_ipv4/ip_conntrack.h
+++ b/include/linux/netfilter_ipv4/ip_conntrack.h
@@ -117,6 +117,10 @@ enum ip_conntrack_events
117 /* NAT info */ 117 /* NAT info */
118 IPCT_NATINFO_BIT = 10, 118 IPCT_NATINFO_BIT = 10,
119 IPCT_NATINFO = (1 << IPCT_NATINFO_BIT), 119 IPCT_NATINFO = (1 << IPCT_NATINFO_BIT),
120
121 /* Counter highest bit has been set */
122 IPCT_COUNTER_FILLING_BIT = 11,
123 IPCT_COUNTER_FILLING = (1 << IPCT_COUNTER_FILLING_BIT),
120}; 124};
121 125
122enum ip_conntrack_expect_events { 126enum ip_conntrack_expect_events {
@@ -192,8 +196,8 @@ do { \
192 196
193struct ip_conntrack_counter 197struct ip_conntrack_counter
194{ 198{
195 u_int64_t packets; 199 u_int32_t packets;
196 u_int64_t bytes; 200 u_int32_t bytes;
197}; 201};
198 202
199struct ip_conntrack_helper; 203struct ip_conntrack_helper;
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_protocol.h b/include/linux/netfilter_ipv4/ip_conntrack_protocol.h
index b6b99be8632a..2c76b879e3dc 100644
--- a/include/linux/netfilter_ipv4/ip_conntrack_protocol.h
+++ b/include/linux/netfilter_ipv4/ip_conntrack_protocol.h
@@ -52,6 +52,9 @@ struct ip_conntrack_protocol
52 int (*to_nfattr)(struct sk_buff *skb, struct nfattr *nfa, 52 int (*to_nfattr)(struct sk_buff *skb, struct nfattr *nfa,
53 const struct ip_conntrack *ct); 53 const struct ip_conntrack *ct);
54 54
55 /* convert nfnetlink attributes to protoinfo */
56 int (*from_nfattr)(struct nfattr *tb[], struct ip_conntrack *ct);
57
55 int (*tuple_to_nfattr)(struct sk_buff *skb, 58 int (*tuple_to_nfattr)(struct sk_buff *skb,
56 const struct ip_conntrack_tuple *t); 59 const struct ip_conntrack_tuple *t);
57 int (*nfattr_to_tuple)(struct nfattr *tb[], 60 int (*nfattr_to_tuple)(struct nfattr *tb[],
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_tuple.h b/include/linux/netfilter_ipv4/ip_conntrack_tuple.h
index 20e43f018b7c..3232db11a4e5 100644
--- a/include/linux/netfilter_ipv4/ip_conntrack_tuple.h
+++ b/include/linux/netfilter_ipv4/ip_conntrack_tuple.h
@@ -1,6 +1,8 @@
1#ifndef _IP_CONNTRACK_TUPLE_H 1#ifndef _IP_CONNTRACK_TUPLE_H
2#define _IP_CONNTRACK_TUPLE_H 2#define _IP_CONNTRACK_TUPLE_H
3 3
4#include <linux/types.h>
5
4/* A `tuple' is a structure containing the information to uniquely 6/* A `tuple' is a structure containing the information to uniquely
5 identify a connection. ie. if two packets have the same tuple, they 7 identify a connection. ie. if two packets have the same tuple, they
6 are in the same connection; if not, they are not. 8 are in the same connection; if not, they are not.
diff --git a/include/linux/netfilter_ipv4/ip_nat.h b/include/linux/netfilter_ipv4/ip_nat.h
index e201ec6e9905..41a107de17cf 100644
--- a/include/linux/netfilter_ipv4/ip_nat.h
+++ b/include/linux/netfilter_ipv4/ip_nat.h
@@ -58,10 +58,6 @@ extern rwlock_t ip_nat_lock;
58struct ip_nat_info 58struct ip_nat_info
59{ 59{
60 struct list_head bysource; 60 struct list_head bysource;
61
62 /* Helper (NULL if none). */
63 struct ip_nat_helper *helper;
64
65 struct ip_nat_seq seq[IP_CT_DIR_MAX]; 61 struct ip_nat_seq seq[IP_CT_DIR_MAX];
66}; 62};
67 63
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h
index 5ade54a78dbb..ca5a8733000f 100644
--- a/include/linux/netpoll.h
+++ b/include/linux/netpoll.h
@@ -86,7 +86,7 @@ static inline void netpoll_poll_unlock(void *have)
86 86
87#else 87#else
88#define netpoll_rx(a) 0 88#define netpoll_rx(a) 0
89#define netpoll_poll_lock(a) 0 89#define netpoll_poll_lock(a) NULL
90#define netpoll_poll_unlock(a) 90#define netpoll_poll_unlock(a)
91#endif 91#endif
92 92
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 4e65eb44adfd..70191a5a148f 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -94,6 +94,7 @@ struct rcu_data {
94 long batch; /* Batch # for current RCU batch */ 94 long batch; /* Batch # for current RCU batch */
95 struct rcu_head *nxtlist; 95 struct rcu_head *nxtlist;
96 struct rcu_head **nxttail; 96 struct rcu_head **nxttail;
97 long count; /* # of queued items */
97 struct rcu_head *curlist; 98 struct rcu_head *curlist;
98 struct rcu_head **curtail; 99 struct rcu_head **curtail;
99 struct rcu_head *donelist; 100 struct rcu_head *donelist;
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h
index 4ade56ef3a4d..28f7b2103505 100644
--- a/include/net/inet_timewait_sock.h
+++ b/include/net/inet_timewait_sock.h
@@ -19,6 +19,7 @@
19 19
20#include <linux/ip.h> 20#include <linux/ip.h>
21#include <linux/list.h> 21#include <linux/list.h>
22#include <linux/module.h>
22#include <linux/timer.h> 23#include <linux/timer.h>
23#include <linux/types.h> 24#include <linux/types.h>
24#include <linux/workqueue.h> 25#include <linux/workqueue.h>
@@ -193,11 +194,13 @@ static inline u32 inet_rcv_saddr(const struct sock *sk)
193static inline void inet_twsk_put(struct inet_timewait_sock *tw) 194static inline void inet_twsk_put(struct inet_timewait_sock *tw)
194{ 195{
195 if (atomic_dec_and_test(&tw->tw_refcnt)) { 196 if (atomic_dec_and_test(&tw->tw_refcnt)) {
197 struct module *owner = tw->tw_prot->owner;
196#ifdef SOCK_REFCNT_DEBUG 198#ifdef SOCK_REFCNT_DEBUG
197 printk(KERN_DEBUG "%s timewait_sock %p released\n", 199 printk(KERN_DEBUG "%s timewait_sock %p released\n",
198 tw->tw_prot->name, tw); 200 tw->tw_prot->name, tw);
199#endif 201#endif
200 kmem_cache_free(tw->tw_prot->twsk_slab, tw); 202 kmem_cache_free(tw->tw_prot->twsk_slab, tw);
203 module_put(owner);
201 } 204 }
202} 205}
203 206
diff --git a/kernel/exit.c b/kernel/exit.c
index 43077732619b..3b25b182d2be 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -843,6 +843,7 @@ fastcall NORET_TYPE void do_exit(long code)
843 group_dead = atomic_dec_and_test(&tsk->signal->live); 843 group_dead = atomic_dec_and_test(&tsk->signal->live);
844 if (group_dead) { 844 if (group_dead) {
845 del_timer_sync(&tsk->signal->real_timer); 845 del_timer_sync(&tsk->signal->real_timer);
846 exit_itimers(tsk->signal);
846 acct_process(code); 847 acct_process(code);
847 } 848 }
848 exit_mm(tsk); 849 exit_mm(tsk);
diff --git a/kernel/fork.c b/kernel/fork.c
index 533ce27f4b2c..280bd44ac441 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -848,7 +848,7 @@ static inline void copy_flags(unsigned long clone_flags, struct task_struct *p)
848{ 848{
849 unsigned long new_flags = p->flags; 849 unsigned long new_flags = p->flags;
850 850
851 new_flags &= ~PF_SUPERPRIV; 851 new_flags &= ~(PF_SUPERPRIV | PF_NOFREEZE);
852 new_flags |= PF_FORKNOEXEC; 852 new_flags |= PF_FORKNOEXEC;
853 if (!(clone_flags & CLONE_PTRACE)) 853 if (!(clone_flags & CLONE_PTRACE))
854 p->ptrace = 0; 854 p->ptrace = 0;
diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c
index ad85d3f0dcc4..7a51a5597c33 100644
--- a/kernel/posix-cpu-timers.c
+++ b/kernel/posix-cpu-timers.c
@@ -424,6 +424,7 @@ static void cleanup_timers(struct list_head *head,
424 cputime_t ptime = cputime_add(utime, stime); 424 cputime_t ptime = cputime_add(utime, stime);
425 425
426 list_for_each_entry_safe(timer, next, head, entry) { 426 list_for_each_entry_safe(timer, next, head, entry) {
427 put_task_struct(timer->task);
427 timer->task = NULL; 428 timer->task = NULL;
428 list_del_init(&timer->entry); 429 list_del_init(&timer->entry);
429 if (cputime_lt(timer->expires.cpu, ptime)) { 430 if (cputime_lt(timer->expires.cpu, ptime)) {
@@ -436,6 +437,7 @@ static void cleanup_timers(struct list_head *head,
436 437
437 ++head; 438 ++head;
438 list_for_each_entry_safe(timer, next, head, entry) { 439 list_for_each_entry_safe(timer, next, head, entry) {
440 put_task_struct(timer->task);
439 timer->task = NULL; 441 timer->task = NULL;
440 list_del_init(&timer->entry); 442 list_del_init(&timer->entry);
441 if (cputime_lt(timer->expires.cpu, utime)) { 443 if (cputime_lt(timer->expires.cpu, utime)) {
@@ -448,6 +450,7 @@ static void cleanup_timers(struct list_head *head,
448 450
449 ++head; 451 ++head;
450 list_for_each_entry_safe(timer, next, head, entry) { 452 list_for_each_entry_safe(timer, next, head, entry) {
453 put_task_struct(timer->task);
451 timer->task = NULL; 454 timer->task = NULL;
452 list_del_init(&timer->entry); 455 list_del_init(&timer->entry);
453 if (timer->expires.sched < sched_time) { 456 if (timer->expires.sched < sched_time) {
diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c
index b7b532acd9fc..dda3cda73c77 100644
--- a/kernel/posix-timers.c
+++ b/kernel/posix-timers.c
@@ -1157,7 +1157,7 @@ retry_delete:
1157} 1157}
1158 1158
1159/* 1159/*
1160 * This is called by __exit_signal, only when there are no more 1160 * This is called by do_exit or de_thread, only when there are no more
1161 * references to the shared signal_struct. 1161 * references to the shared signal_struct.
1162 */ 1162 */
1163void exit_itimers(struct signal_struct *sig) 1163void exit_itimers(struct signal_struct *sig)
diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c
index bef3b6901b76..2559d4b8f23f 100644
--- a/kernel/rcupdate.c
+++ b/kernel/rcupdate.c
@@ -71,7 +71,7 @@ DEFINE_PER_CPU(struct rcu_data, rcu_bh_data) = { 0L };
71 71
72/* Fake initialization required by compiler */ 72/* Fake initialization required by compiler */
73static DEFINE_PER_CPU(struct tasklet_struct, rcu_tasklet) = {NULL}; 73static DEFINE_PER_CPU(struct tasklet_struct, rcu_tasklet) = {NULL};
74static int maxbatch = 10; 74static int maxbatch = 10000;
75 75
76#ifndef __HAVE_ARCH_CMPXCHG 76#ifndef __HAVE_ARCH_CMPXCHG
77/* 77/*
@@ -109,6 +109,10 @@ void fastcall call_rcu(struct rcu_head *head,
109 rdp = &__get_cpu_var(rcu_data); 109 rdp = &__get_cpu_var(rcu_data);
110 *rdp->nxttail = head; 110 *rdp->nxttail = head;
111 rdp->nxttail = &head->next; 111 rdp->nxttail = &head->next;
112
113 if (unlikely(++rdp->count > 10000))
114 set_need_resched();
115
112 local_irq_restore(flags); 116 local_irq_restore(flags);
113} 117}
114 118
@@ -140,6 +144,12 @@ void fastcall call_rcu_bh(struct rcu_head *head,
140 rdp = &__get_cpu_var(rcu_bh_data); 144 rdp = &__get_cpu_var(rcu_bh_data);
141 *rdp->nxttail = head; 145 *rdp->nxttail = head;
142 rdp->nxttail = &head->next; 146 rdp->nxttail = &head->next;
147 rdp->count++;
148/*
149 * Should we directly call rcu_do_batch() here ?
150 * if (unlikely(rdp->count > 10000))
151 * rcu_do_batch(rdp);
152 */
143 local_irq_restore(flags); 153 local_irq_restore(flags);
144} 154}
145 155
@@ -157,6 +167,7 @@ static void rcu_do_batch(struct rcu_data *rdp)
157 next = rdp->donelist = list->next; 167 next = rdp->donelist = list->next;
158 list->func(list); 168 list->func(list);
159 list = next; 169 list = next;
170 rdp->count--;
160 if (++count >= maxbatch) 171 if (++count >= maxbatch)
161 break; 172 break;
162 } 173 }
diff --git a/kernel/signal.c b/kernel/signal.c
index 50c992643771..f2b96b08fb44 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -397,20 +397,8 @@ void __exit_signal(struct task_struct *tsk)
397 flush_sigqueue(&tsk->pending); 397 flush_sigqueue(&tsk->pending);
398 if (sig) { 398 if (sig) {
399 /* 399 /*
400 * We are cleaning up the signal_struct here. We delayed 400 * We are cleaning up the signal_struct here.
401 * calling exit_itimers until after flush_sigqueue, just in
402 * case our thread-local pending queue contained a queued
403 * timer signal that would have been cleared in
404 * exit_itimers. When that called sigqueue_free, it would
405 * attempt to re-take the tasklist_lock and deadlock. This
406 * can never happen if we ensure that all queues the
407 * timer's signal might be queued on have been flushed
408 * first. The shared_pending queue, and our own pending
409 * queue are the only queues the timer could be on, since
410 * there are no other threads left in the group and timer
411 * signals are constrained to threads inside the group.
412 */ 401 */
413 exit_itimers(sig);
414 exit_thread_group_keys(sig); 402 exit_thread_group_keys(sig);
415 kmem_cache_free(signal_cachep, sig); 403 kmem_cache_free(signal_cachep, sig);
416 } 404 }
diff --git a/kernel/time.c b/kernel/time.c
index dd5ae1162a8f..40c2410ac99a 100644
--- a/kernel/time.c
+++ b/kernel/time.c
@@ -570,6 +570,7 @@ void getnstimeofday(struct timespec *tv)
570 tv->tv_sec = x.tv_sec; 570 tv->tv_sec = x.tv_sec;
571 tv->tv_nsec = x.tv_usec * NSEC_PER_USEC; 571 tv->tv_nsec = x.tv_usec * NSEC_PER_USEC;
572} 572}
573EXPORT_SYMBOL_GPL(getnstimeofday);
573#endif 574#endif
574 575
575#if (BITS_PER_LONG < 64) 576#if (BITS_PER_LONG < 64)
diff --git a/lib/.gitignore b/lib/.gitignore
new file mode 100644
index 000000000000..3bef1ea94c99
--- /dev/null
+++ b/lib/.gitignore
@@ -0,0 +1,6 @@
1#
2# Generated files
3#
4gen_crc32table
5crc32table.h
6
diff --git a/mm/bootmem.c b/mm/bootmem.c
index c1330cc19783..a58699b6579e 100644
--- a/mm/bootmem.c
+++ b/mm/bootmem.c
@@ -154,10 +154,10 @@ static void __init free_bootmem_core(bootmem_data_t *bdata, unsigned long addr,
154 */ 154 */
155static void * __init 155static void * __init
156__alloc_bootmem_core(struct bootmem_data *bdata, unsigned long size, 156__alloc_bootmem_core(struct bootmem_data *bdata, unsigned long size,
157 unsigned long align, unsigned long goal) 157 unsigned long align, unsigned long goal, unsigned long limit)
158{ 158{
159 unsigned long offset, remaining_size, areasize, preferred; 159 unsigned long offset, remaining_size, areasize, preferred;
160 unsigned long i, start = 0, incr, eidx; 160 unsigned long i, start = 0, incr, eidx, end_pfn = bdata->node_low_pfn;
161 void *ret; 161 void *ret;
162 162
163 if(!size) { 163 if(!size) {
@@ -166,7 +166,14 @@ __alloc_bootmem_core(struct bootmem_data *bdata, unsigned long size,
166 } 166 }
167 BUG_ON(align & (align-1)); 167 BUG_ON(align & (align-1));
168 168
169 eidx = bdata->node_low_pfn - (bdata->node_boot_start >> PAGE_SHIFT); 169 if (limit && bdata->node_boot_start >= limit)
170 return NULL;
171
172 limit >>=PAGE_SHIFT;
173 if (limit && end_pfn > limit)
174 end_pfn = limit;
175
176 eidx = end_pfn - (bdata->node_boot_start >> PAGE_SHIFT);
170 offset = 0; 177 offset = 0;
171 if (align && 178 if (align &&
172 (bdata->node_boot_start & (align - 1UL)) != 0) 179 (bdata->node_boot_start & (align - 1UL)) != 0)
@@ -178,11 +185,12 @@ __alloc_bootmem_core(struct bootmem_data *bdata, unsigned long size,
178 * first, then we try to allocate lower pages. 185 * first, then we try to allocate lower pages.
179 */ 186 */
180 if (goal && (goal >= bdata->node_boot_start) && 187 if (goal && (goal >= bdata->node_boot_start) &&
181 ((goal >> PAGE_SHIFT) < bdata->node_low_pfn)) { 188 ((goal >> PAGE_SHIFT) < end_pfn)) {
182 preferred = goal - bdata->node_boot_start; 189 preferred = goal - bdata->node_boot_start;
183 190
184 if (bdata->last_success >= preferred) 191 if (bdata->last_success >= preferred)
185 preferred = bdata->last_success; 192 if (!limit || (limit && limit > bdata->last_success))
193 preferred = bdata->last_success;
186 } else 194 } else
187 preferred = 0; 195 preferred = 0;
188 196
@@ -382,14 +390,15 @@ unsigned long __init free_all_bootmem (void)
382 return(free_all_bootmem_core(NODE_DATA(0))); 390 return(free_all_bootmem_core(NODE_DATA(0)));
383} 391}
384 392
385void * __init __alloc_bootmem (unsigned long size, unsigned long align, unsigned long goal) 393void * __init __alloc_bootmem_limit (unsigned long size, unsigned long align, unsigned long goal,
394 unsigned long limit)
386{ 395{
387 pg_data_t *pgdat = pgdat_list; 396 pg_data_t *pgdat = pgdat_list;
388 void *ptr; 397 void *ptr;
389 398
390 for_each_pgdat(pgdat) 399 for_each_pgdat(pgdat)
391 if ((ptr = __alloc_bootmem_core(pgdat->bdata, size, 400 if ((ptr = __alloc_bootmem_core(pgdat->bdata, size,
392 align, goal))) 401 align, goal, limit)))
393 return(ptr); 402 return(ptr);
394 403
395 /* 404 /*
@@ -400,14 +409,16 @@ void * __init __alloc_bootmem (unsigned long size, unsigned long align, unsigned
400 return NULL; 409 return NULL;
401} 410}
402 411
403void * __init __alloc_bootmem_node (pg_data_t *pgdat, unsigned long size, unsigned long align, unsigned long goal) 412
413void * __init __alloc_bootmem_node_limit (pg_data_t *pgdat, unsigned long size, unsigned long align,
414 unsigned long goal, unsigned long limit)
404{ 415{
405 void *ptr; 416 void *ptr;
406 417
407 ptr = __alloc_bootmem_core(pgdat->bdata, size, align, goal); 418 ptr = __alloc_bootmem_core(pgdat->bdata, size, align, goal, limit);
408 if (ptr) 419 if (ptr)
409 return (ptr); 420 return (ptr);
410 421
411 return __alloc_bootmem(size, align, goal); 422 return __alloc_bootmem_limit(size, align, goal, limit);
412} 423}
413 424
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 901ac523a1c3..61d380678030 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -274,21 +274,22 @@ int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src,
274{ 274{
275 pte_t *src_pte, *dst_pte, entry; 275 pte_t *src_pte, *dst_pte, entry;
276 struct page *ptepage; 276 struct page *ptepage;
277 unsigned long addr = vma->vm_start; 277 unsigned long addr;
278 unsigned long end = vma->vm_end;
279 278
280 while (addr < end) { 279 for (addr = vma->vm_start; addr < vma->vm_end; addr += HPAGE_SIZE) {
281 dst_pte = huge_pte_alloc(dst, addr); 280 dst_pte = huge_pte_alloc(dst, addr);
282 if (!dst_pte) 281 if (!dst_pte)
283 goto nomem; 282 goto nomem;
283 spin_lock(&src->page_table_lock);
284 src_pte = huge_pte_offset(src, addr); 284 src_pte = huge_pte_offset(src, addr);
285 BUG_ON(!src_pte || pte_none(*src_pte)); /* prefaulted */ 285 if (src_pte && !pte_none(*src_pte)) {
286 entry = *src_pte; 286 entry = *src_pte;
287 ptepage = pte_page(entry); 287 ptepage = pte_page(entry);
288 get_page(ptepage); 288 get_page(ptepage);
289 add_mm_counter(dst, rss, HPAGE_SIZE / PAGE_SIZE); 289 add_mm_counter(dst, rss, HPAGE_SIZE / PAGE_SIZE);
290 set_huge_pte_at(dst, addr, dst_pte, entry); 290 set_huge_pte_at(dst, addr, dst_pte, entry);
291 addr += HPAGE_SIZE; 291 }
292 spin_unlock(&src->page_table_lock);
292 } 293 }
293 return 0; 294 return 0;
294 295
@@ -323,8 +324,8 @@ void unmap_hugepage_range(struct vm_area_struct *vma, unsigned long start,
323 324
324 page = pte_page(pte); 325 page = pte_page(pte);
325 put_page(page); 326 put_page(page);
327 add_mm_counter(mm, rss, - (HPAGE_SIZE / PAGE_SIZE));
326 } 328 }
327 add_mm_counter(mm, rss, -((end - start) >> PAGE_SHIFT));
328 flush_tlb_range(vma, start, end); 329 flush_tlb_range(vma, start, end);
329} 330}
330 331
@@ -393,6 +394,28 @@ out:
393 return ret; 394 return ret;
394} 395}
395 396
397/*
398 * On ia64 at least, it is possible to receive a hugetlb fault from a
399 * stale zero entry left in the TLB from earlier hardware prefetching.
400 * Low-level arch code should already have flushed the stale entry as
401 * part of its fault handling, but we do need to accept this minor fault
402 * and return successfully. Whereas the "normal" case is that this is
403 * an access to a hugetlb page which has been truncated off since mmap.
404 */
405int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
406 unsigned long address, int write_access)
407{
408 int ret = VM_FAULT_SIGBUS;
409 pte_t *pte;
410
411 spin_lock(&mm->page_table_lock);
412 pte = huge_pte_offset(mm, address);
413 if (pte && !pte_none(*pte))
414 ret = VM_FAULT_MINOR;
415 spin_unlock(&mm->page_table_lock);
416 return ret;
417}
418
396int follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma, 419int follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma,
397 struct page **pages, struct vm_area_struct **vmas, 420 struct page **pages, struct vm_area_struct **vmas,
398 unsigned long *position, int *length, int i) 421 unsigned long *position, int *length, int i)
@@ -403,6 +426,7 @@ int follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma,
403 BUG_ON(!is_vm_hugetlb_page(vma)); 426 BUG_ON(!is_vm_hugetlb_page(vma));
404 427
405 vpfn = vaddr/PAGE_SIZE; 428 vpfn = vaddr/PAGE_SIZE;
429 spin_lock(&mm->page_table_lock);
406 while (vaddr < vma->vm_end && remainder) { 430 while (vaddr < vma->vm_end && remainder) {
407 431
408 if (pages) { 432 if (pages) {
@@ -415,8 +439,13 @@ int follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma,
415 * indexing below to work. */ 439 * indexing below to work. */
416 pte = huge_pte_offset(mm, vaddr & HPAGE_MASK); 440 pte = huge_pte_offset(mm, vaddr & HPAGE_MASK);
417 441
418 /* hugetlb should be locked, and hence, prefaulted */ 442 /* the hugetlb file might have been truncated */
419 WARN_ON(!pte || pte_none(*pte)); 443 if (!pte || pte_none(*pte)) {
444 remainder = 0;
445 if (!i)
446 i = -EFAULT;
447 break;
448 }
420 449
421 page = &pte_page(*pte)[vpfn % (HPAGE_SIZE/PAGE_SIZE)]; 450 page = &pte_page(*pte)[vpfn % (HPAGE_SIZE/PAGE_SIZE)];
422 451
@@ -434,7 +463,7 @@ int follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma,
434 --remainder; 463 --remainder;
435 ++i; 464 ++i;
436 } 465 }
437 466 spin_unlock(&mm->page_table_lock);
438 *length = remainder; 467 *length = remainder;
439 *position = vaddr; 468 *position = vaddr;
440 469
diff --git a/mm/memory.c b/mm/memory.c
index ae8161f1f459..1db40e935e55 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2045,8 +2045,8 @@ int __handle_mm_fault(struct mm_struct *mm, struct vm_area_struct * vma,
2045 2045
2046 inc_page_state(pgfault); 2046 inc_page_state(pgfault);
2047 2047
2048 if (is_vm_hugetlb_page(vma)) 2048 if (unlikely(is_vm_hugetlb_page(vma)))
2049 return VM_FAULT_SIGBUS; /* mapping truncation does this. */ 2049 return hugetlb_fault(mm, vma, address, write_access);
2050 2050
2051 /* 2051 /*
2052 * We need the page table lock to synchronize with kswapd 2052 * We need the page table lock to synchronize with kswapd
diff --git a/mm/vmscan.c b/mm/vmscan.c
index 0ea71e887bb6..64f9570cff56 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -511,10 +511,11 @@ static int shrink_list(struct list_head *page_list, struct scan_control *sc)
511 * PageDirty _after_ making sure that the page is freeable and 511 * PageDirty _after_ making sure that the page is freeable and
512 * not in use by anybody. (pagecache + us == 2) 512 * not in use by anybody. (pagecache + us == 2)
513 */ 513 */
514 if (page_count(page) != 2 || PageDirty(page)) { 514 if (unlikely(page_count(page) != 2))
515 write_unlock_irq(&mapping->tree_lock); 515 goto cannot_free;
516 goto keep_locked; 516 smp_rmb();
517 } 517 if (unlikely(PageDirty(page)))
518 goto cannot_free;
518 519
519#ifdef CONFIG_SWAP 520#ifdef CONFIG_SWAP
520 if (PageSwapCache(page)) { 521 if (PageSwapCache(page)) {
@@ -538,6 +539,10 @@ free_it:
538 __pagevec_release_nonlru(&freed_pvec); 539 __pagevec_release_nonlru(&freed_pvec);
539 continue; 540 continue;
540 541
542cannot_free:
543 write_unlock_irq(&mapping->tree_lock);
544 goto keep_locked;
545
541activate_locked: 546activate_locked:
542 SetPageActive(page); 547 SetPageActive(page);
543 pgactivate++; 548 pgactivate++;
diff --git a/net/bridge/br_if.c b/net/bridge/br_if.c
index 91bb895375f4..defcf6a8607c 100644
--- a/net/bridge/br_if.c
+++ b/net/bridge/br_if.c
@@ -79,7 +79,6 @@ static void destroy_nbp(struct net_bridge_port *p)
79{ 79{
80 struct net_device *dev = p->dev; 80 struct net_device *dev = p->dev;
81 81
82 dev->br_port = NULL;
83 p->br = NULL; 82 p->br = NULL;
84 p->dev = NULL; 83 p->dev = NULL;
85 dev_put(dev); 84 dev_put(dev);
@@ -100,6 +99,7 @@ static void del_nbp(struct net_bridge_port *p)
100 struct net_bridge *br = p->br; 99 struct net_bridge *br = p->br;
101 struct net_device *dev = p->dev; 100 struct net_device *dev = p->dev;
102 101
102 dev->br_port = NULL;
103 dev_set_promiscuity(dev, -1); 103 dev_set_promiscuity(dev, -1);
104 104
105 spin_lock_bh(&br->lock); 105 spin_lock_bh(&br->lock);
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
index c4540144f0f4..f8ffbf6e2333 100644
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -26,6 +26,7 @@
26#include <linux/spinlock.h> 26#include <linux/spinlock.h>
27#include <asm/uaccess.h> 27#include <asm/uaccess.h>
28#include <linux/smp.h> 28#include <linux/smp.h>
29#include <linux/cpumask.h>
29#include <net/sock.h> 30#include <net/sock.h>
30/* needed for logical [in,out]-dev filtering */ 31/* needed for logical [in,out]-dev filtering */
31#include "../br_private.h" 32#include "../br_private.h"
@@ -823,10 +824,11 @@ static int translate_table(struct ebt_replace *repl,
823 /* this will get free'd in do_replace()/ebt_register_table() 824 /* this will get free'd in do_replace()/ebt_register_table()
824 if an error occurs */ 825 if an error occurs */
825 newinfo->chainstack = (struct ebt_chainstack **) 826 newinfo->chainstack = (struct ebt_chainstack **)
826 vmalloc(num_possible_cpus() * sizeof(struct ebt_chainstack)); 827 vmalloc((highest_possible_processor_id()+1)
828 * sizeof(struct ebt_chainstack));
827 if (!newinfo->chainstack) 829 if (!newinfo->chainstack)
828 return -ENOMEM; 830 return -ENOMEM;
829 for (i = 0; i < num_possible_cpus(); i++) { 831 for_each_cpu(i) {
830 newinfo->chainstack[i] = 832 newinfo->chainstack[i] =
831 vmalloc(udc_cnt * sizeof(struct ebt_chainstack)); 833 vmalloc(udc_cnt * sizeof(struct ebt_chainstack));
832 if (!newinfo->chainstack[i]) { 834 if (!newinfo->chainstack[i]) {
@@ -895,9 +897,12 @@ static void get_counters(struct ebt_counter *oldcounters,
895 897
896 /* counters of cpu 0 */ 898 /* counters of cpu 0 */
897 memcpy(counters, oldcounters, 899 memcpy(counters, oldcounters,
898 sizeof(struct ebt_counter) * nentries); 900 sizeof(struct ebt_counter) * nentries);
901
899 /* add other counters to those of cpu 0 */ 902 /* add other counters to those of cpu 0 */
900 for (cpu = 1; cpu < num_possible_cpus(); cpu++) { 903 for_each_cpu(cpu) {
904 if (cpu == 0)
905 continue;
901 counter_base = COUNTER_BASE(oldcounters, nentries, cpu); 906 counter_base = COUNTER_BASE(oldcounters, nentries, cpu);
902 for (i = 0; i < nentries; i++) { 907 for (i = 0; i < nentries; i++) {
903 counters[i].pcnt += counter_base[i].pcnt; 908 counters[i].pcnt += counter_base[i].pcnt;
@@ -929,7 +934,8 @@ static int do_replace(void __user *user, unsigned int len)
929 BUGPRINT("Entries_size never zero\n"); 934 BUGPRINT("Entries_size never zero\n");
930 return -EINVAL; 935 return -EINVAL;
931 } 936 }
932 countersize = COUNTER_OFFSET(tmp.nentries) * num_possible_cpus(); 937 countersize = COUNTER_OFFSET(tmp.nentries) *
938 (highest_possible_processor_id()+1);
933 newinfo = (struct ebt_table_info *) 939 newinfo = (struct ebt_table_info *)
934 vmalloc(sizeof(struct ebt_table_info) + countersize); 940 vmalloc(sizeof(struct ebt_table_info) + countersize);
935 if (!newinfo) 941 if (!newinfo)
@@ -1022,7 +1028,7 @@ static int do_replace(void __user *user, unsigned int len)
1022 1028
1023 vfree(table->entries); 1029 vfree(table->entries);
1024 if (table->chainstack) { 1030 if (table->chainstack) {
1025 for (i = 0; i < num_possible_cpus(); i++) 1031 for_each_cpu(i)
1026 vfree(table->chainstack[i]); 1032 vfree(table->chainstack[i]);
1027 vfree(table->chainstack); 1033 vfree(table->chainstack);
1028 } 1034 }
@@ -1040,7 +1046,7 @@ free_counterstmp:
1040 vfree(counterstmp); 1046 vfree(counterstmp);
1041 /* can be initialized in translate_table() */ 1047 /* can be initialized in translate_table() */
1042 if (newinfo->chainstack) { 1048 if (newinfo->chainstack) {
1043 for (i = 0; i < num_possible_cpus(); i++) 1049 for_each_cpu(i)
1044 vfree(newinfo->chainstack[i]); 1050 vfree(newinfo->chainstack[i]);
1045 vfree(newinfo->chainstack); 1051 vfree(newinfo->chainstack);
1046 } 1052 }
@@ -1132,7 +1138,8 @@ int ebt_register_table(struct ebt_table *table)
1132 return -EINVAL; 1138 return -EINVAL;
1133 } 1139 }
1134 1140
1135 countersize = COUNTER_OFFSET(table->table->nentries) * num_possible_cpus(); 1141 countersize = COUNTER_OFFSET(table->table->nentries) *
1142 (highest_possible_processor_id()+1);
1136 newinfo = (struct ebt_table_info *) 1143 newinfo = (struct ebt_table_info *)
1137 vmalloc(sizeof(struct ebt_table_info) + countersize); 1144 vmalloc(sizeof(struct ebt_table_info) + countersize);
1138 ret = -ENOMEM; 1145 ret = -ENOMEM;
@@ -1186,7 +1193,7 @@ free_unlock:
1186 up(&ebt_mutex); 1193 up(&ebt_mutex);
1187free_chainstack: 1194free_chainstack:
1188 if (newinfo->chainstack) { 1195 if (newinfo->chainstack) {
1189 for (i = 0; i < num_possible_cpus(); i++) 1196 for_each_cpu(i)
1190 vfree(newinfo->chainstack[i]); 1197 vfree(newinfo->chainstack[i]);
1191 vfree(newinfo->chainstack); 1198 vfree(newinfo->chainstack);
1192 } 1199 }
@@ -1209,7 +1216,7 @@ void ebt_unregister_table(struct ebt_table *table)
1209 up(&ebt_mutex); 1216 up(&ebt_mutex);
1210 vfree(table->private->entries); 1217 vfree(table->private->entries);
1211 if (table->private->chainstack) { 1218 if (table->private->chainstack) {
1212 for (i = 0; i < num_possible_cpus(); i++) 1219 for_each_cpu(i)
1213 vfree(table->private->chainstack[i]); 1220 vfree(table->private->chainstack[i]);
1214 vfree(table->private->chainstack); 1221 vfree(table->private->chainstack);
1215 } 1222 }
diff --git a/net/dccp/ccid.h b/net/dccp/ccid.h
index 21e55142dcd3..c37eeeaf5c6e 100644
--- a/net/dccp/ccid.h
+++ b/net/dccp/ccid.h
@@ -110,14 +110,14 @@ static inline int ccid_hc_tx_init(struct ccid *ccid, struct sock *sk)
110 110
111static inline void ccid_hc_rx_exit(struct ccid *ccid, struct sock *sk) 111static inline void ccid_hc_rx_exit(struct ccid *ccid, struct sock *sk)
112{ 112{
113 if (ccid->ccid_hc_rx_exit != NULL && 113 if (ccid != NULL && ccid->ccid_hc_rx_exit != NULL &&
114 dccp_sk(sk)->dccps_hc_rx_ccid_private != NULL) 114 dccp_sk(sk)->dccps_hc_rx_ccid_private != NULL)
115 ccid->ccid_hc_rx_exit(sk); 115 ccid->ccid_hc_rx_exit(sk);
116} 116}
117 117
118static inline void ccid_hc_tx_exit(struct ccid *ccid, struct sock *sk) 118static inline void ccid_hc_tx_exit(struct ccid *ccid, struct sock *sk)
119{ 119{
120 if (ccid->ccid_hc_tx_exit != NULL && 120 if (ccid != NULL && ccid->ccid_hc_tx_exit != NULL &&
121 dccp_sk(sk)->dccps_hc_tx_ccid_private != NULL) 121 dccp_sk(sk)->dccps_hc_tx_ccid_private != NULL)
122 ccid->ccid_hc_tx_exit(sk); 122 ccid->ccid_hc_tx_exit(sk);
123} 123}
diff --git a/net/dccp/input.c b/net/dccp/input.c
index 1b6b2cb12376..3454d5941900 100644
--- a/net/dccp/input.c
+++ b/net/dccp/input.c
@@ -375,6 +375,9 @@ static int dccp_rcv_respond_partopen_state_process(struct sock *sk,
375 case DCCP_PKT_RESET: 375 case DCCP_PKT_RESET:
376 inet_csk_clear_xmit_timer(sk, ICSK_TIME_DACK); 376 inet_csk_clear_xmit_timer(sk, ICSK_TIME_DACK);
377 break; 377 break;
378 case DCCP_PKT_DATA:
379 if (sk->sk_state == DCCP_RESPOND)
380 break;
378 case DCCP_PKT_DATAACK: 381 case DCCP_PKT_DATAACK:
379 case DCCP_PKT_ACK: 382 case DCCP_PKT_ACK:
380 /* 383 /*
@@ -393,7 +396,8 @@ static int dccp_rcv_respond_partopen_state_process(struct sock *sk,
393 dccp_sk(sk)->dccps_osr = DCCP_SKB_CB(skb)->dccpd_seq; 396 dccp_sk(sk)->dccps_osr = DCCP_SKB_CB(skb)->dccpd_seq;
394 dccp_set_state(sk, DCCP_OPEN); 397 dccp_set_state(sk, DCCP_OPEN);
395 398
396 if (dh->dccph_type == DCCP_PKT_DATAACK) { 399 if (dh->dccph_type == DCCP_PKT_DATAACK ||
400 dh->dccph_type == DCCP_PKT_DATA) {
397 dccp_rcv_established(sk, skb, dh, len); 401 dccp_rcv_established(sk, skb, dh, len);
398 queued = 1; /* packet was queued 402 queued = 1; /* packet was queued
399 (by dccp_rcv_established) */ 403 (by dccp_rcv_established) */
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c
index ae088d1347af..6298cf58ff9e 100644
--- a/net/dccp/ipv4.c
+++ b/net/dccp/ipv4.c
@@ -463,6 +463,7 @@ static int dccp_v4_send_response(struct sock *sk, struct request_sock *req,
463 if (skb != NULL) { 463 if (skb != NULL) {
464 const struct inet_request_sock *ireq = inet_rsk(req); 464 const struct inet_request_sock *ireq = inet_rsk(req);
465 465
466 memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
466 err = ip_build_and_send_pkt(skb, sk, ireq->loc_addr, 467 err = ip_build_and_send_pkt(skb, sk, ireq->loc_addr,
467 ireq->rmt_addr, 468 ireq->rmt_addr,
468 ireq->opt); 469 ireq->opt);
@@ -647,6 +648,7 @@ int dccp_v4_send_reset(struct sock *sk, enum dccp_reset_codes code)
647 if (skb != NULL) { 648 if (skb != NULL) {
648 const struct inet_sock *inet = inet_sk(sk); 649 const struct inet_sock *inet = inet_sk(sk);
649 650
651 memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
650 err = ip_build_and_send_pkt(skb, sk, 652 err = ip_build_and_send_pkt(skb, sk,
651 inet->saddr, inet->daddr, NULL); 653 inet->saddr, inet->daddr, NULL);
652 if (err == NET_XMIT_CN) 654 if (err == NET_XMIT_CN)
diff --git a/net/dccp/output.c b/net/dccp/output.c
index 4786bdcddcc9..29250749f16f 100644
--- a/net/dccp/output.c
+++ b/net/dccp/output.c
@@ -62,10 +62,8 @@ int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb)
62 62
63 skb->h.raw = skb_push(skb, dccp_header_size); 63 skb->h.raw = skb_push(skb, dccp_header_size);
64 dh = dccp_hdr(skb); 64 dh = dccp_hdr(skb);
65 /* 65
66 * Data packets are not cloned as they are never retransmitted 66 if (!skb->sk)
67 */
68 if (skb_cloned(skb))
69 skb_set_owner_w(skb, sk); 67 skb_set_owner_w(skb, sk);
70 68
71 /* Build DCCP header and checksum it. */ 69 /* Build DCCP header and checksum it. */
@@ -102,6 +100,7 @@ int dccp_transmit_skb(struct sock *sk, struct sk_buff *skb)
102 100
103 DCCP_INC_STATS(DCCP_MIB_OUTSEGS); 101 DCCP_INC_STATS(DCCP_MIB_OUTSEGS);
104 102
103 memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
105 err = ip_queue_xmit(skb, 0); 104 err = ip_queue_xmit(skb, 0);
106 if (err <= 0) 105 if (err <= 0)
107 return err; 106 return err;
@@ -243,7 +242,8 @@ int dccp_write_xmit(struct sock *sk, struct sk_buff *skb, long *timeo)
243 242
244 err = dccp_transmit_skb(sk, skb); 243 err = dccp_transmit_skb(sk, skb);
245 ccid_hc_tx_packet_sent(dp->dccps_hc_tx_ccid, sk, 0, len); 244 ccid_hc_tx_packet_sent(dp->dccps_hc_tx_ccid, sk, 0, len);
246 } 245 } else
246 kfree_skb(skb);
247 247
248 return err; 248 return err;
249} 249}
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index a1cfd0e9e3bc..a021c3422f67 100644
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -402,8 +402,6 @@ int dccp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
402 * This bug was _quickly_ found & fixed by just looking at an OSTRA 402 * This bug was _quickly_ found & fixed by just looking at an OSTRA
403 * generated callgraph 8) -acme 403 * generated callgraph 8) -acme
404 */ 404 */
405 if (rc != 0)
406 goto out_discard;
407out_release: 405out_release:
408 release_sock(sk); 406 release_sock(sk);
409 return rc ? : len; 407 return rc ? : len;
diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c
index 1b5a09d1b90b..1b18ce66e7b7 100644
--- a/net/ipv4/esp4.c
+++ b/net/ipv4/esp4.c
@@ -5,6 +5,7 @@
5#include <net/esp.h> 5#include <net/esp.h>
6#include <asm/scatterlist.h> 6#include <asm/scatterlist.h>
7#include <linux/crypto.h> 7#include <linux/crypto.h>
8#include <linux/kernel.h>
8#include <linux/pfkeyv2.h> 9#include <linux/pfkeyv2.h>
9#include <linux/random.h> 10#include <linux/random.h>
10#include <net/icmp.h> 11#include <net/icmp.h>
@@ -42,10 +43,10 @@ static int esp_output(struct xfrm_state *x, struct sk_buff *skb)
42 esp = x->data; 43 esp = x->data;
43 alen = esp->auth.icv_trunc_len; 44 alen = esp->auth.icv_trunc_len;
44 tfm = esp->conf.tfm; 45 tfm = esp->conf.tfm;
45 blksize = (crypto_tfm_alg_blocksize(tfm) + 3) & ~3; 46 blksize = ALIGN(crypto_tfm_alg_blocksize(tfm), 4);
46 clen = (clen + 2 + blksize-1)&~(blksize-1); 47 clen = ALIGN(clen + 2, blksize);
47 if (esp->conf.padlen) 48 if (esp->conf.padlen)
48 clen = (clen + esp->conf.padlen-1)&~(esp->conf.padlen-1); 49 clen = ALIGN(clen, esp->conf.padlen);
49 50
50 if ((nfrags = skb_cow_data(skb, clen-skb->len+alen, &trailer)) < 0) 51 if ((nfrags = skb_cow_data(skb, clen-skb->len+alen, &trailer)) < 0)
51 goto error; 52 goto error;
@@ -143,7 +144,7 @@ static int esp_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struc
143 struct ip_esp_hdr *esph; 144 struct ip_esp_hdr *esph;
144 struct esp_data *esp = x->data; 145 struct esp_data *esp = x->data;
145 struct sk_buff *trailer; 146 struct sk_buff *trailer;
146 int blksize = crypto_tfm_alg_blocksize(esp->conf.tfm); 147 int blksize = ALIGN(crypto_tfm_alg_blocksize(esp->conf.tfm), 4);
147 int alen = esp->auth.icv_trunc_len; 148 int alen = esp->auth.icv_trunc_len;
148 int elen = skb->len - sizeof(struct ip_esp_hdr) - esp->conf.ivlen - alen; 149 int elen = skb->len - sizeof(struct ip_esp_hdr) - esp->conf.ivlen - alen;
149 int nfrags; 150 int nfrags;
@@ -304,16 +305,16 @@ static int esp_post_input(struct xfrm_state *x, struct xfrm_decap_state *decap,
304static u32 esp4_get_max_size(struct xfrm_state *x, int mtu) 305static u32 esp4_get_max_size(struct xfrm_state *x, int mtu)
305{ 306{
306 struct esp_data *esp = x->data; 307 struct esp_data *esp = x->data;
307 u32 blksize = crypto_tfm_alg_blocksize(esp->conf.tfm); 308 u32 blksize = ALIGN(crypto_tfm_alg_blocksize(esp->conf.tfm), 4);
308 309
309 if (x->props.mode) { 310 if (x->props.mode) {
310 mtu = (mtu + 2 + blksize-1)&~(blksize-1); 311 mtu = ALIGN(mtu + 2, blksize);
311 } else { 312 } else {
312 /* The worst case. */ 313 /* The worst case. */
313 mtu += 2 + blksize; 314 mtu = ALIGN(mtu + 2, 4) + blksize - 4;
314 } 315 }
315 if (esp->conf.padlen) 316 if (esp->conf.padlen)
316 mtu = (mtu + esp->conf.padlen-1)&~(esp->conf.padlen-1); 317 mtu = ALIGN(mtu, esp->conf.padlen);
317 318
318 return mtu + x->props.header_len + esp->auth.icv_trunc_len; 319 return mtu + x->props.header_len + esp->auth.icv_trunc_len;
319} 320}
diff --git a/net/ipv4/inet_timewait_sock.c b/net/ipv4/inet_timewait_sock.c
index f9076ef3a1a8..a010e9a68811 100644
--- a/net/ipv4/inet_timewait_sock.c
+++ b/net/ipv4/inet_timewait_sock.c
@@ -111,6 +111,7 @@ struct inet_timewait_sock *inet_twsk_alloc(const struct sock *sk, const int stat
111 tw->tw_prot = sk->sk_prot_creator; 111 tw->tw_prot = sk->sk_prot_creator;
112 atomic_set(&tw->tw_refcnt, 1); 112 atomic_set(&tw->tw_refcnt, 1);
113 inet_twsk_dead_node_init(tw); 113 inet_twsk_dead_node_init(tw);
114 __module_get(tw->tw_prot->owner);
114 } 115 }
115 116
116 return tw; 117 return tw;
diff --git a/net/ipv4/netfilter/Kconfig b/net/ipv4/netfilter/Kconfig
index a7659728e7a0..7d917e4ce1d9 100644
--- a/net/ipv4/netfilter/Kconfig
+++ b/net/ipv4/netfilter/Kconfig
@@ -139,6 +139,7 @@ config IP_NF_AMANDA
139 139
140config IP_NF_PPTP 140config IP_NF_PPTP
141 tristate 'PPTP protocol support' 141 tristate 'PPTP protocol support'
142 depends on IP_NF_CONNTRACK
142 help 143 help
143 This module adds support for PPTP (Point to Point Tunnelling 144 This module adds support for PPTP (Point to Point Tunnelling
144 Protocol, RFC2637) connection tracking and NAT. 145 Protocol, RFC2637) connection tracking and NAT.
@@ -498,9 +499,14 @@ config IP_NF_TARGET_LOG
498 To compile it as a module, choose M here. If unsure, say N. 499 To compile it as a module, choose M here. If unsure, say N.
499 500
500config IP_NF_TARGET_ULOG 501config IP_NF_TARGET_ULOG
501 tristate "ULOG target support" 502 tristate "ULOG target support (OBSOLETE)"
502 depends on IP_NF_IPTABLES 503 depends on IP_NF_IPTABLES
503 ---help--- 504 ---help---
505
506 This option enables the old IPv4-only "ipt_ULOG" implementation
507 which has been obsoleted by the new "nfnetlink_log" code (see
508 CONFIG_NETFILTER_NETLINK_LOG).
509
504 This option adds a `ULOG' target, which allows you to create rules in 510 This option adds a `ULOG' target, which allows you to create rules in
505 any iptables table. The packet is passed to a userspace logging 511 any iptables table. The packet is passed to a userspace logging
506 daemon using netlink multicast sockets; unlike the LOG target 512 daemon using netlink multicast sockets; unlike the LOG target
diff --git a/net/ipv4/netfilter/arp_tables.c b/net/ipv4/netfilter/arp_tables.c
index fa1634256680..a7969286e6e7 100644
--- a/net/ipv4/netfilter/arp_tables.c
+++ b/net/ipv4/netfilter/arp_tables.c
@@ -716,8 +716,10 @@ static int translate_table(const char *name,
716 } 716 }
717 717
718 /* And one copy for every other CPU */ 718 /* And one copy for every other CPU */
719 for (i = 1; i < num_possible_cpus(); i++) { 719 for_each_cpu(i) {
720 memcpy(newinfo->entries + SMP_ALIGN(newinfo->size)*i, 720 if (i == 0)
721 continue;
722 memcpy(newinfo->entries + SMP_ALIGN(newinfo->size) * i,
721 newinfo->entries, 723 newinfo->entries,
722 SMP_ALIGN(newinfo->size)); 724 SMP_ALIGN(newinfo->size));
723 } 725 }
@@ -767,7 +769,7 @@ static void get_counters(const struct arpt_table_info *t,
767 unsigned int cpu; 769 unsigned int cpu;
768 unsigned int i; 770 unsigned int i;
769 771
770 for (cpu = 0; cpu < num_possible_cpus(); cpu++) { 772 for_each_cpu(cpu) {
771 i = 0; 773 i = 0;
772 ARPT_ENTRY_ITERATE(t->entries + TABLE_OFFSET(t, cpu), 774 ARPT_ENTRY_ITERATE(t->entries + TABLE_OFFSET(t, cpu),
773 t->size, 775 t->size,
@@ -885,7 +887,8 @@ static int do_replace(void __user *user, unsigned int len)
885 return -ENOMEM; 887 return -ENOMEM;
886 888
887 newinfo = vmalloc(sizeof(struct arpt_table_info) 889 newinfo = vmalloc(sizeof(struct arpt_table_info)
888 + SMP_ALIGN(tmp.size) * num_possible_cpus()); 890 + SMP_ALIGN(tmp.size) *
891 (highest_possible_processor_id()+1));
889 if (!newinfo) 892 if (!newinfo)
890 return -ENOMEM; 893 return -ENOMEM;
891 894
@@ -1158,7 +1161,8 @@ int arpt_register_table(struct arpt_table *table,
1158 = { 0, 0, 0, { 0 }, { 0 }, { } }; 1161 = { 0, 0, 0, { 0 }, { 0 }, { } };
1159 1162
1160 newinfo = vmalloc(sizeof(struct arpt_table_info) 1163 newinfo = vmalloc(sizeof(struct arpt_table_info)
1161 + SMP_ALIGN(repl->size) * num_possible_cpus()); 1164 + SMP_ALIGN(repl->size) *
1165 (highest_possible_processor_id()+1));
1162 if (!newinfo) { 1166 if (!newinfo) {
1163 ret = -ENOMEM; 1167 ret = -ENOMEM;
1164 return ret; 1168 return ret;
diff --git a/net/ipv4/netfilter/ip_conntrack_core.c b/net/ipv4/netfilter/ip_conntrack_core.c
index ea65dd3e517a..07a80b56e8dc 100644
--- a/net/ipv4/netfilter/ip_conntrack_core.c
+++ b/net/ipv4/netfilter/ip_conntrack_core.c
@@ -1119,7 +1119,7 @@ void __ip_ct_refresh_acct(struct ip_conntrack *ct,
1119 unsigned long extra_jiffies, 1119 unsigned long extra_jiffies,
1120 int do_acct) 1120 int do_acct)
1121{ 1121{
1122 int do_event = 0; 1122 int event = 0;
1123 1123
1124 IP_NF_ASSERT(ct->timeout.data == (unsigned long)ct); 1124 IP_NF_ASSERT(ct->timeout.data == (unsigned long)ct);
1125 IP_NF_ASSERT(skb); 1125 IP_NF_ASSERT(skb);
@@ -1129,13 +1129,13 @@ void __ip_ct_refresh_acct(struct ip_conntrack *ct,
1129 /* If not in hash table, timer will not be active yet */ 1129 /* If not in hash table, timer will not be active yet */
1130 if (!is_confirmed(ct)) { 1130 if (!is_confirmed(ct)) {
1131 ct->timeout.expires = extra_jiffies; 1131 ct->timeout.expires = extra_jiffies;
1132 do_event = 1; 1132 event = IPCT_REFRESH;
1133 } else { 1133 } else {
1134 /* Need del_timer for race avoidance (may already be dying). */ 1134 /* Need del_timer for race avoidance (may already be dying). */
1135 if (del_timer(&ct->timeout)) { 1135 if (del_timer(&ct->timeout)) {
1136 ct->timeout.expires = jiffies + extra_jiffies; 1136 ct->timeout.expires = jiffies + extra_jiffies;
1137 add_timer(&ct->timeout); 1137 add_timer(&ct->timeout);
1138 do_event = 1; 1138 event = IPCT_REFRESH;
1139 } 1139 }
1140 } 1140 }
1141 1141
@@ -1144,14 +1144,17 @@ void __ip_ct_refresh_acct(struct ip_conntrack *ct,
1144 ct->counters[CTINFO2DIR(ctinfo)].packets++; 1144 ct->counters[CTINFO2DIR(ctinfo)].packets++;
1145 ct->counters[CTINFO2DIR(ctinfo)].bytes += 1145 ct->counters[CTINFO2DIR(ctinfo)].bytes +=
1146 ntohs(skb->nh.iph->tot_len); 1146 ntohs(skb->nh.iph->tot_len);
1147 if ((ct->counters[CTINFO2DIR(ctinfo)].packets & 0x80000000)
1148 || (ct->counters[CTINFO2DIR(ctinfo)].bytes & 0x80000000))
1149 event |= IPCT_COUNTER_FILLING;
1147 } 1150 }
1148#endif 1151#endif
1149 1152
1150 write_unlock_bh(&ip_conntrack_lock); 1153 write_unlock_bh(&ip_conntrack_lock);
1151 1154
1152 /* must be unlocked when calling event cache */ 1155 /* must be unlocked when calling event cache */
1153 if (do_event) 1156 if (event)
1154 ip_conntrack_event_cache(IPCT_REFRESH, skb); 1157 ip_conntrack_event_cache(event, skb);
1155} 1158}
1156 1159
1157#if defined(CONFIG_IP_NF_CONNTRACK_NETLINK) || \ 1160#if defined(CONFIG_IP_NF_CONNTRACK_NETLINK) || \
diff --git a/net/ipv4/netfilter/ip_conntrack_netlink.c b/net/ipv4/netfilter/ip_conntrack_netlink.c
index b08a432efcf8..166e6069f121 100644
--- a/net/ipv4/netfilter/ip_conntrack_netlink.c
+++ b/net/ipv4/netfilter/ip_conntrack_netlink.c
@@ -177,11 +177,11 @@ ctnetlink_dump_counters(struct sk_buff *skb, const struct ip_conntrack *ct,
177 struct nfattr *nest_count = NFA_NEST(skb, type); 177 struct nfattr *nest_count = NFA_NEST(skb, type);
178 u_int64_t tmp; 178 u_int64_t tmp;
179 179
180 tmp = cpu_to_be64(ct->counters[dir].packets); 180 tmp = htonl(ct->counters[dir].packets);
181 NFA_PUT(skb, CTA_COUNTERS_PACKETS, sizeof(u_int64_t), &tmp); 181 NFA_PUT(skb, CTA_COUNTERS32_PACKETS, sizeof(u_int32_t), &tmp);
182 182
183 tmp = cpu_to_be64(ct->counters[dir].bytes); 183 tmp = htonl(ct->counters[dir].bytes);
184 NFA_PUT(skb, CTA_COUNTERS_BYTES, sizeof(u_int64_t), &tmp); 184 NFA_PUT(skb, CTA_COUNTERS32_BYTES, sizeof(u_int32_t), &tmp);
185 185
186 NFA_NEST_END(skb, nest_count); 186 NFA_NEST_END(skb, nest_count);
187 187
@@ -833,7 +833,8 @@ out:
833static inline int 833static inline int
834ctnetlink_change_status(struct ip_conntrack *ct, struct nfattr *cda[]) 834ctnetlink_change_status(struct ip_conntrack *ct, struct nfattr *cda[])
835{ 835{
836 unsigned long d, status = *(u_int32_t *)NFA_DATA(cda[CTA_STATUS-1]); 836 unsigned long d;
837 unsigned status = ntohl(*(u_int32_t *)NFA_DATA(cda[CTA_STATUS-1]));
837 d = ct->status ^ status; 838 d = ct->status ^ status;
838 839
839 if (d & (IPS_EXPECTED|IPS_CONFIRMED|IPS_DYING)) 840 if (d & (IPS_EXPECTED|IPS_CONFIRMED|IPS_DYING))
@@ -948,6 +949,31 @@ ctnetlink_change_timeout(struct ip_conntrack *ct, struct nfattr *cda[])
948 return 0; 949 return 0;
949} 950}
950 951
952static inline int
953ctnetlink_change_protoinfo(struct ip_conntrack *ct, struct nfattr *cda[])
954{
955 struct nfattr *tb[CTA_PROTOINFO_MAX], *attr = cda[CTA_PROTOINFO-1];
956 struct ip_conntrack_protocol *proto;
957 u_int16_t npt = ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.protonum;
958 int err = 0;
959
960 if (nfattr_parse_nested(tb, CTA_PROTOINFO_MAX, attr) < 0)
961 goto nfattr_failure;
962
963 proto = ip_conntrack_proto_find_get(npt);
964 if (!proto)
965 return -EINVAL;
966
967 if (proto->from_nfattr)
968 err = proto->from_nfattr(tb, ct);
969 ip_conntrack_proto_put(proto);
970
971 return err;
972
973nfattr_failure:
974 return -ENOMEM;
975}
976
951static int 977static int
952ctnetlink_change_conntrack(struct ip_conntrack *ct, struct nfattr *cda[]) 978ctnetlink_change_conntrack(struct ip_conntrack *ct, struct nfattr *cda[])
953{ 979{
@@ -973,6 +999,12 @@ ctnetlink_change_conntrack(struct ip_conntrack *ct, struct nfattr *cda[])
973 return err; 999 return err;
974 } 1000 }
975 1001
1002 if (cda[CTA_PROTOINFO-1]) {
1003 err = ctnetlink_change_protoinfo(ct, cda);
1004 if (err < 0)
1005 return err;
1006 }
1007
976 DEBUGP("all done\n"); 1008 DEBUGP("all done\n");
977 return 0; 1009 return 0;
978} 1010}
@@ -1002,6 +1034,12 @@ ctnetlink_create_conntrack(struct nfattr *cda[],
1002 if (err < 0) 1034 if (err < 0)
1003 goto err; 1035 goto err;
1004 1036
1037 if (cda[CTA_PROTOINFO-1]) {
1038 err = ctnetlink_change_protoinfo(ct, cda);
1039 if (err < 0)
1040 return err;
1041 }
1042
1005 ct->helper = ip_conntrack_helper_find_get(rtuple); 1043 ct->helper = ip_conntrack_helper_find_get(rtuple);
1006 1044
1007 add_timer(&ct->timeout); 1045 add_timer(&ct->timeout);
diff --git a/net/ipv4/netfilter/ip_conntrack_proto_icmp.c b/net/ipv4/netfilter/ip_conntrack_proto_icmp.c
index 838d1d69b36e..98f0015dd255 100644
--- a/net/ipv4/netfilter/ip_conntrack_proto_icmp.c
+++ b/net/ipv4/netfilter/ip_conntrack_proto_icmp.c
@@ -296,8 +296,7 @@ static int icmp_nfattr_to_tuple(struct nfattr *tb[],
296 struct ip_conntrack_tuple *tuple) 296 struct ip_conntrack_tuple *tuple)
297{ 297{
298 if (!tb[CTA_PROTO_ICMP_TYPE-1] 298 if (!tb[CTA_PROTO_ICMP_TYPE-1]
299 || !tb[CTA_PROTO_ICMP_CODE-1] 299 || !tb[CTA_PROTO_ICMP_CODE-1])
300 || !tb[CTA_PROTO_ICMP_ID-1])
301 return -1; 300 return -1;
302 301
303 tuple->dst.u.icmp.type = 302 tuple->dst.u.icmp.type =
diff --git a/net/ipv4/netfilter/ip_conntrack_proto_tcp.c b/net/ipv4/netfilter/ip_conntrack_proto_tcp.c
index 121760d6cc50..d6701cafbcc2 100644
--- a/net/ipv4/netfilter/ip_conntrack_proto_tcp.c
+++ b/net/ipv4/netfilter/ip_conntrack_proto_tcp.c
@@ -341,17 +341,43 @@ static int tcp_print_conntrack(struct seq_file *s,
341static int tcp_to_nfattr(struct sk_buff *skb, struct nfattr *nfa, 341static int tcp_to_nfattr(struct sk_buff *skb, struct nfattr *nfa,
342 const struct ip_conntrack *ct) 342 const struct ip_conntrack *ct)
343{ 343{
344 struct nfattr *nest_parms = NFA_NEST(skb, CTA_PROTOINFO_TCP);
345
344 read_lock_bh(&tcp_lock); 346 read_lock_bh(&tcp_lock);
345 NFA_PUT(skb, CTA_PROTOINFO_TCP_STATE, sizeof(u_int8_t), 347 NFA_PUT(skb, CTA_PROTOINFO_TCP_STATE, sizeof(u_int8_t),
346 &ct->proto.tcp.state); 348 &ct->proto.tcp.state);
347 read_unlock_bh(&tcp_lock); 349 read_unlock_bh(&tcp_lock);
348 350
351 NFA_NEST_END(skb, nest_parms);
352
349 return 0; 353 return 0;
350 354
351nfattr_failure: 355nfattr_failure:
352 read_unlock_bh(&tcp_lock); 356 read_unlock_bh(&tcp_lock);
353 return -1; 357 return -1;
354} 358}
359
360static int nfattr_to_tcp(struct nfattr *cda[], struct ip_conntrack *ct)
361{
362 struct nfattr *attr = cda[CTA_PROTOINFO_TCP-1];
363 struct nfattr *tb[CTA_PROTOINFO_TCP_MAX];
364
365 if (nfattr_parse_nested(tb, CTA_PROTOINFO_TCP_MAX, attr) < 0)
366 goto nfattr_failure;
367
368 if (!tb[CTA_PROTOINFO_TCP_STATE-1])
369 return -EINVAL;
370
371 write_lock_bh(&tcp_lock);
372 ct->proto.tcp.state =
373 *(u_int8_t *)NFA_DATA(tb[CTA_PROTOINFO_TCP_STATE-1]);
374 write_unlock_bh(&tcp_lock);
375
376 return 0;
377
378nfattr_failure:
379 return -1;
380}
355#endif 381#endif
356 382
357static unsigned int get_conntrack_index(const struct tcphdr *tcph) 383static unsigned int get_conntrack_index(const struct tcphdr *tcph)
@@ -1123,6 +1149,7 @@ struct ip_conntrack_protocol ip_conntrack_protocol_tcp =
1123#if defined(CONFIG_IP_NF_CONNTRACK_NETLINK) || \ 1149#if defined(CONFIG_IP_NF_CONNTRACK_NETLINK) || \
1124 defined(CONFIG_IP_NF_CONNTRACK_NETLINK_MODULE) 1150 defined(CONFIG_IP_NF_CONNTRACK_NETLINK_MODULE)
1125 .to_nfattr = tcp_to_nfattr, 1151 .to_nfattr = tcp_to_nfattr,
1152 .from_nfattr = nfattr_to_tcp,
1126 .tuple_to_nfattr = ip_ct_port_tuple_to_nfattr, 1153 .tuple_to_nfattr = ip_ct_port_tuple_to_nfattr,
1127 .nfattr_to_tuple = ip_ct_port_nfattr_to_tuple, 1154 .nfattr_to_tuple = ip_ct_port_nfattr_to_tuple,
1128#endif 1155#endif
diff --git a/net/ipv4/netfilter/ip_tables.c b/net/ipv4/netfilter/ip_tables.c
index eef99a1b5de6..75c27e92f6ab 100644
--- a/net/ipv4/netfilter/ip_tables.c
+++ b/net/ipv4/netfilter/ip_tables.c
@@ -27,6 +27,7 @@
27#include <asm/semaphore.h> 27#include <asm/semaphore.h>
28#include <linux/proc_fs.h> 28#include <linux/proc_fs.h>
29#include <linux/err.h> 29#include <linux/err.h>
30#include <linux/cpumask.h>
30 31
31#include <linux/netfilter_ipv4/ip_tables.h> 32#include <linux/netfilter_ipv4/ip_tables.h>
32 33
@@ -921,8 +922,10 @@ translate_table(const char *name,
921 } 922 }
922 923
923 /* And one copy for every other CPU */ 924 /* And one copy for every other CPU */
924 for (i = 1; i < num_possible_cpus(); i++) { 925 for_each_cpu(i) {
925 memcpy(newinfo->entries + SMP_ALIGN(newinfo->size)*i, 926 if (i == 0)
927 continue;
928 memcpy(newinfo->entries + SMP_ALIGN(newinfo->size) * i,
926 newinfo->entries, 929 newinfo->entries,
927 SMP_ALIGN(newinfo->size)); 930 SMP_ALIGN(newinfo->size));
928 } 931 }
@@ -943,7 +946,7 @@ replace_table(struct ipt_table *table,
943 struct ipt_entry *table_base; 946 struct ipt_entry *table_base;
944 unsigned int i; 947 unsigned int i;
945 948
946 for (i = 0; i < num_possible_cpus(); i++) { 949 for_each_cpu(i) {
947 table_base = 950 table_base =
948 (void *)newinfo->entries 951 (void *)newinfo->entries
949 + TABLE_OFFSET(newinfo, i); 952 + TABLE_OFFSET(newinfo, i);
@@ -990,7 +993,7 @@ get_counters(const struct ipt_table_info *t,
990 unsigned int cpu; 993 unsigned int cpu;
991 unsigned int i; 994 unsigned int i;
992 995
993 for (cpu = 0; cpu < num_possible_cpus(); cpu++) { 996 for_each_cpu(cpu) {
994 i = 0; 997 i = 0;
995 IPT_ENTRY_ITERATE(t->entries + TABLE_OFFSET(t, cpu), 998 IPT_ENTRY_ITERATE(t->entries + TABLE_OFFSET(t, cpu),
996 t->size, 999 t->size,
@@ -1128,7 +1131,8 @@ do_replace(void __user *user, unsigned int len)
1128 return -ENOMEM; 1131 return -ENOMEM;
1129 1132
1130 newinfo = vmalloc(sizeof(struct ipt_table_info) 1133 newinfo = vmalloc(sizeof(struct ipt_table_info)
1131 + SMP_ALIGN(tmp.size) * num_possible_cpus()); 1134 + SMP_ALIGN(tmp.size) *
1135 (highest_possible_processor_id()+1));
1132 if (!newinfo) 1136 if (!newinfo)
1133 return -ENOMEM; 1137 return -ENOMEM;
1134 1138
@@ -1458,7 +1462,8 @@ int ipt_register_table(struct ipt_table *table, const struct ipt_replace *repl)
1458 = { 0, 0, 0, { 0 }, { 0 }, { } }; 1462 = { 0, 0, 0, { 0 }, { 0 }, { } };
1459 1463
1460 newinfo = vmalloc(sizeof(struct ipt_table_info) 1464 newinfo = vmalloc(sizeof(struct ipt_table_info)
1461 + SMP_ALIGN(repl->size) * num_possible_cpus()); 1465 + SMP_ALIGN(repl->size) *
1466 (highest_possible_processor_id()+1));
1462 if (!newinfo) 1467 if (!newinfo)
1463 return -ENOMEM; 1468 return -ENOMEM;
1464 1469
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 8225e4257258..b907456a79f4 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -435,8 +435,7 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss
435 int nsize, old_factor; 435 int nsize, old_factor;
436 u16 flags; 436 u16 flags;
437 437
438 BUG_ON(len >= skb->len); 438 BUG_ON(len > skb->len);
439
440 nsize = skb_headlen(skb) - len; 439 nsize = skb_headlen(skb) - len;
441 if (nsize < 0) 440 if (nsize < 0)
442 nsize = 0; 441 nsize = 0;
diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c
index 9b27460f0cc7..40d9a1935ab5 100644
--- a/net/ipv6/esp6.c
+++ b/net/ipv6/esp6.c
@@ -31,6 +31,7 @@
31#include <net/esp.h> 31#include <net/esp.h>
32#include <asm/scatterlist.h> 32#include <asm/scatterlist.h>
33#include <linux/crypto.h> 33#include <linux/crypto.h>
34#include <linux/kernel.h>
34#include <linux/pfkeyv2.h> 35#include <linux/pfkeyv2.h>
35#include <linux/random.h> 36#include <linux/random.h>
36#include <net/icmp.h> 37#include <net/icmp.h>
@@ -66,10 +67,10 @@ static int esp6_output(struct xfrm_state *x, struct sk_buff *skb)
66 67
67 alen = esp->auth.icv_trunc_len; 68 alen = esp->auth.icv_trunc_len;
68 tfm = esp->conf.tfm; 69 tfm = esp->conf.tfm;
69 blksize = (crypto_tfm_alg_blocksize(tfm) + 3) & ~3; 70 blksize = ALIGN(crypto_tfm_alg_blocksize(tfm), 4);
70 clen = (clen + 2 + blksize-1)&~(blksize-1); 71 clen = ALIGN(clen + 2, blksize);
71 if (esp->conf.padlen) 72 if (esp->conf.padlen)
72 clen = (clen + esp->conf.padlen-1)&~(esp->conf.padlen-1); 73 clen = ALIGN(clen, esp->conf.padlen);
73 74
74 if ((nfrags = skb_cow_data(skb, clen-skb->len+alen, &trailer)) < 0) { 75 if ((nfrags = skb_cow_data(skb, clen-skb->len+alen, &trailer)) < 0) {
75 goto error; 76 goto error;
@@ -133,7 +134,7 @@ static int esp6_input(struct xfrm_state *x, struct xfrm_decap_state *decap, stru
133 struct ipv6_esp_hdr *esph; 134 struct ipv6_esp_hdr *esph;
134 struct esp_data *esp = x->data; 135 struct esp_data *esp = x->data;
135 struct sk_buff *trailer; 136 struct sk_buff *trailer;
136 int blksize = crypto_tfm_alg_blocksize(esp->conf.tfm); 137 int blksize = ALIGN(crypto_tfm_alg_blocksize(esp->conf.tfm), 4);
137 int alen = esp->auth.icv_trunc_len; 138 int alen = esp->auth.icv_trunc_len;
138 int elen = skb->len - sizeof(struct ipv6_esp_hdr) - esp->conf.ivlen - alen; 139 int elen = skb->len - sizeof(struct ipv6_esp_hdr) - esp->conf.ivlen - alen;
139 140
@@ -235,16 +236,17 @@ out_nofree:
235static u32 esp6_get_max_size(struct xfrm_state *x, int mtu) 236static u32 esp6_get_max_size(struct xfrm_state *x, int mtu)
236{ 237{
237 struct esp_data *esp = x->data; 238 struct esp_data *esp = x->data;
238 u32 blksize = crypto_tfm_alg_blocksize(esp->conf.tfm); 239 u32 blksize = ALIGN(crypto_tfm_alg_blocksize(esp->conf.tfm), 4);
239 240
240 if (x->props.mode) { 241 if (x->props.mode) {
241 mtu = (mtu + 2 + blksize-1)&~(blksize-1); 242 mtu = ALIGN(mtu + 2, blksize);
242 } else { 243 } else {
243 /* The worst case. */ 244 /* The worst case. */
244 mtu += 2 + blksize; 245 u32 padsize = ((blksize - 1) & 7) + 1;
246 mtu = ALIGN(mtu + 2, padsize) + blksize - padsize;
245 } 247 }
246 if (esp->conf.padlen) 248 if (esp->conf.padlen)
247 mtu = (mtu + esp->conf.padlen-1)&~(esp->conf.padlen-1); 249 mtu = ALIGN(mtu, esp->conf.padlen);
248 250
249 return mtu + x->props.header_len + esp->auth.icv_full_len; 251 return mtu + x->props.header_len + esp->auth.icv_full_len;
250} 252}
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c
index 2da514b16d95..21deec25a12b 100644
--- a/net/ipv6/netfilter/ip6_tables.c
+++ b/net/ipv6/netfilter/ip6_tables.c
@@ -28,6 +28,7 @@
28#include <asm/uaccess.h> 28#include <asm/uaccess.h>
29#include <asm/semaphore.h> 29#include <asm/semaphore.h>
30#include <linux/proc_fs.h> 30#include <linux/proc_fs.h>
31#include <linux/cpumask.h>
31 32
32#include <linux/netfilter_ipv6/ip6_tables.h> 33#include <linux/netfilter_ipv6/ip6_tables.h>
33 34
@@ -950,8 +951,10 @@ translate_table(const char *name,
950 } 951 }
951 952
952 /* And one copy for every other CPU */ 953 /* And one copy for every other CPU */
953 for (i = 1; i < num_possible_cpus(); i++) { 954 for_each_cpu(i) {
954 memcpy(newinfo->entries + SMP_ALIGN(newinfo->size)*i, 955 if (i == 0)
956 continue;
957 memcpy(newinfo->entries + SMP_ALIGN(newinfo->size) * i,
955 newinfo->entries, 958 newinfo->entries,
956 SMP_ALIGN(newinfo->size)); 959 SMP_ALIGN(newinfo->size));
957 } 960 }
@@ -972,7 +975,7 @@ replace_table(struct ip6t_table *table,
972 struct ip6t_entry *table_base; 975 struct ip6t_entry *table_base;
973 unsigned int i; 976 unsigned int i;
974 977
975 for (i = 0; i < num_possible_cpus(); i++) { 978 for_each_cpu(i) {
976 table_base = 979 table_base =
977 (void *)newinfo->entries 980 (void *)newinfo->entries
978 + TABLE_OFFSET(newinfo, i); 981 + TABLE_OFFSET(newinfo, i);
@@ -1019,7 +1022,7 @@ get_counters(const struct ip6t_table_info *t,
1019 unsigned int cpu; 1022 unsigned int cpu;
1020 unsigned int i; 1023 unsigned int i;
1021 1024
1022 for (cpu = 0; cpu < num_possible_cpus(); cpu++) { 1025 for_each_cpu(cpu) {
1023 i = 0; 1026 i = 0;
1024 IP6T_ENTRY_ITERATE(t->entries + TABLE_OFFSET(t, cpu), 1027 IP6T_ENTRY_ITERATE(t->entries + TABLE_OFFSET(t, cpu),
1025 t->size, 1028 t->size,
@@ -1153,7 +1156,8 @@ do_replace(void __user *user, unsigned int len)
1153 return -ENOMEM; 1156 return -ENOMEM;
1154 1157
1155 newinfo = vmalloc(sizeof(struct ip6t_table_info) 1158 newinfo = vmalloc(sizeof(struct ip6t_table_info)
1156 + SMP_ALIGN(tmp.size) * num_possible_cpus()); 1159 + SMP_ALIGN(tmp.size) *
1160 (highest_possible_processor_id()+1));
1157 if (!newinfo) 1161 if (!newinfo)
1158 return -ENOMEM; 1162 return -ENOMEM;
1159 1163
@@ -1467,7 +1471,8 @@ int ip6t_register_table(struct ip6t_table *table,
1467 = { 0, 0, 0, { 0 }, { 0 }, { } }; 1471 = { 0, 0, 0, { 0 }, { 0 }, { } };
1468 1472
1469 newinfo = vmalloc(sizeof(struct ip6t_table_info) 1473 newinfo = vmalloc(sizeof(struct ip6t_table_info)
1470 + SMP_ALIGN(repl->size) * num_possible_cpus()); 1474 + SMP_ALIGN(repl->size) *
1475 (highest_possible_processor_id()+1));
1471 if (!newinfo) 1476 if (!newinfo)
1472 return -ENOMEM; 1477 return -ENOMEM;
1473 1478
diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c
index 1caaca06f698..4bc27a6334c1 100644
--- a/net/netfilter/nfnetlink.c
+++ b/net/netfilter/nfnetlink.c
@@ -133,7 +133,7 @@ int nfattr_parse(struct nfattr *tb[], int maxattr, struct nfattr *nfa, int len)
133 memset(tb, 0, sizeof(struct nfattr *) * maxattr); 133 memset(tb, 0, sizeof(struct nfattr *) * maxattr);
134 134
135 while (NFA_OK(nfa, len)) { 135 while (NFA_OK(nfa, len)) {
136 unsigned flavor = nfa->nfa_type; 136 unsigned flavor = NFA_TYPE(nfa);
137 if (flavor && flavor <= maxattr) 137 if (flavor && flavor <= maxattr)
138 tb[flavor-1] = nfa; 138 tb[flavor-1] = nfa;
139 nfa = NFA_NEXT(nfa, len); 139 nfa = NFA_NEXT(nfa, len);
@@ -177,7 +177,7 @@ nfnetlink_check_attributes(struct nfnetlink_subsystem *subsys,
177 int attrlen = nlh->nlmsg_len - NLMSG_ALIGN(min_len); 177 int attrlen = nlh->nlmsg_len - NLMSG_ALIGN(min_len);
178 178
179 while (NFA_OK(attr, attrlen)) { 179 while (NFA_OK(attr, attrlen)) {
180 unsigned flavor = attr->nfa_type; 180 unsigned flavor = NFA_TYPE(attr);
181 if (flavor) { 181 if (flavor) {
182 if (flavor > attr_count) 182 if (flavor > attr_count)
183 return -EINVAL; 183 return -EINVAL;
diff --git a/net/sched/Kconfig b/net/sched/Kconfig
index 45d3bc0812c8..81510da31792 100644
--- a/net/sched/Kconfig
+++ b/net/sched/Kconfig
@@ -72,9 +72,11 @@ config NET_SCH_CLK_GETTIMEOFDAY
72 Choose this if you need a high resolution clock source but can't use 72 Choose this if you need a high resolution clock source but can't use
73 the CPU's cycle counter. 73 the CPU's cycle counter.
74 74
75# don't allow on SMP x86 because they can have unsynchronized TSCs.
76# gettimeofday is a good alternative
75config NET_SCH_CLK_CPU 77config NET_SCH_CLK_CPU
76 bool "CPU cycle counter" 78 bool "CPU cycle counter"
77 depends on X86_TSC || X86_64 || ALPHA || SPARC64 || PPC64 || IA64 79 depends on ((X86_TSC || X86_64) && !SMP) || ALPHA || SPARC64 || PPC64 || IA64
78 help 80 help
79 Say Y here if you want to use the CPU's cycle counter as clock source. 81 Say Y here if you want to use the CPU's cycle counter as clock source.
80 This is a cheap and high resolution clock source, but on some 82 This is a cheap and high resolution clock source, but on some
diff --git a/scripts/.gitignore b/scripts/.gitignore
new file mode 100644
index 000000000000..b46d68bb9e17
--- /dev/null
+++ b/scripts/.gitignore
@@ -0,0 +1,4 @@
1conmakehash
2kallsyms
3pnmtologo
4
diff --git a/scripts/basic/.gitignore b/scripts/basic/.gitignore
new file mode 100644
index 000000000000..7304e19782c7
--- /dev/null
+++ b/scripts/basic/.gitignore
@@ -0,0 +1,3 @@
1fixdep
2split-include
3docproc
diff --git a/scripts/kconfig/.gitignore b/scripts/kconfig/.gitignore
new file mode 100644
index 000000000000..2dac3442e0ac
--- /dev/null
+++ b/scripts/kconfig/.gitignore
@@ -0,0 +1,16 @@
1#
2# Generated files
3#
4config*
5lex.*.c
6*.tab.c
7*.tab.h
8
9#
10# configuration programs
11#
12conf
13mconf
14qconf
15gconf
16kxgettext
diff --git a/scripts/mod/.gitignore b/scripts/mod/.gitignore
new file mode 100644
index 000000000000..e9b7abe7b95b
--- /dev/null
+++ b/scripts/mod/.gitignore
@@ -0,0 +1,4 @@
1elfconfig.h
2mk_elfconfig
3modpost
4
diff --git a/usr/.gitignore b/usr/.gitignore
new file mode 100644
index 000000000000..be186a82e8d0
--- /dev/null
+++ b/usr/.gitignore
@@ -0,0 +1,7 @@
1#
2# Generated files
3#
4gen_init_cpio
5initramfs_data.cpio
6initramfs_data.cpio.gz
7initramfs_list