[kernel] r11247 - in dists/trunk/linux-2.6/debian/patches: bugfix/all series

Maximilian Attems maks at alioth.debian.org
Fri May 2 10:11:24 UTC 2008


Author: maks
Date: Fri May  2 10:11:15 2008
New Revision: 11247

Log:
update to patch-2.6.25-git18

no new conflicts, mostly upstream fixes


Added:
   dists/trunk/linux-2.6/debian/patches/bugfix/all/patch-2.6.25-git18
      - copied, changed from r11235, /dists/trunk/linux-2.6/debian/patches/bugfix/all/patch-2.6.25-git17
Removed:
   dists/trunk/linux-2.6/debian/patches/bugfix/all/patch-2.6.25-git17
Modified:
   dists/trunk/linux-2.6/debian/patches/series/1~experimental.1

Copied: dists/trunk/linux-2.6/debian/patches/bugfix/all/patch-2.6.25-git18 (from r11235, /dists/trunk/linux-2.6/debian/patches/bugfix/all/patch-2.6.25-git17)
==============================================================================
--- /dists/trunk/linux-2.6/debian/patches/bugfix/all/patch-2.6.25-git17	(original)
+++ dists/trunk/linux-2.6/debian/patches/bugfix/all/patch-2.6.25-git18	Fri May  2 10:11:15 2008
@@ -6554,6 +6554,20 @@
 -code got a healthy amount of testing and use in practice.
 -
 -	Thomas Gleixner, Ingo Molnar
+diff --git a/Documentation/hwmon/w83l785ts b/Documentation/hwmon/w83l785ts
+index 1841ced..bd1fa9d 100644
+--- a/Documentation/hwmon/w83l785ts
++++ b/Documentation/hwmon/w83l785ts
+@@ -33,7 +33,8 @@ Known Issues
+ ------------
+ 
+ On some systems (Asus), the BIOS is known to interfere with the driver
+-and cause read errors. The driver will retry a given number of times
++and cause read errors. Or maybe the W83L785TS-S chip is simply unreliable,
++we don't really know. The driver will retry a given number of times
+ (5 by default) and then give up, returning the old value (or 0 if
+ there is no old value). It seems to work well enough so that you should
+ not notice anything. Thanks to James Bolt for helping test this feature.
 diff --git a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients
 index bfb0a55..ee75cba 100644
 --- a/Documentation/i2c/writing-clients
@@ -7274,6 +7288,32 @@
  === 8. Tips & Tricks
  
  --- 8.1 Testing for CONFIG_FOO_BAR
+diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt
+index d0ac72c..b8e52c0 100644
+--- a/Documentation/kdump/kdump.txt
++++ b/Documentation/kdump/kdump.txt
+@@ -245,6 +245,8 @@ The syntax is:
+     crashkernel=<range1>:<size1>[,<range2>:<size2>,...][@offset]
+     range=start-[end]
+ 
++    'start' is inclusive and 'end' is exclusive.
++
+ For example:
+ 
+     crashkernel=512M-2G:64M,2G-:128M
+@@ -253,10 +255,11 @@ This would mean:
+ 
+     1) if the RAM is smaller than 512M, then don't reserve anything
+        (this is the "rescue" case)
+-    2) if the RAM size is between 512M and 2G, then reserve 64M
++    2) if the RAM size is between 512M and 2G (exclusive), then reserve 64M
+     3) if the RAM size is larger than 2G, then reserve 128M
+ 
+ 
++
+ Boot into System Kernel
+ =======================
+ 
 diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
 index dafd001..a3c3544 100644
 --- a/Documentation/kernel-parameters.txt
@@ -14269,7 +14309,7 @@
 +clean-files := $(addprefix $(objtree)/,$(targets))
 +
 diff --git a/MAINTAINERS b/MAINTAINERS
-index e467758..c3a533d 100644
+index e467758..cae9001 100644
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
 @@ -486,6 +486,12 @@ M:	kernel at wantstofly.org
@@ -14352,6 +14392,18 @@
  CIRRUS LOGIC CS4280/CS461x SOUNDDRIVER
  P:	Cirrus Logic Corporation (kernel 2.2 driver)
  M:	Cirrus Logic Corporation, Thomas Woller <twoller at crystal.cirrus.com>
+@@ -1186,9 +1196,9 @@ S:	Maintained
+ 
+ CPUSETS
+ P:	Paul Jackson
+-P:	Simon Derr
++P:	Paul Menage
+ M:	pj at sgi.com
+-M:	simon.derr at bull.net
++M:	menage at google.com
+ L:	linux-kernel at vger.kernel.org
+ W:	http://www.bullopensource.org/cpuset/
+ S:	Supported
 @@ -1523,6 +1533,13 @@ L:	bluesmoke-devel at lists.sourceforge.net
  W:	bluesmoke.sourceforge.net
  S:	Maintained
@@ -14366,7 +14418,22 @@
  EEPRO100 NETWORK DRIVER
  P:	Andrey V. Savochkin
  M:	saw at saw.sw.com.sg
-@@ -1626,6 +1643,12 @@ L:	linuxppc-dev at ozlabs.org
+@@ -1540,6 +1557,14 @@ M:	raisch at de.ibm.com
+ L:	general at lists.openfabrics.org
+ S:	Supported
+ 
++EMBEDDED LINUX
++P:	Paul Gortmaker
++M:	paul.gortmaker at windriver.com
++P	David Woodhouse
++M:	dwmw2 at infradead.org
++L:	linux-embedded at vger.kernel.org
++S:	Maintained
++
+ EMULEX LPFC FC SCSI DRIVER
+ P:	James Smart
+ M:	james.smart at emulex.com
+@@ -1626,6 +1651,12 @@ L:	linuxppc-dev at ozlabs.org
  L:	netdev at vger.kernel.org
  S:	Maintained
  
@@ -14379,7 +14446,7 @@
  FREESCALE HIGHSPEED USB DEVICE DRIVER
  P:	Li Yang
  M:	leoli at freescale.com
-@@ -1640,6 +1663,19 @@ L:	netdev at vger.kernel.org
+@@ -1640,6 +1671,19 @@ L:	netdev at vger.kernel.org
  L:	linuxppc-dev at ozlabs.org
  S:	Maintained
  
@@ -14399,7 +14466,7 @@
  FILE LOCKING (flock() and fcntl()/lockf())
  P:	Matthew Wilcox
  M:	matthew at wil.cx
-@@ -2302,6 +2338,13 @@ L:	kvm-devel at lists.sourceforge.net
+@@ -2302,6 +2346,13 @@ L:	kvm-devel at lists.sourceforge.net
  W:	kvm.sourceforge.net
  S:	Supported
  
@@ -14413,7 +14480,7 @@
  KERNEL VIRTUAL MACHINE For Itanium(KVM/IA64)
  P:	Anthony Xu
  M:	anthony.xu at intel.com
-@@ -2311,6 +2354,16 @@ L:	kvm-ia64-devel at lists.sourceforge.net
+@@ -2311,6 +2362,16 @@ L:	kvm-ia64-devel at lists.sourceforge.net
  W:	kvm.sourceforge.net
  S:	Supported
  
@@ -14430,7 +14497,7 @@
  KEXEC
  P:	Eric Biederman
  M:	ebiederm at xmission.com
-@@ -2319,6 +2372,12 @@ L:	linux-kernel at vger.kernel.org
+@@ -2319,6 +2380,12 @@ L:	linux-kernel at vger.kernel.org
  L:	kexec at lists.infradead.org
  S:	Maintained
  
@@ -14443,7 +14510,7 @@
  KPROBES
  P:	Ananth N Mavinakayanahalli
  M:	ananth at in.ibm.com
-@@ -2550,12 +2609,10 @@ W:	http://www.tazenda.demon.co.uk/phil/linux-hp
+@@ -2550,12 +2617,10 @@ W:	http://www.tazenda.demon.co.uk/phil/linux-hp
  S:	Maintained
  
  MAC80211
@@ -14458,7 +14525,7 @@
  L:	linux-wireless at vger.kernel.org
  W:	http://linuxwireless.org/
  T:	git kernel.org:/pub/scm/linux/kernel/git/linville/wireless-2.6.git
-@@ -2646,7 +2703,7 @@ P:	David Howells
+@@ -2646,7 +2711,7 @@ P:	David Howells
  M:	dhowells at redhat.com
  P:	Koichi Yasutake
  M:	yasutake.koichi at jp.panasonic.com
@@ -14467,7 +14534,7 @@
  W:	ftp://ftp.redhat.com/pub/redhat/gnupro/AM33/
  S:	Maintained
  
-@@ -2709,7 +2766,7 @@ M:	rubini at ipvvis.unipv.it
+@@ -2709,7 +2774,7 @@ M:	rubini at ipvvis.unipv.it
  L:	linux-kernel at vger.kernel.org
  S:	Maintained
  
@@ -14476,7 +14543,7 @@
  P:	Jiri Slaby
  M:	jirislaby at gmail.com
  L:	linux-kernel at vger.kernel.org
-@@ -2944,8 +3001,9 @@ P:	Mark Fasheh
+@@ -2944,8 +3009,9 @@ P:	Mark Fasheh
  M:	mfasheh at suse.com
  P:	Joel Becker
  M:	joel.becker at oracle.com
@@ -14487,7 +14554,7 @@
  S:	Supported
  
  OMNIKEY CARDMAN 4000 DRIVER
-@@ -3061,11 +3119,11 @@ L:	linux-pci at atrey.karlin.mff.cuni.cz
+@@ -3061,11 +3127,11 @@ L:	linux-pci at atrey.karlin.mff.cuni.cz
  S:	Supported
  
  PCI SUBSYSTEM
@@ -14502,7 +14569,7 @@
  S:	Supported
  
  PCI HOTPLUG CORE
-@@ -3472,7 +3530,7 @@ P:	Vlad Yasevich
+@@ -3472,7 +3538,7 @@ P:	Vlad Yasevich
  M:	vladislav.yasevich at hp.com
  P:	Sridhar Samudrala
  M:	sri at us.ibm.com
@@ -14511,7 +14578,7 @@
  W:	http://lksctp.sourceforge.net
  S:	Supported
  
-@@ -3526,6 +3584,13 @@ M:	pfg at sgi.com
+@@ -3526,6 +3592,13 @@ M:	pfg at sgi.com
  L:	linux-ia64 at vger.kernel.org
  S:	Supported
  
@@ -14525,7 +14592,7 @@
  SGI VISUAL WORKSTATION 320 AND 540
  P:	Andrey Panin
  M:	pazke at donpac.ru
-@@ -3606,11 +3671,10 @@ M:	mhoffman at lightlink.com
+@@ -3606,11 +3679,10 @@ M:	mhoffman at lightlink.com
  L:	lm-sensors at lm-sensors.org
  S:	Maintained
  
@@ -14541,7 +14608,7 @@
  
  SOFTWARE RAID (Multiple Disks) SUPPORT
  P:	Ingo Molnar
-@@ -3693,42 +3757,6 @@ M:	chrisw at sous-sol.org
+@@ -3693,42 +3765,6 @@ M:	chrisw at sous-sol.org
  L:	stable at kernel.org
  S:	Maintained
  
@@ -14584,7 +14651,7 @@
  SHARP LH SUPPORT (LH7952X & LH7A40X)
  P:	Marc Singer
  M:	elf at buici.com
-@@ -3825,6 +3853,12 @@ P:	Christoph Hellwig
+@@ -3825,6 +3861,12 @@ P:	Christoph Hellwig
  M:	hch at infradead.org
  S:	Maintained
  
@@ -14597,7 +14664,7 @@
  TC CLASSIFIER
  P:	Jamal Hadi Salim
  M:	hadi at cyberus.ca
-@@ -3847,6 +3881,25 @@ M:	andy at greyhouse.net
+@@ -3847,6 +3889,25 @@ M:	andy at greyhouse.net
  L:	netdev at vger.kernel.org
  S:	Supported
  
@@ -14623,7 +14690,7 @@
  TI FLASH MEDIA INTERFACE DRIVER
  P:      Alex Dubov
  M:      oakad at yahoo.com
-@@ -3864,12 +3917,6 @@ P:	Deepak Saxena
+@@ -3864,12 +3925,6 @@ P:	Deepak Saxena
  M:	dsaxena at plexity.net
  S:	Maintained
  
@@ -14636,7 +14703,7 @@
  TIPC NETWORK LAYER
  P:	Per Liden
  M:	per.liden at ericsson.com
-@@ -3903,6 +3950,16 @@ L:	tlinux-users at tce.toshiba-dme.co.jp
+@@ -3903,6 +3958,16 @@ L:	tlinux-users at tce.toshiba-dme.co.jp
  W:	http://www.buzzard.org.uk/toshiba/
  S:	Maintained
  
@@ -14653,7 +14720,7 @@
  TRIDENT 4DWAVE/SIS 7018 PCI AUDIO CORE
  P:	Muli Ben-Yehuda
  M:	mulix at mulix.org
-@@ -3915,6 +3972,12 @@ M:	trivial at kernel.org
+@@ -3915,6 +3980,12 @@ M:	trivial at kernel.org
  L:	linux-kernel at vger.kernel.org
  S:	Maintained
  
@@ -14666,7 +14733,7 @@
  TULIP NETWORK DRIVERS
  P:	Grant Grundler
  M:	grundler at parisc-linux.org
-@@ -4083,6 +4146,20 @@ L:      linux-usb at vger.kernel.org
+@@ -4083,6 +4154,20 @@ L:      linux-usb at vger.kernel.org
  W:	http://www.chello.nl/~j.vreeken/se401/
  S:	Maintained
  
@@ -14687,7 +14754,7 @@
  USB SERIAL CYBERJACK DRIVER
  P:	Matthias Bruestle and Harald Welte
  M:	support at reiner-sct.com
-@@ -4102,20 +4179,6 @@ M:	gregkh at suse.de
+@@ -4102,20 +4187,6 @@ M:	gregkh at suse.de
  L:      linux-usb at vger.kernel.org
  S:	Supported
  
@@ -14708,7 +14775,7 @@
  USB SERIAL EMPEG EMPEG-CAR MARK I/II DRIVER
  P:	Gary Brubaker
  M:	xavyer at ix.netcom.com
-@@ -4218,7 +4281,7 @@ M:	gregkh at suse.de
+@@ -4218,7 +4289,7 @@ M:	gregkh at suse.de
  L:	linux-kernel at vger.kernel.org
  S:	Maintained
  
@@ -14717,7 +14784,7 @@
  P:	OGAWA Hirofumi
  M:	hirofumi at mail.parknet.co.jp
  L:	linux-kernel at vger.kernel.org
-@@ -4263,6 +4326,13 @@ M:	dushistov at mail.ru
+@@ -4263,6 +4334,13 @@ M:	dushistov at mail.ru
  L:	linux-kernel at vger.kernel.org
  S:	Maintained
  
@@ -14731,7 +14798,7 @@
  USB DIAMOND RIO500 DRIVER
  P:	Cesar Miquel
  M:	miquel at df.uba.ar
-@@ -4351,6 +4421,16 @@ L:	linux-wireless at vger.kernel.org
+@@ -4351,6 +4429,16 @@ L:	linux-wireless at vger.kernel.org
  W:	http://oops.ghostprotocols.net:81/blog
  S:	Maintained
  
@@ -14749,7 +14816,7 @@
  P:	Henner Eisen
  M:	eis at baty.hanse.de
 diff --git a/Makefile b/Makefile
-index 39516bf..cb3bb89 100644
+index 39516bf..8890d2f 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -507,6 +507,10 @@ else
@@ -14763,7 +14830,27 @@
  # Force gcc to behave correct even for buggy distributions
  # Arch Makefiles may override this setting
  KBUILD_CFLAGS += $(call cc-option, -fno-stack-protector)
-@@ -1170,8 +1174,10 @@ rpm: include/config/kernel.release FORCE
+@@ -790,7 +794,7 @@ endif # ifdef CONFIG_KALLSYMS
+ quiet_cmd_vmlinux-modpost = LD      $@
+       cmd_vmlinux-modpost = $(LD) $(LDFLAGS) -r -o $@                          \
+ 	 $(vmlinux-init) --start-group $(vmlinux-main) --end-group             \
+-	 $(filter-out $(vmlinux-init) $(vmlinux-main) $(vmlinux-lds) FORCE ,$^)
++	 $(filter-out $(vmlinux-init) $(vmlinux-main) FORCE ,$^)
+ define rule_vmlinux-modpost
+ 	:
+ 	+$(call cmd,vmlinux-modpost)
+@@ -814,7 +818,9 @@ endif
+ ifdef CONFIG_KALLSYMS
+ .tmp_vmlinux1: vmlinux.o
+ endif
+-vmlinux.o: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) FORCE
++
++modpost-init := $(filter-out init/built-in.o, $(vmlinux-init))
++vmlinux.o: $(modpost-init) $(vmlinux-main) FORCE
+ 	$(call if_changed_rule,vmlinux-modpost)
+ 
+ # The actual objects are generated when descending, 
+@@ -1170,8 +1176,10 @@ rpm: include/config/kernel.release FORCE
  # Brief documentation of the typical targets used
  # ---------------------------------------------------------------------------
  
@@ -14775,7 +14862,7 @@
  
  help:
  	@echo  'Cleaning targets:'
-@@ -1217,14 +1223,19 @@ help:
+@@ -1217,14 +1225,19 @@ help:
  	@echo  'Documentation targets:'
  	@$(MAKE) -f $(srctree)/Documentation/DocBook/Makefile dochelp
  	@echo  ''
@@ -14797,7 +14884,7 @@
  
  	@echo  '  make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build'
  	@echo  '  make V=2   [targets] 2 => give reason for rebuild of target'
-@@ -1236,6 +1247,20 @@ help:
+@@ -1236,6 +1249,20 @@ help:
  	@echo  'For further info see the ./README file'
  
  
@@ -14818,7 +14905,7 @@
  # Documentation targets
  # ---------------------------------------------------------------------------
  %docs: scripts_basic FORCE
-@@ -1396,7 +1421,7 @@ define xtags
+@@ -1396,7 +1423,7 @@ define xtags
  	    $(all-kconfigs) | xargs $1 -a \
  		--langdef=kconfig \
  		--language-force=kconfig \
@@ -14827,7 +14914,7 @@
  	    $(all-defconfigs) | xargs -r $1 -a \
  		--langdef=dotconfig \
  		--language-force=dotconfig \
-@@ -1404,7 +1429,7 @@ define xtags
+@@ -1404,7 +1431,7 @@ define xtags
  	elif $1 --version 2>&1 | grep -iq emacs; then \
  	    $(all-sources) | xargs $1 -a; \
  	    $(all-kconfigs) | xargs $1 -a \
@@ -14836,7 +14923,7 @@
  	    $(all-defconfigs) | xargs -r $1 -a \
  		--regex='/^#?[ \t]?\(CONFIG_[a-zA-Z0-9_]+\)/\1/'; \
  	else \
-@@ -1538,8 +1563,7 @@ quiet_cmd_rmdirs = $(if $(wildcard $(rm-dirs)),CLEAN   $(wildcard $(rm-dirs)))
+@@ -1538,8 +1565,7 @@ quiet_cmd_rmdirs = $(if $(wildcard $(rm-dirs)),CLEAN   $(wildcard $(rm-dirs)))
  quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN   $(wildcard $(rm-files)))
        cmd_rmfiles = rm -f $(rm-files)
  
@@ -91167,6 +91254,16 @@
  	pci_read_bridge_bases(bus);
  
  	if (bus->number == 0) {
+diff --git a/arch/frv/mm/Makefile b/arch/frv/mm/Makefile
+index fb8b1d8..1bca5ab 100644
+--- a/arch/frv/mm/Makefile
++++ b/arch/frv/mm/Makefile
+@@ -6,4 +6,4 @@ obj-y := init.o kmap.o
+ 
+ obj-$(CONFIG_MMU) += \
+ 	pgalloc.o highmem.o fault.o extable.o cache-page.o tlb-flush.o tlb-miss.o \
+-	mmu-context.o dma-alloc.o unaligned.o elf-fdpic.o
++	mmu-context.o dma-alloc.o elf-fdpic.o
 diff --git a/arch/frv/mm/highmem.c b/arch/frv/mm/highmem.c
 index 7f77db7..eadd076 100644
 --- a/arch/frv/mm/highmem.c
@@ -96733,11 +96830,10 @@
 +}
 diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c
 new file mode 100644
-index 0000000..6df0732
+index 0000000..318b811
 --- /dev/null
 +++ b/arch/ia64/kvm/kvm-ia64.c
-@@ -0,0 +1,1806 @@
-+
+@@ -0,0 +1,1805 @@
 +/*
 + * kvm_ia64.c: Basic KVM suppport On Itanium series processors
 + *
@@ -97170,7 +97266,7 @@
 +	if (itc_diff < 0)
 +		itc_diff = -itc_diff;
 +
-+	expires = div64_64(itc_diff, cyc_per_usec);
++	expires = div64_u64(itc_diff, cyc_per_usec);
 +	kt = ktime_set(0, 1000 * expires);
 +	vcpu->arch.ht_active = 1;
 +	hrtimer_start(p_ht, kt, HRTIMER_MODE_ABS);
@@ -115956,7 +116052,7 @@
  obj-$(CONFIG_MODULES)	+= module.o
  obj-$(CONFIG_COMEMPCI)	+= comempci.o
 diff --git a/arch/m68knommu/kernel/asm-offsets.c b/arch/m68knommu/kernel/asm-offsets.c
-index d97b89b..fd0c685 100644
+index d97b89b..c785d07 100644
 --- a/arch/m68knommu/kernel/asm-offsets.c
 +++ b/arch/m68knommu/kernel/asm-offsets.c
 @@ -13,15 +13,11 @@
@@ -115976,6 +116072,38 @@
  int main(void)
  {
  	/* offsets into the task struct */
+@@ -91,6 +87,7 @@ int main(void)
+ 	DEFINE(TI_TASK, offsetof(struct thread_info, task));
+ 	DEFINE(TI_EXECDOMAIN, offsetof(struct thread_info, exec_domain));
+ 	DEFINE(TI_FLAGS, offsetof(struct thread_info, flags));
++	DEFINE(TI_PREEMPTCOUNT, offsetof(struct thread_info, preempt_count));
+ 	DEFINE(TI_CPU, offsetof(struct thread_info, cpu));
+ 
+ 	return 0;
+diff --git a/arch/m68knommu/kernel/entry.S b/arch/m68knommu/kernel/entry.S
+index 1e7ea6a..f4782d2 100644
+--- a/arch/m68knommu/kernel/entry.S
++++ b/arch/m68knommu/kernel/entry.S
+@@ -32,6 +32,7 @@
+ #include <asm/segment.h>
+ #include <asm/asm-offsets.h>
+ #include <asm/entry.h>
++#include <asm/unistd.h>
+ 
+ .text
+ 
+@@ -140,3 +141,11 @@ ENTRY(sys_rt_sigreturn)
+ 	RESTORE_SWITCH_STACK
+ 	rts
+ 
++ENTRY(ret_from_user_signal)
++	moveq #__NR_sigreturn,%d0
++	trap #0
++
++ENTRY(ret_from_user_rt_signal)
++	move #__NR_rt_sigreturn,%d0
++	trap #0
++
 diff --git a/arch/m68knommu/kernel/m68k_ksyms.c b/arch/m68knommu/kernel/m68k_ksyms.c
 index 53fad14..39fe0a7 100644
 --- a/arch/m68knommu/kernel/m68k_ksyms.c
@@ -116139,6 +116267,250 @@
 -{
 -	return waking_non_zero_trylock(sem);
 -}
+diff --git a/arch/m68knommu/kernel/setup.c b/arch/m68knommu/kernel/setup.c
+index d6f0200..03f4fe6 100644
+--- a/arch/m68knommu/kernel/setup.c
++++ b/arch/m68knommu/kernel/setup.c
+@@ -162,7 +162,7 @@ void __init setup_arch(char **cmdline_p)
+ 	printk(KERN_INFO "DragonEngine II board support by Georges Menie\n");
+ #endif
+ #ifdef CONFIG_M5235EVB
+-	printk(KERN_INFO "Motorola M5235EVB support (C)2005 Syn-tech Systems, Inc. (Jate Sujjavanich)");
++	printk(KERN_INFO "Motorola M5235EVB support (C)2005 Syn-tech Systems, Inc. (Jate Sujjavanich)\n");
+ #endif
+ 
+ #ifdef DEBUG
+diff --git a/arch/m68knommu/kernel/signal.c b/arch/m68knommu/kernel/signal.c
+index 7037137..bbfcae9 100644
+--- a/arch/m68knommu/kernel/signal.c
++++ b/arch/m68knommu/kernel/signal.c
+@@ -51,6 +51,8 @@
+ 
+ #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
+ 
++void ret_from_user_signal(void);
++void ret_from_user_rt_signal(void);
+ asmlinkage int do_signal(sigset_t *oldset, struct pt_regs *regs);
+ 
+ /*
+@@ -539,10 +541,6 @@ static inline int rt_setup_ucontext(struct ucontext *uc, struct pt_regs *regs)
+ 	return err;
+ }
+ 
+-static inline void push_cache (unsigned long vaddr)
+-{
+-}
+-
+ static inline void *
+ get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size)
+ {
+@@ -586,16 +584,11 @@ static void setup_frame (int sig, struct k_sigaction *ka,
+ 	err |= copy_to_user (&frame->sc, &context, sizeof(context));
+ 
+ 	/* Set up to return from userspace.  */
+-	err |= __put_user(frame->retcode, &frame->pretcode);
+-	/* moveq #,d0; trap #0 */
+-	err |= __put_user(0x70004e40 + (__NR_sigreturn << 16),
+-			  (long *)(frame->retcode));
++	err |= __put_user((void *) ret_from_user_signal, &frame->pretcode);
+ 
+ 	if (err)
+ 		goto give_sigsegv;
+ 
+-	push_cache ((unsigned long) &frame->retcode);
+-
+ 	/* Set up registers for signal handler */
+ 	wrusp ((unsigned long) frame);
+ 	regs->pc = (unsigned long) ka->sa.sa_handler;
+@@ -655,17 +648,11 @@ static void setup_rt_frame (int sig, struct k_sigaction *ka, siginfo_t *info,
+ 	err |= copy_to_user (&frame->uc.uc_sigmask, set, sizeof(*set));
+ 
+ 	/* Set up to return from userspace.  */
+-	err |= __put_user(frame->retcode, &frame->pretcode);
+-	/* moveq #,d0; notb d0; trap #0 */
+-	err |= __put_user(0x70004600 + ((__NR_rt_sigreturn ^ 0xff) << 16),
+-			  (long *)(frame->retcode + 0));
+-	err |= __put_user(0x4e40, (short *)(frame->retcode + 4));
++	err |= __put_user((void *) ret_from_user_rt_signal, &frame->pretcode);
+ 
+ 	if (err)
+ 		goto give_sigsegv;
+ 
+-	push_cache ((unsigned long) &frame->retcode);
+-
+ 	/* Set up registers for signal handler */
+ 	wrusp ((unsigned long) frame);
+ 	regs->pc = (unsigned long) ka->sa.sa_handler;
+diff --git a/arch/m68knommu/kernel/traps.c b/arch/m68knommu/kernel/traps.c
+index 437a061..ec9aea6 100644
+--- a/arch/m68knommu/kernel/traps.c
++++ b/arch/m68knommu/kernel/traps.c
+@@ -28,6 +28,7 @@
+ #include <linux/linkage.h>
+ #include <linux/init.h>
+ #include <linux/ptrace.h>
++#include <linux/kallsyms.h>
+ 
+ #include <asm/setup.h>
+ #include <asm/fpu.h>
+@@ -102,56 +103,47 @@ asmlinkage void buserr_c(struct frame *fp)
+ 	force_sig(SIGSEGV, current);
+ }
+ 
+-
+ int kstack_depth_to_print = 48;
+ 
+-void show_stack(struct task_struct *task, unsigned long *stack)
++static void __show_stack(struct task_struct *task, unsigned long *stack)
+ {
+ 	unsigned long *endstack, addr;
+-	extern char _start, _etext;
++	unsigned long *last_stack;
+ 	int i;
+ 
+-	if (!stack) {
+-		if (task)
+-			stack = (unsigned long *)task->thread.ksp;
+-		else
+-			stack = (unsigned long *)&stack;
+-	}
++	if (!stack)
++		stack = (unsigned long *)task->thread.ksp;
+ 
+ 	addr = (unsigned long) stack;
+ 	endstack = (unsigned long *) PAGE_ALIGN(addr);
+ 
+ 	printk(KERN_EMERG "Stack from %08lx:", (unsigned long)stack);
+ 	for (i = 0; i < kstack_depth_to_print; i++) {
+-		if (stack + 1 > endstack)
++		if (stack + 1 + i > endstack)
+ 			break;
+ 		if (i % 8 == 0)
+ 			printk("\n" KERN_EMERG "       ");
+-		printk(" %08lx", *stack++);
++		printk(" %08lx", *(stack + i));
+ 	}
+ 	printk("\n");
+ 
+-	printk(KERN_EMERG "Call Trace:");
+-	i = 0;
+-	while (stack + 1 <= endstack) {
+-		addr = *stack++;
+-		/*
+-		 * If the address is either in the text segment of the
+-		 * kernel, or in the region which contains vmalloc'ed
+-		 * memory, it *may* be the address of a calling
+-		 * routine; if so, print it so that someone tracing
+-		 * down the cause of the crash will be able to figure
+-		 * out the call path that was taken.
+-		 */
+-		if (((addr >= (unsigned long) &_start) &&
+-		     (addr <= (unsigned long) &_etext))) {
+-			if (i % 4 == 0)
+-				printk("\n" KERN_EMERG "       ");
+-			printk(" [<%08lx>]", addr);
+-			i++;
+-		}
++#ifdef CONFIG_FRAME_POINTER
++	printk(KERN_EMERG "Call Trace:\n");
++
++	last_stack = stack - 1;
++	while (stack <= endstack && stack > last_stack) {
++
++		addr = *(stack + 1);
++		printk(KERN_EMERG " [%08lx] ", addr);
++		print_symbol(KERN_CONT "%s\n", addr);
++
++		last_stack = stack;
++		stack = (unsigned long *)*stack;
+ 	}
+ 	printk("\n");
++#else
++	printk(KERN_EMERG "CONFIG_FRAME_POINTER disabled, no symbolic call trace\n");
++#endif
+ }
+ 
+ void bad_super_trap(struct frame *fp)
+@@ -298,19 +290,47 @@ asmlinkage void set_esp0(unsigned long ssp)
+ 	current->thread.esp0 = ssp;
+ }
+ 
+-
+ /*
+  * The architecture-independent backtrace generator
+  */
+ void dump_stack(void)
+ {
+-	unsigned long stack;
++	/*
++	 * We need frame pointers for this little trick, which works as follows:
++	 *
++	 * +------------+ 0x00
++	 * | Next SP	|	-> 0x0c
++	 * +------------+ 0x04
++	 * | Caller	|
++	 * +------------+ 0x08
++	 * | Local vars	|	-> our stack var
++	 * +------------+ 0x0c
++	 * | Next SP	|	-> 0x18, that is what we pass to show_stack()
++	 * +------------+ 0x10
++	 * | Caller	|
++	 * +------------+ 0x14
++	 * | Local vars	|
++	 * +------------+ 0x18
++	 * | ...	|
++	 * +------------+
++	 */
+ 
+-	show_stack(current, &stack);
+-}
++	unsigned long *stack;
+ 
++	stack = (unsigned long *)&stack;
++	stack++;
++	__show_stack(current, stack);
++}
+ EXPORT_SYMBOL(dump_stack);
+ 
++void show_stack(struct task_struct *task, unsigned long *stack)
++{
++	if (!stack && !task)
++		dump_stack();
++	else
++		__show_stack(task, stack);
++}
++
+ #ifdef CONFIG_M68KFPU_EMU
+ asmlinkage void fpemu_signal(int signal, int code, void *addr)
+ {
+diff --git a/arch/m68knommu/kernel/vmlinux.lds.S b/arch/m68knommu/kernel/vmlinux.lds.S
+index b44edb0..5592e0b 100644
+--- a/arch/m68knommu/kernel/vmlinux.lds.S
++++ b/arch/m68knommu/kernel/vmlinux.lds.S
+@@ -64,6 +64,7 @@ SECTIONS {
+ 		_stext = . ;
+ 		TEXT_TEXT
+ 		SCHED_TEXT
++		LOCK_TEXT
+         	*(.text.lock)
+ 
+ 		. = ALIGN(16);          /* Exception table              */
+@@ -73,6 +74,7 @@ SECTIONS {
+ 
+ 		*(.rodata) *(.rodata.*)
+ 		*(__vermagic)		/* Kernel version magic */
++		*(__markers_strings)
+ 		*(.rodata1)
+ 		*(.rodata.str1.1)
+ 
+@@ -182,6 +184,7 @@ SECTIONS {
+ 		*(COMMON)
+ 		. = ALIGN(4) ;
+ 		_ebss = . ;
++	 	_end = . ;
+ 	} > BSS
+ 
+ }
 diff --git a/arch/m68knommu/lib/Makefile b/arch/m68knommu/lib/Makefile
 index e051a79..d94d709 100644
 --- a/arch/m68knommu/lib/Makefile
@@ -116221,6 +116593,377 @@
 -	movel (%sp)+,%a0
 -	rts
 -
+diff --git a/arch/m68knommu/platform/5206e/config.c b/arch/m68knommu/platform/5206e/config.c
+index a6692e9..d01a5d2 100644
+--- a/arch/m68knommu/platform/5206e/config.c
++++ b/arch/m68knommu/platform/5206e/config.c
+@@ -48,7 +48,7 @@ static struct platform_device *m5206e_devices[] __initdata = {
+ 
+ /***************************************************************************/
+ 
+-static void __init m5206_uart_init_line(int line, int irq)
++static void __init m5206e_uart_init_line(int line, int irq)
+ {
+ 	if (line == 0) {
+ 		writel(MCFSIM_ICR_LEVEL6 | MCFSIM_ICR_PRI1, MCF_MBAR + MCFSIM_UART1ICR);
+diff --git a/arch/m68knommu/platform/5272/config.c b/arch/m68knommu/platform/5272/config.c
+index 2aca599..230bae6 100644
+--- a/arch/m68knommu/platform/5272/config.c
++++ b/arch/m68knommu/platform/5272/config.c
+@@ -139,10 +139,6 @@ void __init config_BSP(char *commandp, int size)
+ 	/* Copy command line from FLASH to local buffer... */
+ 	memcpy(commandp, (char *) 0xf0004000, size);
+ 	commandp[size-1] = 0;
+-#elif defined(CONFIG_MTD_KeyTechnology)
+-	/* Copy command line from FLASH to local buffer... */
+-	memcpy(commandp, (char *) 0xffe06000, size);
+-	commandp[size-1] = 0;
+ #elif defined(CONFIG_CANCam)
+ 	/* Copy command line from FLASH to local buffer... */
+ 	memcpy(commandp, (char *) 0xf0010000, size);
+diff --git a/arch/m68knommu/platform/528x/config.c b/arch/m68knommu/platform/528x/config.c
+index 036e1b7..dfdb5c2 100644
+--- a/arch/m68knommu/platform/528x/config.c
++++ b/arch/m68knommu/platform/528x/config.c
+@@ -26,9 +26,240 @@
+ #include <asm/mcfuart.h>
+ #include <asm/mcfqspi.h>
+ 
++#ifdef CONFIG_MTD_PARTITIONS
++#include <linux/mtd/partitions.h>
++#endif
++
+ /***************************************************************************/
+ 
+ void coldfire_reset(void);
++static void coldfire_qspi_cs_control(u8 cs, u8 command);
++
++/***************************************************************************/
++
++#if defined(CONFIG_SPI)
++
++#if defined(CONFIG_WILDFIRE)
++#define SPI_NUM_CHIPSELECTS 	0x02
++#define SPI_PAR_VAL		0x07  /* Enable DIN, DOUT, CLK */
++#define SPI_CS_MASK		0x18
++
++#define FLASH_BLOCKSIZE		(1024*64)
++#define FLASH_NUMBLOCKS		16
++#define FLASH_TYPE		"m25p80"
++
++#define M25P80_CS		0
++#define MMC_CS			1
++
++#ifdef CONFIG_MTD_PARTITIONS
++static struct mtd_partition stm25p_partitions[] = {
++	/* sflash */
++	[0] = {
++		.name = "stm25p80",
++		.offset = 0x00000000,
++		.size = FLASH_BLOCKSIZE * FLASH_NUMBLOCKS,
++		.mask_flags = 0
++	}
++};
++
++#endif
++
++#elif defined(CONFIG_WILDFIREMOD)
++
++#define SPI_NUM_CHIPSELECTS	0x08
++#define SPI_PAR_VAL		0x07  /* Enable DIN, DOUT, CLK */
++#define SPI_CS_MASK		0x78
++
++#define FLASH_BLOCKSIZE		(1024*64)
++#define FLASH_NUMBLOCKS		64
++#define FLASH_TYPE		"m25p32"
++/* Reserve 1M for the kernel parition */
++#define FLASH_KERNEL_SIZE   (1024 * 1024)
++
++#define M25P80_CS		5
++#define MMC_CS			6
++
++#ifdef CONFIG_MTD_PARTITIONS
++static struct mtd_partition stm25p_partitions[] = {
++	/* sflash */
++	[0] = {
++		.name = "kernel",
++		.offset = FLASH_BLOCKSIZE * FLASH_NUMBLOCKS - FLASH_KERNEL_SIZE,
++		.size = FLASH_KERNEL_SIZE,
++		.mask_flags = 0
++	},
++	[1] = {
++		.name = "image",
++		.offset = 0x00000000,
++		.size = FLASH_BLOCKSIZE * FLASH_NUMBLOCKS - FLASH_KERNEL_SIZE,
++		.mask_flags = 0
++	},
++	[2] = {
++		.name = "all",
++		.offset = 0x00000000,
++		.size = FLASH_BLOCKSIZE * FLASH_NUMBLOCKS,
++		.mask_flags = 0
++	}
++};
++#endif
++
++#else
++#define SPI_NUM_CHIPSELECTS 	0x04
++#define SPI_PAR_VAL		0x7F  /* Enable DIN, DOUT, CLK, CS0 - CS4 */
++#endif
++
++#ifdef MMC_CS
++static struct coldfire_spi_chip flash_chip_info = {
++	.mode = SPI_MODE_0,
++	.bits_per_word = 16,
++	.del_cs_to_clk = 17,
++	.del_after_trans = 1,
++	.void_write_data = 0
++};
++
++static struct coldfire_spi_chip mmc_chip_info = {
++	.mode = SPI_MODE_0,
++	.bits_per_word = 16,
++	.del_cs_to_clk = 17,
++	.del_after_trans = 1,
++	.void_write_data = 0xFFFF
++};
++#endif
++
++#ifdef M25P80_CS
++static struct flash_platform_data stm25p80_platform_data = {
++	.name = "ST M25P80 SPI Flash chip",
++#ifdef CONFIG_MTD_PARTITIONS
++	.parts = stm25p_partitions,
++	.nr_parts = sizeof(stm25p_partitions) / sizeof(*stm25p_partitions),
++#endif
++	.type = FLASH_TYPE
++};
++#endif
++
++static struct spi_board_info spi_board_info[] __initdata = {
++#ifdef M25P80_CS
++	{
++		.modalias = "m25p80",
++		.max_speed_hz = 16000000,
++		.bus_num = 1,
++		.chip_select = M25P80_CS,
++		.platform_data = &stm25p80_platform_data,
++		.controller_data = &flash_chip_info
++	},
++#endif
++#ifdef MMC_CS
++	{
++		.modalias = "mmc_spi",
++		.max_speed_hz = 16000000,
++		.bus_num = 1,
++		.chip_select = MMC_CS,
++		.controller_data = &mmc_chip_info
++	}
++#endif
++};
++
++static struct coldfire_spi_master coldfire_master_info = {
++	.bus_num = 1,
++	.num_chipselect = SPI_NUM_CHIPSELECTS,
++	.irq_source = MCF5282_QSPI_IRQ_SOURCE,
++	.irq_vector = MCF5282_QSPI_IRQ_VECTOR,
++	.irq_mask = ((0x01 << MCF5282_QSPI_IRQ_SOURCE) | 0x01),
++	.irq_lp = 0x2B,  /* Level 5 and Priority 3 */
++	.par_val = SPI_PAR_VAL,
++	.cs_control = coldfire_qspi_cs_control,
++};
++
++static struct resource coldfire_spi_resources[] = {
++	[0] = {
++		.name = "qspi-par",
++		.start = MCF5282_QSPI_PAR,
++		.end = MCF5282_QSPI_PAR,
++		.flags = IORESOURCE_MEM
++	},
++
++	[1] = {
++		.name = "qspi-module",
++		.start = MCF5282_QSPI_QMR,
++		.end = MCF5282_QSPI_QMR + 0x18,
++		.flags = IORESOURCE_MEM
++	},
++
++	[2] = {
++		.name = "qspi-int-level",
++		.start = MCF5282_INTC0 + MCFINTC_ICR0 + MCF5282_QSPI_IRQ_SOURCE,
++		.end = MCF5282_INTC0 + MCFINTC_ICR0 + MCF5282_QSPI_IRQ_SOURCE,
++		.flags = IORESOURCE_MEM
++	},
++
++	[3] = {
++		.name = "qspi-int-mask",
++		.start = MCF5282_INTC0 + MCFINTC_IMRL,
++		.end = MCF5282_INTC0 + MCFINTC_IMRL,
++		.flags = IORESOURCE_MEM
++	}
++};
++
++static struct platform_device coldfire_spi = {
++	.name = "spi_coldfire",
++	.id = -1,
++	.resource = coldfire_spi_resources,
++	.num_resources = ARRAY_SIZE(coldfire_spi_resources),
++	.dev = {
++		.platform_data = &coldfire_master_info,
++	}
++};
++
++static void coldfire_qspi_cs_control(u8 cs, u8 command)
++{
++	u8 cs_bit = ((0x01 << cs) << 3) & SPI_CS_MASK;
++
++#if defined(CONFIG_WILDFIRE)
++	u8 cs_mask = ~(((0x01 << cs) << 3) & SPI_CS_MASK);
++#endif
++#if defined(CONFIG_WILDFIREMOD)
++	u8 cs_mask = (cs << 3) & SPI_CS_MASK;
++#endif
++
++	/*
++	 * Don't do anything if the chip select is not
++	 * one of the port qs pins.
++	 */
++	if (command & QSPI_CS_INIT) {
++#if defined(CONFIG_WILDFIRE)
++		MCF5282_GPIO_DDRQS  |= cs_bit;
++		MCF5282_GPIO_PQSPAR &= ~cs_bit;
++#endif
++
++#if defined(CONFIG_WILDFIREMOD)
++		MCF5282_GPIO_DDRQS  |= SPI_CS_MASK;
++		MCF5282_GPIO_PQSPAR &= ~SPI_CS_MASK;
++#endif
++	}
++
++	if (command & QSPI_CS_ASSERT) {
++		MCF5282_GPIO_PORTQS &= ~SPI_CS_MASK;
++		MCF5282_GPIO_PORTQS |= cs_mask;
++	} else if (command & QSPI_CS_DROP) {
++		MCF5282_GPIO_PORTQS |= SPI_CS_MASK;
++	}
++}
++
++static int __init spi_dev_init(void)
++{
++	int retval;
++
++	retval = platform_device_register(&coldfire_spi);
++	if (retval < 0)
++		return retval;
++
++	if (ARRAY_SIZE(spi_board_info))
++		retval = spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
++
++	return retval;
++}
++
++#endif /* CONFIG_SPI */
+ 
+ /***************************************************************************/
+ 
+@@ -111,10 +342,43 @@ void mcf_autovector(unsigned int vec)
+ 
+ /***************************************************************************/
+ 
++#ifdef CONFIG_WILDFIRE
++void wildfire_halt(void)
++{
++	writeb(0, 0x30000007);
++	writeb(0x2, 0x30000007);
++}
++#endif
++
++#ifdef CONFIG_WILDFIREMOD
++void wildfiremod_halt(void)
++{
++	printk(KERN_INFO "WildFireMod hibernating...\n");
++
++	/* Set portE.5 to Digital IO */
++	MCF5282_GPIO_PEPAR &= ~(1 << (5 * 2));
++
++	/* Make portE.5 an output */
++	MCF5282_GPIO_DDRE |= (1 << 5);
++
++	/* Now toggle portE.5 from low to high */
++	MCF5282_GPIO_PORTE &= ~(1 << 5);
++	MCF5282_GPIO_PORTE |= (1 << 5);
++
++	printk(KERN_EMERG "Failed to hibernate. Halting!\n");
++}
++#endif
++
+ void __init config_BSP(char *commandp, int size)
+ {
+ 	mcf_disableall();
+-	mach_reset = coldfire_reset;
++
++#ifdef CONFIG_WILDFIRE
++	mach_halt = wildfire_halt;
++#endif
++#ifdef CONFIG_WILDFIREMOD
++	mach_halt = wildfiremod_halt;
++#endif
+ }
+ 
+ /***************************************************************************/
+diff --git a/arch/m68knommu/platform/5307/config.c b/arch/m68knommu/platform/5307/config.c
+index 92dc862..11cff66 100644
+--- a/arch/m68knommu/platform/5307/config.c
++++ b/arch/m68knommu/platform/5307/config.c
+@@ -124,8 +124,7 @@ void __init config_BSP(char *commandp, int size)
+ 	mcf_setimr(MCFSIM_IMR_MASKALL);
+ 
+ #if defined(CONFIG_NETtel) || defined(CONFIG_eLIA) || \
+-      defined(CONFIG_DISKtel) || defined(CONFIG_SECUREEDGEMP3) || \
+-      defined(CONFIG_CLEOPATRA)
++    defined(CONFIG_SECUREEDGEMP3) || defined(CONFIG_CLEOPATRA)
+ 	/* Copy command line from FLASH to local buffer... */
+ 	memcpy(commandp, (char *) 0xf0004000, size);
+ 	commandp[size-1] = 0;
+diff --git a/arch/m68knommu/platform/coldfire/entry.S b/arch/m68knommu/platform/coldfire/entry.S
+index 111b66d..1e3c0dc 100644
+--- a/arch/m68knommu/platform/coldfire/entry.S
++++ b/arch/m68knommu/platform/coldfire/entry.S
+@@ -103,9 +103,26 @@ ret_from_signal:
+ 	addql	#4,%sp
+ 
+ ret_from_exception:
++	move	#0x2700,%sr		/* disable intrs */
+ 	btst	#5,%sp@(PT_SR)		/* check if returning to kernel */
+ 	jeq	Luser_return		/* if so, skip resched, signals */
+ 
++#ifdef CONFIG_PREEMPT
++	movel	%sp,%d1			/* get thread_info pointer */
++	andl	#-THREAD_SIZE,%d1	/* at base of kernel stack */
++	movel	%d1,%a0
++	movel	%a0@(TI_FLAGS),%d1	/* get thread_info->flags */
++	andl	#_TIF_NEED_RESCHED,%d1
++	jeq	Lkernel_return
++
++	movel	%a0@(TI_PREEMPTCOUNT),%d1
++	cmpl	#0,%d1
++	jne	Lkernel_return
++
++	pea	Lkernel_return
++	jmp	preempt_schedule_irq	/* preempt the kernel */
++#endif
++
+ Lkernel_return:
+ 	moveml	%sp@,%d1-%d5/%a0-%a2
+ 	lea	%sp@(32),%sp		/* space for 8 regs */
+@@ -140,6 +157,7 @@ Lreturn:
+ 
+ Lwork_to_do:
+ 	movel	%a0@(TI_FLAGS),%d1	/* get thread_info->flags */
++	move	#0x2000,%sr		/* enable intrs again */
+ 	btst	#TIF_NEED_RESCHED,%d1
+ 	jne	reschedule
+ 
 diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
 index 8724ed3..e5a7c5d 100644
 --- a/arch/mips/Kconfig
@@ -118598,6 +119341,52 @@
 +	DEFINE(IC_IRQ_CPUSTAT_T, sizeof(irq_cpustat_t));
 +	BLANK();
  }
+diff --git a/arch/mips/kernel/binfmt_elfn32.c b/arch/mips/kernel/binfmt_elfn32.c
+index 77db347..9fdd8bc 100644
+--- a/arch/mips/kernel/binfmt_elfn32.c
++++ b/arch/mips/kernel/binfmt_elfn32.c
+@@ -54,6 +54,7 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
+ #include <linux/module.h>
+ #include <linux/elfcore.h>
+ #include <linux/compat.h>
++#include <linux/math64.h>
+ 
+ #define elf_prstatus elf_prstatus32
+ struct elf_prstatus32
+@@ -102,8 +103,8 @@ jiffies_to_compat_timeval(unsigned long jiffies, struct compat_timeval *value)
+ 	 * one divide.
+ 	 */
+ 	u64 nsec = (u64)jiffies * TICK_NSEC;
+-	long rem;
+-	value->tv_sec = div_long_long_rem(nsec, NSEC_PER_SEC, &rem);
++	u32 rem;
++	value->tv_sec = div_u64_rem(nsec, NSEC_PER_SEC, &rem);
+ 	value->tv_usec = rem / NSEC_PER_USEC;
+ }
+ 
+diff --git a/arch/mips/kernel/binfmt_elfo32.c b/arch/mips/kernel/binfmt_elfo32.c
+index 08f4cd7..e1333d7 100644
+--- a/arch/mips/kernel/binfmt_elfo32.c
++++ b/arch/mips/kernel/binfmt_elfo32.c
+@@ -56,6 +56,7 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
+ #include <linux/module.h>
+ #include <linux/elfcore.h>
+ #include <linux/compat.h>
++#include <linux/math64.h>
+ 
+ #define elf_prstatus elf_prstatus32
+ struct elf_prstatus32
+@@ -104,8 +105,8 @@ jiffies_to_compat_timeval(unsigned long jiffies, struct compat_timeval *value)
+ 	 * one divide.
+ 	 */
+ 	u64 nsec = (u64)jiffies * TICK_NSEC;
+-	long rem;
+-	value->tv_sec = div_long_long_rem(nsec, NSEC_PER_SEC, &rem);
++	u32 rem;
++	value->tv_sec = div_u64_rem(nsec, NSEC_PER_SEC, &rem);
+ 	value->tv_usec = rem / NSEC_PER_USEC;
+ }
+ 
 diff --git a/arch/mips/kernel/cevt-ds1287.c b/arch/mips/kernel/cevt-ds1287.c
 new file mode 100644
 index 0000000..df4acb6
@@ -226233,6 +227022,28 @@
  #include <asm/syscalls.h>
  #include <asm/time.h>
  #include <asm/unistd.h>
+diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
+index 3b26fbd..73401e8 100644
+--- a/arch/powerpc/kernel/time.c
++++ b/arch/powerpc/kernel/time.c
+@@ -149,7 +149,7 @@ EXPORT_SYMBOL(tb_ticks_per_sec);	/* for cputime_t conversions */
+ u64 tb_to_xs;
+ unsigned tb_to_us;
+ 
+-#define TICKLEN_SCALE	TICK_LENGTH_SHIFT
++#define TICKLEN_SCALE	NTP_SCALE_SHIFT
+ u64 last_tick_len;	/* units are ns / 2^TICKLEN_SCALE */
+ u64 ticklen_to_xs;	/* 0.64 fraction */
+ 
+@@ -1007,8 +1007,6 @@ void __init time_init(void)
+ 	vdso_data->stamp_xsec = (u64) xtime.tv_sec * XSEC_PER_SEC;
+ 	vdso_data->tb_to_xs = tb_to_xs;
+ 
+-	time_freq = 0;
+-
+ 	write_sequnlock_irqrestore(&xtime_lock, flags);
+ 
+ 	/* Register the clocksource, if we're not running on iSeries */
 diff --git a/arch/powerpc/kernel/udbg.c b/arch/powerpc/kernel/udbg.c
 index 7aad620..7d6c9bb 100644
 --- a/arch/powerpc/kernel/udbg.c
@@ -321736,7 +322547,7 @@
  obj-$(CONFIG_KVM_INTEL) += kvm-intel.o
 diff --git a/arch/x86/kvm/i8254.c b/arch/x86/kvm/i8254.c
 new file mode 100644
-index 0000000..361e316
+index 0000000..4c943ea
 --- /dev/null
 +++ b/arch/x86/kvm/i8254.c
 @@ -0,0 +1,611 @@
@@ -321777,7 +322588,7 @@
 +#include "i8254.h"
 +
 +#ifndef CONFIG_X86_64
-+#define mod_64(x, y) ((x) - (y) * div64_64(x, y))
++#define mod_64(x, y) ((x) - (y) * div64_u64(x, y))
 +#else
 +#define mod_64(x, y) ((x) % (y))
 +#endif
@@ -321802,8 +322613,8 @@
 +	rl = (u64)u.l.low * (u64)b;
 +	rh = (u64)u.l.high * (u64)b;
 +	rh += (rl >> 32);
-+	res.l.high = div64_64(rh, c);
-+	res.l.low = div64_64(((mod_64(rh, c) << 32) + (rl & 0xffffffff)), c);
++	res.l.high = div64_u64(rh, c);
++	res.l.low = div64_u64(((mod_64(rh, c) << 32) + (rl & 0xffffffff)), c);
 +	return res.ll;
 +}
 +
@@ -322489,9 +323300,24 @@
  
  #endif
 diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
-index 68a6b15..57ac4e4 100644
+index 68a6b15..36809d7 100644
 --- a/arch/x86/kvm/lapic.c
 +++ b/arch/x86/kvm/lapic.c
+@@ -25,13 +25,13 @@
+ #include <linux/hrtimer.h>
+ #include <linux/io.h>
+ #include <linux/module.h>
++#include <linux/math64.h>
+ #include <asm/processor.h>
+ #include <asm/msr.h>
+ #include <asm/page.h>
+ #include <asm/current.h>
+ #include <asm/apicdef.h>
+ #include <asm/atomic.h>
+-#include <asm/div64.h>
+ #include "irq.h"
+ 
+ #define PRId64 "d"
 @@ -338,10 +338,10 @@ static int __apic_accept_irq(struct kvm_lapic *apic, int delivery_mode,
  		} else
  			apic_clear_vector(vector, apic->regs + APIC_TMR);
@@ -322532,6 +323358,17 @@
  			if (waitqueue_active(&vcpu->wq))
  				wake_up_interruptible(&vcpu->wq);
  		}
+@@ -526,8 +526,8 @@ static u32 apic_get_tmcct(struct kvm_lapic *apic)
+ 	} else
+ 		passed = ktime_sub(now, apic->timer.last_update);
+ 
+-	counter_passed = div64_64(ktime_to_ns(passed),
+-				  (APIC_BUS_CYCLE_NS * apic->timer.divide_count));
++	counter_passed = div64_u64(ktime_to_ns(passed),
++				   (APIC_BUS_CYCLE_NS * apic->timer.divide_count));
+ 
+ 	if (counter_passed > tmcct) {
+ 		if (unlikely(!apic_lvtt_period(apic))) {
 @@ -658,7 +658,7 @@ static void start_apic_timer(struct kvm_lapic *apic)
  	apic_debug("%s: bus cycle is %" PRId64 "ns, now 0x%016"
  			   PRIx64 ", "
@@ -337833,10 +338670,20 @@
  endif # BLOCK
  
 diff --git a/block/blk-barrier.c b/block/blk-barrier.c
-index 55c5f1f..66e5528 100644
+index 55c5f1f..a09ead1 100644
 --- a/block/blk-barrier.c
 +++ b/block/blk-barrier.c
-@@ -53,7 +53,7 @@ EXPORT_SYMBOL(blk_queue_ordered);
+@@ -26,8 +26,7 @@ int blk_queue_ordered(struct request_queue *q, unsigned ordered,
+ {
+ 	if (ordered & (QUEUE_ORDERED_PREFLUSH | QUEUE_ORDERED_POSTFLUSH) &&
+ 	    prepare_flush_fn == NULL) {
+-		printk(KERN_ERR "%s: prepare_flush_fn required\n",
+-								__FUNCTION__);
++		printk(KERN_ERR "%s: prepare_flush_fn required\n", __func__);
+ 		return -EINVAL;
+ 	}
+ 
+@@ -53,7 +52,7 @@ EXPORT_SYMBOL(blk_queue_ordered);
  /*
   * Cache flushing for ordered writes handling
   */
@@ -337845,7 +338692,7 @@
  {
  	if (!q->ordseq)
  		return 0;
-@@ -143,10 +143,8 @@ static void queue_flush(struct request_queue *q, unsigned which)
+@@ -143,10 +142,8 @@ static void queue_flush(struct request_queue *q, unsigned which)
  		end_io = post_flush_end_io;
  	}
  
@@ -337857,7 +338704,7 @@
  	rq->rq_disk = q->bar_rq.rq_disk;
  	rq->end_io = end_io;
  	q->prepare_flush_fn(q, rq);
-@@ -167,14 +165,11 @@ static inline struct request *start_ordered(struct request_queue *q,
+@@ -167,14 +164,11 @@ static inline struct request *start_ordered(struct request_queue *q,
  	blkdev_dequeue_request(rq);
  	q->orig_bar_rq = rq;
  	rq = &q->bar_rq;
@@ -337874,7 +338721,7 @@
  	rq->end_io = bar_end_io;
  
 diff --git a/block/blk-core.c b/block/blk-core.c
-index 2a438a9..5d09f8c 100644
+index 2a438a9..b754a4a 100644
 --- a/block/blk-core.c
 +++ b/block/blk-core.c
 @@ -107,41 +107,21 @@ struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev)
@@ -337924,6 +338771,15 @@
  
  static void req_bio_endio(struct request *rq, struct bio *bio,
  			  unsigned int nbytes, int error)
+@@ -156,7 +136,7 @@ static void req_bio_endio(struct request *rq, struct bio *bio,
+ 
+ 		if (unlikely(nbytes > bio->bi_size)) {
+ 			printk(KERN_ERR "%s: want %u bytes done, %u left\n",
+-			       __FUNCTION__, nbytes, bio->bi_size);
++			       __func__, nbytes, bio->bi_size);
+ 			nbytes = bio->bi_size;
+ 		}
+ 
 @@ -194,7 +174,7 @@ void blk_dump_rq_flags(struct request *rq, char *msg)
  
  	if (blk_pc_request(rq)) {
@@ -338055,6 +338911,16 @@
  	blk_add_trace_generic(q, bio, rw, BLK_TA_GETRQ);
  out:
  	return rq;
+@@ -1573,8 +1566,7 @@ static int __end_that_request_first(struct request *req, int error,
+ 			if (unlikely(bio->bi_idx >= bio->bi_vcnt)) {
+ 				blk_dump_rq_flags(req, "__end_that");
+ 				printk(KERN_ERR "%s: bio idx %d >= vcnt %d\n",
+-						__FUNCTION__, bio->bi_idx,
+-						bio->bi_vcnt);
++				       __func__, bio->bi_idx, bio->bi_vcnt);
+ 				break;
+ 			}
+ 
 diff --git a/block/blk-map.c b/block/blk-map.c
 index c07d9c8..0b1af5a 100644
 --- a/block/blk-map.c
@@ -338230,7 +339096,7 @@
  		if (rq->cmd_flags & REQ_RW)
  			memset(q->dma_drain_buffer, 0, q->dma_drain_size);
 diff --git a/block/blk-settings.c b/block/blk-settings.c
-index 5713f7e..6089384 100644
+index 5713f7e..bb93d4c 100644
 --- a/block/blk-settings.c
 +++ b/block/blk-settings.c
 @@ -14,7 +14,6 @@ unsigned long blk_max_low_pfn;
@@ -338241,6 +339107,50 @@
  
  /**
   * blk_queue_prep_rq - set a prepare_request function for queue
+@@ -169,8 +168,8 @@ void blk_queue_max_sectors(struct request_queue *q, unsigned int max_sectors)
+ {
+ 	if ((max_sectors << 9) < PAGE_CACHE_SIZE) {
+ 		max_sectors = 1 << (PAGE_CACHE_SHIFT - 9);
+-		printk(KERN_INFO "%s: set to minimum %d\n", __FUNCTION__,
+-							max_sectors);
++		printk(KERN_INFO "%s: set to minimum %d\n",
++		       __func__, max_sectors);
+ 	}
+ 
+ 	if (BLK_DEF_MAX_SECTORS > max_sectors)
+@@ -197,8 +196,8 @@ void blk_queue_max_phys_segments(struct request_queue *q,
+ {
+ 	if (!max_segments) {
+ 		max_segments = 1;
+-		printk(KERN_INFO "%s: set to minimum %d\n", __FUNCTION__,
+-							max_segments);
++		printk(KERN_INFO "%s: set to minimum %d\n",
++		       __func__, max_segments);
+ 	}
+ 
+ 	q->max_phys_segments = max_segments;
+@@ -221,8 +220,8 @@ void blk_queue_max_hw_segments(struct request_queue *q,
+ {
+ 	if (!max_segments) {
+ 		max_segments = 1;
+-		printk(KERN_INFO "%s: set to minimum %d\n", __FUNCTION__,
+-							max_segments);
++		printk(KERN_INFO "%s: set to minimum %d\n",
++		       __func__, max_segments);
+ 	}
+ 
+ 	q->max_hw_segments = max_segments;
+@@ -242,8 +241,8 @@ void blk_queue_max_segment_size(struct request_queue *q, unsigned int max_size)
+ {
+ 	if (max_size < PAGE_CACHE_SIZE) {
+ 		max_size = PAGE_CACHE_SIZE;
+-		printk(KERN_INFO "%s: set to minimum %d\n", __FUNCTION__,
+-							max_size);
++		printk(KERN_INFO "%s: set to minimum %d\n",
++		       __func__, max_size);
+ 	}
+ 
+ 	q->max_segment_size = max_size;
 @@ -288,7 +287,7 @@ void blk_queue_stack_limits(struct request_queue *t, struct request_queue *b)
  	t->max_segment_size = min(t->max_segment_size, b->max_segment_size);
  	t->hardsect_size = max(t->hardsect_size, b->hardsect_size);
@@ -338250,6 +339160,17 @@
  }
  EXPORT_SYMBOL(blk_queue_stack_limits);
  
+@@ -358,8 +357,8 @@ void blk_queue_segment_boundary(struct request_queue *q, unsigned long mask)
+ {
+ 	if (mask < PAGE_CACHE_SIZE - 1) {
+ 		mask = PAGE_CACHE_SIZE - 1;
+-		printk(KERN_INFO "%s: set to minimum %lx\n", __FUNCTION__,
+-							mask);
++		printk(KERN_INFO "%s: set to minimum %lx\n",
++		       __func__, mask);
+ 	}
+ 
+ 	q->seg_boundary_mask = mask;
 diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
 index 54d0db1..e85c401 100644
 --- a/block/blk-sysfs.c
@@ -338328,7 +339249,7 @@
  
  		kobject_uevent(&q->kobj, KOBJ_REMOVE);
 diff --git a/block/blk-tag.c b/block/blk-tag.c
-index 4780a46..e176ddb 100644
+index 4780a46..de64e04 100644
 --- a/block/blk-tag.c
 +++ b/block/blk-tag.c
 @@ -70,7 +70,7 @@ void __blk_queue_free_tags(struct request_queue *q)
@@ -338349,6 +339270,15 @@
  }
  EXPORT_SYMBOL(blk_queue_free_tags);
  
+@@ -112,7 +112,7 @@ init_tag_map(struct request_queue *q, struct blk_queue_tag *tags, int depth)
+ 	if (q && depth > q->nr_requests * 2) {
+ 		depth = q->nr_requests * 2;
+ 		printk(KERN_ERR "%s: adjusted depth to %d\n",
+-				__FUNCTION__, depth);
++		       __func__, depth);
+ 	}
+ 
+ 	tag_index = kzalloc(depth * sizeof(struct request *), GFP_ATOMIC);
 @@ -188,7 +188,7 @@ int blk_queue_init_tags(struct request_queue *q, int depth,
  		rc = blk_queue_resize_tags(q, depth);
  		if (rc)
@@ -338367,6 +339297,31 @@
  	INIT_LIST_HEAD(&q->tag_busy_list);
  	return 0;
  fail:
+@@ -296,13 +296,13 @@ void blk_queue_end_tag(struct request_queue *q, struct request *rq)
+ 
+ 	if (unlikely(bqt->tag_index[tag] == NULL))
+ 		printk(KERN_ERR "%s: tag %d is missing\n",
+-		       __FUNCTION__, tag);
++		       __func__, tag);
+ 
+ 	bqt->tag_index[tag] = NULL;
+ 
+ 	if (unlikely(!test_bit(tag, bqt->tag_map))) {
+ 		printk(KERN_ERR "%s: attempt to clear non-busy tag (%d)\n",
+-		       __FUNCTION__, tag);
++		       __func__, tag);
+ 		return;
+ 	}
+ 	/*
+@@ -340,7 +340,7 @@ int blk_queue_start_tag(struct request_queue *q, struct request *rq)
+ 	if (unlikely((rq->cmd_flags & REQ_QUEUED))) {
+ 		printk(KERN_ERR
+ 		       "%s: request %p for device [%s] already tagged %d",
+-		       __FUNCTION__, rq,
++		       __func__, rq,
+ 		       rq->rq_disk ? rq->rq_disk->disk_name : "?", rq->tag);
+ 		BUG();
+ 	}
 diff --git a/block/blk.h b/block/blk.h
 index ec9120f..59776ab 100644
 --- a/block/blk.h
@@ -338380,7 +339335,7 @@
  void blk_rq_bio_prep(struct request_queue *q, struct request *rq,
  			struct bio *bio);
 diff --git a/block/bsg.c b/block/bsg.c
-index 8917c51..23ea4fd 100644
+index 8917c51..fa796b6 100644
 --- a/block/bsg.c
 +++ b/block/bsg.c
 @@ -37,7 +37,6 @@ struct bsg_device {
@@ -338391,6 +339346,15 @@
  	int queued_cmds;
  	int done_cmds;
  	wait_queue_head_t wq_done;
+@@ -58,7 +57,7 @@ enum {
+ #undef BSG_DEBUG
+ 
+ #ifdef BSG_DEBUG
+-#define dprintk(fmt, args...) printk(KERN_ERR "%s: " fmt, __FUNCTION__, ##args)
++#define dprintk(fmt, args...) printk(KERN_ERR "%s: " fmt, __func__, ##args)
+ #else
+ #define dprintk(fmt, args...)
+ #endif
 @@ -368,7 +367,7 @@ static struct bsg_command *bsg_next_done_cmd(struct bsg_device *bd)
  
  	spin_lock_irq(&bd->lock);
@@ -338625,7 +339589,7 @@
  	case 0x330:
  	/* 0x02 -- Floppy ioctls */
 diff --git a/block/elevator.c b/block/elevator.c
-index 88318c3..ac5310e 100644
+index 88318c3..980f8ae 100644
 --- a/block/elevator.c
 +++ b/block/elevator.c
 @@ -69,7 +69,7 @@ static int elv_iosched_allow_merge(struct request *rq, struct bio *bio)
@@ -338647,7 +339611,26 @@
  	/*
  	 * See if our hash lookup can find a potential backmerge.
  	 */
-@@ -1070,7 +1073,7 @@ static int elevator_switch(struct request_queue *q, struct elevator_type *new_e)
+@@ -647,7 +650,7 @@ void elv_insert(struct request_queue *q, struct request *rq, int where)
+ 
+ 	default:
+ 		printk(KERN_ERR "%s: bad insertion point %d\n",
+-		       __FUNCTION__, where);
++		       __func__, where);
+ 		BUG();
+ 	}
+ 
+@@ -805,8 +808,7 @@ struct request *elv_next_request(struct request_queue *q)
+ 			rq->cmd_flags |= REQ_QUIET;
+ 			end_queued_request(rq, 0);
+ 		} else {
+-			printk(KERN_ERR "%s: bad return=%d\n", __FUNCTION__,
+-								ret);
++			printk(KERN_ERR "%s: bad return=%d\n", __func__, ret);
+ 			break;
+ 		}
+ 	}
+@@ -1070,7 +1072,7 @@ static int elevator_switch(struct request_queue *q, struct elevator_type *new_e)
  	 */
  	spin_lock_irq(q->queue_lock);
  
@@ -338656,7 +339639,7 @@
  
  	elv_drain_elevator(q);
  
-@@ -1104,7 +1107,10 @@ static int elevator_switch(struct request_queue *q, struct elevator_type *new_e)
+@@ -1104,7 +1106,10 @@ static int elevator_switch(struct request_queue *q, struct elevator_type *new_e)
  	 * finally exit old elevator and turn off BYPASS.
  	 */
  	elevator_exit(old_elevator);
@@ -338668,7 +339651,7 @@
  	return 1;
  
  fail_register:
-@@ -1115,7 +1121,11 @@ fail_register:
+@@ -1115,7 +1120,11 @@ fail_register:
  	elevator_exit(e);
  	q->elevator = old_elevator;
  	elv_register_queue(q);
@@ -340024,6 +341007,23 @@
  				if (dma_wait_for_async_tx(depend_tx) ==
  					DMA_ERROR)
  					panic("%s: DMA_ERROR waiting for "
+diff --git a/crypto/authenc.c b/crypto/authenc.c
+index ed8ac5a..4b22676 100644
+--- a/crypto/authenc.c
++++ b/crypto/authenc.c
+@@ -217,9 +217,10 @@ static void crypto_authenc_givencrypt_done(struct crypto_async_request *req,
+ 					   int err)
+ {
+ 	if (!err) {
+-		struct aead_givcrypt_request *greq = req->data;
++		struct aead_request *areq = req->data;
++		struct skcipher_givcrypt_request *greq = aead_request_ctx(areq);
+ 
+-		err = crypto_authenc_genicv(&greq->areq, greq->giv, 0);
++		err = crypto_authenc_genicv(areq, greq->giv, 0);
+ 	}
+ 
+ 	aead_request_complete(req->data, err);
 diff --git a/crypto/blowfish.c b/crypto/blowfish.c
 index 80c3fd8..6f5b487 100644
 --- a/crypto/blowfish.c
@@ -340132,6 +341132,22 @@
  
  MODULE_AUTHOR("Clay Haapala <chaapala at cisco.com>");
  MODULE_DESCRIPTION("CRC32c (Castagnoli) calculations wrapper for lib/crc32c");
+diff --git a/crypto/cryptd.c b/crypto/cryptd.c
+index 2504252..b150de5 100644
+--- a/crypto/cryptd.c
++++ b/crypto/cryptd.c
+@@ -190,8 +190,10 @@ static struct crypto_instance *cryptd_alloc_instance(struct crypto_alg *alg,
+ 	int err;
+ 
+ 	inst = kzalloc(sizeof(*inst) + sizeof(*ctx), GFP_KERNEL);
+-	if (IS_ERR(inst))
++	if (!inst) {
++		inst = ERR_PTR(-ENOMEM);
+ 		goto out;
++	}
+ 
+ 	err = -ENAMETOOLONG;
+ 	if (snprintf(inst->alg.cra_driver_name, CRYPTO_MAX_ALG_NAME,
 diff --git a/crypto/crypto_null.c b/crypto/crypto_null.c
 index ff7b3de..1f7d530 100644
 --- a/crypto/crypto_null.c
@@ -340576,6 +341592,20 @@
  
  MODULE_LICENSE("GPL");
  MODULE_DESCRIPTION("DES & Triple DES EDE Cipher Algorithms");
+diff --git a/crypto/eseqiv.c b/crypto/eseqiv.c
+index b14f14e..881d309 100644
+--- a/crypto/eseqiv.c
++++ b/crypto/eseqiv.c
+@@ -136,7 +136,8 @@ static int eseqiv_givencrypt(struct skcipher_givcrypt_request *req)
+ 	}
+ 
+ 	ablkcipher_request_set_crypt(subreq, reqctx->src, dst,
+-				     req->creq.nbytes, req->creq.info);
++				     req->creq.nbytes + ivsize,
++				     req->creq.info);
+ 
+ 	memcpy(req->creq.info, ctx->salt, ivsize);
+ 
 diff --git a/crypto/fcrypt.c b/crypto/fcrypt.c
 index a32cb68..1302f4c 100644
 --- a/crypto/fcrypt.c
@@ -391545,9 +392575,18 @@
  		cleanup_glue_dir(dev, new_parent_kobj);
  		put_device(new_parent);
 diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
-index 499b003..6fe4174 100644
+index 499b003..e38dfed 100644
 --- a/drivers/base/cpu.c
 +++ b/drivers/base/cpu.c
+@@ -18,7 +18,7 @@ struct sysdev_class cpu_sysdev_class = {
+ };
+ EXPORT_SYMBOL(cpu_sysdev_class);
+ 
+-static struct sys_device *cpu_sys_devices[NR_CPUS];
++static DEFINE_PER_CPU(struct sys_device *, cpu_sys_devices);
+ 
+ #ifdef CONFIG_HOTPLUG_CPU
+ static ssize_t show_online(struct sys_device *dev, char *buf)
 @@ -28,7 +28,7 @@ static ssize_t show_online(struct sys_device *dev, char *buf)
  	return sprintf(buf, "%u\n", !!cpu_online(cpu->sysdev.id));
  }
@@ -391566,6 +392605,15 @@
  {
  	sysdev_create_file(&cpu->sysdev, &attr_online);
  }
+@@ -68,7 +68,7 @@ void unregister_cpu(struct cpu *cpu)
+ 	sysdev_remove_file(&cpu->sysdev, &attr_online);
+ 
+ 	sysdev_unregister(&cpu->sysdev);
+-	cpu_sys_devices[logical_cpu] = NULL;
++	per_cpu(cpu_sys_devices, logical_cpu) = NULL;
+ 	return;
+ }
+ #else /* ... !CONFIG_HOTPLUG_CPU */
 @@ -103,6 +103,51 @@ static SYSDEV_ATTR(crash_notes, 0400, show_crash_notes, NULL);
  #endif
  
@@ -391618,6 +392666,26 @@
   * register_cpu - Setup a sysfs device for a CPU.
   * @cpu - cpu->hotpluggable field set to 1 will generate a control file in
   *	  sysfs for this CPU.
+@@ -122,7 +167,7 @@ int __cpuinit register_cpu(struct cpu *cpu, int num)
+ 	if (!error && cpu->hotpluggable)
+ 		register_cpu_control(cpu);
+ 	if (!error)
+-		cpu_sys_devices[num] = &cpu->sysdev;
++		per_cpu(cpu_sys_devices, num) = &cpu->sysdev;
+ 	if (!error)
+ 		register_cpu_under_node(num, cpu_to_node(num));
+ 
+@@ -135,8 +180,8 @@ int __cpuinit register_cpu(struct cpu *cpu, int num)
+ 
+ struct sys_device *get_cpu_sysdev(unsigned cpu)
+ {
+-	if (cpu < NR_CPUS)
+-		return cpu_sys_devices[cpu];
++	if (cpu < nr_cpu_ids && cpu_possible(cpu))
++		return per_cpu(cpu_sys_devices, cpu);
+ 	else
+ 		return NULL;
+ }
 @@ -147,6 +192,9 @@ int __init cpu_dev_init(void)
  	int err;
  
@@ -392661,10 +393729,10 @@
  	list_for_each_entry_safe(brd, next, &brd_devices, brd_list)
  		brd_del_one(brd);
 diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
-index 9c9627e..e539be5 100644
+index 9c9627e..e336b05 100644
 --- a/drivers/block/cciss.c
 +++ b/drivers/block/cciss.c
-@@ -425,7 +425,7 @@ static void __devinit cciss_procinit(int i)
+@@ -425,16 +425,12 @@ static void __devinit cciss_procinit(int i)
  	struct proc_dir_entry *pde;
  
  	if (proc_cciss == NULL)
@@ -392672,8 +393740,19 @@
 +		proc_cciss = proc_mkdir("driver/cciss", NULL);
  	if (!proc_cciss)
  		return;
- 	pde = proc_create(hba[i]->devname, S_IWUSR | S_IRUSR | S_IRGRP |
-@@ -1349,6 +1349,10 @@ static void cciss_update_drive_info(int ctlr, int drv_index)
+-	pde = proc_create(hba[i]->devname, S_IWUSR | S_IRUSR | S_IRGRP |
++	pde = proc_create_data(hba[i]->devname, S_IWUSR | S_IRUSR | S_IRGRP |
+ 					S_IROTH, proc_cciss,
+-					&cciss_proc_fops);
+-	if (!pde)
+-		return;
+-
+-	pde->data = hba[i];
++					&cciss_proc_fops, hba[i]);
+ }
+ #endif				/* CONFIG_PROC_FS */
+ 
+@@ -1349,6 +1345,10 @@ static void cciss_update_drive_info(int ctlr, int drv_index)
  		spin_lock_irqsave(CCISS_LOCK(h->ctlr), flags);
  		h->drv[drv_index].busy_configuring = 1;
  		spin_unlock_irqrestore(CCISS_LOCK(h->ctlr), flags);
@@ -392684,7 +393763,7 @@
  		ret = deregister_disk(h->gendisk[drv_index],
  				      &h->drv[drv_index], 0);
  		h->drv[drv_index].busy_configuring = 0;
-@@ -1419,6 +1423,10 @@ geo_inq:
+@@ -1419,6 +1419,10 @@ geo_inq:
  		blk_queue_hardsect_size(disk->queue,
  					hba[ctlr]->drv[drv_index].block_size);
  
@@ -392695,7 +393774,7 @@
  		h->drv[drv_index].queue = disk->queue;
  		add_disk(disk);
  	}
-@@ -3520,10 +3528,17 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
+@@ -3520,10 +3524,17 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
  			continue;
  		blk_queue_hardsect_size(q, drv->block_size);
  		set_capacity(disk, drv->nr_blocks);
@@ -392714,7 +393793,7 @@
  	return 1;
  
        clean4:
-@@ -3685,7 +3700,7 @@ static void __exit cciss_cleanup(void)
+@@ -3685,7 +3696,7 @@ static void __exit cciss_cleanup(void)
  			cciss_remove_one(hba[i]->pdev);
  		}
  	}
@@ -403226,10 +404305,19 @@
  static struct platform_driver omap_rng_driver = {
  	.driver = {
 diff --git a/drivers/char/i8k.c b/drivers/char/i8k.c
-index 8609b82..f49037b 100644
+index 8609b82..b60d425 100644
 --- a/drivers/char/i8k.c
 +++ b/drivers/char/i8k.c
-@@ -82,6 +82,7 @@ static int i8k_ioctl(struct inode *, struct file *, unsigned int,
+@@ -77,11 +77,16 @@ static int power_status;
+ module_param(power_status, bool, 0600);
+ MODULE_PARM_DESC(power_status, "Report power status in /proc/i8k");
+ 
++static int fan_mult = I8K_FAN_MULT;
++module_param(fan_mult, int, 0);
++MODULE_PARM_DESC(fan_mult, "Factor to multiply fan speed with");
++
+ static int i8k_open_fs(struct inode *inode, struct file *file);
+ static int i8k_ioctl(struct inode *, struct file *, unsigned int,
  		     unsigned long);
  
  static const struct file_operations i8k_fops = {
@@ -403237,7 +404325,16 @@
  	.open		= i8k_open_fs,
  	.read		= seq_read,
  	.llseek		= seq_lseek,
-@@ -554,13 +555,10 @@ static int __init i8k_init(void)
+@@ -238,7 +243,7 @@ static int i8k_get_fan_speed(int fan)
+ 	struct smm_regs regs = { .eax = I8K_SMM_GET_SPEED, };
+ 
+ 	regs.ebx = fan & 0xff;
+-	return i8k_smm(&regs) ? : (regs.eax & 0xffff) * I8K_FAN_MULT;
++	return i8k_smm(&regs) ? : (regs.eax & 0xffff) * fan_mult;
+ }
+ 
+ /*
+@@ -554,13 +559,10 @@ static int __init i8k_init(void)
  		return -ENODEV;
  
  	/* Register the proc entry */
@@ -410466,10 +411563,19 @@
  }
  subsys_initcall(misc_init);
 diff --git a/drivers/char/mmtimer.c b/drivers/char/mmtimer.c
-index e60a74c..d83db5d 100644
+index e60a74c..192961f 100644
 --- a/drivers/char/mmtimer.c
 +++ b/drivers/char/mmtimer.c
-@@ -74,9 +74,8 @@ static const struct file_operations mmtimer_fops = {
+@@ -30,6 +30,8 @@
+ #include <linux/miscdevice.h>
+ #include <linux/posix-timers.h>
+ #include <linux/interrupt.h>
++#include <linux/time.h>
++#include <linux/math64.h>
+ 
+ #include <asm/uaccess.h>
+ #include <asm/sn/addrs.h>
+@@ -74,9 +76,8 @@ static const struct file_operations mmtimer_fops = {
   * We only have comparison registers RTC1-4 currently available per
   * node.  RTC0 is used by SAL.
   */
@@ -410480,7 +411586,7 @@
  {
  	if (HUB_L((unsigned long *)LOCAL_MMR_ADDR(SH_EVENT_OCCURRED)) &
  			SH_EVENT_OCCURRED_RTC1_INT_MASK << comparator)
-@@ -84,15 +83,16 @@ static int inline mmtimer_int_pending(int comparator)
+@@ -84,15 +85,16 @@ static int inline mmtimer_int_pending(int comparator)
  	else
  		return 0;
  }
@@ -410499,7 +411605,7 @@
  {
  	u64 val;
  
-@@ -106,7 +106,7 @@ static void inline mmtimer_setup_int_0(u64 expires)
+@@ -106,7 +108,7 @@ static void inline mmtimer_setup_int_0(u64 expires)
  	mmtimer_clr_int_pending(0);
  
  	val = ((u64)SGI_MMTIMER_VECTOR << SH_RTC1_INT_CONFIG_IDX_SHFT) |
@@ -410508,7 +411614,7 @@
  			SH_RTC1_INT_CONFIG_PID_SHFT);
  
  	/* Set configuration */
-@@ -122,7 +122,7 @@ static void inline mmtimer_setup_int_0(u64 expires)
+@@ -122,7 +124,7 @@ static void inline mmtimer_setup_int_0(u64 expires)
  }
  
  /* Setup timer on comparator RTC2 */
@@ -410517,7 +411623,7 @@
  {
  	u64 val;
  
-@@ -133,7 +133,7 @@ static void inline mmtimer_setup_int_1(u64 expires)
+@@ -133,7 +135,7 @@ static void inline mmtimer_setup_int_1(u64 expires)
  	mmtimer_clr_int_pending(1);
  
  	val = ((u64)SGI_MMTIMER_VECTOR << SH_RTC2_INT_CONFIG_IDX_SHFT) |
@@ -410526,7 +411632,7 @@
  			SH_RTC2_INT_CONFIG_PID_SHFT);
  
  	HUB_S((u64 *)LOCAL_MMR_ADDR(SH_RTC2_INT_CONFIG), val);
-@@ -144,7 +144,7 @@ static void inline mmtimer_setup_int_1(u64 expires)
+@@ -144,7 +146,7 @@ static void inline mmtimer_setup_int_1(u64 expires)
  }
  
  /* Setup timer on comparator RTC3 */
@@ -410535,7 +411641,7 @@
  {
  	u64 val;
  
-@@ -155,7 +155,7 @@ static void inline mmtimer_setup_int_2(u64 expires)
+@@ -155,7 +157,7 @@ static void inline mmtimer_setup_int_2(u64 expires)
  	mmtimer_clr_int_pending(2);
  
  	val = ((u64)SGI_MMTIMER_VECTOR << SH_RTC3_INT_CONFIG_IDX_SHFT) |
@@ -410544,7 +411650,7 @@
  			SH_RTC3_INT_CONFIG_PID_SHFT);
  
  	HUB_S((u64 *)LOCAL_MMR_ADDR(SH_RTC3_INT_CONFIG), val);
-@@ -170,22 +170,22 @@ static void inline mmtimer_setup_int_2(u64 expires)
+@@ -170,22 +172,22 @@ static void inline mmtimer_setup_int_2(u64 expires)
   * in order to insure that the setup succeeds in a deterministic time frame.
   * It will check if the interrupt setup succeeded.
   */
@@ -410572,7 +411678,7 @@
  		return 1;
  
  	/*
-@@ -195,7 +195,7 @@ static int inline mmtimer_setup(int comparator, unsigned long expires)
+@@ -195,7 +197,7 @@ static int inline mmtimer_setup(int comparator, unsigned long expires)
  	return mmtimer_int_pending(comparator);
  }
  
@@ -410581,7 +411687,7 @@
  {
  	switch (comparator) {
  	case 0:
-@@ -216,18 +216,124 @@ static int inline mmtimer_disable_int(long nasid, int comparator)
+@@ -216,18 +218,124 @@ static int inline mmtimer_disable_int(long nasid, int comparator)
  	return 0;
  }
  
@@ -410713,7 +411819,32 @@
  
  /**
   * mmtimer_ioctl - ioctl interface for /dev/mmtimer
-@@ -390,35 +496,6 @@ static int sgi_clock_set(clockid_t clockid, struct timespec *tp)
+@@ -366,8 +474,8 @@ static int sgi_clock_get(clockid_t clockid, struct timespec *tp)
+ 
+ 	nsec = rtc_time() * sgi_clock_period
+ 			+ sgi_clock_offset.tv_nsec;
+-	tp->tv_sec = div_long_long_rem(nsec, NSEC_PER_SEC, &tp->tv_nsec)
+-			+ sgi_clock_offset.tv_sec;
++	*tp = ns_to_timespec(nsec);
++	tp->tv_sec += sgi_clock_offset.tv_sec;
+ 	return 0;
+ };
+ 
+@@ -375,11 +483,11 @@ static int sgi_clock_set(clockid_t clockid, struct timespec *tp)
+ {
+ 
+ 	u64 nsec;
+-	u64 rem;
++	u32 rem;
+ 
+ 	nsec = rtc_time() * sgi_clock_period;
+ 
+-	sgi_clock_offset.tv_sec = tp->tv_sec - div_long_long_rem(nsec, NSEC_PER_SEC, &rem);
++	sgi_clock_offset.tv_sec = tp->tv_sec - div_u64_rem(nsec, NSEC_PER_SEC, &rem);
+ 
+ 	if (rem <= tp->tv_nsec)
+ 		sgi_clock_offset.tv_nsec = tp->tv_sec - rem;
+@@ -390,35 +498,6 @@ static int sgi_clock_set(clockid_t clockid, struct timespec *tp)
  	return 0;
  }
  
@@ -410749,7 +411880,7 @@
  /**
   * mmtimer_interrupt - timer interrupt handler
   * @irq: irq received
-@@ -435,71 +512,75 @@ static int inline reschedule_periodic_timer(mmtimer_t *x)
+@@ -435,71 +514,75 @@ static int inline reschedule_periodic_timer(mmtimer_t *x)
  static irqreturn_t
  mmtimer_interrupt(int irq, void *dev_id)
  {
@@ -410866,7 +411997,7 @@
  }
  
  static int sgi_timer_create(struct k_itimer *timer)
-@@ -516,19 +597,50 @@ static int sgi_timer_create(struct k_itimer *timer)
+@@ -516,25 +599,53 @@ static int sgi_timer_create(struct k_itimer *timer)
   */
  static int sgi_timer_del(struct k_itimer *timr)
  {
@@ -410924,7 +412055,25 @@
  	return 0;
  }
  
-@@ -557,12 +669,11 @@ static int sgi_timer_set(struct k_itimer *timr, int flags,
+-#define timespec_to_ns(x) ((x).tv_nsec + (x).tv_sec * NSEC_PER_SEC)
+-#define ns_to_timespec(ts, nsec) (ts).tv_sec = div_long_long_rem(nsec, NSEC_PER_SEC, &(ts).tv_nsec)
+-
+ /* Assumption: it_lock is already held with irq's disabled */
+ static void sgi_timer_get(struct k_itimer *timr, struct itimerspec *cur_setting)
+ {
+@@ -547,9 +658,8 @@ static void sgi_timer_get(struct k_itimer *timr, struct itimerspec *cur_setting)
+ 		return;
+ 	}
+ 
+-	ns_to_timespec(cur_setting->it_interval, timr->it.mmtimer.incr * sgi_clock_period);
+-	ns_to_timespec(cur_setting->it_value, (timr->it.mmtimer.expires - rtc_time())* sgi_clock_period);
+-	return;
++	cur_setting->it_interval = ns_to_timespec(timr->it.mmtimer.incr * sgi_clock_period);
++	cur_setting->it_value = ns_to_timespec((timr->it.mmtimer.expires - rtc_time()) * sgi_clock_period);
+ }
+ 
+ 
+@@ -557,30 +667,33 @@ static int sgi_timer_set(struct k_itimer *timr, int flags,
  	struct itimerspec * new_setting,
  	struct itimerspec * old_setting)
  {
@@ -410939,7 +412088,14 @@
  
  	if (old_setting)
  		sgi_timer_get(timr, old_setting);
-@@ -575,6 +686,10 @@ static int sgi_timer_set(struct k_itimer *timr, int flags,
+ 
+ 	sgi_timer_del(timr);
+-	when = timespec_to_ns(new_setting->it_value);
+-	period = timespec_to_ns(new_setting->it_interval);
++	when = timespec_to_ns(&new_setting->it_value);
++	period = timespec_to_ns(&new_setting->it_interval);
+ 
+ 	if (when == 0)
  		/* Clear timer */
  		return 0;
  
@@ -410950,7 +412106,14 @@
  	if (flags & TIMER_ABSTIME) {
  		struct timespec n;
  		unsigned long now;
-@@ -604,47 +719,38 @@ static int sgi_timer_set(struct k_itimer *timr, int flags,
+ 
+ 		getnstimeofday(&n);
+-		now = timespec_to_ns(n);
++		now = timespec_to_ns(&n);
+ 		if (when > now)
+ 			when -= now;
+ 		else
+@@ -604,47 +717,38 @@ static int sgi_timer_set(struct k_itimer *timr, int flags,
  	preempt_disable();
  
  	nodeid =  cpu_to_node(smp_processor_id());
@@ -411019,7 +412182,7 @@
  
  	preempt_enable();
  
-@@ -669,7 +775,6 @@ static struct k_clock sgi_clock = {
+@@ -669,7 +773,6 @@ static struct k_clock sgi_clock = {
   */
  static int __init mmtimer_init(void)
  {
@@ -411027,7 +412190,7 @@
  	cnodeid_t node, maxn = -1;
  
  	if (!ia64_platform_is("sn2"))
-@@ -706,31 +811,18 @@ static int __init mmtimer_init(void)
+@@ -706,31 +809,18 @@ static int __init mmtimer_init(void)
  	maxn++;
  
  	/* Allocate list of node ptrs to mmtimer_t's */
@@ -411064,7 +412227,7 @@
  	}
  
  	sgi_clock_period = sgi_clock.res = NSEC_PER_SEC / sn_rtc_cycles_per_second;
-@@ -741,11 +833,8 @@ static int __init mmtimer_init(void)
+@@ -741,11 +831,8 @@ static int __init mmtimer_init(void)
  
  	return 0;
  
@@ -411077,7 +412240,7 @@
  	misc_deregister(&mmtimer_miscdev);
  out2:
  	free_irq(SGI_MMTIMER_VECTOR, NULL);
-@@ -754,4 +843,3 @@ out1:
+@@ -754,4 +841,3 @@ out1:
  }
  
  module_init(mmtimer_init);
@@ -421418,7 +422581,7 @@
  			goto err_si1_reg;
  		board->flags &= ~SX_BOARD_TYPE;
 diff --git a/drivers/char/synclink.c b/drivers/char/synclink.c
-index ddc74d1..513b7c2 100644
+index ddc74d1..ac5080d 100644
 --- a/drivers/char/synclink.c
 +++ b/drivers/char/synclink.c
 @@ -218,9 +218,9 @@ struct mgsl_struct {
@@ -421694,20 +422857,24 @@
  	return IRQ_HANDLED;
  }	/* end of mgsl_interrupt() */
  
-@@ -2029,10 +2026,11 @@ static void mgsl_change_params(struct mgsl_struct *info)
+@@ -2029,34 +2026,35 @@ static void mgsl_change_params(struct mgsl_struct *info)
   * 		
   * Return Value:	None
   */
 -static void mgsl_put_char(struct tty_struct *tty, unsigned char ch)
 +static int mgsl_put_char(struct tty_struct *tty, unsigned char ch)
  {
- 	struct mgsl_struct *info = (struct mgsl_struct *)tty->driver_data;
+-	struct mgsl_struct *info = (struct mgsl_struct *)tty->driver_data;
++	struct mgsl_struct *info = tty->driver_data;
  	unsigned long flags;
-+	int ret;
++	int ret = 0;
  
- 	if ( debug_level >= DEBUG_LEVEL_INFO ) {
- 		printk( "%s(%d):mgsl_put_char(%d) on %s\n",
-@@ -2040,23 +2038,23 @@ static void mgsl_put_char(struct tty_struct *tty, unsigned char ch)
+-	if ( debug_level >= DEBUG_LEVEL_INFO ) {
+-		printk( "%s(%d):mgsl_put_char(%d) on %s\n",
+-			__FILE__,__LINE__,ch,info->device_name);
++	if (debug_level >= DEBUG_LEVEL_INFO) {
++		printk(KERN_DEBUG "%s(%d):mgsl_put_char(%d) on %s\n",
++			__FILE__, __LINE__, ch, info->device_name);
  	}		
  	
  	if (mgsl_paranoia_check(info, tty->name, "mgsl_put_char"))
@@ -421718,10 +422885,12 @@
 -		return;
 +		return 0;
  
- 	spin_lock_irqsave(&info->irq_spinlock,flags);
- 	
- 	if ( (info->params.mode == MGSL_MODE_ASYNC ) || !info->tx_active ) {
+-	spin_lock_irqsave(&info->irq_spinlock,flags);
 -	
+-	if ( (info->params.mode == MGSL_MODE_ASYNC ) || !info->tx_active ) {
++	spin_lock_irqsave(&info->irq_spinlock, flags);
+ 	
++	if ((info->params.mode == MGSL_MODE_ASYNC ) || !info->tx_active) {
  		if (info->xmit_cnt < SERIAL_XMIT_SIZE - 1) {
  			info->xmit_buf[info->xmit_head++] = ch;
  			info->xmit_head &= SERIAL_XMIT_SIZE-1;
@@ -421730,7 +422899,8 @@
  		}
  	}
 -	
- 	spin_unlock_irqrestore(&info->irq_spinlock,flags);
+-	spin_unlock_irqrestore(&info->irq_spinlock,flags);
++	spin_unlock_irqrestore(&info->irq_spinlock, flags);
 +	return ret;
  	
  }	/* end of mgsl_put_char() */
@@ -431510,7 +432680,7 @@
  #define OHCI1394_cycleSynch		0x00100000
  #define OHCI1394_cycle64Seconds		0x00200000
 diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c
-index 62b4e47..2a99937 100644
+index 62b4e47..62e3c91 100644
 --- a/drivers/firewire/fw-sbp2.c
 +++ b/drivers/firewire/fw-sbp2.c
 @@ -153,6 +153,7 @@ struct sbp2_target {
@@ -431677,9 +432847,12 @@
  }
  
  /*
-@@ -796,7 +786,7 @@ static void sbp2_release_target(struct kref *kref)
+@@ -794,9 +784,9 @@ static void sbp2_release_target(struct kref *kref)
+ 		kfree(lu);
+ 	}
  	scsi_remove_host(shost);
- 	fw_notify("released %s\n", tgt->bus_id);
+-	fw_notify("released %s\n", tgt->bus_id);
++	fw_notify("released %s, target %d:0:0\n", tgt->bus_id, shost->host_no);
  
 -	put_device(&tgt->unit->device);
 +	fw_unit_put(tgt->unit);
@@ -433684,10 +434857,10 @@
  	spi_set_drvdata(spi, mcp);
  
 diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c
-index 6e72fd3..5a99e81 100644
+index 6e72fd3..93f9167 100644
 --- a/drivers/gpio/pca953x.c
 +++ b/drivers/gpio/pca953x.c
-@@ -23,13 +23,7 @@
+@@ -23,21 +23,19 @@
  #define PCA953X_INVERT         2
  #define PCA953X_DIRECTION      3
  
@@ -433702,9 +434875,11 @@
  	{ "pca9534", 8, },
  	{ "pca9535", 16, },
  	{ "pca9536", 4, },
-@@ -37,7 +31,9 @@ static const struct pca953x_desc pca953x_descs[] = {
+ 	{ "pca9537", 4, },
  	{ "pca9538", 8, },
  	{ "pca9539", 16, },
++	{ "pca9555", 16, },
++	{ "pca9557", 8, },
  	/* REVISIT several pca955x parts should work here too */
 +	{ }
  };
@@ -433712,7 +434887,7 @@
  
  struct pca953x_chip {
  	unsigned gpio_start;
-@@ -189,28 +185,20 @@ static void pca953x_setup_gpio(struct pca953x_chip *chip, int gpios)
+@@ -189,28 +187,20 @@ static void pca953x_setup_gpio(struct pca953x_chip *chip, int gpios)
  	gc->base = chip->gpio_start;
  	gc->ngpio = gpios;
  	gc->label = chip->client->name;
@@ -433725,8 +434900,9 @@
  {
  	struct pca953x_platform_data *pdata;
  	struct pca953x_chip *chip;
- 	int ret, i;
+-	int ret, i;
 -	const struct pca953x_desc *id = NULL;
++	int ret;
  
  	pdata = client->dev.platform_data;
  	if (pdata == NULL)
@@ -433744,7 +434920,7 @@
  	chip = kzalloc(sizeof(struct pca953x_chip), GFP_KERNEL);
  	if (chip == NULL)
  		return -ENOMEM;
-@@ -290,6 +278,7 @@ static struct i2c_driver pca953x_driver = {
+@@ -290,6 +280,7 @@ static struct i2c_driver pca953x_driver = {
  	},
  	.probe		= pca953x_probe,
  	.remove		= pca953x_remove,
@@ -434927,6 +436103,146 @@
  				goto exit_free;
  			}
  		}
+diff --git a/drivers/hwmon/adt7473.c b/drivers/hwmon/adt7473.c
+index 9587869..c1009d6 100644
+--- a/drivers/hwmon/adt7473.c
++++ b/drivers/hwmon/adt7473.c
+@@ -422,18 +422,14 @@ static ssize_t show_volt(struct device *dev, struct device_attribute *devattr,
+  * number in the range -128 to 127, or as an unsigned number that must
+  * be offset by 64.
+  */
+-static int decode_temp(struct adt7473_data *data, u8 raw)
++static int decode_temp(u8 twos_complement, u8 raw)
+ {
+-	if (data->temp_twos_complement)
+-		return (s8)raw;
+-	return raw - 64;
++	return twos_complement ? (s8)raw : raw - 64;
+ }
+ 
+-static u8 encode_temp(struct adt7473_data *data, int cooked)
++static u8 encode_temp(u8 twos_complement, int cooked)
+ {
+-	if (data->temp_twos_complement)
+-		return (cooked & 0xFF);
+-	return cooked + 64;
++	return twos_complement ? cooked & 0xFF : cooked + 64;
+ }
+ 
+ static ssize_t show_temp_min(struct device *dev,
+@@ -442,8 +438,9 @@ static ssize_t show_temp_min(struct device *dev,
+ {
+ 	struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+ 	struct adt7473_data *data = adt7473_update_device(dev);
+-	return sprintf(buf, "%d\n",
+-		       1000 * decode_temp(data, data->temp_min[attr->index]));
++	return sprintf(buf, "%d\n", 1000 * decode_temp(
++						data->temp_twos_complement,
++						data->temp_min[attr->index]));
+ }
+ 
+ static ssize_t set_temp_min(struct device *dev,
+@@ -455,7 +452,7 @@ static ssize_t set_temp_min(struct device *dev,
+ 	struct i2c_client *client = to_i2c_client(dev);
+ 	struct adt7473_data *data = i2c_get_clientdata(client);
+ 	int temp = simple_strtol(buf, NULL, 10) / 1000;
+-	temp = encode_temp(data, temp);
++	temp = encode_temp(data->temp_twos_complement, temp);
+ 
+ 	mutex_lock(&data->lock);
+ 	data->temp_min[attr->index] = temp;
+@@ -472,8 +469,9 @@ static ssize_t show_temp_max(struct device *dev,
+ {
+ 	struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+ 	struct adt7473_data *data = adt7473_update_device(dev);
+-	return sprintf(buf, "%d\n",
+-		       1000 * decode_temp(data, data->temp_max[attr->index]));
++	return sprintf(buf, "%d\n", 1000 * decode_temp(
++						data->temp_twos_complement,
++						data->temp_max[attr->index]));
+ }
+ 
+ static ssize_t set_temp_max(struct device *dev,
+@@ -485,7 +483,7 @@ static ssize_t set_temp_max(struct device *dev,
+ 	struct i2c_client *client = to_i2c_client(dev);
+ 	struct adt7473_data *data = i2c_get_clientdata(client);
+ 	int temp = simple_strtol(buf, NULL, 10) / 1000;
+-	temp = encode_temp(data, temp);
++	temp = encode_temp(data->temp_twos_complement, temp);
+ 
+ 	mutex_lock(&data->lock);
+ 	data->temp_max[attr->index] = temp;
+@@ -501,8 +499,9 @@ static ssize_t show_temp(struct device *dev, struct device_attribute *devattr,
+ {
+ 	struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+ 	struct adt7473_data *data = adt7473_update_device(dev);
+-	return sprintf(buf, "%d\n",
+-		       1000 * decode_temp(data, data->temp[attr->index]));
++	return sprintf(buf, "%d\n", 1000 * decode_temp(
++						data->temp_twos_complement,
++						data->temp[attr->index]));
+ }
+ 
+ static ssize_t show_fan_min(struct device *dev,
+@@ -671,8 +670,9 @@ static ssize_t show_temp_tmax(struct device *dev,
+ {
+ 	struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+ 	struct adt7473_data *data = adt7473_update_device(dev);
+-	return sprintf(buf, "%d\n",
+-		       1000 * decode_temp(data, data->temp_tmax[attr->index]));
++	return sprintf(buf, "%d\n", 1000 * decode_temp(
++						data->temp_twos_complement,
++						data->temp_tmax[attr->index]));
+ }
+ 
+ static ssize_t set_temp_tmax(struct device *dev,
+@@ -684,7 +684,7 @@ static ssize_t set_temp_tmax(struct device *dev,
+ 	struct i2c_client *client = to_i2c_client(dev);
+ 	struct adt7473_data *data = i2c_get_clientdata(client);
+ 	int temp = simple_strtol(buf, NULL, 10) / 1000;
+-	temp = encode_temp(data, temp);
++	temp = encode_temp(data->temp_twos_complement, temp);
+ 
+ 	mutex_lock(&data->lock);
+ 	data->temp_tmax[attr->index] = temp;
+@@ -701,8 +701,9 @@ static ssize_t show_temp_tmin(struct device *dev,
+ {
+ 	struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
+ 	struct adt7473_data *data = adt7473_update_device(dev);
+-	return sprintf(buf, "%d\n",
+-		       1000 * decode_temp(data, data->temp_tmin[attr->index]));
++	return sprintf(buf, "%d\n", 1000 * decode_temp(
++						data->temp_twos_complement,
++						data->temp_tmin[attr->index]));
+ }
+ 
+ static ssize_t set_temp_tmin(struct device *dev,
+@@ -714,7 +715,7 @@ static ssize_t set_temp_tmin(struct device *dev,
+ 	struct i2c_client *client = to_i2c_client(dev);
+ 	struct adt7473_data *data = i2c_get_clientdata(client);
+ 	int temp = simple_strtol(buf, NULL, 10) / 1000;
+-	temp = encode_temp(data, temp);
++	temp = encode_temp(data->temp_twos_complement, temp);
+ 
+ 	mutex_lock(&data->lock);
+ 	data->temp_tmin[attr->index] = temp;
+diff --git a/drivers/hwmon/asb100.c b/drivers/hwmon/asb100.c
+index 84712a2..fe2eea4 100644
+--- a/drivers/hwmon/asb100.c
++++ b/drivers/hwmon/asb100.c
+@@ -953,12 +953,8 @@ static void asb100_write_value(struct i2c_client *client, u16 reg, u16 value)
+ static void asb100_init_client(struct i2c_client *client)
+ {
+ 	struct asb100_data *data = i2c_get_clientdata(client);
+-	int vid = 0;
+ 
+-	vid = asb100_read_value(client, ASB100_REG_VID_FANDIV) & 0x0f;
+-	vid |= (asb100_read_value(client, ASB100_REG_CHIPID) & 0x01) << 4;
+ 	data->vrm = vid_which_vrm();
+-	vid = vid_from_reg(vid, data->vrm);
+ 
+ 	/* Start monitoring */
+ 	asb100_write_value(client, ASB100_REG_CONFIG,
 diff --git a/drivers/hwmon/f75375s.c b/drivers/hwmon/f75375s.c
 index 1464338..dc1f30e 100644
 --- a/drivers/hwmon/f75375s.c
@@ -435008,6 +436324,170 @@
  		goto exit_detach;
  
  	return 0;
+diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c
+index 115f409..fa76969 100644
+--- a/drivers/hwmon/lm75.c
++++ b/drivers/hwmon/lm75.c
+@@ -248,7 +248,7 @@ static int lm75_detach_client(struct i2c_client *client)
+ 
+ /* All registers are word-sized, except for the configuration register.
+    LM75 uses a high-byte first convention, which is exactly opposite to
+-   the usual practice. */
++   the SMBus standard. */
+ static int lm75_read_value(struct i2c_client *client, u8 reg)
+ {
+ 	if (reg == LM75_REG_CONF)
+@@ -257,9 +257,6 @@ static int lm75_read_value(struct i2c_client *client, u8 reg)
+ 		return swab16(i2c_smbus_read_word_data(client, reg));
+ }
+ 
+-/* All registers are word-sized, except for the configuration register.
+-   LM75 uses a high-byte first convention, which is exactly opposite to
+-   the usual practice. */
+ static int lm75_write_value(struct i2c_client *client, u8 reg, u16 value)
+ {
+ 	if (reg == LM75_REG_CONF)
+diff --git a/drivers/hwmon/smsc47b397.c b/drivers/hwmon/smsc47b397.c
+index f61d8f4..eb03544 100644
+--- a/drivers/hwmon/smsc47b397.c
++++ b/drivers/hwmon/smsc47b397.c
+@@ -335,11 +335,23 @@ exit:
+ static int __init smsc47b397_find(unsigned short *addr)
+ {
+ 	u8 id, rev;
++	char *name;
+ 
+ 	superio_enter();
+ 	id = force_id ? force_id : superio_inb(SUPERIO_REG_DEVID);
+ 
+-	if ((id != 0x6f) && (id != 0x81) && (id != 0x85)) {
++	switch(id) {
++	case 0x81:
++		name = "SCH5307-NS";
++		break;
++	case 0x6f:
++		name = "LPC47B397-NC";
++		break;
++	case 0x85:
++	case 0x8c:
++		name = "SCH5317";
++		break;
++	default:
+ 		superio_exit();
+ 		return -ENODEV;
+ 	}
+@@ -352,8 +364,7 @@ static int __init smsc47b397_find(unsigned short *addr)
+ 
+ 	printk(KERN_INFO DRVNAME ": found SMSC %s "
+ 		"(base address 0x%04x, revision %u)\n",
+-		id == 0x81 ? "SCH5307-NS" : id == 0x85 ? "SCH5317" :
+-	       "LPC47B397-NC", *addr, rev);
++		name, *addr, rev);
+ 
+ 	superio_exit();
+ 	return 0;
+diff --git a/drivers/hwmon/w83793.c b/drivers/hwmon/w83793.c
+index ee35af9..ed3c019 100644
+--- a/drivers/hwmon/w83793.c
++++ b/drivers/hwmon/w83793.c
+@@ -1024,10 +1024,9 @@ static struct sensor_device_attribute_2 w83793_vid[] = {
+ 	SENSOR_ATTR_2(cpu0_vid, S_IRUGO, show_vid, NULL, NOT_USED, 0),
+ 	SENSOR_ATTR_2(cpu1_vid, S_IRUGO, show_vid, NULL, NOT_USED, 1),
+ };
++static DEVICE_ATTR(vrm, S_IWUSR | S_IRUGO, show_vrm, store_vrm);
+ 
+ static struct sensor_device_attribute_2 sda_single_files[] = {
+-	SENSOR_ATTR_2(vrm, S_IWUSR | S_IRUGO, show_vrm, store_vrm,
+-		      NOT_USED, NOT_USED),
+ 	SENSOR_ATTR_2(chassis, S_IWUSR | S_IRUGO, show_alarm_beep,
+ 		      store_chassis_clear, ALARM_STATUS, 30),
+ 	SENSOR_ATTR_2(beep_enable, S_IWUSR | S_IRUGO, show_beep_enable,
+@@ -1080,6 +1079,7 @@ static int w83793_detach_client(struct i2c_client *client)
+ 
+ 		for (i = 0; i < ARRAY_SIZE(w83793_vid); i++)
+ 			device_remove_file(dev, &w83793_vid[i].dev_attr);
++		device_remove_file(dev, &dev_attr_vrm);
+ 
+ 		for (i = 0; i < ARRAY_SIZE(w83793_left_fan); i++)
+ 			device_remove_file(dev, &w83793_left_fan[i].dev_attr);
+@@ -1282,7 +1282,6 @@ static int w83793_detect(struct i2c_adapter *adapter, int address, int kind)
+ 	/* Initialize the chip */
+ 	w83793_init_client(client);
+ 
+-	data->vrm = vid_which_vrm();
+ 	/*
+ 	   Only fan 1-5 has their own input pins,
+ 	   Pwm 1-3 has their own pins
+@@ -1293,7 +1292,9 @@ static int w83793_detect(struct i2c_adapter *adapter, int address, int kind)
+ 	val = w83793_read_value(client, W83793_REG_FANIN_CTRL);
+ 
+ 	/* check the function of pins 49-56 */
+-	if (!(tmp & 0x80)) {
++	if (tmp & 0x80) {
++		data->has_vid |= 0x2;	/* has VIDB */
++	} else {
+ 		data->has_pwm |= 0x18;	/* pwm 4,5 */
+ 		if (val & 0x01) {	/* fan 6 */
+ 			data->has_fan |= 0x20;
+@@ -1309,13 +1310,15 @@ static int w83793_detect(struct i2c_adapter *adapter, int address, int kind)
+ 		}
+ 	}
+ 
++	/* check the function of pins 37-40 */
++	if (!(tmp & 0x29))
++		data->has_vid |= 0x1;	/* has VIDA */
+ 	if (0x08 == (tmp & 0x0c)) {
+ 		if (val & 0x08)	/* fan 9 */
+ 			data->has_fan |= 0x100;
+ 		if (val & 0x10)	/* fan 10 */
+ 			data->has_fan |= 0x200;
+ 	}
+-
+ 	if (0x20 == (tmp & 0x30)) {
+ 		if (val & 0x20)	/* fan 11 */
+ 			data->has_fan |= 0x400;
+@@ -1359,13 +1362,6 @@ static int w83793_detect(struct i2c_adapter *adapter, int address, int kind)
+ 	if (tmp & 0x02)
+ 		data->has_temp |= 0x20;
+ 
+-	/* Detect the VID usage and ignore unused input */
+-	tmp = w83793_read_value(client, W83793_REG_MFC);
+-	if (!(tmp & 0x29))
+-		data->has_vid |= 0x1;	/* has VIDA */
+-	if (tmp & 0x80)
+-		data->has_vid |= 0x2;	/* has VIDB */
+-
+ 	/* Register sysfs hooks */
+ 	for (i = 0; i < ARRAY_SIZE(w83793_sensor_attr_2); i++) {
+ 		err = device_create_file(dev,
+@@ -1381,6 +1377,12 @@ static int w83793_detect(struct i2c_adapter *adapter, int address, int kind)
+ 		if (err)
+ 			goto exit_remove;
+ 	}
++	if (data->has_vid) {
++		data->vrm = vid_which_vrm();
++		err = device_create_file(dev, &dev_attr_vrm);
++		if (err)
++			goto exit_remove;
++	}
+ 
+ 	for (i = 0; i < ARRAY_SIZE(sda_single_files); i++) {
+ 		err = device_create_file(dev, &sda_single_files[i].dev_attr);
+diff --git a/drivers/hwmon/w83l785ts.c b/drivers/hwmon/w83l785ts.c
+index 77f2d48..52e268e 100644
+--- a/drivers/hwmon/w83l785ts.c
++++ b/drivers/hwmon/w83l785ts.c
+@@ -301,8 +301,8 @@ static u8 w83l785ts_read_value(struct i2c_client *client, u8 reg, u8 defval)
+ 		msleep(i);
+ 	}
+ 
+-	dev_err(&client->dev, "Couldn't read value from register 0x%02x. "
+-		"Please report.\n", reg);
++	dev_err(&client->dev, "Couldn't read value from register 0x%02x.\n",
++		reg);
+ 	return defval;
+ }
+ 
 diff --git a/drivers/i2c/algos/Kconfig b/drivers/i2c/algos/Kconfig
 index 014dfa5..7137a17 100644
 --- a/drivers/i2c/algos/Kconfig
@@ -446420,7 +447900,7 @@
  
  static struct pnp_driver idepnp_driver = {
 diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
-index 47a1149..099a0fe 100644
+index 47a1149..591deda 100644
 --- a/drivers/ide/ide-probe.c
 +++ b/drivers/ide/ide-probe.c
 @@ -124,7 +124,7 @@ static inline void do_identify (ide_drive_t *drive, u8 cmd)
@@ -446756,7 +448236,7 @@
  }
  
  static void ide_init_port(ide_hwif_t *hwif, unsigned int port,
-@@ -1339,9 +1343,6 @@ static void ide_init_port(ide_hwif_t *hwif, unsigned int port,
+@@ -1339,26 +1343,44 @@ static void ide_init_port(ide_hwif_t *hwif, unsigned int port,
  	if (d->init_iops)
  		d->init_iops(hwif);
  
@@ -446766,8 +448246,10 @@
  	if ((!hwif->irq && (d->host_flags & IDE_HFLAG_LEGACY_IRQS)) ||
  	    (d->host_flags & IDE_HFLAG_FORCE_LEGACY_IRQS))
  		hwif->irq = port ? 15 : 14;
-@@ -1349,16 +1350,36 @@ static void ide_init_port(ide_hwif_t *hwif, unsigned int port,
- 	hwif->host_flags = d->host_flags;
+ 
+-	hwif->host_flags = d->host_flags;
++	/* ->host_flags may be set by ->init_iops (or even earlier...) */
++	hwif->host_flags |= d->host_flags;
  	hwif->pio_mask = d->pio_mask;
  
 -	if ((d->host_flags & IDE_HFLAG_SERIALIZE) && hwif->mate)
@@ -446808,7 +448290,7 @@
  
  	if (d->host_flags & IDE_HFLAG_RQSIZE_256)
  		hwif->rqsize = 256;
-@@ -1366,26 +1387,138 @@ static void ide_init_port(ide_hwif_t *hwif, unsigned int port,
+@@ -1366,26 +1388,138 @@ static void ide_init_port(ide_hwif_t *hwif, unsigned int port,
  	/* call chipset specific routine for each enabled port */
  	if (d->init_hwif)
  		d->init_hwif(hwif);
@@ -446950,7 +448432,7 @@
  		if (d->chipset != ide_etrax100 && (i & 1) && mate) {
  			hwif->mate = mate;
  			mate->mate = hwif;
-@@ -1394,6 +1527,7 @@ int ide_device_add_all(u8 *idx, const struct ide_port_info *d)
+@@ -1394,6 +1528,7 @@ int ide_device_add_all(u8 *idx, const struct ide_port_info *d)
  		mate = (i & 1) ? NULL : hwif;
  
  		ide_init_port(hwif, i & 1, d);
@@ -446958,7 +448440,7 @@
  		ide_port_init_devices(hwif);
  	}
  
-@@ -1403,25 +1537,15 @@ int ide_device_add_all(u8 *idx, const struct ide_port_info *d)
+@@ -1403,25 +1538,15 @@ int ide_device_add_all(u8 *idx, const struct ide_port_info *d)
  
  		hwif = &ide_hwifs[idx[i]];
  
@@ -446988,7 +448470,7 @@
  	}
  
  	for (i = 0; i < MAX_HWIFS; i++) {
-@@ -1430,9 +1554,6 @@ int ide_device_add_all(u8 *idx, const struct ide_port_info *d)
+@@ -1430,9 +1555,6 @@ int ide_device_add_all(u8 *idx, const struct ide_port_info *d)
  
  		hwif = &ide_hwifs[idx[i]];
  
@@ -446998,7 +448480,7 @@
  		if (hwif_init(hwif) == 0) {
  			printk(KERN_INFO "%s: failed to initialize IDE "
  					 "interface\n", hwif->name);
-@@ -1441,8 +1562,13 @@ int ide_device_add_all(u8 *idx, const struct ide_port_info *d)
+@@ -1441,8 +1563,13 @@ int ide_device_add_all(u8 *idx, const struct ide_port_info *d)
  			continue;
  		}
  
@@ -447013,7 +448495,7 @@
  	}
  
  	for (i = 0; i < MAX_HWIFS; i++) {
-@@ -1451,12 +1577,11 @@ int ide_device_add_all(u8 *idx, const struct ide_port_info *d)
+@@ -1451,12 +1578,11 @@ int ide_device_add_all(u8 *idx, const struct ide_port_info *d)
  
  		hwif = &ide_hwifs[idx[i]];
  
@@ -447030,7 +448512,7 @@
  	}
  
  	for (i = 0; i < MAX_HWIFS; i++) {
-@@ -1465,10 +1590,11 @@ int ide_device_add_all(u8 *idx, const struct ide_port_info *d)
+@@ -1465,10 +1591,11 @@ int ide_device_add_all(u8 *idx, const struct ide_port_info *d)
  
  		hwif = &ide_hwifs[idx[i]];
  
@@ -447045,7 +448527,7 @@
  	}
  
  	return rc;
-@@ -1486,3 +1612,86 @@ int ide_device_add(u8 idx[4], const struct ide_port_info *d)
+@@ -1486,3 +1613,86 @@ int ide_device_add(u8 idx[4], const struct ide_port_info *d)
  	return ide_device_add_all(idx_all, d);
  }
  EXPORT_SYMBOL_GPL(ide_device_add);
@@ -461584,7 +463066,7 @@
  	/* Current number of bytes lost in discarded packets */
  	int bytes_discarded;
 diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c
-index 511e432..29d833e 100644
+index 511e432..05710c7 100644
 --- a/drivers/ieee1394/nodemgr.c
 +++ b/drivers/ieee1394/nodemgr.c
 @@ -18,8 +18,8 @@
@@ -461597,7 +463079,20 @@
  
  #include "csr.h"
  #include "highlevel.h"
-@@ -701,7 +701,11 @@ static int nodemgr_bus_match(struct device * dev, struct device_driver * drv)
+@@ -520,8 +520,11 @@ static ssize_t fw_show_drv_device_ids(struct device_driver *drv, char *buf)
+ 	char *scratch = buf;
+ 
+ 	driver = container_of(drv, struct hpsb_protocol_driver, driver);
++	id = driver->id_table;
++	if (!id)
++		return 0;
+ 
+-	for (id = driver->id_table; id->match_flags != 0; id++) {
++	for (; id->match_flags != 0; id++) {
+ 		int need_coma = 0;
+ 
+ 		if (id->match_flags & IEEE1394_MATCH_VENDOR_ID) {
+@@ -701,7 +704,11 @@ static int nodemgr_bus_match(struct device * dev, struct device_driver * drv)
  		return 0;
  
  	driver = container_of(drv, struct hpsb_protocol_driver, driver);
@@ -497689,7 +499184,7 @@
  
  #define DBUSY_TIMER_VALUE 80
 diff --git a/drivers/isdn/hysdn/hysdn_procconf.c b/drivers/isdn/hysdn/hysdn_procconf.c
-index 27d890b..877be99 100644
+index 27d890b..15906d0 100644
 --- a/drivers/isdn/hysdn/hysdn_procconf.c
 +++ b/drivers/isdn/hysdn/hysdn_procconf.c
 @@ -370,6 +370,7 @@ hysdn_conf_close(struct inode *ino, struct file *filep)
@@ -497700,7 +499195,7 @@
  	.llseek         = no_llseek,
  	.read           = hysdn_conf_read,
  	.write          = hysdn_conf_write,
-@@ -402,11 +403,9 @@ hysdn_procconf_init(void)
+@@ -402,11 +403,10 @@ hysdn_procconf_init(void)
  	while (card) {
  
  		sprintf(conf_name, "%s%d", PROC_CONF_BASENAME, card->myid);
@@ -497711,7 +499206,8 @@
 -			((struct proc_dir_entry *) card->procconf)->owner = THIS_MODULE;
 +		if ((card->procconf = (void *) proc_create(conf_name,
 +						S_IFREG | S_IRUGO | S_IWUSR,
-+						hysdn_proc_entry)) != NULL) {
++						hysdn_proc_entry,
++						&conf_fops)) != NULL) {
  			hysdn_proclog_init(card);	/* init the log file entry */
  		}
  		card = card->next;	/* next entry */
@@ -610702,10 +612198,22 @@
 +		"Eugene Konev <ejka at openwrt.org>");
 +MODULE_DESCRIPTION("MTD partitioning for TI AR7");
 diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
-index 0080452..e812df6 100644
+index 0080452..fcd1aec 100644
 --- a/drivers/mtd/chips/cfi_cmdset_0001.c
 +++ b/drivers/mtd/chips/cfi_cmdset_0001.c
-@@ -384,7 +384,7 @@ read_pri_intelext(struct map_info *map, __u16 adr)
+@@ -82,9 +82,8 @@ static struct mtd_info *cfi_intelext_setup (struct mtd_info *);
+ static int cfi_intelext_partition_fixup(struct mtd_info *, struct cfi_private **);
+ 
+ static int cfi_intelext_point (struct mtd_info *mtd, loff_t from, size_t len,
+-		     size_t *retlen, u_char **mtdbuf);
+-static void cfi_intelext_unpoint (struct mtd_info *mtd, u_char *addr, loff_t from,
+-			size_t len);
++		     size_t *retlen, void **virt, resource_size_t *phys);
++static void cfi_intelext_unpoint(struct mtd_info *mtd, loff_t from, size_t len);
+ 
+ static int chip_ready (struct map_info *map, struct flchip *chip, unsigned long adr, int mode);
+ static int get_chip(struct map_info *map, struct flchip *chip, unsigned long adr, int mode);
+@@ -384,7 +383,7 @@ read_pri_intelext(struct map_info *map, __u16 adr)
  			if (extp_size > 4096) {
  				printk(KERN_ERR
  					"%s: cfi_pri_intelext is too fat\n",
@@ -610714,7 +612222,7 @@
  				return NULL;
  			}
  			goto again;
-@@ -619,6 +619,9 @@ static int cfi_intelext_partition_fixup(struct mtd_info *mtd,
+@@ -619,6 +618,9 @@ static int cfi_intelext_partition_fixup(struct mtd_info *mtd,
  				  sizeof(struct cfi_intelext_blockinfo);
  		}
  
@@ -610724,7 +612232,7 @@
  		/* Programming Region info */
  		if (extp->MinorVersion >= '4') {
  			struct cfi_intelext_programming_regioninfo *prinfo;
-@@ -641,7 +644,7 @@ static int cfi_intelext_partition_fixup(struct mtd_info *mtd,
+@@ -641,7 +643,7 @@ static int cfi_intelext_partition_fixup(struct mtd_info *mtd,
  		if ((1 << partshift) < mtd->erasesize) {
  			printk( KERN_ERR
  				"%s: bad number of hw partitions (%d)\n",
@@ -610733,7 +612241,7 @@
  			return -EINVAL;
  		}
  
-@@ -1071,10 +1074,10 @@ static int __xipram xip_wait_for_operation(
+@@ -1071,10 +1073,10 @@ static int __xipram xip_wait_for_operation(
  			chip->state = newstate;
  			map_write(map, CMD(0xff), adr);
  			(void) map_read(map, adr);
@@ -610746,7 +612254,38 @@
  			cond_resched();
  
  			/*
-@@ -2013,7 +2016,7 @@ static int cfi_intelext_lock(struct mtd_info *mtd, loff_t ofs, size_t len)
+@@ -1237,7 +1239,8 @@ static int do_point_onechip (struct map_info *map, struct flchip *chip, loff_t a
+ 	return ret;
+ }
+ 
+-static int cfi_intelext_point (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char **mtdbuf)
++static int cfi_intelext_point(struct mtd_info *mtd, loff_t from, size_t len,
++		size_t *retlen, void **virt, resource_size_t *phys)
+ {
+ 	struct map_info *map = mtd->priv;
+ 	struct cfi_private *cfi = map->fldrv_priv;
+@@ -1254,8 +1257,10 @@ static int cfi_intelext_point (struct mtd_info *mtd, loff_t from, size_t len, si
+ 	chipnum = (from >> cfi->chipshift);
+ 	ofs = from - (chipnum << cfi->chipshift);
+ 
+-	*mtdbuf = (void *)map->virt + cfi->chips[chipnum].start + ofs;
++	*virt = map->virt + cfi->chips[chipnum].start + ofs;
+ 	*retlen = 0;
++	if (phys)
++		*phys = map->phys + cfi->chips[chipnum].start + ofs;
+ 
+ 	while (len) {
+ 		unsigned long thislen;
+@@ -1288,7 +1293,7 @@ static int cfi_intelext_point (struct mtd_info *mtd, loff_t from, size_t len, si
+ 	return 0;
+ }
+ 
+-static void cfi_intelext_unpoint (struct mtd_info *mtd, u_char *addr, loff_t from, size_t len)
++static void cfi_intelext_unpoint(struct mtd_info *mtd, loff_t from, size_t len)
+ {
+ 	struct map_info *map = mtd->priv;
+ 	struct cfi_private *cfi = map->fldrv_priv;
+@@ -2013,7 +2018,7 @@ static int cfi_intelext_lock(struct mtd_info *mtd, loff_t ofs, size_t len)
  
  #ifdef DEBUG_LOCK_BITS
  	printk(KERN_DEBUG "%s: lock status before, ofs=0x%08llx, len=0x%08X\n",
@@ -610755,7 +612294,7 @@
  	cfi_varsize_frob(mtd, do_printlockstatus_oneblock,
  		ofs, len, NULL);
  #endif
-@@ -2023,7 +2026,7 @@ static int cfi_intelext_lock(struct mtd_info *mtd, loff_t ofs, size_t len)
+@@ -2023,7 +2028,7 @@ static int cfi_intelext_lock(struct mtd_info *mtd, loff_t ofs, size_t len)
  
  #ifdef DEBUG_LOCK_BITS
  	printk(KERN_DEBUG "%s: lock status after, ret=%d\n",
@@ -610764,7 +612303,7 @@
  	cfi_varsize_frob(mtd, do_printlockstatus_oneblock,
  		ofs, len, NULL);
  #endif
-@@ -2037,7 +2040,7 @@ static int cfi_intelext_unlock(struct mtd_info *mtd, loff_t ofs, size_t len)
+@@ -2037,7 +2042,7 @@ static int cfi_intelext_unlock(struct mtd_info *mtd, loff_t ofs, size_t len)
  
  #ifdef DEBUG_LOCK_BITS
  	printk(KERN_DEBUG "%s: lock status before, ofs=0x%08llx, len=0x%08X\n",
@@ -610773,7 +612312,7 @@
  	cfi_varsize_frob(mtd, do_printlockstatus_oneblock,
  		ofs, len, NULL);
  #endif
-@@ -2047,7 +2050,7 @@ static int cfi_intelext_unlock(struct mtd_info *mtd, loff_t ofs, size_t len)
+@@ -2047,7 +2052,7 @@ static int cfi_intelext_unlock(struct mtd_info *mtd, loff_t ofs, size_t len)
  
  #ifdef DEBUG_LOCK_BITS
  	printk(KERN_DEBUG "%s: lock status after, ret=%d\n",
@@ -611462,7 +613001,7 @@
  	{ "at26f004",   0x1f0400, 64 * 1024, 8, SECT_4K, },
  	{ "at26df081a", 0x1f4501, 64 * 1024, 16, SECT_4K, },
 diff --git a/drivers/mtd/devices/mtdram.c b/drivers/mtd/devices/mtdram.c
-index e427c82..bf485ff 100644
+index e427c82..0399be1 100644
 --- a/drivers/mtd/devices/mtdram.c
 +++ b/drivers/mtd/devices/mtdram.c
 @@ -17,6 +17,7 @@
@@ -611473,11 +613012,65 @@
  
  static unsigned long total_size = CONFIG_MTDRAM_TOTAL_SIZE;
  static unsigned long erase_size = CONFIG_MTDRAM_ERASE_SIZE;
+@@ -47,18 +48,21 @@ static int ram_erase(struct mtd_info *mtd, struct erase_info *instr)
+ }
+ 
+ static int ram_point(struct mtd_info *mtd, loff_t from, size_t len,
+-		size_t *retlen, u_char **mtdbuf)
++		size_t *retlen, void **virt, resource_size_t *phys)
+ {
+ 	if (from + len > mtd->size)
+ 		return -EINVAL;
+ 
+-	*mtdbuf = mtd->priv + from;
++	/* can we return a physical address with this driver? */
++	if (phys)
++		return -EINVAL;
++
++	*virt = mtd->priv + from;
+ 	*retlen = len;
+ 	return 0;
+ }
+ 
+-static void ram_unpoint(struct mtd_info *mtd, u_char * addr, loff_t from,
+-		size_t len)
++static void ram_unpoint(struct mtd_info *mtd, loff_t from, size_t len)
+ {
+ }
+ 
 diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c
-index 180298b..5f96018 100644
+index 180298b..c7987b1 100644
 --- a/drivers/mtd/devices/phram.c
 +++ b/drivers/mtd/devices/phram.c
-@@ -282,7 +282,7 @@ static int phram_setup(const char *val, struct kernel_param *kp)
+@@ -57,20 +57,21 @@ static int phram_erase(struct mtd_info *mtd, struct erase_info *instr)
+ }
+ 
+ static int phram_point(struct mtd_info *mtd, loff_t from, size_t len,
+-		size_t *retlen, u_char **mtdbuf)
++		size_t *retlen, void **virt, resource_size_t *phys)
+ {
+-	u_char *start = mtd->priv;
+-
+ 	if (from + len > mtd->size)
+ 		return -EINVAL;
+ 
+-	*mtdbuf = start + from;
++	/* can we return a physical address with this driver? */
++	if (phys)
++		return -EINVAL;
++
++	*virt = mtd->priv + from;
+ 	*retlen = len;
+ 	return 0;
+ }
+ 
+-static void phram_unpoint(struct mtd_info *mtd, u_char *addr, loff_t from,
+-		size_t len)
++static void phram_unpoint(struct mtd_info *mtd, loff_t from, size_t len)
+ {
+ }
+ 
+@@ -282,7 +283,7 @@ static int phram_setup(const char *val, struct kernel_param *kp)
  }
  
  module_param_call(phram, phram_setup, NULL, NULL, 000);
@@ -611486,6 +613079,147 @@
  
  
  static int __init init_phram(void)
+diff --git a/drivers/mtd/devices/pmc551.c b/drivers/mtd/devices/pmc551.c
+index 7060a08..bc99817 100644
+--- a/drivers/mtd/devices/pmc551.c
++++ b/drivers/mtd/devices/pmc551.c
+@@ -134,7 +134,8 @@ static int pmc551_erase(struct mtd_info *mtd, struct erase_info *instr)
+ 	eoff_lo = end & (priv->asize - 1);
+ 	soff_lo = instr->addr & (priv->asize - 1);
+ 
+-	pmc551_point(mtd, instr->addr, instr->len, &retlen, &ptr);
++	pmc551_point(mtd, instr->addr, instr->len, &retlen,
++		     (void **)&ptr, NULL);
+ 
+ 	if (soff_hi == eoff_hi || mtd->size == priv->asize) {
+ 		/* The whole thing fits within one access, so just one shot
+@@ -154,7 +155,8 @@ static int pmc551_erase(struct mtd_info *mtd, struct erase_info *instr)
+ 			}
+ 			soff_hi += priv->asize;
+ 			pmc551_point(mtd, (priv->base_map0 | soff_hi),
+-				     priv->asize, &retlen, &ptr);
++				     priv->asize, &retlen,
++				     (void **)&ptr, NULL);
+ 		}
+ 		memset(ptr, 0xff, eoff_lo);
+ 	}
+@@ -170,7 +172,7 @@ static int pmc551_erase(struct mtd_info *mtd, struct erase_info *instr)
+ }
+ 
+ static int pmc551_point(struct mtd_info *mtd, loff_t from, size_t len,
+-			size_t * retlen, u_char ** mtdbuf)
++			size_t *retlen, void **virt, resource_size_t *phys)
+ {
+ 	struct mypriv *priv = mtd->priv;
+ 	u32 soff_hi;
+@@ -188,6 +190,10 @@ static int pmc551_point(struct mtd_info *mtd, loff_t from, size_t len,
+ 		return -EINVAL;
+ 	}
+ 
++	/* can we return a physical address with this driver? */
++	if (phys)
++		return -EINVAL;
++
+ 	soff_hi = from & ~(priv->asize - 1);
+ 	soff_lo = from & (priv->asize - 1);
+ 
+@@ -198,13 +204,12 @@ static int pmc551_point(struct mtd_info *mtd, loff_t from, size_t len,
+ 		priv->curr_map0 = soff_hi;
+ 	}
+ 
+-	*mtdbuf = priv->start + soff_lo;
++	*virt = priv->start + soff_lo;
+ 	*retlen = len;
+ 	return 0;
+ }
+ 
+-static void pmc551_unpoint(struct mtd_info *mtd, u_char * addr, loff_t from,
+-			   size_t len)
++static void pmc551_unpoint(struct mtd_info *mtd, loff_t from, size_t len)
+ {
+ #ifdef CONFIG_MTD_PMC551_DEBUG
+ 	printk(KERN_DEBUG "pmc551_unpoint()\n");
+@@ -242,7 +247,7 @@ static int pmc551_read(struct mtd_info *mtd, loff_t from, size_t len,
+ 	soff_lo = from & (priv->asize - 1);
+ 	eoff_lo = end & (priv->asize - 1);
+ 
+-	pmc551_point(mtd, from, len, retlen, &ptr);
++	pmc551_point(mtd, from, len, retlen, (void **)&ptr, NULL);
+ 
+ 	if (soff_hi == eoff_hi) {
+ 		/* The whole thing fits within one access, so just one shot
+@@ -263,7 +268,8 @@ static int pmc551_read(struct mtd_info *mtd, loff_t from, size_t len,
+ 				goto out;
+ 			}
+ 			soff_hi += priv->asize;
+-			pmc551_point(mtd, soff_hi, priv->asize, retlen, &ptr);
++			pmc551_point(mtd, soff_hi, priv->asize, retlen,
++				     (void **)&ptr, NULL);
+ 		}
+ 		memcpy(copyto, ptr, eoff_lo);
+ 		copyto += eoff_lo;
+@@ -308,7 +314,7 @@ static int pmc551_write(struct mtd_info *mtd, loff_t to, size_t len,
+ 	soff_lo = to & (priv->asize - 1);
+ 	eoff_lo = end & (priv->asize - 1);
+ 
+-	pmc551_point(mtd, to, len, retlen, &ptr);
++	pmc551_point(mtd, to, len, retlen, (void **)&ptr, NULL);
+ 
+ 	if (soff_hi == eoff_hi) {
+ 		/* The whole thing fits within one access, so just one shot
+@@ -329,7 +335,8 @@ static int pmc551_write(struct mtd_info *mtd, loff_t to, size_t len,
+ 				goto out;
+ 			}
+ 			soff_hi += priv->asize;
+-			pmc551_point(mtd, soff_hi, priv->asize, retlen, &ptr);
++			pmc551_point(mtd, soff_hi, priv->asize, retlen,
++				     (void **)&ptr, NULL);
+ 		}
+ 		memcpy(ptr, copyfrom, eoff_lo);
+ 		copyfrom += eoff_lo;
+diff --git a/drivers/mtd/devices/slram.c b/drivers/mtd/devices/slram.c
+index d293add..cb86db7 100644
+--- a/drivers/mtd/devices/slram.c
++++ b/drivers/mtd/devices/slram.c
+@@ -76,8 +76,9 @@ static char *map;
+ static slram_mtd_list_t *slram_mtdlist = NULL;
+ 
+ static int slram_erase(struct mtd_info *, struct erase_info *);
+-static int slram_point(struct mtd_info *, loff_t, size_t, size_t *, u_char **);
+-static void slram_unpoint(struct mtd_info *, u_char *, loff_t,	size_t);
++static int slram_point(struct mtd_info *, loff_t, size_t, size_t *, void **,
++		resource_size_t *);
++static void slram_unpoint(struct mtd_info *, loff_t, size_t);
+ static int slram_read(struct mtd_info *, loff_t, size_t, size_t *, u_char *);
+ static int slram_write(struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
+ 
+@@ -104,19 +105,23 @@ static int slram_erase(struct mtd_info *mtd, struct erase_info *instr)
+ }
+ 
+ static int slram_point(struct mtd_info *mtd, loff_t from, size_t len,
+-		size_t *retlen, u_char **mtdbuf)
++		size_t *retlen, void **virt, resource_size_t *phys)
+ {
+ 	slram_priv_t *priv = mtd->priv;
+ 
++	/* can we return a physical address with this driver? */
++	if (phys)
++		return -EINVAL;
++
+ 	if (from + len > mtd->size)
+ 		return -EINVAL;
+ 
+-	*mtdbuf = priv->start + from;
++	*virt = priv->start + from;
+ 	*retlen = len;
+ 	return(0);
+ }
+ 
+-static void slram_unpoint(struct mtd_info *mtd, u_char *addr, loff_t from, size_t len)
++static void slram_unpoint(struct mtd_info *mtd, loff_t from, size_t len)
+ {
+ }
+ 
 diff --git a/drivers/mtd/ftl.c b/drivers/mtd/ftl.c
 index c815d0f..4a79b18 100644
 --- a/drivers/mtd/ftl.c
@@ -612039,6 +613773,25 @@
  			mtd_banks[idx]->name, mtd_banks[idx]->size);
  		}
  	}
+diff --git a/drivers/mtd/maps/uclinux.c b/drivers/mtd/maps/uclinux.c
+index 14ffb1a..c42f4b8 100644
+--- a/drivers/mtd/maps/uclinux.c
++++ b/drivers/mtd/maps/uclinux.c
+@@ -40,10 +40,12 @@ struct mtd_partition uclinux_romfs[] = {
+ /****************************************************************************/
+ 
+ int uclinux_point(struct mtd_info *mtd, loff_t from, size_t len,
+-	size_t *retlen, u_char **mtdbuf)
++	size_t *retlen, void **virt, resource_size_t *phys)
+ {
+ 	struct map_info *map = mtd->priv;
+-	*mtdbuf = (u_char *) (map->virt + ((int) from));
++	*virt = map->virt + from;
++	if (phys)
++		*phys = map->phys + from;
+ 	*retlen = len;
+ 	return(0);
+ }
 diff --git a/drivers/mtd/mtdoops.c b/drivers/mtd/mtdoops.c
 index d3cf050..5a680e1 100644
 --- a/drivers/mtd/mtdoops.c
@@ -612052,6 +613805,37 @@
  	int mtd_index;
  	struct work_struct work_erase;
  	struct work_struct work_write;
+diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
+index c66902d..07c7011 100644
+--- a/drivers/mtd/mtdpart.c
++++ b/drivers/mtd/mtdpart.c
+@@ -68,7 +68,7 @@ static int part_read (struct mtd_info *mtd, loff_t from, size_t len,
+ }
+ 
+ static int part_point (struct mtd_info *mtd, loff_t from, size_t len,
+-			size_t *retlen, u_char **buf)
++			size_t *retlen, void **virt, resource_size_t *phys)
+ {
+ 	struct mtd_part *part = PART(mtd);
+ 	if (from >= mtd->size)
+@@ -76,14 +76,14 @@ static int part_point (struct mtd_info *mtd, loff_t from, size_t len,
+ 	else if (from + len > mtd->size)
+ 		len = mtd->size - from;
+ 	return part->master->point (part->master, from + part->offset,
+-				    len, retlen, buf);
++				    len, retlen, virt, phys);
+ }
+ 
+-static void part_unpoint (struct mtd_info *mtd, u_char *addr, loff_t from, size_t len)
++static void part_unpoint(struct mtd_info *mtd, loff_t from, size_t len)
+ {
+ 	struct mtd_part *part = PART(mtd);
+ 
+-	part->master->unpoint (part->master, addr, from + part->offset, len);
++	part->master->unpoint(part->master, from + part->offset, len);
+ }
+ 
+ static int part_read_oob(struct mtd_info *mtd, loff_t from,
 diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
 index 4a3c675..5076faf 100644
 --- a/drivers/mtd/nand/Kconfig
@@ -612151,7 +613935,7 @@
  
  nand-objs := nand_base.o nand_bbt.o
 diff --git a/drivers/mtd/nand/at91_nand.c b/drivers/mtd/nand/at91_nand.c
-index c9fb2ac..414ceae 100644
+index c9fb2ac..0adb287 100644
 --- a/drivers/mtd/nand/at91_nand.c
 +++ b/drivers/mtd/nand/at91_nand.c
 @@ -9,6 +9,15 @@
@@ -612170,7 +613954,7 @@
   * This program is free software; you can redistribute it and/or modify
   * it under the terms of the GNU General Public License version 2 as
   * published by the Free Software Foundation.
-@@ -29,11 +38,59 @@
+@@ -29,14 +38,80 @@
  #include <asm/arch/board.h>
  #include <asm/arch/gpio.h>
  
@@ -612230,29 +614014,53 @@
  };
  
  /*
-@@ -44,6 +101,12 @@ static void at91_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
++ * Enable NAND.
++ */
++static void at91_nand_enable(struct at91_nand_host *host)
++{
++	if (host->board->enable_pin)
++		at91_set_gpio_value(host->board->enable_pin, 0);
++}
++
++/*
++ * Disable NAND.
++ */
++static void at91_nand_disable(struct at91_nand_host *host)
++{
++	if (host->board->enable_pin)
++		at91_set_gpio_value(host->board->enable_pin, 1);
++}
++
++/*
+  * Hardware specific access to control-lines
+  */
+ static void at91_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
+@@ -44,6 +119,12 @@ static void at91_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl)
  	struct nand_chip *nand_chip = mtd->priv;
  	struct at91_nand_host *host = nand_chip->priv;
  
-+	if (host->board->enable_pin && (ctrl & NAND_CTRL_CHANGE)) {
++	if (ctrl & NAND_CTRL_CHANGE) {
 +		if (ctrl & NAND_NCE)
-+			at91_set_gpio_value(host->board->enable_pin, 0);
++			at91_nand_enable(host);
 +		else
-+			at91_set_gpio_value(host->board->enable_pin, 1);
++			at91_nand_disable(host);
 +	}
  	if (cmd == NAND_CMD_NONE)
  		return;
  
-@@ -82,8 +145,217 @@ static void at91_nand_disable(struct at91_nand_host *host)
- 		at91_set_gpio_value(host->board->enable_pin, 1);
+@@ -65,25 +146,216 @@ static int at91_nand_device_ready(struct mtd_info *mtd)
  }
  
-+/*
+ /*
+- * Enable NAND.
 + * write oob for small pages
-+ */
+  */
+-static void at91_nand_enable(struct at91_nand_host *host)
 +static int at91_nand_write_oob_512(struct mtd_info *mtd,
 +		struct nand_chip *chip, int page)
-+{
+ {
+-	if (host->board->enable_pin)
+-		at91_set_gpio_value(host->board->enable_pin, 0);
 +	int chunk = chip->ecc.bytes + chip->ecc.prepad + chip->ecc.postpad;
 +	int eccsize = chip->ecc.size, length = mtd->oobsize;
 +	int len, pos, status = 0;
@@ -612273,22 +614081,26 @@
 +
 +	return status & NAND_STATUS_FAIL ? -EIO : 0;
 +
-+}
-+
-+/*
+ }
+ 
+ /*
+- * Disable NAND.
 + * read oob for small pages
-+ */
+  */
+-static void at91_nand_disable(struct at91_nand_host *host)
 +static int at91_nand_read_oob_512(struct mtd_info *mtd,
 +		struct nand_chip *chip,	int page, int sndcmd)
-+{
+ {
+-	if (host->board->enable_pin)
+-		at91_set_gpio_value(host->board->enable_pin, 1);
 +	if (sndcmd) {
 +		chip->cmdfunc(mtd, NAND_CMD_READOOB, 0, page);
 +		sndcmd = 0;
 +	}
 +	chip->read_buf(mtd, chip->oob_poi, mtd->oobsize);
 +	return sndcmd;
-+}
-+
+ }
+ 
 +/*
 + * Calculate HW ECC
 + *
@@ -643737,6 +645549,403 @@
  
  	ret = check_module_parm();
  	if (ret)
+diff --git a/drivers/net/fec.c b/drivers/net/fec.c
+index d7a3ea8..32a4f17 100644
+--- a/drivers/net/fec.c
++++ b/drivers/net/fec.c
+@@ -67,6 +67,10 @@
+ #define	FEC_MAX_PORTS	1
+ #endif
+ 
++#if defined(CONFIG_FADS) || defined(CONFIG_RPXCLASSIC) || defined(CONFIG_M5272)
++#define HAVE_mii_link_interrupt
++#endif
++
+ /*
+  * Define the fixed address of the FEC hardware.
+  */
+@@ -205,7 +209,10 @@ struct fec_enet_private {
+ 	cbd_t	*cur_rx, *cur_tx;		/* The next free ring entry */
+ 	cbd_t	*dirty_tx;	/* The ring entries to be free()ed. */
+ 	uint	tx_full;
+-	spinlock_t lock;
++	/* hold while accessing the HW like ringbuffer for tx/rx but not MAC */
++	spinlock_t hw_lock;
++	/* hold while accessing the mii_list_t() elements */
++	spinlock_t mii_lock;
+ 
+ 	uint	phy_id;
+ 	uint	phy_id_done;
+@@ -309,6 +316,7 @@ fec_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
+ 	volatile fec_t	*fecp;
+ 	volatile cbd_t	*bdp;
+ 	unsigned short	status;
++	unsigned long flags;
+ 
+ 	fep = netdev_priv(dev);
+ 	fecp = (volatile fec_t*)dev->base_addr;
+@@ -318,6 +326,7 @@ fec_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
+ 		return 1;
+ 	}
+ 
++	spin_lock_irqsave(&fep->hw_lock, flags);
+ 	/* Fill in a Tx ring entry */
+ 	bdp = fep->cur_tx;
+ 
+@@ -328,6 +337,7 @@ fec_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
+ 		 * This should not happen, since dev->tbusy should be set.
+ 		 */
+ 		printk("%s: tx queue full!.\n", dev->name);
++		spin_unlock_irqrestore(&fep->hw_lock, flags);
+ 		return 1;
+ 	}
+ #endif
+@@ -366,8 +376,6 @@ fec_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
+ 	flush_dcache_range((unsigned long)skb->data,
+ 			   (unsigned long)skb->data + skb->len);
+ 
+-	spin_lock_irq(&fep->lock);
+-
+ 	/* Send it on its way.  Tell FEC it's ready, interrupt when done,
+ 	 * it's the last BD of the frame, and to put the CRC on the end.
+ 	 */
+@@ -396,7 +404,7 @@ fec_enet_start_xmit(struct sk_buff *skb, struct net_device *dev)
+ 
+ 	fep->cur_tx = (cbd_t *)bdp;
+ 
+-	spin_unlock_irq(&fep->lock);
++	spin_unlock_irqrestore(&fep->hw_lock, flags);
+ 
+ 	return 0;
+ }
+@@ -454,19 +462,20 @@ fec_enet_interrupt(int irq, void * dev_id)
+ 	struct	net_device *dev = dev_id;
+ 	volatile fec_t	*fecp;
+ 	uint	int_events;
+-	int handled = 0;
++	irqreturn_t ret = IRQ_NONE;
+ 
+ 	fecp = (volatile fec_t*)dev->base_addr;
+ 
+ 	/* Get the interrupt events that caused us to be here.
+ 	*/
+-	while ((int_events = fecp->fec_ievent) != 0) {
++	do {
++		int_events = fecp->fec_ievent;
+ 		fecp->fec_ievent = int_events;
+ 
+ 		/* Handle receive event in its own function.
+ 		 */
+ 		if (int_events & FEC_ENET_RXF) {
+-			handled = 1;
++			ret = IRQ_HANDLED;
+ 			fec_enet_rx(dev);
+ 		}
+ 
+@@ -475,17 +484,18 @@ fec_enet_interrupt(int irq, void * dev_id)
+ 		   them as part of the transmit process.
+ 		*/
+ 		if (int_events & FEC_ENET_TXF) {
+-			handled = 1;
++			ret = IRQ_HANDLED;
+ 			fec_enet_tx(dev);
+ 		}
+ 
+ 		if (int_events & FEC_ENET_MII) {
+-			handled = 1;
++			ret = IRQ_HANDLED;
+ 			fec_enet_mii(dev);
+ 		}
+ 
+-	}
+-	return IRQ_RETVAL(handled);
++	} while (int_events);
++
++	return ret;
+ }
+ 
+ 
+@@ -498,7 +508,7 @@ fec_enet_tx(struct net_device *dev)
+ 	struct	sk_buff	*skb;
+ 
+ 	fep = netdev_priv(dev);
+-	spin_lock(&fep->lock);
++	spin_lock_irq(&fep->hw_lock);
+ 	bdp = fep->dirty_tx;
+ 
+ 	while (((status = bdp->cbd_sc) & BD_ENET_TX_READY) == 0) {
+@@ -557,7 +567,7 @@ fec_enet_tx(struct net_device *dev)
+ 		}
+ 	}
+ 	fep->dirty_tx = (cbd_t *)bdp;
+-	spin_unlock(&fep->lock);
++	spin_unlock_irq(&fep->hw_lock);
+ }
+ 
+ 
+@@ -584,6 +594,8 @@ fec_enet_rx(struct net_device *dev)
+ 	fep = netdev_priv(dev);
+ 	fecp = (volatile fec_t*)dev->base_addr;
+ 
++	spin_lock_irq(&fep->hw_lock);
++
+ 	/* First, grab all of the stats for the incoming packet.
+ 	 * These get messed up if we get called due to a busy condition.
+ 	 */
+@@ -689,6 +701,8 @@ while (!((status = bdp->cbd_sc) & BD_ENET_RX_EMPTY)) {
+ 	 */
+ 	fecp->fec_r_des_active = 0;
+ #endif
++
++	spin_unlock_irq(&fep->hw_lock);
+ }
+ 
+ 
+@@ -702,11 +716,11 @@ fec_enet_mii(struct net_device *dev)
+ 	uint		mii_reg;
+ 
+ 	fep = netdev_priv(dev);
++	spin_lock_irq(&fep->mii_lock);
++
+ 	ep = fep->hwp;
+ 	mii_reg = ep->fec_mii_data;
+ 
+-	spin_lock(&fep->lock);
+-
+ 	if ((mip = mii_head) == NULL) {
+ 		printk("MII and no head!\n");
+ 		goto unlock;
+@@ -723,7 +737,7 @@ fec_enet_mii(struct net_device *dev)
+ 		ep->fec_mii_data = mip->mii_regval;
+ 
+ unlock:
+-	spin_unlock(&fep->lock);
++	spin_unlock_irq(&fep->mii_lock);
+ }
+ 
+ static int
+@@ -737,12 +751,11 @@ mii_queue(struct net_device *dev, int regval, void (*func)(uint, struct net_devi
+ 	/* Add PHY address to register command.
+ 	*/
+ 	fep = netdev_priv(dev);
+-	regval |= fep->phy_addr << 23;
++	spin_lock_irqsave(&fep->mii_lock, flags);
+ 
++	regval |= fep->phy_addr << 23;
+ 	retval = 0;
+ 
+-	spin_lock_irqsave(&fep->lock,flags);
+-
+ 	if ((mip = mii_free) != NULL) {
+ 		mii_free = mip->mii_next;
+ 		mip->mii_regval = regval;
+@@ -759,9 +772,8 @@ mii_queue(struct net_device *dev, int regval, void (*func)(uint, struct net_devi
+ 		retval = 1;
+ 	}
+ 
+-	spin_unlock_irqrestore(&fep->lock,flags);
+-
+-	return(retval);
++	spin_unlock_irqrestore(&fep->mii_lock, flags);
++	return retval;
+ }
+ 
+ static void mii_do_cmd(struct net_device *dev, const phy_cmd_t *c)
+@@ -1222,7 +1234,7 @@ static phy_info_t const * const phy_info[] = {
+ };
+ 
+ /* ------------------------------------------------------------------------- */
+-#if !defined(CONFIG_M532x)
++#ifdef HAVE_mii_link_interrupt
+ #ifdef CONFIG_RPXCLASSIC
+ static void
+ mii_link_interrupt(void *dev_id);
+@@ -1362,18 +1374,8 @@ static void __inline__ fec_request_intrs(struct net_device *dev)
+ 		unsigned short irq;
+ 	} *idp, id[] = {
+ 		{ "fec(TXF)", 23 },
+-		{ "fec(TXB)", 24 },
+-		{ "fec(TXFIFO)", 25 },
+-		{ "fec(TXCR)", 26 },
+ 		{ "fec(RXF)", 27 },
+-		{ "fec(RXB)", 28 },
+ 		{ "fec(MII)", 29 },
+-		{ "fec(LC)", 30 },
+-		{ "fec(HBERR)", 31 },
+-		{ "fec(GRA)", 32 },
+-		{ "fec(EBERR)", 33 },
+-		{ "fec(BABT)", 34 },
+-		{ "fec(BABR)", 35 },
+ 		{ NULL },
+ 	};
+ 
+@@ -1533,18 +1535,8 @@ static void __inline__ fec_request_intrs(struct net_device *dev)
+ 		unsigned short irq;
+ 	} *idp, id[] = {
+ 		{ "fec(TXF)", 23 },
+-		{ "fec(TXB)", 24 },
+-		{ "fec(TXFIFO)", 25 },
+-		{ "fec(TXCR)", 26 },
+ 		{ "fec(RXF)", 27 },
+-		{ "fec(RXB)", 28 },
+ 		{ "fec(MII)", 29 },
+-		{ "fec(LC)", 30 },
+-		{ "fec(HBERR)", 31 },
+-		{ "fec(GRA)", 32 },
+-		{ "fec(EBERR)", 33 },
+-		{ "fec(BABT)", 34 },
+-		{ "fec(BABR)", 35 },
+ 		{ NULL },
+ 	};
+ 
+@@ -1660,18 +1652,8 @@ static void __inline__ fec_request_intrs(struct net_device *dev)
+ 		unsigned short irq;
+ 	} *idp, id[] = {
+ 	    { "fec(TXF)", 36 },
+-	    { "fec(TXB)", 37 },
+-	    { "fec(TXFIFO)", 38 },
+-	    { "fec(TXCR)", 39 },
+ 	    { "fec(RXF)", 40 },
+-	    { "fec(RXB)", 41 },
+ 	    { "fec(MII)", 42 },
+-	    { "fec(LC)", 43 },
+-	    { "fec(HBERR)", 44 },
+-	    { "fec(GRA)", 45 },
+-	    { "fec(EBERR)", 46 },
+-	    { "fec(BABT)", 47 },
+-	    { "fec(BABR)", 48 },
+ 	    { NULL },
+ 	};
+ 
+@@ -2126,6 +2108,7 @@ mii_discover_phy(uint mii_reg, struct net_device *dev)
+ 
+ /* This interrupt occurs when the PHY detects a link change.
+ */
++#ifdef HAVE_mii_link_interrupt
+ #ifdef CONFIG_RPXCLASSIC
+ static void
+ mii_link_interrupt(void *dev_id)
+@@ -2148,6 +2131,7 @@ mii_link_interrupt(int irq, void * dev_id)
+ 
+ 	return IRQ_HANDLED;
+ }
++#endif
+ 
+ static int
+ fec_enet_open(struct net_device *dev)
+@@ -2243,13 +2227,13 @@ static void set_multicast_list(struct net_device *dev)
+ 			/* Catch all multicast addresses, so set the
+ 			 * filter to all 1's.
+ 			 */
+-			ep->fec_hash_table_high = 0xffffffff;
+-			ep->fec_hash_table_low = 0xffffffff;
++			ep->fec_grp_hash_table_high = 0xffffffff;
++			ep->fec_grp_hash_table_low = 0xffffffff;
+ 		} else {
+ 			/* Clear filter and add the addresses in hash register.
+ 			*/
+-			ep->fec_hash_table_high = 0;
+-			ep->fec_hash_table_low = 0;
++			ep->fec_grp_hash_table_high = 0;
++			ep->fec_grp_hash_table_low = 0;
+ 
+ 			dmi = dev->mc_list;
+ 
+@@ -2280,9 +2264,9 @@ static void set_multicast_list(struct net_device *dev)
+ 				hash = (crc >> (32 - HASH_BITS)) & 0x3f;
+ 
+ 				if (hash > 31)
+-					ep->fec_hash_table_high |= 1 << (hash - 32);
++					ep->fec_grp_hash_table_high |= 1 << (hash - 32);
+ 				else
+-					ep->fec_hash_table_low |= 1 << hash;
++					ep->fec_grp_hash_table_low |= 1 << hash;
+ 			}
+ 		}
+ 	}
+@@ -2332,6 +2316,9 @@ int __init fec_enet_init(struct net_device *dev)
+ 		return -ENOMEM;
+ 	}
+ 
++	spin_lock_init(&fep->hw_lock);
++	spin_lock_init(&fep->mii_lock);
++
+ 	/* Create an Ethernet device instance.
+ 	*/
+ 	fecp = (volatile fec_t *) fec_hw[index];
+@@ -2430,11 +2417,15 @@ int __init fec_enet_init(struct net_device *dev)
+ 	*/
+ 	fec_request_intrs(dev);
+ 
+-	fecp->fec_hash_table_high = 0;
+-	fecp->fec_hash_table_low = 0;
++	fecp->fec_grp_hash_table_high = 0;
++	fecp->fec_grp_hash_table_low = 0;
+ 	fecp->fec_r_buff_size = PKT_MAXBLR_SIZE;
+ 	fecp->fec_ecntrl = 2;
+ 	fecp->fec_r_des_active = 0;
++#ifndef CONFIG_M5272
++	fecp->fec_hash_table_high = 0;
++	fecp->fec_hash_table_low = 0;
++#endif
+ 
+ 	dev->base_addr = (unsigned long)fecp;
+ 
+@@ -2455,8 +2446,7 @@ int __init fec_enet_init(struct net_device *dev)
+ 
+ 	/* Clear and enable interrupts */
+ 	fecp->fec_ievent = 0xffc00000;
+-	fecp->fec_imask = (FEC_ENET_TXF | FEC_ENET_TXB |
+-		FEC_ENET_RXF | FEC_ENET_RXB | FEC_ENET_MII);
++	fecp->fec_imask = (FEC_ENET_TXF | FEC_ENET_RXF | FEC_ENET_MII);
+ 
+ 	/* Queue up command to detect the PHY and initialize the
+ 	 * remainder of the interface.
+@@ -2500,8 +2490,8 @@ fec_restart(struct net_device *dev, int duplex)
+ 
+ 	/* Reset all multicast.
+ 	*/
+-	fecp->fec_hash_table_high = 0;
+-	fecp->fec_hash_table_low = 0;
++	fecp->fec_grp_hash_table_high = 0;
++	fecp->fec_grp_hash_table_low = 0;
+ 
+ 	/* Set maximum receive buffer size.
+ 	*/
+@@ -2583,8 +2573,7 @@ fec_restart(struct net_device *dev, int duplex)
+ 
+ 	/* Enable interrupts we wish to service.
+ 	*/
+-	fecp->fec_imask = (FEC_ENET_TXF | FEC_ENET_TXB |
+-		FEC_ENET_RXF | FEC_ENET_RXB | FEC_ENET_MII);
++	fecp->fec_imask = (FEC_ENET_TXF | FEC_ENET_RXF | FEC_ENET_MII);
+ }
+ 
+ static void
+@@ -2624,7 +2613,7 @@ fec_stop(struct net_device *dev)
+ static int __init fec_enet_module_init(void)
+ {
+ 	struct net_device *dev;
+-	int i, j, err;
++	int i, err;
+ 	DECLARE_MAC_BUF(mac);
+ 
+ 	printk("FEC ENET Version 0.2\n");
+diff --git a/drivers/net/fec.h b/drivers/net/fec.h
+index 1d42160..292719d 100644
+--- a/drivers/net/fec.h
++++ b/drivers/net/fec.h
+@@ -88,8 +88,8 @@ typedef struct fec {
+ 	unsigned long	fec_reserved7[158];
+ 	unsigned long	fec_addr_low;		/* Low 32bits MAC address */
+ 	unsigned long	fec_addr_high;		/* High 16bits MAC address */
+-	unsigned long	fec_hash_table_high;	/* High 32bits hash table */
+-	unsigned long	fec_hash_table_low;	/* Low 32bits hash table */
++	unsigned long	fec_grp_hash_table_high;/* High 32bits hash table */
++	unsigned long	fec_grp_hash_table_low;	/* Low 32bits hash table */
+ 	unsigned long	fec_r_des_start;	/* Receive descriptor ring */
+ 	unsigned long	fec_x_des_start;	/* Transmit descriptor ring */
+ 	unsigned long	fec_r_buff_size;	/* Maximum receive buff size */
 diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c
 index fe59c27..d21b7ab 100644
 --- a/drivers/net/fec_mpc52xx.c
@@ -815142,6 +817351,185 @@
  	help
  	  Say Y here to include support for the PXA2xx PCMCIA controller
  
+diff --git a/drivers/pcmcia/au1000_db1x00.c b/drivers/pcmcia/au1000_db1x00.c
+index 74e0515..c78d77f 100644
+--- a/drivers/pcmcia/au1000_db1x00.c
++++ b/drivers/pcmcia/au1000_db1x00.c
+@@ -194,7 +194,7 @@ db1x00_pcmcia_configure_socket(struct au1000_pcmcia_socket *skt, struct socket_s
+ 				default:
+ 					pwr |= SET_VCC_VPP(0,0,sock);
+ 					printk("%s: bad Vcc/Vpp (%d:%d)\n",
+-							__FUNCTION__,
++							__func__,
+ 							state->Vcc,
+ 							state->Vpp);
+ 					break;
+@@ -215,7 +215,7 @@ db1x00_pcmcia_configure_socket(struct au1000_pcmcia_socket *skt, struct socket_s
+ 				default:
+ 					pwr |= SET_VCC_VPP(0,0,sock);
+ 					printk("%s: bad Vcc/Vpp (%d:%d)\n",
+-							__FUNCTION__,
++							__func__,
+ 							state->Vcc,
+ 							state->Vpp);
+ 					break;
+@@ -224,7 +224,7 @@ db1x00_pcmcia_configure_socket(struct au1000_pcmcia_socket *skt, struct socket_s
+ 		default: /* what's this ? */
+ 			pwr |= SET_VCC_VPP(0,0,sock);
+ 			printk(KERN_ERR "%s: bad Vcc %d\n",
+-					__FUNCTION__, state->Vcc);
++					__func__, state->Vcc);
+ 			break;
+ 	}
+ 
+diff --git a/drivers/pcmcia/au1000_generic.c b/drivers/pcmcia/au1000_generic.c
+index b693367..75e8f85 100644
+--- a/drivers/pcmcia/au1000_generic.c
++++ b/drivers/pcmcia/au1000_generic.c
+@@ -41,6 +41,7 @@
+ #include <linux/notifier.h>
+ #include <linux/interrupt.h>
+ #include <linux/spinlock.h>
++#include <linux/mutex.h>
+ #include <linux/platform_device.h>
+ 
+ #include <asm/io.h>
+@@ -71,7 +72,7 @@ extern struct au1000_pcmcia_socket au1000_pcmcia_socket[];
+ u32 *pcmcia_base_vaddrs[2];
+ extern const unsigned long mips_io_port_base;
+ 
+-DECLARE_MUTEX(pcmcia_sockets_lock);
++static DEFINE_MUTEX(pcmcia_sockets_lock);
+ 
+ static int (*au1x00_pcmcia_hw_init[])(struct device *dev) = {
+ 	au1x_board_init,
+@@ -472,7 +473,7 @@ int au1x00_drv_pcmcia_remove(struct device *dev)
+ 	struct skt_dev_info *sinfo = dev_get_drvdata(dev);
+ 	int i;
+ 
+-	down(&pcmcia_sockets_lock);
++	mutex_lock(&pcmcia_sockets_lock);
+ 	dev_set_drvdata(dev, NULL);
+ 
+ 	for (i = 0; i < sinfo->nskt; i++) {
+@@ -488,7 +489,7 @@ int au1x00_drv_pcmcia_remove(struct device *dev)
+ 	}
+ 
+ 	kfree(sinfo);
+-	up(&pcmcia_sockets_lock);
++	mutex_unlock(&pcmcia_sockets_lock);
+ 	return 0;
+ }
+ 
+@@ -501,13 +502,13 @@ static int au1x00_drv_pcmcia_probe(struct device *dev)
+ {
+ 	int i, ret = -ENODEV;
+ 
+-	down(&pcmcia_sockets_lock);
++	mutex_lock(&pcmcia_sockets_lock);
+ 	for (i=0; i < ARRAY_SIZE(au1x00_pcmcia_hw_init); i++) {
+ 		ret = au1x00_pcmcia_hw_init[i](dev);
+ 		if (ret == 0)
+ 			break;
+ 	}
+-	up(&pcmcia_sockets_lock);
++	mutex_unlock(&pcmcia_sockets_lock);
+ 	return ret;
+ }
+ 
+diff --git a/drivers/pcmcia/au1000_pb1x00.c b/drivers/pcmcia/au1000_pb1x00.c
+index 86c0808..157e414 100644
+--- a/drivers/pcmcia/au1000_pb1x00.c
++++ b/drivers/pcmcia/au1000_pb1x00.c
+@@ -244,7 +244,7 @@ pb1x00_pcmcia_configure_socket(const struct pcmcia_configure *configure)
+ 					pcr |= SET_VCC_VPP(VCC_HIZ,VPP_HIZ,
+ 							configure->sock);
+ 					printk("%s: bad Vcc/Vpp (%d:%d)\n", 
+-							__FUNCTION__, 
++							__func__,
+ 							configure->vcc, 
+ 							configure->vpp);
+ 					break;
+@@ -272,7 +272,7 @@ pb1x00_pcmcia_configure_socket(const struct pcmcia_configure *configure)
+ 					pcr |= SET_VCC_VPP(VCC_HIZ,VPP_HIZ,
+ 							configure->sock);
+ 					printk("%s: bad Vcc/Vpp (%d:%d)\n", 
+-							__FUNCTION__, 
++							__func__,
+ 							configure->vcc, 
+ 							configure->vpp);
+ 					break;
+@@ -300,7 +300,7 @@ pb1x00_pcmcia_configure_socket(const struct pcmcia_configure *configure)
+ 					pcr |= SET_VCC_VPP(VCC_HIZ,VPP_HIZ,
+ 							configure->sock);
+ 					printk("%s: bad Vcc/Vpp (%d:%d)\n", 
+-							__FUNCTION__, 
++							__func__,
+ 							configure->vcc, 
+ 							configure->vpp);
+ 					break;
+@@ -309,7 +309,7 @@ pb1x00_pcmcia_configure_socket(const struct pcmcia_configure *configure)
+ 		default: /* what's this ? */
+ 			pcr |= SET_VCC_VPP(VCC_HIZ,VPP_HIZ,configure->sock);
+ 			printk(KERN_ERR "%s: bad Vcc %d\n", 
+-					__FUNCTION__, configure->vcc);
++					__func__, configure->vcc);
+ 			break;
+ 	}
+ 
+@@ -353,7 +353,7 @@ pb1x00_pcmcia_configure_socket(const struct pcmcia_configure *configure)
+ 				default:
+ 					pcr |= SET_VCC_VPP(0,0);
+ 					printk("%s: bad Vcc/Vpp (%d:%d)\n", 
+-							__FUNCTION__, 
++							__func__,
+ 							configure->vcc, 
+ 							configure->vpp);
+ 					break;
+@@ -374,7 +374,7 @@ pb1x00_pcmcia_configure_socket(const struct pcmcia_configure *configure)
+ 				default:
+ 					pcr |= SET_VCC_VPP(0,0);
+ 					printk("%s: bad Vcc/Vpp (%d:%d)\n", 
+-							__FUNCTION__, 
++							__func__,
+ 							configure->vcc, 
+ 							configure->vpp);
+ 					break;
+@@ -383,7 +383,7 @@ pb1x00_pcmcia_configure_socket(const struct pcmcia_configure *configure)
+ 		default: /* what's this ? */
+ 			pcr |= SET_VCC_VPP(0,0);
+ 			printk(KERN_ERR "%s: bad Vcc %d\n", 
+-					__FUNCTION__, configure->vcc);
++					__func__, configure->vcc);
+ 			break;
+ 	}
+ 
+diff --git a/drivers/pcmcia/au1000_xxs1500.c b/drivers/pcmcia/au1000_xxs1500.c
+index ce9d5c4..c78ed53 100644
+--- a/drivers/pcmcia/au1000_xxs1500.c
++++ b/drivers/pcmcia/au1000_xxs1500.c
+@@ -56,7 +56,7 @@
+ #define PCMCIA_IRQ		AU1000_GPIO_4
+ 
+ #if 0
+-#define DEBUG(x,args...)	printk(__FUNCTION__ ": " x,##args)
++#define DEBUG(x, args...)	printk(__func__ ": " x, ##args)
+ #else
+ #define DEBUG(x,args...)
+ #endif
+diff --git a/drivers/pcmcia/cardbus.c b/drivers/pcmcia/cardbus.c
+index 714baae..fb2f38d 100644
+--- a/drivers/pcmcia/cardbus.c
++++ b/drivers/pcmcia/cardbus.c
+@@ -209,7 +209,7 @@ static void cardbus_assign_irqs(struct pci_bus *bus, int irq)
+ 	}
+ }
+ 
+-int cb_alloc(struct pcmcia_socket * s)
++int __ref cb_alloc(struct pcmcia_socket * s)
+ {
+ 	struct pci_bus *bus = s->cb_dev->subordinate;
+ 	struct pci_dev *dev;
 diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c
 index 06a85d7..3637953 100644
 --- a/drivers/pcmcia/cistpl.c
@@ -815327,6 +817715,61 @@
  
  /* In cs.c */
  extern struct rw_semaphore pcmcia_socket_list_rwsem;
+diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
+index 5a85871..e407754 100644
+--- a/drivers/pcmcia/ds.c
++++ b/drivers/pcmcia/ds.c
+@@ -1520,7 +1520,7 @@ static void pcmcia_bus_remove_socket(struct device *dev,
+ 
+ 
+ /* the pcmcia_bus_interface is used to handle pcmcia socket devices */
+-static struct class_interface pcmcia_bus_interface = {
++static struct class_interface pcmcia_bus_interface __refdata = {
+ 	.class = &pcmcia_socket_class,
+ 	.add_dev = &pcmcia_bus_add_socket,
+ 	.remove_dev = &pcmcia_bus_remove_socket,
+diff --git a/drivers/pcmcia/i82092.c b/drivers/pcmcia/i82092.c
+index e54ecc5..e136186 100644
+--- a/drivers/pcmcia/i82092.c
++++ b/drivers/pcmcia/i82092.c
+@@ -53,7 +53,7 @@ static int i82092aa_socket_resume (struct pci_dev *dev)
+ }
+ #endif
+ 
+-static struct pci_driver i82092aa_pci_drv = {
++static struct pci_driver i82092aa_pci_driver = {
+ 	.name           = "i82092aa",
+ 	.id_table       = i82092aa_pci_ids,
+ 	.probe          = i82092aa_pci_probe,
+@@ -714,13 +714,13 @@ static int i82092aa_set_mem_map(struct pcmcia_socket *socket, struct pccard_mem_
+ 
+ static int i82092aa_module_init(void)
+ {
+-	return pci_register_driver(&i82092aa_pci_drv);
++	return pci_register_driver(&i82092aa_pci_driver);
+ }
+ 
+ static void i82092aa_module_exit(void)
+ {
+ 	enter("i82092aa_module_exit");
+-	pci_unregister_driver(&i82092aa_pci_drv);
++	pci_unregister_driver(&i82092aa_pci_driver);
+ 	if (sockets[0].io_base>0)
+ 			 release_region(sockets[0].io_base, 2);
+ 	leave("i82092aa_module_exit");
+diff --git a/drivers/pcmcia/omap_cf.c b/drivers/pcmcia/omap_cf.c
+index bb6db3a..46314b4 100644
+--- a/drivers/pcmcia/omap_cf.c
++++ b/drivers/pcmcia/omap_cf.c
+@@ -153,7 +153,7 @@ omap_cf_set_socket(struct pcmcia_socket *sock, struct socket_state_t *s)
+ 
+ static int omap_cf_ss_suspend(struct pcmcia_socket *s)
+ {
+-	pr_debug("%s: %s\n", driver_name, __FUNCTION__);
++	pr_debug("%s: %s\n", driver_name, __func__);
+ 	return omap_cf_set_socket(s, &dead_socket);
+ }
+ 
 diff --git a/drivers/pcmcia/pcmcia_ioctl.c b/drivers/pcmcia/pcmcia_ioctl.c
 index 27523c5..5f186ab 100644
 --- a/drivers/pcmcia/pcmcia_ioctl.c
@@ -815349,6 +817792,34 @@
  	}
  #endif
  	if (major_dev != -1)
+diff --git a/drivers/pcmcia/pd6729.c b/drivers/pcmcia/pd6729.c
+index abc10fe..8bed1da 100644
+--- a/drivers/pcmcia/pd6729.c
++++ b/drivers/pcmcia/pd6729.c
+@@ -778,7 +778,7 @@ static struct pci_device_id pd6729_pci_ids[] = {
+ };
+ MODULE_DEVICE_TABLE(pci, pd6729_pci_ids);
+ 
+-static struct pci_driver pd6729_pci_drv = {
++static struct pci_driver pd6729_pci_driver = {
+ 	.name		= "pd6729",
+ 	.id_table	= pd6729_pci_ids,
+ 	.probe		= pd6729_pci_probe,
+@@ -791,12 +791,12 @@ static struct pci_driver pd6729_pci_drv = {
+ 
+ static int pd6729_module_init(void)
+ {
+-	return pci_register_driver(&pd6729_pci_drv);
++	return pci_register_driver(&pd6729_pci_driver);
+ }
+ 
+ static void pd6729_module_exit(void)
+ {
+-	pci_unregister_driver(&pd6729_pci_drv);
++	pci_unregister_driver(&pd6729_pci_driver);
+ }
+ 
+ module_init(pd6729_module_init);
 diff --git a/drivers/pcmcia/pxa2xx_cm_x270.c b/drivers/pcmcia/pxa2xx_cm_x270.c
 index fbf2f3a..e7ab060 100644
 --- a/drivers/pcmcia/pxa2xx_cm_x270.c
@@ -815361,6 +817832,330 @@
  #include <asm/arch/cm-x270.h>
  
  #include "soc_common.h"
+diff --git a/drivers/pcmcia/pxa2xx_lubbock.c b/drivers/pcmcia/pxa2xx_lubbock.c
+index 4a05802..881ec8a 100644
+--- a/drivers/pcmcia/pxa2xx_lubbock.c
++++ b/drivers/pcmcia/pxa2xx_lubbock.c
+@@ -87,7 +87,7 @@ lubbock_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
+ 
+ 		default:
+ 			printk(KERN_ERR "%s(): unrecognized Vcc %u\n",
+-			       __FUNCTION__, state->Vcc);
++			       __func__, state->Vcc);
+ 			ret = -1;
+ 		}
+ 
+@@ -104,7 +104,7 @@ lubbock_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
+ 				pa_dwr_set |= GPIO_A0;
+ 			else {
+ 				printk(KERN_ERR "%s(): unrecognized Vpp %u\n",
+-				       __FUNCTION__, state->Vpp);
++				       __func__, state->Vpp);
+ 				ret = -1;
+ 				break;
+ 			}
+@@ -128,14 +128,14 @@ lubbock_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
+ 
+ 		default:
+ 			printk(KERN_ERR "%s(): unrecognized Vcc %u\n",
+-			       __FUNCTION__, state->Vcc);
++			       __func__, state->Vcc);
+ 			ret = -1;
+ 			break;
+ 		}
+ 
+ 		if (state->Vpp != state->Vcc && state->Vpp != 0) {
+ 			printk(KERN_ERR "%s(): CF slot cannot support Vpp %u\n",
+-			       __FUNCTION__, state->Vpp);
++			       __func__, state->Vpp);
+ 			ret = -1;
+ 			break;
+ 		}
+diff --git a/drivers/pcmcia/pxa2xx_mainstone.c b/drivers/pcmcia/pxa2xx_mainstone.c
+index 6fa5eaa..145b85e 100644
+--- a/drivers/pcmcia/pxa2xx_mainstone.c
++++ b/drivers/pcmcia/pxa2xx_mainstone.c
+@@ -99,7 +99,7 @@ static int mst_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
+ 	case 50: power |= MST_PCMCIA_PWR_VCC_50; break;
+ 	default:
+ 		 printk(KERN_ERR "%s(): bad Vcc %u\n",
+-				 __FUNCTION__, state->Vcc);
++				 __func__, state->Vcc);
+ 		 ret = -1;
+ 	}
+ 
+@@ -111,7 +111,7 @@ static int mst_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
+ 			  power |= MST_PCMCIA_PWR_VPP_VCC;
+ 		  } else {
+ 			  printk(KERN_ERR "%s(): bad Vpp %u\n",
+-					  __FUNCTION__, state->Vpp);
++					  __func__, state->Vpp);
+ 			  ret = -1;
+ 		  }
+ 	}
+diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c
+index a8d1007..0fcf763 100644
+--- a/drivers/pcmcia/rsrc_nonstatic.c
++++ b/drivers/pcmcia/rsrc_nonstatic.c
+@@ -1045,7 +1045,7 @@ static void __devexit pccard_sysfs_remove_rsrc(struct device *dev,
+ 		device_remove_file(dev, *attr);
+ }
+ 
+-static struct class_interface pccard_rsrc_interface = {
++static struct class_interface pccard_rsrc_interface __refdata = {
+ 	.class = &pcmcia_socket_class,
+ 	.add_dev = &pccard_sysfs_add_rsrc,
+ 	.remove_dev = __devexit_p(&pccard_sysfs_remove_rsrc),
+diff --git a/drivers/pcmcia/sa1100_assabet.c b/drivers/pcmcia/sa1100_assabet.c
+index 7c57fdd..ce133ce 100644
+--- a/drivers/pcmcia/sa1100_assabet.c
++++ b/drivers/pcmcia/sa1100_assabet.c
+@@ -66,14 +66,14 @@ assabet_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_stat
+ 
+ 	case 50:
+ 		printk(KERN_WARNING "%s(): CS asked for 5V, applying 3.3V...\n",
+-			__FUNCTION__);
++			__func__);
+ 
+ 	case 33:  /* Can only apply 3.3V to the CF slot. */
+ 		mask = ASSABET_BCR_CF_PWR;
+ 		break;
+ 
+ 	default:
+-		printk(KERN_ERR "%s(): unrecognized Vcc %u\n", __FUNCTION__,
++		printk(KERN_ERR "%s(): unrecognized Vcc %u\n", __func__,
+ 			state->Vcc);
+ 		return -1;
+ 	}
+diff --git a/drivers/pcmcia/sa1100_badge4.c b/drivers/pcmcia/sa1100_badge4.c
+index 62bfc75..607c3f3 100644
+--- a/drivers/pcmcia/sa1100_badge4.c
++++ b/drivers/pcmcia/sa1100_badge4.c
+@@ -82,14 +82,14 @@ badge4_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_state
+ 	case 0:
+ 		if ((state->Vcc != 0) &&
+ 		    (state->Vcc != badge4_pcmvcc)) {
+-			complain_about_jumpering(__FUNCTION__, "pcmvcc",
++			complain_about_jumpering(__func__, "pcmvcc",
+ 						 badge4_pcmvcc, state->Vcc);
+ 			// Apply power regardless of the jumpering.
+ 			// return -1;
+ 		}
+ 		if ((state->Vpp != 0) &&
+ 		    (state->Vpp != badge4_pcmvpp)) {
+-			complain_about_jumpering(__FUNCTION__, "pcmvpp",
++			complain_about_jumpering(__func__, "pcmvpp",
+ 						 badge4_pcmvpp, state->Vpp);
+ 			return -1;
+ 		}
+@@ -98,7 +98,7 @@ badge4_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_state
+ 	case 1:
+ 		if ((state->Vcc != 0) &&
+ 		    (state->Vcc != badge4_cfvcc)) {
+-			complain_about_jumpering(__FUNCTION__, "cfvcc",
++			complain_about_jumpering(__func__, "cfvcc",
+ 						 badge4_cfvcc, state->Vcc);
+ 			return -1;
+ 		}
+@@ -143,7 +143,7 @@ int pcmcia_badge4_init(struct device *dev)
+ 	if (machine_is_badge4()) {
+ 		printk(KERN_INFO
+ 		       "%s: badge4_pcmvcc=%d, badge4_pcmvpp=%d, badge4_cfvcc=%d\n",
+-		       __FUNCTION__,
++		       __func__,
+ 		       badge4_pcmvcc, badge4_pcmvpp, badge4_cfvcc);
+ 
+ 		ret = sa11xx_drv_pcmcia_probe(dev, &badge4_pcmcia_ops, 0, 2);
+diff --git a/drivers/pcmcia/sa1100_cerf.c b/drivers/pcmcia/sa1100_cerf.c
+index 549a152..7c3951a 100644
+--- a/drivers/pcmcia/sa1100_cerf.c
++++ b/drivers/pcmcia/sa1100_cerf.c
+@@ -63,7 +63,7 @@ cerf_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
+ 
+ 	default:
+ 		printk(KERN_ERR "%s(): unrecognized Vcc %u\n",
+-			__FUNCTION__, state->Vcc);
++			__func__, state->Vcc);
+ 		return -1;
+ 	}
+ 
+diff --git a/drivers/pcmcia/sa1100_jornada720.c b/drivers/pcmcia/sa1100_jornada720.c
+index 6284c35..2167e67 100644
+--- a/drivers/pcmcia/sa1100_jornada720.c
++++ b/drivers/pcmcia/sa1100_jornada720.c
+@@ -42,7 +42,7 @@ jornada720_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_s
+   unsigned int pa_dwr_mask, pa_dwr_set;
+   int ret;
+ 
+-printk("%s(): config socket %d vcc %d vpp %d\n", __FUNCTION__,
++printk("%s(): config socket %d vcc %d vpp %d\n", __func__,
+ 	skt->nr, state->Vcc, state->Vpp);
+ 
+   switch (skt->nr) {
+@@ -74,7 +74,7 @@ printk("%s(): config socket %d vcc %d vpp %d\n", __FUNCTION__,
+ 
+   if (state->Vpp != state->Vcc && state->Vpp != 0) {
+     printk(KERN_ERR "%s(): slot cannot support VPP %u\n",
+-	   __FUNCTION__, state->Vpp);
++	   __func__, state->Vpp);
+     return -1;
+   }
+ 
+diff --git a/drivers/pcmcia/sa1100_neponset.c b/drivers/pcmcia/sa1100_neponset.c
+index 5bc9e95..687492f 100644
+--- a/drivers/pcmcia/sa1100_neponset.c
++++ b/drivers/pcmcia/sa1100_neponset.c
+@@ -59,7 +59,7 @@ neponset_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_sta
+ 			ncr_set = NCR_A0VPP;
+ 		else {
+ 			printk(KERN_ERR "%s(): unrecognized VPP %u\n",
+-			       __FUNCTION__, state->Vpp);
++			       __func__, state->Vpp);
+ 			return -1;
+ 		}
+ 		break;
+@@ -71,7 +71,7 @@ neponset_pcmcia_configure_socket(struct soc_pcmcia_socket *skt, const socket_sta
+ 
+ 		if (state->Vpp != state->Vcc && state->Vpp != 0) {
+ 			printk(KERN_ERR "%s(): CF slot cannot support VPP %u\n",
+-			       __FUNCTION__, state->Vpp);
++			       __func__, state->Vpp);
+ 			return -1;
+ 		}
+ 		break;
+diff --git a/drivers/pcmcia/sa1100_shannon.c b/drivers/pcmcia/sa1100_shannon.c
+index 9456f54..494912f 100644
+--- a/drivers/pcmcia/sa1100_shannon.c
++++ b/drivers/pcmcia/sa1100_shannon.c
+@@ -73,19 +73,19 @@ shannon_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
+ {
+ 	switch (state->Vcc) {
+ 	case 0:	/* power off */
+-		printk(KERN_WARNING "%s(): CS asked for 0V, still applying 3.3V..\n", __FUNCTION__);
++		printk(KERN_WARNING "%s(): CS asked for 0V, still applying 3.3V..\n", __func__);
+ 		break;
+ 	case 50:
+-		printk(KERN_WARNING "%s(): CS asked for 5V, applying 3.3V..\n", __FUNCTION__);
++		printk(KERN_WARNING "%s(): CS asked for 5V, applying 3.3V..\n", __func__);
+ 	case 33:
+ 		break;
+ 	default:
+ 		printk(KERN_ERR "%s(): unrecognized Vcc %u\n",
+-		       __FUNCTION__, state->Vcc);
++		       __func__, state->Vcc);
+ 		return -1;
+ 	}
+ 
+-	printk(KERN_WARNING "%s(): Warning, Can't perform reset\n", __FUNCTION__);
++	printk(KERN_WARNING "%s(): Warning, Can't perform reset\n", __func__);
+ 	
+ 	/* Silently ignore Vpp, output enable, speaker enable. */
+ 
+diff --git a/drivers/pcmcia/sa1100_simpad.c b/drivers/pcmcia/sa1100_simpad.c
+index 04d6f7f..42567de 100644
+--- a/drivers/pcmcia/sa1100_simpad.c
++++ b/drivers/pcmcia/sa1100_simpad.c
+@@ -90,7 +90,7 @@ simpad_pcmcia_configure_socket(struct soc_pcmcia_socket *skt,
+ 
+ 	default:
+ 		printk(KERN_ERR "%s(): unrecognized Vcc %u\n",
+-			__FUNCTION__, state->Vcc);
++			__func__, state->Vcc);
+ 		clear_cs3_bit(VCC_3V_EN|VCC_5V_EN|EN0|EN1);
+ 		local_irq_restore(flags);
+ 		return -1;
+diff --git a/drivers/pcmcia/soc_common.c b/drivers/pcmcia/soc_common.c
+index aa7779d..420a775 100644
+--- a/drivers/pcmcia/soc_common.c
++++ b/drivers/pcmcia/soc_common.c
+@@ -37,6 +37,7 @@
+ #include <linux/kernel.h>
+ #include <linux/timer.h>
+ #include <linux/mm.h>
++#include <linux/mutex.h>
+ #include <linux/interrupt.h>
+ #include <linux/irq.h>
+ #include <linux/spinlock.h>
+@@ -353,7 +354,7 @@ soc_common_pcmcia_set_io_map(struct pcmcia_socket *sock, struct pccard_io_map *m
+ 		(map->flags&MAP_PREFETCH)?"PREFETCH ":"");
+ 
+ 	if (map->map >= MAX_IO_WIN) {
+-		printk(KERN_ERR "%s(): map (%d) out of range\n", __FUNCTION__,
++		printk(KERN_ERR "%s(): map (%d) out of range\n", __func__,
+ 		       map->map);
+ 		return -1;
+ 	}
+@@ -578,7 +579,7 @@ EXPORT_SYMBOL(soc_pcmcia_enable_irqs);
+ 
+ 
+ LIST_HEAD(soc_pcmcia_sockets);
+-DECLARE_MUTEX(soc_pcmcia_sockets_lock);
++static DEFINE_MUTEX(soc_pcmcia_sockets_lock);
+ 
+ static const char *skt_names[] = {
+ 	"PCMCIA socket 0",
+@@ -601,11 +602,11 @@ soc_pcmcia_notifier(struct notifier_block *nb, unsigned long val, void *data)
+ 	struct cpufreq_freqs *freqs = data;
+ 	int ret = 0;
+ 
+-	down(&soc_pcmcia_sockets_lock);
++	mutex_lock(&soc_pcmcia_sockets_lock);
+ 	list_for_each_entry(skt, &soc_pcmcia_sockets, node)
+ 		if ( skt->ops->frequency_change )
+ 			ret += skt->ops->frequency_change(skt, val, freqs);
+-	up(&soc_pcmcia_sockets_lock);
++	mutex_unlock(&soc_pcmcia_sockets_lock);
+ 
+ 	return ret;
+ }
+@@ -642,7 +643,7 @@ int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops
+ 	struct soc_pcmcia_socket *skt;
+ 	int ret, i;
+ 
+-	down(&soc_pcmcia_sockets_lock);
++	mutex_lock(&soc_pcmcia_sockets_lock);
+ 
+ 	sinfo = kzalloc(SKT_DEV_INFO_SIZE(nr), GFP_KERNEL);
+ 	if (!sinfo) {
+@@ -782,7 +783,7 @@ int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops
+ 	kfree(sinfo);
+ 
+  out:
+-	up(&soc_pcmcia_sockets_lock);
++	mutex_unlock(&soc_pcmcia_sockets_lock);
+ 	return ret;
+ }
+ 
+@@ -793,7 +794,7 @@ int soc_common_drv_pcmcia_remove(struct device *dev)
+ 
+ 	dev_set_drvdata(dev, NULL);
+ 
+-	down(&soc_pcmcia_sockets_lock);
++	mutex_lock(&soc_pcmcia_sockets_lock);
+ 	for (i = 0; i < sinfo->nskt; i++) {
+ 		struct soc_pcmcia_socket *skt = &sinfo->skt[i];
+ 
+@@ -818,7 +819,7 @@ int soc_common_drv_pcmcia_remove(struct device *dev)
+ 	if (list_empty(&soc_pcmcia_sockets))
+ 		soc_pcmcia_cpufreq_unregister();
+ 
+-	up(&soc_pcmcia_sockets_lock);
++	mutex_unlock(&soc_pcmcia_sockets_lock);
+ 
+ 	kfree(sinfo);
+ 
+diff --git a/drivers/pcmcia/soc_common.h b/drivers/pcmcia/soc_common.h
+index 6f14126..1edc1da 100644
+--- a/drivers/pcmcia/soc_common.h
++++ b/drivers/pcmcia/soc_common.h
+@@ -133,7 +133,6 @@ extern void soc_common_pcmcia_get_timing(struct soc_pcmcia_socket *, struct soc_
+ 
+ 
+ extern struct list_head soc_pcmcia_sockets;
+-extern struct semaphore soc_pcmcia_sockets_lock;
+ 
+ extern int soc_common_drv_pcmcia_probe(struct device *dev, struct pcmcia_low_level *ops, int first, int nr);
+ extern int soc_common_drv_pcmcia_remove(struct device *dev);
 diff --git a/drivers/pcmcia/socket_sysfs.c b/drivers/pcmcia/socket_sysfs.c
 index b440900..562384d 100644
 --- a/drivers/pcmcia/socket_sysfs.c
@@ -818786,7 +821581,7 @@
 +	remove_proc_entry("bus/pnp", NULL);
  }
 diff --git a/drivers/pnp/pnpbios/rsparser.c b/drivers/pnp/pnpbios/rsparser.c
-index caade35..2e2c457 100644
+index caade35..5ff9a4c 100644
 --- a/drivers/pnp/pnpbios/rsparser.c
 +++ b/drivers/pnp/pnpbios/rsparser.c
 @@ -4,7 +4,6 @@
@@ -819342,7 +822137,7 @@
  {
  	unsigned long base = res->start;
  	unsigned long len = res->end - res->start + 1;
-@@ -632,26 +577,36 @@ static void pnpbios_encode_fixed_mem32(unsigned char *p, struct resource *res)
+@@ -632,26 +577,38 @@ static void pnpbios_encode_fixed_mem32(unsigned char *p, struct resource *res)
  	p[9] = (len >> 8) & 0xff;
  	p[10] = (len >> 16) & 0xff;
  	p[11] = (len >> 24) & 0xff;
@@ -819361,7 +822156,8 @@
  	p[1] = map & 0xff;
  	p[2] = (map >> 8) & 0xff;
 +
-+	dev_dbg(&dev->dev, "  encode irq %d\n", res->start);
++	dev_dbg(&dev->dev, "  encode irq %llu\n",
++		(unsigned long long)res->start);
  }
  
 -static void pnpbios_encode_dma(unsigned char *p, struct resource *res)
@@ -819373,7 +822169,8 @@
  	map = 1 << res->start;
  	p[1] = map & 0xff;
 +
-+	dev_dbg(&dev->dev, "  encode dma %d\n", res->start);
++	dev_dbg(&dev->dev, "  encode dma %llu\n",
++		(unsigned long long)res->start);
  }
  
 -static void pnpbios_encode_port(unsigned char *p, struct resource *res)
@@ -819382,7 +822179,7 @@
  {
  	unsigned long base = res->start;
  	unsigned long len = res->end - res->start + 1;
-@@ -661,9 +616,13 @@ static void pnpbios_encode_port(unsigned char *p, struct resource *res)
+@@ -661,9 +618,13 @@ static void pnpbios_encode_port(unsigned char *p, struct resource *res)
  	p[4] = base & 0xff;
  	p[5] = (base >> 8) & 0xff;
  	p[7] = len & 0xff;
@@ -819397,7 +822194,7 @@
  {
  	unsigned long base = res->start;
  	unsigned long len = res->end - res->start + 1;
-@@ -671,13 +630,15 @@ static void pnpbios_encode_fixed_port(unsigned char *p, struct resource *res)
+@@ -671,13 +632,15 @@ static void pnpbios_encode_fixed_port(unsigned char *p, struct resource *res)
  	p[1] = base & 0xff;
  	p[2] = (base >> 8) & 0xff;
  	p[3] = len & 0xff;
@@ -819418,7 +822215,7 @@
  {
  	unsigned int len, tag;
  	int port = 0, irq = 0, dma = 0, mem = 0;
-@@ -701,42 +662,48 @@ static unsigned char *pnpbios_encode_allocated_resource_data(unsigned char *p,
+@@ -701,42 +664,48 @@ static unsigned char *pnpbios_encode_allocated_resource_data(unsigned char *p,
  		case LARGE_TAG_MEM:
  			if (len != 9)
  				goto len_err;
@@ -819473,7 +822270,7 @@
  			port++;
  			break;
  
-@@ -747,7 +714,8 @@ static unsigned char *pnpbios_encode_allocated_resource_data(unsigned char *p,
+@@ -747,7 +716,8 @@ static unsigned char *pnpbios_encode_allocated_resource_data(unsigned char *p,
  		case SMALL_TAG_FIXEDPORT:
  			if (len != 3)
  				goto len_err;
@@ -819483,7 +822280,7 @@
  			port++;
  			break;
  
-@@ -758,9 +726,8 @@ static unsigned char *pnpbios_encode_allocated_resource_data(unsigned char *p,
+@@ -758,9 +728,8 @@ static unsigned char *pnpbios_encode_allocated_resource_data(unsigned char *p,
  
  		default:	/* an unkown tag */
  len_err:
@@ -819495,7 +822292,7 @@
  			break;
  		}
  
-@@ -771,8 +738,7 @@ len_err:
+@@ -771,8 +740,7 @@ len_err:
  			p += len + 1;
  	}
  
@@ -819505,7 +822302,7 @@
  
  	return NULL;
  }
-@@ -787,7 +753,7 @@ int __init pnpbios_parse_data_stream(struct pnp_dev *dev,
+@@ -787,7 +755,7 @@ int __init pnpbios_parse_data_stream(struct pnp_dev *dev,
  	unsigned char *p = (char *)node->data;
  	unsigned char *end = (char *)(node->data + node->size);
  
@@ -819514,7 +822311,7 @@
  	if (!p)
  		return -EIO;
  	p = pnpbios_parse_resource_option_data(p, end, dev);
-@@ -799,25 +765,25 @@ int __init pnpbios_parse_data_stream(struct pnp_dev *dev,
+@@ -799,25 +767,25 @@ int __init pnpbios_parse_data_stream(struct pnp_dev *dev,
  	return 0;
  }
  
@@ -894883,8 +897680,23 @@
      wd33c93_init(mvme147_host, regs, dma_setup, dma_stop, WD33C93_FS_8_10);
  
      if (request_irq(MVME147_IRQ_SCSI_PORT, mvme147_intr, 0, "MVME147 SCSI PORT", mvme147_intr))
+diff --git a/drivers/scsi/mvsas.c b/drivers/scsi/mvsas.c
+index e55b903..1dd70d7 100644
+--- a/drivers/scsi/mvsas.c
++++ b/drivers/scsi/mvsas.c
+@@ -2822,7 +2822,9 @@ static void mvs_update_phyinfo(struct mvs_info *mvi, int i,
+ 		dev_printk(KERN_DEBUG, &pdev->dev,
+ 			"phy[%d] Get Attached Address 0x%llX ,"
+ 			" SAS Address 0x%llX\n",
+-			i, phy->att_dev_sas_addr, phy->dev_sas_addr);
++			i,
++			(unsigned long long)phy->att_dev_sas_addr,
++			(unsigned long long)phy->dev_sas_addr);
+ 		dev_printk(KERN_DEBUG, &pdev->dev,
+ 			"Rate = %x , type = %d\n",
+ 			sas_phy->linkrate, phy->phy_type);
 diff --git a/drivers/scsi/ncr53c8xx.c b/drivers/scsi/ncr53c8xx.c
-index c5ebf01..ceab4f7 100644
+index c5ebf01..c57c94c 100644
 --- a/drivers/scsi/ncr53c8xx.c
 +++ b/drivers/scsi/ncr53c8xx.c
 @@ -8186,7 +8186,7 @@ static void insert_into_waiting_list(struct ncb *np, struct scsi_cmnd *cmd)
@@ -894901,7 +897713,7 @@
  	if (waiting_list) printk("%s: waiting_list=%lx processing sts=%d\n", ncr_name(np), (u_long) waiting_list, sts);
  #endif
 -	while ((wcmd = waiting_list) != 0) {
-+	while (wcmd = waiting_list) {
++	while ((wcmd = waiting_list) != NULL) {
  		waiting_list = (struct scsi_cmnd *) wcmd->next_wcmd;
  		wcmd->next_wcmd = NULL;
  		if (sts == DID_OK) {
@@ -907564,7 +910376,7 @@
  	printk("lsr = %d (jiff=%lu)...done\n", lsr, jiffies);
  #endif
 diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
-index 77f7a7f..ea41f26 100644
+index 77f7a7f..a1ca9b7 100644
 --- a/drivers/serial/8250.c
 +++ b/drivers/serial/8250.c
 @@ -1740,6 +1740,60 @@ static inline void wait_for_xmitr(struct uart_8250_port *up, int bits)
@@ -907665,7 +910477,17 @@
  }
  
  static void
-@@ -2386,6 +2443,10 @@ static struct uart_ops serial8250_pops = {
+@@ -2214,7 +2271,8 @@ static int serial8250_request_std_resource(struct uart_8250_port *up)
+ 		}
+ 
+ 		if (up->port.flags & UPF_IOREMAP) {
+-			up->port.membase = ioremap(up->port.mapbase, size);
++			up->port.membase = ioremap_nocache(up->port.mapbase,
++									size);
+ 			if (!up->port.membase) {
+ 				release_mem_region(up->port.mapbase, size);
+ 				ret = -ENOMEM;
+@@ -2386,6 +2444,10 @@ static struct uart_ops serial8250_pops = {
  	.request_port	= serial8250_request_port,
  	.config_port	= serial8250_config_port,
  	.verify_port	= serial8250_verify_port,
@@ -907783,11 +910605,15 @@
 -MODULE_DESCRIPTION("8250 serial probe module for Au1x000 cards");
 -MODULE_LICENSE("GPL");
 diff --git a/drivers/serial/8250_early.c b/drivers/serial/8250_early.c
-index 38776e8..cd89870 100644
+index 38776e8..f279745 100644
 --- a/drivers/serial/8250_early.c
 +++ b/drivers/serial/8250_early.c
-@@ -156,7 +156,7 @@ static int __init parse_options(struct early_serial8250_device *device,
- 		port->membase = ioremap(port->mapbase, 64);
+@@ -153,10 +153,10 @@ static int __init parse_options(struct early_serial8250_device *device,
+ 			(void __iomem *)__fix_to_virt(FIX_EARLYCON_MEM_BASE);
+ 		port->membase += port->mapbase & ~PAGE_MASK;
+ #else
+-		port->membase = ioremap(port->mapbase, 64);
++		port->membase = ioremap_nocache(port->mapbase, 64);
  		if (!port->membase) {
  			printk(KERN_ERR "%s: Couldn't ioremap 0x%llx\n",
 -				__FUNCTION__,
@@ -907796,10 +910622,66 @@
  			return -ENOMEM;
  		}
 diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c
-index f97224c..6e57382 100644
+index f97224c..53fa19c 100644
 --- a/drivers/serial/8250_pci.c
 +++ b/drivers/serial/8250_pci.c
-@@ -775,7 +775,7 @@ pci_default_setup(struct serial_private *priv, struct pciserial_board *board,
+@@ -86,7 +86,7 @@ setup_port(struct serial_private *priv, struct uart_port *port,
+ 		len =  pci_resource_len(dev, bar);
+ 
+ 		if (!priv->remapped_bar[bar])
+-			priv->remapped_bar[bar] = ioremap(base, len);
++			priv->remapped_bar[bar] = ioremap_nocache(base, len);
+ 		if (!priv->remapped_bar[bar])
+ 			return -ENOMEM;
+ 
+@@ -270,7 +270,7 @@ static int pci_plx9050_init(struct pci_dev *dev)
+ 	/*
+ 	 * enable/disable interrupts
+ 	 */
+-	p = ioremap(pci_resource_start(dev, 0), 0x80);
++	p = ioremap_nocache(pci_resource_start(dev, 0), 0x80);
+ 	if (p == NULL)
+ 		return -ENOMEM;
+ 	writel(irq_config, p + 0x4c);
+@@ -294,7 +294,7 @@ static void __devexit pci_plx9050_exit(struct pci_dev *dev)
+ 	/*
+ 	 * disable interrupts
+ 	 */
+-	p = ioremap(pci_resource_start(dev, 0), 0x80);
++	p = ioremap_nocache(pci_resource_start(dev, 0), 0x80);
+ 	if (p != NULL) {
+ 		writel(0, p + 0x4c);
+ 
+@@ -341,7 +341,8 @@ static int sbs_init(struct pci_dev *dev)
+ {
+ 	u8 __iomem *p;
+ 
+-	p = ioremap(pci_resource_start(dev, 0), pci_resource_len(dev, 0));
++	p = ioremap_nocache(pci_resource_start(dev, 0),
++						pci_resource_len(dev, 0));
+ 
+ 	if (p == NULL)
+ 		return -ENOMEM;
+@@ -365,7 +366,8 @@ static void __devexit sbs_exit(struct pci_dev *dev)
+ {
+ 	u8 __iomem *p;
+ 
+-	p = ioremap(pci_resource_start(dev, 0), pci_resource_len(dev, 0));
++	p = ioremap_nocache(pci_resource_start(dev, 0),
++					pci_resource_len(dev, 0));
+ 	/* FIXME: What if resource_len < OCT_REG_CR_OFF */
+ 	if (p != NULL)
+ 		writeb(0, p + OCT_REG_CR_OFF);
+@@ -419,7 +421,7 @@ static int pci_siig10x_init(struct pci_dev *dev)
+ 		break;
+ 	}
+ 
+-	p = ioremap(pci_resource_start(dev, 0), 0x80);
++	p = ioremap_nocache(pci_resource_start(dev, 0), 0x80);
+ 	if (p == NULL)
+ 		return -ENOMEM;
+ 
+@@ -775,7 +777,7 @@ pci_default_setup(struct serial_private *priv, struct pciserial_board *board,
   * This list is ordered alphabetically by vendor then device.
   * Specific entries must come before more generic entries.
   */
@@ -909628,6 +912510,42 @@
  		return ret;
  	}
  
+diff --git a/drivers/serial/jsm/jsm.h b/drivers/serial/jsm/jsm.h
+index 12c934a..8871aaa 100644
+--- a/drivers/serial/jsm/jsm.h
++++ b/drivers/serial/jsm/jsm.h
+@@ -373,6 +373,7 @@ struct neo_uart_struct {
+ #define PCI_DEVICE_NEO_2DB9PRI_PCI_NAME		"Neo 2 - DB9 Universal PCI - Powered Ring Indicator"
+ #define PCI_DEVICE_NEO_2RJ45_PCI_NAME		"Neo 2 - RJ45 Universal PCI"
+ #define PCI_DEVICE_NEO_2RJ45PRI_PCI_NAME	"Neo 2 - RJ45 Universal PCI - Powered Ring Indicator"
++#define PCIE_DEVICE_NEO_IBM_PCI_NAME		"Neo 4 - PCI Express - IBM"
+ 
+ /*
+  * Our Global Variables.
+diff --git a/drivers/serial/jsm/jsm_driver.c b/drivers/serial/jsm/jsm_driver.c
+index 6767ee3..338cf8a 100644
+--- a/drivers/serial/jsm/jsm_driver.c
++++ b/drivers/serial/jsm/jsm_driver.c
+@@ -82,7 +82,10 @@ static int jsm_probe_one(struct pci_dev *pdev, const struct pci_device_id *ent)
+ 	/* store the info for the board we've found */
+ 	brd->boardnum = adapter_count++;
+ 	brd->pci_dev = pdev;
+-	brd->maxports = 2;
++	if (pdev->device == PCIE_DEVICE_ID_NEO_4_IBM)
++		brd->maxports = 4;
++	else
++		brd->maxports = 2;
+ 
+ 	spin_lock_init(&brd->bd_lock);
+ 	spin_lock_init(&brd->bd_intr_lock);
+@@ -208,6 +211,7 @@ static struct pci_device_id jsm_pci_tbl[] = {
+ 	{ PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_2DB9PRI), 0, 0, 1 },
+ 	{ PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_2RJ45), 0, 0, 2 },
+ 	{ PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCI_DEVICE_ID_NEO_2RJ45PRI), 0, 0, 3 },
++	{ PCI_DEVICE(PCI_VENDOR_ID_DIGI, PCIE_DEVICE_ID_NEO_4_IBM), 0, 0, 4 },
+ 	{ 0, }
+ };
+ MODULE_DEVICE_TABLE(pci, jsm_pci_tbl);
 diff --git a/drivers/serial/kgdboc.c b/drivers/serial/kgdboc.c
 new file mode 100644
 index 0000000..eadc1ab
@@ -911099,6 +914017,45 @@
  	struct ssp_device *ssp;
  	int status = 0;
  
+diff --git a/drivers/spi/spi_bfin5xx.c b/drivers/spi/spi_bfin5xx.c
+index a9ac1fd..7fea3cf 100644
+--- a/drivers/spi/spi_bfin5xx.c
++++ b/drivers/spi/spi_bfin5xx.c
+@@ -608,6 +608,7 @@ static void pump_transfers(unsigned long data)
+ 	u8 width;
+ 	u16 cr, dma_width, dma_config;
+ 	u32 tranf_success = 1;
++	u8 full_duplex = 0;
+ 
+ 	/* Get current state information */
+ 	message = drv_data->cur_msg;
+@@ -658,6 +659,7 @@ static void pump_transfers(unsigned long data)
+ 	}
+ 
+ 	if (transfer->rx_buf != NULL) {
++		full_duplex = transfer->tx_buf != NULL;
+ 		drv_data->rx = transfer->rx_buf;
+ 		drv_data->rx_end = drv_data->rx + transfer->len;
+ 		dev_dbg(&drv_data->pdev->dev, "rx_buf is %p, rx_end is %p\n",
+@@ -740,7 +742,8 @@ static void pump_transfers(unsigned long data)
+ 	 * successful use different way to r/w according to
+ 	 * drv_data->cur_chip->enable_dma
+ 	 */
+-	if (drv_data->cur_chip->enable_dma && drv_data->len > 6) {
++	if (!full_duplex && drv_data->cur_chip->enable_dma
++				&& drv_data->len > 6) {
+ 
+ 		disable_dma(drv_data->dma_channel);
+ 		clear_dma_irqstat(drv_data->dma_channel);
+@@ -828,7 +831,7 @@ static void pump_transfers(unsigned long data)
+ 		/* IO mode write then read */
+ 		dev_dbg(&drv_data->pdev->dev, "doing IO transfer\n");
+ 
+-		if (drv_data->tx != NULL && drv_data->rx != NULL) {
++		if (full_duplex) {
+ 			/* full duplex mode */
+ 			BUG_ON((drv_data->tx_end - drv_data->tx) !=
+ 			       (drv_data->rx_end - drv_data->rx));
 diff --git a/drivers/spi/spi_bitbang.c b/drivers/spi/spi_bitbang.c
 index 71e8814..96cc39e 100644
 --- a/drivers/spi/spi_bitbang.c
@@ -911474,9 +914431,23 @@
  
  	/* NOTE we _need_ to call chipselect() early, ideally with adapter
 diff --git a/drivers/spi/spi_s3c24xx.c b/drivers/spi/spi_s3c24xx.c
-index b7476b8..34bfb7d 100644
+index b7476b8..0885cc3 100644
 --- a/drivers/spi/spi_s3c24xx.c
 +++ b/drivers/spi/spi_s3c24xx.c
+@@ -125,10 +125,10 @@ static int s3c24xx_spi_setupxfer(struct spi_device *spi,
+ 	/* is clk = pclk / (2 * (pre+1)), or is it
+ 	 *    clk = (pclk * 2) / ( pre + 1) */
+ 
+-	div = (div / 2) - 1;
++	div /= 2;
+ 
+-	if (div < 0)
+-		div = 1;
++	if (div > 0)
++		div -= 1;
+ 
+ 	if (div > 255)
+ 		div = 255;
 @@ -169,7 +169,7 @@ static int s3c24xx_spi_setup(struct spi_device *spi)
  	}
  
@@ -966112,11 +969083,143 @@
  #else
  #define DPRINTK(fmt,args...) do {} while(0)
  #endif
+diff --git a/fs/autofs4/expire.c b/fs/autofs4/expire.c
+index d96e5c1..894fee5 100644
+--- a/fs/autofs4/expire.c
++++ b/fs/autofs4/expire.c
+@@ -73,8 +73,8 @@ static int autofs4_mount_busy(struct vfsmount *mnt, struct dentry *dentry)
+ 	status = 0;
+ done:
+ 	DPRINTK("returning = %d", status);
+-	mntput(mnt);
+ 	dput(dentry);
++	mntput(mnt);
+ 	return status;
+ }
+ 
+@@ -333,7 +333,7 @@ static struct dentry *autofs4_expire_indirect(struct super_block *sb,
+ 			/* Can we expire this guy */
+ 			if (autofs4_can_expire(dentry, timeout, do_now)) {
+ 				expired = dentry;
+-				break;
++				goto found;
+ 			}
+ 			goto next;
+ 		}
+@@ -352,7 +352,7 @@ static struct dentry *autofs4_expire_indirect(struct super_block *sb,
+ 				inf->flags |= AUTOFS_INF_EXPIRING;
+ 				spin_unlock(&sbi->fs_lock);
+ 				expired = dentry;
+-				break;
++				goto found;
+ 			}
+ 			spin_unlock(&sbi->fs_lock);
+ 		/*
+@@ -363,7 +363,7 @@ static struct dentry *autofs4_expire_indirect(struct super_block *sb,
+ 			expired = autofs4_check_leaves(mnt, dentry, timeout, do_now);
+ 			if (expired) {
+ 				dput(dentry);
+-				break;
++				goto found;
+ 			}
+ 		}
+ next:
+@@ -371,18 +371,16 @@ next:
+ 		spin_lock(&dcache_lock);
+ 		next = next->next;
+ 	}
+-
+-	if (expired) {
+-		DPRINTK("returning %p %.*s",
+-			expired, (int)expired->d_name.len, expired->d_name.name);
+-		spin_lock(&dcache_lock);
+-		list_move(&expired->d_parent->d_subdirs, &expired->d_u.d_child);
+-		spin_unlock(&dcache_lock);
+-		return expired;
+-	}
+ 	spin_unlock(&dcache_lock);
+-
+ 	return NULL;
++
++found:
++	DPRINTK("returning %p %.*s",
++		expired, (int)expired->d_name.len, expired->d_name.name);
++	spin_lock(&dcache_lock);
++	list_move(&expired->d_parent->d_subdirs, &expired->d_u.d_child);
++	spin_unlock(&dcache_lock);
++	return expired;
+ }
+ 
+ /* Perform an expiry operation */
 diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
-index a54a946..aa4c5ff 100644
+index a54a946..edf5b6b 100644
 --- a/fs/autofs4/root.c
 +++ b/fs/autofs4/root.c
-@@ -533,9 +533,9 @@ static struct dentry *autofs4_lookup_unhashed(struct autofs_sb_info *sbi, struct
+@@ -146,17 +146,17 @@ static int autofs4_dir_open(struct inode *inode, struct file *file)
+ 
+ 	if (d_mountpoint(dentry)) {
+ 		struct file *fp = NULL;
+-		struct vfsmount *fp_mnt = mntget(mnt);
+-		struct dentry *fp_dentry = dget(dentry);
++		struct path fp_path = { .dentry = dentry, .mnt = mnt };
+ 
+-		if (!autofs4_follow_mount(&fp_mnt, &fp_dentry)) {
+-			dput(fp_dentry);
+-			mntput(fp_mnt);
++		path_get(&fp_path);
++
++		if (!autofs4_follow_mount(&fp_path.mnt, &fp_path.dentry)) {
++			path_put(&fp_path);
+ 			dcache_dir_close(inode, file);
+ 			goto out;
+ 		}
+ 
+-		fp = dentry_open(fp_dentry, fp_mnt, file->f_flags);
++		fp = dentry_open(fp_path.dentry, fp_path.mnt, file->f_flags);
+ 		status = PTR_ERR(fp);
+ 		if (IS_ERR(fp)) {
+ 			dcache_dir_close(inode, file);
+@@ -242,7 +242,8 @@ static int try_to_fill_dentry(struct dentry *dentry, int flags)
+ {
+ 	struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb);
+ 	struct autofs_info *ino = autofs4_dentry_ino(dentry);
+-	int status = 0;
++	struct dentry *new;
++	int status;
+ 
+ 	/* Block on any pending expiry here; invalidate the dentry
+            when expiration is done to trigger mount request with a new
+@@ -318,7 +319,28 @@ static int try_to_fill_dentry(struct dentry *dentry, int flags)
+ 	spin_lock(&dentry->d_lock);
+ 	dentry->d_flags &= ~DCACHE_AUTOFS_PENDING;
+ 	spin_unlock(&dentry->d_lock);
+-	return status;
++
++	/*
++	 * The dentry that is passed in from lookup may not be the one
++	 * we end up using, as mkdir can create a new one.  If this
++	 * happens, and another process tries the lookup at the same time,
++	 * it will set the PENDING flag on this new dentry, but add itself
++	 * to our waitq.  Then, if after the lookup succeeds, the first
++	 * process that requested the mount performs another lookup of the
++	 * same directory, it will show up as still pending!  So, we need
++	 * to redo the lookup here and clear pending on that dentry.
++	 */
++	if (d_unhashed(dentry)) {
++		new = d_lookup(dentry->d_parent, &dentry->d_name);
++		if (new) {
++			spin_lock(&new->d_lock);
++			new->d_flags &= ~DCACHE_AUTOFS_PENDING;
++			spin_unlock(&new->d_lock);
++			dput(new);
++		}
++	}
++
++	return 0;
+ }
+ 
+ /* For autofs direct mounts the follow link triggers the mount */
+@@ -533,9 +555,9 @@ static struct dentry *autofs4_lookup_unhashed(struct autofs_sb_info *sbi, struct
  			goto next;
  
  		if (d_unhashed(dentry)) {
@@ -966127,6 +969230,19 @@
  			list_del_init(&ino->rehash);
  			dget(dentry);
  			/*
+diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c
+index 1fe28e4..75e5955 100644
+--- a/fs/autofs4/waitq.c
++++ b/fs/autofs4/waitq.c
+@@ -171,7 +171,7 @@ static int autofs4_getpath(struct autofs_sb_info *sbi,
+ 	for (tmp = dentry ; tmp != root ; tmp = tmp->d_parent)
+ 		len += tmp->d_name.len + 1;
+ 
+-	if (--len > NAME_MAX) {
++	if (!len || --len > NAME_MAX) {
+ 		spin_unlock(&dcache_lock);
+ 		return 0;
+ 	}
 diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
 index 82123ff..e8717de 100644
 --- a/fs/befs/linuxvfs.c
@@ -980667,7 +983783,7 @@
  
  static int fuse_setattr(struct dentry *entry, struct iattr *attr)
 diff --git a/fs/fuse/file.c b/fs/fuse/file.c
-index 676b0bc..9ced35b 100644
+index 676b0bc..f28cf8b 100644
 --- a/fs/fuse/file.c
 +++ b/fs/fuse/file.c
 @@ -210,6 +210,49 @@ u64 fuse_lock_owner_id(struct fuse_conn *fc, fl_owner_t id)
@@ -981169,6 +984285,15 @@
  static void fuse_release_user_pages(struct fuse_req *req, int write)
  {
  	unsigned i;
+@@ -613,7 +934,7 @@ static int fuse_get_user_pages(struct fuse_req *req, const char __user *buf,
+ 
+ 	nbytes = min(nbytes, (unsigned) FUSE_MAX_PAGES_PER_REQ << PAGE_SHIFT);
+ 	npages = (nbytes + offset + PAGE_SIZE - 1) >> PAGE_SHIFT;
+-	npages = min(max(npages, 1), FUSE_MAX_PAGES_PER_REQ);
++	npages = clamp(npages, 1, FUSE_MAX_PAGES_PER_REQ);
+ 	down_read(&current->mm->mmap_sem);
+ 	npages = get_user_pages(current, current->mm, user_addr, npages, write,
+ 				0, req->pages, NULL);
 @@ -645,14 +966,15 @@ static ssize_t fuse_direct_io(struct file *file, const char __user *buf,
  
  	while (count) {
@@ -988268,10 +991393,75 @@
  been unlinked. Because reading from the flash may sleep, the
  erase_completion_lock cannot be held, so an alternative, more
 diff --git a/fs/jffs2/build.c b/fs/jffs2/build.c
-index 722a6b6..d58f845 100644
+index 722a6b6..c5e1450 100644
 --- a/fs/jffs2/build.c
 +++ b/fs/jffs2/build.c
-@@ -345,6 +345,7 @@ int jffs2_do_mount_fs(struct jffs2_sb_info *c)
+@@ -46,7 +46,7 @@ next_inode(int *i, struct jffs2_inode_cache *ic, struct jffs2_sb_info *c)
+ 
+ 
+ static void jffs2_build_inode_pass1(struct jffs2_sb_info *c,
+-					struct jffs2_inode_cache *ic)
++				    struct jffs2_inode_cache *ic)
+ {
+ 	struct jffs2_full_dirent *fd;
+ 
+@@ -68,11 +68,17 @@ static void jffs2_build_inode_pass1(struct jffs2_sb_info *c,
+ 			continue;
+ 		}
+ 
+-		if (child_ic->nlink++ && fd->type == DT_DIR) {
+-			JFFS2_ERROR("child dir \"%s\" (ino #%u) of dir ino #%u appears to be a hard link\n",
+-				fd->name, fd->ino, ic->ino);
+-			/* TODO: What do we do about it? */
+-		}
++		if (fd->type == DT_DIR) {
++			if (child_ic->pino_nlink) {
++				JFFS2_ERROR("child dir \"%s\" (ino #%u) of dir ino #%u appears to be a hard link\n",
++					    fd->name, fd->ino, ic->ino);
++				/* TODO: What do we do about it? */
++			} else {
++				child_ic->pino_nlink = ic->ino;
++			}
++		} else
++			child_ic->pino_nlink++;
++
+ 		dbg_fsbuild("increased nlink for child \"%s\" (ino #%u)\n", fd->name, fd->ino);
+ 		/* Can't free scan_dents so far. We might need them in pass 2 */
+ 	}
+@@ -125,7 +131,7 @@ static int jffs2_build_filesystem(struct jffs2_sb_info *c)
+ 	dbg_fsbuild("pass 2 starting\n");
+ 
+ 	for_each_inode(i, c, ic) {
+-		if (ic->nlink)
++		if (ic->pino_nlink)
+ 			continue;
+ 
+ 		jffs2_build_remove_unlinked_inode(c, ic, &dead_fds);
+@@ -232,16 +238,19 @@ static void jffs2_build_remove_unlinked_inode(struct jffs2_sb_info *c,
+ 			/* Reduce nlink of the child. If it's now zero, stick it on the
+ 			   dead_fds list to be cleaned up later. Else just free the fd */
+ 
+-			child_ic->nlink--;
++			if (fd->type == DT_DIR)
++				child_ic->pino_nlink = 0;
++			else
++				child_ic->pino_nlink--;
+ 
+-			if (!child_ic->nlink) {
+-				dbg_fsbuild("inode #%u (\"%s\") has now got zero nlink, adding to dead_fds list.\n",
++			if (!child_ic->pino_nlink) {
++				dbg_fsbuild("inode #%u (\"%s\") now has no links; adding to dead_fds list.\n",
+ 					  fd->ino, fd->name);
+ 				fd->next = *dead_fds;
+ 				*dead_fds = fd;
+ 			} else {
+ 				dbg_fsbuild("inode #%u (\"%s\") has now got nlink %d. Ignoring.\n",
+-					  fd->ino, fd->name, child_ic->nlink);
++					  fd->ino, fd->name, child_ic->pino_nlink);
+ 				jffs2_free_full_dirent(fd);
+ 			}
+ 		}
+@@ -345,6 +354,7 @@ int jffs2_do_mount_fs(struct jffs2_sb_info *c)
  	INIT_LIST_HEAD(&c->dirty_list);
  	INIT_LIST_HEAD(&c->erasable_list);
  	INIT_LIST_HEAD(&c->erasing_list);
@@ -988549,7 +991739,7 @@
  /* Fragtree build debugging messages */
  #ifdef JFFS2_DBG_FRAGTREE_MESSAGES
 diff --git a/fs/jffs2/dir.c b/fs/jffs2/dir.c
-index f948f7e..c63e7a9 100644
+index f948f7e..c0c141f 100644
 --- a/fs/jffs2/dir.c
 +++ b/fs/jffs2/dir.c
 @@ -86,7 +86,7 @@ static struct dentry *jffs2_lookup(struct inode *dir_i, struct dentry *target,
@@ -988588,19 +991778,53 @@
   out:
  	filp->f_pos = offset;
  	return 0;
-@@ -275,9 +275,9 @@ static int jffs2_link (struct dentry *old_dentry, struct inode *dir_i, struct de
+@@ -208,6 +208,13 @@ static int jffs2_create(struct inode *dir_i, struct dentry *dentry, int mode,
+ 	f = JFFS2_INODE_INFO(inode);
+ 	dir_f = JFFS2_INODE_INFO(dir_i);
+ 
++	/* jffs2_do_create() will want to lock it, _after_ reserving
++	   space and taking c-alloc_sem. If we keep it locked here,
++	   lockdep gets unhappy (although it's a false positive;
++	   nothing else will be looking at this inode yet so there's
++	   no chance of AB-BA deadlock involving its f->sem). */
++	mutex_unlock(&f->sem);
++
+ 	ret = jffs2_do_create(c, dir_f, f, ri,
+ 			      dentry->d_name.name, dentry->d_name.len);
+ 	if (ret)
+@@ -219,7 +226,8 @@ static int jffs2_create(struct inode *dir_i, struct dentry *dentry, int mode,
+ 	d_instantiate(dentry, inode);
+ 
+ 	D1(printk(KERN_DEBUG "jffs2_create: Created ino #%lu with mode %o, nlink %d(%d). nrpages %ld\n",
+-		  inode->i_ino, inode->i_mode, inode->i_nlink, f->inocache->nlink, inode->i_mapping->nrpages));
++		  inode->i_ino, inode->i_mode, inode->i_nlink,
++		  f->inocache->pino_nlink, inode->i_mapping->nrpages));
+ 	return 0;
+ 
+  fail:
+@@ -243,7 +251,7 @@ static int jffs2_unlink(struct inode *dir_i, struct dentry *dentry)
+ 	ret = jffs2_do_unlink(c, dir_f, dentry->d_name.name,
+ 			      dentry->d_name.len, dead_f, now);
+ 	if (dead_f->inocache)
+-		dentry->d_inode->i_nlink = dead_f->inocache->nlink;
++		dentry->d_inode->i_nlink = dead_f->inocache->pino_nlink;
+ 	if (!ret)
+ 		dir_i->i_mtime = dir_i->i_ctime = ITIME(now);
+ 	return ret;
+@@ -275,9 +283,9 @@ static int jffs2_link (struct dentry *old_dentry, struct inode *dir_i, struct de
  	ret = jffs2_do_link(c, dir_f, f->inocache->ino, type, dentry->d_name.name, dentry->d_name.len, now);
  
  	if (!ret) {
 -		down(&f->sem);
-+		mutex_lock(&f->sem);
- 		old_dentry->d_inode->i_nlink = ++f->inocache->nlink;
+-		old_dentry->d_inode->i_nlink = ++f->inocache->nlink;
 -		up(&f->sem);
++		mutex_lock(&f->sem);
++		old_dentry->d_inode->i_nlink = ++f->inocache->pino_nlink;
 +		mutex_unlock(&f->sem);
  		d_instantiate(dentry, old_dentry->d_inode);
  		dir_i->i_mtime = dir_i->i_ctime = ITIME(now);
  		atomic_inc(&old_dentry->d_inode->i_count);
-@@ -351,7 +351,7 @@ static int jffs2_symlink (struct inode *dir_i, struct dentry *dentry, const char
+@@ -351,7 +359,7 @@ static int jffs2_symlink (struct inode *dir_i, struct dentry *dentry, const char
  
  	if (IS_ERR(fn)) {
  		/* Eeek. Wave bye bye */
@@ -988609,7 +991833,7 @@
  		jffs2_complete_reservation(c);
  		jffs2_clear_inode(inode);
  		return PTR_ERR(fn);
-@@ -361,7 +361,7 @@ static int jffs2_symlink (struct inode *dir_i, struct dentry *dentry, const char
+@@ -361,7 +369,7 @@ static int jffs2_symlink (struct inode *dir_i, struct dentry *dentry, const char
  	f->target = kmalloc(targetlen + 1, GFP_KERNEL);
  	if (!f->target) {
  		printk(KERN_WARNING "Can't allocate %d bytes of memory\n", targetlen + 1);
@@ -988618,7 +991842,7 @@
  		jffs2_complete_reservation(c);
  		jffs2_clear_inode(inode);
  		return -ENOMEM;
-@@ -374,7 +374,7 @@ static int jffs2_symlink (struct inode *dir_i, struct dentry *dentry, const char
+@@ -374,7 +382,7 @@ static int jffs2_symlink (struct inode *dir_i, struct dentry *dentry, const char
  	   obsoleted by the first data write
  	*/
  	f->metadata = fn;
@@ -988627,7 +991851,7 @@
  
  	jffs2_complete_reservation(c);
  
-@@ -406,7 +406,7 @@ static int jffs2_symlink (struct inode *dir_i, struct dentry *dentry, const char
+@@ -406,7 +414,7 @@ static int jffs2_symlink (struct inode *dir_i, struct dentry *dentry, const char
  	}
  
  	dir_f = JFFS2_INODE_INFO(dir_i);
@@ -988636,7 +991860,7 @@
  
  	rd->magic = cpu_to_je16(JFFS2_MAGIC_BITMASK);
  	rd->nodetype = cpu_to_je16(JFFS2_NODETYPE_DIRENT);
-@@ -429,7 +429,7 @@ static int jffs2_symlink (struct inode *dir_i, struct dentry *dentry, const char
+@@ -429,7 +437,7 @@ static int jffs2_symlink (struct inode *dir_i, struct dentry *dentry, const char
  		   as if it were the final unlink() */
  		jffs2_complete_reservation(c);
  		jffs2_free_raw_dirent(rd);
@@ -988645,7 +991869,7 @@
  		jffs2_clear_inode(inode);
  		return PTR_ERR(fd);
  	}
-@@ -442,7 +442,7 @@ static int jffs2_symlink (struct inode *dir_i, struct dentry *dentry, const char
+@@ -442,7 +450,7 @@ static int jffs2_symlink (struct inode *dir_i, struct dentry *dentry, const char
  	   one if necessary. */
  	jffs2_add_fd_to_list(c, fd, &dir_f->dents);
  
@@ -988654,7 +991878,24 @@
  	jffs2_complete_reservation(c);
  
  	d_instantiate(dentry, inode);
-@@ -507,7 +507,7 @@ static int jffs2_mkdir (struct inode *dir_i, struct dentry *dentry, int mode)
+@@ -493,11 +501,14 @@ static int jffs2_mkdir (struct inode *dir_i, struct dentry *dentry, int mode)
+ 
+ 	inode->i_op = &jffs2_dir_inode_operations;
+ 	inode->i_fop = &jffs2_dir_operations;
+-	/* Directories get nlink 2 at start */
+-	inode->i_nlink = 2;
+ 
+ 	f = JFFS2_INODE_INFO(inode);
+ 
++	/* Directories get nlink 2 at start */
++	inode->i_nlink = 2;
++	/* but ic->pino_nlink is the parent ino# */
++	f->inocache->pino_nlink = dir_i->i_ino;
++
+ 	ri->data_crc = cpu_to_je32(0);
+ 	ri->node_crc = cpu_to_je32(crc32(0, ri, sizeof(*ri)-8));
+ 
+@@ -507,7 +518,7 @@ static int jffs2_mkdir (struct inode *dir_i, struct dentry *dentry, int mode)
  
  	if (IS_ERR(fn)) {
  		/* Eeek. Wave bye bye */
@@ -988663,7 +991904,7 @@
  		jffs2_complete_reservation(c);
  		jffs2_clear_inode(inode);
  		return PTR_ERR(fn);
-@@ -516,7 +516,7 @@ static int jffs2_mkdir (struct inode *dir_i, struct dentry *dentry, int mode)
+@@ -516,7 +527,7 @@ static int jffs2_mkdir (struct inode *dir_i, struct dentry *dentry, int mode)
  	   obsoleted by the first data write
  	*/
  	f->metadata = fn;
@@ -988672,7 +991913,7 @@
  
  	jffs2_complete_reservation(c);
  
-@@ -548,7 +548,7 @@ static int jffs2_mkdir (struct inode *dir_i, struct dentry *dentry, int mode)
+@@ -548,7 +559,7 @@ static int jffs2_mkdir (struct inode *dir_i, struct dentry *dentry, int mode)
  	}
  
  	dir_f = JFFS2_INODE_INFO(dir_i);
@@ -988681,7 +991922,7 @@
  
  	rd->magic = cpu_to_je16(JFFS2_MAGIC_BITMASK);
  	rd->nodetype = cpu_to_je16(JFFS2_NODETYPE_DIRENT);
-@@ -571,7 +571,7 @@ static int jffs2_mkdir (struct inode *dir_i, struct dentry *dentry, int mode)
+@@ -571,7 +582,7 @@ static int jffs2_mkdir (struct inode *dir_i, struct dentry *dentry, int mode)
  		   as if it were the final unlink() */
  		jffs2_complete_reservation(c);
  		jffs2_free_raw_dirent(rd);
@@ -988690,7 +991931,7 @@
  		jffs2_clear_inode(inode);
  		return PTR_ERR(fd);
  	}
-@@ -585,7 +585,7 @@ static int jffs2_mkdir (struct inode *dir_i, struct dentry *dentry, int mode)
+@@ -585,7 +596,7 @@ static int jffs2_mkdir (struct inode *dir_i, struct dentry *dentry, int mode)
  	   one if necessary. */
  	jffs2_add_fd_to_list(c, fd, &dir_f->dents);
  
@@ -988699,7 +991940,35 @@
  	jffs2_complete_reservation(c);
  
  	d_instantiate(dentry, inode);
-@@ -673,7 +673,7 @@ static int jffs2_mknod (struct inode *dir_i, struct dentry *dentry, int mode, de
+@@ -594,17 +605,25 @@ static int jffs2_mkdir (struct inode *dir_i, struct dentry *dentry, int mode)
+ 
+ static int jffs2_rmdir (struct inode *dir_i, struct dentry *dentry)
+ {
++	struct jffs2_sb_info *c = JFFS2_SB_INFO(dir_i->i_sb);
++	struct jffs2_inode_info *dir_f = JFFS2_INODE_INFO(dir_i);
+ 	struct jffs2_inode_info *f = JFFS2_INODE_INFO(dentry->d_inode);
+ 	struct jffs2_full_dirent *fd;
+ 	int ret;
++	uint32_t now = get_seconds();
+ 
+ 	for (fd = f->dents ; fd; fd = fd->next) {
+ 		if (fd->ino)
+ 			return -ENOTEMPTY;
+ 	}
+-	ret = jffs2_unlink(dir_i, dentry);
+-	if (!ret)
++
++	ret = jffs2_do_unlink(c, dir_f, dentry->d_name.name,
++			      dentry->d_name.len, f, now);
++	if (!ret) {
++		dir_i->i_mtime = dir_i->i_ctime = ITIME(now);
++		clear_nlink(dentry->d_inode);
+ 		drop_nlink(dir_i);
++	}
+ 	return ret;
+ }
+ 
+@@ -673,7 +692,7 @@ static int jffs2_mknod (struct inode *dir_i, struct dentry *dentry, int mode, de
  
  	if (IS_ERR(fn)) {
  		/* Eeek. Wave bye bye */
@@ -988708,7 +991977,7 @@
  		jffs2_complete_reservation(c);
  		jffs2_clear_inode(inode);
  		return PTR_ERR(fn);
-@@ -682,7 +682,7 @@ static int jffs2_mknod (struct inode *dir_i, struct dentry *dentry, int mode, de
+@@ -682,7 +701,7 @@ static int jffs2_mknod (struct inode *dir_i, struct dentry *dentry, int mode, de
  	   obsoleted by the first data write
  	*/
  	f->metadata = fn;
@@ -988717,7 +991986,7 @@
  
  	jffs2_complete_reservation(c);
  
-@@ -714,7 +714,7 @@ static int jffs2_mknod (struct inode *dir_i, struct dentry *dentry, int mode, de
+@@ -714,7 +733,7 @@ static int jffs2_mknod (struct inode *dir_i, struct dentry *dentry, int mode, de
  	}
  
  	dir_f = JFFS2_INODE_INFO(dir_i);
@@ -988726,7 +991995,7 @@
  
  	rd->magic = cpu_to_je16(JFFS2_MAGIC_BITMASK);
  	rd->nodetype = cpu_to_je16(JFFS2_NODETYPE_DIRENT);
-@@ -740,7 +740,7 @@ static int jffs2_mknod (struct inode *dir_i, struct dentry *dentry, int mode, de
+@@ -740,7 +759,7 @@ static int jffs2_mknod (struct inode *dir_i, struct dentry *dentry, int mode, de
  		   as if it were the final unlink() */
  		jffs2_complete_reservation(c);
  		jffs2_free_raw_dirent(rd);
@@ -988735,7 +992004,7 @@
  		jffs2_clear_inode(inode);
  		return PTR_ERR(fd);
  	}
-@@ -753,7 +753,7 @@ static int jffs2_mknod (struct inode *dir_i, struct dentry *dentry, int mode, de
+@@ -753,7 +772,7 @@ static int jffs2_mknod (struct inode *dir_i, struct dentry *dentry, int mode, de
  	   one if necessary. */
  	jffs2_add_fd_to_list(c, fd, &dir_f->dents);
  
@@ -988744,7 +992013,7 @@
  	jffs2_complete_reservation(c);
  
  	d_instantiate(dentry, inode);
-@@ -780,14 +780,14 @@ static int jffs2_rename (struct inode *old_dir_i, struct dentry *old_dentry,
+@@ -780,14 +799,14 @@ static int jffs2_rename (struct inode *old_dir_i, struct dentry *old_dentry,
  		if (S_ISDIR(new_dentry->d_inode->i_mode)) {
  			struct jffs2_full_dirent *fd;
  
@@ -988762,34 +992031,40 @@
  		}
  	}
  
-@@ -816,9 +816,9 @@ static int jffs2_rename (struct inode *old_dir_i, struct dentry *old_dentry,
+@@ -816,9 +835,12 @@ static int jffs2_rename (struct inode *old_dir_i, struct dentry *old_dentry,
  		/* Don't oops if the victim was a dirent pointing to an
  		   inode which didn't exist. */
  		if (victim_f->inocache) {
 -			down(&victim_f->sem);
-+			mutex_lock(&victim_f->sem);
- 			victim_f->inocache->nlink--;
+-			victim_f->inocache->nlink--;
 -			up(&victim_f->sem);
++			mutex_lock(&victim_f->sem);
++			if (S_ISDIR(new_dentry->d_inode->i_mode))
++				victim_f->inocache->pino_nlink = 0;
++			else
++				victim_f->inocache->pino_nlink--;
 +			mutex_unlock(&victim_f->sem);
  		}
  	}
  
-@@ -836,11 +836,11 @@ static int jffs2_rename (struct inode *old_dir_i, struct dentry *old_dentry,
+@@ -836,11 +858,11 @@ static int jffs2_rename (struct inode *old_dir_i, struct dentry *old_dentry,
  	if (ret) {
  		/* Oh shit. We really ought to make a single node which can do both atomically */
  		struct jffs2_inode_info *f = JFFS2_INODE_INFO(old_dentry->d_inode);
 -		down(&f->sem);
 +		mutex_lock(&f->sem);
  		inc_nlink(old_dentry->d_inode);
- 		if (f->inocache)
- 			f->inocache->nlink++;
+-		if (f->inocache)
+-			f->inocache->nlink++;
 -		up(&f->sem);
++		if (f->inocache && !S_ISDIR(old_dentry->d_inode->i_mode))
++			f->inocache->pino_nlink++;
 +		mutex_unlock(&f->sem);
  
  		printk(KERN_NOTICE "jffs2_rename(): Link succeeded, unlink failed (err %d). You now have a hard link\n", ret);
  		/* Might as well let the VFS know */
 diff --git a/fs/jffs2/erase.c b/fs/jffs2/erase.c
-index a1db918..25a640e 100644
+index a1db918..dddb2a6 100644
 --- a/fs/jffs2/erase.c
 +++ b/fs/jffs2/erase.c
 @@ -50,14 +50,14 @@ static void jffs2_erase_block(struct jffs2_sb_info *c,
@@ -988916,11 +992191,41 @@
  	wake_up(&c->erase_wait);
  }
  
-@@ -350,9 +350,11 @@ static int jffs2_block_check_erase(struct jffs2_sb_info *c, struct jffs2_erasebl
+@@ -294,7 +294,7 @@ static inline void jffs2_remove_node_refs_from_ino_list(struct jffs2_sb_info *c,
+ 			break;
+ #endif
+ 		default:
+-			if (ic->nodes == (void *)ic && ic->nlink == 0)
++			if (ic->nodes == (void *)ic && ic->pino_nlink == 0)
+ 				jffs2_del_ino_cache(c, ic);
+ 	}
+ }
+@@ -332,7 +332,8 @@ static int jffs2_block_check_erase(struct jffs2_sb_info *c, struct jffs2_erasebl
+ 	if (c->mtd->point) {
+ 		unsigned long *wordebuf;
+ 
+-		ret = c->mtd->point(c->mtd, jeb->offset, c->sector_size, &retlen, (unsigned char **)&ebuf);
++		ret = c->mtd->point(c->mtd, jeb->offset, c->sector_size,
++				    &retlen, &ebuf, NULL);
+ 		if (ret) {
+ 			D1(printk(KERN_DEBUG "MTD point failed %d\n", ret));
+ 			goto do_flash_read;
+@@ -340,7 +341,7 @@ static int jffs2_block_check_erase(struct jffs2_sb_info *c, struct jffs2_erasebl
+ 		if (retlen < c->sector_size) {
+ 			/* Don't muck about if it won't let us point to the whole erase sector */
+ 			D1(printk(KERN_DEBUG "MTD point returned len too short: 0x%zx\n", retlen));
+-			c->mtd->unpoint(c->mtd, ebuf, jeb->offset, retlen);
++			c->mtd->unpoint(c->mtd, jeb->offset, retlen);
+ 			goto do_flash_read;
+ 		}
+ 		wordebuf = ebuf-sizeof(*wordebuf);
+@@ -349,10 +350,12 @@ static int jffs2_block_check_erase(struct jffs2_sb_info *c, struct jffs2_erasebl
+ 		   if (*++wordebuf != ~0)
  			   break;
  		} while(--retlen);
- 		c->mtd->unpoint(c->mtd, ebuf, jeb->offset, c->sector_size);
+-		c->mtd->unpoint(c->mtd, ebuf, jeb->offset, c->sector_size);
 -		if (retlen)
++		c->mtd->unpoint(c->mtd, jeb->offset, c->sector_size);
 +		if (retlen) {
  			printk(KERN_WARNING "Newly-erased block contained word 0x%lx at offset 0x%08tx\n",
  			       *wordebuf, jeb->offset + c->sector_size-retlen*sizeof(*wordebuf));
@@ -988929,7 +992234,7 @@
  		return 0;
  	}
   do_flash_read:
-@@ -373,10 +375,12 @@ static int jffs2_block_check_erase(struct jffs2_sb_info *c, struct jffs2_erasebl
+@@ -373,10 +376,12 @@ static int jffs2_block_check_erase(struct jffs2_sb_info *c, struct jffs2_erasebl
  		ret = c->mtd->read(c->mtd, ofs, readlen, &retlen, ebuf);
  		if (ret) {
  			printk(KERN_WARNING "Read of newly-erased block at 0x%08x failed: %d. Putting on bad_list\n", ofs, ret);
@@ -988942,7 +992247,7 @@
  			goto fail;
  		}
  		for (i=0; i<readlen; i += sizeof(unsigned long)) {
-@@ -385,6 +389,7 @@ static int jffs2_block_check_erase(struct jffs2_sb_info *c, struct jffs2_erasebl
+@@ -385,6 +390,7 @@ static int jffs2_block_check_erase(struct jffs2_sb_info *c, struct jffs2_erasebl
  			if (*datum + 1) {
  				*bad_offset += i;
  				printk(KERN_WARNING "Newly-erased block contained word 0x%lx at offset 0x%08x\n", *datum, *bad_offset);
@@ -988950,7 +992255,7 @@
  				goto fail;
  			}
  		}
-@@ -419,9 +424,6 @@ static void jffs2_mark_erased_block(struct jffs2_sb_info *c, struct jffs2_eraseb
+@@ -419,9 +425,6 @@ static void jffs2_mark_erased_block(struct jffs2_sb_info *c, struct jffs2_eraseb
  			if (jffs2_write_nand_cleanmarker(c, jeb))
  				goto filebad;
  		}
@@ -988960,7 +992265,7 @@
  	} else {
  
  		struct kvec vecs[1];
-@@ -449,48 +451,50 @@ static void jffs2_mark_erased_block(struct jffs2_sb_info *c, struct jffs2_eraseb
+@@ -449,48 +452,50 @@ static void jffs2_mark_erased_block(struct jffs2_sb_info *c, struct jffs2_eraseb
  
  			goto filebad;
  		}
@@ -989091,7 +992396,7 @@
  			goto out_page;
  	}
 diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c
-index e26ea78..3eb1c84 100644
+index e26ea78..086c438 100644
 --- a/fs/jffs2/fs.c
 +++ b/fs/jffs2/fs.c
 @@ -36,6 +36,7 @@ int jffs2_do_setattr (struct inode *inode, struct iattr *iattr)
@@ -989209,7 +992514,31 @@
  		iget_failed(inode);
  		return ERR_PTR(ret);
  	}
-@@ -330,7 +338,7 @@ struct inode *jffs2_iget(struct super_block *sb, unsigned long ino)
+@@ -265,7 +273,7 @@ struct inode *jffs2_iget(struct super_block *sb, unsigned long ino)
+ 	inode->i_mtime = ITIME(je32_to_cpu(latest_node.mtime));
+ 	inode->i_ctime = ITIME(je32_to_cpu(latest_node.ctime));
+ 
+-	inode->i_nlink = f->inocache->nlink;
++	inode->i_nlink = f->inocache->pino_nlink;
+ 
+ 	inode->i_blocks = (inode->i_size + 511) >> 9;
+ 
+@@ -278,13 +286,12 @@ struct inode *jffs2_iget(struct super_block *sb, unsigned long ino)
+ 	case S_IFDIR:
+ 	{
+ 		struct jffs2_full_dirent *fd;
++		inode->i_nlink = 2; /* parent and '.' */
+ 
+ 		for (fd=f->dents; fd; fd = fd->next) {
+ 			if (fd->type == DT_DIR && fd->ino)
+ 				inc_nlink(inode);
+ 		}
+-		/* and '..' */
+-		inc_nlink(inode);
+ 		/* Root dir gets i_nlink 3 for some reason */
+ 		if (inode->i_ino == 1)
+ 			inc_nlink(inode);
+@@ -330,7 +337,7 @@ struct inode *jffs2_iget(struct super_block *sb, unsigned long ino)
  		printk(KERN_WARNING "jffs2_read_inode(): Bogus imode %o for ino %lu\n", inode->i_mode, (unsigned long)inode->i_ino);
  	}
  
@@ -989218,7 +992547,7 @@
  
  	D1(printk(KERN_DEBUG "jffs2_read_inode() returning\n"));
  	unlock_new_inode(inode);
-@@ -339,7 +347,7 @@ struct inode *jffs2_iget(struct super_block *sb, unsigned long ino)
+@@ -339,7 +346,7 @@ struct inode *jffs2_iget(struct super_block *sb, unsigned long ino)
  error_io:
  	ret = -EIO;
  error:
@@ -989227,7 +992556,7 @@
  	jffs2_do_clear_inode(c, f);
  	iget_failed(inode);
  	return ERR_PTR(ret);
-@@ -380,9 +388,9 @@ int jffs2_remount_fs (struct super_block *sb, int *flags, char *data)
+@@ -380,9 +387,9 @@ int jffs2_remount_fs (struct super_block *sb, int *flags, char *data)
  	   Flush the writebuffer, if neccecary, else we loose it */
  	if (!(sb->s_flags & MS_RDONLY)) {
  		jffs2_stop_garbage_collect_thread(c);
@@ -989239,7 +992568,7 @@
  	}
  
  	if (!(*flags & MS_RDONLY))
-@@ -429,7 +437,7 @@ struct inode *jffs2_new_inode (struct inode *dir_i, int mode, struct jffs2_raw_i
+@@ -429,7 +436,7 @@ struct inode *jffs2_new_inode (struct inode *dir_i, int mode, struct jffs2_raw_i
  
  	f = JFFS2_INODE_INFO(inode);
  	jffs2_init_inode_info(f);
@@ -989248,8 +992577,34 @@
  
  	memset(ri, 0, sizeof(*ri));
  	/* Set OS-specific defaults for new inodes */
+@@ -578,11 +585,12 @@ void jffs2_gc_release_inode(struct jffs2_sb_info *c,
+ }
+ 
+ struct jffs2_inode_info *jffs2_gc_fetch_inode(struct jffs2_sb_info *c,
+-						     int inum, int nlink)
++					      int inum, int unlinked)
+ {
+ 	struct inode *inode;
+ 	struct jffs2_inode_cache *ic;
+-	if (!nlink) {
++
++	if (unlinked) {
+ 		/* The inode has zero nlink but its nodes weren't yet marked
+ 		   obsolete. This has to be because we're still waiting for
+ 		   the final (close() and) iput() to happen.
+@@ -630,8 +638,8 @@ struct jffs2_inode_info *jffs2_gc_fetch_inode(struct jffs2_sb_info *c,
+ 			return ERR_CAST(inode);
+ 	}
+ 	if (is_bad_inode(inode)) {
+-		printk(KERN_NOTICE "Eep. read_inode() failed for ino #%u. nlink %d\n",
+-		       inum, nlink);
++		printk(KERN_NOTICE "Eep. read_inode() failed for ino #%u. unlinked %d\n",
++		       inum, unlinked);
+ 		/* NB. This will happen again. We need to do something appropriate here. */
+ 		iput(inode);
+ 		return ERR_PTR(-EIO);
 diff --git a/fs/jffs2/gc.c b/fs/jffs2/gc.c
-index 32ff037..bad0056 100644
+index 32ff037..090c556 100644
 --- a/fs/jffs2/gc.c
 +++ b/fs/jffs2/gc.c
 @@ -126,7 +126,7 @@ int jffs2_garbage_collect_pass(struct jffs2_sb_info *c)
@@ -989270,6 +992625,17 @@
  			return -ENOSPC;
  		}
  
+@@ -161,8 +161,8 @@ int jffs2_garbage_collect_pass(struct jffs2_sb_info *c)
+ 			continue;
+ 		}
+ 
+-		if (!ic->nlink) {
+-			D1(printk(KERN_DEBUG "Skipping check of ino #%d with nlink zero\n",
++		if (!ic->pino_nlink) {
++			D1(printk(KERN_DEBUG "Skipping check of ino #%d with nlink/pino zero\n",
+ 				  ic->ino));
+ 			spin_unlock(&c->inocache_lock);
+ 			jffs2_xattr_delete_inode(c, ic);
 @@ -190,7 +190,7 @@ int jffs2_garbage_collect_pass(struct jffs2_sb_info *c)
  			 made no progress in this case, but that should be OK */
  			c->checked_ino--;
@@ -989351,6 +992717,19 @@
  		D1(printk(KERN_DEBUG "jffs2_garbage_collect_pass() waiting for ino #%u in state %d\n",
  			  ic->ino, ic->state));
  		sleep_on_spinunlock(&c->inocache_wq, &c->inocache_lock);
+@@ -392,10 +398,10 @@ int jffs2_garbage_collect_pass(struct jffs2_sb_info *c)
+ 	   it's vaguely possible. */
+ 
+ 	inum = ic->ino;
+-	nlink = ic->nlink;
++	nlink = ic->pino_nlink;
+ 	spin_unlock(&c->inocache_lock);
+ 
+-	f = jffs2_gc_fetch_inode(c, inum, nlink);
++	f = jffs2_gc_fetch_inode(c, inum, !nlink);
+ 	if (IS_ERR(f)) {
+ 		ret = PTR_ERR(f);
+ 		goto release_sem;
 @@ -416,7 +422,7 @@ int jffs2_garbage_collect_pass(struct jffs2_sb_info *c)
  		ret = -ENOSPC;
  	}
@@ -989488,7 +992867,7 @@
  	uint32_t wbuf_pagesize; /* 0 for NOR and other flashes with no wbuf */
  
 diff --git a/fs/jffs2/nodelist.h b/fs/jffs2/nodelist.h
-index ec1aae9..8219df6 100644
+index ec1aae9..1750445 100644
 --- a/fs/jffs2/nodelist.h
 +++ b/fs/jffs2/nodelist.h
 @@ -87,7 +87,7 @@ struct jffs2_raw_node_ref
@@ -989500,8 +992879,20 @@
  #ifdef TEST_TOTLEN
  	uint32_t __totlen; /* This may die; use ref_totlen(c, jeb, ) below */
  #endif
+@@ -177,7 +177,10 @@ struct jffs2_inode_cache {
+ #ifdef CONFIG_JFFS2_FS_XATTR
+ 	struct jffs2_xattr_ref *xref;
+ #endif
+-	int nlink;
++	uint32_t pino_nlink;	/* Directories store parent inode
++				   here; other inodes store nlink.
++				   Zero always means that it's
++				   completely unlinked. */
+ };
+ 
+ /* Inode states for 'state' above. We need the 'GC' state to prevent
 diff --git a/fs/jffs2/nodemgmt.c b/fs/jffs2/nodemgmt.c
-index a0313fa..9df8f3e 100644
+index a0313fa..a9bf960 100644
 --- a/fs/jffs2/nodemgmt.c
 +++ b/fs/jffs2/nodemgmt.c
 @@ -48,7 +48,7 @@ int jffs2_reserve_space(struct jffs2_sb_info *c, uint32_t minsize,
@@ -989592,6 +992983,15 @@
  	}
  
  	spin_lock(&c->erase_completion_lock);
+@@ -707,7 +709,7 @@ void jffs2_mark_node_obsolete(struct jffs2_sb_info *c, struct jffs2_raw_node_ref
+ 				break;
+ #endif
+ 			default:
+-				if (ic->nodes == (void *)ic && ic->nlink == 0)
++				if (ic->nodes == (void *)ic && ic->pino_nlink == 0)
+ 					jffs2_del_ino_cache(c, ic);
+ 				break;
+ 		}
 @@ -715,7 +717,7 @@ void jffs2_mark_node_obsolete(struct jffs2_sb_info *c, struct jffs2_raw_node_ref
  	}
  
@@ -989601,11 +993001,56 @@
  }
  
  int jffs2_thread_should_wake(struct jffs2_sb_info *c)
+diff --git a/fs/jffs2/os-linux.h b/fs/jffs2/os-linux.h
+index 1b10d25..2cc866c 100644
+--- a/fs/jffs2/os-linux.h
++++ b/fs/jffs2/os-linux.h
+@@ -187,7 +187,7 @@ int jffs2_do_fill_super(struct super_block *sb, void *data, int silent);
+ void jffs2_gc_release_inode(struct jffs2_sb_info *c,
+ 			    struct jffs2_inode_info *f);
+ struct jffs2_inode_info *jffs2_gc_fetch_inode(struct jffs2_sb_info *c,
+-					      int inum, int nlink);
++					      int inum, int unlinked);
+ 
+ unsigned char *jffs2_gc_fetch_page(struct jffs2_sb_info *c,
+ 				   struct jffs2_inode_info *f,
 diff --git a/fs/jffs2/readinode.c b/fs/jffs2/readinode.c
-index e512a93..4cb4d76 100644
+index e512a93..6ca08ad 100644
 --- a/fs/jffs2/readinode.c
 +++ b/fs/jffs2/readinode.c
-@@ -825,8 +825,9 @@ static inline int read_dnode(struct jffs2_sb_info *c, struct jffs2_raw_node_ref
+@@ -63,10 +63,11 @@ static int check_node_data(struct jffs2_sb_info *c, struct jffs2_tmp_dnode_info
+ 	/* TODO: instead, incapsulate point() stuff to jffs2_flash_read(),
+ 	 * adding and jffs2_flash_read_end() interface. */
+ 	if (c->mtd->point) {
+-		err = c->mtd->point(c->mtd, ofs, len, &retlen, &buffer);
++		err = c->mtd->point(c->mtd, ofs, len, &retlen,
++				    (void **)&buffer, NULL);
+ 		if (!err && retlen < len) {
+ 			JFFS2_WARNING("MTD point returned len too short: %zu instead of %u.\n", retlen, tn->csize);
+-			c->mtd->unpoint(c->mtd, buffer, ofs, retlen);
++			c->mtd->unpoint(c->mtd, ofs, retlen);
+ 		} else if (err)
+ 			JFFS2_WARNING("MTD point failed: error code %d.\n", err);
+ 		else
+@@ -100,7 +101,7 @@ static int check_node_data(struct jffs2_sb_info *c, struct jffs2_tmp_dnode_info
+ 		kfree(buffer);
+ #ifndef __ECOS
+ 	else
+-		c->mtd->unpoint(c->mtd, buffer, ofs, len);
++		c->mtd->unpoint(c->mtd, ofs, len);
+ #endif
+ 
+ 	if (crc != tn->data_crc) {
+@@ -136,7 +137,7 @@ free_out:
+ 		kfree(buffer);
+ #ifndef __ECOS
+ 	else
+-		c->mtd->unpoint(c->mtd, buffer, ofs, len);
++		c->mtd->unpoint(c->mtd, ofs, len);
+ #endif
+ 	return err;
+ }
+@@ -825,8 +826,9 @@ static inline int read_dnode(struct jffs2_sb_info *c, struct jffs2_raw_node_ref
  	else // normal case...
  		tn->fn->size = je32_to_cpu(rd->dsize);
  
@@ -989617,7 +993062,7 @@
  
  	ret = jffs2_add_tn_to_tree(c, rii, tn);
  
-@@ -836,13 +837,13 @@ static inline int read_dnode(struct jffs2_sb_info *c, struct jffs2_raw_node_ref
+@@ -836,13 +838,13 @@ static inline int read_dnode(struct jffs2_sb_info *c, struct jffs2_raw_node_ref
  		jffs2_free_tmp_dnode_info(tn);
  		return ret;
  	}
@@ -989636,7 +993081,17 @@
  		tn = tn_next(tn);
  	}
  #endif
-@@ -1193,7 +1194,7 @@ static int jffs2_do_read_inode_internal(struct jffs2_sb_info *c,
+@@ -1122,7 +1124,8 @@ static int jffs2_do_read_inode_internal(struct jffs2_sb_info *c,
+ 	size_t retlen;
+ 	int ret;
+ 
+-	dbg_readinode("ino #%u nlink is %d\n", f->inocache->ino, f->inocache->nlink);
++	dbg_readinode("ino #%u pino/nlink is %d\n", f->inocache->ino,
++		      f->inocache->pino_nlink);
+ 
+ 	memset(&rii, 0, sizeof(rii));
+ 
+@@ -1193,7 +1196,7 @@ static int jffs2_do_read_inode_internal(struct jffs2_sb_info *c,
  		JFFS2_ERROR("failed to read from flash: error %d, %zd of %zd bytes read\n",
  			ret, retlen, sizeof(*latest_node));
  		/* FIXME: If this fails, there seems to be a memory leak. Find it. */
@@ -989645,7 +993100,7 @@
  		jffs2_do_clear_inode(c, f);
  		return ret?ret:-EIO;
  	}
-@@ -1202,7 +1203,7 @@ static int jffs2_do_read_inode_internal(struct jffs2_sb_info *c,
+@@ -1202,7 +1205,7 @@ static int jffs2_do_read_inode_internal(struct jffs2_sb_info *c,
  	if (crc != je32_to_cpu(latest_node->node_crc)) {
  		JFFS2_ERROR("CRC failed for read_inode of inode %u at physical location 0x%x\n",
  			f->inocache->ino, ref_offset(rii.latest_ref));
@@ -989654,7 +993109,7 @@
  		jffs2_do_clear_inode(c, f);
  		return -EIO;
  	}
-@@ -1242,7 +1243,7 @@ static int jffs2_do_read_inode_internal(struct jffs2_sb_info *c,
+@@ -1242,7 +1245,7 @@ static int jffs2_do_read_inode_internal(struct jffs2_sb_info *c,
  			f->target = kmalloc(je32_to_cpu(latest_node->csize) + 1, GFP_KERNEL);
  			if (!f->target) {
  				JFFS2_ERROR("can't allocate %d bytes of memory for the symlink target path cache\n", je32_to_cpu(latest_node->csize));
@@ -989663,7 +993118,7 @@
  				jffs2_do_clear_inode(c, f);
  				return -ENOMEM;
  			}
-@@ -1255,7 +1256,7 @@ static int jffs2_do_read_inode_internal(struct jffs2_sb_info *c,
+@@ -1255,7 +1258,7 @@ static int jffs2_do_read_inode_internal(struct jffs2_sb_info *c,
  					ret = -EIO;
  				kfree(f->target);
  				f->target = NULL;
@@ -989672,7 +993127,7 @@
  				jffs2_do_clear_inode(c, f);
  				return -ret;
  			}
-@@ -1273,14 +1274,14 @@ static int jffs2_do_read_inode_internal(struct jffs2_sb_info *c,
+@@ -1273,14 +1276,14 @@ static int jffs2_do_read_inode_internal(struct jffs2_sb_info *c,
  		if (f->metadata) {
  			JFFS2_ERROR("Argh. Special inode #%u with mode 0%o had metadata node\n",
  			       f->inocache->ino, jemode_to_cpu(latest_node->mode));
@@ -989689,7 +993144,7 @@
  			jffs2_do_clear_inode(c, f);
  			return -EIO;
  		}
-@@ -1289,7 +1290,7 @@ static int jffs2_do_read_inode_internal(struct jffs2_sb_info *c,
+@@ -1289,7 +1292,7 @@ static int jffs2_do_read_inode_internal(struct jffs2_sb_info *c,
  			JFFS2_ERROR("Argh. Special inode #%u with mode 0x%x had more than one node\n",
  			       f->inocache->ino, jemode_to_cpu(latest_node->mode));
  			/* FIXME: Deal with it - check crc32, check for duplicate node, check times and discard the older one */
@@ -989698,7 +993153,16 @@
  			jffs2_do_clear_inode(c, f);
  			return -EIO;
  		}
-@@ -1379,12 +1380,13 @@ int jffs2_do_crccheck_inode(struct jffs2_sb_info *c, struct jffs2_inode_cache *i
+@@ -1357,7 +1360,7 @@ int jffs2_do_read_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f,
+ 		}
+ 		dbg_readinode("creating inocache for root inode\n");
+ 		memset(f->inocache, 0, sizeof(struct jffs2_inode_cache));
+-		f->inocache->ino = f->inocache->nlink = 1;
++		f->inocache->ino = f->inocache->pino_nlink = 1;
+ 		f->inocache->nodes = (struct jffs2_raw_node_ref *)f->inocache;
+ 		f->inocache->state = INO_STATE_READING;
+ 		jffs2_add_ino_cache(c, f->inocache);
+@@ -1379,12 +1382,13 @@ int jffs2_do_crccheck_inode(struct jffs2_sb_info *c, struct jffs2_inode_cache *i
  	if (!f)
  		return -ENOMEM;
  
@@ -989714,36 +993178,96 @@
  		jffs2_do_clear_inode(c, f);
  	}
  	kfree (f);
-@@ -1398,7 +1400,7 @@ void jffs2_do_clear_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f)
+@@ -1398,8 +1402,8 @@ void jffs2_do_clear_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f)
  
  	jffs2_clear_acl(f);
  	jffs2_xattr_delete_inode(c, f->inocache);
 -	down(&f->sem);
+-	deleted = f->inocache && !f->inocache->nlink;
 +	mutex_lock(&f->sem);
- 	deleted = f->inocache && !f->inocache->nlink;
++	deleted = f->inocache && !f->inocache->pino_nlink;
  
  	if (f->inocache && f->inocache->state != INO_STATE_CHECKING)
-@@ -1430,5 +1432,5 @@ void jffs2_do_clear_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f)
+ 		jffs2_set_inocache_state(c, f->inocache, INO_STATE_CLEARING);
+@@ -1430,5 +1434,5 @@ void jffs2_do_clear_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f)
  			jffs2_del_ino_cache(c, f->inocache);
  	}
  
 -	up(&f->sem);
 +	mutex_unlock(&f->sem);
  }
+diff --git a/fs/jffs2/scan.c b/fs/jffs2/scan.c
+index 272872d..1d437de 100644
+--- a/fs/jffs2/scan.c
++++ b/fs/jffs2/scan.c
+@@ -97,11 +97,12 @@ int jffs2_scan_medium(struct jffs2_sb_info *c)
+ 	size_t pointlen;
+ 
+ 	if (c->mtd->point) {
+-		ret = c->mtd->point (c->mtd, 0, c->mtd->size, &pointlen, &flashbuf);
++		ret = c->mtd->point(c->mtd, 0, c->mtd->size, &pointlen,
++				    (void **)&flashbuf, NULL);
+ 		if (!ret && pointlen < c->mtd->size) {
+ 			/* Don't muck about if it won't let us point to the whole flash */
+ 			D1(printk(KERN_DEBUG "MTD point returned len too short: 0x%zx\n", pointlen));
+-			c->mtd->unpoint(c->mtd, flashbuf, 0, pointlen);
++			c->mtd->unpoint(c->mtd, 0, pointlen);
+ 			flashbuf = NULL;
+ 		}
+ 		if (ret)
+@@ -267,7 +268,7 @@ int jffs2_scan_medium(struct jffs2_sb_info *c)
+ 		kfree(flashbuf);
+ #ifndef __ECOS
+ 	else
+-		c->mtd->unpoint(c->mtd, flashbuf, 0, c->mtd->size);
++		c->mtd->unpoint(c->mtd, 0, c->mtd->size);
+ #endif
+ 	if (s)
+ 		kfree(s);
+@@ -940,7 +941,7 @@ struct jffs2_inode_cache *jffs2_scan_make_ino_cache(struct jffs2_sb_info *c, uin
+ 	ic->nodes = (void *)ic;
+ 	jffs2_add_ino_cache(c, ic);
+ 	if (ino == 1)
+-		ic->nlink = 1;
++		ic->pino_nlink = 1;
+ 	return ic;
+ }
+ 
 diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c
-index 4677355..f3353df 100644
+index 4677355..7da69ea 100644
 --- a/fs/jffs2/super.c
 +++ b/fs/jffs2/super.c
-@@ -47,7 +47,7 @@ static void jffs2_i_init_once(struct kmem_cache *cachep, void *foo)
+@@ -31,11 +31,12 @@ static struct kmem_cache *jffs2_inode_cachep;
+ 
+ static struct inode *jffs2_alloc_inode(struct super_block *sb)
+ {
+-	struct jffs2_inode_info *ei;
+-	ei = (struct jffs2_inode_info *)kmem_cache_alloc(jffs2_inode_cachep, GFP_KERNEL);
+-	if (!ei)
++	struct jffs2_inode_info *f;
++
++	f = kmem_cache_alloc(jffs2_inode_cachep, GFP_KERNEL);
++	if (!f)
+ 		return NULL;
+-	return &ei->vfs_inode;
++	return &f->vfs_inode;
+ }
+ 
+ static void jffs2_destroy_inode(struct inode *inode)
+@@ -45,19 +46,19 @@ static void jffs2_destroy_inode(struct inode *inode)
+ 
+ static void jffs2_i_init_once(struct kmem_cache *cachep, void *foo)
  {
- 	struct jffs2_inode_info *ei = (struct jffs2_inode_info *) foo;
+-	struct jffs2_inode_info *ei = (struct jffs2_inode_info *) foo;
++	struct jffs2_inode_info *f = foo;
  
 -	init_MUTEX(&ei->sem);
-+	mutex_init(&ei->sem);
- 	inode_init_once(&ei->vfs_inode);
+-	inode_init_once(&ei->vfs_inode);
++	mutex_init(&f->sem);
++	inode_init_once(&f->vfs_inode);
  }
  
-@@ -55,9 +55,9 @@ static int jffs2_sync_fs(struct super_block *sb, int wait)
+ static int jffs2_sync_fs(struct super_block *sb, int wait)
  {
  	struct jffs2_sb_info *c = JFFS2_SB_INFO(sb);
  
@@ -989755,7 +993279,7 @@
  	return 0;
  }
  
-@@ -95,8 +95,8 @@ static int jffs2_fill_super(struct super_block *sb, void *data, int silent)
+@@ -95,8 +96,8 @@ static int jffs2_fill_super(struct super_block *sb, void *data, int silent)
  
  	/* Initialize JFFS2 superblock locks, the further initialization will
  	 * be done later */
@@ -989766,7 +993290,7 @@
  	init_waitqueue_head(&c->erase_wait);
  	init_waitqueue_head(&c->inocache_wq);
  	spin_lock_init(&c->erase_completion_lock);
-@@ -125,9 +125,9 @@ static void jffs2_put_super (struct super_block *sb)
+@@ -125,9 +126,9 @@ static void jffs2_put_super (struct super_block *sb)
  
  	D2(printk(KERN_DEBUG "jffs2: jffs2_put_super()\n"));
  
@@ -989779,9 +993303,18 @@
  	jffs2_sum_exit(c);
  
 diff --git a/fs/jffs2/wbuf.c b/fs/jffs2/wbuf.c
-index d1d4f27..8de52b6 100644
+index d1d4f27..0e78b00 100644
 --- a/fs/jffs2/wbuf.c
 +++ b/fs/jffs2/wbuf.c
+@@ -494,7 +494,7 @@ static void jffs2_wbuf_recover(struct jffs2_sb_info *c)
+ 				/* If it's an in-core inode, then we have to adjust any
+ 				   full_dirent or full_dnode structure to point to the
+ 				   new version instead of the old */
+-				f = jffs2_gc_fetch_inode(c, ic->ino, ic->nlink);
++				f = jffs2_gc_fetch_inode(c, ic->ino, !ic->pino_nlink);
+ 				if (IS_ERR(f)) {
+ 					/* Should never happen; it _must_ be present */
+ 					JFFS2_ERROR("Failed to iget() ino #%u, err %ld\n",
 @@ -578,8 +578,8 @@ static int __jffs2_flush_wbuf(struct jffs2_sb_info *c, int pad)
  	if (!jffs2_is_writebuffered(c))
  		return 0;
@@ -989864,10 +993397,29 @@
  }
  
 diff --git a/fs/jffs2/write.c b/fs/jffs2/write.c
-index 776f13c..665fce9 100644
+index 776f13c..ca29440 100644
 --- a/fs/jffs2/write.c
 +++ b/fs/jffs2/write.c
-@@ -137,12 +137,12 @@ struct jffs2_full_dnode *jffs2_write_dnode(struct jffs2_sb_info *c, struct jffs2
+@@ -19,7 +19,8 @@
+ #include "compr.h"
+ 
+ 
+-int jffs2_do_new_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f, uint32_t mode, struct jffs2_raw_inode *ri)
++int jffs2_do_new_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f,
++		       uint32_t mode, struct jffs2_raw_inode *ri)
+ {
+ 	struct jffs2_inode_cache *ic;
+ 
+@@ -31,7 +32,7 @@ int jffs2_do_new_inode(struct jffs2_sb_info *c, struct jffs2_inode_info *f, uint
+ 	memset(ic, 0, sizeof(*ic));
+ 
+ 	f->inocache = ic;
+-	f->inocache->nlink = 1;
++	f->inocache->pino_nlink = 1; /* Will be overwritten shortly for directories */
+ 	f->inocache->nodes = (struct jffs2_raw_node_ref *)f->inocache;
+ 	f->inocache->state = INO_STATE_PRESENT;
+ 
+@@ -137,12 +138,12 @@ struct jffs2_full_dnode *jffs2_write_dnode(struct jffs2_sb_info *c, struct jffs2
  							     JFFS2_SUMMARY_INODE_SIZE);
  			} else {
  				/* Locking pain */
@@ -989882,7 +993434,7 @@
  			}
  
  			if (!ret) {
-@@ -285,12 +285,12 @@ struct jffs2_full_dirent *jffs2_write_dirent(struct jffs2_sb_info *c, struct jff
+@@ -285,12 +286,12 @@ struct jffs2_full_dirent *jffs2_write_dirent(struct jffs2_sb_info *c, struct jff
  							     JFFS2_SUMMARY_DIRENT_SIZE(namelen));
  			} else {
  				/* Locking pain */
@@ -989897,7 +993449,7 @@
  			}
  
  			if (!ret) {
-@@ -353,7 +353,7 @@ int jffs2_write_inode_range(struct jffs2_sb_info *c, struct jffs2_inode_info *f,
+@@ -353,7 +354,7 @@ int jffs2_write_inode_range(struct jffs2_sb_info *c, struct jffs2_inode_info *f,
  			D1(printk(KERN_DEBUG "jffs2_reserve_space returned %d\n", ret));
  			break;
  		}
@@ -989906,7 +993458,7 @@
  		datalen = min_t(uint32_t, writelen, PAGE_CACHE_SIZE - (offset & (PAGE_CACHE_SIZE-1)));
  		cdatalen = min_t(uint32_t, alloclen - sizeof(*ri), datalen);
  
-@@ -381,7 +381,7 @@ int jffs2_write_inode_range(struct jffs2_sb_info *c, struct jffs2_inode_info *f,
+@@ -381,7 +382,7 @@ int jffs2_write_inode_range(struct jffs2_sb_info *c, struct jffs2_inode_info *f,
  
  		if (IS_ERR(fn)) {
  			ret = PTR_ERR(fn);
@@ -989915,7 +993467,7 @@
  			jffs2_complete_reservation(c);
  			if (!retried) {
  				/* Write error to be retried */
-@@ -403,11 +403,11 @@ int jffs2_write_inode_range(struct jffs2_sb_info *c, struct jffs2_inode_info *f,
+@@ -403,11 +404,11 @@ int jffs2_write_inode_range(struct jffs2_sb_info *c, struct jffs2_inode_info *f,
  			jffs2_mark_node_obsolete(c, fn->raw);
  			jffs2_free_full_dnode(fn);
  
@@ -989929,16 +993481,21 @@
  		jffs2_complete_reservation(c);
  		if (!datalen) {
  			printk(KERN_WARNING "Eep. We didn't actually write any data in jffs2_write_inode_range()\n");
-@@ -439,7 +439,7 @@ int jffs2_do_create(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, str
+@@ -438,10 +439,10 @@ int jffs2_do_create(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, str
+ 	ret = jffs2_reserve_space(c, sizeof(*ri), &alloclen, ALLOC_NORMAL,
  				JFFS2_SUMMARY_INODE_SIZE);
  	D1(printk(KERN_DEBUG "jffs2_do_create(): reserved 0x%x bytes\n", alloclen));
- 	if (ret) {
+-	if (ret) {
 -		up(&f->sem);
-+		mutex_unlock(&f->sem);
++	if (ret)
  		return ret;
- 	}
+-	}
++
++	mutex_lock(&f->sem);
  
-@@ -454,7 +454,7 @@ int jffs2_do_create(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, str
+ 	ri->data_crc = cpu_to_je32(0);
+ 	ri->node_crc = cpu_to_je32(crc32(0, ri, sizeof(*ri)-8));
+@@ -454,7 +455,7 @@ int jffs2_do_create(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, str
  	if (IS_ERR(fn)) {
  		D1(printk(KERN_DEBUG "jffs2_write_dnode() failed\n"));
  		/* Eeek. Wave bye bye */
@@ -989947,7 +993504,7 @@
  		jffs2_complete_reservation(c);
  		return PTR_ERR(fn);
  	}
-@@ -463,7 +463,7 @@ int jffs2_do_create(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, str
+@@ -463,7 +464,7 @@ int jffs2_do_create(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, str
  	*/
  	f->metadata = fn;
  
@@ -989956,7 +993513,7 @@
  	jffs2_complete_reservation(c);
  
  	ret = jffs2_init_security(&f->vfs_inode, &dir_f->vfs_inode);
-@@ -489,7 +489,7 @@ int jffs2_do_create(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, str
+@@ -489,7 +490,7 @@ int jffs2_do_create(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, str
  		return -ENOMEM;
  	}
  
@@ -989965,7 +993522,7 @@
  
  	rd->magic = cpu_to_je16(JFFS2_MAGIC_BITMASK);
  	rd->nodetype = cpu_to_je16(JFFS2_NODETYPE_DIRENT);
-@@ -513,7 +513,7 @@ int jffs2_do_create(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, str
+@@ -513,7 +514,7 @@ int jffs2_do_create(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, str
  		/* dirent failed to write. Delete the inode normally
  		   as if it were the final unlink() */
  		jffs2_complete_reservation(c);
@@ -989974,7 +993531,7 @@
  		return PTR_ERR(fd);
  	}
  
-@@ -522,7 +522,7 @@ int jffs2_do_create(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, str
+@@ -522,7 +523,7 @@ int jffs2_do_create(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, str
  	jffs2_add_fd_to_list(c, fd, &dir_f->dents);
  
  	jffs2_complete_reservation(c);
@@ -989983,7 +993540,7 @@
  
  	return 0;
  }
-@@ -551,7 +551,7 @@ int jffs2_do_unlink(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f,
+@@ -551,7 +552,7 @@ int jffs2_do_unlink(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f,
  			return ret;
  		}
  
@@ -989992,7 +993549,7 @@
  
  		/* Build a deletion node */
  		rd->magic = cpu_to_je16(JFFS2_MAGIC_BITMASK);
-@@ -574,21 +574,21 @@ int jffs2_do_unlink(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f,
+@@ -574,21 +575,21 @@ int jffs2_do_unlink(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f,
  
  		if (IS_ERR(fd)) {
  			jffs2_complete_reservation(c);
@@ -990019,7 +993576,7 @@
  
  		for (fd = dir_f->dents; fd; fd = fd->next) {
  			if (fd->nhash == nhash &&
-@@ -607,7 +607,7 @@ int jffs2_do_unlink(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f,
+@@ -607,7 +608,7 @@ int jffs2_do_unlink(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f,
  				break;
  			}
  		}
@@ -990028,7 +993585,7 @@
  	}
  
  	/* dead_f is NULL if this was a rename not a real unlink */
-@@ -615,7 +615,7 @@ int jffs2_do_unlink(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f,
+@@ -615,7 +616,7 @@ int jffs2_do_unlink(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f,
  	   pointing to an inode which didn't exist. */
  	if (dead_f && dead_f->inocache) {
  
@@ -990037,16 +993594,23 @@
  
  		if (S_ISDIR(OFNI_EDONI_2SFFJ(dead_f)->i_mode)) {
  			while (dead_f->dents) {
-@@ -639,7 +639,7 @@ int jffs2_do_unlink(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f,
- 
- 		dead_f->inocache->nlink--;
+@@ -635,11 +636,11 @@ int jffs2_do_unlink(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f,
+ 					jffs2_mark_node_obsolete(c, fd->raw);
+ 				jffs2_free_full_dirent(fd);
+ 			}
+-		}
+-
+-		dead_f->inocache->nlink--;
++			dead_f->inocache->pino_nlink = 0;
++		} else
++			dead_f->inocache->pino_nlink--;
  		/* NB: Caller must set inode nlink if appropriate */
 -		up(&dead_f->sem);
 +		mutex_unlock(&dead_f->sem);
  	}
  
  	jffs2_complete_reservation(c);
-@@ -666,7 +666,7 @@ int jffs2_do_link (struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, uint
+@@ -666,7 +667,7 @@ int jffs2_do_link (struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, uint
  		return ret;
  	}
  
@@ -990055,7 +993619,7 @@
  
  	/* Build a deletion node */
  	rd->magic = cpu_to_je16(JFFS2_MAGIC_BITMASK);
-@@ -691,7 +691,7 @@ int jffs2_do_link (struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, uint
+@@ -691,7 +692,7 @@ int jffs2_do_link (struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, uint
  
  	if (IS_ERR(fd)) {
  		jffs2_complete_reservation(c);
@@ -990064,7 +993628,7 @@
  		return PTR_ERR(fd);
  	}
  
-@@ -699,7 +699,7 @@ int jffs2_do_link (struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, uint
+@@ -699,7 +700,7 @@ int jffs2_do_link (struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, uint
  	jffs2_add_fd_to_list(c, fd, &dir_f->dents);
  
  	jffs2_complete_reservation(c);
@@ -990074,7 +993638,7 @@
  	return 0;
  }
 diff --git a/fs/jffs2/xattr.c b/fs/jffs2/xattr.c
-index e486659..574cb75 100644
+index e486659..082e844 100644
 --- a/fs/jffs2/xattr.c
 +++ b/fs/jffs2/xattr.c
 @@ -82,7 +82,7 @@ static int is_xattr_datum_unchecked(struct jffs2_sb_info *c, struct jffs2_xattr_
@@ -990086,6 +993650,24 @@
  	if (xd->xname) {
  		c->xdatum_mem_usage -= (xd->name_len + 1 + xd->value_len);
  		kfree(xd->xname);
+@@ -592,7 +592,7 @@ void jffs2_xattr_delete_inode(struct jffs2_sb_info *c, struct jffs2_inode_cache
+ 	   When an inode with XATTR is removed, those XATTRs must be removed. */
+ 	struct jffs2_xattr_ref *ref, *_ref;
+ 
+-	if (!ic || ic->nlink > 0)
++	if (!ic || ic->pino_nlink > 0)
+ 		return;
+ 
+ 	down_write(&c->xattr_sem);
+@@ -829,7 +829,7 @@ void jffs2_build_xattr_subsystem(struct jffs2_sb_info *c)
+ 			   ref->xd and ref->ic are not valid yet. */
+ 			xd = jffs2_find_xattr_datum(c, ref->xid);
+ 			ic = jffs2_get_ino_cache(c, ref->ino);
+-			if (!xd || !ic || !ic->nlink) {
++			if (!xd || !ic || !ic->pino_nlink) {
+ 				dbg_xattr("xref(ino=%u, xid=%u, xseqno=%u) is orphan.\n",
+ 					  ref->ino, ref->xid, ref->xseqno);
+ 				ref->xseqno |= XREF_DELETE_MARKER;
 @@ -1252,7 +1252,7 @@ int jffs2_garbage_collect_xattr_ref(struct jffs2_sb_info *c, struct jffs2_xattr_
  	rc = jffs2_reserve_space_gc(c, totlen, &length, JFFS2_SUMMARY_XREF_SIZE);
  	if (rc) {
@@ -1014415,7 +1017997,7 @@
  	}
  #else
 diff --git a/fs/utimes.c b/fs/utimes.c
-index b18da9c..a2bef77 100644
+index b18da9c..af059d5 100644
 --- a/fs/utimes.c
 +++ b/fs/utimes.c
 @@ -2,6 +2,7 @@
@@ -1014426,7 +1018008,23 @@
  #include <linux/namei.h>
  #include <linux/sched.h>
  #include <linux/stat.h>
-@@ -59,6 +60,7 @@ long do_utimes(int dfd, char __user *filename, struct timespec *times, int flags
+@@ -39,9 +40,14 @@ asmlinkage long sys_utime(char __user *filename, struct utimbuf __user *times)
+ 
+ #endif
+ 
++static bool nsec_special(long nsec)
++{
++	return nsec == UTIME_OMIT || nsec == UTIME_NOW;
++}
++
+ static bool nsec_valid(long nsec)
+ {
+-	if (nsec == UTIME_OMIT || nsec == UTIME_NOW)
++	if (nsec_special(nsec))
+ 		return true;
+ 
+ 	return nsec >= 0 && nsec <= 999999999;
+@@ -59,6 +65,7 @@ long do_utimes(int dfd, char __user *filename, struct timespec *times, int flags
  	struct inode *inode;
  	struct iattr newattrs;
  	struct file *f = NULL;
@@ -1014434,7 +1018032,7 @@
  
  	error = -EINVAL;
  	if (times && (!nsec_valid(times[0].tv_nsec) ||
-@@ -79,18 +81,20 @@ long do_utimes(int dfd, char __user *filename, struct timespec *times, int flags
+@@ -79,18 +86,20 @@ long do_utimes(int dfd, char __user *filename, struct timespec *times, int flags
  		if (!f)
  			goto out;
  		dentry = f->f_path.dentry;
@@ -1014457,7 +1018055,7 @@
  		goto dput_and_out;
  
  	/* Don't worry, the checks are done in inode_change_ok() */
-@@ -98,7 +102,7 @@ long do_utimes(int dfd, char __user *filename, struct timespec *times, int flags
+@@ -98,7 +107,7 @@ long do_utimes(int dfd, char __user *filename, struct timespec *times, int flags
  	if (times) {
  		error = -EPERM;
                  if (IS_APPEND(inode) || IS_IMMUTABLE(inode))
@@ -1014466,8 +1018064,20 @@
  
  		if (times[0].tv_nsec == UTIME_OMIT)
  			newattrs.ia_valid &= ~ATTR_ATIME;
-@@ -118,22 +122,24 @@ long do_utimes(int dfd, char __user *filename, struct timespec *times, int flags
- 	} else {
+@@ -115,25 +124,35 @@ long do_utimes(int dfd, char __user *filename, struct timespec *times, int flags
+ 			newattrs.ia_mtime.tv_nsec = times[1].tv_nsec;
+ 			newattrs.ia_valid |= ATTR_MTIME_SET;
+ 		}
+-	} else {
++	}
++
++	/*
++	 * If times is NULL or both times are either UTIME_OMIT or
++	 * UTIME_NOW, then need to check permissions, because
++	 * inode_change_ok() won't do it.
++	 */
++	if (!times || (nsec_special(times[0].tv_nsec) &&
++		       nsec_special(times[1].tv_nsec))) {
  		error = -EACCES;
                  if (IS_IMMUTABLE(inode))
 -                        goto dput_and_out;
@@ -1035310,6 +1038920,17 @@
  	 * Set up any processor specifics
  	 */
  	void (*_proc_init)(void);
+diff --git a/include/asm-arm/div64.h b/include/asm-arm/div64.h
+index 0b5f881..5001390 100644
+--- a/include/asm-arm/div64.h
++++ b/include/asm-arm/div64.h
+@@ -224,6 +224,4 @@
+ 
+ #endif
+ 
+-extern uint64_t div64_64(uint64_t dividend, uint64_t divisor);
+-
+ #endif
 diff --git a/include/asm-arm/glue.h b/include/asm-arm/glue.h
 index 22274ce..a97a182 100644
 --- a/include/asm-arm/glue.h
@@ -1041459,17 +1045080,12 @@
 -
  #endif /* _ASM_TOPOLOGY_H */
 diff --git a/include/asm-frv/unaligned.h b/include/asm-frv/unaligned.h
-index dc8e9c9..64ccc73 100644
+index dc8e9c9..839a2fb 100644
 --- a/include/asm-frv/unaligned.h
 +++ b/include/asm-frv/unaligned.h
-@@ -9,194 +9,14 @@
-  * 2 of the License, or (at your option) any later version.
-  */
- 
--#ifndef _ASM_UNALIGNED_H
--#define _ASM_UNALIGNED_H
-+#ifndef _ASM_FRV_UNALIGNED_H
-+#define _ASM_FRV_UNALIGNED_H
+@@ -12,191 +12,11 @@
+ #ifndef _ASM_UNALIGNED_H
+ #define _ASM_UNALIGNED_H
  
 +#include <linux/unaligned/le_byteshift.h>
 +#include <linux/unaligned/be_byteshift.h>
@@ -1041664,7 +1045280,7 @@
 +#define put_unaligned	__put_unaligned_be
  
 -#endif
-+#endif /* _ASM_FRV_UNALIGNED_H */
++#endif /* _ASM_UNALIGNED_H */
 diff --git a/include/asm-generic/bitops.h b/include/asm-generic/bitops.h
 index 15e6f25..c9f369c 100644
 --- a/include/asm-generic/bitops.h
@@ -1041791,6 +1045407,31 @@
 +#endif
  
  #endif /* _ASM_GENERIC_BITOPS_FLS64_H_ */
+diff --git a/include/asm-generic/div64.h b/include/asm-generic/div64.h
+index a4a4937..8f4e319 100644
+--- a/include/asm-generic/div64.h
++++ b/include/asm-generic/div64.h
+@@ -30,11 +30,6 @@
+ 	__rem;							\
+  })
+ 
+-static inline uint64_t div64_64(uint64_t dividend, uint64_t divisor)
+-{
+-	return dividend / divisor;
+-}
+-
+ #elif BITS_PER_LONG == 32
+ 
+ extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor);
+@@ -54,8 +49,6 @@ extern uint32_t __div64_32(uint64_t *dividend, uint32_t divisor);
+ 	__rem;						\
+  })
+ 
+-extern uint64_t div64_64(uint64_t dividend, uint64_t divisor);
+-
+ #else /* BITS_PER_LONG == ?? */
+ 
+ # error do_div() does not yet support the C64
 diff --git a/include/asm-generic/futex.h b/include/asm-generic/futex.h
 index f422df0..3c2344f 100644
 --- a/include/asm-generic/futex.h
@@ -1042700,6 +1046341,20 @@
  #define dma_sync_single_for_cpu	platform_dma_sync_single_for_cpu
  #define dma_sync_sg_for_cpu	platform_dma_sync_sg_for_cpu
  #define dma_sync_single_for_device platform_dma_sync_single_for_device
+diff --git a/include/asm-ia64/dmi.h b/include/asm-ia64/dmi.h
+index f3efaa2..00eb1b1 100644
+--- a/include/asm-ia64/dmi.h
++++ b/include/asm-ia64/dmi.h
+@@ -3,4 +3,9 @@
+ 
+ #include <asm/io.h>
+ 
++/* Use normal IO mappings for DMI */
++#define dmi_ioremap ioremap
++#define dmi_iounmap(x,l) iounmap(x)
++#define dmi_alloc(l) kmalloc(l, GFP_ATOMIC)
++
+ #endif
 diff --git a/include/asm-ia64/elf.h b/include/asm-ia64/elf.h
 index f8e83ec..5e0c1a6 100644
 --- a/include/asm-ia64/elf.h
@@ -1042914,6 +1046569,22 @@
  #include <asm-generic/ide_iops.h>
  
  #endif /* __KERNEL__ */
+diff --git a/include/asm-ia64/io.h b/include/asm-ia64/io.h
+index 4ebed77..260a85a 100644
+--- a/include/asm-ia64/io.h
++++ b/include/asm-ia64/io.h
+@@ -423,11 +423,6 @@ extern void __iomem * ioremap(unsigned long offset, unsigned long size);
+ extern void __iomem * ioremap_nocache (unsigned long offset, unsigned long size);
+ extern void iounmap (volatile void __iomem *addr);
+ 
+-/* Use normal IO mappings for DMI */
+-#define dmi_ioremap ioremap
+-#define dmi_iounmap(x,l) iounmap(x)
+-#define dmi_alloc(l) kmalloc(l, GFP_ATOMIC)
+-
+ /*
+  * String version of IO memory access ops:
+  */
 diff --git a/include/asm-ia64/kprobes.h b/include/asm-ia64/kprobes.h
 index d03bf9f..ef71b57 100644
 --- a/include/asm-ia64/kprobes.h
@@ -1046680,6 +1050351,16 @@
 +#endif
  
  #endif /* _ASM_M32R_UNALIGNED_H */
+diff --git a/include/asm-m68k/div64.h b/include/asm-m68k/div64.h
+index 33caad1..8243c93 100644
+--- a/include/asm-m68k/div64.h
++++ b/include/asm-m68k/div64.h
+@@ -25,5 +25,4 @@
+ 	__rem;							\
+ })
+ 
+-extern uint64_t div64_64(uint64_t dividend, uint64_t divisor);
+ #endif /* _M68K_DIV64_H */
 diff --git a/include/asm-m68k/motorola_pgtable.h b/include/asm-m68k/motorola_pgtable.h
 index 13135d4..8e9a8a7 100644
 --- a/include/asm-m68k/motorola_pgtable.h
@@ -1047065,6 +1050746,43 @@
 -
 -#endif
 +#endif /* _ASM_M68K_UNALIGNED_H */
+diff --git a/include/asm-m68knommu/dma.h b/include/asm-m68knommu/dma.h
+index 3f20419..939a020 100644
+--- a/include/asm-m68knommu/dma.h
++++ b/include/asm-m68knommu/dma.h
+@@ -35,7 +35,8 @@
+ /*
+  * Set number of channels of DMA on ColdFire for different implementations.
+  */
+-#if defined(CONFIG_M5249) || defined(CONFIG_M5307) || defined(CONFIG_M5407)
++#if defined(CONFIG_M5249) || defined(CONFIG_M5307) || defined(CONFIG_M5407) || \
++	defined(CONFIG_M523x) || defined(CONFIG_M527x) || defined(CONFIG_M528x)
+ #define MAX_M68K_DMA_CHANNELS 4
+ #elif defined(CONFIG_M5272)
+ #define MAX_M68K_DMA_CHANNELS 1
+diff --git a/include/asm-m68knommu/param.h b/include/asm-m68knommu/param.h
+index 96c4510..6044397 100644
+--- a/include/asm-m68knommu/param.h
++++ b/include/asm-m68knommu/param.h
+@@ -1,13 +1,16 @@
+ #ifndef _M68KNOMMU_PARAM_H
+ #define _M68KNOMMU_PARAM_H
+ 
+-#define HZ CONFIG_HZ
+-
+ #ifdef __KERNEL__
++#define HZ CONFIG_HZ
+ #define	USER_HZ		HZ
+ #define	CLOCKS_PER_SEC	(USER_HZ)
+ #endif
+ 
++#ifndef HZ
++#define HZ	100
++#endif
++
+ #define EXEC_PAGESIZE	4096
+ 
+ #ifndef NOGROUP
 diff --git a/include/asm-m68knommu/semaphore-helper.h b/include/asm-m68knommu/semaphore-helper.h
 deleted file mode 100644
 index 43da7bc..0000000
@@ -1047437,6 +1051155,30 @@
 +extern void dec_ioasic_clocksource_init(void);
 +
  #endif /* __ASM_DEC_IOASIC_H */
+diff --git a/include/asm-mips/div64.h b/include/asm-mips/div64.h
+index 716371b..d1d6991 100644
+--- a/include/asm-mips/div64.h
++++ b/include/asm-mips/div64.h
+@@ -82,7 +82,6 @@
+ 	(n) = __quot; \
+ 	__mod; })
+ 
+-extern uint64_t div64_64(uint64_t dividend, uint64_t divisor);
+ #endif /* (_MIPS_SZLONG == 32) */
+ 
+ #if (_MIPS_SZLONG == 64)
+@@ -106,11 +105,6 @@ extern uint64_t div64_64(uint64_t dividend, uint64_t divisor);
+ 	(n) = __quot; \
+ 	__mod; })
+ 
+-static inline uint64_t div64_64(uint64_t dividend, uint64_t divisor)
+-{
+-	return dividend / divisor;
+-}
+-
+ #endif /* (_MIPS_SZLONG == 64) */
+ 
+ #endif /* _ASM_DIV64_H */
 diff --git a/include/asm-mips/ds1287.h b/include/asm-mips/ds1287.h
 new file mode 100644
 index 0000000..ba1702e
@@ -1049420,6 +1053162,18 @@
 +#endif
 +
  #endif /* __NEC_VR41XX_H */
+diff --git a/include/asm-mn10300/div64.h b/include/asm-mn10300/div64.h
+index bf9c515..3a8329b 100644
+--- a/include/asm-mn10300/div64.h
++++ b/include/asm-mn10300/div64.h
+@@ -97,7 +97,4 @@ signed __muldiv64s(signed val, signed mult, signed div)
+ 	return result;
+ }
+ 
+-extern __attribute__((const))
+-uint64_t div64_64(uint64_t dividend, uint64_t divisor);
+-
+ #endif /* _ASM_DIV64 */
 diff --git a/include/asm-mn10300/pgtable.h b/include/asm-mn10300/pgtable.h
 index 375c494..6dc30fc 100644
 --- a/include/asm-mn10300/pgtable.h
@@ -1058648,6 +1062402,16 @@
 -
 -#endif /* !(_SPARC64_USER_H) */
 +#include <asm-sparc/user.h>
+diff --git a/include/asm-um/div64.h b/include/asm-um/div64.h
+index 7b73b2c..1e17f74 100644
+--- a/include/asm-um/div64.h
++++ b/include/asm-um/div64.h
+@@ -3,5 +3,4 @@
+ 
+ #include "asm/arch/div64.h"
+ 
+-extern uint64_t div64_64(uint64_t dividend, uint64_t divisor);
+ #endif
 diff --git a/include/asm-um/pgtable.h b/include/asm-um/pgtable.h
 index 4102b44..02db81b 100644
 --- a/include/asm-um/pgtable.h
@@ -1062297,10 +1066061,10 @@
  
  #endif
 diff --git a/include/asm-x86/div64.h b/include/asm-x86/div64.h
-index e98d16e..0dbf8bf 100644
+index e98d16e..9a2d644 100644
 --- a/include/asm-x86/div64.h
 +++ b/include/asm-x86/div64.h
-@@ -17,18 +17,20 @@
+@@ -17,40 +17,41 @@
   * This ends up being the most efficient "calling
   * convention" on x86.
   */
@@ -1062332,26 +1066096,46 @@
 +	__mod;							\
  })
  
- /*
-@@ -37,14 +39,13 @@
-  *
-  * Warning, this will do an exception if X overflows.
-  */
+-/*
+- * (long)X = ((long long)divs) / (long)div
+- * (long)rem = ((long long)divs) % (long)div
+- *
+- * Warning, this will do an exception if X overflows.
+- */
 -#define div_long_long_rem(a,b,c) div_ll_X_l_rem(a,b,c)
-+#define div_long_long_rem(a, b, c) div_ll_X_l_rem(a, b, c)
- 
+-
 -static inline long
 -div_ll_X_l_rem(long long divs, long div, long *rem)
-+static inline long div_ll_X_l_rem(long long divs, long div, long *rem)
++static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder)
  {
- 	long dum2;
+-	long dum2;
 -      __asm__("divl %2":"=a"(dum2), "=d"(*rem)
 -      :	"rm"(div), "A"(divs));
-+	asm("divl %2":"=a"(dum2), "=d"(*rem)
-+	    : "rm"(div), "A"(divs));
- 
- 	return dum2;
+-
+-	return dum2;
+-
++	union {
++		u64 v64;
++		u32 v32[2];
++	} d = { dividend };
++	u32 upper;
++
++	upper = d.v32[1];
++	d.v32[1] = 0;
++	if (upper >= divisor) {
++		d.v32[1] = upper / divisor;
++		upper %= divisor;
++	}
++	asm ("divl %2" : "=a" (d.v32[0]), "=d" (*remainder) :
++		"rm" (divisor), "0" (d.v32[0]), "1" (upper));
++	return d.v64;
+ }
+-
+-extern uint64_t div64_64(uint64_t dividend, uint64_t divisor);
++#define div_u64_rem	div_u64_rem
  
+ #else
+ # include <asm-generic/div64.h>
 diff --git a/include/asm-x86/dma-mapping.h b/include/asm-x86/dma-mapping.h
 index 58f790f..a1a4dc7 100644
 --- a/include/asm-x86/dma-mapping.h
@@ -1063144,6 +1066928,18 @@
  {
  	unsigned int io_port;
  	/* using short to get 16-bit wrap around */
+diff --git a/include/asm-x86/dmi.h b/include/asm-x86/dmi.h
+index 1241e6a..4edf751 100644
+--- a/include/asm-x86/dmi.h
++++ b/include/asm-x86/dmi.h
+@@ -27,6 +27,7 @@ static inline void *dmi_alloc(unsigned len)
+ 
+ #endif
+ 
++/* Use early IO mappings for DMI because it's initialized early */
+ #define dmi_ioremap early_ioremap
+ #define dmi_iounmap early_iounmap
+ 
 diff --git a/include/asm-x86/dwarf2_64.h b/include/asm-x86/dwarf2_64.h
 index eedc085..c950519 100644
 --- a/include/asm-x86/dwarf2_64.h
@@ -1064818,7 +1068614,7 @@
 +
 +#endif /* _ASM_X86_IO_H */
 diff --git a/include/asm-x86/io_32.h b/include/asm-x86/io_32.h
-index d4d8fbd..6e73467 100644
+index d4d8fbd..049e81e 100644
 --- a/include/asm-x86/io_32.h
 +++ b/include/asm-x86/io_32.h
 @@ -49,12 +49,6 @@
@@ -1064861,7 +1068657,19 @@
  {
  	return __va(address);
  }
-@@ -169,16 +163,19 @@ extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys);
+@@ -139,11 +133,6 @@ extern void *early_ioremap(unsigned long offset, unsigned long size);
+ extern void early_iounmap(void *addr, unsigned long size);
+ extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys);
+ 
+-/* Use early IO mappings for DMI because it's initialized early */
+-#define dmi_ioremap early_ioremap
+-#define dmi_iounmap early_iounmap
+-#define dmi_alloc alloc_bootmem
+-
+ /*
+  * ISA I/O bus memory addresses are 1:1 with the physical address.
+  */
+@@ -169,16 +158,19 @@ extern void __iomem *fix_ioremap(unsigned idx, unsigned long phys);
  
  static inline unsigned char readb(const volatile void __iomem *addr)
  {
@@ -1064883,7 +1068691,7 @@
  #define readb_relaxed(addr) readb(addr)
  #define readw_relaxed(addr) readw(addr)
  #define readl_relaxed(addr) readl(addr)
-@@ -188,15 +185,17 @@ static inline unsigned int readl(const volatile void __iomem *addr)
+@@ -188,15 +180,17 @@ static inline unsigned int readl(const volatile void __iomem *addr)
  
  static inline void writeb(unsigned char b, volatile void __iomem *addr)
  {
@@ -1064904,7 +1068712,7 @@
  }
  #define __raw_writeb writeb
  #define __raw_writew writew
-@@ -239,12 +238,12 @@ memcpy_toio(volatile void __iomem *dst, const void *src, int count)
+@@ -239,12 +233,12 @@ memcpy_toio(volatile void __iomem *dst, const void *src, int count)
   *	1. Out of order aware processors
   *	2. Accidentally out of order processors (PPro errata #51)
   */
@@ -1064919,7 +1068727,7 @@
  }
  
  #else
-@@ -264,7 +263,8 @@ extern void io_delay_init(void);
+@@ -264,7 +258,8 @@ extern void io_delay_init(void);
  #include <asm/paravirt.h>
  #else
  
@@ -1064929,7 +1068737,7 @@
  	native_io_delay();
  #ifdef REALLY_SLOW_IO
  	native_io_delay();
-@@ -275,51 +275,74 @@ static inline void slow_down_io(void) {
+@@ -275,51 +270,74 @@ static inline void slow_down_io(void) {
  
  #endif
  
@@ -1079156,6 +1082964,25 @@
 +int crypto_aes_expand_key(struct crypto_aes_ctx *ctx, const u8 *in_key,
 +		unsigned int key_len);
  #endif
+diff --git a/include/crypto/scatterwalk.h b/include/crypto/scatterwalk.h
+index 224658b..833d208 100644
+--- a/include/crypto/scatterwalk.h
++++ b/include/crypto/scatterwalk.h
+@@ -57,10 +57,14 @@ static inline void scatterwalk_sg_chain(struct scatterlist *sg1, int num,
+ 					struct scatterlist *sg2)
+ {
+ 	sg_set_page(&sg1[num - 1], (void *)sg2, 0, 0);
++	sg1[num - 1].page_link &= ~0x02;
+ }
+ 
+ static inline struct scatterlist *scatterwalk_sg_next(struct scatterlist *sg)
+ {
++	if (sg_is_last(sg))
++		return NULL;
++
+ 	return (++sg)->length ? sg : (void *)sg_page(sg);
+ }
+ 
 diff --git a/include/keys/rxrpc-type.h b/include/keys/rxrpc-type.h
 index 4ea429b..7609365 100644
 --- a/include/keys/rxrpc-type.h
@@ -1080464,6 +1084291,61 @@
 +#endif
 +
  #endif /* __LINUX_CACHE_H */
+diff --git a/include/linux/calc64.h b/include/linux/calc64.h
+deleted file mode 100644
+index ebf4b8f..0000000
+--- a/include/linux/calc64.h
++++ /dev/null
+@@ -1,49 +0,0 @@
+-#ifndef _LINUX_CALC64_H
+-#define _LINUX_CALC64_H
+-
+-#include <linux/types.h>
+-#include <asm/div64.h>
+-
+-/*
+- * This is a generic macro which is used when the architecture
+- * specific div64.h does not provide a optimized one.
+- *
+- * The 64bit dividend is divided by the divisor (data type long), the
+- * result is returned and the remainder stored in the variable
+- * referenced by remainder (data type long *). In contrast to the
+- * do_div macro the dividend is kept intact.
+- */
+-#ifndef div_long_long_rem
+-#define div_long_long_rem(dividend, divisor, remainder)	\
+-	do_div_llr((dividend), divisor, remainder)
+-
+-static inline unsigned long do_div_llr(const long long dividend,
+-				       const long divisor, long *remainder)
+-{
+-	u64 result = dividend;
+-
+-	*(remainder) = do_div(result, divisor);
+-	return (unsigned long) result;
+-}
+-#endif
+-
+-/*
+- * Sign aware variation of the above. On some architectures a
+- * negative dividend leads to an divide overflow exception, which
+- * is avoided by the sign check.
+- */
+-static inline long div_long_long_rem_signed(const long long dividend,
+-					    const long divisor, long *remainder)
+-{
+-	long res;
+-
+-	if (unlikely(dividend < 0)) {
+-		res = -div_long_long_rem(-dividend, divisor, remainder);
+-		*remainder = -(*remainder);
+-	} else
+-		res = div_long_long_rem(dividend, divisor, remainder);
+-
+-	return res;
+-}
+-
+-#endif
 diff --git a/include/linux/capability.h b/include/linux/capability.h
 index 7d50ff6..f4ea0dd 100644
 --- a/include/linux/capability.h
@@ -1080701,10 +1084583,19 @@
 +
 +/* */
 diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
-index 85778a4..3509447 100644
+index 85778a4..55e434f 100644
 --- a/include/linux/clocksource.h
 +++ b/include/linux/clocksource.h
-@@ -216,6 +216,7 @@ static inline void clocksource_calculate_interval(struct clocksource *c,
+@@ -93,6 +93,8 @@ struct clocksource {
+ #endif
+ };
+ 
++extern struct clocksource *clock;	/* current clocksource */
++
+ /*
+  * Clock source flags bits::
+  */
+@@ -216,6 +218,7 @@ static inline void clocksource_calculate_interval(struct clocksource *c,
  /* used to install a new clocksource */
  extern int clocksource_register(struct clocksource*);
  extern void clocksource_unregister(struct clocksource*);
@@ -1080743,6 +1084634,23 @@
  char *coda_f2s(struct CodaFid *f);
  int coda_isroot(struct inode *i);
  int coda_iscontrol(const char *name, size_t length);
+diff --git a/include/linux/compat.h b/include/linux/compat.h
+index 8fa7857..cf8d11c 100644
+--- a/include/linux/compat.h
++++ b/include/linux/compat.h
+@@ -65,10 +65,11 @@ struct compat_timex {
+ 	compat_long_t calcnt;
+ 	compat_long_t errcnt;
+ 	compat_long_t stbcnt;
++	compat_int_t tai;
+ 
+ 	compat_int_t :32; compat_int_t :32; compat_int_t :32; compat_int_t :32;
+ 	compat_int_t :32; compat_int_t :32; compat_int_t :32; compat_int_t :32;
+-	compat_int_t :32; compat_int_t :32; compat_int_t :32; compat_int_t :32;
++	compat_int_t :32; compat_int_t :32; compat_int_t :32;
+ };
+ 
+ #define _COMPAT_NSIG_WORDS	(_COMPAT_NSIG / _COMPAT_NSIG_BPW)
 diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
 index fe23792..5c8351b 100644
 --- a/include/linux/compiler-gcc.h
@@ -1087544,9 +1091452,18 @@
  
  #define journal_oom_retry 1
 diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h
-index e0b5b68..33ef710 100644
+index e0b5b68..abb6ac6 100644
 --- a/include/linux/jiffies.h
 +++ b/include/linux/jiffies.h
+@@ -1,7 +1,7 @@
+ #ifndef _LINUX_JIFFIES_H
+ #define _LINUX_JIFFIES_H
+ 
+-#include <linux/calc64.h>
++#include <linux/math64.h>
+ #include <linux/kernel.h>
+ #include <linux/types.h>
+ #include <linux/time.h>
 @@ -36,7 +36,7 @@
  #elif HZ >= 6144 && HZ < 12288
  # define SHIFT_HZ	13
@@ -1090285,6 +1094202,96 @@
  
  /*
   * Arguments for all calls to statd
+diff --git a/include/linux/math64.h b/include/linux/math64.h
+new file mode 100644
+index 0000000..c1a5f81
+--- /dev/null
++++ b/include/linux/math64.h
+@@ -0,0 +1,84 @@
++#ifndef _LINUX_MATH64_H
++#define _LINUX_MATH64_H
++
++#include <linux/types.h>
++#include <asm/div64.h>
++
++#if BITS_PER_LONG == 64
++
++/**
++ * div_u64_rem - unsigned 64bit divide with 32bit divisor with remainder
++ *
++ * This is commonly provided by 32bit archs to provide an optimized 64bit
++ * divide.
++ */
++static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder)
++{
++	*remainder = dividend % divisor;
++	return dividend / divisor;
++}
++
++/**
++ * div_s64_rem - signed 64bit divide with 32bit divisor with remainder
++ */
++static inline s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder)
++{
++	*remainder = dividend % divisor;
++	return dividend / divisor;
++}
++
++/**
++ * div64_u64 - unsigned 64bit divide with 64bit divisor
++ */
++static inline u64 div64_u64(u64 dividend, u64 divisor)
++{
++	return dividend / divisor;
++}
++
++#elif BITS_PER_LONG == 32
++
++#ifndef div_u64_rem
++static inline u64 div_u64_rem(u64 dividend, u32 divisor, u32 *remainder)
++{
++	*remainder = do_div(dividend, divisor);
++	return dividend;
++}
++#endif
++
++#ifndef div_s64_rem
++extern s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder);
++#endif
++
++#ifndef div64_u64
++extern u64 div64_u64(u64 dividend, u64 divisor);
++#endif
++
++#endif /* BITS_PER_LONG */
++
++/**
++ * div_u64 - unsigned 64bit divide with 32bit divisor
++ *
++ * This is the most common 64bit divide and should be used if possible,
++ * as many 32bit archs can optimize this variant better than a full 64bit
++ * divide.
++ */
++#ifndef div_u64
++static inline u64 div_u64(u64 dividend, u32 divisor)
++{
++	u32 remainder;
++	return div_u64_rem(dividend, divisor, &remainder);
++}
++#endif
++
++/**
++ * div_s64 - signed 64bit divide with 32bit divisor
++ */
++#ifndef div_s64
++static inline s64 div_s64(s64 dividend, s32 divisor)
++{
++	s32 remainder;
++	return div_s64_rem(dividend, divisor, &remainder);
++}
++#endif
++
++#endif /* _LINUX_MATH64_H */
 diff --git a/include/linux/mbus.h b/include/linux/mbus.h
 new file mode 100644
 index 0000000..c11ff29
@@ -1091740,6 +1095747,43 @@
 +
 +
  #endif /* LINUX_MOD_DEVICETABLE_H */
+diff --git a/include/linux/module.h b/include/linux/module.h
+index 819c4e8..3e03b1a 100644
+--- a/include/linux/module.h
++++ b/include/linux/module.h
+@@ -190,7 +190,7 @@ void *__symbol_get_gpl(const char *symbol);
+ 	extern typeof(sym) sym;					\
+ 	__CRC_SYMBOL(sym, sec)					\
+ 	static const char __kstrtab_##sym[]			\
+-	__attribute__((section("__ksymtab_strings")))		\
++	__attribute__((section("__ksymtab_strings"), aligned(1))) \
+ 	= MODULE_SYMBOL_PREFIX #sym;                    	\
+ 	static const struct kernel_symbol __ksymtab_##sym	\
+ 	__used							\
+@@ -229,23 +229,6 @@ enum module_state
+ 	MODULE_STATE_GOING,
+ };
+ 
+-/* Similar stuff for section attributes. */
+-struct module_sect_attr
+-{
+-	struct module_attribute mattr;
+-	char *name;
+-	unsigned long address;
+-};
+-
+-struct module_sect_attrs
+-{
+-	struct attribute_group grp;
+-	int nsections;
+-	struct module_sect_attr attrs[0];
+-};
+-
+-struct module_param_attrs;
+-
+ struct module
+ {
+ 	enum module_state state;
 diff --git a/include/linux/mount.h b/include/linux/mount.h
 index 5ee2df2..4374d1a 100644
 --- a/include/linux/mount.h
@@ -1092197,6 +1096241,97 @@
  #endif /* __KERNEL__ */
  
  #endif /* __MTD_INFTL_H__ */
+diff --git a/include/linux/mtd/jedec.h b/include/linux/mtd/jedec.h
+deleted file mode 100644
+index 9006feb..0000000
+--- a/include/linux/mtd/jedec.h
++++ /dev/null
+@@ -1,66 +0,0 @@
+-
+-/* JEDEC Flash Interface.
+- * This is an older type of interface for self programming flash. It is
+- * commonly use in older AMD chips and is obsolete compared with CFI.
+- * It is called JEDEC because the JEDEC association distributes the ID codes
+- * for the chips.
+- *
+- * See the AMD flash databook for information on how to operate the interface.
+- *
+- * $Id: jedec.h,v 1.4 2005/11/07 11:14:54 gleixner Exp $
+- */
+-
+-#ifndef __LINUX_MTD_JEDEC_H__
+-#define __LINUX_MTD_JEDEC_H__
+-
+-#include <linux/types.h>
+-
+-#define MAX_JEDEC_CHIPS 16
+-
+-// Listing of all supported chips and their information
+-struct JEDECTable
+-{
+-   __u16 jedec;
+-   char *name;
+-   unsigned long size;
+-   unsigned long sectorsize;
+-   __u32 capabilities;
+-};
+-
+-// JEDEC being 0 is the end of the chip array
+-struct jedec_flash_chip
+-{
+-   __u16 jedec;
+-   unsigned long size;
+-   unsigned long sectorsize;
+-
+-   // *(__u8*)(base + (adder << addrshift)) = data << datashift
+-   // Address size = size << addrshift
+-   unsigned long base;           // Byte 0 of the flash, will be unaligned
+-   unsigned int datashift;       // Useful for 32bit/16bit accesses
+-   unsigned int addrshift;
+-   unsigned long offset;         // linerized start. base==offset for unbanked, uninterleaved flash
+-
+-   __u32 capabilities;
+-
+-   // These markers are filled in by the flash_chip_scan function
+-   unsigned long start;
+-   unsigned long length;
+-};
+-
+-struct jedec_private
+-{
+-   unsigned long size;         // Total size of all the devices
+-
+-   /* Bank handling. If sum(bank_fill) == size then this is linear flash.
+-      Otherwise the mapping has holes in it. bank_fill may be used to
+-      find the holes, but in the common symetric case
+-      bank_fill[0] == bank_fill[*], thus addresses may be computed
+-      mathmatically. bank_fill must be powers of two */
+-   unsigned is_banked;
+-   unsigned long bank_fill[MAX_JEDEC_CHIPS];
+-
+-   struct jedec_flash_chip chips[MAX_JEDEC_CHIPS];
+-};
+-
+-#endif
+diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
+index 0a13bb3..245f909 100644
+--- a/include/linux/mtd/mtd.h
++++ b/include/linux/mtd/mtd.h
+@@ -143,10 +143,12 @@ struct mtd_info {
+ 	int (*erase) (struct mtd_info *mtd, struct erase_info *instr);
+ 
+ 	/* This stuff for eXecute-In-Place */
+-	int (*point) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char **mtdbuf);
++	/* phys is optional and may be set to NULL */
++	int (*point) (struct mtd_info *mtd, loff_t from, size_t len,
++			size_t *retlen, void **virt, resource_size_t *phys);
+ 
+ 	/* We probably shouldn't allow XIP if the unpoint isn't a NULL */
+-	void (*unpoint) (struct mtd_info *mtd, u_char * addr, loff_t from, size_t len);
++	void (*unpoint) (struct mtd_info *mtd, loff_t from, size_t len);
+ 
+ 
+ 	int (*read) (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char *buf);
 diff --git a/include/linux/mtd/nftl.h b/include/linux/mtd/nftl.h
 index bcf2fb3..001eec5 100644
 --- a/include/linux/mtd/nftl.h
@@ -1092241,6 +1096376,22 @@
  	struct mtd_partition	*partitions;
  	int			 nr_partitions;
  	int			 bankwidth;
+diff --git a/include/linux/mtd/pmc551.h b/include/linux/mtd/pmc551.h
+index a7f6d20..5cc070c 100644
+--- a/include/linux/mtd/pmc551.h
++++ b/include/linux/mtd/pmc551.h
+@@ -36,8 +36,9 @@ struct mypriv {
+  * Function Prototypes
+  */
+ static int pmc551_erase(struct mtd_info *, struct erase_info *);
+-static void pmc551_unpoint(struct mtd_info *, u_char *, loff_t, size_t);
+-static int pmc551_point (struct mtd_info *mtd, loff_t from, size_t len, size_t *retlen, u_char **mtdbuf);
++static void pmc551_unpoint(struct mtd_info *, loff_t, size_t);
++static int pmc551_point(struct mtd_info *mtd, loff_t from, size_t len,
++		size_t *retlen, void **virt, resource_size_t *phys);
+ static int pmc551_read(struct mtd_info *, loff_t, size_t, size_t *, u_char *);
+ static int pmc551_write(struct mtd_info *, loff_t, size_t, size_t *, const u_char *);
+ 
 diff --git a/include/linux/mtio.h b/include/linux/mtio.h
 index 6f8d2d4..ef01d6a 100644
 --- a/include/linux/mtio.h
@@ -1094388,10 +1098539,18 @@
  #endif /* __KERNEL__ */
  #endif /* LINUX_PCI_H */
 diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
-index 70eb3c8..e5a53da 100644
+index 70eb3c8..cf6dbd7 100644
 --- a/include/linux/pci_ids.h
 +++ b/include/linux/pci_ids.h
-@@ -2413,6 +2413,8 @@
+@@ -1429,6 +1429,7 @@
+ #define PCI_DEVICE_ID_NEO_2DB9PRI       0x00C9
+ #define PCI_DEVICE_ID_NEO_2RJ45         0x00CA
+ #define PCI_DEVICE_ID_NEO_2RJ45PRI      0x00CB
++#define PCIE_DEVICE_ID_NEO_4_IBM        0x00F4
+ 
+ #define PCI_VENDOR_ID_XIRCOM		0x115d
+ #define PCI_DEVICE_ID_XIRCOM_RBM56G	0x0101
+@@ -2413,6 +2414,8 @@
  #define PCI_DEVICE_ID_INTEL_82443GX_0	0x71a0
  #define PCI_DEVICE_ID_INTEL_82443GX_2	0x71a2
  #define PCI_DEVICE_ID_INTEL_82372FB_1	0x7601
@@ -1095757,7 +1099916,7 @@
  			       struct task_struct *new_parent)
  {
 diff --git a/include/linux/quota.h b/include/linux/quota.h
-index 6e0393a..52e49dc 100644
+index 6e0393a..dcddfb2 100644
 --- a/include/linux/quota.h
 +++ b/include/linux/quota.h
 @@ -160,14 +160,18 @@ enum {
@@ -1095818,7 +1099977,7 @@
  
  struct quota_info {
  	unsigned int flags;			/* Flags for diskquotas on this device */
-@@ -325,17 +337,16 @@ struct quota_info {
+@@ -325,17 +337,19 @@ struct quota_info {
  	struct quota_format_ops *ops[MAXQUOTAS];	/* Operations for each type */
  };
  
@@ -1095837,6 +1099996,9 @@
 +	((type) == USRQUOTA ? (sb_dqopt(sb)->flags & DQUOT_USR_SUSPENDED) : \
 +			      (sb_dqopt(sb)->flags & DQUOT_GRP_SUSPENDED))
 +
++#define sb_any_quota_suspended(sb) (sb_has_quota_suspended(sb, USRQUOTA) | \
++				  sb_has_quota_suspended(sb, GRPQUOTA))
++
  int register_quota_format(struct quota_format_type *fmt);
  void unregister_quota_format(struct quota_format_type *fmt);
  
@@ -1100450,6 +1104612,18 @@
 +
  #endif /* CONFIG_SSB_DRIVER_PCICORE */
  #endif /* LINUX_SSB_PCICORE_H_ */
+diff --git a/include/linux/string.h b/include/linux/string.h
+index c5d3fca..efdc445 100644
+--- a/include/linux/string.h
++++ b/include/linux/string.h
+@@ -109,5 +109,7 @@ extern void *kmemdup(const void *src, size_t len, gfp_t gfp);
+ extern char **argv_split(gfp_t gfp, const char *str, int *argcp);
+ extern void argv_free(char **argv);
+ 
++extern bool sysfs_streq(const char *s1, const char *s2);
++
+ #endif
+ #endif /* _LINUX_STRING_H_ */
 diff --git a/include/linux/sunrpc/auth.h b/include/linux/sunrpc/auth.h
 index 7a69ca3..3f63218 100644
 --- a/include/linux/sunrpc/auth.h
@@ -1101047,7 +1105221,7 @@
  extern int sysdev_create_file(struct sys_device *, struct sysdev_attribute *);
  extern void sysdev_remove_file(struct sys_device *, struct sysdev_attribute *);
 diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
-index 8027104..7858eac 100644
+index 8027104..27bad59 100644
 --- a/include/linux/sysfs.h
 +++ b/include/linux/sysfs.h
 @@ -32,7 +32,7 @@ struct attribute {
@@ -1101105,7 +1105279,7 @@
  }
  
  static inline int sysfs_create_group(struct kobject *kobj,
-@@ -192,10 +190,15 @@ static inline int sysfs_create_group(struct kobject *kobj,
+@@ -192,10 +190,21 @@ static inline int sysfs_create_group(struct kobject *kobj,
  	return 0;
  }
  
@@ -1101115,6 +1105289,12 @@
 +	return 0;
 +}
 +
++static inline int sysfs_update_group(struct kobject *kobj,
++				const struct attribute_group *grp)
++{
++	return 0;
++}
++
  static inline void sysfs_remove_group(struct kobject *kobj,
  				      const struct attribute_group *grp)
  {
@@ -1101382,6 +1105562,132 @@
  
 -
  #endif
+diff --git a/include/linux/timex.h b/include/linux/timex.h
+index 8ea3e71..fc6035d 100644
+--- a/include/linux/timex.h
++++ b/include/linux/timex.h
+@@ -58,6 +58,8 @@
+ 
+ #include <asm/param.h>
+ 
++#define NTP_API		4	/* NTP API version */
++
+ /*
+  * SHIFT_KG and SHIFT_KF establish the damping of the PLL and are chosen
+  * for a slightly underdamped convergence characteristic. SHIFT_KH
+@@ -74,24 +76,22 @@
+ #define MAXTC		10	/* maximum time constant (shift) */
+ 
+ /*
+- * The SHIFT_UPDATE define establishes the decimal point of the
+- * time_offset variable which represents the current offset with
+- * respect to standard time.
+- *
+  * SHIFT_USEC defines the scaling (shift) of the time_freq and
+  * time_tolerance variables, which represent the current frequency
+  * offset and maximum frequency tolerance.
+  */
+-#define SHIFT_UPDATE (SHIFT_HZ + 1) /* time offset scale (shift) */
+ #define SHIFT_USEC 16		/* frequency offset scale (shift) */
+-#define SHIFT_NSEC 12		/* kernel frequency offset scale */
+-
+-#define MAXPHASE 512000L        /* max phase error (us) */
+-#define MAXFREQ (512L << SHIFT_USEC)  /* max frequency error (ppm) */
+-#define MAXFREQ_NSEC (512000L << SHIFT_NSEC) /* max frequency error (ppb) */
++#define PPM_SCALE (NSEC_PER_USEC << (NTP_SCALE_SHIFT - SHIFT_USEC))
++#define PPM_SCALE_INV_SHIFT 20
++#define PPM_SCALE_INV ((1ll << (PPM_SCALE_INV_SHIFT + NTP_SCALE_SHIFT)) / \
++		       PPM_SCALE + 1)
++
++#define MAXPHASE 500000000l	/* max phase error (ns) */
++#define MAXFREQ 500000		/* max frequency error (ns/s) */
++#define MAXFREQ_SCALED ((s64)MAXFREQ << NTP_SCALE_SHIFT)
+ #define MINSEC 256		/* min interval between updates (s) */
+ #define MAXSEC 2048		/* max interval between updates (s) */
+-#define	NTP_PHASE_LIMIT	(MAXPHASE << 5)	/* beyond max. dispersion */
++#define NTP_PHASE_LIMIT ((MAXPHASE / NSEC_PER_USEC) << 5) /* beyond max. dispersion */
+ 
+ /*
+  * syscall interface - used (mainly by NTP daemon)
+@@ -121,9 +121,11 @@ struct timex {
+ 	long errcnt;            /* calibration errors (ro) */
+ 	long stbcnt;            /* stability limit exceeded (ro) */
+ 
++	int tai;		/* TAI offset (ro) */
++
+ 	int  :32; int  :32; int  :32; int  :32;
+ 	int  :32; int  :32; int  :32; int  :32;
+-	int  :32; int  :32; int  :32; int  :32;
++	int  :32; int  :32; int  :32;
+ };
+ 
+ /*
+@@ -135,6 +137,9 @@ struct timex {
+ #define ADJ_ESTERROR		0x0008	/* estimated time error */
+ #define ADJ_STATUS		0x0010	/* clock status */
+ #define ADJ_TIMECONST		0x0020	/* pll time constant */
++#define ADJ_TAI			0x0080	/* set TAI offset */
++#define ADJ_MICRO		0x1000	/* select microsecond resolution */
++#define ADJ_NANO		0x2000	/* select nanosecond resolution */
+ #define ADJ_TICK		0x4000	/* tick value */
+ #define ADJ_OFFSET_SINGLESHOT	0x8001	/* old-fashioned adjtime */
+ #define ADJ_OFFSET_SS_READ	0xa001  /* read-only adjtime */
+@@ -146,8 +151,6 @@ struct timex {
+ #define MOD_ESTERROR	ADJ_ESTERROR
+ #define MOD_STATUS	ADJ_STATUS
+ #define MOD_TIMECONST	ADJ_TIMECONST
+-#define MOD_CLKB	ADJ_TICK
+-#define MOD_CLKA	ADJ_OFFSET_SINGLESHOT /* 0x8000 in original */
+ 
+ 
+ /*
+@@ -169,9 +172,13 @@ struct timex {
+ #define STA_PPSERROR	0x0800	/* PPS signal calibration error (ro) */
+ 
+ #define STA_CLOCKERR	0x1000	/* clock hardware fault (ro) */
++#define STA_NANO	0x2000	/* resolution (0 = us, 1 = ns) (ro) */
++#define STA_MODE	0x4000	/* mode (0 = PLL, 1 = FLL) (ro) */
++#define STA_CLK		0x8000	/* clock source (0 = A, 1 = B) (ro) */
+ 
++/* read-only bits */
+ #define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | \
+-    STA_PPSERROR | STA_CLOCKERR) /* read-only bits */
++	STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK)
+ 
+ /*
+  * Clock states (time_state)
+@@ -203,10 +210,9 @@ extern int time_status;		/* clock synchronization status bits */
+ extern long time_maxerror;	/* maximum error */
+ extern long time_esterror;	/* estimated error */
+ 
+-extern long time_freq;		/* frequency offset (scaled ppm) */
+-
+ extern long time_adjust;	/* The amount of adjtime left */
+ 
++extern void ntp_init(void);
+ extern void ntp_clear(void);
+ 
+ /**
+@@ -225,7 +231,7 @@ static inline int ntp_synced(void)
+ 	__x < 0 ? -(-__x >> __s) : __x >> __s;	\
+ })
+ 
+-#define TICK_LENGTH_SHIFT	32
++#define NTP_SCALE_SHIFT		32
+ 
+ #ifdef CONFIG_NO_HZ
+ #define NTP_INTERVAL_FREQ  (2)
+@@ -234,8 +240,8 @@ static inline int ntp_synced(void)
+ #endif
+ #define NTP_INTERVAL_LENGTH (NSEC_PER_SEC/NTP_INTERVAL_FREQ)
+ 
+-/* Returns how long ticks are at present, in ns / 2^(SHIFT_SCALE-10). */
+-extern u64 current_tick_length(void);
++/* Returns how long ticks are at present, in ns / 2^NTP_SCALE_SHIFT. */
++extern u64 tick_length;
+ 
+ extern void second_overflow(void);
+ extern void update_ntp_one_tick(void);
 diff --git a/include/linux/topology.h b/include/linux/topology.h
 index bd14f8b..4bb7074 100644
 --- a/include/linux/topology.h
@@ -1115582,7 +1119888,7 @@
  
  static int debug_populate(struct cgroup_subsys *ss, struct cgroup *cont)
 diff --git a/kernel/compat.c b/kernel/compat.c
-index 5f0e201..4a856a3 100644
+index 5f0e201..32c254a 100644
 --- a/kernel/compat.c
 +++ b/kernel/compat.c
 @@ -47,15 +47,14 @@ static long compat_nanosleep_restart(struct restart_block *restart)
@@ -1115660,7 +1119966,17 @@
  	return -ERESTARTNOHAND;
  }
  #endif /* __ARCH_WANT_COMPAT_SYS_RT_SIGSUSPEND */
-@@ -1081,4 +1080,3 @@ compat_sys_sysinfo(struct compat_sysinfo __user *info)
+@@ -956,7 +955,8 @@ asmlinkage long compat_sys_adjtimex(struct compat_timex __user *utp)
+ 			__put_user(txc.jitcnt, &utp->jitcnt) ||
+ 			__put_user(txc.calcnt, &utp->calcnt) ||
+ 			__put_user(txc.errcnt, &utp->errcnt) ||
+-			__put_user(txc.stbcnt, &utp->stbcnt))
++			__put_user(txc.stbcnt, &utp->stbcnt) ||
++			__put_user(txc.tai, &utp->tai))
+ 		ret = -EFAULT;
+ 
+ 	return ret;
+@@ -1081,4 +1081,3 @@ compat_sys_sysinfo(struct compat_sysinfo __user *info)
  
  	return 0;
  }
@@ -1117966,7 +1122282,7 @@
  }
  __initcall(kallsyms_init);
 diff --git a/kernel/kexec.c b/kernel/kexec.c
-index 06a0e27..cb85c79 100644
+index 06a0e27..1c5fcac 100644
 --- a/kernel/kexec.c
 +++ b/kernel/kexec.c
 @@ -29,7 +29,6 @@
@@ -1117977,6 +1122293,15 @@
  #include <asm/sections.h>
  
  /* Per cpu memory for storing cpu states in case of system crash. */
+@@ -1218,7 +1217,7 @@ static int __init parse_crashkernel_mem(char 			*cmdline,
+ 		}
+ 
+ 		/* match ? */
+-		if (system_ram >= start && system_ram <= end) {
++		if (system_ram >= start && system_ram < end) {
+ 			*crash_size = size;
+ 			break;
+ 		}
 @@ -1406,6 +1405,9 @@ static int __init crash_save_vmcoreinfo_init(void)
  	VMCOREINFO_LENGTH(zone.free_area, MAX_ORDER);
  	VMCOREINFO_LENGTH(free_area.free_list, MIGRATE_TYPES);
@@ -1120368,7 +1124693,7 @@
  /*
   * markers_mutex nests inside module_mutex. Markers mutex protects the builtin
 diff --git a/kernel/module.c b/kernel/module.c
-index 5d437bf..8d6cccc 100644
+index 5d437bf..8674a39 100644
 --- a/kernel/module.c
 +++ b/kernel/module.c
 @@ -43,7 +43,6 @@
@@ -1120379,7 +1124704,254 @@
  #include <asm/cacheflush.h>
  #include <linux/license.h>
  #include <asm/sections.h>
-@@ -664,7 +663,7 @@ static void free_module(struct module *mod);
+@@ -165,131 +164,140 @@ static const struct kernel_symbol *lookup_symbol(const char *name,
+ 	return NULL;
+ }
+ 
+-static void printk_unused_warning(const char *name)
++static bool always_ok(bool gplok, bool warn, const char *name)
+ {
+-	printk(KERN_WARNING "Symbol %s is marked as UNUSED, "
+-		"however this module is using it.\n", name);
+-	printk(KERN_WARNING "This symbol will go away in the future.\n");
+-	printk(KERN_WARNING "Please evalute if this is the right api to use, "
+-		"and if it really is, submit a report the linux kernel "
+-		"mailinglist together with submitting your code for "
+-		"inclusion.\n");
++	return true;
+ }
+ 
+-/* Find a symbol, return value, crc and module which owns it */
+-static unsigned long __find_symbol(const char *name,
+-				   struct module **owner,
+-				   const unsigned long **crc,
+-				   int gplok)
++static bool printk_unused_warning(bool gplok, bool warn, const char *name)
+ {
+-	struct module *mod;
+-	const struct kernel_symbol *ks;
+-
+-	/* Core kernel first. */
+-	*owner = NULL;
+-	ks = lookup_symbol(name, __start___ksymtab, __stop___ksymtab);
+-	if (ks) {
+-		*crc = symversion(__start___kcrctab, (ks - __start___ksymtab));
+-		return ks->value;
++	if (warn) {
++		printk(KERN_WARNING "Symbol %s is marked as UNUSED, "
++		       "however this module is using it.\n", name);
++		printk(KERN_WARNING
++		       "This symbol will go away in the future.\n");
++		printk(KERN_WARNING
++		       "Please evalute if this is the right api to use and if "
++		       "it really is, submit a report the linux kernel "
++		       "mailinglist together with submitting your code for "
++		       "inclusion.\n");
+ 	}
+-	if (gplok) {
+-		ks = lookup_symbol(name, __start___ksymtab_gpl,
+-					 __stop___ksymtab_gpl);
+-		if (ks) {
+-			*crc = symversion(__start___kcrctab_gpl,
+-					  (ks - __start___ksymtab_gpl));
+-			return ks->value;
+-		}
+-	}
+-	ks = lookup_symbol(name, __start___ksymtab_gpl_future,
+-				 __stop___ksymtab_gpl_future);
+-	if (ks) {
+-		if (!gplok) {
+-			printk(KERN_WARNING "Symbol %s is being used "
+-			       "by a non-GPL module, which will not "
+-			       "be allowed in the future\n", name);
+-			printk(KERN_WARNING "Please see the file "
+-			       "Documentation/feature-removal-schedule.txt "
+-			       "in the kernel source tree for more "
+-			       "details.\n");
+-		}
+-		*crc = symversion(__start___kcrctab_gpl_future,
+-				  (ks - __start___ksymtab_gpl_future));
+-		return ks->value;
++	return true;
++}
++
++static bool gpl_only_unused_warning(bool gplok, bool warn, const char *name)
++{
++	if (!gplok)
++		return false;
++	return printk_unused_warning(gplok, warn, name);
++}
++
++static bool gpl_only(bool gplok, bool warn, const char *name)
++{
++	return gplok;
++}
++
++static bool warn_if_not_gpl(bool gplok, bool warn, const char *name)
++{
++	if (!gplok && warn) {
++		printk(KERN_WARNING "Symbol %s is being used "
++		       "by a non-GPL module, which will not "
++		       "be allowed in the future\n", name);
++		printk(KERN_WARNING "Please see the file "
++		       "Documentation/feature-removal-schedule.txt "
++		       "in the kernel source tree for more details.\n");
+ 	}
++	return true;
++}
+ 
+-	ks = lookup_symbol(name, __start___ksymtab_unused,
+-				 __stop___ksymtab_unused);
+-	if (ks) {
+-		printk_unused_warning(name);
+-		*crc = symversion(__start___kcrctab_unused,
+-				  (ks - __start___ksymtab_unused));
+-		return ks->value;
++struct symsearch {
++	const struct kernel_symbol *start, *stop;
++	const unsigned long *crcs;
++	bool (*check)(bool gplok, bool warn, const char *name);
++};
++
++/* Look through this array of symbol tables for a symbol match which
++ * passes the check function. */
++static const struct kernel_symbol *search_symarrays(const struct symsearch *arr,
++						    unsigned int num,
++						    const char *name,
++						    bool gplok,
++						    bool warn,
++						    const unsigned long **crc)
++{
++	unsigned int i;
++	const struct kernel_symbol *ks;
++
++	for (i = 0; i < num; i++) {
++		ks = lookup_symbol(name, arr[i].start, arr[i].stop);
++		if (!ks || !arr[i].check(gplok, warn, name))
++			continue;
++
++		if (crc)
++			*crc = symversion(arr[i].crcs, ks - arr[i].start);
++		return ks;
+ 	}
++	return NULL;
++}
++
++/* Find a symbol, return value, (optional) crc and (optional) module
++ * which owns it */
++static unsigned long find_symbol(const char *name,
++				 struct module **owner,
++				 const unsigned long **crc,
++				 bool gplok,
++				 bool warn)
++{
++	struct module *mod;
++	const struct kernel_symbol *ks;
++	const struct symsearch arr[] = {
++		{ __start___ksymtab, __stop___ksymtab, __start___kcrctab,
++		  always_ok },
++		{ __start___ksymtab_gpl, __stop___ksymtab_gpl,
++		  __start___kcrctab_gpl, gpl_only },
++		{ __start___ksymtab_gpl_future, __stop___ksymtab_gpl_future,
++		  __start___kcrctab_gpl_future, warn_if_not_gpl },
++		{ __start___ksymtab_unused, __stop___ksymtab_unused,
++		  __start___kcrctab_unused, printk_unused_warning },
++		{ __start___ksymtab_unused_gpl, __stop___ksymtab_unused_gpl,
++		  __start___kcrctab_unused_gpl, gpl_only_unused_warning },
++	};
+ 
+-	if (gplok)
+-		ks = lookup_symbol(name, __start___ksymtab_unused_gpl,
+-				 __stop___ksymtab_unused_gpl);
++	/* Core kernel first. */
++	ks = search_symarrays(arr, ARRAY_SIZE(arr), name, gplok, warn, crc);
+ 	if (ks) {
+-		printk_unused_warning(name);
+-		*crc = symversion(__start___kcrctab_unused_gpl,
+-				  (ks - __start___ksymtab_unused_gpl));
++		if (owner)
++			*owner = NULL;
+ 		return ks->value;
+ 	}
+ 
+ 	/* Now try modules. */
+ 	list_for_each_entry(mod, &modules, list) {
+-		*owner = mod;
+-		ks = lookup_symbol(name, mod->syms, mod->syms + mod->num_syms);
+-		if (ks) {
+-			*crc = symversion(mod->crcs, (ks - mod->syms));
+-			return ks->value;
+-		}
+-
+-		if (gplok) {
+-			ks = lookup_symbol(name, mod->gpl_syms,
+-					   mod->gpl_syms + mod->num_gpl_syms);
+-			if (ks) {
+-				*crc = symversion(mod->gpl_crcs,
+-						  (ks - mod->gpl_syms));
+-				return ks->value;
+-			}
+-		}
+-		ks = lookup_symbol(name, mod->unused_syms, mod->unused_syms + mod->num_unused_syms);
++		struct symsearch arr[] = {
++			{ mod->syms, mod->syms + mod->num_syms, mod->crcs,
++			  always_ok },
++			{ mod->gpl_syms, mod->gpl_syms + mod->num_gpl_syms,
++			  mod->gpl_crcs, gpl_only },
++			{ mod->gpl_future_syms,
++			  mod->gpl_future_syms + mod->num_gpl_future_syms,
++			  mod->gpl_future_crcs, warn_if_not_gpl },
++			{ mod->unused_syms,
++			  mod->unused_syms + mod->num_unused_syms,
++			  mod->unused_crcs, printk_unused_warning },
++			{ mod->unused_gpl_syms,
++			  mod->unused_gpl_syms + mod->num_unused_gpl_syms,
++			  mod->unused_gpl_crcs, gpl_only_unused_warning },
++		};
++
++		ks = search_symarrays(arr, ARRAY_SIZE(arr),
++				      name, gplok, warn, crc);
+ 		if (ks) {
+-			printk_unused_warning(name);
+-			*crc = symversion(mod->unused_crcs, (ks - mod->unused_syms));
+-			return ks->value;
+-		}
+-
+-		if (gplok) {
+-			ks = lookup_symbol(name, mod->unused_gpl_syms,
+-					   mod->unused_gpl_syms + mod->num_unused_gpl_syms);
+-			if (ks) {
+-				printk_unused_warning(name);
+-				*crc = symversion(mod->unused_gpl_crcs,
+-						  (ks - mod->unused_gpl_syms));
+-				return ks->value;
+-			}
+-		}
+-		ks = lookup_symbol(name, mod->gpl_future_syms,
+-				   (mod->gpl_future_syms +
+-				    mod->num_gpl_future_syms));
+-		if (ks) {
+-			if (!gplok) {
+-				printk(KERN_WARNING "Symbol %s is being used "
+-				       "by a non-GPL module, which will not "
+-				       "be allowed in the future\n", name);
+-				printk(KERN_WARNING "Please see the file "
+-				       "Documentation/feature-removal-schedule.txt "
+-				       "in the kernel source tree for more "
+-				       "details.\n");
+-			}
+-			*crc = symversion(mod->gpl_future_crcs,
+-					  (ks - mod->gpl_future_syms));
++			if (owner)
++				*owner = mod;
+ 			return ks->value;
+ 		}
+ 	}
++
+ 	DEBUGP("Failed to find symbol %s\n", name);
+ 	return -ENOENT;
+ }
+@@ -664,7 +672,7 @@ static void free_module(struct module *mod);
  
  static void wait_for_zero_refcount(struct module *mod)
  {
@@ -1120388,6 +1124960,193 @@
  	mutex_unlock(&module_mutex);
  	for (;;) {
  		DEBUGP("Looking at refcount...\n");
+@@ -737,12 +745,13 @@ sys_delete_module(const char __user *name_user, unsigned int flags)
+ 	if (!forced && module_refcount(mod) != 0)
+ 		wait_for_zero_refcount(mod);
+ 
++	mutex_unlock(&module_mutex);
+ 	/* Final destruction now noone is using it. */
+-	if (mod->exit != NULL) {
+-		mutex_unlock(&module_mutex);
++	if (mod->exit != NULL)
+ 		mod->exit();
+-		mutex_lock(&module_mutex);
+-	}
++	blocking_notifier_call_chain(&module_notify_list,
++				     MODULE_STATE_GOING, mod);
++	mutex_lock(&module_mutex);
+ 	/* Store the name of the last unloaded module for diagnostic purposes */
+ 	strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module));
+ 	free_module(mod);
+@@ -778,10 +787,9 @@ static void print_unload_info(struct seq_file *m, struct module *mod)
+ void __symbol_put(const char *symbol)
+ {
+ 	struct module *owner;
+-	const unsigned long *crc;
+ 
+ 	preempt_disable();
+-	if (IS_ERR_VALUE(__find_symbol(symbol, &owner, &crc, 1)))
++	if (IS_ERR_VALUE(find_symbol(symbol, &owner, NULL, true, false)))
+ 		BUG();
+ 	module_put(owner);
+ 	preempt_enable();
+@@ -925,13 +933,10 @@ static inline int check_modstruct_version(Elf_Shdr *sechdrs,
+ 					  struct module *mod)
+ {
+ 	const unsigned long *crc;
+-	struct module *owner;
+ 
+-	if (IS_ERR_VALUE(__find_symbol("struct_module",
+-						&owner, &crc, 1)))
++	if (IS_ERR_VALUE(find_symbol("struct_module", NULL, &crc, true, false)))
+ 		BUG();
+-	return check_version(sechdrs, versindex, "struct_module", mod,
+-			     crc);
++	return check_version(sechdrs, versindex, "struct_module", mod, crc);
+ }
+ 
+ /* First part is kernel version, which we ignore. */
+@@ -975,8 +980,8 @@ static unsigned long resolve_symbol(Elf_Shdr *sechdrs,
+ 	unsigned long ret;
+ 	const unsigned long *crc;
+ 
+-	ret = __find_symbol(name, &owner, &crc,
+-			!(mod->taints & TAINT_PROPRIETARY_MODULE));
++	ret = find_symbol(name, &owner, &crc,
++			  !(mod->taints & TAINT_PROPRIETARY_MODULE), true);
+ 	if (!IS_ERR_VALUE(ret)) {
+ 		/* use_module can fail due to OOM,
+ 		   or module initialization or unloading */
+@@ -992,6 +997,20 @@ static unsigned long resolve_symbol(Elf_Shdr *sechdrs,
+  * J. Corbet <corbet at lwn.net>
+  */
+ #if defined(CONFIG_KALLSYMS) && defined(CONFIG_SYSFS)
++struct module_sect_attr
++{
++	struct module_attribute mattr;
++	char *name;
++	unsigned long address;
++};
++
++struct module_sect_attrs
++{
++	struct attribute_group grp;
++	unsigned int nsections;
++	struct module_sect_attr attrs[0];
++};
++
+ static ssize_t module_sect_show(struct module_attribute *mattr,
+ 				struct module *mod, char *buf)
+ {
+@@ -1002,7 +1021,7 @@ static ssize_t module_sect_show(struct module_attribute *mattr,
+ 
+ static void free_sect_attrs(struct module_sect_attrs *sect_attrs)
+ {
+-	int section;
++	unsigned int section;
+ 
+ 	for (section = 0; section < sect_attrs->nsections; section++)
+ 		kfree(sect_attrs->attrs[section].name);
+@@ -1363,10 +1382,9 @@ void *__symbol_get(const char *symbol)
+ {
+ 	struct module *owner;
+ 	unsigned long value;
+-	const unsigned long *crc;
+ 
+ 	preempt_disable();
+-	value = __find_symbol(symbol, &owner, &crc, 1);
++	value = find_symbol(symbol, &owner, NULL, true, true);
+ 	if (IS_ERR_VALUE(value))
+ 		value = 0;
+ 	else if (strong_try_module_get(owner))
+@@ -1383,33 +1401,33 @@ EXPORT_SYMBOL_GPL(__symbol_get);
+  */
+ static int verify_export_symbols(struct module *mod)
+ {
+-	const char *name = NULL;
+-	unsigned long i, ret = 0;
++	unsigned int i;
+ 	struct module *owner;
+-	const unsigned long *crc;
+-
+-	for (i = 0; i < mod->num_syms; i++)
+-		if (!IS_ERR_VALUE(__find_symbol(mod->syms[i].name,
+-							&owner, &crc, 1))) {
+-			name = mod->syms[i].name;
+-			ret = -ENOEXEC;
+-			goto dup;
+-		}
++	const struct kernel_symbol *s;
++	struct {
++		const struct kernel_symbol *sym;
++		unsigned int num;
++	} arr[] = {
++		{ mod->syms, mod->num_syms },
++		{ mod->gpl_syms, mod->num_gpl_syms },
++		{ mod->gpl_future_syms, mod->num_gpl_future_syms },
++		{ mod->unused_syms, mod->num_unused_syms },
++		{ mod->unused_gpl_syms, mod->num_unused_gpl_syms },
++	};
+ 
+-	for (i = 0; i < mod->num_gpl_syms; i++)
+-		if (!IS_ERR_VALUE(__find_symbol(mod->gpl_syms[i].name,
+-							&owner, &crc, 1))) {
+-			name = mod->gpl_syms[i].name;
+-			ret = -ENOEXEC;
+-			goto dup;
++	for (i = 0; i < ARRAY_SIZE(arr); i++) {
++		for (s = arr[i].sym; s < arr[i].sym + arr[i].num; s++) {
++			if (!IS_ERR_VALUE(find_symbol(s->name, &owner,
++						      NULL, true, false))) {
++				printk(KERN_ERR
++				       "%s: exports duplicate symbol %s"
++				       " (owned by %s)\n",
++				       mod->name, s->name, module_name(owner));
++				return -ENOEXEC;
++			}
+ 		}
+-
+-dup:
+-	if (ret)
+-		printk(KERN_ERR "%s: exports duplicate symbol %s (owned by %s)\n",
+-			mod->name, name, module_name(owner));
+-
+-	return ret;
++	}
++	return 0;
+ }
+ 
+ /* Change all symbols so that st_value encodes the pointer directly. */
+@@ -1815,8 +1833,9 @@ static struct module *load_module(void __user *umod,
+ 	unwindex = find_sec(hdr, sechdrs, secstrings, ARCH_UNWIND_SECTION_NAME);
+ #endif
+ 
+-	/* Don't keep modinfo section */
++	/* Don't keep modinfo and version sections. */
+ 	sechdrs[infoindex].sh_flags &= ~(unsigned long)SHF_ALLOC;
++	sechdrs[versindex].sh_flags &= ~(unsigned long)SHF_ALLOC;
+ #ifdef CONFIG_KALLSYMS
+ 	/* Keep symbol and string tables for decoding later. */
+ 	sechdrs[symindex].sh_flags |= SHF_ALLOC;
+@@ -1978,7 +1997,8 @@ static struct module *load_module(void __user *umod,
+ 		mod->unused_crcs = (void *)sechdrs[unusedcrcindex].sh_addr;
+ 	mod->unused_gpl_syms = (void *)sechdrs[unusedgplindex].sh_addr;
+ 	if (unusedgplcrcindex)
+-		mod->unused_crcs = (void *)sechdrs[unusedgplcrcindex].sh_addr;
++		mod->unused_gpl_crcs
++			= (void *)sechdrs[unusedgplcrcindex].sh_addr;
+ 
+ #ifdef CONFIG_MODVERSIONS
+ 	if ((mod->num_syms && !crcindex) ||
+@@ -2172,6 +2192,8 @@ sys_init_module(void __user *umod,
+ 		mod->state = MODULE_STATE_GOING;
+ 		synchronize_sched();
+ 		module_put(mod);
++		blocking_notifier_call_chain(&module_notify_list,
++					     MODULE_STATE_GOING, mod);
+ 		mutex_lock(&module_mutex);
+ 		free_module(mod);
+ 		mutex_unlock(&module_mutex);
 diff --git a/kernel/notifier.c b/kernel/notifier.c
 index 643360d..823be11 100644
 --- a/kernel/notifier.c
@@ -1120653,10 +1125412,37 @@
  	}
  
 diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c
-index 2eae91f..ae5c6c1 100644
+index 2eae91f..f1525ad 100644
 --- a/kernel/posix-cpu-timers.c
 +++ b/kernel/posix-cpu-timers.c
-@@ -1087,45 +1087,45 @@ static void check_process_timers(struct task_struct *tsk,
+@@ -4,8 +4,9 @@
+ 
+ #include <linux/sched.h>
+ #include <linux/posix-timers.h>
+-#include <asm/uaccess.h>
+ #include <linux/errno.h>
++#include <linux/math64.h>
++#include <asm/uaccess.h>
+ 
+ static int check_clock(const clockid_t which_clock)
+ {
+@@ -47,12 +48,10 @@ static void sample_to_timespec(const clockid_t which_clock,
+ 			       union cpu_time_count cpu,
+ 			       struct timespec *tp)
+ {
+-	if (CPUCLOCK_WHICH(which_clock) == CPUCLOCK_SCHED) {
+-		tp->tv_sec = div_long_long_rem(cpu.sched,
+-					       NSEC_PER_SEC, &tp->tv_nsec);
+-	} else {
++	if (CPUCLOCK_WHICH(which_clock) == CPUCLOCK_SCHED)
++		*tp = ns_to_timespec(cpu.sched);
++	else
+ 		cputime_to_timespec(cpu.cpu, tp);
+-	}
+ }
+ 
+ static inline int cpu_time_before(const clockid_t which_clock,
+@@ -1087,45 +1086,45 @@ static void check_process_timers(struct task_struct *tsk,
  	maxfire = 20;
  	prof_expires = cputime_zero;
  	while (!list_empty(timers)) {
@@ -1121274,7 +1126060,7 @@
  	hotcpu_notifier(profile_cpu_callback, 0);
  	return 0;
 diff --git a/kernel/ptrace.c b/kernel/ptrace.c
-index fdb34e8..dcc199c 100644
+index fdb34e8..6c19e94 100644
 --- a/kernel/ptrace.c
 +++ b/kernel/ptrace.c
 @@ -73,7 +73,7 @@ void __ptrace_unlink(struct task_struct *child)
@@ -1121397,7 +1126183,23 @@
  	read_lock(&tasklist_lock);
  	child = find_task_by_vpid(pid);
  	if (child)
-@@ -608,7 +603,7 @@ int generic_ptrace_pokedata(struct task_struct *tsk, long addr, long data)
+@@ -539,7 +534,6 @@ struct task_struct *ptrace_get_task_struct(pid_t pid)
+ #define arch_ptrace_attach(child)	do { } while (0)
+ #endif
+ 
+-#ifndef __ARCH_SYS_PTRACE
+ asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
+ {
+ 	struct task_struct *child;
+@@ -587,7 +581,6 @@ asmlinkage long sys_ptrace(long request, long pid, long addr, long data)
+ 	unlock_kernel();
+ 	return ret;
+ }
+-#endif /* __ARCH_SYS_PTRACE */
+ 
+ int generic_ptrace_peekdata(struct task_struct *tsk, long addr, long data)
+ {
+@@ -608,7 +601,7 @@ int generic_ptrace_pokedata(struct task_struct *tsk, long addr, long data)
  	return (copied == sizeof(data)) ? 0 : -EIO;
  }
  
@@ -1121406,7 +1126208,7 @@
  #include <linux/compat.h>
  
  int compat_ptrace_request(struct task_struct *child, compat_long_t request,
-@@ -616,6 +611,7 @@ int compat_ptrace_request(struct task_struct *child, compat_long_t request,
+@@ -616,6 +609,7 @@ int compat_ptrace_request(struct task_struct *child, compat_long_t request,
  {
  	compat_ulong_t __user *datap = compat_ptr(data);
  	compat_ulong_t word;
@@ -1121414,7 +1126216,7 @@
  	int ret;
  
  	switch (request) {
-@@ -638,6 +634,23 @@ int compat_ptrace_request(struct task_struct *child, compat_long_t request,
+@@ -638,6 +632,23 @@ int compat_ptrace_request(struct task_struct *child, compat_long_t request,
  		ret = put_user((compat_ulong_t) child->ptrace_message, datap);
  		break;
  
@@ -1121438,7 +1126240,7 @@
  	default:
  		ret = ptrace_request(child, request, addr, data);
  	}
-@@ -645,7 +658,6 @@ int compat_ptrace_request(struct task_struct *child, compat_long_t request,
+@@ -645,7 +656,6 @@ int compat_ptrace_request(struct task_struct *child, compat_long_t request,
  	return ret;
  }
  
@@ -1121446,7 +1126248,7 @@
  asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid,
  				  compat_long_t addr, compat_long_t data)
  {
-@@ -688,6 +700,4 @@ asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid,
+@@ -688,6 +698,4 @@ asmlinkage long compat_sys_ptrace(compat_long_t request, compat_long_t pid,
  	unlock_kernel();
  	return ret;
  }
@@ -1121693,7 +1126495,7 @@
   * This is compatibility stuff for IO resources.
   *
 diff --git a/kernel/sched.c b/kernel/sched.c
-index 8dcdec6..e2f7f5a 100644
+index 8dcdec6..34bcc5b 100644
 --- a/kernel/sched.c
 +++ b/kernel/sched.c
 @@ -66,6 +66,10 @@
@@ -1124039,8 +1128841,9 @@
 +
  	se->my_q = cfs_rq;
  	se->load.weight = tg->shares;
- 	se->load.inv_weight = div64_64(1ULL<<32, se->load.weight);
+-	se->load.inv_weight = div64_64(1ULL<<32, se->load.weight);
 -	se->parent = NULL;
++	se->load.inv_weight = div64_u64(1ULL<<32, se->load.weight);
 +	se->parent = parent;
  }
  #endif
@@ -1124417,7 +1129220,7 @@
  	spin_unlock_irqrestore(&task_group_lock, flags);
  
  	/* wait for possible concurrent references to cfs_rqs complete */
-@@ -7688,16 +8679,14 @@ void sched_move_task(struct task_struct *tsk)
+@@ -7688,27 +8679,34 @@ void sched_move_task(struct task_struct *tsk)
  
  	task_rq_unlock(rq, &flags);
  }
@@ -1124436,7 +1129239,10 @@
  	on_rq = se->on_rq;
  	if (on_rq)
  		dequeue_entity(cfs_rq, se, 0);
-@@ -7707,8 +8696,17 @@ static void set_se_shares(struct sched_entity *se, unsigned long shares)
+ 
+ 	se->load.weight = shares;
+-	se->load.inv_weight = div64_64((1ULL<<32), shares);
++	se->load.inv_weight = div64_u64((1ULL<<32), shares);
  
  	if (on_rq)
  		enqueue_entity(cfs_rq, se, 0);
@@ -1124508,8 +1129314,12 @@
  	spin_unlock_irqrestore(&task_group_lock, flags);
  done:
  	mutex_unlock(&shares_mutex);
-@@ -7779,26 +8790,58 @@ static unsigned long to_ratio(u64 period, u64 runtime)
- 	return div64_64(runtime << 16, period);
+@@ -7776,29 +8787,61 @@ static unsigned long to_ratio(u64 period, u64 runtime)
+ 	if (runtime == RUNTIME_INF)
+ 		return 1ULL << 16;
+ 
+-	return div64_64(runtime << 16, period);
++	return div64_u64(runtime << 16, period);
  }
  
 +#ifdef CONFIG_CGROUP_SCHED
@@ -1124955,7 +1129765,7 @@
  
  /*
 diff --git a/kernel/sched_debug.c b/kernel/sched_debug.c
-index ef358ba..8a9498e 100644
+index ef358ba..6b4a125 100644
 --- a/kernel/sched_debug.c
 +++ b/kernel/sched_debug.c
 @@ -67,14 +67,24 @@ print_task(struct seq_file *m, struct rq *rq, struct task_struct *p)
@@ -1125042,6 +1129852,17 @@
  	return 0;
  }
  
+@@ -332,8 +357,8 @@ void proc_sched_show_task(struct task_struct *p, struct seq_file *m)
+ 
+ 		avg_per_cpu = p->se.sum_exec_runtime;
+ 		if (p->se.nr_migrations) {
+-			avg_per_cpu = div64_64(avg_per_cpu,
+-					       p->se.nr_migrations);
++			avg_per_cpu = div64_u64(avg_per_cpu,
++						p->se.nr_migrations);
+ 		} else {
+ 			avg_per_cpu = -1LL;
+ 		}
 diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
 index 0080968..89fa32b 100644
 --- a/kernel/sched_fair.c
@@ -1127574,7 +1132395,7 @@
  }
  #endif /* __ARCH_WANT_SYS_RT_SIGSUSPEND */
 diff --git a/kernel/softirq.c b/kernel/softirq.c
-index 31e9f2a..3c44956 100644
+index 31e9f2a..36e0617 100644
 --- a/kernel/softirq.c
 +++ b/kernel/softirq.c
 @@ -356,7 +356,8 @@ void open_softirq(int nr, void (*action)(struct softirq_action*), void *data)
@@ -1127689,7 +1132510,7 @@
  			return;
  		}
  	}
-@@ -566,20 +585,20 @@ void tasklet_kill_immediate(struct tasklet_struct *t, unsigned int cpu)
+@@ -566,20 +585,24 @@ void tasklet_kill_immediate(struct tasklet_struct *t, unsigned int cpu)
  
  static void takeover_tasklets(unsigned int cpu)
  {
@@ -1127702,19 +1132523,23 @@
 -	for (i = &__get_cpu_var(tasklet_vec).list; *i; i = &(*i)->next);
 -	*i = per_cpu(tasklet_vec, cpu).list;
 -	per_cpu(tasklet_vec, cpu).list = NULL;
-+	*__get_cpu_var(tasklet_vec).tail = per_cpu(tasklet_vec, cpu).head;
-+	__get_cpu_var(tasklet_vec).tail = per_cpu(tasklet_vec, cpu).tail;
-+	per_cpu(tasklet_vec, cpu).head = NULL;
-+	per_cpu(tasklet_vec, cpu).tail = &per_cpu(tasklet_vec, cpu).head;
++	if (&per_cpu(tasklet_vec, cpu).head != per_cpu(tasklet_vec, cpu).tail) {
++		*(__get_cpu_var(tasklet_vec).tail) = per_cpu(tasklet_vec, cpu).head;
++		__get_cpu_var(tasklet_vec).tail = per_cpu(tasklet_vec, cpu).tail;
++		per_cpu(tasklet_vec, cpu).head = NULL;
++		per_cpu(tasklet_vec, cpu).tail = &per_cpu(tasklet_vec, cpu).head;
++	}
  	raise_softirq_irqoff(TASKLET_SOFTIRQ);
  
 -	for (i = &__get_cpu_var(tasklet_hi_vec).list; *i; i = &(*i)->next);
 -	*i = per_cpu(tasklet_hi_vec, cpu).list;
 -	per_cpu(tasklet_hi_vec, cpu).list = NULL;
-+	*__get_cpu_var(tasklet_hi_vec).tail = per_cpu(tasklet_hi_vec, cpu).head;
-+	__get_cpu_var(tasklet_hi_vec).tail = per_cpu(tasklet_hi_vec, cpu).tail;
-+	per_cpu(tasklet_hi_vec, cpu).head = NULL;
-+	per_cpu(tasklet_hi_vec, cpu).tail = &per_cpu(tasklet_hi_vec, cpu).head;
++	if (&per_cpu(tasklet_hi_vec, cpu).head != per_cpu(tasklet_hi_vec, cpu).tail) {
++		*__get_cpu_var(tasklet_hi_vec).tail = per_cpu(tasklet_hi_vec, cpu).head;
++		__get_cpu_var(tasklet_hi_vec).tail = per_cpu(tasklet_hi_vec, cpu).tail;
++		per_cpu(tasklet_hi_vec, cpu).head = NULL;
++		per_cpu(tasklet_hi_vec, cpu).tail = &per_cpu(tasklet_hi_vec, cpu).head;
++	}
  	raise_softirq_irqoff(HI_SOFTIRQ);
  
  	local_irq_enable();
@@ -1128322,18 +1133147,19 @@
  		goto err;
  
 diff --git a/kernel/time.c b/kernel/time.c
-index a5ec013..8672904 100644
+index a5ec013..cbe0d5a 100644
 --- a/kernel/time.c
 +++ b/kernel/time.c
-@@ -35,6 +35,7 @@
+@@ -35,6 +35,8 @@
  #include <linux/syscalls.h>
  #include <linux/security.h>
  #include <linux/fs.h>
 +#include <linux/slab.h>
++#include <linux/math64.h>
  
  #include <asm/uaccess.h>
  #include <asm/unistd.h>
-@@ -379,6 +380,7 @@ void set_normalized_timespec(struct timespec *ts, time_t sec, long nsec)
+@@ -379,6 +381,7 @@ void set_normalized_timespec(struct timespec *ts, time_t sec, long nsec)
  	ts->tv_sec = sec;
  	ts->tv_nsec = nsec;
  }
@@ -1128341,6 +1133167,134 @@
  
  /**
   * ns_to_timespec - Convert nanoseconds to timespec
+@@ -389,13 +392,17 @@ void set_normalized_timespec(struct timespec *ts, time_t sec, long nsec)
+ struct timespec ns_to_timespec(const s64 nsec)
+ {
+ 	struct timespec ts;
++	s32 rem;
+ 
+ 	if (!nsec)
+ 		return (struct timespec) {0, 0};
+ 
+-	ts.tv_sec = div_long_long_rem_signed(nsec, NSEC_PER_SEC, &ts.tv_nsec);
+-	if (unlikely(nsec < 0))
+-		set_normalized_timespec(&ts, ts.tv_sec, ts.tv_nsec);
++	ts.tv_sec = div_s64_rem(nsec, NSEC_PER_SEC, &rem);
++	if (unlikely(rem < 0)) {
++		ts.tv_sec--;
++		rem += NSEC_PER_SEC;
++	}
++	ts.tv_nsec = rem;
+ 
+ 	return ts;
+ }
+@@ -525,8 +532,10 @@ jiffies_to_timespec(const unsigned long jiffies, struct timespec *value)
+ 	 * Convert jiffies to nanoseconds and separate with
+ 	 * one divide.
+ 	 */
+-	u64 nsec = (u64)jiffies * TICK_NSEC;
+-	value->tv_sec = div_long_long_rem(nsec, NSEC_PER_SEC, &value->tv_nsec);
++	u32 rem;
++	value->tv_sec = div_u64_rem((u64)jiffies * TICK_NSEC,
++				    NSEC_PER_SEC, &rem);
++	value->tv_nsec = rem;
+ }
+ EXPORT_SYMBOL(jiffies_to_timespec);
+ 
+@@ -564,12 +573,11 @@ void jiffies_to_timeval(const unsigned long jiffies, struct timeval *value)
+ 	 * Convert jiffies to nanoseconds and separate with
+ 	 * one divide.
+ 	 */
+-	u64 nsec = (u64)jiffies * TICK_NSEC;
+-	long tv_usec;
++	u32 rem;
+ 
+-	value->tv_sec = div_long_long_rem(nsec, NSEC_PER_SEC, &tv_usec);
+-	tv_usec /= NSEC_PER_USEC;
+-	value->tv_usec = tv_usec;
++	value->tv_sec = div_u64_rem((u64)jiffies * TICK_NSEC,
++				    NSEC_PER_SEC, &rem);
++	value->tv_usec = rem / NSEC_PER_USEC;
+ }
+ EXPORT_SYMBOL(jiffies_to_timeval);
+ 
+@@ -585,9 +593,7 @@ clock_t jiffies_to_clock_t(long x)
+ 	return x / (HZ / USER_HZ);
+ # endif
+ #else
+-	u64 tmp = (u64)x * TICK_NSEC;
+-	do_div(tmp, (NSEC_PER_SEC / USER_HZ));
+-	return (long)tmp;
++	return div_u64((u64)x * TICK_NSEC, NSEC_PER_SEC / USER_HZ);
+ #endif
+ }
+ EXPORT_SYMBOL(jiffies_to_clock_t);
+@@ -599,16 +605,12 @@ unsigned long clock_t_to_jiffies(unsigned long x)
+ 		return ~0UL;
+ 	return x * (HZ / USER_HZ);
+ #else
+-	u64 jif;
+-
+ 	/* Don't worry about loss of precision here .. */
+ 	if (x >= ~0UL / HZ * USER_HZ)
+ 		return ~0UL;
+ 
+ 	/* .. but do try to contain it here */
+-	jif = x * (u64) HZ;
+-	do_div(jif, USER_HZ);
+-	return jif;
++	return div_u64((u64)x * HZ, USER_HZ);
+ #endif
+ }
+ EXPORT_SYMBOL(clock_t_to_jiffies);
+@@ -617,10 +619,9 @@ u64 jiffies_64_to_clock_t(u64 x)
+ {
+ #if (TICK_NSEC % (NSEC_PER_SEC / USER_HZ)) == 0
+ # if HZ < USER_HZ
+-	x *= USER_HZ;
+-	do_div(x, HZ);
++	x = div_u64(x * USER_HZ, HZ);
+ # elif HZ > USER_HZ
+-	do_div(x, HZ / USER_HZ);
++	x = div_u64(x, HZ / USER_HZ);
+ # else
+ 	/* Nothing to do */
+ # endif
+@@ -630,8 +631,7 @@ u64 jiffies_64_to_clock_t(u64 x)
+ 	 * but even this doesn't overflow in hundreds of years
+ 	 * in 64 bits, so..
+ 	 */
+-	x *= TICK_NSEC;
+-	do_div(x, (NSEC_PER_SEC / USER_HZ));
++	x = div_u64(x * TICK_NSEC, (NSEC_PER_SEC / USER_HZ));
+ #endif
+ 	return x;
+ }
+@@ -640,21 +640,17 @@ EXPORT_SYMBOL(jiffies_64_to_clock_t);
+ u64 nsec_to_clock_t(u64 x)
+ {
+ #if (NSEC_PER_SEC % USER_HZ) == 0
+-	do_div(x, (NSEC_PER_SEC / USER_HZ));
++	return div_u64(x, NSEC_PER_SEC / USER_HZ);
+ #elif (USER_HZ % 512) == 0
+-	x *= USER_HZ/512;
+-	do_div(x, (NSEC_PER_SEC / 512));
++	return div_u64(x * USER_HZ / 512, NSEC_PER_SEC / 512);
+ #else
+ 	/*
+          * max relative error 5.7e-8 (1.8s per year) for USER_HZ <= 1024,
+          * overflow after 64.99 years.
+          * exact for HZ=60, 72, 90, 120, 144, 180, 300, 600, 900, ...
+          */
+-	x *= 9;
+-	do_div(x, (unsigned long)((9ull * NSEC_PER_SEC + (USER_HZ/2)) /
+-				  USER_HZ));
++	return div_u64(x * 9, (9ull * NSEC_PER_SEC + (USER_HZ / 2)) / USER_HZ);
+ #endif
+-	return x;
+ }
+ 
+ #if (BITS_PER_LONG < 64)
 diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
 index 7f60097..73961f3 100644
 --- a/kernel/time/clocksource.c
@@ -1128403,6 +1133357,545 @@
   * clocksource_get_next - Returns the selected clocksource
   *
   */
+diff --git a/kernel/time/ntp.c b/kernel/time/ntp.c
+index 5fd9b94..5125ddd 100644
+--- a/kernel/time/ntp.c
++++ b/kernel/time/ntp.c
+@@ -15,7 +15,8 @@
+ #include <linux/jiffies.h>
+ #include <linux/hrtimer.h>
+ #include <linux/capability.h>
+-#include <asm/div64.h>
++#include <linux/math64.h>
++#include <linux/clocksource.h>
+ #include <asm/timex.h>
+ 
+ /*
+@@ -23,11 +24,14 @@
+  */
+ unsigned long tick_usec = TICK_USEC; 		/* USER_HZ period (usec) */
+ unsigned long tick_nsec;			/* ACTHZ period (nsec) */
+-static u64 tick_length, tick_length_base;
++u64 tick_length;
++static u64 tick_length_base;
++
++static struct hrtimer leap_timer;
+ 
+ #define MAX_TICKADJ		500		/* microsecs */
+ #define MAX_TICKADJ_SCALED	(((u64)(MAX_TICKADJ * NSEC_PER_USEC) << \
+-				  TICK_LENGTH_SHIFT) / NTP_INTERVAL_FREQ)
++				  NTP_SCALE_SHIFT) / NTP_INTERVAL_FREQ)
+ 
+ /*
+  * phase-lock loop variables
+@@ -35,11 +39,12 @@ static u64 tick_length, tick_length_base;
+ /* TIME_ERROR prevents overwriting the CMOS clock */
+ static int time_state = TIME_OK;	/* clock synchronization status	*/
+ int time_status = STA_UNSYNC;		/* clock status bits		*/
+-static s64 time_offset;		/* time adjustment (ns)		*/
++static long time_tai;			/* TAI offset (s)		*/
++static s64 time_offset;			/* time adjustment (ns)		*/
+ static long time_constant = 2;		/* pll time constant		*/
+ long time_maxerror = NTP_PHASE_LIMIT;	/* maximum error (us)		*/
+ long time_esterror = NTP_PHASE_LIMIT;	/* estimated error (us)		*/
+-long time_freq;				/* frequency offset (scaled ppm)*/
++static s64 time_freq;			/* frequency offset (scaled ns/s)*/
+ static long time_reftime;		/* time at last adjustment (s)	*/
+ long time_adjust;
+ static long ntp_tick_adj;
+@@ -47,16 +52,56 @@ static long ntp_tick_adj;
+ static void ntp_update_frequency(void)
+ {
+ 	u64 second_length = (u64)(tick_usec * NSEC_PER_USEC * USER_HZ)
+-				<< TICK_LENGTH_SHIFT;
+-	second_length += (s64)ntp_tick_adj << TICK_LENGTH_SHIFT;
+-	second_length += (s64)time_freq << (TICK_LENGTH_SHIFT - SHIFT_NSEC);
++				<< NTP_SCALE_SHIFT;
++	second_length += (s64)ntp_tick_adj << NTP_SCALE_SHIFT;
++	second_length += time_freq;
+ 
+ 	tick_length_base = second_length;
+ 
+-	do_div(second_length, HZ);
+-	tick_nsec = second_length >> TICK_LENGTH_SHIFT;
++	tick_nsec = div_u64(second_length, HZ) >> NTP_SCALE_SHIFT;
++	tick_length_base = div_u64(tick_length_base, NTP_INTERVAL_FREQ);
++}
++
++static void ntp_update_offset(long offset)
++{
++	long mtemp;
++	s64 freq_adj;
++
++	if (!(time_status & STA_PLL))
++		return;
+ 
+-	do_div(tick_length_base, NTP_INTERVAL_FREQ);
++	if (!(time_status & STA_NANO))
++		offset *= NSEC_PER_USEC;
++
++	/*
++	 * Scale the phase adjustment and
++	 * clamp to the operating range.
++	 */
++	offset = min(offset, MAXPHASE);
++	offset = max(offset, -MAXPHASE);
++
++	/*
++	 * Select how the frequency is to be controlled
++	 * and in which mode (PLL or FLL).
++	 */
++	if (time_status & STA_FREQHOLD || time_reftime == 0)
++		time_reftime = xtime.tv_sec;
++	mtemp = xtime.tv_sec - time_reftime;
++	time_reftime = xtime.tv_sec;
++
++	freq_adj = (s64)offset * mtemp;
++	freq_adj <<= NTP_SCALE_SHIFT - 2 * (SHIFT_PLL + 2 + time_constant);
++	time_status &= ~STA_MODE;
++	if (mtemp >= MINSEC && (time_status & STA_FLL || mtemp > MAXSEC)) {
++		freq_adj += div_s64((s64)offset << (NTP_SCALE_SHIFT - SHIFT_FLL),
++				    mtemp);
++		time_status |= STA_MODE;
++	}
++	freq_adj += time_freq;
++	freq_adj = min(freq_adj, MAXFREQ_SCALED);
++	time_freq = max(freq_adj, -MAXFREQ_SCALED);
++
++	time_offset = div_s64((s64)offset << NTP_SCALE_SHIFT, NTP_INTERVAL_FREQ);
+ }
+ 
+ /**
+@@ -78,62 +123,70 @@ void ntp_clear(void)
+ }
+ 
+ /*
+- * this routine handles the overflow of the microsecond field
+- *
+- * The tricky bits of code to handle the accurate clock support
+- * were provided by Dave Mills (Mills at UDEL.EDU) of NTP fame.
+- * They were originally developed for SUN and DEC kernels.
+- * All the kudos should go to Dave for this stuff.
++ * Leap second processing. If in leap-insert state at the end of the
++ * day, the system clock is set back one second; if in leap-delete
++ * state, the system clock is set ahead one second.
+  */
+-void second_overflow(void)
++static enum hrtimer_restart ntp_leap_second(struct hrtimer *timer)
+ {
+-	long time_adj;
++	enum hrtimer_restart res = HRTIMER_NORESTART;
+ 
+-	/* Bump the maxerror field */
+-	time_maxerror += MAXFREQ >> SHIFT_USEC;
+-	if (time_maxerror > NTP_PHASE_LIMIT) {
+-		time_maxerror = NTP_PHASE_LIMIT;
+-		time_status |= STA_UNSYNC;
+-	}
++	write_seqlock_irq(&xtime_lock);
+ 
+-	/*
+-	 * Leap second processing. If in leap-insert state at the end of the
+-	 * day, the system clock is set back one second; if in leap-delete
+-	 * state, the system clock is set ahead one second. The microtime()
+-	 * routine or external clock driver will insure that reported time is
+-	 * always monotonic. The ugly divides should be replaced.
+-	 */
+ 	switch (time_state) {
+ 	case TIME_OK:
+-		if (time_status & STA_INS)
+-			time_state = TIME_INS;
+-		else if (time_status & STA_DEL)
+-			time_state = TIME_DEL;
+ 		break;
+ 	case TIME_INS:
+-		if (xtime.tv_sec % 86400 == 0) {
+-			xtime.tv_sec--;
+-			wall_to_monotonic.tv_sec++;
+-			time_state = TIME_OOP;
+-			printk(KERN_NOTICE "Clock: inserting leap second "
+-					"23:59:60 UTC\n");
+-		}
++		xtime.tv_sec--;
++		wall_to_monotonic.tv_sec++;
++		time_state = TIME_OOP;
++		printk(KERN_NOTICE "Clock: "
++		       "inserting leap second 23:59:60 UTC\n");
++		leap_timer.expires = ktime_add_ns(leap_timer.expires,
++						  NSEC_PER_SEC);
++		res = HRTIMER_RESTART;
+ 		break;
+ 	case TIME_DEL:
+-		if ((xtime.tv_sec + 1) % 86400 == 0) {
+-			xtime.tv_sec++;
+-			wall_to_monotonic.tv_sec--;
+-			time_state = TIME_WAIT;
+-			printk(KERN_NOTICE "Clock: deleting leap second "
+-					"23:59:59 UTC\n");
+-		}
++		xtime.tv_sec++;
++		time_tai--;
++		wall_to_monotonic.tv_sec--;
++		time_state = TIME_WAIT;
++		printk(KERN_NOTICE "Clock: "
++		       "deleting leap second 23:59:59 UTC\n");
+ 		break;
+ 	case TIME_OOP:
++		time_tai++;
+ 		time_state = TIME_WAIT;
+-		break;
++		/* fall through */
+ 	case TIME_WAIT:
+ 		if (!(time_status & (STA_INS | STA_DEL)))
+-		time_state = TIME_OK;
++			time_state = TIME_OK;
++		break;
++	}
++	update_vsyscall(&xtime, clock);
++
++	write_sequnlock_irq(&xtime_lock);
++
++	return res;
++}
++
++/*
++ * this routine handles the overflow of the microsecond field
++ *
++ * The tricky bits of code to handle the accurate clock support
++ * were provided by Dave Mills (Mills at UDEL.EDU) of NTP fame.
++ * They were originally developed for SUN and DEC kernels.
++ * All the kudos should go to Dave for this stuff.
++ */
++void second_overflow(void)
++{
++	s64 time_adj;
++
++	/* Bump the maxerror field */
++	time_maxerror += MAXFREQ / NSEC_PER_USEC;
++	if (time_maxerror > NTP_PHASE_LIMIT) {
++		time_maxerror = NTP_PHASE_LIMIT;
++		time_status |= STA_UNSYNC;
+ 	}
+ 
+ 	/*
+@@ -143,7 +196,7 @@ void second_overflow(void)
+ 	tick_length = tick_length_base;
+ 	time_adj = shift_right(time_offset, SHIFT_PLL + time_constant);
+ 	time_offset -= time_adj;
+-	tick_length += (s64)time_adj << (TICK_LENGTH_SHIFT - SHIFT_UPDATE);
++	tick_length += time_adj;
+ 
+ 	if (unlikely(time_adjust)) {
+ 		if (time_adjust > MAX_TICKADJ) {
+@@ -154,25 +207,12 @@ void second_overflow(void)
+ 			tick_length -= MAX_TICKADJ_SCALED;
+ 		} else {
+ 			tick_length += (s64)(time_adjust * NSEC_PER_USEC /
+-					NTP_INTERVAL_FREQ) << TICK_LENGTH_SHIFT;
++					NTP_INTERVAL_FREQ) << NTP_SCALE_SHIFT;
+ 			time_adjust = 0;
+ 		}
+ 	}
+ }
+ 
+-/*
+- * Return how long ticks are at the moment, that is, how much time
+- * update_wall_time_one_tick will add to xtime next time we call it
+- * (assuming no calls to do_adjtimex in the meantime).
+- * The return value is in fixed-point nanoseconds shifted by the
+- * specified number of bits to the right of the binary point.
+- * This function has no side-effects.
+- */
+-u64 current_tick_length(void)
+-{
+-	return tick_length;
+-}
+-
+ #ifdef CONFIG_GENERIC_CMOS_UPDATE
+ 
+ /* Disable the cmos update - used by virtualization and embedded */
+@@ -236,8 +276,8 @@ static inline void notify_cmos_timer(void) { }
+  */
+ int do_adjtimex(struct timex *txc)
+ {
+-	long mtemp, save_adjust, rem;
+-	s64 freq_adj, temp64;
++	struct timespec ts;
++	long save_adjust, sec;
+ 	int result;
+ 
+ 	/* In order to modify anything, you gotta be super-user! */
+@@ -247,147 +287,132 @@ int do_adjtimex(struct timex *txc)
+ 	/* Now we validate the data before disabling interrupts */
+ 
+ 	if ((txc->modes & ADJ_OFFSET_SINGLESHOT) == ADJ_OFFSET_SINGLESHOT) {
+-	  /* singleshot must not be used with any other mode bits */
+-		if (txc->modes != ADJ_OFFSET_SINGLESHOT &&
+-					txc->modes != ADJ_OFFSET_SS_READ)
++		/* singleshot must not be used with any other mode bits */
++		if (txc->modes & ~ADJ_OFFSET_SS_READ)
+ 			return -EINVAL;
+ 	}
+ 
+-	if (txc->modes != ADJ_OFFSET_SINGLESHOT && (txc->modes & ADJ_OFFSET))
+-	  /* adjustment Offset limited to +- .512 seconds */
+-		if (txc->offset <= - MAXPHASE || txc->offset >= MAXPHASE )
+-			return -EINVAL;
+-
+ 	/* if the quartz is off by more than 10% something is VERY wrong ! */
+ 	if (txc->modes & ADJ_TICK)
+ 		if (txc->tick <  900000/USER_HZ ||
+ 		    txc->tick > 1100000/USER_HZ)
+ 			return -EINVAL;
+ 
++	if (time_state != TIME_OK && txc->modes & ADJ_STATUS)
++		hrtimer_cancel(&leap_timer);
++	getnstimeofday(&ts);
++
+ 	write_seqlock_irq(&xtime_lock);
+-	result = time_state;	/* mostly `TIME_OK' */
+ 
+ 	/* Save for later - semantics of adjtime is to return old value */
+ 	save_adjust = time_adjust;
+ 
+-#if 0	/* STA_CLOCKERR is never set yet */
+-	time_status &= ~STA_CLOCKERR;		/* reset STA_CLOCKERR */
+-#endif
+ 	/* If there are input parameters, then process them */
+-	if (txc->modes)
+-	{
+-	    if (txc->modes & ADJ_STATUS)	/* only set allowed bits */
+-		time_status =  (txc->status & ~STA_RONLY) |
+-			      (time_status & STA_RONLY);
+-
+-	    if (txc->modes & ADJ_FREQUENCY) {	/* p. 22 */
+-		if (txc->freq > MAXFREQ || txc->freq < -MAXFREQ) {
+-		    result = -EINVAL;
+-		    goto leave;
+-		}
+-		time_freq = ((s64)txc->freq * NSEC_PER_USEC)
+-				>> (SHIFT_USEC - SHIFT_NSEC);
+-	    }
+-
+-	    if (txc->modes & ADJ_MAXERROR) {
+-		if (txc->maxerror < 0 || txc->maxerror >= NTP_PHASE_LIMIT) {
+-		    result = -EINVAL;
+-		    goto leave;
++	if (txc->modes) {
++		if (txc->modes & ADJ_STATUS) {
++			if ((time_status & STA_PLL) &&
++			    !(txc->status & STA_PLL)) {
++				time_state = TIME_OK;
++				time_status = STA_UNSYNC;
++			}
++			/* only set allowed bits */
++			time_status &= STA_RONLY;
++			time_status |= txc->status & ~STA_RONLY;
++
++			switch (time_state) {
++			case TIME_OK:
++			start_timer:
++				sec = ts.tv_sec;
++				if (time_status & STA_INS) {
++					time_state = TIME_INS;
++					sec += 86400 - sec % 86400;
++					hrtimer_start(&leap_timer, ktime_set(sec, 0), HRTIMER_MODE_ABS);
++				} else if (time_status & STA_DEL) {
++					time_state = TIME_DEL;
++					sec += 86400 - (sec + 1) % 86400;
++					hrtimer_start(&leap_timer, ktime_set(sec, 0), HRTIMER_MODE_ABS);
++				}
++				break;
++			case TIME_INS:
++			case TIME_DEL:
++				time_state = TIME_OK;
++				goto start_timer;
++				break;
++			case TIME_WAIT:
++				if (!(time_status & (STA_INS | STA_DEL)))
++					time_state = TIME_OK;
++				break;
++			case TIME_OOP:
++				hrtimer_restart(&leap_timer);
++				break;
++			}
+ 		}
+-		time_maxerror = txc->maxerror;
+-	    }
+ 
+-	    if (txc->modes & ADJ_ESTERROR) {
+-		if (txc->esterror < 0 || txc->esterror >= NTP_PHASE_LIMIT) {
+-		    result = -EINVAL;
+-		    goto leave;
++		if (txc->modes & ADJ_NANO)
++			time_status |= STA_NANO;
++		if (txc->modes & ADJ_MICRO)
++			time_status &= ~STA_NANO;
++
++		if (txc->modes & ADJ_FREQUENCY) {
++			time_freq = (s64)txc->freq * PPM_SCALE;
++			time_freq = min(time_freq, MAXFREQ_SCALED);
++			time_freq = max(time_freq, -MAXFREQ_SCALED);
+ 		}
+-		time_esterror = txc->esterror;
+-	    }
+ 
+-	    if (txc->modes & ADJ_TIMECONST) {	/* p. 24 */
+-		if (txc->constant < 0) {	/* NTP v4 uses values > 6 */
+-		    result = -EINVAL;
+-		    goto leave;
++		if (txc->modes & ADJ_MAXERROR)
++			time_maxerror = txc->maxerror;
++		if (txc->modes & ADJ_ESTERROR)
++			time_esterror = txc->esterror;
++
++		if (txc->modes & ADJ_TIMECONST) {
++			time_constant = txc->constant;
++			if (!(time_status & STA_NANO))
++				time_constant += 4;
++			time_constant = min(time_constant, (long)MAXTC);
++			time_constant = max(time_constant, 0l);
+ 		}
+-		time_constant = min(txc->constant + 4, (long)MAXTC);
+-	    }
+ 
+-	    if (txc->modes & ADJ_OFFSET) {	/* values checked earlier */
+-		if (txc->modes == ADJ_OFFSET_SINGLESHOT) {
+-		    /* adjtime() is independent from ntp_adjtime() */
+-		    time_adjust = txc->offset;
++		if (txc->modes & ADJ_TAI && txc->constant > 0)
++			time_tai = txc->constant;
++
++		if (txc->modes & ADJ_OFFSET) {
++			if (txc->modes == ADJ_OFFSET_SINGLESHOT)
++				/* adjtime() is independent from ntp_adjtime() */
++				time_adjust = txc->offset;
++			else
++				ntp_update_offset(txc->offset);
+ 		}
+-		else if (time_status & STA_PLL) {
+-		    time_offset = txc->offset * NSEC_PER_USEC;
+-
+-		    /*
+-		     * Scale the phase adjustment and
+-		     * clamp to the operating range.
+-		     */
+-		    time_offset = min(time_offset, (s64)MAXPHASE * NSEC_PER_USEC);
+-		    time_offset = max(time_offset, (s64)-MAXPHASE * NSEC_PER_USEC);
+-
+-		    /*
+-		     * Select whether the frequency is to be controlled
+-		     * and in which mode (PLL or FLL). Clamp to the operating
+-		     * range. Ugly multiply/divide should be replaced someday.
+-		     */
+-
+-		    if (time_status & STA_FREQHOLD || time_reftime == 0)
+-		        time_reftime = xtime.tv_sec;
+-		    mtemp = xtime.tv_sec - time_reftime;
+-		    time_reftime = xtime.tv_sec;
+-
+-		    freq_adj = time_offset * mtemp;
+-		    freq_adj = shift_right(freq_adj, time_constant * 2 +
+-					   (SHIFT_PLL + 2) * 2 - SHIFT_NSEC);
+-		    if (mtemp >= MINSEC && (time_status & STA_FLL || mtemp > MAXSEC)) {
+-			u64 utemp64;
+-			temp64 = time_offset << (SHIFT_NSEC - SHIFT_FLL);
+-			if (time_offset < 0) {
+-			    utemp64 = -temp64;
+-			    do_div(utemp64, mtemp);
+-			    freq_adj -= utemp64;
+-			} else {
+-			    utemp64 = temp64;
+-			    do_div(utemp64, mtemp);
+-			    freq_adj += utemp64;
+-			}
+-		    }
+-		    freq_adj += time_freq;
+-		    freq_adj = min(freq_adj, (s64)MAXFREQ_NSEC);
+-		    time_freq = max(freq_adj, (s64)-MAXFREQ_NSEC);
+-		    time_offset = div_long_long_rem_signed(time_offset,
+-							   NTP_INTERVAL_FREQ,
+-							   &rem);
+-		    time_offset <<= SHIFT_UPDATE;
+-		} /* STA_PLL */
+-	    } /* txc->modes & ADJ_OFFSET */
+-	    if (txc->modes & ADJ_TICK)
+-		tick_usec = txc->tick;
+-
+-	    if (txc->modes & (ADJ_TICK|ADJ_FREQUENCY|ADJ_OFFSET))
+-		    ntp_update_frequency();
+-	} /* txc->modes */
+-leave:	if ((time_status & (STA_UNSYNC|STA_CLOCKERR)) != 0)
++		if (txc->modes & ADJ_TICK)
++			tick_usec = txc->tick;
++
++		if (txc->modes & (ADJ_TICK|ADJ_FREQUENCY|ADJ_OFFSET))
++			ntp_update_frequency();
++	}
++
++	result = time_state;	/* mostly `TIME_OK' */
++	if (time_status & (STA_UNSYNC|STA_CLOCKERR))
+ 		result = TIME_ERROR;
+ 
+ 	if ((txc->modes == ADJ_OFFSET_SINGLESHOT) ||
+-			(txc->modes == ADJ_OFFSET_SS_READ))
++	    (txc->modes == ADJ_OFFSET_SS_READ))
+ 		txc->offset = save_adjust;
+-	else
+-		txc->offset = ((long)shift_right(time_offset, SHIFT_UPDATE)) *
+-	    			NTP_INTERVAL_FREQ / 1000;
+-	txc->freq	   = (time_freq / NSEC_PER_USEC) <<
+-				(SHIFT_USEC - SHIFT_NSEC);
++	else {
++		txc->offset = shift_right(time_offset * NTP_INTERVAL_FREQ,
++					  NTP_SCALE_SHIFT);
++		if (!(time_status & STA_NANO))
++			txc->offset /= NSEC_PER_USEC;
++	}
++	txc->freq	   = shift_right((s32)(time_freq >> PPM_SCALE_INV_SHIFT) *
++					 (s64)PPM_SCALE_INV,
++					 NTP_SCALE_SHIFT);
+ 	txc->maxerror	   = time_maxerror;
+ 	txc->esterror	   = time_esterror;
+ 	txc->status	   = time_status;
+ 	txc->constant	   = time_constant;
+ 	txc->precision	   = 1;
+-	txc->tolerance	   = MAXFREQ;
++	txc->tolerance	   = MAXFREQ_SCALED / PPM_SCALE;
+ 	txc->tick	   = tick_usec;
++	txc->tai	   = time_tai;
+ 
+ 	/* PPS is not implemented, so these are zero */
+ 	txc->ppsfreq	   = 0;
+@@ -399,9 +424,15 @@ leave:	if ((time_status & (STA_UNSYNC|STA_CLOCKERR)) != 0)
+ 	txc->errcnt	   = 0;
+ 	txc->stbcnt	   = 0;
+ 	write_sequnlock_irq(&xtime_lock);
+-	do_gettimeofday(&txc->time);
++
++	txc->time.tv_sec = ts.tv_sec;
++	txc->time.tv_usec = ts.tv_nsec;
++	if (!(time_status & STA_NANO))
++		txc->time.tv_usec /= NSEC_PER_USEC;
++
+ 	notify_cmos_timer();
+-	return(result);
++
++	return result;
+ }
+ 
+ static int __init ntp_tick_adj_setup(char *str)
+@@ -411,3 +442,10 @@ static int __init ntp_tick_adj_setup(char *str)
+ }
+ 
+ __setup("ntp_tick_adj=", ntp_tick_adj_setup);
++
++void __init ntp_init(void)
++{
++	ntp_clear();
++	hrtimer_init(&leap_timer, CLOCK_REALTIME, HRTIMER_MODE_ABS);
++	leap_timer.function = ntp_leap_second;
++}
 diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
 index e1bd50c..57a1f02 100644
 --- a/kernel/time/tick-broadcast.c
@@ -1128519,9 +1134012,18 @@
  	 * Cancel the scheduled timer and restore the tick
  	 */
 diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
-index a3fa587..2d6087c 100644
+index a3fa587..e91c29f 100644
 --- a/kernel/time/timekeeping.c
 +++ b/kernel/time/timekeeping.c
+@@ -53,7 +53,7 @@ void update_xtime_cache(u64 nsec)
+ 	timespec_add_ns(&xtime_cache, nsec);
+ }
+ 
+-static struct clocksource *clock; /* pointer to current clocksource */
++struct clocksource *clock;
+ 
+ 
+ #ifdef CONFIG_GENERIC_TIME
 @@ -178,6 +178,7 @@ static void change_clocksource(void)
  	if (clock == new)
  		return;
@@ -1128530,6 +1134032,15 @@
  	now = clocksource_read(new);
  	nsec =  __get_nsec_offset();
  	timespec_add_ns(&xtime, nsec);
+@@ -245,7 +246,7 @@ void __init timekeeping_init(void)
+ 
+ 	write_seqlock_irqsave(&xtime_lock, flags);
+ 
+-	ntp_clear();
++	ntp_init();
+ 
+ 	clock = clocksource_get_next();
+ 	clocksource_calculate_interval(clock, NTP_INTERVAL_LENGTH);
 @@ -295,6 +296,7 @@ static int timekeeping_resume(struct sys_device *dev)
  	timespec_add_ns(&xtime, timekeeping_suspend_nsecs);
  	update_xtime_cache(0);
@@ -1128538,6 +1134049,54 @@
  	clock->cycle_last = clocksource_read(clock);
  	clock->error = 0;
  	timekeeping_suspended = 0;
+@@ -369,7 +371,7 @@ static __always_inline int clocksource_bigadjust(s64 error, s64 *interval,
+ 	 * here.  This is tuned so that an error of about 1 msec is adjusted
+ 	 * within about 1 sec (or 2^20 nsec in 2^SHIFT_HZ ticks).
+ 	 */
+-	error2 = clock->error >> (TICK_LENGTH_SHIFT + 22 - 2 * SHIFT_HZ);
++	error2 = clock->error >> (NTP_SCALE_SHIFT + 22 - 2 * SHIFT_HZ);
+ 	error2 = abs(error2);
+ 	for (look_ahead = 0; error2 > 0; look_ahead++)
+ 		error2 >>= 2;
+@@ -378,8 +380,7 @@ static __always_inline int clocksource_bigadjust(s64 error, s64 *interval,
+ 	 * Now calculate the error in (1 << look_ahead) ticks, but first
+ 	 * remove the single look ahead already included in the error.
+ 	 */
+-	tick_error = current_tick_length() >>
+-		(TICK_LENGTH_SHIFT - clock->shift + 1);
++	tick_error = tick_length >> (NTP_SCALE_SHIFT - clock->shift + 1);
+ 	tick_error -= clock->xtime_interval >> 1;
+ 	error = ((error - tick_error) >> look_ahead) + tick_error;
+ 
+@@ -410,7 +411,7 @@ static void clocksource_adjust(s64 offset)
+ 	s64 error, interval = clock->cycle_interval;
+ 	int adj;
+ 
+-	error = clock->error >> (TICK_LENGTH_SHIFT - clock->shift - 1);
++	error = clock->error >> (NTP_SCALE_SHIFT - clock->shift - 1);
+ 	if (error > interval) {
+ 		error >>= 2;
+ 		if (likely(error <= interval))
+@@ -432,7 +433,7 @@ static void clocksource_adjust(s64 offset)
+ 	clock->xtime_interval += interval;
+ 	clock->xtime_nsec -= offset;
+ 	clock->error -= (interval - offset) <<
+-			(TICK_LENGTH_SHIFT - clock->shift);
++			(NTP_SCALE_SHIFT - clock->shift);
+ }
+ 
+ /**
+@@ -471,8 +472,8 @@ void update_wall_time(void)
+ 		}
+ 
+ 		/* accumulate error between NTP and clock interval */
+-		clock->error += current_tick_length();
+-		clock->error -= clock->xtime_interval << (TICK_LENGTH_SHIFT - clock->shift);
++		clock->error += tick_length;
++		clock->error -= clock->xtime_interval << (NTP_SCALE_SHIFT - clock->shift);
+ 	}
+ 
+ 	/* correct the clock when NTP error is too big */
 diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c
 index 67fe8fc..a40e20f 100644
 --- a/kernel/time/timer_list.c
@@ -1128969,7 +1134528,7 @@
  /*
   * Clone a new ns copying an original utsname, setting refcount to 1
 diff --git a/kernel/workqueue.c b/kernel/workqueue.c
-index ff06611..721093a 100644
+index ff06611..29fc39f 100644
 --- a/kernel/workqueue.c
 +++ b/kernel/workqueue.c
 @@ -158,8 +158,8 @@ static void __queue_work(struct cpu_workqueue_struct *cwq,
@@ -1128983,14 +1134542,23 @@
   */
  int queue_work(struct workqueue_struct *wq, struct work_struct *work)
  {
-@@ -219,6 +219,7 @@ int queue_delayed_work_on(int cpu, struct workqueue_struct *wq,
- 	struct timer_list *timer = &dwork->timer;
- 	struct work_struct *work = &dwork->work;
+@@ -195,7 +195,6 @@ static void delayed_work_timer_fn(unsigned long __data)
+ int queue_delayed_work(struct workqueue_struct *wq,
+ 			struct delayed_work *dwork, unsigned long delay)
+ {
+-	timer_stats_timer_set_start_info(&dwork->timer);
+ 	if (delay == 0)
+ 		return queue_work(wq, &dwork->work);
  
-+	timer_stats_timer_set_start_info(&dwork->timer);
- 	if (!test_and_set_bit(WORK_STRUCT_PENDING, work_data_bits(work))) {
+@@ -223,6 +222,8 @@ int queue_delayed_work_on(int cpu, struct workqueue_struct *wq,
  		BUG_ON(timer_pending(timer));
  		BUG_ON(!list_empty(&work->entry));
+ 
++		timer_stats_timer_set_start_info(&dwork->timer);
++
+ 		/* This stores cwq for the moment, for the timer_fn */
+ 		set_wq_data(work, wq_per_cpu(wq, raw_smp_processor_id()));
+ 		timer->expires = jiffies + delay;
 @@ -246,7 +247,7 @@ static void run_workqueue(struct cpu_workqueue_struct *cwq)
  	if (cwq->run_depth > 3) {
  		/* morton gets to eat his hat */
@@ -1129000,15 +1134568,15 @@
  		dump_stack();
  	}
  	while (!list_empty(&cwq->worklist)) {
-@@ -580,6 +581,7 @@ EXPORT_SYMBOL(schedule_delayed_work);
- int schedule_delayed_work_on(int cpu,
- 			struct delayed_work *dwork, unsigned long delay)
+@@ -563,7 +564,6 @@ EXPORT_SYMBOL(schedule_work);
+ int schedule_delayed_work(struct delayed_work *dwork,
+ 					unsigned long delay)
  {
-+	timer_stats_timer_set_start_info(&dwork->timer);
- 	return queue_delayed_work_on(cpu, keventd_wq, dwork, delay);
+-	timer_stats_timer_set_start_info(&dwork->timer);
+ 	return queue_delayed_work(keventd_wq, dwork, delay);
  }
- EXPORT_SYMBOL(schedule_delayed_work_on);
-@@ -770,7 +772,7 @@ struct workqueue_struct *__create_workqueue_key(const char *name,
+ EXPORT_SYMBOL(schedule_delayed_work);
+@@ -770,7 +770,7 @@ struct workqueue_struct *__create_workqueue_key(const char *name,
  }
  EXPORT_SYMBOL_GPL(__create_workqueue_key);
  
@@ -1129017,7 +1134585,7 @@
  {
  	/*
  	 * Our caller is either destroy_workqueue() or CPU_DEAD,
-@@ -806,19 +808,16 @@ static void cleanup_workqueue_thread(struct cpu_workqueue_struct *cwq, int cpu)
+@@ -806,19 +806,16 @@ static void cleanup_workqueue_thread(struct cpu_workqueue_struct *cwq, int cpu)
  void destroy_workqueue(struct workqueue_struct *wq)
  {
  	const cpumask_t *cpu_map = wq_cpu_map(wq);
@@ -1129040,7 +1134608,7 @@
  
  	free_percpu(wq->cpu_wq);
  	kfree(wq);
-@@ -836,7 +835,6 @@ static int __devinit workqueue_cpu_callback(struct notifier_block *nfb,
+@@ -836,7 +833,6 @@ static int __devinit workqueue_cpu_callback(struct notifier_block *nfb,
  	action &= ~CPU_TASKS_FROZEN;
  
  	switch (action) {
@@ -1129048,7 +1134616,7 @@
  	case CPU_UP_PREPARE:
  		cpu_set(cpu, cpu_populated_map);
  	}
-@@ -859,11 +857,17 @@ static int __devinit workqueue_cpu_callback(struct notifier_block *nfb,
+@@ -859,11 +855,17 @@ static int __devinit workqueue_cpu_callback(struct notifier_block *nfb,
  		case CPU_UP_CANCELED:
  			start_workqueue_thread(cwq, -1);
  		case CPU_DEAD:
@@ -1130442,6 +1136010,69 @@
  				   unsigned long size)
  {
  	void __iomem **ptr, *addr;
+diff --git a/lib/div64.c b/lib/div64.c
+index b71cf93..bb5bd0c 100644
+--- a/lib/div64.c
++++ b/lib/div64.c
+@@ -16,9 +16,8 @@
+  * assembly versions such as arch/ppc/lib/div64.S and arch/sh/lib/div64.S.
+  */
+ 
+-#include <linux/types.h>
+ #include <linux/module.h>
+-#include <asm/div64.h>
++#include <linux/math64.h>
+ 
+ /* Not needed on 64bit architectures */
+ #if BITS_PER_LONG == 32
+@@ -58,10 +57,31 @@ uint32_t __attribute__((weak)) __div64_32(uint64_t *n, uint32_t base)
+ 
+ EXPORT_SYMBOL(__div64_32);
+ 
++#ifndef div_s64_rem
++s64 div_s64_rem(s64 dividend, s32 divisor, s32 *remainder)
++{
++	u64 quotient;
++
++	if (dividend < 0) {
++		quotient = div_u64_rem(-dividend, abs(divisor), (u32 *)remainder);
++		*remainder = -*remainder;
++		if (divisor > 0)
++			quotient = -quotient;
++	} else {
++		quotient = div_u64_rem(dividend, abs(divisor), (u32 *)remainder);
++		if (divisor < 0)
++			quotient = -quotient;
++	}
++	return quotient;
++}
++EXPORT_SYMBOL(div_s64_rem);
++#endif
++
+ /* 64bit divisor, dividend and result. dynamic precision */
+-uint64_t div64_64(uint64_t dividend, uint64_t divisor)
++#ifndef div64_u64
++u64 div64_u64(u64 dividend, u64 divisor)
+ {
+-	uint32_t high, d;
++	u32 high, d;
+ 
+ 	high = divisor >> 32;
+ 	if (high) {
+@@ -72,10 +92,9 @@ uint64_t div64_64(uint64_t dividend, uint64_t divisor)
+ 	} else
+ 		d = divisor;
+ 
+-	do_div(dividend, d);
+-
+-	return dividend;
++	return div_u64(dividend, d);
+ }
+-EXPORT_SYMBOL(div64_64);
++EXPORT_SYMBOL(div64_u64);
++#endif
+ 
+ #endif /* BITS_PER_LONG == 32 */
 diff --git a/lib/find_next_bit.c b/lib/find_next_bit.c
 index 78ccd73..24c59de 100644
 --- a/lib/find_next_bit.c
@@ -1130547,9 +1136178,19 @@
  #ifdef __BIG_ENDIAN
  
 diff --git a/lib/idr.c b/lib/idr.c
-index afbb0b1..8368c81 100644
+index afbb0b1..7a02e17 100644
 --- a/lib/idr.c
 +++ b/lib/idr.c
+@@ -385,8 +385,8 @@ void idr_remove(struct idr *idp, int id)
+ 	while (idp->id_free_cnt >= IDR_FREE_MAX) {
+ 		p = alloc_layer(idp);
+ 		kmem_cache_free(idr_layer_cache, p);
+-		return;
+ 	}
++	return;
+ }
+ EXPORT_SYMBOL(idr_remove);
+ 
 @@ -585,12 +585,11 @@ static void idr_cache_ctor(struct kmem_cache *idr_layer_cache, void *idr_layer)
  	memset(idr_layer, 0, sizeof(struct idr_layer));
  }
@@ -1132287,6 +1137928,44 @@
 -	spin_unlock_irqrestore(&sem->wait.lock, flags);
 -	return 1;
 -}
+diff --git a/lib/string.c b/lib/string.c
+index 5efafed..b19b87a 100644
+--- a/lib/string.c
++++ b/lib/string.c
+@@ -493,6 +493,33 @@ char *strsep(char **s, const char *ct)
+ EXPORT_SYMBOL(strsep);
+ #endif
+ 
++/**
++ * sysfs_streq - return true if strings are equal, modulo trailing newline
++ * @s1: one string
++ * @s2: another string
++ *
++ * This routine returns true iff two strings are equal, treating both
++ * NUL and newline-then-NUL as equivalent string terminations.  It's
++ * geared for use with sysfs input strings, which generally terminate
++ * with newlines but are compared against values without newlines.
++ */
++bool sysfs_streq(const char *s1, const char *s2)
++{
++	while (*s1 && *s1 == *s2) {
++		s1++;
++		s2++;
++	}
++
++	if (*s1 == *s2)
++		return true;
++	if (!*s1 && *s2 == '\n' && !s2[1])
++		return true;
++	if (*s1 == '\n' && !s1[1] && !*s2)
++		return true;
++	return false;
++}
++EXPORT_SYMBOL(sysfs_streq);
++
+ #ifndef __HAVE_ARCH_MEMSET
+ /**
+  * memset - Fill a region of memory with the given value
 diff --git a/lib/swiotlb.c b/lib/swiotlb.c
 index 0259228..d568894 100644
 --- a/lib/swiotlb.c
@@ -1133958,7 +1139637,7 @@
  		return 0;
  	}
 diff --git a/mm/memcontrol.c b/mm/memcontrol.c
-index 2e0bfc9..33add96 100644
+index 2e0bfc9..e46451e 100644
 --- a/mm/memcontrol.c
 +++ b/mm/memcontrol.c
 @@ -26,15 +26,18 @@
@@ -1133980,7 +1139659,30 @@
  
  /*
   * Statistics for memory cgroup.
-@@ -236,26 +239,12 @@ static struct mem_cgroup *mem_cgroup_from_cont(struct cgroup *cont)
+@@ -45,6 +48,8 @@ enum mem_cgroup_stat_index {
+ 	 */
+ 	MEM_CGROUP_STAT_CACHE, 	   /* # of pages charged as cache */
+ 	MEM_CGROUP_STAT_RSS,	   /* # of pages charged as rss */
++	MEM_CGROUP_STAT_PGPGIN_COUNT,	/* # of pages paged in */
++	MEM_CGROUP_STAT_PGPGOUT_COUNT,	/* # of pages paged out */
+ 
+ 	MEM_CGROUP_STAT_NSTATS,
+ };
+@@ -196,6 +201,13 @@ static void mem_cgroup_charge_statistics(struct mem_cgroup *mem, int flags,
+ 		__mem_cgroup_stat_add_safe(stat, MEM_CGROUP_STAT_CACHE, val);
+ 	else
+ 		__mem_cgroup_stat_add_safe(stat, MEM_CGROUP_STAT_RSS, val);
++
++	if (charge)
++		__mem_cgroup_stat_add_safe(stat,
++				MEM_CGROUP_STAT_PGPGIN_COUNT, 1);
++	else
++		__mem_cgroup_stat_add_safe(stat,
++				MEM_CGROUP_STAT_PGPGOUT_COUNT, 1);
+ }
+ 
+ static struct mem_cgroup_per_zone *
+@@ -236,26 +248,12 @@ static struct mem_cgroup *mem_cgroup_from_cont(struct cgroup *cont)
  				css);
  }
  
@@ -1134008,7 +1139710,7 @@
  static inline int page_cgroup_locked(struct page *page)
  {
  	return bit_spin_is_locked(PAGE_CGROUP_LOCK_BIT, &page->page_cgroup);
-@@ -287,10 +276,10 @@ static void unlock_page_cgroup(struct page *page)
+@@ -287,10 +285,10 @@ static void unlock_page_cgroup(struct page *page)
  	bit_spin_unlock(PAGE_CGROUP_LOCK_BIT, &page->page_cgroup);
  }
  
@@ -1134021,7 +1139723,7 @@
  
  	if (from)
  		MEM_CGROUP_ZSTAT(mz, MEM_CGROUP_ZSTAT_ACTIVE) -= 1;
-@@ -301,10 +290,10 @@ static void __mem_cgroup_remove_list(struct page_cgroup *pc)
+@@ -301,10 +299,10 @@ static void __mem_cgroup_remove_list(struct page_cgroup *pc)
  	list_del_init(&pc->lru);
  }
  
@@ -1134034,7 +1139736,7 @@
  
  	if (!to) {
  		MEM_CGROUP_ZSTAT(mz, MEM_CGROUP_ZSTAT_INACTIVE) += 1;
-@@ -476,6 +465,7 @@ unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan,
+@@ -476,6 +474,7 @@ unsigned long mem_cgroup_isolate_pages(unsigned long nr_to_scan,
  	int zid = zone_idx(z);
  	struct mem_cgroup_per_zone *mz;
  
@@ -1134042,7 +1139744,7 @@
  	mz = mem_cgroup_zoneinfo(mem_cont, nid, zid);
  	if (active)
  		src = &mz->active_list;
-@@ -560,7 +550,7 @@ retry:
+@@ -560,7 +559,7 @@ retry:
  	}
  	unlock_page_cgroup(page);
  
@@ -1134051,7 +1139753,7 @@
  	if (pc == NULL)
  		goto err;
  
-@@ -574,7 +564,7 @@ retry:
+@@ -574,7 +573,7 @@ retry:
  		mm = &init_mm;
  
  	rcu_read_lock();
@@ -1134060,7 +1139762,7 @@
  	/*
  	 * For every charge from the cgroup, increment reference count
  	 */
-@@ -602,7 +592,6 @@ retry:
+@@ -602,7 +601,6 @@ retry:
  			mem_cgroup_out_of_memory(mem, gfp_mask);
  			goto out;
  		}
@@ -1134068,7 +1139770,7 @@
  	}
  
  	pc->ref_cnt = 1;
-@@ -610,7 +599,7 @@ retry:
+@@ -610,7 +608,7 @@ retry:
  	pc->page = page;
  	pc->flags = PAGE_CGROUP_FLAG_ACTIVE;
  	if (ctype == MEM_CGROUP_CHARGE_TYPE_CACHE)
@@ -1134077,7 +1139779,7 @@
  
  	lock_page_cgroup(page);
  	if (page_get_page_cgroup(page)) {
-@@ -622,14 +611,14 @@ retry:
+@@ -622,14 +620,14 @@ retry:
  		 */
  		res_counter_uncharge(&mem->res, PAGE_SIZE);
  		css_put(&mem->css);
@@ -1134094,7 +1139796,7 @@
  	spin_unlock_irqrestore(&mz->lru_lock, flags);
  
  	unlock_page_cgroup(page);
-@@ -637,7 +626,7 @@ done:
+@@ -637,7 +635,7 @@ done:
  	return 0;
  out:
  	css_put(&mem->css);
@@ -1134103,7 +1139805,7 @@
  err:
  	return -ENOMEM;
  }
-@@ -685,7 +674,7 @@ void mem_cgroup_uncharge_page(struct page *page)
+@@ -685,7 +683,7 @@ void mem_cgroup_uncharge_page(struct page *page)
  	if (--(pc->ref_cnt) == 0) {
  		mz = page_cgroup_zoneinfo(pc);
  		spin_lock_irqsave(&mz->lru_lock, flags);
@@ -1134112,7 +1139814,7 @@
  		spin_unlock_irqrestore(&mz->lru_lock, flags);
  
  		page_assign_page_cgroup(page, NULL);
-@@ -695,7 +684,7 @@ void mem_cgroup_uncharge_page(struct page *page)
+@@ -695,7 +693,7 @@ void mem_cgroup_uncharge_page(struct page *page)
  		res_counter_uncharge(&mem->res, PAGE_SIZE);
  		css_put(&mem->css);
  
@@ -1134121,7 +1139823,7 @@
  		return;
  	}
  
-@@ -747,7 +736,7 @@ void mem_cgroup_page_migration(struct page *page, struct page *newpage)
+@@ -747,7 +745,7 @@ void mem_cgroup_page_migration(struct page *page, struct page *newpage)
  
  	mz = page_cgroup_zoneinfo(pc);
  	spin_lock_irqsave(&mz->lru_lock, flags);
@@ -1134130,7 +1139832,7 @@
  	spin_unlock_irqrestore(&mz->lru_lock, flags);
  
  	page_assign_page_cgroup(page, NULL);
-@@ -759,7 +748,7 @@ void mem_cgroup_page_migration(struct page *page, struct page *newpage)
+@@ -759,7 +757,7 @@ void mem_cgroup_page_migration(struct page *page, struct page *newpage)
  
  	mz = page_cgroup_zoneinfo(pc);
  	spin_lock_irqsave(&mz->lru_lock, flags);
@@ -1134139,7 +1139841,7 @@
  	spin_unlock_irqrestore(&mz->lru_lock, flags);
  
  	unlock_page_cgroup(newpage);
-@@ -853,13 +842,10 @@ static int mem_cgroup_write_strategy(char *buf, unsigned long long *tmp)
+@@ -853,13 +851,10 @@ static int mem_cgroup_write_strategy(char *buf, unsigned long long *tmp)
  	return 0;
  }
  
@@ -1134156,7 +1139858,7 @@
  }
  
  static ssize_t mem_cgroup_write(struct cgroup *cont, struct cftype *cft,
-@@ -871,27 +857,25 @@ static ssize_t mem_cgroup_write(struct cgroup *cont, struct cftype *cft,
+@@ -871,27 +866,25 @@ static ssize_t mem_cgroup_write(struct cgroup *cont, struct cftype *cft,
  				mem_cgroup_write_strategy);
  }
  
@@ -1134199,8 +1139901,12 @@
  }
  
  static const struct mem_cgroup_stat_desc {
-@@ -902,9 +886,9 @@ static const struct mem_cgroup_stat_desc {
+@@ -900,11 +893,13 @@ static const struct mem_cgroup_stat_desc {
+ } mem_cgroup_stat_desc[] = {
+ 	[MEM_CGROUP_STAT_CACHE] = { "cache", PAGE_SIZE, },
  	[MEM_CGROUP_STAT_RSS] = { "rss", PAGE_SIZE, },
++	[MEM_CGROUP_STAT_PGPGIN_COUNT] = {"pgpgin", 1, },
++	[MEM_CGROUP_STAT_PGPGOUT_COUNT] = {"pgpgout", 1, },
  };
  
 -static int mem_control_stat_show(struct seq_file *m, void *arg)
@@ -1134211,7 +1139917,7 @@
  	struct mem_cgroup *mem_cont = mem_cgroup_from_cont(cont);
  	struct mem_cgroup_stat *stat = &mem_cont->stat;
  	int i;
-@@ -914,8 +898,7 @@ static int mem_control_stat_show(struct seq_file *m, void *arg)
+@@ -914,8 +909,7 @@ static int mem_control_stat_show(struct seq_file *m, void *arg)
  
  		val = mem_cgroup_read_stat(stat, i);
  		val *= mem_cgroup_stat_desc[i].unit;
@@ -1134221,7 +1139927,7 @@
  	}
  	/* showing # of active pages */
  	{
-@@ -925,52 +908,43 @@ static int mem_control_stat_show(struct seq_file *m, void *arg)
+@@ -925,52 +919,43 @@ static int mem_control_stat_show(struct seq_file *m, void *arg)
  						MEM_CGROUP_ZSTAT_INACTIVE);
  		active = mem_cgroup_get_all_zonestat(mem_cont,
  						MEM_CGROUP_ZSTAT_ACTIVE);
@@ -1134288,7 +1139994,7 @@
  	},
  };
  
-@@ -1010,6 +984,29 @@ static void free_mem_cgroup_per_zone_info(struct mem_cgroup *mem, int node)
+@@ -1010,6 +995,29 @@ static void free_mem_cgroup_per_zone_info(struct mem_cgroup *mem, int node)
  	kfree(mem->info.nodeinfo[node]);
  }
  
@@ -1134318,7 +1140024,7 @@
  static struct cgroup_subsys_state *
  mem_cgroup_create(struct cgroup_subsys *ss, struct cgroup *cont)
  {
-@@ -1018,17 +1015,15 @@ mem_cgroup_create(struct cgroup_subsys *ss, struct cgroup *cont)
+@@ -1018,17 +1026,15 @@ mem_cgroup_create(struct cgroup_subsys *ss, struct cgroup *cont)
  
  	if (unlikely((cont->parent) == NULL)) {
  		mem = &init_mem_cgroup;
@@ -1134342,7 +1140048,7 @@
  	for_each_node_state(node, N_POSSIBLE)
  		if (alloc_mem_cgroup_per_zone_info(mem, node))
  			goto free_out;
-@@ -1038,7 +1033,7 @@ free_out:
+@@ -1038,7 +1044,7 @@ free_out:
  	for_each_node_state(node, N_POSSIBLE)
  		free_mem_cgroup_per_zone_info(mem, node);
  	if (cont->parent != NULL)
@@ -1134351,7 +1140057,7 @@
  	return ERR_PTR(-ENOMEM);
  }
  
-@@ -1058,7 +1053,7 @@ static void mem_cgroup_destroy(struct cgroup_subsys *ss,
+@@ -1058,7 +1064,7 @@ static void mem_cgroup_destroy(struct cgroup_subsys *ss,
  	for_each_node_state(node, N_POSSIBLE)
  		free_mem_cgroup_per_zone_info(mem, node);
  
@@ -1134360,7 +1140066,7 @@
  }
  
  static int mem_cgroup_populate(struct cgroup_subsys *ss,
-@@ -1098,10 +1093,6 @@ static void mem_cgroup_move_task(struct cgroup_subsys *ss,
+@@ -1098,10 +1104,6 @@ static void mem_cgroup_move_task(struct cgroup_subsys *ss,
  	if (!thread_group_leader(p))
  		goto out;
  
@@ -1138212,18 +1143918,21 @@
  	if (c) {
  		c->name = name;
 diff --git a/mm/slub.c b/mm/slub.c
-index acc975f..70db289 100644
+index acc975f..32b6262 100644
 --- a/mm/slub.c
 +++ b/mm/slub.c
-@@ -19,6 +19,7 @@
+@@ -19,8 +19,10 @@
  #include <linux/cpuset.h>
  #include <linux/mempolicy.h>
  #include <linux/ctype.h>
 +#include <linux/debugobjects.h>
  #include <linux/kallsyms.h>
  #include <linux/memory.h>
++#include <linux/math64.h>
  
-@@ -149,25 +150,6 @@ static inline void ClearSlabDebug(struct page *page)
+ /*
+  * Lock order:
+@@ -149,25 +151,6 @@ static inline void ClearSlabDebug(struct page *page)
  /* Enable to test recovery from slab corruption on boot */
  #undef SLUB_RESILIENCY_TEST
  
@@ -1138249,7 +1143958,7 @@
  /*
   * Mininum number of partial slabs. These will be left on the partial
   * lists even if they are empty. kmem_cache_shrink may reclaim them.
-@@ -204,13 +186,6 @@ static inline void ClearSlabDebug(struct page *page)
+@@ -204,13 +187,6 @@ static inline void ClearSlabDebug(struct page *page)
  /* Internal SLUB flags */
  #define __OBJECT_POISON		0x80000000 /* Poison object */
  #define __SYSFS_ADD_DEFERRED	0x40000000 /* Not yet visible via sysfs */
@@ -1138263,7 +1143972,7 @@
  
  static int kmem_size = sizeof(struct kmem_cache);
  
-@@ -301,7 +276,7 @@ static inline int check_valid_pointer(struct kmem_cache *s,
+@@ -301,7 +277,7 @@ static inline int check_valid_pointer(struct kmem_cache *s,
  		return 1;
  
  	base = page_address(page);
@@ -1138272,7 +1143981,7 @@
  		(object - base) % s->size) {
  		return 0;
  	}
-@@ -327,8 +302,8 @@ static inline void set_freepointer(struct kmem_cache *s, void *object, void *fp)
+@@ -327,8 +303,8 @@ static inline void set_freepointer(struct kmem_cache *s, void *object, void *fp)
  }
  
  /* Loop over all objects in a slab */
@@ -1138283,7 +1143992,7 @@
  			__p += (__s)->size)
  
  /* Scan freelist */
-@@ -341,6 +316,26 @@ static inline int slab_index(void *p, struct kmem_cache *s, void *addr)
+@@ -341,6 +317,26 @@ static inline int slab_index(void *p, struct kmem_cache *s, void *addr)
  	return (p - addr) / s->size;
  }
  
@@ -1138310,7 +1144019,7 @@
  #ifdef CONFIG_SLUB_DEBUG
  /*
   * Debug settings:
-@@ -451,8 +446,8 @@ static void print_tracking(struct kmem_cache *s, void *object)
+@@ -451,8 +447,8 @@ static void print_tracking(struct kmem_cache *s, void *object)
  
  static void print_page_info(struct page *page)
  {
@@ -1138321,7 +1144030,7 @@
  
  }
  
-@@ -521,7 +516,7 @@ static void print_trailer(struct kmem_cache *s, struct page *page, u8 *p)
+@@ -521,7 +517,7 @@ static void print_trailer(struct kmem_cache *s, struct page *page, u8 *p)
  static void object_err(struct kmem_cache *s, struct page *page,
  			u8 *object, char *reason)
  {
@@ -1138330,7 +1144039,7 @@
  	print_trailer(s, page, object);
  }
  
-@@ -533,7 +528,7 @@ static void slab_err(struct kmem_cache *s, struct page *page, char *fmt, ...)
+@@ -533,7 +529,7 @@ static void slab_err(struct kmem_cache *s, struct page *page, char *fmt, ...)
  	va_start(args, fmt);
  	vsnprintf(buf, sizeof(buf), fmt, args);
  	va_end(args);
@@ -1138339,7 +1144048,7 @@
  	print_page_info(page);
  	dump_stack();
  }
-@@ -652,6 +647,7 @@ static int check_pad_bytes(struct kmem_cache *s, struct page *page, u8 *p)
+@@ -652,6 +648,7 @@ static int check_pad_bytes(struct kmem_cache *s, struct page *page, u8 *p)
  				p + off, POISON_INUSE, s->size - off);
  }
  
@@ -1138347,7 +1144056,7 @@
  static int slab_pad_check(struct kmem_cache *s, struct page *page)
  {
  	u8 *start;
-@@ -664,20 +660,20 @@ static int slab_pad_check(struct kmem_cache *s, struct page *page)
+@@ -664,20 +661,20 @@ static int slab_pad_check(struct kmem_cache *s, struct page *page)
  		return 1;
  
  	start = page_address(page);
@@ -1138373,7 +1144082,7 @@
  
  	restore_bytes(s, "slab padding", POISON_INUSE, start, end);
  	return 0;
-@@ -739,15 +735,24 @@ static int check_object(struct kmem_cache *s, struct page *page,
+@@ -739,15 +736,24 @@ static int check_object(struct kmem_cache *s, struct page *page,
  
  static int check_slab(struct kmem_cache *s, struct page *page)
  {
@@ -1138400,7 +1144109,7 @@
  		return 0;
  	}
  	/* Slab_pad_check fixes things up after itself */
-@@ -764,8 +769,9 @@ static int on_freelist(struct kmem_cache *s, struct page *page, void *search)
+@@ -764,8 +770,9 @@ static int on_freelist(struct kmem_cache *s, struct page *page, void *search)
  	int nr = 0;
  	void *fp = page->freelist;
  	void *object = NULL;
@@ -1138411,7 +1144120,7 @@
  		if (fp == search)
  			return 1;
  		if (!check_valid_pointer(s, page, fp)) {
-@@ -777,7 +783,7 @@ static int on_freelist(struct kmem_cache *s, struct page *page, void *search)
+@@ -777,7 +784,7 @@ static int on_freelist(struct kmem_cache *s, struct page *page, void *search)
  			} else {
  				slab_err(s, page, "Freepointer corrupt");
  				page->freelist = NULL;
@@ -1138420,7 +1144129,7 @@
  				slab_fix(s, "Freelist cleared");
  				return 0;
  			}
-@@ -788,10 +794,20 @@ static int on_freelist(struct kmem_cache *s, struct page *page, void *search)
+@@ -788,10 +795,20 @@ static int on_freelist(struct kmem_cache *s, struct page *page, void *search)
  		nr++;
  	}
  
@@ -1138444,7 +1144153,7 @@
  		slab_fix(s, "Object count adjusted.");
  	}
  	return search == NULL;
-@@ -837,6 +853,38 @@ static void remove_full(struct kmem_cache *s, struct page *page)
+@@ -837,6 +854,38 @@ static void remove_full(struct kmem_cache *s, struct page *page)
  	spin_unlock(&n->list_lock);
  }
  
@@ -1138483,7 +1144192,7 @@
  static void setup_object_debug(struct kmem_cache *s, struct page *page,
  								void *object)
  {
-@@ -881,7 +929,7 @@ bad:
+@@ -881,7 +930,7 @@ bad:
  		 * as used avoids touching the remaining objects.
  		 */
  		slab_fix(s, "Marking all objects used");
@@ -1138492,7 +1144201,7 @@
  		page->freelist = NULL;
  	}
  	return 0;
-@@ -1028,29 +1076,55 @@ static inline unsigned long kmem_cache_flags(unsigned long objsize,
+@@ -1028,29 +1077,55 @@ static inline unsigned long kmem_cache_flags(unsigned long objsize,
  	return flags;
  }
  #define slub_debug 0
@@ -1138557,7 +1144266,7 @@
  
  	return page;
  }
-@@ -1066,7 +1140,6 @@ static void setup_object(struct kmem_cache *s, struct page *page,
+@@ -1066,7 +1141,6 @@ static void setup_object(struct kmem_cache *s, struct page *page,
  static struct page *new_slab(struct kmem_cache *s, gfp_t flags, int node)
  {
  	struct page *page;
@@ -1138565,7 +1144274,7 @@
  	void *start;
  	void *last;
  	void *p;
-@@ -1078,9 +1151,7 @@ static struct page *new_slab(struct kmem_cache *s, gfp_t flags, int node)
+@@ -1078,9 +1152,7 @@ static struct page *new_slab(struct kmem_cache *s, gfp_t flags, int node)
  	if (!page)
  		goto out;
  
@@ -1138576,7 +1144285,7 @@
  	page->slab = s;
  	page->flags |= 1 << PG_slab;
  	if (s->flags & (SLAB_DEBUG_FREE | SLAB_RED_ZONE | SLAB_POISON |
-@@ -1090,10 +1161,10 @@ static struct page *new_slab(struct kmem_cache *s, gfp_t flags, int node)
+@@ -1090,10 +1162,10 @@ static struct page *new_slab(struct kmem_cache *s, gfp_t flags, int node)
  	start = page_address(page);
  
  	if (unlikely(s->flags & SLAB_POISON))
@@ -1138589,7 +1144298,7 @@
  		setup_object(s, page, last);
  		set_freepointer(s, last, p);
  		last = p;
-@@ -1109,13 +1180,15 @@ out:
+@@ -1109,13 +1181,15 @@ out:
  
  static void __free_slab(struct kmem_cache *s, struct page *page)
  {
@@ -1138607,7 +1144316,7 @@
  			check_object(s, page, p, 0);
  		ClearSlabDebug(page);
  	}
-@@ -1125,7 +1198,9 @@ static void __free_slab(struct kmem_cache *s, struct page *page)
+@@ -1125,7 +1199,9 @@ static void __free_slab(struct kmem_cache *s, struct page *page)
  		NR_SLAB_RECLAIMABLE : NR_SLAB_UNRECLAIMABLE,
  		-pages);
  
@@ -1138618,7 +1144327,7 @@
  }
  
  static void rcu_free_slab(struct rcu_head *h)
-@@ -1151,11 +1226,7 @@ static void free_slab(struct kmem_cache *s, struct page *page)
+@@ -1151,11 +1227,7 @@ static void free_slab(struct kmem_cache *s, struct page *page)
  
  static void discard_slab(struct kmem_cache *s, struct page *page)
  {
@@ -1138631,7 +1144340,7 @@
  	free_slab(s, page);
  }
  
-@@ -1255,7 +1326,9 @@ static struct page *get_any_partial(struct kmem_cache *s, gfp_t flags)
+@@ -1255,7 +1327,9 @@ static struct page *get_any_partial(struct kmem_cache *s, gfp_t flags)
  {
  #ifdef CONFIG_NUMA
  	struct zonelist *zonelist;
@@ -1138642,7 +1144351,7 @@
  	struct page *page;
  
  	/*
-@@ -1280,14 +1353,13 @@ static struct page *get_any_partial(struct kmem_cache *s, gfp_t flags)
+@@ -1280,14 +1354,13 @@ static struct page *get_any_partial(struct kmem_cache *s, gfp_t flags)
  			get_cycles() % 1024 > s->remote_node_defrag_ratio)
  		return NULL;
  
@@ -1138661,7 +1144370,7 @@
  				n->nr_partial > MIN_PARTIAL) {
  			page = get_partial_node(n);
  			if (page)
-@@ -1490,7 +1562,7 @@ load_freelist:
+@@ -1490,7 +1563,7 @@ load_freelist:
  		goto debug;
  
  	c->freelist = object[c->offset];
@@ -1138670,7 +1144379,7 @@
  	c->page->freelist = NULL;
  	c->node = page_to_nid(c->page);
  unlock_out:
-@@ -1527,27 +1599,6 @@ new_slab:
+@@ -1527,27 +1600,6 @@ new_slab:
  		c->page = new;
  		goto load_freelist;
  	}
@@ -1138698,7 +1144407,7 @@
  	return NULL;
  debug:
  	if (!alloc_debug_processing(s, c->page, object, addr))
-@@ -1697,6 +1748,8 @@ static __always_inline void slab_free(struct kmem_cache *s,
+@@ -1697,6 +1749,8 @@ static __always_inline void slab_free(struct kmem_cache *s,
  	local_irq_save(flags);
  	c = get_cpu_slab(s, smp_processor_id());
  	debug_check_no_locks_freed(object, c->objsize);
@@ -1138707,7 +1144416,7 @@
  	if (likely(page == c->page && c->node >= 0)) {
  		object[c->offset] = c->freelist;
  		c->freelist = object;
-@@ -1748,8 +1801,8 @@ static struct page *get_object_page(const void *x)
+@@ -1748,8 +1802,8 @@ static struct page *get_object_page(const void *x)
   * take the list_lock.
   */
  static int slub_min_order;
@@ -1138718,7 +1144427,7 @@
  
  /*
   * Merge control. If this is set then no merging of slab caches will occur.
-@@ -1764,7 +1817,7 @@ static int slub_nomerge;
+@@ -1764,7 +1818,7 @@ static int slub_nomerge;
   * system components. Generally order 0 allocations should be preferred since
   * order 0 does not cause fragmentation in the page allocator. Larger objects
   * be problematic to put into order 0 slabs because there may be too much
@@ -1138727,7 +1144436,7 @@
   * would be wasted.
   *
   * In order to reach satisfactory performance we must ensure that a minimum
-@@ -1789,6 +1842,9 @@ static inline int slab_order(int size, int min_objects,
+@@ -1789,6 +1843,9 @@ static inline int slab_order(int size, int min_objects,
  	int rem;
  	int min_order = slub_min_order;
  
@@ -1138737,7 +1144446,7 @@
  	for (order = max(min_order,
  				fls(min_objects * size - 1) - PAGE_SHIFT);
  			order <= max_order; order++) {
-@@ -1823,8 +1879,10 @@ static inline int calculate_order(int size)
+@@ -1823,8 +1880,10 @@ static inline int calculate_order(int size)
  	 * we reduce the minimum objects required in a slab.
  	 */
  	min_objects = slub_min_objects;
@@ -1138749,7 +1144458,7 @@
  		while (fraction >= 4) {
  			order = slab_order(size, min_objects,
  						slub_max_order, fraction);
-@@ -1886,15 +1944,18 @@ static void init_kmem_cache_cpu(struct kmem_cache *s,
+@@ -1886,15 +1945,18 @@ static void init_kmem_cache_cpu(struct kmem_cache *s,
  	c->node = 0;
  	c->offset = s->offset / sizeof(void *);
  	c->objsize = s->objsize;
@@ -1138769,7 +1144478,7 @@
  	INIT_LIST_HEAD(&n->full);
  #endif
  }
-@@ -2063,7 +2124,7 @@ static struct kmem_cache_node *early_kmem_cache_node_alloc(gfp_t gfpflags,
+@@ -2063,7 +2125,7 @@ static struct kmem_cache_node *early_kmem_cache_node_alloc(gfp_t gfpflags,
  	init_tracking(kmalloc_caches, n);
  #endif
  	init_kmem_cache_node(n);
@@ -1138778,7 +1144487,7 @@
  
  	/*
  	 * lockdep requires consistent irq usage for each lock
-@@ -2139,11 +2200,12 @@ static int init_kmem_cache_nodes(struct kmem_cache *s, gfp_t gfpflags)
+@@ -2139,11 +2201,12 @@ static int init_kmem_cache_nodes(struct kmem_cache *s, gfp_t gfpflags)
   * calculate_sizes() determines the order and the distribution of data within
   * a slab object.
   */
@@ -1138792,7 +1144501,7 @@
  
  	/*
  	 * Round up object size to the next word boundary. We can only
-@@ -2227,26 +2289,16 @@ static int calculate_sizes(struct kmem_cache *s)
+@@ -2227,26 +2290,16 @@ static int calculate_sizes(struct kmem_cache *s)
  	 */
  	size = ALIGN(size, align);
  	s->size = size;
@@ -1138825,7 +1144534,7 @@
  		s->allocflags |= __GFP_COMP;
  
  	if (s->flags & SLAB_CACHE_DMA)
-@@ -2258,9 +2310,12 @@ static int calculate_sizes(struct kmem_cache *s)
+@@ -2258,9 +2311,12 @@ static int calculate_sizes(struct kmem_cache *s)
  	/*
  	 * Determine the number of objects per slab
  	 */
@@ -1138840,7 +1144549,7 @@
  
  }
  
-@@ -2276,7 +2331,7 @@ static int kmem_cache_open(struct kmem_cache *s, gfp_t gfpflags,
+@@ -2276,7 +2332,7 @@ static int kmem_cache_open(struct kmem_cache *s, gfp_t gfpflags,
  	s->align = align;
  	s->flags = kmem_cache_flags(size, flags, name, ctor);
  
@@ -1138849,7 +1144558,7 @@
  		goto error;
  
  	s->refcount = 1;
-@@ -2293,7 +2348,7 @@ error:
+@@ -2293,7 +2349,7 @@ error:
  	if (flags & SLAB_PANIC)
  		panic("Cannot create slab %s size=%lu realsize=%u "
  			"order=%u offset=%u flags=%lx\n",
@@ -1138858,7 +1144567,7 @@
  			s->offset, flags);
  	return 0;
  }
-@@ -2339,26 +2394,52 @@ const char *kmem_cache_name(struct kmem_cache *s)
+@@ -2339,26 +2395,52 @@ const char *kmem_cache_name(struct kmem_cache *s)
  }
  EXPORT_SYMBOL(kmem_cache_name);
  
@@ -1138920,7 +1144629,7 @@
  }
  
  /*
-@@ -2375,8 +2456,8 @@ static inline int kmem_cache_close(struct kmem_cache *s)
+@@ -2375,8 +2457,8 @@ static inline int kmem_cache_close(struct kmem_cache *s)
  	for_each_node_state(node, N_NORMAL_MEMORY) {
  		struct kmem_cache_node *n = get_node(s, node);
  
@@ -1138931,7 +1144640,7 @@
  			return 1;
  	}
  	free_kmem_cache_nodes(s);
-@@ -2394,8 +2475,11 @@ void kmem_cache_destroy(struct kmem_cache *s)
+@@ -2394,8 +2476,11 @@ void kmem_cache_destroy(struct kmem_cache *s)
  	if (!s->refcount) {
  		list_del(&s->list);
  		up_write(&slub_lock);
@@ -1138945,7 +1144654,7 @@
  		sysfs_slab_remove(s);
  	} else
  		up_write(&slub_lock);
-@@ -2409,10 +2493,6 @@ EXPORT_SYMBOL(kmem_cache_destroy);
+@@ -2409,10 +2494,6 @@ EXPORT_SYMBOL(kmem_cache_destroy);
  struct kmem_cache kmalloc_caches[PAGE_SHIFT + 1] __cacheline_aligned;
  EXPORT_SYMBOL(kmalloc_caches);
  
@@ -1138956,7 +1144665,7 @@
  static int __init setup_slub_min_order(char *str)
  {
  	get_option(&str, &slub_min_order);
-@@ -2458,7 +2538,7 @@ static struct kmem_cache *create_kmalloc_cache(struct kmem_cache *s,
+@@ -2458,7 +2539,7 @@ static struct kmem_cache *create_kmalloc_cache(struct kmem_cache *s,
  
  	down_write(&slub_lock);
  	if (!kmem_cache_open(s, gfp_flags, name, size, ARCH_KMALLOC_MINALIGN,
@@ -1138965,7 +1144674,7 @@
  		goto panic;
  
  	list_add(&s->list, &slab_caches);
-@@ -2472,6 +2552,7 @@ panic:
+@@ -2472,6 +2553,7 @@ panic:
  }
  
  #ifdef CONFIG_ZONE_DMA
@@ -1138973,7 +1144682,7 @@
  
  static void sysfs_add_func(struct work_struct *w)
  {
-@@ -2688,21 +2769,6 @@ void kfree(const void *x)
+@@ -2688,21 +2770,6 @@ void kfree(const void *x)
  }
  EXPORT_SYMBOL(kfree);
  
@@ -1138995,7 +1144704,7 @@
  /*
   * kmem_cache_shrink removes empty slabs from the partial lists and sorts
   * the remaining slabs by the number of items in use. The slabs with the
-@@ -2720,8 +2786,9 @@ int kmem_cache_shrink(struct kmem_cache *s)
+@@ -2720,8 +2787,9 @@ int kmem_cache_shrink(struct kmem_cache *s)
  	struct kmem_cache_node *n;
  	struct page *page;
  	struct page *t;
@@ -1139006,7 +1144715,7 @@
  	unsigned long flags;
  
  	if (!slabs_by_inuse)
-@@ -2734,7 +2801,7 @@ int kmem_cache_shrink(struct kmem_cache *s)
+@@ -2734,7 +2802,7 @@ int kmem_cache_shrink(struct kmem_cache *s)
  		if (!n->nr_partial)
  			continue;
  
@@ -1139015,7 +1144724,7 @@
  			INIT_LIST_HEAD(slabs_by_inuse + i);
  
  		spin_lock_irqsave(&n->list_lock, flags);
-@@ -2766,7 +2833,7 @@ int kmem_cache_shrink(struct kmem_cache *s)
+@@ -2766,7 +2834,7 @@ int kmem_cache_shrink(struct kmem_cache *s)
  		 * Rebuild the partial list with the slabs filled up most
  		 * first and the least used slabs at the end.
  		 */
@@ -1139024,7 +1144733,7 @@
  			list_splice(slabs_by_inuse + i, n->partial.prev);
  
  		spin_unlock_irqrestore(&n->list_lock, flags);
-@@ -2816,7 +2883,7 @@ static void slab_mem_offline_callback(void *arg)
+@@ -2816,7 +2884,7 @@ static void slab_mem_offline_callback(void *arg)
  			 * and offline_pages() function shoudn't call this
  			 * callback. So, we must fail.
  			 */
@@ -1139033,7 +1144742,7 @@
  
  			s->node[offline_node] = NULL;
  			kmem_cache_free(kmalloc_caches, n);
-@@ -2914,7 +2981,7 @@ void __init kmem_cache_init(void)
+@@ -2914,7 +2982,7 @@ void __init kmem_cache_init(void)
  	kmalloc_caches[0].refcount = -1;
  	caches++;
  
@@ -1139042,7 +1144751,7 @@
  #endif
  
  	/* Able to allocate the per node structures */
-@@ -2987,9 +3054,6 @@ static int slab_unmergeable(struct kmem_cache *s)
+@@ -2987,9 +3055,6 @@ static int slab_unmergeable(struct kmem_cache *s)
  	if (slub_nomerge || (s->flags & SLUB_NEVER_MERGE))
  		return 1;
  
@@ -1139052,7 +1144761,7 @@
  	if (s->ctor)
  		return 1;
  
-@@ -3181,6 +3245,37 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags,
+@@ -3181,6 +3246,37 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags,
  	return slab_alloc(s, gfpflags, node, caller);
  }
  
@@ -1139090,7 +1144799,7 @@
  #if defined(CONFIG_SYSFS) && defined(CONFIG_SLUB_DEBUG)
  static int validate_slab(struct kmem_cache *s, struct page *page,
  						unsigned long *map)
-@@ -3193,7 +3288,7 @@ static int validate_slab(struct kmem_cache *s, struct page *page,
+@@ -3193,7 +3289,7 @@ static int validate_slab(struct kmem_cache *s, struct page *page,
  		return 0;
  
  	/* Now we know that a valid freelist exists */
@@ -1139099,7 +1144808,7 @@
  
  	for_each_free_object(p, s, page->freelist) {
  		set_bit(slab_index(p, s, addr), map);
-@@ -3201,7 +3296,7 @@ static int validate_slab(struct kmem_cache *s, struct page *page,
+@@ -3201,7 +3297,7 @@ static int validate_slab(struct kmem_cache *s, struct page *page,
  			return 0;
  	}
  
@@ -1139108,7 +1144817,7 @@
  		if (!test_bit(slab_index(p, s, addr), map))
  			if (!check_object(s, page, p, 1))
  				return 0;
-@@ -3267,7 +3362,7 @@ static long validate_slab_cache(struct kmem_cache *s)
+@@ -3267,7 +3363,7 @@ static long validate_slab_cache(struct kmem_cache *s)
  {
  	int node;
  	unsigned long count = 0;
@@ -1139117,7 +1144826,7 @@
  				sizeof(unsigned long), GFP_KERNEL);
  
  	if (!map)
-@@ -3470,14 +3565,14 @@ static void process_slab(struct loc_track *t, struct kmem_cache *s,
+@@ -3470,14 +3566,14 @@ static void process_slab(struct loc_track *t, struct kmem_cache *s,
  		struct page *page, enum track_item alloc)
  {
  	void *addr = page_address(page);
@@ -1139135,7 +1144844,23 @@
  		if (!test_bit(slab_index(p, s, addr), map))
  			add_location(t, s, get_track(s, p, alloc));
  }
-@@ -3567,22 +3662,23 @@ static int list_locations(struct kmem_cache *s, char *buf,
+@@ -3526,12 +3622,10 @@ static int list_locations(struct kmem_cache *s, char *buf,
+ 			len += sprintf(buf + len, "<not-available>");
+ 
+ 		if (l->sum_time != l->min_time) {
+-			unsigned long remainder;
+-
+ 			len += sprintf(buf + len, " age=%ld/%ld/%ld",
+-			l->min_time,
+-			div_long_long_rem(l->sum_time, l->count, &remainder),
+-			l->max_time);
++				l->min_time,
++				(long)div_u64(l->sum_time, l->count),
++				l->max_time);
+ 		} else
+ 			len += sprintf(buf + len, " age=%ld",
+ 				l->min_time);
+@@ -3567,22 +3661,23 @@ static int list_locations(struct kmem_cache *s, char *buf,
  }
  
  enum slab_stat_type {
@@ -1139165,7 +1144890,7 @@
  	int node;
  	int x;
  	unsigned long *nodes;
-@@ -3593,56 +3689,60 @@ static ssize_t show_slab_objects(struct kmem_cache *s,
+@@ -3593,56 +3688,60 @@ static ssize_t show_slab_objects(struct kmem_cache *s,
  		return -ENOMEM;
  	per_cpu = nodes + nr_node_ids;
  
@@ -1139255,7 +1144980,7 @@
  	x = sprintf(buf, "%lu", total);
  #ifdef CONFIG_NUMA
  	for_each_node_state(node, N_NORMAL_MEMORY)
-@@ -3657,14 +3757,6 @@ static ssize_t show_slab_objects(struct kmem_cache *s,
+@@ -3657,14 +3756,6 @@ static ssize_t show_slab_objects(struct kmem_cache *s,
  static int any_slab_objects(struct kmem_cache *s)
  {
  	int node;
@@ -1139270,7 +1144995,7 @@
  
  	for_each_online_node(node) {
  		struct kmem_cache_node *n = get_node(s, node);
-@@ -3672,7 +3764,7 @@ static int any_slab_objects(struct kmem_cache *s)
+@@ -3672,7 +3763,7 @@ static int any_slab_objects(struct kmem_cache *s)
  		if (!n)
  			continue;
  
@@ -1139279,7 +1145004,7 @@
  			return 1;
  	}
  	return 0;
-@@ -3714,15 +3806,27 @@ SLAB_ATTR_RO(object_size);
+@@ -3714,15 +3805,27 @@ SLAB_ATTR_RO(object_size);
  
  static ssize_t objs_per_slab_show(struct kmem_cache *s, char *buf)
  {
@@ -1139310,7 +1145035,7 @@
  
  static ssize_t ctor_show(struct kmem_cache *s, char *buf)
  {
-@@ -3743,7 +3847,7 @@ SLAB_ATTR_RO(aliases);
+@@ -3743,7 +3846,7 @@ SLAB_ATTR_RO(aliases);
  
  static ssize_t slabs_show(struct kmem_cache *s, char *buf)
  {
@@ -1139319,7 +1145044,7 @@
  }
  SLAB_ATTR_RO(slabs);
  
-@@ -3761,10 +3865,22 @@ SLAB_ATTR_RO(cpu_slabs);
+@@ -3761,10 +3864,22 @@ SLAB_ATTR_RO(cpu_slabs);
  
  static ssize_t objects_show(struct kmem_cache *s, char *buf)
  {
@@ -1139343,7 +1145068,7 @@
  static ssize_t sanity_checks_show(struct kmem_cache *s, char *buf)
  {
  	return sprintf(buf, "%d\n", !!(s->flags & SLAB_DEBUG_FREE));
-@@ -3844,7 +3960,7 @@ static ssize_t red_zone_store(struct kmem_cache *s,
+@@ -3844,7 +3959,7 @@ static ssize_t red_zone_store(struct kmem_cache *s,
  	s->flags &= ~SLAB_RED_ZONE;
  	if (buf[0] == '1')
  		s->flags |= SLAB_RED_ZONE;
@@ -1139352,7 +1145077,7 @@
  	return length;
  }
  SLAB_ATTR(red_zone);
-@@ -3863,7 +3979,7 @@ static ssize_t poison_store(struct kmem_cache *s,
+@@ -3863,7 +3978,7 @@ static ssize_t poison_store(struct kmem_cache *s,
  	s->flags &= ~SLAB_POISON;
  	if (buf[0] == '1')
  		s->flags |= SLAB_POISON;
@@ -1139361,7 +1145086,7 @@
  	return length;
  }
  SLAB_ATTR(poison);
-@@ -3882,7 +3998,7 @@ static ssize_t store_user_store(struct kmem_cache *s,
+@@ -3882,7 +3997,7 @@ static ssize_t store_user_store(struct kmem_cache *s,
  	s->flags &= ~SLAB_STORE_USER;
  	if (buf[0] == '1')
  		s->flags |= SLAB_STORE_USER;
@@ -1139370,7 +1145095,7 @@
  	return length;
  }
  SLAB_ATTR(store_user);
-@@ -3979,10 +4095,12 @@ static int show_stat(struct kmem_cache *s, char *buf, enum stat_item si)
+@@ -3979,10 +4094,12 @@ static int show_stat(struct kmem_cache *s, char *buf, enum stat_item si)
  
  	len = sprintf(buf, "%lu", sum);
  
@@ -1139384,7 +1145109,7 @@
  	kfree(data);
  	return len + sprintf(buf + len, "\n");
  }
-@@ -4011,7 +4129,7 @@ STAT_ATTR(DEACTIVATE_EMPTY, deactivate_empty);
+@@ -4011,7 +4128,7 @@ STAT_ATTR(DEACTIVATE_EMPTY, deactivate_empty);
  STAT_ATTR(DEACTIVATE_TO_HEAD, deactivate_to_head);
  STAT_ATTR(DEACTIVATE_TO_TAIL, deactivate_to_tail);
  STAT_ATTR(DEACTIVATE_REMOTE_FREES, deactivate_remote_frees);
@@ -1139393,7 +1145118,7 @@
  #endif
  
  static struct attribute *slab_attrs[] = {
-@@ -4020,6 +4138,8 @@ static struct attribute *slab_attrs[] = {
+@@ -4020,6 +4137,8 @@ static struct attribute *slab_attrs[] = {
  	&objs_per_slab_attr.attr,
  	&order_attr.attr,
  	&objects_attr.attr,
@@ -1139402,7 +1145127,7 @@
  	&slabs_attr.attr,
  	&partial_attr.attr,
  	&cpu_slabs_attr.attr,
-@@ -4062,6 +4182,7 @@ static struct attribute *slab_attrs[] = {
+@@ -4062,6 +4181,7 @@ static struct attribute *slab_attrs[] = {
  	&deactivate_to_head_attr.attr,
  	&deactivate_to_tail_attr.attr,
  	&deactivate_remote_frees_attr.attr,
@@ -1139410,7 +1145135,7 @@
  #endif
  	NULL
  };
-@@ -4348,7 +4469,8 @@ static int s_show(struct seq_file *m, void *p)
+@@ -4348,7 +4468,8 @@ static int s_show(struct seq_file *m, void *p)
  	unsigned long nr_partials = 0;
  	unsigned long nr_slabs = 0;
  	unsigned long nr_inuse = 0;
@@ -1139420,7 +1145145,7 @@
  	struct kmem_cache *s;
  	int node;
  
-@@ -4362,14 +4484,15 @@ static int s_show(struct seq_file *m, void *p)
+@@ -4362,14 +4483,15 @@ static int s_show(struct seq_file *m, void *p)
  
  		nr_partials += n->nr_partial;
  		nr_slabs += atomic_long_read(&n->nr_slabs);
@@ -1139794,7 +1145519,7 @@
  		}
  		pagevec_release(&pvec);
 diff --git a/mm/vmalloc.c b/mm/vmalloc.c
-index ecf91f8..2a39cf1 100644
+index ecf91f8..6e45b0f 100644
 --- a/mm/vmalloc.c
 +++ b/mm/vmalloc.c
 @@ -14,8 +14,10 @@
@@ -1139931,7 +1145656,14 @@
  }
  
  /**
-@@ -536,7 +553,7 @@ void *__vmalloc_area(struct vm_struct *area, gfp_t gfp_mask, pgprot_t prot)
+@@ -530,13 +547,14 @@ void *__vmalloc_area(struct vm_struct *area, gfp_t gfp_mask, pgprot_t prot)
+  *	@gfp_mask:	flags for the page level allocator
+  *	@prot:		protection mask for the allocated pages
+  *	@node:		node to use for allocation or -1
++ *	@caller:	caller's return address
+  *
+  *	Allocate enough pages to cover @size from the page level
+  *	allocator with @gfp_mask flags.  Map them into contiguous
   *	kernel virtual space, using a pagetable protection of @prot.
   */
  static void *__vmalloc_node(unsigned long size, gfp_t gfp_mask, pgprot_t prot,
@@ -1139940,7 +1145672,7 @@
  {
  	struct vm_struct *area;
  
-@@ -544,16 +561,19 @@ static void *__vmalloc_node(unsigned long size, gfp_t gfp_mask, pgprot_t prot,
+@@ -544,16 +562,19 @@ static void *__vmalloc_node(unsigned long size, gfp_t gfp_mask, pgprot_t prot,
  	if (!size || (size >> PAGE_SHIFT) > num_physpages)
  		return NULL;
  
@@ -1139963,7 +1145695,7 @@
  }
  EXPORT_SYMBOL(__vmalloc);
  
-@@ -568,7 +588,8 @@ EXPORT_SYMBOL(__vmalloc);
+@@ -568,7 +589,8 @@ EXPORT_SYMBOL(__vmalloc);
   */
  void *vmalloc(unsigned long size)
  {
@@ -1139973,7 +1145705,7 @@
  }
  EXPORT_SYMBOL(vmalloc);
  
-@@ -608,7 +629,8 @@ EXPORT_SYMBOL(vmalloc_user);
+@@ -608,7 +630,8 @@ EXPORT_SYMBOL(vmalloc_user);
   */
  void *vmalloc_node(unsigned long size, int node)
  {
@@ -1139983,7 +1145715,7 @@
  }
  EXPORT_SYMBOL(vmalloc_node);
  
-@@ -843,7 +865,8 @@ struct vm_struct *alloc_vm_area(size_t size)
+@@ -843,7 +866,8 @@ struct vm_struct *alloc_vm_area(size_t size)
  {
  	struct vm_struct *area;
  
@@ -1139993,7 +1145725,7 @@
  	if (area == NULL)
  		return NULL;
  
-@@ -873,3 +896,85 @@ void free_vm_area(struct vm_struct *area)
+@@ -873,3 +897,85 @@ void free_vm_area(struct vm_struct *area)
  	kfree(area);
  }
  EXPORT_SYMBOL_GPL(free_vm_area);
@@ -1157803,7 +1163535,7 @@
  EXPORT_SYMBOL_GPL(tcp_is_cwnd_limited);
  
 diff --git a/net/ipv4/tcp_cubic.c b/net/ipv4/tcp_cubic.c
-index 3aa0b23..eb5b985 100644
+index 3aa0b23..4a1221e 100644
 --- a/net/ipv4/tcp_cubic.c
 +++ b/net/ipv4/tcp_cubic.c
 @@ -1,12 +1,13 @@
@@ -1157823,7 +1163555,14 @@
   *
   * Unless CUBIC is enabled and congestion window is large
   * this behaves the same as the original Reno.
-@@ -20,15 +21,10 @@
+@@ -14,21 +15,16 @@
+ 
+ #include <linux/mm.h>
+ #include <linux/module.h>
++#include <linux/math64.h>
+ #include <net/tcp.h>
+-#include <asm/div64.h>
+ 
  #define BICTCP_BETA_SCALE    1024	/* Scale factor beta calculation
  					 * max_cwnd = snd_cwnd * beta
  					 */
@@ -1157851,6 +1163590,15 @@
  MODULE_PARM_DESC(beta, "beta for multiplicative increase");
  module_param(initial_ssthresh, int, 0644);
  MODULE_PARM_DESC(initial_ssthresh, "initial value of slow start threshold");
+@@ -134,7 +128,7 @@ static u32 cubic_root(u64 a)
+ 	 * x    = ( 2 * x  +  a / x  ) / 3
+ 	 *  k+1          k         k
+ 	 */
+-	x = (2 * x + (u32)div64_64(a, (u64)x * (u64)(x - 1)));
++	x = (2 * x + (u32)div64_u64(a, (u64)x * (u64)(x - 1)));
+ 	x = ((x * 341) >> 10);
+ 	return x;
+ }
 @@ -145,7 +139,7 @@ static u32 cubic_root(u64 a)
  static inline void bictcp_update(struct bictcp *ca, u32 cwnd)
  {
@@ -1213506,6 +1219254,33 @@
  	u_int8_t nexthdr;
  
  	nexthdr = ipv6h->nexthdr;
+diff --git a/net/netfilter/xt_connbytes.c b/net/netfilter/xt_connbytes.c
+index b15e7e2..d7e8983 100644
+--- a/net/netfilter/xt_connbytes.c
++++ b/net/netfilter/xt_connbytes.c
+@@ -4,12 +4,11 @@
+ #include <linux/module.h>
+ #include <linux/bitops.h>
+ #include <linux/skbuff.h>
++#include <linux/math64.h>
+ #include <linux/netfilter/x_tables.h>
+ #include <linux/netfilter/xt_connbytes.h>
+ #include <net/netfilter/nf_conntrack.h>
+ 
+-#include <asm/div64.h>
+-
+ MODULE_LICENSE("GPL");
+ MODULE_AUTHOR("Harald Welte <laforge at netfilter.org>");
+ MODULE_DESCRIPTION("Xtables: Number of packets/bytes per connection matching");
+@@ -82,7 +81,7 @@ connbytes_mt(const struct sk_buff *skb, const struct net_device *in,
+ 			break;
+ 		}
+ 		if (pkts != 0)
+-			what = div64_64(bytes, pkts);
++			what = div64_u64(bytes, pkts);
+ 		break;
+ 	}
+ 
 diff --git a/net/netfilter/xt_connlimit.c b/net/netfilter/xt_connlimit.c
 index 3b01119..2e89a00 100644
 --- a/net/netfilter/xt_connlimit.c
@@ -1224954,6 +1230729,23 @@
  P(sym_find,struct symbol *,(const char *name));
  P(sym_re_search,struct symbol **,(const char *pattern));
  P(sym_type_name,const char *,(enum symbol_type type));
+diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh
+index 62e1e02..5552154 100644
+--- a/scripts/kconfig/lxdialog/check-lxdialog.sh
++++ b/scripts/kconfig/lxdialog/check-lxdialog.sh
+@@ -36,8 +36,10 @@ trap "rm -f $tmp" 0 1 2 3 15
+ 
+ # Check if we can link to ncurses
+ check() {
+-	echo -e " #include CURSES_LOC \n main() {}" |
+-	    $cc -xc - -o $tmp 2> /dev/null
++        $cc -xc - -o $tmp 2>/dev/null <<'EOF'
++#include CURSES_LOC
++main() {}
++EOF
+ 	if [ $? != 0 ]; then
+ 	    echo " *** Unable to find the ncurses libraries or the"       1>&2
+ 	    echo " *** required header files."                            1>&2
 diff --git a/scripts/kconfig/lxdialog/inputbox.c b/scripts/kconfig/lxdialog/inputbox.c
 index 4946bd0..616c601 100644
 --- a/scripts/kconfig/lxdialog/inputbox.c

Modified: dists/trunk/linux-2.6/debian/patches/series/1~experimental.1
==============================================================================
--- dists/trunk/linux-2.6/debian/patches/series/1~experimental.1	(original)
+++ dists/trunk/linux-2.6/debian/patches/series/1~experimental.1	Fri May  2 10:11:15 2008
@@ -1,4 +1,4 @@
-+ bugfix/all/patch-2.6.25-git17
++ bugfix/all/patch-2.6.25-git18
 + debian/version.patch
 + debian/kernelvariables.patch
 + debian/doc-build-parallel.patch



More information about the Kernel-svn-changes mailing list