浏览代码

Manual merge with Linus (conflict in drivers/input/misc/wistron_bnts.c)

Dmitry Torokhov 19 年之前
父节点
当前提交
041387d984
共有 100 个文件被更改,包括 997 次插入459 次删除
  1. 2 0
      Documentation/arm/00-INDEX
  2. 25 25
      Documentation/dvb/README.dvb-usb
  3. 1 1
      Documentation/dvb/README.flexcop
  4. 1 1
      Documentation/dvb/avermedia.txt
  5. 4 4
      Documentation/dvb/cards.txt
  6. 2 2
      Documentation/dvb/contributors.txt
  7. 2 2
      Documentation/dvb/readme.txt
  8. 13 13
      Documentation/filesystems/ext3.txt
  9. 5 5
      MAINTAINERS
  10. 3 3
      Makefile
  11. 1 1
      arch/alpha/kernel/machvec_impl.h
  12. 4 4
      arch/arm/kernel/calls.S
  13. 49 0
      arch/arm/kernel/entry-armv.S
  14. 2 18
      arch/arm/kernel/entry-common.S
  15. 2 0
      arch/arm/kernel/module.c
  16. 9 0
      arch/arm/kernel/ptrace.c
  17. 5 4
      arch/arm/mach-pxa/pm.c
  18. 1 1
      arch/i386/kernel/kprobes.c
  19. 1 2
      arch/i386/kernel/smpboot.c
  20. 0 7
      arch/i386/kernel/traps.c
  21. 29 8
      arch/i386/mm/ioremap.c
  22. 1 1
      arch/i386/pci/Makefile
  23. 2 2
      arch/i386/pci/direct.c
  24. 56 9
      arch/i386/pci/mmconfig.c
  25. 7 0
      arch/i386/pci/pci.h
  26. 1 1
      arch/ia64/Kconfig
  27. 110 44
      arch/ia64/configs/sn2_defconfig
  28. 50 24
      arch/ia64/configs/tiger_defconfig
  29. 0 2
      arch/ia64/ia32/binfmt_elf32.c
  30. 0 1
      arch/ia64/ia32/ia32priv.h
  31. 1 1
      arch/ia64/kernel/kprobes.c
  32. 6 1
      arch/ia64/kernel/process.c
  33. 1 1
      arch/ia64/kernel/salinfo.c
  34. 29 0
      arch/ia64/kernel/time.c
  35. 3 3
      arch/ia64/kernel/uncached.c
  36. 3 0
      arch/ia64/kernel/vmlinux.lds.S
  37. 3 1
      arch/ia64/mm/discontig.c
  38. 131 22
      arch/ia64/sn/kernel/io_init.c
  39. 6 2
      arch/ia64/sn/kernel/sn2/ptc_deadlock.S
  40. 1 1
      arch/ia64/sn/kernel/sn2/sn2_smp.c
  41. 24 24
      arch/ia64/sn/pci/pcibr/pcibr_reg.c
  42. 6 6
      arch/ia64/sn/pci/tioca_provider.c
  43. 2 2
      arch/mips/mm/init.c
  44. 1 1
      arch/powerpc/Kconfig
  45. 4 3
      arch/powerpc/configs/cell_defconfig
  46. 5 4
      arch/powerpc/configs/g5_defconfig
  47. 4 3
      arch/powerpc/configs/iseries_defconfig
  48. 5 5
      arch/powerpc/configs/maple_defconfig
  49. 4 3
      arch/powerpc/configs/ppc64_defconfig
  50. 4 3
      arch/powerpc/configs/pseries_defconfig
  51. 2 2
      arch/powerpc/kernel/entry_64.S
  52. 1 1
      arch/powerpc/kernel/kprobes.c
  53. 9 1
      arch/powerpc/kernel/setup_64.c
  54. 1 1
      arch/powerpc/kernel/syscalls.c
  55. 1 1
      arch/powerpc/mm/hash_utils_64.c
  56. 77 18
      arch/powerpc/mm/hugetlbpage.c
  57. 1 1
      arch/powerpc/mm/numa.c
  58. 1 6
      arch/powerpc/mm/stab.c
  59. 16 5
      arch/powerpc/platforms/powermac/feature.c
  60. 7 4
      arch/powerpc/platforms/pseries/iommu.c
  61. 0 12
      arch/powerpc/platforms/pseries/lpar.c
  62. 3 3
      arch/ppc/Kconfig
  63. 4 0
      arch/ppc/kernel/smp.c
  64. 2 1
      arch/ppc/platforms/85xx/mpc85xx_cds_common.c
  65. 15 5
      arch/ppc/platforms/pmac_feature.c
  66. 1 0
      arch/ppc/syslib/ppc4xx_dma.c
  67. 1 1
      arch/sparc/Makefile
  68. 12 12
      arch/sparc/kernel/ebus.c
  69. 1 1
      arch/sparc/kernel/led.c
  70. 1 1
      arch/sparc/kernel/pcic.c
  71. 2 2
      arch/sparc/kernel/time.c
  72. 0 1
      arch/sparc/lib/atomic32.c
  73. 1 1
      arch/sparc/mm/sun4c.c
  74. 0 5
      arch/sparc64/Makefile
  75. 1 1
      arch/sparc64/kernel/kprobes.c
  76. 2 0
      arch/um/Kconfig
  77. 4 0
      arch/um/Makefile-x86_64
  78. 16 13
      arch/um/include/sysdep-i386/stub.h
  79. 17 13
      arch/um/include/sysdep-x86_64/stub.h
  80. 2 0
      arch/um/include/um_uaccess.h
  81. 13 10
      arch/um/kernel/skas/clone.c
  82. 0 1
      arch/um/kernel/skas/include/uaccess-skas.h
  83. 0 5
      arch/um/scripts/Makefile.rules
  84. 1 2
      arch/x86_64/ia32/ia32_binfmt.c
  85. 1 1
      arch/x86_64/kernel/kprobes.c
  86. 1 1
      arch/x86_64/kernel/smpboot.c
  87. 4 2
      arch/x86_64/kernel/time.c
  88. 31 6
      arch/x86_64/mm/ioremap.c
  89. 3 1
      arch/x86_64/mm/numa.c
  90. 1 1
      arch/x86_64/pci/Makefile
  91. 54 11
      arch/x86_64/pci/mmconfig.c
  92. 31 14
      block/scsi_ioctl.c
  93. 1 1
      drivers/acpi/pci_link.c
  94. 1 1
      drivers/atm/adummy.c
  95. 0 1
      drivers/base/memory.c
  96. 3 4
      drivers/block/cciss.c
  97. 10 10
      drivers/char/Kconfig
  98. 8 3
      drivers/char/drm/radeon_cp.c
  99. 1 0
      drivers/char/drm/radeon_drv.h
  100. 1 1
      drivers/char/ipmi/ipmi_msghandler.c

+ 2 - 0
Documentation/arm/00-INDEX

@@ -16,5 +16,7 @@ empeg
 	- Empeg documentation
 	- Empeg documentation
 mem_alignment
 mem_alignment
 	- alignment abort handler documentation
 	- alignment abort handler documentation
+memory.txt
+	- description of the virtual memory layout
 nwfpe
 nwfpe
 	- NWFPE floating point emulator documentation
 	- NWFPE floating point emulator documentation

+ 25 - 25
Documentation/dvb/README.dvb-usb

@@ -50,12 +50,12 @@ http://www.linuxtv.org/wiki/index.php/DVB_USB
 0. History & News:
 0. History & News:
   2005-06-30 - added support for WideView WT-220U (Thanks to Steve Chang)
   2005-06-30 - added support for WideView WT-220U (Thanks to Steve Chang)
   2005-05-30 - added basic isochronous support to the dvb-usb-framework
   2005-05-30 - added basic isochronous support to the dvb-usb-framework
-               added support for Conexant Hybrid reference design and Nebula DigiTV USB
+	       added support for Conexant Hybrid reference design and Nebula DigiTV USB
   2005-04-17 - all dibusb devices ported to make use of the dvb-usb-framework
   2005-04-17 - all dibusb devices ported to make use of the dvb-usb-framework
   2005-04-02 - re-enabled and improved remote control code.
   2005-04-02 - re-enabled and improved remote control code.
   2005-03-31 - ported the Yakumo/Hama/Typhoon DVB-T USB2.0 device to dvb-usb.
   2005-03-31 - ported the Yakumo/Hama/Typhoon DVB-T USB2.0 device to dvb-usb.
   2005-03-30 - first commit of the dvb-usb-module based on the dibusb-source. First device is a new driver for the
   2005-03-30 - first commit of the dvb-usb-module based on the dibusb-source. First device is a new driver for the
-               TwinhanDTV Alpha / MagicBox II USB2.0-only DVB-T device.
+	       TwinhanDTV Alpha / MagicBox II USB2.0-only DVB-T device.
 
 
   (change from dvb-dibusb to dvb-usb)
   (change from dvb-dibusb to dvb-usb)
   2005-03-28 - added support for the AVerMedia AverTV DVB-T USB2.0 device (Thanks to Glen Harris and Jiun-Kuei Jung, AVerMedia)
   2005-03-28 - added support for the AVerMedia AverTV DVB-T USB2.0 device (Thanks to Glen Harris and Jiun-Kuei Jung, AVerMedia)
@@ -64,50 +64,50 @@ http://www.linuxtv.org/wiki/index.php/DVB_USB
   2005-02-02 - added support for the Hauppauge Win-TV Nova-T USB2
   2005-02-02 - added support for the Hauppauge Win-TV Nova-T USB2
   2005-01-31 - distorted streaming is gone for USB1.1 devices
   2005-01-31 - distorted streaming is gone for USB1.1 devices
   2005-01-13 - moved the mirrored pid_filter_table back to dvb-dibusb
   2005-01-13 - moved the mirrored pid_filter_table back to dvb-dibusb
-             - first almost working version for HanfTek UMT-010
-             - found out, that Yakumo/HAMA/Typhoon are predecessors of the HanfTek UMT-010
+	     - first almost working version for HanfTek UMT-010
+	     - found out, that Yakumo/HAMA/Typhoon are predecessors of the HanfTek UMT-010
   2005-01-10 - refactoring completed, now everything is very delightful
   2005-01-10 - refactoring completed, now everything is very delightful
-             - tuner quirks for some weird devices (Artec T1 AN2235 device has sometimes a
-               Panasonic Tuner assembled). Tunerprobing implemented. Thanks a lot to Gunnar Wittich.
+	     - tuner quirks for some weird devices (Artec T1 AN2235 device has sometimes a
+	       Panasonic Tuner assembled). Tunerprobing implemented. Thanks a lot to Gunnar Wittich.
   2004-12-29 - after several days of struggling around bug of no returning URBs fixed.
   2004-12-29 - after several days of struggling around bug of no returning URBs fixed.
   2004-12-26 - refactored the dibusb-driver, splitted into separate files
   2004-12-26 - refactored the dibusb-driver, splitted into separate files
-             - i2c-probing enabled
+	     - i2c-probing enabled
   2004-12-06 - possibility for demod i2c-address probing
   2004-12-06 - possibility for demod i2c-address probing
-             - new usb IDs (Compro, Artec)
+	     - new usb IDs (Compro, Artec)
   2004-11-23 - merged changes from DiB3000MC_ver2.1
   2004-11-23 - merged changes from DiB3000MC_ver2.1
-             - revised the debugging
-             - possibility to deliver the complete TS for USB2.0
+	     - revised the debugging
+	     - possibility to deliver the complete TS for USB2.0
   2004-11-21 - first working version of the dib3000mc/p frontend driver.
   2004-11-21 - first working version of the dib3000mc/p frontend driver.
   2004-11-12 - added additional remote control keys. Thanks to Uwe Hanke.
   2004-11-12 - added additional remote control keys. Thanks to Uwe Hanke.
   2004-11-07 - added remote control support. Thanks to David Matthews.
   2004-11-07 - added remote control support. Thanks to David Matthews.
   2004-11-05 - added support for a new devices (Grandtec/Avermedia/Artec)
   2004-11-05 - added support for a new devices (Grandtec/Avermedia/Artec)
-             - merged my changes (for dib3000mb/dibusb) to the FE_REFACTORING, because it became HEAD
-             - moved transfer control (pid filter, fifo control) from usb driver to frontend, it seems
-               better settled there (added xfer_ops-struct)
-             - created a common files for frontends (mc/p/mb)
+	     - merged my changes (for dib3000mb/dibusb) to the FE_REFACTORING, because it became HEAD
+	     - moved transfer control (pid filter, fifo control) from usb driver to frontend, it seems
+	       better settled there (added xfer_ops-struct)
+	     - created a common files for frontends (mc/p/mb)
   2004-09-28 - added support for a new device (Unkown, vendor ID is Hyper-Paltek)
   2004-09-28 - added support for a new device (Unkown, vendor ID is Hyper-Paltek)
   2004-09-20 - added support for a new device (Compro DVB-U2000), thanks
   2004-09-20 - added support for a new device (Compro DVB-U2000), thanks
-               to Amaury Demol for reporting
-             - changed usb TS transfer method (several urbs, stopping transfer
-               before setting a new pid)
+	       to Amaury Demol for reporting
+	     - changed usb TS transfer method (several urbs, stopping transfer
+	       before setting a new pid)
   2004-09-13 - added support for a new device (Artec T1 USB TVBOX), thanks
   2004-09-13 - added support for a new device (Artec T1 USB TVBOX), thanks
-               to Christian Motschke for reporting
+	       to Christian Motschke for reporting
   2004-09-05 - released the dibusb device and dib3000mb-frontend driver
   2004-09-05 - released the dibusb device and dib3000mb-frontend driver
 
 
   (old news for vp7041.c)
   (old news for vp7041.c)
   2004-07-15 - found out, by accident, that the device has a TUA6010XS for
   2004-07-15 - found out, by accident, that the device has a TUA6010XS for
-               PLL
+	       PLL
   2004-07-12 - figured out, that the driver should also work with the
   2004-07-12 - figured out, that the driver should also work with the
-               CTS Portable (Chinese Television System)
+	       CTS Portable (Chinese Television System)
   2004-07-08 - firmware-extraction-2.422-problem solved, driver is now working
   2004-07-08 - firmware-extraction-2.422-problem solved, driver is now working
-               properly with firmware extracted from 2.422
-             - #if for 2.6.4 (dvb), compile issue
-             - changed firmware handling, see vp7041.txt sec 1.1
+	       properly with firmware extracted from 2.422
+	     - #if for 2.6.4 (dvb), compile issue
+	     - changed firmware handling, see vp7041.txt sec 1.1
   2004-07-02 - some tuner modifications, v0.1, cleanups, first public
   2004-07-02 - some tuner modifications, v0.1, cleanups, first public
   2004-06-28 - now using the dvb_dmx_swfilter_packets, everything
   2004-06-28 - now using the dvb_dmx_swfilter_packets, everything
-               runs fine now
+	       runs fine now
   2004-06-27 - able to watch and switching channels (pre-alpha)
   2004-06-27 - able to watch and switching channels (pre-alpha)
-             - no section filtering yet
+	     - no section filtering yet
   2004-06-06 - first TS received, but kernel oops :/
   2004-06-06 - first TS received, but kernel oops :/
   2004-05-14 - firmware loader is working
   2004-05-14 - firmware loader is working
   2004-05-11 - start writing the driver
   2004-05-11 - start writing the driver

+ 1 - 1
Documentation/dvb/README.flexcop

@@ -174,7 +174,7 @@ Debugging
 Everything which is identical in the following table, can be put into a common
 Everything which is identical in the following table, can be put into a common
 flexcop-module.
 flexcop-module.
 
 
-                  PCI                  USB
+		  PCI                  USB
 -------------------------------------------------------------------------------
 -------------------------------------------------------------------------------
 Different:
 Different:
 Register access:  accessing IO memory  USB control message
 Register access:  accessing IO memory  USB control message

+ 1 - 1
Documentation/dvb/avermedia.txt

@@ -1,6 +1,6 @@
 
 
 HOWTO: Get An Avermedia DVB-T working under Linux
 HOWTO: Get An Avermedia DVB-T working under Linux
-           ______________________________________________
+	   ______________________________________________
 
 
    Table of Contents
    Table of Contents
    Assumptions and Introduction
    Assumptions and Introduction

+ 4 - 4
Documentation/dvb/cards.txt

@@ -16,7 +16,7 @@ Hardware supported by the linuxtv.org DVB drivers
   shielding, and the whole metal box has its own part number.
   shielding, and the whole metal box has its own part number.
 
 
 
 
-o Frontends drivers: 
+o Frontends drivers:
   - dvb_dummy_fe: for testing...
   - dvb_dummy_fe: for testing...
   DVB-S:
   DVB-S:
    - ves1x93		: Alps BSRV2 (ves1893 demodulator) and dbox2 (ves1993)
    - ves1x93		: Alps BSRV2 (ves1893 demodulator) and dbox2 (ves1993)
@@ -24,7 +24,7 @@ o Frontends drivers:
    - grundig_29504-491	: Grundig 29504-491 (Philips TDA8083 demodulator), tsa5522 PLL
    - grundig_29504-491	: Grundig 29504-491 (Philips TDA8083 demodulator), tsa5522 PLL
    - mt312		: Zarlink mt312 or Mitel vp310 demodulator, sl1935 or tsa5059 PLL
    - mt312		: Zarlink mt312 or Mitel vp310 demodulator, sl1935 or tsa5059 PLL
    - stv0299		: Alps BSRU6 (tsa5059 PLL), LG TDQB-S00x (tsa5059 PLL),
    - stv0299		: Alps BSRU6 (tsa5059 PLL), LG TDQB-S00x (tsa5059 PLL),
-   			  LG TDQF-S001F (sl1935 PLL), Philips SU1278 (tua6100 PLL), 
+			  LG TDQF-S001F (sl1935 PLL), Philips SU1278 (tua6100 PLL),
 			  Philips SU1278SH (tsa5059 PLL), Samsung TBMU24112IMB
 			  Philips SU1278SH (tsa5059 PLL), Samsung TBMU24112IMB
   DVB-C:
   DVB-C:
    - ves1820		: various (ves1820 demodulator, sp5659c or spXXXX PLL)
    - ves1820		: various (ves1820 demodulator, sp5659c or spXXXX PLL)
@@ -35,8 +35,8 @@ o Frontends drivers:
    - grundig_29504-401	: Grundig 29504-401 (LSI L64781 demodulator), tsa5060 PLL
    - grundig_29504-401	: Grundig 29504-401 (LSI L64781 demodulator), tsa5060 PLL
    - tda1004x		: Philips tda10045h (td1344 or tdm1316l PLL)
    - tda1004x		: Philips tda10045h (td1344 or tdm1316l PLL)
    - nxt6000 		: Alps TDME7 (MITEL SP5659 PLL), Alps TDED4 (TI ALP510 PLL),
    - nxt6000 		: Alps TDME7 (MITEL SP5659 PLL), Alps TDED4 (TI ALP510 PLL),
-               		  Comtech DVBT-6k07 (SP5730 PLL)
-               		  (NxtWave Communications NXT6000 demodulator)
+			  Comtech DVBT-6k07 (SP5730 PLL)
+			  (NxtWave Communications NXT6000 demodulator)
    - sp887x		: Microtune 7202D
    - sp887x		: Microtune 7202D
    - dib3000mb	: DiBcom 3000-MB demodulator
    - dib3000mb	: DiBcom 3000-MB demodulator
   DVB-S/C/T:
   DVB-S/C/T:

+ 2 - 2
Documentation/dvb/contributors.txt

@@ -15,7 +15,7 @@ Michael Holzt <kju@debian.org>
 
 
 Diego Picciani <d.picciani@novacomp.it>
 Diego Picciani <d.picciani@novacomp.it>
   for CyberLogin for Linux which allows logging onto EON
   for CyberLogin for Linux which allows logging onto EON
-  (in case you are wondering where CyberLogin is, EON changed its login 
+  (in case you are wondering where CyberLogin is, EON changed its login
   procedure and CyberLogin is no longer used.)
   procedure and CyberLogin is no longer used.)
 
 
 Martin Schaller <martin@smurf.franken.de>
 Martin Schaller <martin@smurf.franken.de>
@@ -57,7 +57,7 @@ Augusto Cardoso <augusto@carhil.net>
 Davor Emard <emard@softhome.net>
 Davor Emard <emard@softhome.net>
   for his work on the budget drivers, the demux code,
   for his work on the budget drivers, the demux code,
   the module unloading problems, ...
   the module unloading problems, ...
-  
+
 Hans-Frieder Vogt <hfvogt@arcor.de>
 Hans-Frieder Vogt <hfvogt@arcor.de>
   for his work on calculating and checking the crc's for the
   for his work on calculating and checking the crc's for the
   TechnoTrend/Hauppauge DEC driver firmware
   TechnoTrend/Hauppauge DEC driver firmware

+ 2 - 2
Documentation/dvb/readme.txt

@@ -20,7 +20,7 @@ http://linuxtv.org/downloads/
 
 
 What's inside this directory:
 What's inside this directory:
 
 
-"cards.txt" 
+"cards.txt"
 contains a list of supported hardware.
 contains a list of supported hardware.
 
 
 "contributors.txt"
 "contributors.txt"
@@ -37,7 +37,7 @@ that require it.
 contains detailed informations about the
 contains detailed informations about the
 TT DEC2000/DEC3000 USB DVB hardware.
 TT DEC2000/DEC3000 USB DVB hardware.
 
 
-"bt8xx.txt" 
+"bt8xx.txt"
 contains detailed installation instructions for the
 contains detailed installation instructions for the
 various bt8xx based "budget" DVB cards
 various bt8xx based "budget" DVB cards
 (Nebula, Pinnacle PCTV, Twinhan DST)
 (Nebula, Pinnacle PCTV, Twinhan DST)

+ 13 - 13
Documentation/filesystems/ext3.txt

@@ -57,19 +57,19 @@ oldalloc		This disables the Orlov block allocator and enables the
 			we'd like to get some feedback if it's the contrary for
 			we'd like to get some feedback if it's the contrary for
 			you.
 			you.
 
 
-user_xattr	(*)	Enables POSIX Extended Attributes. It's enabled by
-			default, however you need to confifure its support
-			(CONFIG_EXT3_FS_XATTR). This is neccesary if you want
-			to use POSIX Acces Control Lists support. You can visit
-			http://acl.bestbits.at to know more about POSIX Extended
-			attributes.
-
-nouser_xattr		Disables POSIX Extended Attributes.
-
-acl		(*)	Enables POSIX Access Control Lists support. This is
-			enabled by default, however you need to configure
-			its support (CONFIG_EXT3_FS_POSIX_ACL). If you want
-			to know more about ACLs visit http://acl.bestbits.at
+user_xattr		Enables Extended User Attributes. Additionally, you need
+			to have extended attribute support enabled in the kernel
+			configuration (CONFIG_EXT3_FS_XATTR). See the attr(5)
+			manual page and http://acl.bestbits.at to learn more
+			about extended attributes.
+
+nouser_xattr		Disables Extended User Attributes.
+
+acl			Enables POSIX Access Control Lists support.  Additionally,
+			you need to have ACL support enabled in the kernel
+			configuration (CONFIG_EXT3_FS_POSIX_ACL). See the acl(5)
+			manual page and http://acl.bestbits.at for more
+			information.
 
 
 noacl			This option disables POSIX Access Control List support.
 noacl			This option disables POSIX Access Control List support.
 
 

+ 5 - 5
MAINTAINERS

@@ -536,7 +536,7 @@ P:	Mauro Carvalho Chehab
 M:	mchehab@brturbo.com.br
 M:	mchehab@brturbo.com.br
 L:	video4linux-list@redhat.com
 L:	video4linux-list@redhat.com
 W:	http://linuxtv.org
 W:	http://linuxtv.org
-T:	quilt http://www.linuxtv.org/download/quilt/
+T:	git kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git
 S:	Maintained
 S:	Maintained
 
 
 BUSLOGIC SCSI DRIVER
 BUSLOGIC SCSI DRIVER
@@ -834,7 +834,7 @@ P:	LinuxTV.org Project
 M: 	linux-dvb-maintainer@linuxtv.org
 M: 	linux-dvb-maintainer@linuxtv.org
 L: 	linux-dvb@linuxtv.org (subscription required)
 L: 	linux-dvb@linuxtv.org (subscription required)
 W:	http://linuxtv.org/
 W:	http://linuxtv.org/
-T:	quilt http://www.linuxtv.org/download/quilt/
+T:	git kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git
 S:	Supported
 S:	Supported
 
 
 EATA-DMA SCSI DRIVER
 EATA-DMA SCSI DRIVER
@@ -1284,8 +1284,8 @@ T:	git kernel.org:/pub/scm/linux/kernel/git/roland/infiniband.git
 S:	Supported
 S:	Supported
 
 
 INPUT (KEYBOARD, MOUSE, JOYSTICK) DRIVERS
 INPUT (KEYBOARD, MOUSE, JOYSTICK) DRIVERS
-P:	Vojtech Pavlik
-M:	vojtech@suse.cz
+P:	Dmitry Torokhov
+M:	dtor_core@ameritech.net
 L:	linux-input@atrey.karlin.mff.cuni.cz
 L:	linux-input@atrey.karlin.mff.cuni.cz
 L:	linux-joystick@atrey.karlin.mff.cuni.cz
 L:	linux-joystick@atrey.karlin.mff.cuni.cz
 T:	git kernel.org:/pub/scm/linux/kernel/git/dtor/input.git
 T:	git kernel.org:/pub/scm/linux/kernel/git/dtor/input.git
@@ -2896,7 +2896,7 @@ P:	Mauro Carvalho Chehab
 M:	mchehab@brturbo.com.br
 M:	mchehab@brturbo.com.br
 L:	video4linux-list@redhat.com
 L:	video4linux-list@redhat.com
 W:	http://linuxtv.org
 W:	http://linuxtv.org
-T:	quilt http://www.linuxtv.org/download/quilt/
+T:	git kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git
 S:	Maintained
 S:	Maintained
 
 
 W1 DALLAS'S 1-WIRE BUS
 W1 DALLAS'S 1-WIRE BUS

+ 3 - 3
Makefile

@@ -1,8 +1,8 @@
 VERSION = 2
 VERSION = 2
 PATCHLEVEL = 6
 PATCHLEVEL = 6
 SUBLEVEL = 15
 SUBLEVEL = 15
-EXTRAVERSION =-rc5
-NAME=Affluent Albatross
+EXTRAVERSION =-rc6
+NAME=Sliding Snow Leopard
 
 
 # *DOCUMENTATION*
 # *DOCUMENTATION*
 # To see a list of typical targets execute "make help"
 # To see a list of typical targets execute "make help"
@@ -408,7 +408,7 @@ outputmakefile:
 # of make so .config is not included in this case either (for *config).
 # of make so .config is not included in this case either (for *config).
 
 
 no-dot-config-targets := clean mrproper distclean \
 no-dot-config-targets := clean mrproper distclean \
-			 cscope TAGS tags help %docs check% kernelrelease
+			 cscope TAGS tags help %docs check%
 
 
 config-targets := 0
 config-targets := 0
 mixed-targets  := 0
 mixed-targets  := 0

+ 1 - 1
arch/alpha/kernel/machvec_impl.h

@@ -41,7 +41,7 @@
 #define CAT1(x,y)  x##y
 #define CAT1(x,y)  x##y
 #define CAT(x,y)   CAT1(x,y)
 #define CAT(x,y)   CAT1(x,y)
 
 
-#define DO_DEFAULT_RTC rtc_port: 0x70
+#define DO_DEFAULT_RTC .rtc_port = 0x70
 
 
 #define DO_EV4_MMU							\
 #define DO_EV4_MMU							\
 	.max_asn =			EV4_MAX_ASN,			\
 	.max_asn =			EV4_MAX_ASN,			\

+ 4 - 4
arch/arm/kernel/calls.S

@@ -131,7 +131,7 @@ __syscall_start:
 		.long	sys_wait4
 		.long	sys_wait4
 /* 115 */	.long	sys_swapoff
 /* 115 */	.long	sys_swapoff
 		.long	sys_sysinfo
 		.long	sys_sysinfo
-		.long	sys_ipc_wrapper
+		.long	sys_ipc
 		.long	sys_fsync
 		.long	sys_fsync
 		.long	sys_sigreturn_wrapper
 		.long	sys_sigreturn_wrapper
 /* 120 */	.long	sys_clone_wrapper
 /* 120 */	.long	sys_clone_wrapper
@@ -254,7 +254,7 @@ __syscall_start:
 		.long	sys_fremovexattr
 		.long	sys_fremovexattr
 		.long	sys_tkill
 		.long	sys_tkill
 		.long	sys_sendfile64
 		.long	sys_sendfile64
-/* 240 */	.long	sys_futex_wrapper
+/* 240 */	.long	sys_futex
 		.long	sys_sched_setaffinity
 		.long	sys_sched_setaffinity
 		.long	sys_sched_getaffinity
 		.long	sys_sched_getaffinity
 		.long	sys_io_setup
 		.long	sys_io_setup
@@ -284,7 +284,7 @@ __syscall_start:
 		.long	sys_fstatfs64
 		.long	sys_fstatfs64
 		.long	sys_tgkill
 		.long	sys_tgkill
 		.long	sys_utimes
 		.long	sys_utimes
-/* 270 */	.long	sys_arm_fadvise64_64_wrapper
+/* 270 */	.long	sys_arm_fadvise64_64
 		.long	sys_pciconfig_iobase
 		.long	sys_pciconfig_iobase
 		.long	sys_pciconfig_read
 		.long	sys_pciconfig_read
 		.long	sys_pciconfig_write
 		.long	sys_pciconfig_write
@@ -333,7 +333,7 @@ __syscall_start:
 		.long	sys_inotify_init
 		.long	sys_inotify_init
 		.long	sys_inotify_add_watch
 		.long	sys_inotify_add_watch
 		.long	sys_inotify_rm_watch
 		.long	sys_inotify_rm_watch
-		.long	sys_mbind_wrapper
+		.long	sys_mbind
 /* 320 */	.long	sys_get_mempolicy
 /* 320 */	.long	sys_get_mempolicy
 		.long	sys_set_mempolicy
 		.long	sys_set_mempolicy
 __syscall_end:
 __syscall_end:

+ 49 - 0
arch/arm/kernel/entry-armv.S

@@ -611,6 +611,47 @@ ENTRY(__switch_to)
 	.globl	__kuser_helper_start
 	.globl	__kuser_helper_start
 __kuser_helper_start:
 __kuser_helper_start:
 
 
+/*
+ * Reference prototype:
+ *
+ *	void __kernel_memory_barrier(void)
+ *
+ * Input:
+ *
+ *	lr = return address
+ *
+ * Output:
+ *
+ *	none
+ *
+ * Clobbered:
+ *
+ *	the Z flag might be lost
+ *
+ * Definition and user space usage example:
+ *
+ *	typedef void (__kernel_dmb_t)(void);
+ *	#define __kernel_dmb (*(__kernel_dmb_t *)0xffff0fa0)
+ *
+ * Apply any needed memory barrier to preserve consistency with data modified
+ * manually and __kuser_cmpxchg usage.
+ *
+ * This could be used as follows:
+ *
+ * #define __kernel_dmb() \
+ *         asm volatile ( "mov r0, #0xffff0fff; mov lr, pc; sub pc, r0, #95" \
+ *	        : : : "lr","cc" )
+ */
+
+__kuser_memory_barrier:				@ 0xffff0fa0
+
+#if __LINUX_ARM_ARCH__ >= 6 && defined(CONFIG_SMP)
+	mcr	p15, 0, r0, c7, c10, 5	@ dmb
+#endif
+	mov	pc, lr
+
+	.align	5
+
 /*
 /*
  * Reference prototype:
  * Reference prototype:
  *
  *
@@ -642,6 +683,8 @@ __kuser_helper_start:
  * The C flag is also set if *ptr was changed to allow for assembly
  * The C flag is also set if *ptr was changed to allow for assembly
  * optimization in the calling code.
  * optimization in the calling code.
  *
  *
+ * Note: this routine already includes memory barriers as needed.
+ *
  * For example, a user space atomic_add implementation could look like this:
  * For example, a user space atomic_add implementation could look like this:
  *
  *
  * #define atomic_add(ptr, val) \
  * #define atomic_add(ptr, val) \
@@ -698,10 +741,16 @@ __kuser_cmpxchg:				@ 0xffff0fc0
 
 
 #else
 #else
 
 
+#ifdef CONFIG_SMP
+	mcr	p15, 0, r0, c7, c10, 5	@ dmb
+#endif
 	ldrex	r3, [r2]
 	ldrex	r3, [r2]
 	subs	r3, r3, r0
 	subs	r3, r3, r0
 	strexeq	r3, r1, [r2]
 	strexeq	r3, r1, [r2]
 	rsbs	r0, r3, #0
 	rsbs	r0, r3, #0
+#ifdef CONFIG_SMP
+	mcr	p15, 0, r0, c7, c10, 5	@ dmb
+#endif
 	mov	pc, lr
 	mov	pc, lr
 
 
 #endif
 #endif

+ 2 - 18
arch/arm/kernel/entry-common.S

@@ -145,7 +145,7 @@ ENTRY(vector_swi)
 #endif
 #endif
 	enable_irq
 	enable_irq
 
 
-	str	r4, [sp, #-S_OFF]!		@ push fifth arg
+	stmdb	sp!, {r4, r5}			@ push fifth and sixth args
 
 
 	get_thread_info tsk
 	get_thread_info tsk
 	ldr	ip, [tsk, #TI_FLAGS]		@ check for syscall tracing
 	ldr	ip, [tsk, #TI_FLAGS]		@ check for syscall tracing
@@ -204,7 +204,7 @@ ENTRY(sys_call_table)
  * Special system call wrappers
  * Special system call wrappers
  */
  */
 @ r0 = syscall number
 @ r0 = syscall number
-@ r5 = syscall table
+@ r8 = syscall table
 		.type	sys_syscall, #function
 		.type	sys_syscall, #function
 sys_syscall:
 sys_syscall:
 		eor	scno, r0, #__NR_SYSCALL_BASE
 		eor	scno, r0, #__NR_SYSCALL_BASE
@@ -255,22 +255,6 @@ sys_sigaltstack_wrapper:
 		ldr	r2, [sp, #S_OFF + S_SP]
 		ldr	r2, [sp, #S_OFF + S_SP]
 		b	do_sigaltstack
 		b	do_sigaltstack
 
 
-sys_futex_wrapper:
-		str	r5, [sp, #4]		@ push sixth arg
-		b	sys_futex
-
-sys_arm_fadvise64_64_wrapper:
-		str	r5, [sp, #4]		@ push r5 to stack
-		b	sys_arm_fadvise64_64
-
-sys_mbind_wrapper:
-		str	r5, [sp, #4]
-		b	sys_mbind
-
-sys_ipc_wrapper:
-		str	r5, [sp, #4]		@ push sixth arg
-		b	sys_ipc
-
 /*
 /*
  * Note: off_4k (r5) is always units of 4K.  If we can't do the requested
  * Note: off_4k (r5) is always units of 4K.  If we can't do the requested
  * offset, we return EINVAL.
  * offset, we return EINVAL.

+ 2 - 0
arch/arm/kernel/module.c

@@ -101,6 +101,8 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex,
 			break;
 			break;
 
 
 		case R_ARM_PC24:
 		case R_ARM_PC24:
+		case R_ARM_CALL:
+		case R_ARM_JUMP24:
 			offset = (*(u32 *)loc & 0x00ffffff) << 2;
 			offset = (*(u32 *)loc & 0x00ffffff) << 2;
 			if (offset & 0x02000000)
 			if (offset & 0x02000000)
 				offset -= 0x04000000;
 				offset -= 0x04000000;

+ 9 - 0
arch/arm/kernel/ptrace.c

@@ -242,6 +242,15 @@ get_branch_address(struct task_struct *child, unsigned long pc, unsigned long in
 		 */
 		 */
 		long aluop1, aluop2, ccbit;
 		long aluop1, aluop2, ccbit;
 
 
+	        if ((insn & 0x0fffffd0) == 0x012fff10) {
+		        /*
+			 * bx or blx
+			 */
+			alt = get_user_reg(child, insn & 15);
+			break;
+		}
+
+
 		if ((insn & 0xf000) != 0xf000)
 		if ((insn & 0xf000) != 0xf000)
 			break;
 			break;
 
 

+ 5 - 4
arch/arm/mach-pxa/pm.c

@@ -155,19 +155,20 @@ int pxa_pm_enter(suspend_state_t state)
 	PSPR = 0;
 	PSPR = 0;
 
 
 	/* restore registers */
 	/* restore registers */
+	RESTORE_GPLEVEL(0); RESTORE_GPLEVEL(1); RESTORE_GPLEVEL(2);
+	RESTORE(GPDR0); RESTORE(GPDR1); RESTORE(GPDR2);
 	RESTORE(GAFR0_L); RESTORE(GAFR0_U);
 	RESTORE(GAFR0_L); RESTORE(GAFR0_U);
 	RESTORE(GAFR1_L); RESTORE(GAFR1_U);
 	RESTORE(GAFR1_L); RESTORE(GAFR1_U);
 	RESTORE(GAFR2_L); RESTORE(GAFR2_U);
 	RESTORE(GAFR2_L); RESTORE(GAFR2_U);
-	RESTORE_GPLEVEL(0); RESTORE_GPLEVEL(1); RESTORE_GPLEVEL(2);
-	RESTORE(GPDR0); RESTORE(GPDR1); RESTORE(GPDR2);
 	RESTORE(GRER0); RESTORE(GRER1); RESTORE(GRER2);
 	RESTORE(GRER0); RESTORE(GRER1); RESTORE(GRER2);
 	RESTORE(GFER0); RESTORE(GFER1); RESTORE(GFER2);
 	RESTORE(GFER0); RESTORE(GFER1); RESTORE(GFER2);
 	RESTORE(PGSR0); RESTORE(PGSR1); RESTORE(PGSR2);
 	RESTORE(PGSR0); RESTORE(PGSR1); RESTORE(PGSR2);
 
 
 #ifdef CONFIG_PXA27x
 #ifdef CONFIG_PXA27x
 	RESTORE(MDREFR);
 	RESTORE(MDREFR);
-	RESTORE(GAFR3_L); RESTORE(GAFR3_U); RESTORE_GPLEVEL(3);
-	RESTORE(GPDR3); RESTORE(GRER3); RESTORE(GFER3); RESTORE(PGSR3);
+	RESTORE_GPLEVEL(3); RESTORE(GPDR3);
+	RESTORE(GAFR3_L); RESTORE(GAFR3_U);
+	RESTORE(GRER3); RESTORE(GFER3); RESTORE(PGSR3);
 	RESTORE(PWER); RESTORE(PCFR); RESTORE(PRER);
 	RESTORE(PWER); RESTORE(PCFR); RESTORE(PRER);
 	RESTORE(PFER); RESTORE(PKWR);
 	RESTORE(PFER); RESTORE(PKWR);
 #endif
 #endif

+ 1 - 1
arch/i386/kernel/kprobes.c

@@ -191,7 +191,7 @@ static int __kprobes kprobe_handler(struct pt_regs *regs)
 			 */
 			 */
 			save_previous_kprobe(kcb);
 			save_previous_kprobe(kcb);
 			set_current_kprobe(p, regs, kcb);
 			set_current_kprobe(p, regs, kcb);
-			p->nmissed++;
+			kprobes_inc_nmissed_count(p);
 			prepare_singlestep(p, regs);
 			prepare_singlestep(p, regs);
 			kcb->kprobe_status = KPROBE_REENTER;
 			kcb->kprobe_status = KPROBE_REENTER;
 			return 1;
 			return 1;

+ 1 - 2
arch/i386/kernel/smpboot.c

@@ -1338,8 +1338,7 @@ int __cpu_disable(void)
 	if (cpu == 0)
 	if (cpu == 0)
 		return -EBUSY;
 		return -EBUSY;
 
 
-	/* We enable the timer again on the exit path of the death loop */
-	disable_APIC_timer();
+	clear_local_APIC();
 	/* Allow any queued timer interrupts to get serviced */
 	/* Allow any queued timer interrupts to get serviced */
 	local_irq_enable();
 	local_irq_enable();
 	mdelay(1);
 	mdelay(1);

+ 0 - 7
arch/i386/kernel/traps.c

@@ -650,13 +650,6 @@ fastcall void do_nmi(struct pt_regs * regs, long error_code)
 
 
 	cpu = smp_processor_id();
 	cpu = smp_processor_id();
 
 
-#ifdef CONFIG_HOTPLUG_CPU
-	if (!cpu_online(cpu)) {
-		nmi_exit();
-		return;
-	}
-#endif
-
 	++nmi_count(cpu);
 	++nmi_count(cpu);
 
 
 	if (!rcu_dereference(nmi_callback)(regs, cpu))
 	if (!rcu_dereference(nmi_callback)(regs, cpu))

+ 29 - 8
arch/i386/mm/ioremap.c

@@ -223,9 +223,15 @@ void __iomem *ioremap_nocache (unsigned long phys_addr, unsigned long size)
 }
 }
 EXPORT_SYMBOL(ioremap_nocache);
 EXPORT_SYMBOL(ioremap_nocache);
 
 
+/**
+ * iounmap - Free a IO remapping
+ * @addr: virtual address from ioremap_*
+ *
+ * Caller must ensure there is only one unmapping for the same pointer.
+ */
 void iounmap(volatile void __iomem *addr)
 void iounmap(volatile void __iomem *addr)
 {
 {
-	struct vm_struct *p;
+	struct vm_struct *p, *o;
 
 
 	if ((void __force *)addr <= high_memory)
 	if ((void __force *)addr <= high_memory)
 		return;
 		return;
@@ -239,22 +245,37 @@ void iounmap(volatile void __iomem *addr)
 			addr < phys_to_virt(ISA_END_ADDRESS))
 			addr < phys_to_virt(ISA_END_ADDRESS))
 		return;
 		return;
 
 
-	write_lock(&vmlist_lock);
-	p = __remove_vm_area((void *)(PAGE_MASK & (unsigned long __force)addr));
-	if (!p) { 
-		printk(KERN_WARNING "iounmap: bad address %p\n", addr);
+	addr = (volatile void __iomem *)(PAGE_MASK & (unsigned long __force)addr);
+
+	/* Use the vm area unlocked, assuming the caller
+	   ensures there isn't another iounmap for the same address
+	   in parallel. Reuse of the virtual address is prevented by
+	   leaving it in the global lists until we're done with it.
+	   cpa takes care of the direct mappings. */
+	read_lock(&vmlist_lock);
+	for (p = vmlist; p; p = p->next) {
+		if (p->addr == addr)
+			break;
+	}
+	read_unlock(&vmlist_lock);
+
+	if (!p) {
+		printk("iounmap: bad address %p\n", addr);
 		dump_stack();
 		dump_stack();
-		goto out_unlock;
+		return;
 	}
 	}
 
 
+	/* Reset the direct mapping. Can block */
 	if ((p->flags >> 20) && p->phys_addr < virt_to_phys(high_memory) - 1) {
 	if ((p->flags >> 20) && p->phys_addr < virt_to_phys(high_memory) - 1) {
 		change_page_attr(virt_to_page(__va(p->phys_addr)),
 		change_page_attr(virt_to_page(__va(p->phys_addr)),
 				 p->size >> PAGE_SHIFT,
 				 p->size >> PAGE_SHIFT,
 				 PAGE_KERNEL);
 				 PAGE_KERNEL);
 		global_flush_tlb();
 		global_flush_tlb();
 	} 
 	} 
-out_unlock:
-	write_unlock(&vmlist_lock);
+
+	/* Finally remove it */
+	o = remove_vm_area((void *)addr);
+	BUG_ON(p != o || o == NULL);
 	kfree(p); 
 	kfree(p); 
 }
 }
 EXPORT_SYMBOL(iounmap);
 EXPORT_SYMBOL(iounmap);

+ 1 - 1
arch/i386/pci/Makefile

@@ -1,7 +1,7 @@
 obj-y				:= i386.o
 obj-y				:= i386.o
 
 
 obj-$(CONFIG_PCI_BIOS)		+= pcbios.o
 obj-$(CONFIG_PCI_BIOS)		+= pcbios.o
-obj-$(CONFIG_PCI_MMCONFIG)	+= mmconfig.o
+obj-$(CONFIG_PCI_MMCONFIG)	+= mmconfig.o direct.o
 obj-$(CONFIG_PCI_DIRECT)	+= direct.o
 obj-$(CONFIG_PCI_DIRECT)	+= direct.o
 
 
 pci-y				:= fixup.o
 pci-y				:= fixup.o

+ 2 - 2
arch/i386/pci/direct.c

@@ -13,7 +13,7 @@
 #define PCI_CONF1_ADDRESS(bus, devfn, reg) \
 #define PCI_CONF1_ADDRESS(bus, devfn, reg) \
 	(0x80000000 | (bus << 16) | (devfn << 8) | (reg & ~3))
 	(0x80000000 | (bus << 16) | (devfn << 8) | (reg & ~3))
 
 
-static int pci_conf1_read(unsigned int seg, unsigned int bus,
+int pci_conf1_read(unsigned int seg, unsigned int bus,
 			  unsigned int devfn, int reg, int len, u32 *value)
 			  unsigned int devfn, int reg, int len, u32 *value)
 {
 {
 	unsigned long flags;
 	unsigned long flags;
@@ -42,7 +42,7 @@ static int pci_conf1_read(unsigned int seg, unsigned int bus,
 	return 0;
 	return 0;
 }
 }
 
 
-static int pci_conf1_write(unsigned int seg, unsigned int bus,
+int pci_conf1_write(unsigned int seg, unsigned int bus,
 			   unsigned int devfn, int reg, int len, u32 value)
 			   unsigned int devfn, int reg, int len, u32 value)
 {
 {
 	unsigned long flags;
 	unsigned long flags;

+ 56 - 9
arch/i386/pci/mmconfig.c

@@ -19,21 +19,25 @@
 /* The base address of the last MMCONFIG device accessed */
 /* The base address of the last MMCONFIG device accessed */
 static u32 mmcfg_last_accessed_device;
 static u32 mmcfg_last_accessed_device;
 
 
+static DECLARE_BITMAP(fallback_slots, 32);
+
 /*
 /*
  * Functions for accessing PCI configuration space with MMCONFIG accesses
  * Functions for accessing PCI configuration space with MMCONFIG accesses
  */
  */
-static u32 get_base_addr(unsigned int seg, int bus)
+static u32 get_base_addr(unsigned int seg, int bus, unsigned devfn)
 {
 {
 	int cfg_num = -1;
 	int cfg_num = -1;
 	struct acpi_table_mcfg_config *cfg;
 	struct acpi_table_mcfg_config *cfg;
 
 
+	if (seg == 0 && bus == 0 &&
+	    test_bit(PCI_SLOT(devfn), fallback_slots))
+		return 0;
+
 	while (1) {
 	while (1) {
 		++cfg_num;
 		++cfg_num;
 		if (cfg_num >= pci_mmcfg_config_num) {
 		if (cfg_num >= pci_mmcfg_config_num) {
-			/* something bad is going on, no cfg table is found. */
-			/* so we fall back to the old way we used to do this */
-			/* and just rely on the first entry to be correct. */
-			return pci_mmcfg_config[0].base_address;
+			/* Not found - fallback to type 1 */
+			return 0;
 		}
 		}
 		cfg = &pci_mmcfg_config[cfg_num];
 		cfg = &pci_mmcfg_config[cfg_num];
 		if (cfg->pci_segment_group_number != seg)
 		if (cfg->pci_segment_group_number != seg)
@@ -44,9 +48,9 @@ static u32 get_base_addr(unsigned int seg, int bus)
 	}
 	}
 }
 }
 
 
-static inline void pci_exp_set_dev_base(unsigned int seg, int bus, int devfn)
+static inline void pci_exp_set_dev_base(unsigned int base, int bus, int devfn)
 {
 {
-	u32 dev_base = get_base_addr(seg, bus) | (bus << 20) | (devfn << 12);
+	u32 dev_base = base | (bus << 20) | (devfn << 12);
 	if (dev_base != mmcfg_last_accessed_device) {
 	if (dev_base != mmcfg_last_accessed_device) {
 		mmcfg_last_accessed_device = dev_base;
 		mmcfg_last_accessed_device = dev_base;
 		set_fixmap_nocache(FIX_PCIE_MCFG, dev_base);
 		set_fixmap_nocache(FIX_PCIE_MCFG, dev_base);
@@ -57,13 +61,18 @@ static int pci_mmcfg_read(unsigned int seg, unsigned int bus,
 			  unsigned int devfn, int reg, int len, u32 *value)
 			  unsigned int devfn, int reg, int len, u32 *value)
 {
 {
 	unsigned long flags;
 	unsigned long flags;
+	u32 base;
 
 
 	if (!value || (bus > 255) || (devfn > 255) || (reg > 4095))
 	if (!value || (bus > 255) || (devfn > 255) || (reg > 4095))
 		return -EINVAL;
 		return -EINVAL;
 
 
+	base = get_base_addr(seg, bus, devfn);
+	if (!base)
+		return pci_conf1_read(seg,bus,devfn,reg,len,value);
+
 	spin_lock_irqsave(&pci_config_lock, flags);
 	spin_lock_irqsave(&pci_config_lock, flags);
 
 
-	pci_exp_set_dev_base(seg, bus, devfn);
+	pci_exp_set_dev_base(base, bus, devfn);
 
 
 	switch (len) {
 	switch (len) {
 	case 1:
 	case 1:
@@ -86,13 +95,18 @@ static int pci_mmcfg_write(unsigned int seg, unsigned int bus,
 			   unsigned int devfn, int reg, int len, u32 value)
 			   unsigned int devfn, int reg, int len, u32 value)
 {
 {
 	unsigned long flags;
 	unsigned long flags;
+	u32 base;
 
 
 	if ((bus > 255) || (devfn > 255) || (reg > 4095)) 
 	if ((bus > 255) || (devfn > 255) || (reg > 4095)) 
 		return -EINVAL;
 		return -EINVAL;
 
 
+	base = get_base_addr(seg, bus, devfn);
+	if (!base)
+		return pci_conf1_write(seg,bus,devfn,reg,len,value);
+
 	spin_lock_irqsave(&pci_config_lock, flags);
 	spin_lock_irqsave(&pci_config_lock, flags);
 
 
-	pci_exp_set_dev_base(seg, bus, devfn);
+	pci_exp_set_dev_base(base, bus, devfn);
 
 
 	switch (len) {
 	switch (len) {
 	case 1:
 	case 1:
@@ -116,6 +130,37 @@ static struct pci_raw_ops pci_mmcfg = {
 	.write =	pci_mmcfg_write,
 	.write =	pci_mmcfg_write,
 };
 };
 
 
+/* K8 systems have some devices (typically in the builtin northbridge)
+   that are only accessible using type1
+   Normally this can be expressed in the MCFG by not listing them
+   and assigning suitable _SEGs, but this isn't implemented in some BIOS.
+   Instead try to discover all devices on bus 0 that are unreachable using MM
+   and fallback for them.
+   We only do this for bus 0/seg 0 */
+static __init void unreachable_devices(void)
+{
+	int i;
+	unsigned long flags;
+
+	for (i = 0; i < 32; i++) {
+		u32 val1;
+		u32 addr;
+
+		pci_conf1_read(0, 0, PCI_DEVFN(i, 0), 0, 4, &val1);
+		if (val1 == 0xffffffff)
+			continue;
+
+		/* Locking probably not needed, but safer */
+		spin_lock_irqsave(&pci_config_lock, flags);
+		addr = get_base_addr(0, 0, PCI_DEVFN(i, 0));
+		if (addr != 0)
+			pci_exp_set_dev_base(addr, 0, PCI_DEVFN(i, 0));
+		if (addr == 0 || readl((u32 __iomem *)mmcfg_virt_addr) != val1)
+			set_bit(i, fallback_slots);
+		spin_unlock_irqrestore(&pci_config_lock, flags);
+	}
+}
+
 static int __init pci_mmcfg_init(void)
 static int __init pci_mmcfg_init(void)
 {
 {
 	if ((pci_probe & PCI_PROBE_MMCONF) == 0)
 	if ((pci_probe & PCI_PROBE_MMCONF) == 0)
@@ -131,6 +176,8 @@ static int __init pci_mmcfg_init(void)
 	raw_pci_ops = &pci_mmcfg;
 	raw_pci_ops = &pci_mmcfg;
 	pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF;
 	pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF;
 
 
+	unreachable_devices();
+
  out:
  out:
 	return 0;
 	return 0;
 }
 }

+ 7 - 0
arch/i386/pci/pci.h

@@ -74,3 +74,10 @@ extern spinlock_t pci_config_lock;
 
 
 extern int (*pcibios_enable_irq)(struct pci_dev *dev);
 extern int (*pcibios_enable_irq)(struct pci_dev *dev);
 extern void (*pcibios_disable_irq)(struct pci_dev *dev);
 extern void (*pcibios_disable_irq)(struct pci_dev *dev);
+
+extern int pci_conf1_write(unsigned int seg, unsigned int bus,
+			   unsigned int devfn, int reg, int len, u32 value);
+extern int pci_conf1_read(unsigned int seg, unsigned int bus,
+			  unsigned int devfn, int reg, int len, u32 *value);
+
+

+ 1 - 1
arch/ia64/Kconfig

@@ -58,7 +58,7 @@ config IA64_UNCACHED_ALLOCATOR
 	bool
 	bool
 	select GENERIC_ALLOCATOR
 	select GENERIC_ALLOCATOR
 
 
-config ZONE_DMA_IS_DMA32
+config DMA_IS_DMA32
 	bool
 	bool
 	default y
 	default y
 
 

+ 110 - 44
arch/ia64/configs/sn2_defconfig

@@ -1,7 +1,7 @@
 #
 #
 # Automatically generated make config: don't edit
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.13-rc6
-# Tue Aug 16 14:40:41 2005
+# Linux kernel version: 2.6.15-rc4
+# Fri Dec  2 10:33:48 2005
 #
 #
 
 
 #
 #
@@ -16,6 +16,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
 # General setup
 # General setup
 #
 #
 CONFIG_LOCALVERSION=""
 CONFIG_LOCALVERSION=""
+# CONFIG_LOCALVERSION_AUTO is not set
 CONFIG_SWAP=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
 CONFIG_SYSVIPC=y
 CONFIG_POSIX_MQUEUE=y
 CONFIG_POSIX_MQUEUE=y
@@ -26,6 +27,7 @@ CONFIG_HOTPLUG=y
 CONFIG_KOBJECT_UEVENT=y
 CONFIG_KOBJECT_UEVENT=y
 # CONFIG_IKCONFIG is not set
 # CONFIG_IKCONFIG is not set
 CONFIG_CPUSETS=y
 CONFIG_CPUSETS=y
+CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_EMBEDDED is not set
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
 CONFIG_KALLSYMS=y
 CONFIG_KALLSYMS_ALL=y
 CONFIG_KALLSYMS_ALL=y
@@ -55,12 +57,30 @@ CONFIG_OBSOLETE_MODPARM=y
 CONFIG_KMOD=y
 CONFIG_KMOD=y
 CONFIG_STOP_MACHINE=y
 CONFIG_STOP_MACHINE=y
 
 
+#
+# Block layer
+#
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
 #
 #
 # Processor type and features
 # Processor type and features
 #
 #
 CONFIG_IA64=y
 CONFIG_IA64=y
 CONFIG_64BIT=y
 CONFIG_64BIT=y
 CONFIG_MMU=y
 CONFIG_MMU=y
+CONFIG_SWIOTLB=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_TIME_INTERPOLATION=y
 CONFIG_TIME_INTERPOLATION=y
@@ -68,6 +88,7 @@ CONFIG_EFI=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_IA64_UNCACHED_ALLOCATOR=y
 CONFIG_IA64_UNCACHED_ALLOCATOR=y
+CONFIG_ZONE_DMA_IS_DMA32=y
 # CONFIG_IA64_GENERIC is not set
 # CONFIG_IA64_GENERIC is not set
 # CONFIG_IA64_DIG is not set
 # CONFIG_IA64_DIG is not set
 # CONFIG_IA64_HP_ZX1 is not set
 # CONFIG_IA64_HP_ZX1 is not set
@@ -87,16 +108,12 @@ CONFIG_HZ_250=y
 # CONFIG_HZ_1000 is not set
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
 CONFIG_HZ=250
 CONFIG_IA64_L1_CACHE_SHIFT=7
 CONFIG_IA64_L1_CACHE_SHIFT=7
-CONFIG_NUMA=y
-CONFIG_VIRTUAL_MEM_MAP=y
-CONFIG_HOLES_IN_ZONE=y
-CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
 # CONFIG_IA64_CYCLONE is not set
 # CONFIG_IA64_CYCLONE is not set
 CONFIG_IOSAPIC=y
 CONFIG_IOSAPIC=y
 CONFIG_IA64_SGI_SN_XP=m
 CONFIG_IA64_SGI_SN_XP=m
-CONFIG_FORCE_MAX_ZONEORDER=18
+CONFIG_FORCE_MAX_ZONEORDER=17
 CONFIG_SMP=y
 CONFIG_SMP=y
-CONFIG_NR_CPUS=512
+CONFIG_NR_CPUS=1024
 # CONFIG_HOTPLUG_CPU is not set
 # CONFIG_HOTPLUG_CPU is not set
 CONFIG_SCHED_SMT=y
 CONFIG_SCHED_SMT=y
 CONFIG_PREEMPT=y
 CONFIG_PREEMPT=y
@@ -107,7 +124,17 @@ CONFIG_DISCONTIGMEM_MANUAL=y
 CONFIG_DISCONTIGMEM=y
 CONFIG_DISCONTIGMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 CONFIG_NEED_MULTIPLE_NODES=y
 CONFIG_NEED_MULTIPLE_NODES=y
-CONFIG_HAVE_DEC_LOCK=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y
+CONFIG_NUMA=y
+CONFIG_VIRTUAL_MEM_MAP=y
+CONFIG_HOLES_IN_ZONE=y
+CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
 CONFIG_IA32_SUPPORT=y
 CONFIG_IA32_SUPPORT=y
 CONFIG_COMPAT=y
 CONFIG_COMPAT=y
 CONFIG_IA64_MCA_RECOVERY=y
 CONFIG_IA64_MCA_RECOVERY=y
@@ -126,20 +153,28 @@ CONFIG_BINFMT_ELF=y
 # Power management and ACPI
 # Power management and ACPI
 #
 #
 CONFIG_PM=y
 CONFIG_PM=y
-CONFIG_ACPI=y
+# CONFIG_PM_LEGACY is not set
+# CONFIG_PM_DEBUG is not set
 
 
 #
 #
 # ACPI (Advanced Configuration and Power Interface) Support
 # ACPI (Advanced Configuration and Power Interface) Support
 #
 #
+CONFIG_ACPI=y
 # CONFIG_ACPI_BUTTON is not set
 # CONFIG_ACPI_BUTTON is not set
 # CONFIG_ACPI_FAN is not set
 # CONFIG_ACPI_FAN is not set
 # CONFIG_ACPI_PROCESSOR is not set
 # CONFIG_ACPI_PROCESSOR is not set
 CONFIG_ACPI_NUMA=y
 CONFIG_ACPI_NUMA=y
+CONFIG_ACPI_BLACKLIST_YEAR=0
 # CONFIG_ACPI_DEBUG is not set
 # CONFIG_ACPI_DEBUG is not set
 CONFIG_ACPI_POWER=y
 CONFIG_ACPI_POWER=y
 CONFIG_ACPI_SYSTEM=y
 CONFIG_ACPI_SYSTEM=y
 # CONFIG_ACPI_CONTAINER is not set
 # CONFIG_ACPI_CONTAINER is not set
 
 
+#
+# CPU Frequency scaling
+#
+# CONFIG_CPU_FREQ is not set
+
 #
 #
 # Bus options (PCI, PCMCIA)
 # Bus options (PCI, PCMCIA)
 #
 #
@@ -147,7 +182,6 @@ CONFIG_PCI=y
 CONFIG_PCI_DOMAINS=y
 CONFIG_PCI_DOMAINS=y
 # CONFIG_PCI_MSI is not set
 # CONFIG_PCI_MSI is not set
 CONFIG_PCI_LEGACY_PROC=y
 CONFIG_PCI_LEGACY_PROC=y
-CONFIG_PCI_NAMES=y
 # CONFIG_PCI_DEBUG is not set
 # CONFIG_PCI_DEBUG is not set
 
 
 #
 #
@@ -191,8 +225,8 @@ CONFIG_SYN_COOKIES=y
 # CONFIG_INET_ESP is not set
 # CONFIG_INET_ESP is not set
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_IPCOMP is not set
 # CONFIG_INET_TUNNEL is not set
 # CONFIG_INET_TUNNEL is not set
-CONFIG_IP_TCPDIAG=y
-# CONFIG_IP_TCPDIAG_IPV6 is not set
+CONFIG_INET_DIAG=m
+CONFIG_INET_TCP_DIAG=m
 # CONFIG_TCP_CONG_ADVANCED is not set
 # CONFIG_TCP_CONG_ADVANCED is not set
 CONFIG_TCP_CONG_BIC=y
 CONFIG_TCP_CONG_BIC=y
 CONFIG_IPV6=m
 CONFIG_IPV6=m
@@ -204,6 +238,11 @@ CONFIG_IPV6=m
 # CONFIG_IPV6_TUNNEL is not set
 # CONFIG_IPV6_TUNNEL is not set
 # CONFIG_NETFILTER is not set
 # CONFIG_NETFILTER is not set
 
 
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
 #
 #
 # SCTP Configuration (EXPERIMENTAL)
 # SCTP Configuration (EXPERIMENTAL)
 #
 #
@@ -220,8 +259,11 @@ CONFIG_IPV6=m
 # CONFIG_NET_DIVERT is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
 # CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
 # CONFIG_NET_SCHED is not set
 # CONFIG_NET_SCHED is not set
-# CONFIG_NET_CLS_ROUTE is not set
 
 
 #
 #
 # Network testing
 # Network testing
@@ -230,6 +272,7 @@ CONFIG_IPV6=m
 # CONFIG_HAMRADIO is not set
 # CONFIG_HAMRADIO is not set
 # CONFIG_IRDA is not set
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
 
 
 #
 #
 # Device Drivers
 # Device Drivers
@@ -243,6 +286,11 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
 CONFIG_FW_LOADER=y
 CONFIG_FW_LOADER=y
 # CONFIG_DEBUG_DRIVER is not set
 # CONFIG_DEBUG_DRIVER is not set
 
 
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
 #
 #
 # Memory Technology Devices (MTD)
 # Memory Technology Devices (MTD)
 #
 #
@@ -275,16 +323,7 @@ CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
 CONFIG_BLK_DEV_RAM_SIZE=4096
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_CDROM_PKTCDVD is not set
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
 CONFIG_ATA_OVER_ETH=m
 CONFIG_ATA_OVER_ETH=m
 
 
 #
 #
@@ -349,6 +388,7 @@ CONFIG_IDEDMA_AUTO=y
 #
 #
 # SCSI device support
 # SCSI device support
 #
 #
+# CONFIG_RAID_ATTRS is not set
 CONFIG_SCSI=y
 CONFIG_SCSI=y
 CONFIG_SCSI_PROC_FS=y
 CONFIG_SCSI_PROC_FS=y
 
 
@@ -375,11 +415,13 @@ CONFIG_SCSI_CONSTANTS=y
 #
 #
 CONFIG_SCSI_SPI_ATTRS=y
 CONFIG_SCSI_SPI_ATTRS=y
 CONFIG_SCSI_FC_ATTRS=y
 CONFIG_SCSI_FC_ATTRS=y
-# CONFIG_SCSI_ISCSI_ATTRS is not set
+CONFIG_SCSI_ISCSI_ATTRS=m
+CONFIG_SCSI_SAS_ATTRS=y
 
 
 #
 #
 # SCSI low-level drivers
 # SCSI low-level drivers
 #
 #
+CONFIG_ISCSI_TCP=m
 # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
 # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
 # CONFIG_SCSI_3W_9XXX is not set
 # CONFIG_SCSI_3W_9XXX is not set
 # CONFIG_SCSI_ACARD is not set
 # CONFIG_SCSI_ACARD is not set
@@ -389,15 +431,19 @@ CONFIG_SCSI_FC_ATTRS=y
 # CONFIG_SCSI_AIC79XX is not set
 # CONFIG_SCSI_AIC79XX is not set
 # CONFIG_MEGARAID_NEWGEN is not set
 # CONFIG_MEGARAID_NEWGEN is not set
 # CONFIG_MEGARAID_LEGACY is not set
 # CONFIG_MEGARAID_LEGACY is not set
+# CONFIG_MEGARAID_SAS is not set
 CONFIG_SCSI_SATA=y
 CONFIG_SCSI_SATA=y
 # CONFIG_SCSI_SATA_AHCI is not set
 # CONFIG_SCSI_SATA_AHCI is not set
 # CONFIG_SCSI_SATA_SVW is not set
 # CONFIG_SCSI_SATA_SVW is not set
 # CONFIG_SCSI_ATA_PIIX is not set
 # CONFIG_SCSI_ATA_PIIX is not set
+# CONFIG_SCSI_SATA_MV is not set
 # CONFIG_SCSI_SATA_NV is not set
 # CONFIG_SCSI_SATA_NV is not set
-# CONFIG_SCSI_SATA_PROMISE is not set
+# CONFIG_SCSI_PDC_ADMA is not set
 # CONFIG_SCSI_SATA_QSTOR is not set
 # CONFIG_SCSI_SATA_QSTOR is not set
+# CONFIG_SCSI_SATA_PROMISE is not set
 # CONFIG_SCSI_SATA_SX4 is not set
 # CONFIG_SCSI_SATA_SX4 is not set
 # CONFIG_SCSI_SATA_SIL is not set
 # CONFIG_SCSI_SATA_SIL is not set
+# CONFIG_SCSI_SATA_SIL24 is not set
 # CONFIG_SCSI_SATA_SIS is not set
 # CONFIG_SCSI_SATA_SIS is not set
 # CONFIG_SCSI_SATA_ULI is not set
 # CONFIG_SCSI_SATA_ULI is not set
 # CONFIG_SCSI_SATA_VIA is not set
 # CONFIG_SCSI_SATA_VIA is not set
@@ -411,7 +457,6 @@ CONFIG_SCSI_SATA_VITESSE=y
 # CONFIG_SCSI_IPR is not set
 # CONFIG_SCSI_IPR is not set
 # CONFIG_SCSI_QLOGIC_FC is not set
 # CONFIG_SCSI_QLOGIC_FC is not set
 CONFIG_SCSI_QLOGIC_1280=y
 CONFIG_SCSI_QLOGIC_1280=y
-# CONFIG_SCSI_QLOGIC_1280_1040 is not set
 CONFIG_SCSI_QLA2XXX=y
 CONFIG_SCSI_QLA2XXX=y
 # CONFIG_SCSI_QLA21XX is not set
 # CONFIG_SCSI_QLA21XX is not set
 CONFIG_SCSI_QLA22XX=y
 CONFIG_SCSI_QLA22XX=y
@@ -451,6 +496,7 @@ CONFIG_DM_MULTIPATH_EMC=m
 CONFIG_FUSION=y
 CONFIG_FUSION=y
 CONFIG_FUSION_SPI=y
 CONFIG_FUSION_SPI=y
 CONFIG_FUSION_FC=y
 CONFIG_FUSION_FC=y
+CONFIG_FUSION_SAS=y
 CONFIG_FUSION_MAX_SGE=128
 CONFIG_FUSION_MAX_SGE=128
 CONFIG_FUSION_CTL=m
 CONFIG_FUSION_CTL=m
 
 
@@ -478,6 +524,10 @@ CONFIG_NETDEVICES=y
 #
 #
 # CONFIG_ARCNET is not set
 # CONFIG_ARCNET is not set
 
 
+#
+# PHY device support
+#
+
 #
 #
 # Ethernet (10 or 100Mbit)
 # Ethernet (10 or 100Mbit)
 #
 #
@@ -493,6 +543,7 @@ CONFIG_NETDEVICES=y
 # CONFIG_HAMACHI is not set
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
 # CONFIG_YELLOWFIN is not set
 # CONFIG_R8169 is not set
 # CONFIG_R8169 is not set
+# CONFIG_SIS190 is not set
 # CONFIG_SKGE is not set
 # CONFIG_SKGE is not set
 # CONFIG_SK98LIN is not set
 # CONFIG_SK98LIN is not set
 CONFIG_TIGON3=y
 CONFIG_TIGON3=y
@@ -501,10 +552,10 @@ CONFIG_TIGON3=y
 #
 #
 # Ethernet (10000 Mbit)
 # Ethernet (10000 Mbit)
 #
 #
+CONFIG_CHELSIO_T1=m
 # CONFIG_IXGB is not set
 # CONFIG_IXGB is not set
 CONFIG_S2IO=m
 CONFIG_S2IO=m
 # CONFIG_S2IO_NAPI is not set
 # CONFIG_S2IO_NAPI is not set
-# CONFIG_2BUFF_MODE is not set
 
 
 #
 #
 # Token Ring devices
 # Token Ring devices
@@ -583,6 +634,7 @@ CONFIG_HW_CONSOLE=y
 CONFIG_SERIAL_NONSTANDARD=y
 CONFIG_SERIAL_NONSTANDARD=y
 # CONFIG_ROCKETPORT is not set
 # CONFIG_ROCKETPORT is not set
 # CONFIG_CYCLADES is not set
 # CONFIG_CYCLADES is not set
+# CONFIG_DIGIEPCA is not set
 # CONFIG_MOXA_SMARTIO is not set
 # CONFIG_MOXA_SMARTIO is not set
 # CONFIG_ISI is not set
 # CONFIG_ISI is not set
 # CONFIG_SYNCLINKMP is not set
 # CONFIG_SYNCLINKMP is not set
@@ -629,7 +681,8 @@ CONFIG_EFI_RTC=y
 #
 #
 # Ftape, the floppy tape device driver
 # Ftape, the floppy tape device driver
 #
 #
-# CONFIG_AGP is not set
+CONFIG_AGP=y
+CONFIG_AGP_SGI_TIOCA=y
 # CONFIG_DRM is not set
 # CONFIG_DRM is not set
 CONFIG_RAW_DRIVER=m
 CONFIG_RAW_DRIVER=m
 # CONFIG_HPET is not set
 # CONFIG_HPET is not set
@@ -641,12 +694,12 @@ CONFIG_MMTIMER=y
 # TPM devices
 # TPM devices
 #
 #
 # CONFIG_TCG_TPM is not set
 # CONFIG_TCG_TPM is not set
+# CONFIG_TELCLOCK is not set
 
 
 #
 #
 # I2C support
 # I2C support
 #
 #
 # CONFIG_I2C is not set
 # CONFIG_I2C is not set
-# CONFIG_I2C_SENSOR is not set
 
 
 #
 #
 # Dallas's 1-wire bus
 # Dallas's 1-wire bus
@@ -657,11 +710,16 @@ CONFIG_MMTIMER=y
 # Hardware Monitoring support
 # Hardware Monitoring support
 #
 #
 # CONFIG_HWMON is not set
 # CONFIG_HWMON is not set
+# CONFIG_HWMON_VID is not set
 
 
 #
 #
 # Misc devices
 # Misc devices
 #
 #
 
 
+#
+# Multimedia Capabilities Port drivers
+#
+
 #
 #
 # Multimedia devices
 # Multimedia devices
 #
 #
@@ -721,12 +779,15 @@ CONFIG_USB_UHCI_HCD=m
 #
 #
 # USB Device Class drivers
 # USB Device Class drivers
 #
 #
-# CONFIG_USB_BLUETOOTH_TTY is not set
 # CONFIG_USB_ACM is not set
 # CONFIG_USB_ACM is not set
 # CONFIG_USB_PRINTER is not set
 # CONFIG_USB_PRINTER is not set
 
 
 #
 #
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
 #
 #
 # CONFIG_USB_STORAGE is not set
 # CONFIG_USB_STORAGE is not set
 
 
@@ -751,9 +812,11 @@ CONFIG_USB_HIDINPUT=y
 # CONFIG_USB_MTOUCH is not set
 # CONFIG_USB_MTOUCH is not set
 # CONFIG_USB_ITMTOUCH is not set
 # CONFIG_USB_ITMTOUCH is not set
 # CONFIG_USB_EGALAX is not set
 # CONFIG_USB_EGALAX is not set
+# CONFIG_USB_YEALINK is not set
 # CONFIG_USB_XPAD is not set
 # CONFIG_USB_XPAD is not set
 # CONFIG_USB_ATI_REMOTE is not set
 # CONFIG_USB_ATI_REMOTE is not set
 # CONFIG_USB_KEYSPAN_REMOTE is not set
 # CONFIG_USB_KEYSPAN_REMOTE is not set
+# CONFIG_USB_APPLETOUCH is not set
 
 
 #
 #
 # USB Imaging devices
 # USB Imaging devices
@@ -824,11 +887,13 @@ CONFIG_USB_MON=y
 # InfiniBand support
 # InfiniBand support
 #
 #
 CONFIG_INFINIBAND=m
 CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_USER_VERBS=m
+# CONFIG_INFINIBAND_USER_MAD is not set
+CONFIG_INFINIBAND_USER_ACCESS=m
 CONFIG_INFINIBAND_MTHCA=m
 CONFIG_INFINIBAND_MTHCA=m
 # CONFIG_INFINIBAND_MTHCA_DEBUG is not set
 # CONFIG_INFINIBAND_MTHCA_DEBUG is not set
 CONFIG_INFINIBAND_IPOIB=m
 CONFIG_INFINIBAND_IPOIB=m
 # CONFIG_INFINIBAND_IPOIB_DEBUG is not set
 # CONFIG_INFINIBAND_IPOIB_DEBUG is not set
+CONFIG_INFINIBAND_SRP=m
 
 
 #
 #
 # SN Devices
 # SN Devices
@@ -858,16 +923,12 @@ CONFIG_REISERFS_FS_POSIX_ACL=y
 CONFIG_REISERFS_FS_SECURITY=y
 CONFIG_REISERFS_FS_SECURITY=y
 # CONFIG_JFS_FS is not set
 # CONFIG_JFS_FS is not set
 CONFIG_FS_POSIX_ACL=y
 CONFIG_FS_POSIX_ACL=y
-
-#
-# XFS support
-#
 CONFIG_XFS_FS=y
 CONFIG_XFS_FS=y
 CONFIG_XFS_EXPORT=y
 CONFIG_XFS_EXPORT=y
-CONFIG_XFS_RT=y
 CONFIG_XFS_QUOTA=y
 CONFIG_XFS_QUOTA=y
 # CONFIG_XFS_SECURITY is not set
 # CONFIG_XFS_SECURITY is not set
 CONFIG_XFS_POSIX_ACL=y
 CONFIG_XFS_POSIX_ACL=y
+CONFIG_XFS_RT=y
 # CONFIG_MINIX_FS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_ROMFS_FS is not set
 # CONFIG_ROMFS_FS is not set
 CONFIG_INOTIFY=y
 CONFIG_INOTIFY=y
@@ -878,6 +939,7 @@ CONFIG_QUOTACTL=y
 CONFIG_DNOTIFY=y
 CONFIG_DNOTIFY=y
 CONFIG_AUTOFS_FS=m
 CONFIG_AUTOFS_FS=m
 CONFIG_AUTOFS4_FS=m
 CONFIG_AUTOFS4_FS=m
+CONFIG_FUSE_FS=m
 
 
 #
 #
 # CD-ROM/DVD Filesystems
 # CD-ROM/DVD Filesystems
@@ -904,13 +966,11 @@ CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 CONFIG_PROC_FS=y
 CONFIG_PROC_FS=y
 CONFIG_PROC_KCORE=y
 CONFIG_PROC_KCORE=y
 CONFIG_SYSFS=y
 CONFIG_SYSFS=y
-# CONFIG_DEVPTS_FS_XATTR is not set
 CONFIG_TMPFS=y
 CONFIG_TMPFS=y
-CONFIG_TMPFS_XATTR=y
-CONFIG_TMPFS_SECURITY=y
 CONFIG_HUGETLBFS=y
 CONFIG_HUGETLBFS=y
 CONFIG_HUGETLB_PAGE=y
 CONFIG_HUGETLB_PAGE=y
 CONFIG_RAMFS=y
 CONFIG_RAMFS=y
+CONFIG_RELAYFS_FS=m
 
 
 #
 #
 # Miscellaneous filesystems
 # Miscellaneous filesystems
@@ -959,6 +1019,7 @@ CONFIG_CIFS=m
 # CONFIG_NCP_FS is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_CODA_FS is not set
 # CONFIG_AFS_FS is not set
 # CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
 
 
 #
 #
 # Partition Types
 # Partition Types
@@ -1028,18 +1089,21 @@ CONFIG_NLS_UTF8=y
 # Library routines
 # Library routines
 #
 #
 # CONFIG_CRC_CCITT is not set
 # CONFIG_CRC_CCITT is not set
+CONFIG_CRC16=m
 CONFIG_CRC32=y
 CONFIG_CRC32=y
-# CONFIG_LIBCRC32C is not set
+CONFIG_LIBCRC32C=m
 CONFIG_ZLIB_INFLATE=m
 CONFIG_ZLIB_INFLATE=m
 CONFIG_ZLIB_DEFLATE=m
 CONFIG_ZLIB_DEFLATE=m
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_HARDIRQS=y
 CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_GENERIC_PENDING_IRQ=y
 
 
 #
 #
-# Profiling support
+# Instrumentation Support
 #
 #
 # CONFIG_PROFILING is not set
 # CONFIG_PROFILING is not set
+# CONFIG_KPROBES is not set
 
 
 #
 #
 # Kernel hacking
 # Kernel hacking
@@ -1048,6 +1112,7 @@ CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_DEBUG_KERNEL=y
 CONFIG_DEBUG_KERNEL=y
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_LOG_BUF_SHIFT=20
 CONFIG_LOG_BUF_SHIFT=20
+CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_SCHEDSTATS is not set
 # CONFIG_DEBUG_SLAB is not set
 # CONFIG_DEBUG_SLAB is not set
 CONFIG_DEBUG_PREEMPT=y
 CONFIG_DEBUG_PREEMPT=y
@@ -1056,7 +1121,8 @@ CONFIG_DEBUG_PREEMPT=y
 # CONFIG_DEBUG_KOBJECT is not set
 # CONFIG_DEBUG_KOBJECT is not set
 CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_INFO=y
 # CONFIG_DEBUG_FS is not set
 # CONFIG_DEBUG_FS is not set
-# CONFIG_KPROBES is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_RCU_TORTURE_TEST is not set
 CONFIG_IA64_GRANULE_16MB=y
 CONFIG_IA64_GRANULE_16MB=y
 # CONFIG_IA64_GRANULE_64MB is not set
 # CONFIG_IA64_GRANULE_64MB is not set
 # CONFIG_IA64_PRINT_HAZARDS is not set
 # CONFIG_IA64_PRINT_HAZARDS is not set
@@ -1097,7 +1163,7 @@ CONFIG_CRYPTO_DES=m
 # CONFIG_CRYPTO_ANUBIS is not set
 # CONFIG_CRYPTO_ANUBIS is not set
 CONFIG_CRYPTO_DEFLATE=m
 CONFIG_CRYPTO_DEFLATE=m
 # CONFIG_CRYPTO_MICHAEL_MIC is not set
 # CONFIG_CRYPTO_MICHAEL_MIC is not set
-# CONFIG_CRYPTO_CRC32C is not set
+CONFIG_CRYPTO_CRC32C=m
 # CONFIG_CRYPTO_TEST is not set
 # CONFIG_CRYPTO_TEST is not set
 
 
 #
 #

+ 50 - 24
arch/ia64/configs/tiger_defconfig

@@ -1,7 +1,7 @@
 #
 #
 # Automatically generated make config: don't edit
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.14-rc1
-# Wed Sep 14 15:17:57 2005
+# Linux kernel version: 2.6.15-rc4
+# Fri Dec  2 16:06:32 2005
 #
 #
 
 
 #
 #
@@ -58,18 +58,37 @@ CONFIG_MODULE_SRCVERSION_ALL=y
 CONFIG_KMOD=y
 CONFIG_KMOD=y
 CONFIG_STOP_MACHINE=y
 CONFIG_STOP_MACHINE=y
 
 
+#
+# Block layer
+#
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_DEADLINE is not set
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="anticipatory"
+
 #
 #
 # Processor type and features
 # Processor type and features
 #
 #
 CONFIG_IA64=y
 CONFIG_IA64=y
 CONFIG_64BIT=y
 CONFIG_64BIT=y
 CONFIG_MMU=y
 CONFIG_MMU=y
+CONFIG_SWIOTLB=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_GENERIC_CALIBRATE_DELAY=y
 CONFIG_TIME_INTERPOLATION=y
 CONFIG_TIME_INTERPOLATION=y
 CONFIG_EFI=y
 CONFIG_EFI=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
 CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
+CONFIG_ZONE_DMA_IS_DMA32=y
 # CONFIG_IA64_GENERIC is not set
 # CONFIG_IA64_GENERIC is not set
 CONFIG_IA64_DIG=y
 CONFIG_IA64_DIG=y
 # CONFIG_IA64_HP_ZX1 is not set
 # CONFIG_IA64_HP_ZX1 is not set
@@ -82,18 +101,16 @@ CONFIG_MCKINLEY=y
 # CONFIG_IA64_PAGE_SIZE_8KB is not set
 # CONFIG_IA64_PAGE_SIZE_8KB is not set
 CONFIG_IA64_PAGE_SIZE_16KB=y
 CONFIG_IA64_PAGE_SIZE_16KB=y
 # CONFIG_IA64_PAGE_SIZE_64KB is not set
 # CONFIG_IA64_PAGE_SIZE_64KB is not set
+CONFIG_PGTABLE_3=y
+# CONFIG_PGTABLE_4 is not set
 # CONFIG_HZ_100 is not set
 # CONFIG_HZ_100 is not set
 CONFIG_HZ_250=y
 CONFIG_HZ_250=y
 # CONFIG_HZ_1000 is not set
 # CONFIG_HZ_1000 is not set
 CONFIG_HZ=250
 CONFIG_HZ=250
 CONFIG_IA64_L1_CACHE_SHIFT=7
 CONFIG_IA64_L1_CACHE_SHIFT=7
-# CONFIG_NUMA is not set
-CONFIG_VIRTUAL_MEM_MAP=y
-CONFIG_HOLES_IN_ZONE=y
 CONFIG_IA64_CYCLONE=y
 CONFIG_IA64_CYCLONE=y
 CONFIG_IOSAPIC=y
 CONFIG_IOSAPIC=y
-# CONFIG_IA64_SGI_SN_XP is not set
-CONFIG_FORCE_MAX_ZONEORDER=18
+CONFIG_FORCE_MAX_ZONEORDER=17
 CONFIG_SMP=y
 CONFIG_SMP=y
 CONFIG_NR_CPUS=4
 CONFIG_NR_CPUS=4
 CONFIG_HOTPLUG_CPU=y
 CONFIG_HOTPLUG_CPU=y
@@ -106,7 +123,13 @@ CONFIG_FLATMEM_MANUAL=y
 CONFIG_FLATMEM=y
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 # CONFIG_SPARSEMEM_STATIC is not set
-CONFIG_HAVE_DEC_LOCK=y
+CONFIG_SPLIT_PTLOCK_CPUS=4
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
+CONFIG_ARCH_FLATMEM_ENABLE=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_VIRTUAL_MEM_MAP=y
+CONFIG_HOLES_IN_ZONE=y
 CONFIG_IA32_SUPPORT=y
 CONFIG_IA32_SUPPORT=y
 CONFIG_COMPAT=y
 CONFIG_COMPAT=y
 CONFIG_IA64_MCA_RECOVERY=y
 CONFIG_IA64_MCA_RECOVERY=y
@@ -118,7 +141,6 @@ CONFIG_IA64_PALINFO=y
 #
 #
 CONFIG_EFI_VARS=y
 CONFIG_EFI_VARS=y
 CONFIG_EFI_PCDP=y
 CONFIG_EFI_PCDP=y
-# CONFIG_DELL_RBU is not set
 CONFIG_BINFMT_ELF=y
 CONFIG_BINFMT_ELF=y
 CONFIG_BINFMT_MISC=m
 CONFIG_BINFMT_MISC=m
 
 
@@ -126,6 +148,7 @@ CONFIG_BINFMT_MISC=m
 # Power management and ACPI
 # Power management and ACPI
 #
 #
 CONFIG_PM=y
 CONFIG_PM=y
+CONFIG_PM_LEGACY=y
 # CONFIG_PM_DEBUG is not set
 # CONFIG_PM_DEBUG is not set
 
 
 #
 #
@@ -226,14 +249,16 @@ CONFIG_TCP_CONG_BIC=y
 # CONFIG_NET_DIVERT is not set
 # CONFIG_NET_DIVERT is not set
 # CONFIG_ECONET is not set
 # CONFIG_ECONET is not set
 # CONFIG_WAN_ROUTER is not set
 # CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
 # CONFIG_NET_SCHED is not set
 # CONFIG_NET_SCHED is not set
-# CONFIG_NET_CLS_ROUTE is not set
 
 
 #
 #
 # Network testing
 # Network testing
 #
 #
 # CONFIG_NET_PKTGEN is not set
 # CONFIG_NET_PKTGEN is not set
-# CONFIG_NETFILTER_NETLINK is not set
 # CONFIG_HAMRADIO is not set
 # CONFIG_HAMRADIO is not set
 # CONFIG_IRDA is not set
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_BT is not set
@@ -295,14 +320,6 @@ CONFIG_BLK_DEV_RAM_COUNT=16
 CONFIG_BLK_DEV_RAM_SIZE=4096
 CONFIG_BLK_DEV_RAM_SIZE=4096
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_BLK_DEV_INITRD=y
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_CDROM_PKTCDVD is not set
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
 # CONFIG_ATA_OVER_ETH is not set
 # CONFIG_ATA_OVER_ETH is not set
 
 
 #
 #
@@ -400,6 +417,7 @@ CONFIG_SCSI_FC_ATTRS=y
 #
 #
 # SCSI low-level drivers
 # SCSI low-level drivers
 #
 #
+# CONFIG_ISCSI_TCP is not set
 # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
 # CONFIG_BLK_DEV_3W_XXXX_RAID is not set
 # CONFIG_SCSI_3W_9XXX is not set
 # CONFIG_SCSI_3W_9XXX is not set
 # CONFIG_SCSI_ACARD is not set
 # CONFIG_SCSI_ACARD is not set
@@ -409,6 +427,7 @@ CONFIG_SCSI_FC_ATTRS=y
 # CONFIG_SCSI_AIC79XX is not set
 # CONFIG_SCSI_AIC79XX is not set
 # CONFIG_MEGARAID_NEWGEN is not set
 # CONFIG_MEGARAID_NEWGEN is not set
 # CONFIG_MEGARAID_LEGACY is not set
 # CONFIG_MEGARAID_LEGACY is not set
+# CONFIG_MEGARAID_SAS is not set
 # CONFIG_SCSI_SATA is not set
 # CONFIG_SCSI_SATA is not set
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
@@ -424,7 +443,6 @@ CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
 CONFIG_SCSI_QLOGIC_FC=y
 CONFIG_SCSI_QLOGIC_FC=y
 # CONFIG_SCSI_QLOGIC_FC_FIRMWARE is not set
 # CONFIG_SCSI_QLOGIC_FC_FIRMWARE is not set
 CONFIG_SCSI_QLOGIC_1280=y
 CONFIG_SCSI_QLOGIC_1280=y
-# CONFIG_SCSI_QLOGIC_1280_1040 is not set
 CONFIG_SCSI_QLA2XXX=y
 CONFIG_SCSI_QLA2XXX=y
 CONFIG_SCSI_QLA21XX=m
 CONFIG_SCSI_QLA21XX=m
 CONFIG_SCSI_QLA22XX=m
 CONFIG_SCSI_QLA22XX=m
@@ -463,6 +481,7 @@ CONFIG_DM_ZERO=m
 CONFIG_FUSION=y
 CONFIG_FUSION=y
 CONFIG_FUSION_SPI=y
 CONFIG_FUSION_SPI=y
 CONFIG_FUSION_FC=y
 CONFIG_FUSION_FC=y
+# CONFIG_FUSION_SAS is not set
 CONFIG_FUSION_MAX_SGE=128
 CONFIG_FUSION_MAX_SGE=128
 CONFIG_FUSION_CTL=y
 CONFIG_FUSION_CTL=y
 
 
@@ -503,6 +522,7 @@ CONFIG_NET_ETHERNET=y
 CONFIG_MII=m
 CONFIG_MII=m
 # CONFIG_HAPPYMEAL is not set
 # CONFIG_HAPPYMEAL is not set
 # CONFIG_SUNGEM is not set
 # CONFIG_SUNGEM is not set
+# CONFIG_CASSINI is not set
 # CONFIG_NET_VENDOR_3COM is not set
 # CONFIG_NET_VENDOR_3COM is not set
 
 
 #
 #
@@ -727,6 +747,7 @@ CONFIG_MAX_RAW_DEVS=256
 # TPM devices
 # TPM devices
 #
 #
 # CONFIG_TCG_TPM is not set
 # CONFIG_TCG_TPM is not set
+# CONFIG_TELCLOCK is not set
 
 
 #
 #
 # I2C support
 # I2C support
@@ -812,12 +833,15 @@ CONFIG_USB_UHCI_HCD=y
 #
 #
 # USB Device Class drivers
 # USB Device Class drivers
 #
 #
-# CONFIG_USB_BLUETOOTH_TTY is not set
 # CONFIG_USB_ACM is not set
 # CONFIG_USB_ACM is not set
 # CONFIG_USB_PRINTER is not set
 # CONFIG_USB_PRINTER is not set
 
 
 #
 #
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# may also be needed; see USB_STORAGE Help for more information
 #
 #
 CONFIG_USB_STORAGE=m
 CONFIG_USB_STORAGE=m
 # CONFIG_USB_STORAGE_DEBUG is not set
 # CONFIG_USB_STORAGE_DEBUG is not set
@@ -1123,9 +1147,10 @@ CONFIG_GENERIC_IRQ_PROBE=y
 CONFIG_GENERIC_PENDING_IRQ=y
 CONFIG_GENERIC_PENDING_IRQ=y
 
 
 #
 #
-# Profiling support
+# Instrumentation Support
 #
 #
 # CONFIG_PROFILING is not set
 # CONFIG_PROFILING is not set
+# CONFIG_KPROBES is not set
 
 
 #
 #
 # Kernel hacking
 # Kernel hacking
@@ -1142,7 +1167,8 @@ CONFIG_DETECT_SOFTLOCKUP=y
 # CONFIG_DEBUG_KOBJECT is not set
 # CONFIG_DEBUG_KOBJECT is not set
 # CONFIG_DEBUG_INFO is not set
 # CONFIG_DEBUG_INFO is not set
 # CONFIG_DEBUG_FS is not set
 # CONFIG_DEBUG_FS is not set
-# CONFIG_KPROBES is not set
+# CONFIG_DEBUG_VM is not set
+# CONFIG_RCU_TORTURE_TEST is not set
 CONFIG_IA64_GRANULE_16MB=y
 CONFIG_IA64_GRANULE_16MB=y
 # CONFIG_IA64_GRANULE_64MB is not set
 # CONFIG_IA64_GRANULE_64MB is not set
 # CONFIG_IA64_PRINT_HAZARDS is not set
 # CONFIG_IA64_PRINT_HAZARDS is not set

+ 0 - 2
arch/ia64/ia32/binfmt_elf32.c

@@ -261,8 +261,6 @@ elf32_set_personality (void)
 {
 {
 	set_personality(PER_LINUX32);
 	set_personality(PER_LINUX32);
 	current->thread.map_base  = IA32_PAGE_OFFSET/3;
 	current->thread.map_base  = IA32_PAGE_OFFSET/3;
-	current->thread.task_size = IA32_PAGE_OFFSET;	/* use what Linux/x86 uses... */
-	set_fs(USER_DS);				/* set addr limit for new TASK_SIZE */
 }
 }
 
 
 static unsigned long
 static unsigned long

+ 0 - 1
arch/ia64/ia32/ia32priv.h

@@ -305,7 +305,6 @@ struct old_linux32_dirent {
 #define ELF_DATA	ELFDATA2LSB
 #define ELF_DATA	ELFDATA2LSB
 #define ELF_ARCH	EM_386
 #define ELF_ARCH	EM_386
 
 
-#define IA32_PAGE_OFFSET	0xc0000000
 #define IA32_STACK_TOP		IA32_PAGE_OFFSET
 #define IA32_STACK_TOP		IA32_PAGE_OFFSET
 #define IA32_GATE_OFFSET	IA32_PAGE_OFFSET
 #define IA32_GATE_OFFSET	IA32_PAGE_OFFSET
 #define IA32_GATE_END		IA32_PAGE_OFFSET + PAGE_SIZE
 #define IA32_GATE_END		IA32_PAGE_OFFSET + PAGE_SIZE

+ 1 - 1
arch/ia64/kernel/kprobes.c

@@ -630,7 +630,7 @@ static int __kprobes pre_kprobes_handler(struct die_args *args)
 			 */
 			 */
 			save_previous_kprobe(kcb);
 			save_previous_kprobe(kcb);
 			set_current_kprobe(p, kcb);
 			set_current_kprobe(p, kcb);
-			p->nmissed++;
+			kprobes_inc_nmissed_count(p);
 			prepare_ss(p, regs);
 			prepare_ss(p, regs);
 			kcb->kprobe_status = KPROBE_REENTER;
 			kcb->kprobe_status = KPROBE_REENTER;
 			return 1;
 			return 1;

+ 6 - 1
arch/ia64/kernel/process.c

@@ -721,8 +721,13 @@ flush_thread (void)
 	/* drop floating-point and debug-register state if it exists: */
 	/* drop floating-point and debug-register state if it exists: */
 	current->thread.flags &= ~(IA64_THREAD_FPH_VALID | IA64_THREAD_DBG_VALID);
 	current->thread.flags &= ~(IA64_THREAD_FPH_VALID | IA64_THREAD_DBG_VALID);
 	ia64_drop_fpu(current);
 	ia64_drop_fpu(current);
-	if (IS_IA32_PROCESS(ia64_task_regs(current)))
+#ifdef CONFIG_IA32_SUPPORT
+	if (IS_IA32_PROCESS(ia64_task_regs(current))) {
 		ia32_drop_partial_page_list(current);
 		ia32_drop_partial_page_list(current);
+		current->thread.task_size = IA32_PAGE_OFFSET;
+		set_fs(USER_DS);
+	}
+#endif
 }
 }
 
 
 /*
 /*

+ 1 - 1
arch/ia64/kernel/salinfo.c

@@ -293,7 +293,7 @@ retry:
 		if (file->f_flags & O_NONBLOCK)
 		if (file->f_flags & O_NONBLOCK)
 			return -EAGAIN;
 			return -EAGAIN;
 		if (down_interruptible(&data->sem))
 		if (down_interruptible(&data->sem))
-			return -ERESTARTSYS;
+			return -EINTR;
 	}
 	}
 
 
 	n = data->cpu_check;
 	n = data->cpu_check;

+ 29 - 0
arch/ia64/kernel/time.c

@@ -249,3 +249,32 @@ time_init (void)
 	 */
 	 */
 	set_normalized_timespec(&wall_to_monotonic, -xtime.tv_sec, -xtime.tv_nsec);
 	set_normalized_timespec(&wall_to_monotonic, -xtime.tv_sec, -xtime.tv_nsec);
 }
 }
+
+#define SMALLUSECS 100
+
+void
+udelay (unsigned long usecs)
+{
+	unsigned long start;
+	unsigned long cycles;
+	unsigned long smallusecs;
+
+	/*
+	 * Execute the non-preemptible delay loop (because the ITC might
+	 * not be synchronized between CPUS) in relatively short time
+	 * chunks, allowing preemption between the chunks.
+	 */
+	while (usecs > 0) {
+		smallusecs = (usecs > SMALLUSECS) ? SMALLUSECS : usecs;
+		preempt_disable();
+		cycles = smallusecs*local_cpu_data->cyc_per_usec;
+		start = ia64_get_itc();
+
+		while (ia64_get_itc() - start < cycles)
+			cpu_relax();
+
+		preempt_enable();
+		usecs -= smallusecs;
+	}
+}
+EXPORT_SYMBOL(udelay);

+ 3 - 3
arch/ia64/kernel/uncached.c

@@ -53,7 +53,7 @@ static void uncached_ipi_visibility(void *data)
 	if ((status != PAL_VISIBILITY_OK) &&
 	if ((status != PAL_VISIBILITY_OK) &&
 	    (status != PAL_VISIBILITY_OK_REMOTE_NEEDED))
 	    (status != PAL_VISIBILITY_OK_REMOTE_NEEDED))
 		printk(KERN_DEBUG "pal_prefetch_visibility() returns %i on "
 		printk(KERN_DEBUG "pal_prefetch_visibility() returns %i on "
-		       "CPU %i\n", status, get_cpu());
+		       "CPU %i\n", status, raw_smp_processor_id());
 }
 }
 
 
 
 
@@ -63,7 +63,7 @@ static void uncached_ipi_mc_drain(void *data)
 	status = ia64_pal_mc_drain();
 	status = ia64_pal_mc_drain();
 	if (status)
 	if (status)
 		printk(KERN_WARNING "ia64_pal_mc_drain() failed with %i on "
 		printk(KERN_WARNING "ia64_pal_mc_drain() failed with %i on "
-		       "CPU %i\n", status, get_cpu());
+		       "CPU %i\n", status, raw_smp_processor_id());
 }
 }
 
 
 
 
@@ -105,7 +105,7 @@ uncached_get_new_chunk(struct gen_pool *poolp)
 	status = ia64_pal_prefetch_visibility(PAL_VISIBILITY_PHYSICAL);
 	status = ia64_pal_prefetch_visibility(PAL_VISIBILITY_PHYSICAL);
 
 
 	dprintk(KERN_INFO "pal_prefetch_visibility() returns %i on cpu %i\n",
 	dprintk(KERN_INFO "pal_prefetch_visibility() returns %i on cpu %i\n",
-		status, get_cpu());
+		status, raw_smp_processor_id());
 
 
 	if (!status) {
 	if (!status) {
 		status = smp_call_function(uncached_ipi_visibility, NULL, 0, 1);
 		status = smp_call_function(uncached_ipi_visibility, NULL, 0, 1);

+ 3 - 0
arch/ia64/kernel/vmlinux.lds.S

@@ -177,6 +177,9 @@ SECTIONS
 	}
 	}
   . = ALIGN(PAGE_SIZE);		/* make sure the gate page doesn't expose kernel data */
   . = ALIGN(PAGE_SIZE);		/* make sure the gate page doesn't expose kernel data */
 
 
+  .data.read_mostly : AT(ADDR(.data.read_mostly) - LOAD_OFFSET)
+        { *(.data.read_mostly) }
+
   .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET)
   .data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - LOAD_OFFSET)
         { *(.data.cacheline_aligned) }
         { *(.data.cacheline_aligned) }
 
 

+ 3 - 1
arch/ia64/mm/discontig.c

@@ -50,8 +50,10 @@ static nodemask_t memory_less_mask __initdata;
  * To prevent cache aliasing effects, align per-node structures so that they
  * To prevent cache aliasing effects, align per-node structures so that they
  * start at addresses that are strided by node number.
  * start at addresses that are strided by node number.
  */
  */
+#define MAX_NODE_ALIGN_OFFSET	(32 * 1024 * 1024)
 #define NODEDATA_ALIGN(addr, node)						\
 #define NODEDATA_ALIGN(addr, node)						\
-	((((addr) + 1024*1024-1) & ~(1024*1024-1)) + (node)*PERCPU_PAGE_SIZE)
+	((((addr) + 1024*1024-1) & ~(1024*1024-1)) + 				\
+	     (((node)*PERCPU_PAGE_SIZE) & (MAX_NODE_ALIGN_OFFSET - 1)))
 
 
 /**
 /**
  * build_node_maps - callback to setup bootmem structs for each node
  * build_node_maps - callback to setup bootmem structs for each node

+ 131 - 22
arch/ia64/sn/kernel/io_init.c

@@ -3,7 +3,7 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  * for more details.
  *
  *
- * Copyright (C) 1992 - 1997, 2000-2004 Silicon Graphics, Inc. All rights reserved.
+ * Copyright (C) 1992 - 1997, 2000-2005 Silicon Graphics, Inc. All rights reserved.
  */
  */
 
 
 #include <linux/bootmem.h>
 #include <linux/bootmem.h>
@@ -146,6 +146,24 @@ sal_get_pcidev_info(u64 segment, u64 bus_number, u64 devfn, u64 pci_dev,
 	return ret_stuff.v0;
 	return ret_stuff.v0;
 }
 }
 
 
+/*
+ * sn_pcidev_info_get() - Retrieve the pcidev_info struct for the specified
+ *			  device.
+ */
+inline struct pcidev_info *
+sn_pcidev_info_get(struct pci_dev *dev)
+{
+	struct pcidev_info *pcidev;
+
+	list_for_each_entry(pcidev,
+			    &(SN_PCI_CONTROLLER(dev)->pcidev_info), pdi_list) {
+		if (pcidev->pdi_linux_pcidev == dev) {
+			return pcidev;
+		}
+	}
+	return NULL;
+}
+
 /*
 /*
  * sn_fixup_ionodes() - This routine initializes the HUB data strcuture for 
  * sn_fixup_ionodes() - This routine initializes the HUB data strcuture for 
  *	each node in the system.
  *	each node in the system.
@@ -229,6 +247,50 @@ static void sn_fixup_ionodes(void)
 
 
 }
 }
 
 
+/*
+ * sn_pci_window_fixup() - Create a pci_window for each device resource.
+ *			   Until ACPI support is added, we need this code
+ *			   to setup pci_windows for use by
+ *			   pcibios_bus_to_resource(),
+ *			   pcibios_resource_to_bus(), etc.
+ */
+static void
+sn_pci_window_fixup(struct pci_dev *dev, unsigned int count,
+		    int64_t * pci_addrs)
+{
+	struct pci_controller *controller = PCI_CONTROLLER(dev->bus);
+	unsigned int i;
+	unsigned int idx;
+	unsigned int new_count;
+	struct pci_window *new_window;
+
+	if (count == 0)
+		return;
+	idx = controller->windows;
+	new_count = controller->windows + count;
+	new_window = kcalloc(new_count, sizeof(struct pci_window), GFP_KERNEL);
+	if (new_window == NULL)
+		BUG();
+	if (controller->window) {
+		memcpy(new_window, controller->window,
+		       sizeof(struct pci_window) * controller->windows);
+		kfree(controller->window);
+	}
+
+	/* Setup a pci_window for each device resource. */
+	for (i = 0; i <= PCI_ROM_RESOURCE; i++) {
+		if (pci_addrs[i] == -1)
+			continue;
+
+		new_window[idx].offset = dev->resource[i].start - pci_addrs[i];
+		new_window[idx].resource = dev->resource[i];
+		idx++;
+	}
+
+	controller->windows = new_count;
+	controller->window = new_window;
+}
+
 void sn_pci_unfixup_slot(struct pci_dev *dev)
 void sn_pci_unfixup_slot(struct pci_dev *dev)
 {
 {
 	struct pci_dev *host_pci_dev = SN_PCIDEV_INFO(dev)->host_pci_dev;
 	struct pci_dev *host_pci_dev = SN_PCIDEV_INFO(dev)->host_pci_dev;
@@ -246,21 +308,23 @@ void sn_pci_unfixup_slot(struct pci_dev *dev)
  */
  */
 void sn_pci_fixup_slot(struct pci_dev *dev)
 void sn_pci_fixup_slot(struct pci_dev *dev)
 {
 {
+	unsigned int count = 0;
 	int idx;
 	int idx;
 	int segment = pci_domain_nr(dev->bus);
 	int segment = pci_domain_nr(dev->bus);
 	int status = 0;
 	int status = 0;
 	struct pcibus_bussoft *bs;
 	struct pcibus_bussoft *bs;
  	struct pci_bus *host_pci_bus;
  	struct pci_bus *host_pci_bus;
  	struct pci_dev *host_pci_dev;
  	struct pci_dev *host_pci_dev;
+	struct pcidev_info *pcidev_info;
+	int64_t pci_addrs[PCI_ROM_RESOURCE + 1];
  	struct sn_irq_info *sn_irq_info;
  	struct sn_irq_info *sn_irq_info;
  	unsigned long size;
  	unsigned long size;
  	unsigned int bus_no, devfn;
  	unsigned int bus_no, devfn;
 
 
 	pci_dev_get(dev); /* for the sysdata pointer */
 	pci_dev_get(dev); /* for the sysdata pointer */
-	dev->sysdata = kmalloc(sizeof(struct pcidev_info), GFP_KERNEL);
-	if (SN_PCIDEV_INFO(dev) <= 0)
+	pcidev_info = kzalloc(sizeof(struct pcidev_info), GFP_KERNEL);
+	if (pcidev_info <= 0)
 		BUG();		/* Cannot afford to run out of memory */
 		BUG();		/* Cannot afford to run out of memory */
-	memset(SN_PCIDEV_INFO(dev), 0, sizeof(struct pcidev_info));
 
 
 	sn_irq_info = kmalloc(sizeof(struct sn_irq_info), GFP_KERNEL);
 	sn_irq_info = kmalloc(sizeof(struct sn_irq_info), GFP_KERNEL);
 	if (sn_irq_info <= 0)
 	if (sn_irq_info <= 0)
@@ -270,22 +334,34 @@ void sn_pci_fixup_slot(struct pci_dev *dev)
 	/* Call to retrieve pci device information needed by kernel. */
 	/* Call to retrieve pci device information needed by kernel. */
 	status = sal_get_pcidev_info((u64) segment, (u64) dev->bus->number, 
 	status = sal_get_pcidev_info((u64) segment, (u64) dev->bus->number, 
 				     dev->devfn,
 				     dev->devfn,
-				     (u64) __pa(SN_PCIDEV_INFO(dev)),
+				     (u64) __pa(pcidev_info),
 				     (u64) __pa(sn_irq_info));
 				     (u64) __pa(sn_irq_info));
 	if (status)
 	if (status)
 		BUG(); /* Cannot get platform pci device information */
 		BUG(); /* Cannot get platform pci device information */
 
 
+	/* Add pcidev_info to list in sn_pci_controller struct */
+	list_add_tail(&pcidev_info->pdi_list,
+		      &(SN_PCI_CONTROLLER(dev->bus)->pcidev_info));
+
 	/* Copy over PIO Mapped Addresses */
 	/* Copy over PIO Mapped Addresses */
 	for (idx = 0; idx <= PCI_ROM_RESOURCE; idx++) {
 	for (idx = 0; idx <= PCI_ROM_RESOURCE; idx++) {
 		unsigned long start, end, addr;
 		unsigned long start, end, addr;
 
 
-		if (!SN_PCIDEV_INFO(dev)->pdi_pio_mapped_addr[idx])
+		if (!pcidev_info->pdi_pio_mapped_addr[idx]) {
+			pci_addrs[idx] = -1;
 			continue;
 			continue;
+		}
 
 
 		start = dev->resource[idx].start;
 		start = dev->resource[idx].start;
 		end = dev->resource[idx].end;
 		end = dev->resource[idx].end;
 		size = end - start;
 		size = end - start;
-		addr = SN_PCIDEV_INFO(dev)->pdi_pio_mapped_addr[idx];
+		if (size == 0) {
+			pci_addrs[idx] = -1;
+			continue;
+		}
+		pci_addrs[idx] = start;
+		count++;
+		addr = pcidev_info->pdi_pio_mapped_addr[idx];
 		addr = ((addr << 4) >> 4) | __IA64_UNCACHED_OFFSET;
 		addr = ((addr << 4) >> 4) | __IA64_UNCACHED_OFFSET;
 		dev->resource[idx].start = addr;
 		dev->resource[idx].start = addr;
 		dev->resource[idx].end = addr + size;
 		dev->resource[idx].end = addr + size;
@@ -294,23 +370,27 @@ void sn_pci_fixup_slot(struct pci_dev *dev)
 		else
 		else
 			dev->resource[idx].parent = &iomem_resource;
 			dev->resource[idx].parent = &iomem_resource;
 	}
 	}
+	/* Create a pci_window in the pci_controller struct for
+	 * each device resource.
+	 */
+	if (count > 0)
+		sn_pci_window_fixup(dev, count, pci_addrs);
 
 
 	/*
 	/*
 	 * Using the PROMs values for the PCI host bus, get the Linux
 	 * Using the PROMs values for the PCI host bus, get the Linux
  	 * PCI host_pci_dev struct and set up host bus linkages
  	 * PCI host_pci_dev struct and set up host bus linkages
  	 */
  	 */
 
 
- 	bus_no = (SN_PCIDEV_INFO(dev)->pdi_slot_host_handle >> 32) & 0xff;
- 	devfn = SN_PCIDEV_INFO(dev)->pdi_slot_host_handle & 0xffffffff;
+	bus_no = (pcidev_info->pdi_slot_host_handle >> 32) & 0xff;
+	devfn = pcidev_info->pdi_slot_host_handle & 0xffffffff;
  	host_pci_bus = pci_find_bus(segment, bus_no);
  	host_pci_bus = pci_find_bus(segment, bus_no);
  	host_pci_dev = pci_get_slot(host_pci_bus, devfn);
  	host_pci_dev = pci_get_slot(host_pci_bus, devfn);
 
 
-	SN_PCIDEV_INFO(dev)->host_pci_dev = host_pci_dev;
-	SN_PCIDEV_INFO(dev)->pdi_host_pcidev_info =
-	    					SN_PCIDEV_INFO(host_pci_dev);
-	SN_PCIDEV_INFO(dev)->pdi_linux_pcidev = dev;
+	pcidev_info->host_pci_dev = host_pci_dev;
+	pcidev_info->pdi_linux_pcidev = dev;
+	pcidev_info->pdi_host_pcidev_info = SN_PCIDEV_INFO(host_pci_dev);
 	bs = SN_PCIBUS_BUSSOFT(dev->bus);
 	bs = SN_PCIBUS_BUSSOFT(dev->bus);
-	SN_PCIDEV_INFO(dev)->pdi_pcibus_info = bs;
+	pcidev_info->pdi_pcibus_info = bs;
 
 
 	if (bs && bs->bs_asic_type < PCIIO_ASIC_MAX_TYPES) {
 	if (bs && bs->bs_asic_type < PCIIO_ASIC_MAX_TYPES) {
 		SN_PCIDEV_BUSPROVIDER(dev) = sn_pci_provider[bs->bs_asic_type];
 		SN_PCIDEV_BUSPROVIDER(dev) = sn_pci_provider[bs->bs_asic_type];
@@ -320,11 +400,11 @@ void sn_pci_fixup_slot(struct pci_dev *dev)
 
 
 	/* Only set up IRQ stuff if this device has a host bus context */
 	/* Only set up IRQ stuff if this device has a host bus context */
 	if (bs && sn_irq_info->irq_irq) {
 	if (bs && sn_irq_info->irq_irq) {
-		SN_PCIDEV_INFO(dev)->pdi_sn_irq_info = sn_irq_info;
-		dev->irq = SN_PCIDEV_INFO(dev)->pdi_sn_irq_info->irq_irq;
+		pcidev_info->pdi_sn_irq_info = sn_irq_info;
+		dev->irq = pcidev_info->pdi_sn_irq_info->irq_irq;
 		sn_irq_fixup(dev, sn_irq_info);
 		sn_irq_fixup(dev, sn_irq_info);
 	} else {
 	} else {
-		SN_PCIDEV_INFO(dev)->pdi_sn_irq_info = NULL;
+		pcidev_info->pdi_sn_irq_info = NULL;
 		kfree(sn_irq_info);
 		kfree(sn_irq_info);
 	}
 	}
 }
 }
@@ -338,6 +418,7 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus)
 	int status = 0;
 	int status = 0;
 	int nasid, cnode;
 	int nasid, cnode;
 	struct pci_controller *controller;
 	struct pci_controller *controller;
+	struct sn_pci_controller *sn_controller;
 	struct pcibus_bussoft *prom_bussoft_ptr;
 	struct pcibus_bussoft *prom_bussoft_ptr;
 	struct hubdev_info *hubdev_info;
 	struct hubdev_info *hubdev_info;
 	void *provider_soft = NULL;
 	void *provider_soft = NULL;
@@ -349,10 +430,15 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus)
 		return;		/*bus # does not exist */
 		return;		/*bus # does not exist */
 	prom_bussoft_ptr = __va(prom_bussoft_ptr);
 	prom_bussoft_ptr = __va(prom_bussoft_ptr);
 
 
- 	controller = kzalloc(sizeof(struct pci_controller), GFP_KERNEL);
+	/* Allocate a sn_pci_controller, which has a pci_controller struct
+	 * as the first member.
+	 */
+	sn_controller = kzalloc(sizeof(struct sn_pci_controller), GFP_KERNEL);
+	if (!sn_controller)
+		BUG();
+	INIT_LIST_HEAD(&sn_controller->pcidev_info);
+	controller = &sn_controller->pci_controller;
 	controller->segment = segment;
 	controller->segment = segment;
- 	if (!controller)
- 		BUG();
 
 
 	if (bus == NULL) {
 	if (bus == NULL) {
  		bus = pci_scan_bus(busnum, &pci_root_ops, controller);
  		bus = pci_scan_bus(busnum, &pci_root_ops, controller);
@@ -389,6 +475,29 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus)
 		goto error_return;
 		goto error_return;
 	}
 	}
 
 
+	/*
+	 * Setup pci_windows for legacy IO and MEM space.
+	 * (Temporary until ACPI support is in place.)
+	 */
+	controller->window = kcalloc(2, sizeof(struct pci_window), GFP_KERNEL);
+	if (controller->window == NULL)
+		BUG();
+	controller->window[0].offset = prom_bussoft_ptr->bs_legacy_io;
+	controller->window[0].resource.name = "legacy_io";
+	controller->window[0].resource.flags = IORESOURCE_IO;
+	controller->window[0].resource.start = prom_bussoft_ptr->bs_legacy_io;
+	controller->window[0].resource.end =
+	    controller->window[0].resource.start + 0xffff;
+	controller->window[0].resource.parent = &ioport_resource;
+	controller->window[1].offset = prom_bussoft_ptr->bs_legacy_mem;
+	controller->window[1].resource.name = "legacy_mem";
+	controller->window[1].resource.flags = IORESOURCE_MEM;
+	controller->window[1].resource.start = prom_bussoft_ptr->bs_legacy_mem;
+	controller->window[1].resource.end =
+	    controller->window[1].resource.start + (1024 * 1024) - 1;
+	controller->window[1].resource.parent = &iomem_resource;
+	controller->windows = 2;
+
 	/*
 	/*
 	 * Generic bus fixup goes here.  Don't reference prom_bussoft_ptr
 	 * Generic bus fixup goes here.  Don't reference prom_bussoft_ptr
 	 * after this point.
 	 * after this point.
@@ -421,7 +530,7 @@ void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus)
 
 
 error_return:
 error_return:
 
 
-	kfree(controller);
+	kfree(sn_controller);
 	return;
 	return;
 }
 }
 
 
@@ -434,7 +543,7 @@ void sn_bus_store_sysdata(struct pci_dev *dev)
 		dev_dbg(dev, "%s: out of memory!\n", __FUNCTION__);
 		dev_dbg(dev, "%s: out of memory!\n", __FUNCTION__);
 		return;
 		return;
 	}
 	}
-	element->sysdata = dev->sysdata;
+	element->sysdata = SN_PCIDEV_INFO(dev);
 	list_add(&element->entry, &sn_sysdata_list);
 	list_add(&element->entry, &sn_sysdata_list);
 }
 }
 
 

+ 6 - 2
arch/ia64/sn/kernel/sn2/ptc_deadlock.S

@@ -39,9 +39,13 @@ sn2_ptc_deadlock_recovery_core:
 	mov	r8=r0
 	mov	r8=r0
 
 
 1:
 1:
+	cmp.ne  p8,p9=r0,ptc1		// Test for shub type (ptc1 non-null on shub1)
+					// p8 = 1 if shub1, p9 = 1 if shub2
+
 	add	scr2=ALIAS_OFFSET,piowc	// Address of WRITE_STATUS alias register 
 	add	scr2=ALIAS_OFFSET,piowc	// Address of WRITE_STATUS alias register 
-	;;
-	ld8.acq	scr1=[scr2];;
+	mov	scr1=7;;		// Clear DEADLOCK, WRITE_ERROR, MULTI_WRITE_ERROR
+(p8)	st8.rel	[scr2]=scr1;;
+(p9)	ld8.acq	scr1=[scr2];;
 
 
 5:	ld8.acq	scr1=[piowc];;		// Wait for PIOs to complete.
 5:	ld8.acq	scr1=[piowc];;		// Wait for PIOs to complete.
 	hint	@pause
 	hint	@pause

+ 1 - 1
arch/ia64/sn/kernel/sn2/sn2_smp.c

@@ -202,7 +202,7 @@ sn2_global_tlb_purge(struct mm_struct *mm, unsigned long start,
 		     unsigned long end, unsigned long nbits)
 		     unsigned long end, unsigned long nbits)
 {
 {
 	int i, opt, shub1, cnode, mynasid, cpu, lcpu = 0, nasid, flushed = 0;
 	int i, opt, shub1, cnode, mynasid, cpu, lcpu = 0, nasid, flushed = 0;
-	int mymm = (mm == current->active_mm);
+	int mymm = (mm == current->active_mm && current->mm);
 	volatile unsigned long *ptc0, *ptc1;
 	volatile unsigned long *ptc0, *ptc1;
 	unsigned long itc, itc2, flags, data0 = 0, data1 = 0, rr_value;
 	unsigned long itc, itc2, flags, data0 = 0, data1 = 0, rr_value;
 	short nasids[MAX_NUMNODES], nix;
 	short nasids[MAX_NUMNODES], nix;

+ 24 - 24
arch/ia64/sn/pci/pcibr/pcibr_reg.c

@@ -25,7 +25,7 @@ union br_ptr {
  */
  */
 void pcireg_control_bit_clr(struct pcibus_info *pcibus_info, uint64_t bits)
 void pcireg_control_bit_clr(struct pcibus_info *pcibus_info, uint64_t bits)
 {
 {
-	union br_ptr *ptr = (union br_ptr *)pcibus_info->pbi_buscommon.bs_base;
+	union br_ptr __iomem *ptr = (union br_ptr __iomem *)pcibus_info->pbi_buscommon.bs_base;
 
 
 	if (pcibus_info) {
 	if (pcibus_info) {
 		switch (pcibus_info->pbi_bridge_type) {
 		switch (pcibus_info->pbi_bridge_type) {
@@ -38,14 +38,14 @@ void pcireg_control_bit_clr(struct pcibus_info *pcibus_info, uint64_t bits)
 		default:
 		default:
 			panic
 			panic
 			    ("pcireg_control_bit_clr: unknown bridgetype bridge 0x%p",
 			    ("pcireg_control_bit_clr: unknown bridgetype bridge 0x%p",
-			     (void *)ptr);
+			     ptr);
 		}
 		}
 	}
 	}
 }
 }
 
 
 void pcireg_control_bit_set(struct pcibus_info *pcibus_info, uint64_t bits)
 void pcireg_control_bit_set(struct pcibus_info *pcibus_info, uint64_t bits)
 {
 {
-	union br_ptr *ptr = (union br_ptr *)pcibus_info->pbi_buscommon.bs_base;
+	union br_ptr __iomem *ptr = (union br_ptr __iomem *)pcibus_info->pbi_buscommon.bs_base;
 
 
 	if (pcibus_info) {
 	if (pcibus_info) {
 		switch (pcibus_info->pbi_bridge_type) {
 		switch (pcibus_info->pbi_bridge_type) {
@@ -58,7 +58,7 @@ void pcireg_control_bit_set(struct pcibus_info *pcibus_info, uint64_t bits)
 		default:
 		default:
 			panic
 			panic
 			    ("pcireg_control_bit_set: unknown bridgetype bridge 0x%p",
 			    ("pcireg_control_bit_set: unknown bridgetype bridge 0x%p",
-			     (void *)ptr);
+			     ptr);
 		}
 		}
 	}
 	}
 }
 }
@@ -68,7 +68,7 @@ void pcireg_control_bit_set(struct pcibus_info *pcibus_info, uint64_t bits)
  */
  */
 uint64_t pcireg_tflush_get(struct pcibus_info *pcibus_info)
 uint64_t pcireg_tflush_get(struct pcibus_info *pcibus_info)
 {
 {
-	union br_ptr *ptr = (union br_ptr *)pcibus_info->pbi_buscommon.bs_base;
+	union br_ptr __iomem *ptr = (union br_ptr __iomem *)pcibus_info->pbi_buscommon.bs_base;
 	uint64_t ret = 0;
 	uint64_t ret = 0;
 
 
 	if (pcibus_info) {
 	if (pcibus_info) {
@@ -82,7 +82,7 @@ uint64_t pcireg_tflush_get(struct pcibus_info *pcibus_info)
 		default:
 		default:
 			panic
 			panic
 			    ("pcireg_tflush_get: unknown bridgetype bridge 0x%p",
 			    ("pcireg_tflush_get: unknown bridgetype bridge 0x%p",
-			     (void *)ptr);
+			     ptr);
 		}
 		}
 	}
 	}
 
 
@@ -98,7 +98,7 @@ uint64_t pcireg_tflush_get(struct pcibus_info *pcibus_info)
  */
  */
 uint64_t pcireg_intr_status_get(struct pcibus_info * pcibus_info)
 uint64_t pcireg_intr_status_get(struct pcibus_info * pcibus_info)
 {
 {
-	union br_ptr *ptr = (union br_ptr *)pcibus_info->pbi_buscommon.bs_base;
+	union br_ptr __iomem *ptr = (union br_ptr __iomem *)pcibus_info->pbi_buscommon.bs_base;
 	uint64_t ret = 0;
 	uint64_t ret = 0;
 
 
 	if (pcibus_info) {
 	if (pcibus_info) {
@@ -112,7 +112,7 @@ uint64_t pcireg_intr_status_get(struct pcibus_info * pcibus_info)
 		default:
 		default:
 			panic
 			panic
 			    ("pcireg_intr_status_get: unknown bridgetype bridge 0x%p",
 			    ("pcireg_intr_status_get: unknown bridgetype bridge 0x%p",
-			     (void *)ptr);
+			     ptr);
 		}
 		}
 	}
 	}
 	return ret;
 	return ret;
@@ -123,7 +123,7 @@ uint64_t pcireg_intr_status_get(struct pcibus_info * pcibus_info)
  */
  */
 void pcireg_intr_enable_bit_clr(struct pcibus_info *pcibus_info, uint64_t bits)
 void pcireg_intr_enable_bit_clr(struct pcibus_info *pcibus_info, uint64_t bits)
 {
 {
-	union br_ptr *ptr = (union br_ptr *)pcibus_info->pbi_buscommon.bs_base;
+	union br_ptr __iomem *ptr = (union br_ptr __iomem *)pcibus_info->pbi_buscommon.bs_base;
 
 
 	if (pcibus_info) {
 	if (pcibus_info) {
 		switch (pcibus_info->pbi_bridge_type) {
 		switch (pcibus_info->pbi_bridge_type) {
@@ -136,14 +136,14 @@ void pcireg_intr_enable_bit_clr(struct pcibus_info *pcibus_info, uint64_t bits)
 		default:
 		default:
 			panic
 			panic
 			    ("pcireg_intr_enable_bit_clr: unknown bridgetype bridge 0x%p",
 			    ("pcireg_intr_enable_bit_clr: unknown bridgetype bridge 0x%p",
-			     (void *)ptr);
+			     ptr);
 		}
 		}
 	}
 	}
 }
 }
 
 
 void pcireg_intr_enable_bit_set(struct pcibus_info *pcibus_info, uint64_t bits)
 void pcireg_intr_enable_bit_set(struct pcibus_info *pcibus_info, uint64_t bits)
 {
 {
-	union br_ptr *ptr = (union br_ptr *)pcibus_info->pbi_buscommon.bs_base;
+	union br_ptr __iomem *ptr = (union br_ptr __iomem *)pcibus_info->pbi_buscommon.bs_base;
 
 
 	if (pcibus_info) {
 	if (pcibus_info) {
 		switch (pcibus_info->pbi_bridge_type) {
 		switch (pcibus_info->pbi_bridge_type) {
@@ -156,7 +156,7 @@ void pcireg_intr_enable_bit_set(struct pcibus_info *pcibus_info, uint64_t bits)
 		default:
 		default:
 			panic
 			panic
 			    ("pcireg_intr_enable_bit_set: unknown bridgetype bridge 0x%p",
 			    ("pcireg_intr_enable_bit_set: unknown bridgetype bridge 0x%p",
-			     (void *)ptr);
+			     ptr);
 		}
 		}
 	}
 	}
 }
 }
@@ -167,7 +167,7 @@ void pcireg_intr_enable_bit_set(struct pcibus_info *pcibus_info, uint64_t bits)
 void pcireg_intr_addr_addr_set(struct pcibus_info *pcibus_info, int int_n,
 void pcireg_intr_addr_addr_set(struct pcibus_info *pcibus_info, int int_n,
 			       uint64_t addr)
 			       uint64_t addr)
 {
 {
-	union br_ptr *ptr = (union br_ptr *)pcibus_info->pbi_buscommon.bs_base;
+	union br_ptr __iomem *ptr = (union br_ptr __iomem *)pcibus_info->pbi_buscommon.bs_base;
 
 
 	if (pcibus_info) {
 	if (pcibus_info) {
 		switch (pcibus_info->pbi_bridge_type) {
 		switch (pcibus_info->pbi_bridge_type) {
@@ -186,7 +186,7 @@ void pcireg_intr_addr_addr_set(struct pcibus_info *pcibus_info, int int_n,
 		default:
 		default:
 			panic
 			panic
 			    ("pcireg_intr_addr_addr_get: unknown bridgetype bridge 0x%p",
 			    ("pcireg_intr_addr_addr_get: unknown bridgetype bridge 0x%p",
-			     (void *)ptr);
+			     ptr);
 		}
 		}
 	}
 	}
 }
 }
@@ -196,7 +196,7 @@ void pcireg_intr_addr_addr_set(struct pcibus_info *pcibus_info, int int_n,
  */
  */
 void pcireg_force_intr_set(struct pcibus_info *pcibus_info, int int_n)
 void pcireg_force_intr_set(struct pcibus_info *pcibus_info, int int_n)
 {
 {
-	union br_ptr *ptr = (union br_ptr *)pcibus_info->pbi_buscommon.bs_base;
+	union br_ptr __iomem *ptr = (union br_ptr __iomem *)pcibus_info->pbi_buscommon.bs_base;
 
 
 	if (pcibus_info) {
 	if (pcibus_info) {
 		switch (pcibus_info->pbi_bridge_type) {
 		switch (pcibus_info->pbi_bridge_type) {
@@ -209,7 +209,7 @@ void pcireg_force_intr_set(struct pcibus_info *pcibus_info, int int_n)
 		default:
 		default:
 			panic
 			panic
 			    ("pcireg_force_intr_set: unknown bridgetype bridge 0x%p",
 			    ("pcireg_force_intr_set: unknown bridgetype bridge 0x%p",
-			     (void *)ptr);
+			     ptr);
 		}
 		}
 	}
 	}
 }
 }
@@ -219,7 +219,7 @@ void pcireg_force_intr_set(struct pcibus_info *pcibus_info, int int_n)
  */
  */
 uint64_t pcireg_wrb_flush_get(struct pcibus_info *pcibus_info, int device)
 uint64_t pcireg_wrb_flush_get(struct pcibus_info *pcibus_info, int device)
 {
 {
-	union br_ptr *ptr = (union br_ptr *)pcibus_info->pbi_buscommon.bs_base;
+	union br_ptr __iomem *ptr = (union br_ptr __iomem *)pcibus_info->pbi_buscommon.bs_base;
 	uint64_t ret = 0;
 	uint64_t ret = 0;
 
 
 	if (pcibus_info) {
 	if (pcibus_info) {
@@ -233,7 +233,7 @@ uint64_t pcireg_wrb_flush_get(struct pcibus_info *pcibus_info, int device)
 			    __sn_readq_relaxed(&ptr->pic.p_wr_req_buf[device]);
 			    __sn_readq_relaxed(&ptr->pic.p_wr_req_buf[device]);
 			break;
 			break;
 		default:
 		default:
-		      panic("pcireg_wrb_flush_get: unknown bridgetype bridge 0x%p", (void *)ptr);
+		      panic("pcireg_wrb_flush_get: unknown bridgetype bridge 0x%p", ptr);
 		}
 		}
 
 
 	}
 	}
@@ -244,7 +244,7 @@ uint64_t pcireg_wrb_flush_get(struct pcibus_info *pcibus_info, int device)
 void pcireg_int_ate_set(struct pcibus_info *pcibus_info, int ate_index,
 void pcireg_int_ate_set(struct pcibus_info *pcibus_info, int ate_index,
 			uint64_t val)
 			uint64_t val)
 {
 {
-	union br_ptr *ptr = (union br_ptr *)pcibus_info->pbi_buscommon.bs_base;
+	union br_ptr __iomem *ptr = (union br_ptr __iomem *)pcibus_info->pbi_buscommon.bs_base;
 
 
 	if (pcibus_info) {
 	if (pcibus_info) {
 		switch (pcibus_info->pbi_bridge_type) {
 		switch (pcibus_info->pbi_bridge_type) {
@@ -257,15 +257,15 @@ void pcireg_int_ate_set(struct pcibus_info *pcibus_info, int ate_index,
 		default:
 		default:
 			panic
 			panic
 			    ("pcireg_int_ate_set: unknown bridgetype bridge 0x%p",
 			    ("pcireg_int_ate_set: unknown bridgetype bridge 0x%p",
-			     (void *)ptr);
+			     ptr);
 		}
 		}
 	}
 	}
 }
 }
 
 
-uint64_t *pcireg_int_ate_addr(struct pcibus_info *pcibus_info, int ate_index)
+uint64_t __iomem *pcireg_int_ate_addr(struct pcibus_info *pcibus_info, int ate_index)
 {
 {
-	union br_ptr *ptr = (union br_ptr *)pcibus_info->pbi_buscommon.bs_base;
-	uint64_t *ret = (uint64_t *) 0;
+	union br_ptr __iomem *ptr = (union br_ptr __iomem *)pcibus_info->pbi_buscommon.bs_base;
+	uint64_t __iomem *ret = NULL;
 
 
 	if (pcibus_info) {
 	if (pcibus_info) {
 		switch (pcibus_info->pbi_bridge_type) {
 		switch (pcibus_info->pbi_bridge_type) {
@@ -278,7 +278,7 @@ uint64_t *pcireg_int_ate_addr(struct pcibus_info *pcibus_info, int ate_index)
 		default:
 		default:
 			panic
 			panic
 			    ("pcireg_int_ate_addr: unknown bridgetype bridge 0x%p",
 			    ("pcireg_int_ate_addr: unknown bridgetype bridge 0x%p",
-			     (void *)ptr);
+			     ptr);
 		}
 		}
 	}
 	}
 	return ret;
 	return ret;

+ 6 - 6
arch/ia64/sn/pci/tioca_provider.c

@@ -38,10 +38,10 @@ tioca_gart_init(struct tioca_kernel *tioca_kern)
 	uint64_t offset;
 	uint64_t offset;
 	struct page *tmp;
 	struct page *tmp;
 	struct tioca_common *tioca_common;
 	struct tioca_common *tioca_common;
-	struct tioca *ca_base;
+	struct tioca __iomem *ca_base;
 
 
 	tioca_common = tioca_kern->ca_common;
 	tioca_common = tioca_kern->ca_common;
-	ca_base = (struct tioca *)tioca_common->ca_common.bs_base;
+	ca_base = (struct tioca __iomem *)tioca_common->ca_common.bs_base;
 
 
 	if (list_empty(tioca_kern->ca_devices))
 	if (list_empty(tioca_kern->ca_devices))
 		return 0;
 		return 0;
@@ -215,7 +215,7 @@ tioca_fastwrite_enable(struct tioca_kernel *tioca_kern)
 {
 {
 	int cap_ptr;
 	int cap_ptr;
 	uint32_t reg;
 	uint32_t reg;
-	struct tioca *tioca_base;
+	struct tioca __iomem *tioca_base;
 	struct pci_dev *pdev;
 	struct pci_dev *pdev;
 	struct tioca_common *common;
 	struct tioca_common *common;
 
 
@@ -257,7 +257,7 @@ tioca_fastwrite_enable(struct tioca_kernel *tioca_kern)
 	 * Set ca's fw to match
 	 * Set ca's fw to match
 	 */
 	 */
 
 
-	tioca_base = (struct tioca *)common->ca_common.bs_base;
+	tioca_base = (struct tioca __iomem*)common->ca_common.bs_base;
 	__sn_setq_relaxed(&tioca_base->ca_control1, CA_AGP_FW_ENABLE);
 	__sn_setq_relaxed(&tioca_base->ca_control1, CA_AGP_FW_ENABLE);
 }
 }
 
 
@@ -322,7 +322,7 @@ static uint64_t
 tioca_dma_d48(struct pci_dev *pdev, uint64_t paddr)
 tioca_dma_d48(struct pci_dev *pdev, uint64_t paddr)
 {
 {
 	struct tioca_common *tioca_common;
 	struct tioca_common *tioca_common;
-	struct tioca *ca_base;
+	struct tioca __iomem *ca_base;
 	uint64_t ct_addr;
 	uint64_t ct_addr;
 	dma_addr_t bus_addr;
 	dma_addr_t bus_addr;
 	uint32_t node_upper;
 	uint32_t node_upper;
@@ -330,7 +330,7 @@ tioca_dma_d48(struct pci_dev *pdev, uint64_t paddr)
 	struct pcidev_info *pcidev_info = SN_PCIDEV_INFO(pdev);
 	struct pcidev_info *pcidev_info = SN_PCIDEV_INFO(pdev);
 
 
 	tioca_common = (struct tioca_common *)pcidev_info->pdi_pcibus_info;
 	tioca_common = (struct tioca_common *)pcidev_info->pdi_pcibus_info;
-	ca_base = (struct tioca *)tioca_common->ca_common.bs_base;
+	ca_base = (struct tioca __iomem *)tioca_common->ca_common.bs_base;
 
 
 	ct_addr = PHYS_TO_TIODMA(paddr);
 	ct_addr = PHYS_TO_TIODMA(paddr);
 	if (!ct_addr)
 	if (!ct_addr)

+ 2 - 2
arch/mips/mm/init.c

@@ -67,8 +67,8 @@ unsigned long setup_zero_pages(void)
 
 
 	page = virt_to_page(empty_zero_page);
 	page = virt_to_page(empty_zero_page);
 	while (page < virt_to_page(empty_zero_page + (PAGE_SIZE << order))) {
 	while (page < virt_to_page(empty_zero_page + (PAGE_SIZE << order))) {
-		set_bit(PG_reserved, &page->flags);
-		reset_page_mapcount(page);
+		SetPageReserved(page);
+		set_page_count(page, 1);
 		page++;
 		page++;
 	}
 	}
 
 

+ 1 - 1
arch/powerpc/Kconfig

@@ -227,7 +227,7 @@ config SMP
 	  If you don't know what to do here, say N.
 	  If you don't know what to do here, say N.
 
 
 config NR_CPUS
 config NR_CPUS
-	int "Maximum number of CPUs (2-32)"
+	int "Maximum number of CPUs (2-128)"
 	range 2 128
 	range 2 128
 	depends on SMP
 	depends on SMP
 	default "32" if PPC64
 	default "32" if PPC64

+ 4 - 3
arch/powerpc/configs/cell_defconfig

@@ -1,7 +1,7 @@
 #
 #
 # Automatically generated make config: don't edit
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.15-rc1
-# Tue Nov 15 14:36:20 2005
+# Linux kernel version: 2.6.15-rc5
+# Tue Dec 20 15:59:26 2005
 #
 #
 CONFIG_PPC64=y
 CONFIG_PPC64=y
 CONFIG_64BIT=y
 CONFIG_64BIT=y
@@ -53,6 +53,7 @@ CONFIG_KOBJECT_UEVENT=y
 # CONFIG_IKCONFIG is not set
 # CONFIG_IKCONFIG is not set
 # CONFIG_CPUSETS is not set
 # CONFIG_CPUSETS is not set
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 # CONFIG_EMBEDDED is not set
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_ALL is not set
@@ -151,7 +152,7 @@ CONFIG_FLATMEM_MANUAL=y
 CONFIG_FLATMEM=y
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 # CONFIG_SPARSEMEM_STATIC is not set
-CONFIG_SPLIT_PTLOCK_CPUS=4096
+CONFIG_SPLIT_PTLOCK_CPUS=4
 # CONFIG_PPC_64K_PAGES is not set
 # CONFIG_PPC_64K_PAGES is not set
 CONFIG_SCHED_SMT=y
 CONFIG_SCHED_SMT=y
 CONFIG_PROC_DEVICETREE=y
 CONFIG_PROC_DEVICETREE=y

+ 5 - 4
arch/powerpc/configs/g5_defconfig

@@ -1,7 +1,7 @@
 #
 #
 # Automatically generated make config: don't edit
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.15-rc1
-# Tue Nov 15 14:39:20 2005
+# Linux kernel version: 2.6.15-rc5
+# Tue Dec 20 15:59:30 2005
 #
 #
 CONFIG_PPC64=y
 CONFIG_PPC64=y
 CONFIG_64BIT=y
 CONFIG_64BIT=y
@@ -53,6 +53,7 @@ CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_IKCONFIG_PROC=y
 # CONFIG_CPUSETS is not set
 # CONFIG_CPUSETS is not set
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 # CONFIG_EMBEDDED is not set
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_ALL is not set
@@ -162,7 +163,7 @@ CONFIG_FLATMEM_MANUAL=y
 CONFIG_FLATMEM=y
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 # CONFIG_SPARSEMEM_STATIC is not set
-CONFIG_SPLIT_PTLOCK_CPUS=4096
+CONFIG_SPLIT_PTLOCK_CPUS=4
 # CONFIG_PPC_64K_PAGES is not set
 # CONFIG_PPC_64K_PAGES is not set
 # CONFIG_SCHED_SMT is not set
 # CONFIG_SCHED_SMT is not set
 CONFIG_PROC_DEVICETREE=y
 CONFIG_PROC_DEVICETREE=y
@@ -1203,6 +1204,7 @@ CONFIG_USB_MON=y
 CONFIG_USB_SERIAL=m
 CONFIG_USB_SERIAL=m
 CONFIG_USB_SERIAL_GENERIC=y
 CONFIG_USB_SERIAL_GENERIC=y
 # CONFIG_USB_SERIAL_AIRPRIME is not set
 # CONFIG_USB_SERIAL_AIRPRIME is not set
+# CONFIG_USB_SERIAL_ANYDATA is not set
 CONFIG_USB_SERIAL_BELKIN=m
 CONFIG_USB_SERIAL_BELKIN=m
 CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
 CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
 # CONFIG_USB_SERIAL_CP2101 is not set
 # CONFIG_USB_SERIAL_CP2101 is not set
@@ -1233,7 +1235,6 @@ CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
 CONFIG_USB_SERIAL_KLSI=m
 CONFIG_USB_SERIAL_KLSI=m
 CONFIG_USB_SERIAL_KOBIL_SCT=m
 CONFIG_USB_SERIAL_KOBIL_SCT=m
 CONFIG_USB_SERIAL_MCT_U232=m
 CONFIG_USB_SERIAL_MCT_U232=m
-# CONFIG_USB_SERIAL_NOKIA_DKU2 is not set
 CONFIG_USB_SERIAL_PL2303=m
 CONFIG_USB_SERIAL_PL2303=m
 # CONFIG_USB_SERIAL_HP4X is not set
 # CONFIG_USB_SERIAL_HP4X is not set
 CONFIG_USB_SERIAL_SAFE=m
 CONFIG_USB_SERIAL_SAFE=m

+ 4 - 3
arch/powerpc/configs/iseries_defconfig

@@ -1,7 +1,7 @@
 #
 #
 # Automatically generated make config: don't edit
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.15-rc1
-# Tue Nov 15 14:38:09 2005
+# Linux kernel version: 2.6.15-rc5
+# Tue Dec 20 15:59:32 2005
 #
 #
 CONFIG_PPC64=y
 CONFIG_PPC64=y
 CONFIG_64BIT=y
 CONFIG_64BIT=y
@@ -55,6 +55,7 @@ CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_IKCONFIG_PROC=y
 # CONFIG_CPUSETS is not set
 # CONFIG_CPUSETS is not set
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 # CONFIG_EMBEDDED is not set
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_ALL is not set
@@ -144,7 +145,7 @@ CONFIG_FLATMEM_MANUAL=y
 CONFIG_FLATMEM=y
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 # CONFIG_SPARSEMEM_STATIC is not set
-CONFIG_SPLIT_PTLOCK_CPUS=4096
+CONFIG_SPLIT_PTLOCK_CPUS=4
 # CONFIG_PPC_64K_PAGES is not set
 # CONFIG_PPC_64K_PAGES is not set
 # CONFIG_SCHED_SMT is not set
 # CONFIG_SCHED_SMT is not set
 CONFIG_PROC_DEVICETREE=y
 CONFIG_PROC_DEVICETREE=y

+ 5 - 5
arch/powerpc/configs/maple_defconfig

@@ -1,7 +1,7 @@
 #
 #
 # Automatically generated make config: don't edit
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.15-rc1
-# Tue Nov 15 14:38:58 2005
+# Linux kernel version: 2.6.15-rc5
+# Tue Dec 20 15:59:36 2005
 #
 #
 CONFIG_PPC64=y
 CONFIG_PPC64=y
 CONFIG_64BIT=y
 CONFIG_64BIT=y
@@ -53,6 +53,7 @@ CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_IKCONFIG_PROC=y
 # CONFIG_CPUSETS is not set
 # CONFIG_CPUSETS is not set
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 # CONFIG_EMBEDDED is not set
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
 CONFIG_KALLSYMS=y
 CONFIG_KALLSYMS_ALL=y
 CONFIG_KALLSYMS_ALL=y
@@ -149,7 +150,7 @@ CONFIG_FLATMEM_MANUAL=y
 CONFIG_FLATMEM=y
 CONFIG_FLATMEM=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 CONFIG_FLAT_NODE_MEM_MAP=y
 # CONFIG_SPARSEMEM_STATIC is not set
 # CONFIG_SPARSEMEM_STATIC is not set
-CONFIG_SPLIT_PTLOCK_CPUS=4096
+CONFIG_SPLIT_PTLOCK_CPUS=4
 # CONFIG_PPC_64K_PAGES is not set
 # CONFIG_PPC_64K_PAGES is not set
 # CONFIG_SCHED_SMT is not set
 # CONFIG_SCHED_SMT is not set
 CONFIG_PROC_DEVICETREE=y
 CONFIG_PROC_DEVICETREE=y
@@ -242,7 +243,6 @@ CONFIG_TCP_CONG_BIC=y
 # QoS and/or fair queueing
 # QoS and/or fair queueing
 #
 #
 # CONFIG_NET_SCHED is not set
 # CONFIG_NET_SCHED is not set
-# CONFIG_NET_CLS_ROUTE is not set
 
 
 #
 #
 # Network testing
 # Network testing
@@ -794,6 +794,7 @@ CONFIG_USB_SERIAL=y
 # CONFIG_USB_SERIAL_CONSOLE is not set
 # CONFIG_USB_SERIAL_CONSOLE is not set
 CONFIG_USB_SERIAL_GENERIC=y
 CONFIG_USB_SERIAL_GENERIC=y
 # CONFIG_USB_SERIAL_AIRPRIME is not set
 # CONFIG_USB_SERIAL_AIRPRIME is not set
+# CONFIG_USB_SERIAL_ANYDATA is not set
 # CONFIG_USB_SERIAL_BELKIN is not set
 # CONFIG_USB_SERIAL_BELKIN is not set
 # CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
 # CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
 # CONFIG_USB_SERIAL_CP2101 is not set
 # CONFIG_USB_SERIAL_CP2101 is not set
@@ -824,7 +825,6 @@ CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
 # CONFIG_USB_SERIAL_KLSI is not set
 # CONFIG_USB_SERIAL_KLSI is not set
 # CONFIG_USB_SERIAL_KOBIL_SCT is not set
 # CONFIG_USB_SERIAL_KOBIL_SCT is not set
 # CONFIG_USB_SERIAL_MCT_U232 is not set
 # CONFIG_USB_SERIAL_MCT_U232 is not set
-# CONFIG_USB_SERIAL_NOKIA_DKU2 is not set
 # CONFIG_USB_SERIAL_PL2303 is not set
 # CONFIG_USB_SERIAL_PL2303 is not set
 # CONFIG_USB_SERIAL_HP4X is not set
 # CONFIG_USB_SERIAL_HP4X is not set
 # CONFIG_USB_SERIAL_SAFE is not set
 # CONFIG_USB_SERIAL_SAFE is not set

+ 4 - 3
arch/powerpc/configs/ppc64_defconfig

@@ -1,7 +1,7 @@
 #
 #
 # Automatically generated make config: don't edit
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.15-rc1
-# Fri Nov 18 16:23:24 2005
+# Linux kernel version: 2.6.15-rc5
+# Tue Dec 20 15:59:38 2005
 #
 #
 CONFIG_PPC64=y
 CONFIG_PPC64=y
 CONFIG_64BIT=y
 CONFIG_64BIT=y
@@ -54,6 +54,7 @@ CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_CPUSETS=y
 CONFIG_CPUSETS=y
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 # CONFIG_EMBEDDED is not set
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
 CONFIG_KALLSYMS=y
 CONFIG_KALLSYMS_ALL=y
 CONFIG_KALLSYMS_ALL=y
@@ -176,7 +177,7 @@ CONFIG_HAVE_MEMORY_PRESENT=y
 # CONFIG_SPARSEMEM_STATIC is not set
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPARSEMEM_EXTREME=y
 CONFIG_SPARSEMEM_EXTREME=y
 # CONFIG_MEMORY_HOTPLUG is not set
 # CONFIG_MEMORY_HOTPLUG is not set
-CONFIG_SPLIT_PTLOCK_CPUS=4096
+CONFIG_SPLIT_PTLOCK_CPUS=4
 # CONFIG_PPC_64K_PAGES is not set
 # CONFIG_PPC_64K_PAGES is not set
 # CONFIG_SCHED_SMT is not set
 # CONFIG_SCHED_SMT is not set
 CONFIG_PROC_DEVICETREE=y
 CONFIG_PROC_DEVICETREE=y

+ 4 - 3
arch/powerpc/configs/pseries_defconfig

@@ -1,7 +1,7 @@
 #
 #
 # Automatically generated make config: don't edit
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.15-rc1
-# Tue Nov 15 14:36:55 2005
+# Linux kernel version: 2.6.15-rc5
+# Tue Dec 20 15:59:40 2005
 #
 #
 CONFIG_PPC64=y
 CONFIG_PPC64=y
 CONFIG_64BIT=y
 CONFIG_64BIT=y
@@ -55,6 +55,7 @@ CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_IKCONFIG_PROC=y
 CONFIG_CPUSETS=y
 CONFIG_CPUSETS=y
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 # CONFIG_EMBEDDED is not set
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
 CONFIG_KALLSYMS=y
 CONFIG_KALLSYMS_ALL=y
 CONFIG_KALLSYMS_ALL=y
@@ -163,7 +164,7 @@ CONFIG_HAVE_MEMORY_PRESENT=y
 # CONFIG_SPARSEMEM_STATIC is not set
 # CONFIG_SPARSEMEM_STATIC is not set
 CONFIG_SPARSEMEM_EXTREME=y
 CONFIG_SPARSEMEM_EXTREME=y
 # CONFIG_MEMORY_HOTPLUG is not set
 # CONFIG_MEMORY_HOTPLUG is not set
-CONFIG_SPLIT_PTLOCK_CPUS=4096
+CONFIG_SPLIT_PTLOCK_CPUS=4
 CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
 CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
 # CONFIG_PPC_64K_PAGES is not set
 # CONFIG_PPC_64K_PAGES is not set
 CONFIG_SCHED_SMT=y
 CONFIG_SCHED_SMT=y

+ 2 - 2
arch/powerpc/kernel/entry_64.S

@@ -183,8 +183,8 @@ syscall_exit_trace_cont:
 	ld	r13,GPR13(r1)		/* returning to usermode */
 	ld	r13,GPR13(r1)		/* returning to usermode */
 1:	ld	r2,GPR2(r1)
 1:	ld	r2,GPR2(r1)
 	li	r12,MSR_RI
 	li	r12,MSR_RI
-	andc	r10,r10,r12
-	mtmsrd	r10,1			/* clear MSR.RI */
+	andc	r11,r10,r12
+	mtmsrd	r11,1			/* clear MSR.RI */
 	ld	r1,GPR1(r1)
 	ld	r1,GPR1(r1)
 	mtlr	r4
 	mtlr	r4
 	mtcr	r5
 	mtcr	r5

+ 1 - 1
arch/powerpc/kernel/kprobes.c

@@ -177,7 +177,7 @@ static inline int kprobe_handler(struct pt_regs *regs)
 			save_previous_kprobe(kcb);
 			save_previous_kprobe(kcb);
 			set_current_kprobe(p, regs, kcb);
 			set_current_kprobe(p, regs, kcb);
 			kcb->kprobe_saved_msr = regs->msr;
 			kcb->kprobe_saved_msr = regs->msr;
-			p->nmissed++;
+			kprobes_inc_nmissed_count(p);
 			prepare_singlestep(p, regs);
 			prepare_singlestep(p, regs);
 			kcb->kprobe_status = KPROBE_REENTER;
 			kcb->kprobe_status = KPROBE_REENTER;
 			return 1;
 			return 1;

+ 9 - 1
arch/powerpc/kernel/setup_64.c

@@ -102,7 +102,15 @@ int boot_cpuid_phys = 0;
 dev_t boot_dev;
 dev_t boot_dev;
 u64 ppc64_pft_size;
 u64 ppc64_pft_size;
 
 
-struct ppc64_caches ppc64_caches;
+/* Pick defaults since we might want to patch instructions
+ * before we've read this from the device tree.
+ */
+struct ppc64_caches ppc64_caches = {
+	.dline_size = 0x80,
+	.log_dline_size = 7,
+	.iline_size = 0x80,
+	.log_iline_size = 7
+};
 EXPORT_SYMBOL_GPL(ppc64_caches);
 EXPORT_SYMBOL_GPL(ppc64_caches);
 
 
 /*
 /*

+ 1 - 1
arch/powerpc/kernel/syscalls.c

@@ -247,7 +247,7 @@ long ppc64_personality(unsigned long personality)
 #define OVERRIDE_MACHINE    0
 #define OVERRIDE_MACHINE    0
 #endif
 #endif
 
 
-static inline int override_machine(char *mach)
+static inline int override_machine(char __user *mach)
 {
 {
 	if (OVERRIDE_MACHINE) {
 	if (OVERRIDE_MACHINE) {
 		/* change ppc64 to ppc */
 		/* change ppc64 to ppc */

+ 1 - 1
arch/powerpc/mm/hash_utils_64.c

@@ -601,7 +601,7 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
 	/* Handle hugepage regions */
 	/* Handle hugepage regions */
 	if (unlikely(in_hugepage_area(mm->context, ea))) {
 	if (unlikely(in_hugepage_area(mm->context, ea))) {
 		DBG_LOW(" -> huge page !\n");
 		DBG_LOW(" -> huge page !\n");
-		return hash_huge_page(mm, access, ea, vsid, local);
+		return hash_huge_page(mm, access, ea, vsid, local, trap);
 	}
 	}
 
 
 	/* Get PTE and page size from page tables */
 	/* Get PTE and page size from page tables */

+ 77 - 18
arch/powerpc/mm/hugetlbpage.c

@@ -148,43 +148,63 @@ int is_aligned_hugepage_range(unsigned long addr, unsigned long len)
 	return 0;
 	return 0;
 }
 }
 
 
+struct slb_flush_info {
+	struct mm_struct *mm;
+	u16 newareas;
+};
+
 static void flush_low_segments(void *parm)
 static void flush_low_segments(void *parm)
 {
 {
-	u16 areas = (unsigned long) parm;
+	struct slb_flush_info *fi = parm;
 	unsigned long i;
 	unsigned long i;
 
 
-	asm volatile("isync" : : : "memory");
+	BUILD_BUG_ON((sizeof(fi->newareas)*8) != NUM_LOW_AREAS);
+
+	if (current->active_mm != fi->mm)
+		return;
+
+	/* Only need to do anything if this CPU is working in the same
+	 * mm as the one which has changed */
 
 
-	BUILD_BUG_ON((sizeof(areas)*8) != NUM_LOW_AREAS);
+	/* update the paca copy of the context struct */
+	get_paca()->context = current->active_mm->context;
 
 
+	asm volatile("isync" : : : "memory");
 	for (i = 0; i < NUM_LOW_AREAS; i++) {
 	for (i = 0; i < NUM_LOW_AREAS; i++) {
-		if (! (areas & (1U << i)))
+		if (! (fi->newareas & (1U << i)))
 			continue;
 			continue;
 		asm volatile("slbie %0"
 		asm volatile("slbie %0"
 			     : : "r" ((i << SID_SHIFT) | SLBIE_C));
 			     : : "r" ((i << SID_SHIFT) | SLBIE_C));
 	}
 	}
-
 	asm volatile("isync" : : : "memory");
 	asm volatile("isync" : : : "memory");
 }
 }
 
 
 static void flush_high_segments(void *parm)
 static void flush_high_segments(void *parm)
 {
 {
-	u16 areas = (unsigned long) parm;
+	struct slb_flush_info *fi = parm;
 	unsigned long i, j;
 	unsigned long i, j;
 
 
-	asm volatile("isync" : : : "memory");
 
 
-	BUILD_BUG_ON((sizeof(areas)*8) != NUM_HIGH_AREAS);
+	BUILD_BUG_ON((sizeof(fi->newareas)*8) != NUM_HIGH_AREAS);
 
 
+	if (current->active_mm != fi->mm)
+		return;
+
+	/* Only need to do anything if this CPU is working in the same
+	 * mm as the one which has changed */
+
+	/* update the paca copy of the context struct */
+	get_paca()->context = current->active_mm->context;
+
+	asm volatile("isync" : : : "memory");
 	for (i = 0; i < NUM_HIGH_AREAS; i++) {
 	for (i = 0; i < NUM_HIGH_AREAS; i++) {
-		if (! (areas & (1U << i)))
+		if (! (fi->newareas & (1U << i)))
 			continue;
 			continue;
 		for (j = 0; j < (1UL << (HTLB_AREA_SHIFT-SID_SHIFT)); j++)
 		for (j = 0; j < (1UL << (HTLB_AREA_SHIFT-SID_SHIFT)); j++)
 			asm volatile("slbie %0"
 			asm volatile("slbie %0"
 				     :: "r" (((i << HTLB_AREA_SHIFT)
 				     :: "r" (((i << HTLB_AREA_SHIFT)
-					     + (j << SID_SHIFT)) | SLBIE_C));
+					      + (j << SID_SHIFT)) | SLBIE_C));
 	}
 	}
-
 	asm volatile("isync" : : : "memory");
 	asm volatile("isync" : : : "memory");
 }
 }
 
 
@@ -229,6 +249,7 @@ static int prepare_high_area_for_htlb(struct mm_struct *mm, unsigned long area)
 static int open_low_hpage_areas(struct mm_struct *mm, u16 newareas)
 static int open_low_hpage_areas(struct mm_struct *mm, u16 newareas)
 {
 {
 	unsigned long i;
 	unsigned long i;
+	struct slb_flush_info fi;
 
 
 	BUILD_BUG_ON((sizeof(newareas)*8) != NUM_LOW_AREAS);
 	BUILD_BUG_ON((sizeof(newareas)*8) != NUM_LOW_AREAS);
 	BUILD_BUG_ON((sizeof(mm->context.low_htlb_areas)*8) != NUM_LOW_AREAS);
 	BUILD_BUG_ON((sizeof(mm->context.low_htlb_areas)*8) != NUM_LOW_AREAS);
@@ -244,19 +265,20 @@ static int open_low_hpage_areas(struct mm_struct *mm, u16 newareas)
 
 
 	mm->context.low_htlb_areas |= newareas;
 	mm->context.low_htlb_areas |= newareas;
 
 
-	/* update the paca copy of the context struct */
-	get_paca()->context = mm->context;
-
 	/* the context change must make it to memory before the flush,
 	/* the context change must make it to memory before the flush,
 	 * so that further SLB misses do the right thing. */
 	 * so that further SLB misses do the right thing. */
 	mb();
 	mb();
-	on_each_cpu(flush_low_segments, (void *)(unsigned long)newareas, 0, 1);
+
+	fi.mm = mm;
+	fi.newareas = newareas;
+	on_each_cpu(flush_low_segments, &fi, 0, 1);
 
 
 	return 0;
 	return 0;
 }
 }
 
 
 static int open_high_hpage_areas(struct mm_struct *mm, u16 newareas)
 static int open_high_hpage_areas(struct mm_struct *mm, u16 newareas)
 {
 {
+	struct slb_flush_info fi;
 	unsigned long i;
 	unsigned long i;
 
 
 	BUILD_BUG_ON((sizeof(newareas)*8) != NUM_HIGH_AREAS);
 	BUILD_BUG_ON((sizeof(newareas)*8) != NUM_HIGH_AREAS);
@@ -280,7 +302,10 @@ static int open_high_hpage_areas(struct mm_struct *mm, u16 newareas)
 	/* the context change must make it to memory before the flush,
 	/* the context change must make it to memory before the flush,
 	 * so that further SLB misses do the right thing. */
 	 * so that further SLB misses do the right thing. */
 	mb();
 	mb();
-	on_each_cpu(flush_high_segments, (void *)(unsigned long)newareas, 0, 1);
+
+	fi.mm = mm;
+	fi.newareas = newareas;
+	on_each_cpu(flush_high_segments, &fi, 0, 1);
 
 
 	return 0;
 	return 0;
 }
 }
@@ -639,8 +664,36 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
 	return -ENOMEM;
 	return -ENOMEM;
 }
 }
 
 
+/*
+ * Called by asm hashtable.S for doing lazy icache flush
+ */
+static unsigned int hash_huge_page_do_lazy_icache(unsigned long rflags,
+						  pte_t pte, int trap)
+{
+	struct page *page;
+	int i;
+
+	if (!pfn_valid(pte_pfn(pte)))
+		return rflags;
+
+	page = pte_page(pte);
+
+	/* page is dirty */
+	if (!test_bit(PG_arch_1, &page->flags) && !PageReserved(page)) {
+		if (trap == 0x400) {
+			for (i = 0; i < (HPAGE_SIZE / PAGE_SIZE); i++)
+				__flush_dcache_icache(page_address(page+i));
+			set_bit(PG_arch_1, &page->flags);
+		} else {
+			rflags |= HPTE_R_N;
+		}
+	}
+	return rflags;
+}
+
 int hash_huge_page(struct mm_struct *mm, unsigned long access,
 int hash_huge_page(struct mm_struct *mm, unsigned long access,
-		   unsigned long ea, unsigned long vsid, int local)
+		   unsigned long ea, unsigned long vsid, int local,
+		   unsigned long trap)
 {
 {
 	pte_t *ptep;
 	pte_t *ptep;
 	unsigned long old_pte, new_pte;
 	unsigned long old_pte, new_pte;
@@ -691,6 +744,11 @@ int hash_huge_page(struct mm_struct *mm, unsigned long access,
 	rflags = 0x2 | (!(new_pte & _PAGE_RW));
 	rflags = 0x2 | (!(new_pte & _PAGE_RW));
  	/* _PAGE_EXEC -> HW_NO_EXEC since it's inverted */
  	/* _PAGE_EXEC -> HW_NO_EXEC since it's inverted */
 	rflags |= ((new_pte & _PAGE_EXEC) ? 0 : HPTE_R_N);
 	rflags |= ((new_pte & _PAGE_EXEC) ? 0 : HPTE_R_N);
+	if (!cpu_has_feature(CPU_FTR_COHERENT_ICACHE))
+		/* No CPU has hugepages but lacks no execute, so we
+		 * don't need to worry about that case */
+		rflags = hash_huge_page_do_lazy_icache(rflags, __pte(old_pte),
+						       trap);
 
 
 	/* Check if pte already has an hpte (case 2) */
 	/* Check if pte already has an hpte (case 2) */
 	if (unlikely(old_pte & _PAGE_HASHPTE)) {
 	if (unlikely(old_pte & _PAGE_HASHPTE)) {
@@ -703,7 +761,8 @@ int hash_huge_page(struct mm_struct *mm, unsigned long access,
 		slot = (hash & htab_hash_mask) * HPTES_PER_GROUP;
 		slot = (hash & htab_hash_mask) * HPTES_PER_GROUP;
 		slot += (old_pte & _PAGE_F_GIX) >> 12;
 		slot += (old_pte & _PAGE_F_GIX) >> 12;
 
 
-		if (ppc_md.hpte_updatepp(slot, rflags, va, 1, local) == -1)
+		if (ppc_md.hpte_updatepp(slot, rflags, va, mmu_huge_psize,
+					 local) == -1)
 			old_pte &= ~_PAGE_HPTEFLAGS;
 			old_pte &= ~_PAGE_HPTEFLAGS;
 	}
 	}
 
 

+ 1 - 1
arch/powerpc/mm/numa.c

@@ -125,7 +125,7 @@ void __init get_region(unsigned int nid, unsigned long *start_pfn,
 
 
 	/* We didnt find a matching region, return start/end as 0 */
 	/* We didnt find a matching region, return start/end as 0 */
 	if (*start_pfn == -1UL)
 	if (*start_pfn == -1UL)
-		start_pfn = 0;
+		*start_pfn = 0;
 }
 }
 
 
 static inline void map_cpu_to_node(int cpu, int node)
 static inline void map_cpu_to_node(int cpu, int node)

+ 1 - 6
arch/powerpc/mm/stab.c

@@ -288,11 +288,6 @@ void stab_initialize(unsigned long stab)
 		return;
 		return;
 	}
 	}
 #endif /* CONFIG_PPC_ISERIES */
 #endif /* CONFIG_PPC_ISERIES */
-#ifdef CONFIG_PPC_PSERIES
-	if (platform_is_lpar()) {
-		plpar_hcall_norets(H_SET_ASR, stabreal);
-		return;
-	}
-#endif
+
 	mtspr(SPRN_ASR, stabreal);
 	mtspr(SPRN_ASR, stabreal);
 }
 }

+ 16 - 5
arch/powerpc/platforms/powermac/feature.c

@@ -1650,11 +1650,19 @@ void pmac_tweak_clock_spreading(int enable)
 	 */
 	 */
 
 
 	if (macio->type == macio_intrepid) {
 	if (macio->type == macio_intrepid) {
-		if (enable)
-			UN_OUT(UNI_N_CLOCK_SPREADING, 2);
-		else
-			UN_OUT(UNI_N_CLOCK_SPREADING, 0);
-		mdelay(40);
+		struct device_node *clock =
+			of_find_node_by_path("/uni-n@f8000000/hw-clock");
+		if (clock && get_property(clock, "platform-do-clockspreading",
+					  NULL)) {
+			printk(KERN_INFO "%sabling clock spreading on Intrepid"
+			       " ASIC\n", enable ? "En" : "Dis");
+			if (enable)
+				UN_OUT(UNI_N_CLOCK_SPREADING, 2);
+			else
+				UN_OUT(UNI_N_CLOCK_SPREADING, 0);
+			mdelay(40);
+		}
+		of_node_put(clock);
 	}
 	}
 
 
 	while (machine_is_compatible("PowerBook5,2") ||
 	while (machine_is_compatible("PowerBook5,2") ||
@@ -1724,6 +1732,9 @@ void pmac_tweak_clock_spreading(int enable)
 			pmac_low_i2c_close(ui2c);
 			pmac_low_i2c_close(ui2c);
 			break;
 			break;
 		}
 		}
+		printk(KERN_INFO "%sabling clock spreading on i2c clock chip\n",
+		       enable ? "En" : "Dis");
+
 		pmac_low_i2c_setmode(ui2c, pmac_low_i2c_mode_stdsub);
 		pmac_low_i2c_setmode(ui2c, pmac_low_i2c_mode_stdsub);
 		rc = pmac_low_i2c_xfer(ui2c, 0xd2 | pmac_low_i2c_write, 0x80, buffer, 9);
 		rc = pmac_low_i2c_xfer(ui2c, 0xd2 | pmac_low_i2c_write, 0x80, buffer, 9);
 		DBG("write result: %d,", rc);
 		DBG("write result: %d,", rc);

+ 7 - 4
arch/powerpc/platforms/pseries/iommu.c

@@ -109,6 +109,9 @@ static void tce_build_pSeriesLP(struct iommu_table *tbl, long tcenum,
 	u64 rc;
 	u64 rc;
 	union tce_entry tce;
 	union tce_entry tce;
 
 
+	tcenum <<= TCE_PAGE_FACTOR;
+	npages <<= TCE_PAGE_FACTOR;
+
 	tce.te_word = 0;
 	tce.te_word = 0;
 	tce.te_rpn = (virt_to_abs(uaddr)) >> TCE_SHIFT;
 	tce.te_rpn = (virt_to_abs(uaddr)) >> TCE_SHIFT;
 	tce.te_rdwr = 1;
 	tce.te_rdwr = 1;
@@ -143,10 +146,7 @@ static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum,
 	union tce_entry tce, *tcep;
 	union tce_entry tce, *tcep;
 	long l, limit;
 	long l, limit;
 
 
-	tcenum <<= TCE_PAGE_FACTOR;
-	npages <<= TCE_PAGE_FACTOR;
-
-	if (npages == 1)
+	if (TCE_PAGE_FACTOR == 0 && npages == 1)
 		return tce_build_pSeriesLP(tbl, tcenum, npages, uaddr,
 		return tce_build_pSeriesLP(tbl, tcenum, npages, uaddr,
 					   direction);
 					   direction);
 
 
@@ -164,6 +164,9 @@ static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum,
 		__get_cpu_var(tce_page) = tcep;
 		__get_cpu_var(tce_page) = tcep;
 	}
 	}
 
 
+	tcenum <<= TCE_PAGE_FACTOR;
+	npages <<= TCE_PAGE_FACTOR;
+
 	tce.te_word = 0;
 	tce.te_word = 0;
 	tce.te_rpn = (virt_to_abs(uaddr)) >> TCE_SHIFT;
 	tce.te_rpn = (virt_to_abs(uaddr)) >> TCE_SHIFT;
 	tce.te_rdwr = 1;
 	tce.te_rdwr = 1;

+ 0 - 12
arch/powerpc/platforms/pseries/lpar.c

@@ -298,18 +298,6 @@ long pSeries_lpar_hpte_insert(unsigned long hpte_group,
 	if (!(vflags & HPTE_V_BOLTED))
 	if (!(vflags & HPTE_V_BOLTED))
 		DBG_LOW(" hpte_v=%016lx, hpte_r=%016lx\n", hpte_v, hpte_r);
 		DBG_LOW(" hpte_v=%016lx, hpte_r=%016lx\n", hpte_v, hpte_r);
 
 
-#if 1
-	{
-		int i;
-		for (i=0;i<8;i++) {
-			unsigned long w0, w1;
-			plpar_pte_read(0, hpte_group, &w0, &w1);
-			BUG_ON (HPTE_V_COMPARE(hpte_v, w0)
-				&& (w0 & HPTE_V_VALID));
-		}
-	}
-#endif
-
 	/* Now fill in the actual HPTE */
 	/* Now fill in the actual HPTE */
 	/* Set CEC cookie to 0         */
 	/* Set CEC cookie to 0         */
 	/* Zero page = 0               */
 	/* Zero page = 0               */

+ 3 - 3
arch/ppc/Kconfig

@@ -767,14 +767,14 @@ config CPM2
 	  on it (826x, 827x, 8560).
 	  on it (826x, 827x, 8560).
 
 
 config PPC_CHRP
 config PPC_CHRP
-	bool "  Common Hardware Reference Platform (CHRP) based machines"
+	bool
 	depends on PPC_MULTIPLATFORM
 	depends on PPC_MULTIPLATFORM
 	select PPC_I8259
 	select PPC_I8259
 	select PPC_INDIRECT_PCI
 	select PPC_INDIRECT_PCI
 	default y
 	default y
 
 
 config PPC_PMAC
 config PPC_PMAC
-	bool "  Apple PowerMac based machines"
+	bool
 	depends on PPC_MULTIPLATFORM
 	depends on PPC_MULTIPLATFORM
 	select PPC_INDIRECT_PCI
 	select PPC_INDIRECT_PCI
 	default y
 	default y
@@ -785,7 +785,7 @@ config PPC_PMAC64
 	default y
 	default y
 
 
 config PPC_PREP
 config PPC_PREP
-	bool "  PowerPC Reference Platform (PReP) based machines"
+	bool
 	depends on PPC_MULTIPLATFORM
 	depends on PPC_MULTIPLATFORM
 	select PPC_I8259
 	select PPC_I8259
 	select PPC_INDIRECT_PCI
 	select PPC_INDIRECT_PCI

+ 4 - 0
arch/ppc/kernel/smp.c

@@ -301,6 +301,10 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
 
 
 	/* Probe platform for CPUs: always linear. */
 	/* Probe platform for CPUs: always linear. */
 	num_cpus = smp_ops->probe();
 	num_cpus = smp_ops->probe();
+	
+	if (num_cpus < 2)
+		smp_tb_synchronized = 1;
+	
 	for (i = 0; i < num_cpus; ++i)
 	for (i = 0; i < num_cpus; ++i)
 		cpu_set(i, cpu_possible_map);
 		cpu_set(i, cpu_possible_map);
 
 

+ 2 - 1
arch/ppc/platforms/85xx/mpc85xx_cds_common.c

@@ -130,10 +130,11 @@ mpc85xx_cds_show_cpuinfo(struct seq_file *m)
 }
 }
 
 
 #ifdef CONFIG_CPM2
 #ifdef CONFIG_CPM2
-static void cpm2_cascade(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t cpm2_cascade(int irq, void *dev_id, struct pt_regs *regs)
 {
 {
 	while((irq = cpm2_get_irq(regs)) >= 0)
 	while((irq = cpm2_get_irq(regs)) >= 0)
 		__do_IRQ(irq, regs);
 		__do_IRQ(irq, regs);
+	return IRQ_HANDLED;
 }
 }
 
 
 static struct irqaction cpm2_irqaction = {
 static struct irqaction cpm2_irqaction = {

+ 15 - 5
arch/ppc/platforms/pmac_feature.c

@@ -1606,11 +1606,19 @@ void pmac_tweak_clock_spreading(int enable)
 	 */
 	 */
 
 
 	if (macio->type == macio_intrepid) {
 	if (macio->type == macio_intrepid) {
-		if (enable)
-			UN_OUT(UNI_N_CLOCK_SPREADING, 2);
-		else
-			UN_OUT(UNI_N_CLOCK_SPREADING, 0);
-		mdelay(40);
+		struct device_node *clock =
+			of_find_node_by_path("/uni-n@f8000000/hw-clock");
+		if (clock && get_property(clock, "platform-do-clockspreading",
+					  NULL)) {
+			printk(KERN_INFO "%sabling clock spreading on Intrepid"
+			       " ASIC\n", enable ? "En" : "Dis");
+			if (enable)
+				UN_OUT(UNI_N_CLOCK_SPREADING, 2);
+			else
+				UN_OUT(UNI_N_CLOCK_SPREADING, 0);
+			mdelay(40);
+		}
+		of_node_put(clock);
 	}
 	}
 
 
 	while (machine_is_compatible("PowerBook5,2") ||
 	while (machine_is_compatible("PowerBook5,2") ||
@@ -1680,6 +1688,8 @@ void pmac_tweak_clock_spreading(int enable)
 			pmac_low_i2c_close(ui2c);
 			pmac_low_i2c_close(ui2c);
 			break;
 			break;
 		}
 		}
+		printk(KERN_INFO "%sabling clock spreading on i2c clock chip\n",
+		       enable ? "En" : "Dis");
 		pmac_low_i2c_setmode(ui2c, pmac_low_i2c_mode_stdsub);
 		pmac_low_i2c_setmode(ui2c, pmac_low_i2c_mode_stdsub);
 		rc = pmac_low_i2c_xfer(ui2c, 0xd2 | pmac_low_i2c_write, 0x80, buffer, 9);
 		rc = pmac_low_i2c_xfer(ui2c, 0xd2 | pmac_low_i2c_write, 0x80, buffer, 9);
 		DBG("write result: %d,", rc);
 		DBG("write result: %d,", rc);

+ 1 - 0
arch/ppc/syslib/ppc4xx_dma.c

@@ -30,6 +30,7 @@
 
 
 #include <asm/system.h>
 #include <asm/system.h>
 #include <asm/io.h>
 #include <asm/io.h>
+#include <asm/dma.h>
 #include <asm/ppc4xx_dma.h>
 #include <asm/ppc4xx_dma.h>
 
 
 ppc_dma_ch_t dma_channels[MAX_PPC4xx_DMA_CHANNELS];
 ppc_dma_ch_t dma_channels[MAX_PPC4xx_DMA_CHANNELS];

+ 1 - 1
arch/sparc/Makefile

@@ -34,7 +34,7 @@ libs-y += arch/sparc/prom/ arch/sparc/lib/
 # Renaming is done to avoid confusing pattern matching rules in 2.5.45 (multy-)
 # Renaming is done to avoid confusing pattern matching rules in 2.5.45 (multy-)
 INIT_Y		:= $(patsubst %/, %/built-in.o, $(init-y))
 INIT_Y		:= $(patsubst %/, %/built-in.o, $(init-y))
 CORE_Y		:= $(core-y)
 CORE_Y		:= $(core-y)
-CORE_Y		+= kernel/ mm/ fs/ ipc/ security/ crypto/
+CORE_Y		+= kernel/ mm/ fs/ ipc/ security/ crypto/ block/
 CORE_Y		:= $(patsubst %/, %/built-in.o, $(CORE_Y))
 CORE_Y		:= $(patsubst %/, %/built-in.o, $(CORE_Y))
 DRIVERS_Y	:= $(patsubst %/, %/built-in.o, $(drivers-y))
 DRIVERS_Y	:= $(patsubst %/, %/built-in.o, $(drivers-y))
 NET_Y		:= $(patsubst %/, %/built-in.o, $(net-y))
 NET_Y		:= $(patsubst %/, %/built-in.o, $(net-y))

+ 12 - 12
arch/sparc/kernel/ebus.c

@@ -22,7 +22,7 @@
 #include <asm/oplib.h>
 #include <asm/oplib.h>
 #include <asm/bpp.h>
 #include <asm/bpp.h>
 
 
-struct linux_ebus *ebus_chain = 0;
+struct linux_ebus *ebus_chain = NULL;
 
 
 /* We are together with pcic.c under CONFIG_PCI. */
 /* We are together with pcic.c under CONFIG_PCI. */
 extern unsigned int pcic_pin_to_irq(unsigned int, char *name);
 extern unsigned int pcic_pin_to_irq(unsigned int, char *name);
@@ -46,7 +46,7 @@ static struct ebus_device_irq je1_1[] = {
 	{ "SUNW,CS4231",	 0 },
 	{ "SUNW,CS4231",	 0 },
 	{ "parallel",		 0 },
 	{ "parallel",		 0 },
 	{ "se",			 2 },
 	{ "se",			 2 },
-	{ 0, 0 }
+	{ NULL, 0 }
 };
 };
 
 
 /*
 /*
@@ -55,7 +55,7 @@ static struct ebus_device_irq je1_1[] = {
  */
  */
 static struct ebus_system_entry ebus_blacklist[] = {
 static struct ebus_system_entry ebus_blacklist[] = {
 	{ "SUNW,JavaEngine1", je1_1 },
 	{ "SUNW,JavaEngine1", je1_1 },
-	{ 0, 0 }
+	{ NULL, NULL }
 };
 };
 
 
 static struct ebus_device_irq *ebus_blackp = NULL;
 static struct ebus_device_irq *ebus_blackp = NULL;
@@ -233,7 +233,7 @@ void __init fill_ebus_device(int node, struct linux_ebus_device *dev)
 			ebus_alloc(sizeof(struct linux_ebus_child));
 			ebus_alloc(sizeof(struct linux_ebus_child));
 
 
 		child = dev->children;
 		child = dev->children;
-		child->next = 0;
+		child->next = NULL;
 		child->parent = dev;
 		child->parent = dev;
 		child->bus = dev->bus;
 		child->bus = dev->bus;
 		fill_ebus_child(node, &regs[0], child);
 		fill_ebus_child(node, &regs[0], child);
@@ -243,7 +243,7 @@ void __init fill_ebus_device(int node, struct linux_ebus_device *dev)
 				ebus_alloc(sizeof(struct linux_ebus_child));
 				ebus_alloc(sizeof(struct linux_ebus_child));
 
 
 			child = child->next;
 			child = child->next;
-			child->next = 0;
+			child->next = NULL;
 			child->parent = dev;
 			child->parent = dev;
 			child->bus = dev->bus;
 			child->bus = dev->bus;
 			fill_ebus_child(node, &regs[0], child);
 			fill_ebus_child(node, &regs[0], child);
@@ -275,7 +275,7 @@ void __init ebus_init(void)
 		}
 		}
 	}
 	}
 
 
-	pdev = pci_get_device(PCI_VENDOR_ID_SUN, PCI_DEVICE_ID_SUN_EBUS, 0);
+	pdev = pci_get_device(PCI_VENDOR_ID_SUN, PCI_DEVICE_ID_SUN_EBUS, NULL);
 	if (!pdev) {
 	if (!pdev) {
 		return;
 		return;
 	}
 	}
@@ -284,7 +284,7 @@ void __init ebus_init(void)
 
 
 	ebus_chain = ebus = (struct linux_ebus *)
 	ebus_chain = ebus = (struct linux_ebus *)
 			ebus_alloc(sizeof(struct linux_ebus));
 			ebus_alloc(sizeof(struct linux_ebus));
-	ebus->next = 0;
+	ebus->next = NULL;
 
 
 	while (ebusnd) {
 	while (ebusnd) {
 
 
@@ -325,8 +325,8 @@ void __init ebus_init(void)
 				ebus_alloc(sizeof(struct linux_ebus_device));
 				ebus_alloc(sizeof(struct linux_ebus_device));
 
 
 		dev = ebus->devices;
 		dev = ebus->devices;
-		dev->next = 0;
-		dev->children = 0;
+		dev->next = NULL;
+		dev->children = NULL;
 		dev->bus = ebus;
 		dev->bus = ebus;
 		fill_ebus_device(nd, dev);
 		fill_ebus_device(nd, dev);
 
 
@@ -335,8 +335,8 @@ void __init ebus_init(void)
 				ebus_alloc(sizeof(struct linux_ebus_device));
 				ebus_alloc(sizeof(struct linux_ebus_device));
 
 
 			dev = dev->next;
 			dev = dev->next;
-			dev->next = 0;
-			dev->children = 0;
+			dev->next = NULL;
+			dev->children = NULL;
 			dev->bus = ebus;
 			dev->bus = ebus;
 			fill_ebus_device(nd, dev);
 			fill_ebus_device(nd, dev);
 		}
 		}
@@ -353,7 +353,7 @@ void __init ebus_init(void)
 		ebus->next = (struct linux_ebus *)
 		ebus->next = (struct linux_ebus *)
 			ebus_alloc(sizeof(struct linux_ebus));
 			ebus_alloc(sizeof(struct linux_ebus));
 		ebus = ebus->next;
 		ebus = ebus->next;
-		ebus->next = 0;
+		ebus->next = NULL;
 		++num_ebus;
 		++num_ebus;
 	}
 	}
 	if (pdev)
 	if (pdev)

+ 1 - 1
arch/sparc/kernel/led.c

@@ -55,7 +55,7 @@ static int led_read_proc(char *buf, char **start, off_t offset, int count,
 	return len;
 	return len;
 }
 }
 
 
-static int led_write_proc(struct file *file, const char *buffer,
+static int led_write_proc(struct file *file, const char __user *buffer,
 			  unsigned long count, void *data)
 			  unsigned long count, void *data)
 {
 {
 	char *buf = NULL;
 	char *buf = NULL;

+ 1 - 1
arch/sparc/kernel/pcic.c

@@ -161,7 +161,7 @@ static struct pcic_sn2list pcic_known_sysnames[] = {
 static int pcic0_up;
 static int pcic0_up;
 static struct linux_pcic pcic0;
 static struct linux_pcic pcic0;
 
 
-void * __iomem pcic_regs;
+void __iomem *pcic_regs;
 volatile int pcic_speculative;
 volatile int pcic_speculative;
 volatile int pcic_trapped;
 volatile int pcic_trapped;
 
 

+ 2 - 2
arch/sparc/kernel/time.c

@@ -49,7 +49,7 @@ DEFINE_SPINLOCK(rtc_lock);
 enum sparc_clock_type sp_clock_typ;
 enum sparc_clock_type sp_clock_typ;
 DEFINE_SPINLOCK(mostek_lock);
 DEFINE_SPINLOCK(mostek_lock);
 void __iomem *mstk48t02_regs = NULL;
 void __iomem *mstk48t02_regs = NULL;
-static struct mostek48t08 *mstk48t08_regs = NULL;
+static struct mostek48t08 __iomem *mstk48t08_regs = NULL;
 static int set_rtc_mmss(unsigned long);
 static int set_rtc_mmss(unsigned long);
 static int sbus_do_settimeofday(struct timespec *tv);
 static int sbus_do_settimeofday(struct timespec *tv);
 
 
@@ -342,7 +342,7 @@ static __inline__ void clock_probe(void)
 		/* XXX r/o attribute is somewhere in r.flags */
 		/* XXX r/o attribute is somewhere in r.flags */
 		r.flags = clk_reg[0].which_io;
 		r.flags = clk_reg[0].which_io;
 		r.start = clk_reg[0].phys_addr;
 		r.start = clk_reg[0].phys_addr;
-		mstk48t08_regs = (struct mostek48t08 *) sbus_ioremap(&r, 0,
+		mstk48t08_regs = sbus_ioremap(&r, 0,
 		    sizeof(struct mostek48t08), "mk48t08");
 		    sizeof(struct mostek48t08), "mk48t08");
 
 
 		mstk48t02_regs = &mstk48t08_regs->regs;
 		mstk48t02_regs = &mstk48t08_regs->regs;

+ 0 - 1
arch/sparc/lib/atomic32.c

@@ -66,7 +66,6 @@ int atomic_add_unless(atomic_t *v, int a, int u)
 	return ret != u;
 	return ret != u;
 }
 }
 
 
-static inline void atomic_clear_mask(unsigned long mask, unsigned long *addr)
 /* Atomic operations are already serializing */
 /* Atomic operations are already serializing */
 void atomic_set(atomic_t *v, int i)
 void atomic_set(atomic_t *v, int i)
 {
 {

+ 1 - 1
arch/sparc/mm/sun4c.c

@@ -497,7 +497,7 @@ static void __init sun4c_probe_mmu(void)
 	patch_kernel_fault_handler();
 	patch_kernel_fault_handler();
 }
 }
 
 
-volatile unsigned long *sun4c_memerr_reg = NULL;
+volatile unsigned long __iomem *sun4c_memerr_reg = NULL;
 
 
 void __init sun4c_probe_memerr_reg(void)
 void __init sun4c_probe_memerr_reg(void)
 {
 {

+ 0 - 5
arch/sparc64/Makefile

@@ -17,7 +17,6 @@ CC		:= $(shell if $(CC) -m64 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then
 NEW_GCC := $(call cc-option-yn, -m64 -mcmodel=medlow)
 NEW_GCC := $(call cc-option-yn, -m64 -mcmodel=medlow)
 NEW_GAS := $(shell if $(LD) -V 2>&1 | grep 'elf64_sparc' > /dev/null; then echo y; else echo n; fi)
 NEW_GAS := $(shell if $(LD) -V 2>&1 | grep 'elf64_sparc' > /dev/null; then echo y; else echo n; fi)
 UNDECLARED_REGS := $(shell if $(CC) -c -x assembler /dev/null -Wa,--help | grep undeclared-regs > /dev/null; then echo y; else echo n; fi; )
 UNDECLARED_REGS := $(shell if $(CC) -c -x assembler /dev/null -Wa,--help | grep undeclared-regs > /dev/null; then echo y; else echo n; fi; )
-INLINE_LIMIT := $(call cc-option-yn, -m64 -finline-limit=100000)
 
 
 export NEW_GCC
 export NEW_GCC
 
 
@@ -49,10 +48,6 @@ else
   AFLAGS += -m64 -mcpu=ultrasparc $(CC_UNDECL)
   AFLAGS += -m64 -mcpu=ultrasparc $(CC_UNDECL)
 endif
 endif
 
 
-ifeq ($(INLINE_LIMIT),y)
-  CFLAGS := $(CFLAGS) -finline-limit=100000
-endif
-
 ifeq ($(CONFIG_MCOUNT),y)
 ifeq ($(CONFIG_MCOUNT),y)
   CFLAGS := $(CFLAGS) -pg
   CFLAGS := $(CFLAGS) -pg
 endif
 endif

+ 1 - 1
arch/sparc64/kernel/kprobes.c

@@ -138,7 +138,7 @@ static int __kprobes kprobe_handler(struct pt_regs *regs)
 			 */
 			 */
 			save_previous_kprobe(kcb);
 			save_previous_kprobe(kcb);
 			set_current_kprobe(p, regs, kcb);
 			set_current_kprobe(p, regs, kcb);
-			p->nmissed++;
+			kprobes_inc_nmissed_count(p);
 			kcb->kprobe_status = KPROBE_REENTER;
 			kcb->kprobe_status = KPROBE_REENTER;
 			prepare_singlestep(p, regs, kcb);
 			prepare_singlestep(p, regs, kcb);
 			return 1;
 			return 1;

+ 2 - 0
arch/um/Kconfig

@@ -289,6 +289,8 @@ source "arch/um/Kconfig.net"
 
 
 source "drivers/net/Kconfig"
 source "drivers/net/Kconfig"
 
 
+source "drivers/connector/Kconfig"
+
 source "fs/Kconfig"
 source "fs/Kconfig"
 
 
 source "security/Kconfig"
 source "security/Kconfig"

+ 4 - 0
arch/um/Makefile-x86_64

@@ -12,3 +12,7 @@ CHECKFLAGS  += -m64
 
 
 ELF_ARCH := i386:x86-64
 ELF_ARCH := i386:x86-64
 ELF_FORMAT := elf64-x86-64
 ELF_FORMAT := elf64-x86-64
+
+# Not on all 64-bit distros /lib is a symlink to /lib64. PLD is an example.
+
+LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib64

+ 16 - 13
arch/um/include/sysdep-i386/stub.h

@@ -6,8 +6,12 @@
 #ifndef __SYSDEP_STUB_H
 #ifndef __SYSDEP_STUB_H
 #define __SYSDEP_STUB_H
 #define __SYSDEP_STUB_H
 
 
+#include <sys/mman.h>
 #include <asm/ptrace.h>
 #include <asm/ptrace.h>
 #include <asm/unistd.h>
 #include <asm/unistd.h>
+#include "stub-data.h"
+#include "kern_constants.h"
+#include "uml-config.h"
 
 
 extern void stub_segv_handler(int sig);
 extern void stub_segv_handler(int sig);
 extern void stub_clone_handler(void);
 extern void stub_clone_handler(void);
@@ -76,23 +80,22 @@ static inline long stub_syscall5(long syscall, long arg1, long arg2, long arg3,
 	return ret;
 	return ret;
 }
 }
 
 
-static inline long stub_syscall6(long syscall, long arg1, long arg2, long arg3,
-				 long arg4, long arg5, long arg6)
+static inline void trap_myself(void)
 {
 {
-	long ret;
-
-	__asm__ volatile ("push %%ebp ; movl %%eax,%%ebp ; movl %1,%%eax ; "
-			"int $0x80 ; pop %%ebp"
-			: "=a" (ret)
-			: "g" (syscall), "b" (arg1), "c" (arg2), "d" (arg3),
-			  "S" (arg4), "D" (arg5), "0" (arg6));
-
-	return ret;
+	__asm("int3");
 }
 }
 
 
-static inline void trap_myself(void)
+static inline void remap_stack(int fd, unsigned long offset)
 {
 {
-	__asm("int3");
+	__asm__ volatile ("movl %%eax,%%ebp ; movl %0,%%eax ; int $0x80 ;"
+			  "movl %7, %%ebx ; movl %%eax, (%%ebx)"
+			  : : "g" (STUB_MMAP_NR), "b" (UML_CONFIG_STUB_DATA), 
+			    "c" (UM_KERN_PAGE_SIZE), 
+			    "d" (PROT_READ | PROT_WRITE),
+			    "S" (MAP_FIXED | MAP_SHARED), "D" (fd), 
+			    "a" (offset), 
+			    "i" (&((struct stub_data *) UML_CONFIG_STUB_DATA)->err) 
+			  : "memory");
 }
 }
 
 
 #endif
 #endif

+ 17 - 13
arch/um/include/sysdep-x86_64/stub.h

@@ -6,8 +6,12 @@
 #ifndef __SYSDEP_STUB_H
 #ifndef __SYSDEP_STUB_H
 #define __SYSDEP_STUB_H
 #define __SYSDEP_STUB_H
 
 
+#include <sys/mman.h>
 #include <asm/unistd.h>
 #include <asm/unistd.h>
 #include <sysdep/ptrace_user.h>
 #include <sysdep/ptrace_user.h>
+#include "stub-data.h"
+#include "kern_constants.h"
+#include "uml-config.h"
 
 
 extern void stub_segv_handler(int sig);
 extern void stub_segv_handler(int sig);
 extern void stub_clone_handler(void);
 extern void stub_clone_handler(void);
@@ -81,23 +85,23 @@ static inline long stub_syscall5(long syscall, long arg1, long arg2, long arg3,
 	return ret;
 	return ret;
 }
 }
 
 
-static inline long stub_syscall6(long syscall, long arg1, long arg2, long arg3,
-				 long arg4, long arg5, long arg6)
+static inline void trap_myself(void)
 {
 {
-	long ret;
-
-	__asm__ volatile ("movq %5,%%r10 ; movq %6,%%r8 ; "
-		"movq %7, %%r9; " __syscall : "=a" (ret)
-		: "0" (syscall), "D" (arg1), "S" (arg2), "d" (arg3),
-		  "g" (arg4), "g" (arg5), "g" (arg6)
-		: __syscall_clobber, "r10", "r8", "r9" );
-
-	return ret;
+	__asm("int3");
 }
 }
 
 
-static inline void trap_myself(void)
+static inline void remap_stack(long fd, unsigned long offset)
 {
 {
-	__asm("int3");
+	__asm__ volatile ("movq %4,%%r10 ; movq %5,%%r8 ; "
+			  "movq %6, %%r9; " __syscall "; movq %7, %%rbx ; "
+			  "movq %%rax, (%%rbx)": 
+			  : "a" (STUB_MMAP_NR), "D" (UML_CONFIG_STUB_DATA), 
+			    "S" (UM_KERN_PAGE_SIZE), 
+			    "d" (PROT_READ | PROT_WRITE), 
+                            "g" (MAP_FIXED | MAP_SHARED), "g" (fd), 
+			    "g" (offset),
+			    "i" (&((struct stub_data *) UML_CONFIG_STUB_DATA)->err)
+			  : __syscall_clobber, "r10", "r8", "r9" );
 }
 }
 
 
 #endif
 #endif

+ 2 - 0
arch/um/include/um_uaccess.h

@@ -17,6 +17,8 @@
 #include "uaccess-skas.h"
 #include "uaccess-skas.h"
 #endif
 #endif
 
 
+#include "asm/fixmap.h"
+
 #define __under_task_size(addr, size) \
 #define __under_task_size(addr, size) \
 	(((unsigned long) (addr) < TASK_SIZE) && \
 	(((unsigned long) (addr) < TASK_SIZE) && \
          (((unsigned long) (addr) + (size)) < TASK_SIZE))
          (((unsigned long) (addr) + (size)) < TASK_SIZE))

+ 13 - 10
arch/um/kernel/skas/clone.c

@@ -18,11 +18,10 @@
  * on some systems.
  * on some systems.
  */
  */
 
 
-#define STUB_DATA(field) (((struct stub_data *) UML_CONFIG_STUB_DATA)->field)
-
 void __attribute__ ((__section__ (".__syscall_stub")))
 void __attribute__ ((__section__ (".__syscall_stub")))
 stub_clone_handler(void)
 stub_clone_handler(void)
 {
 {
+	struct stub_data *data = (struct stub_data *) UML_CONFIG_STUB_DATA;
 	long err;
 	long err;
 
 
 	err = stub_syscall2(__NR_clone, CLONE_PARENT | CLONE_FILES | SIGCHLD,
 	err = stub_syscall2(__NR_clone, CLONE_PARENT | CLONE_FILES | SIGCHLD,
@@ -35,17 +34,21 @@ stub_clone_handler(void)
 	if(err)
 	if(err)
 		goto out;
 		goto out;
 
 
-	err = stub_syscall3(__NR_setitimer, ITIMER_VIRTUAL,
-			    (long) &STUB_DATA(timer), 0);
+	err = stub_syscall3(__NR_setitimer, ITIMER_VIRTUAL, 
+			    (long) &data->timer, 0);
 	if(err)
 	if(err)
 		goto out;
 		goto out;
 
 
-	err = stub_syscall6(STUB_MMAP_NR, UML_CONFIG_STUB_DATA,
-			    UM_KERN_PAGE_SIZE, PROT_READ | PROT_WRITE,
-			    MAP_FIXED | MAP_SHARED, STUB_DATA(fd),
-			    STUB_DATA(offset));
+	remap_stack(data->fd, data->offset);
+	goto done;
+
  out:
  out:
-	/* save current result. Parent: pid; child: retcode of mmap */
-	STUB_DATA(err) = err;
+	/* save current result. 
+	 * Parent: pid; 
+	 * child: retcode of mmap already saved and it jumps around this 
+	 * assignment
+	 */
+	data->err = err;
+ done:
 	trap_myself();
 	trap_myself();
 }
 }

+ 0 - 1
arch/um/kernel/skas/include/uaccess-skas.h

@@ -7,7 +7,6 @@
 #define __SKAS_UACCESS_H
 #define __SKAS_UACCESS_H
 
 
 #include "asm/errno.h"
 #include "asm/errno.h"
-#include "asm/fixmap.h"
 
 
 /* No SKAS-specific checking. */
 /* No SKAS-specific checking. */
 #define access_ok_skas(type, addr, size) 0
 #define access_ok_skas(type, addr, size) 0

+ 0 - 5
arch/um/scripts/Makefile.rules

@@ -21,11 +21,6 @@ define unprofile
 endef
 endef
 
 
 
 
-# The stubs and unmap.o can't try to call mcount or update basic block data
-define unprofile
-	$(patsubst -pg,,$(patsubst -fprofile-arcs -ftest-coverage,,$(1)))
-endef
-
 # cmd_make_link checks to see if the $(foo-dir) variable starts with a /.  If
 # cmd_make_link checks to see if the $(foo-dir) variable starts with a /.  If
 # so, it's considered to be a path relative to $(srcdir) rather than
 # so, it's considered to be a path relative to $(srcdir) rather than
 # $(srcdir)/arch/$(SUBARCH).  This is because x86_64 wants to get ldt.c from
 # $(srcdir)/arch/$(SUBARCH).  This is because x86_64 wants to get ldt.c from

+ 1 - 2
arch/x86_64/ia32/ia32_binfmt.c

@@ -217,8 +217,7 @@ elf_core_copy_task_fpregs(struct task_struct *tsk, struct pt_regs *regs, elf_fpr
 	if (!tsk_used_math(tsk))
 	if (!tsk_used_math(tsk))
 		return 0;
 		return 0;
 	if (!regs)
 	if (!regs)
-		regs = (struct pt_regs *)tsk->thread.rsp0;
-	--regs;
+		regs = ((struct pt_regs *)tsk->thread.rsp0) - 1;
 	if (tsk == current)
 	if (tsk == current)
 		unlazy_fpu(tsk);
 		unlazy_fpu(tsk);
 	set_fs(KERNEL_DS); 
 	set_fs(KERNEL_DS); 

+ 1 - 1
arch/x86_64/kernel/kprobes.c

@@ -329,7 +329,7 @@ int __kprobes kprobe_handler(struct pt_regs *regs)
 				 */
 				 */
 				save_previous_kprobe(kcb);
 				save_previous_kprobe(kcb);
 				set_current_kprobe(p, regs, kcb);
 				set_current_kprobe(p, regs, kcb);
-				p->nmissed++;
+				kprobes_inc_nmissed_count(p);
 				prepare_singlestep(p, regs);
 				prepare_singlestep(p, regs);
 				kcb->kprobe_status = KPROBE_REENTER;
 				kcb->kprobe_status = KPROBE_REENTER;
 				return 1;
 				return 1;

+ 1 - 1
arch/x86_64/kernel/smpboot.c

@@ -1181,7 +1181,7 @@ int __cpu_disable(void)
 	if (cpu == 0)
 	if (cpu == 0)
 		return -EBUSY;
 		return -EBUSY;
 
 
-	disable_APIC_timer();
+	clear_local_APIC();
 
 
 	/*
 	/*
 	 * HACK:
 	 * HACK:

+ 4 - 2
arch/x86_64/kernel/time.c

@@ -59,7 +59,7 @@ static int notsc __initdata = 0;
 unsigned int cpu_khz;					/* TSC clocks / usec, not used here */
 unsigned int cpu_khz;					/* TSC clocks / usec, not used here */
 static unsigned long hpet_period;			/* fsecs / HPET clock */
 static unsigned long hpet_period;			/* fsecs / HPET clock */
 unsigned long hpet_tick;				/* HPET clocks / interrupt */
 unsigned long hpet_tick;				/* HPET clocks / interrupt */
-static int hpet_use_timer;
+static int hpet_use_timer;				/* Use counter of hpet for time keeping, otherwise PIT */
 unsigned long vxtime_hz = PIT_TICK_RATE;
 unsigned long vxtime_hz = PIT_TICK_RATE;
 int report_lost_ticks;				/* command line option */
 int report_lost_ticks;				/* command line option */
 unsigned long long monotonic_base;
 unsigned long long monotonic_base;
@@ -908,12 +908,14 @@ void __init time_init(void)
 	if (!hpet_init())
 	if (!hpet_init())
                 vxtime_hz = (1000000000000000L + hpet_period / 2) /
                 vxtime_hz = (1000000000000000L + hpet_period / 2) /
 			hpet_period;
 			hpet_period;
+	else
+		vxtime.hpet_address = 0;
 
 
 	if (hpet_use_timer) {
 	if (hpet_use_timer) {
 		cpu_khz = hpet_calibrate_tsc();
 		cpu_khz = hpet_calibrate_tsc();
 		timename = "HPET";
 		timename = "HPET";
 #ifdef CONFIG_X86_PM_TIMER
 #ifdef CONFIG_X86_PM_TIMER
-	} else if (pmtmr_ioport) {
+	} else if (pmtmr_ioport && !vxtime.hpet_address) {
 		vxtime_hz = PM_TIMER_FREQUENCY;
 		vxtime_hz = PM_TIMER_FREQUENCY;
 		timename = "PM";
 		timename = "PM";
 		pit_init();
 		pit_init();

+ 31 - 6
arch/x86_64/mm/ioremap.c

@@ -247,9 +247,15 @@ void __iomem *ioremap_nocache (unsigned long phys_addr, unsigned long size)
 	return __ioremap(phys_addr, size, _PAGE_PCD);
 	return __ioremap(phys_addr, size, _PAGE_PCD);
 }
 }
 
 
+/**
+ * iounmap - Free a IO remapping
+ * @addr: virtual address from ioremap_*
+ *
+ * Caller must ensure there is only one unmapping for the same pointer.
+ */
 void iounmap(volatile void __iomem *addr)
 void iounmap(volatile void __iomem *addr)
 {
 {
-	struct vm_struct *p;
+	struct vm_struct *p, *o;
 
 
 	if (addr <= high_memory) 
 	if (addr <= high_memory) 
 		return; 
 		return; 
@@ -257,12 +263,31 @@ void iounmap(volatile void __iomem *addr)
 		addr < phys_to_virt(ISA_END_ADDRESS))
 		addr < phys_to_virt(ISA_END_ADDRESS))
 		return;
 		return;
 
 
-	write_lock(&vmlist_lock);
-	p = __remove_vm_area((void *)((unsigned long)addr & PAGE_MASK));
-	if (!p)
+	addr = (volatile void __iomem *)(PAGE_MASK & (unsigned long __force)addr);
+	/* Use the vm area unlocked, assuming the caller
+	   ensures there isn't another iounmap for the same address
+	   in parallel. Reuse of the virtual address is prevented by
+	   leaving it in the global lists until we're done with it.
+	   cpa takes care of the direct mappings. */
+	read_lock(&vmlist_lock);
+	for (p = vmlist; p; p = p->next) {
+		if (p->addr == addr)
+			break;
+	}
+	read_unlock(&vmlist_lock);
+
+	if (!p) {
 		printk("iounmap: bad address %p\n", addr);
 		printk("iounmap: bad address %p\n", addr);
-	else if (p->flags >> 20)
+		dump_stack();
+		return;
+	}
+
+	/* Reset the direct mapping. Can block */
+	if (p->flags >> 20)
 		ioremap_change_attr(p->phys_addr, p->size, 0);
 		ioremap_change_attr(p->phys_addr, p->size, 0);
-	write_unlock(&vmlist_lock);
+
+	/* Finally remove it */
+	o = remove_vm_area((void *)addr);
+	BUG_ON(p != o || o == NULL);
 	kfree(p); 
 	kfree(p); 
 }
 }

+ 3 - 1
arch/x86_64/mm/numa.c

@@ -53,6 +53,8 @@ static int __init populate_memnodemap(
 	int res = -1;
 	int res = -1;
 	unsigned long addr, end;
 	unsigned long addr, end;
 
 
+	if (shift >= 64)
+		return -1;
 	memset(memnodemap, 0xff, sizeof(memnodemap));
 	memset(memnodemap, 0xff, sizeof(memnodemap));
 	for (i = 0; i < numnodes; i++) {
 	for (i = 0; i < numnodes; i++) {
 		addr = nodes[i].start;
 		addr = nodes[i].start;
@@ -65,7 +67,7 @@ static int __init populate_memnodemap(
 			if (memnodemap[addr >> shift] != 0xff)
 			if (memnodemap[addr >> shift] != 0xff)
 				return -1;
 				return -1;
 			memnodemap[addr >> shift] = i;
 			memnodemap[addr >> shift] = i;
-			addr += (1 << shift);
+                       addr += (1UL << shift);
 		} while (addr < end);
 		} while (addr < end);
 		res = 1;
 		res = 1;
 	} 
 	} 

+ 1 - 1
arch/x86_64/pci/Makefile

@@ -11,7 +11,7 @@ obj-y		+= fixup.o
 obj-$(CONFIG_ACPI)	+= acpi.o
 obj-$(CONFIG_ACPI)	+= acpi.o
 obj-y			+= legacy.o irq.o common.o
 obj-y			+= legacy.o irq.o common.o
 # mmconfig has a 64bit special
 # mmconfig has a 64bit special
-obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o
+obj-$(CONFIG_PCI_MMCONFIG) += mmconfig.o direct.o
 
 
 obj-$(CONFIG_NUMA)	+= k8-bus.o
 obj-$(CONFIG_NUMA)	+= k8-bus.o
 
 

+ 54 - 11
arch/x86_64/pci/mmconfig.c

@@ -8,18 +8,21 @@
 #include <linux/pci.h>
 #include <linux/pci.h>
 #include <linux/init.h>
 #include <linux/init.h>
 #include <linux/acpi.h>
 #include <linux/acpi.h>
+#include <linux/bitmap.h>
 #include "pci.h"
 #include "pci.h"
 
 
 #define MMCONFIG_APER_SIZE (256*1024*1024)
 #define MMCONFIG_APER_SIZE (256*1024*1024)
 
 
+static DECLARE_BITMAP(fallback_slots, 32);
+
 /* Static virtual mapping of the MMCONFIG aperture */
 /* Static virtual mapping of the MMCONFIG aperture */
 struct mmcfg_virt {
 struct mmcfg_virt {
 	struct acpi_table_mcfg_config *cfg;
 	struct acpi_table_mcfg_config *cfg;
-	char *virt;
+	char __iomem *virt;
 };
 };
 static struct mmcfg_virt *pci_mmcfg_virt;
 static struct mmcfg_virt *pci_mmcfg_virt;
 
 
-static char *get_virt(unsigned int seg, int bus)
+static char __iomem *get_virt(unsigned int seg, unsigned bus)
 {
 {
 	int cfg_num = -1;
 	int cfg_num = -1;
 	struct acpi_table_mcfg_config *cfg;
 	struct acpi_table_mcfg_config *cfg;
@@ -27,10 +30,9 @@ static char *get_virt(unsigned int seg, int bus)
 	while (1) {
 	while (1) {
 		++cfg_num;
 		++cfg_num;
 		if (cfg_num >= pci_mmcfg_config_num) {
 		if (cfg_num >= pci_mmcfg_config_num) {
-			/* something bad is going on, no cfg table is found. */
-			/* so we fall back to the old way we used to do this */
-			/* and just rely on the first entry to be correct. */
-			return pci_mmcfg_virt[0].virt;
+			/* Not found - fall back to type 1. This happens
+			   e.g. on the internal devices of a K8 northbridge. */
+			return NULL;
 		}
 		}
 		cfg = pci_mmcfg_virt[cfg_num].cfg;
 		cfg = pci_mmcfg_virt[cfg_num].cfg;
 		if (cfg->pci_segment_group_number != seg)
 		if (cfg->pci_segment_group_number != seg)
@@ -41,20 +43,30 @@ static char *get_virt(unsigned int seg, int bus)
 	}
 	}
 }
 }
 
 
-static inline char *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn)
+static char __iomem *pci_dev_base(unsigned int seg, unsigned int bus, unsigned int devfn)
 {
 {
-
-	return get_virt(seg, bus) + ((bus << 20) | (devfn << 12));
+	char __iomem *addr;
+	if (seg == 0 && bus == 0 && test_bit(PCI_SLOT(devfn), &fallback_slots))
+		return NULL;
+	addr = get_virt(seg, bus);
+	if (!addr)
+		return NULL;
+ 	return addr + ((bus << 20) | (devfn << 12));
 }
 }
 
 
 static int pci_mmcfg_read(unsigned int seg, unsigned int bus,
 static int pci_mmcfg_read(unsigned int seg, unsigned int bus,
 			  unsigned int devfn, int reg, int len, u32 *value)
 			  unsigned int devfn, int reg, int len, u32 *value)
 {
 {
-	char *addr = pci_dev_base(seg, bus, devfn);
+	char __iomem *addr;
 
 
+	/* Why do we have this when nobody checks it. How about a BUG()!? -AK */
 	if (unlikely(!value || (bus > 255) || (devfn > 255) || (reg > 4095)))
 	if (unlikely(!value || (bus > 255) || (devfn > 255) || (reg > 4095)))
 		return -EINVAL;
 		return -EINVAL;
 
 
+	addr = pci_dev_base(seg, bus, devfn);
+	if (!addr)
+		return pci_conf1_read(seg,bus,devfn,reg,len,value);
+
 	switch (len) {
 	switch (len) {
 	case 1:
 	case 1:
 		*value = readb(addr + reg);
 		*value = readb(addr + reg);
@@ -73,11 +85,16 @@ static int pci_mmcfg_read(unsigned int seg, unsigned int bus,
 static int pci_mmcfg_write(unsigned int seg, unsigned int bus,
 static int pci_mmcfg_write(unsigned int seg, unsigned int bus,
 			   unsigned int devfn, int reg, int len, u32 value)
 			   unsigned int devfn, int reg, int len, u32 value)
 {
 {
-	char *addr = pci_dev_base(seg, bus, devfn);
+	char __iomem *addr;
 
 
+	/* Why do we have this when nobody checks it. How about a BUG()!? -AK */
 	if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095)))
 	if (unlikely((bus > 255) || (devfn > 255) || (reg > 4095)))
 		return -EINVAL;
 		return -EINVAL;
 
 
+	addr = pci_dev_base(seg, bus, devfn);
+	if (!addr)
+		return pci_conf1_write(seg,bus,devfn,reg,len,value);
+
 	switch (len) {
 	switch (len) {
 	case 1:
 	case 1:
 		writeb(value, addr + reg);
 		writeb(value, addr + reg);
@@ -98,6 +115,30 @@ static struct pci_raw_ops pci_mmcfg = {
 	.write =	pci_mmcfg_write,
 	.write =	pci_mmcfg_write,
 };
 };
 
 
+/* K8 systems have some devices (typically in the builtin northbridge)
+   that are only accessible using type1
+   Normally this can be expressed in the MCFG by not listing them
+   and assigning suitable _SEGs, but this isn't implemented in some BIOS.
+   Instead try to discover all devices on bus 0 that are unreachable using MM
+   and fallback for them.
+   We only do this for bus 0/seg 0 */
+static __init void unreachable_devices(void)
+{
+	int i;
+	for (i = 0; i < 32; i++) {
+		u32 val1;
+		char __iomem *addr;
+
+		pci_conf1_read(0, 0, PCI_DEVFN(i,0), 0, 4, &val1);
+		if (val1 == 0xffffffff)
+			continue;
+		addr = pci_dev_base(0, 0, PCI_DEVFN(i, 0));
+		if (addr == NULL|| readl(addr) != val1) {
+			set_bit(i, &fallback_slots);
+		}
+	}
+}
+
 static int __init pci_mmcfg_init(void)
 static int __init pci_mmcfg_init(void)
 {
 {
 	int i;
 	int i;
@@ -128,6 +169,8 @@ static int __init pci_mmcfg_init(void)
 		printk(KERN_INFO "PCI: Using MMCONFIG at %x\n", pci_mmcfg_config[i].base_address);
 		printk(KERN_INFO "PCI: Using MMCONFIG at %x\n", pci_mmcfg_config[i].base_address);
 	}
 	}
 
 
+	unreachable_devices();
+
 	raw_pci_ops = &pci_mmcfg;
 	raw_pci_ops = &pci_mmcfg;
 	pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF;
 	pci_probe = (pci_probe & ~PCI_PROBE_MASK) | PCI_PROBE_MMCONF;
 
 

+ 31 - 14
block/scsi_ioctl.c

@@ -442,11 +442,37 @@ error:
 	return err;
 	return err;
 }
 }
 
 
+
+/* Send basic block requests */
+static int __blk_send_generic(request_queue_t *q, struct gendisk *bd_disk, int cmd, int data)
+{
+	struct request *rq;
+	int err;
+
+	rq = blk_get_request(q, WRITE, __GFP_WAIT);
+	rq->flags |= REQ_BLOCK_PC;
+	rq->data = NULL;
+	rq->data_len = 0;
+	rq->timeout = BLK_DEFAULT_TIMEOUT;
+	memset(rq->cmd, 0, sizeof(rq->cmd));
+	rq->cmd[0] = cmd;
+	rq->cmd[4] = data;
+	rq->cmd_len = 6;
+	err = blk_execute_rq(q, bd_disk, rq, 0);
+	blk_put_request(rq);
+
+	return err;
+}
+
+static inline int blk_send_start_stop(request_queue_t *q, struct gendisk *bd_disk, int data)
+{
+	return __blk_send_generic(q, bd_disk, GPCMD_START_STOP_UNIT, data);
+}
+
 int scsi_cmd_ioctl(struct file *file, struct gendisk *bd_disk, unsigned int cmd, void __user *arg)
 int scsi_cmd_ioctl(struct file *file, struct gendisk *bd_disk, unsigned int cmd, void __user *arg)
 {
 {
 	request_queue_t *q;
 	request_queue_t *q;
-	struct request *rq;
-	int close = 0, err;
+	int err;
 
 
 	q = bd_disk->queue;
 	q = bd_disk->queue;
 	if (!q)
 	if (!q)
@@ -564,19 +590,10 @@ int scsi_cmd_ioctl(struct file *file, struct gendisk *bd_disk, unsigned int cmd,
 			err = sg_scsi_ioctl(file, q, bd_disk, arg);
 			err = sg_scsi_ioctl(file, q, bd_disk, arg);
 			break;
 			break;
 		case CDROMCLOSETRAY:
 		case CDROMCLOSETRAY:
-			close = 1;
+			err = blk_send_start_stop(q, bd_disk, 0x03);
+			break;
 		case CDROMEJECT:
 		case CDROMEJECT:
-			rq = blk_get_request(q, WRITE, __GFP_WAIT);
-			rq->flags |= REQ_BLOCK_PC;
-			rq->data = NULL;
-			rq->data_len = 0;
-			rq->timeout = BLK_DEFAULT_TIMEOUT;
-			memset(rq->cmd, 0, sizeof(rq->cmd));
-			rq->cmd[0] = GPCMD_START_STOP_UNIT;
-			rq->cmd[4] = 0x02 + (close != 0);
-			rq->cmd_len = 6;
-			err = blk_execute_rq(q, bd_disk, rq, 0);
-			blk_put_request(rq);
+			err = blk_send_start_stop(q, bd_disk, 0x02);
 			break;
 			break;
 		default:
 		default:
 			err = -ENOTTY;
 			err = -ENOTTY;

+ 1 - 1
drivers/acpi/pci_link.c

@@ -316,7 +316,7 @@ static int acpi_pci_link_set(struct acpi_pci_link *link, int irq)
 	if (!link || !irq)
 	if (!link || !irq)
 		return_VALUE(-EINVAL);
 		return_VALUE(-EINVAL);
 
 
-	resource = kmalloc(sizeof(*resource) + 1, GFP_KERNEL);
+	resource = kmalloc(sizeof(*resource) + 1, GFP_ATOMIC);
 	if (!resource)
 	if (!resource)
 		return_VALUE(-ENOMEM);
 		return_VALUE(-ENOMEM);
 
 

+ 1 - 1
drivers/atm/adummy.c

@@ -123,7 +123,7 @@ static int __init adummy_init(void)
 	}
 	}
 	memset(adummy_dev, 0, sizeof(struct adummy_dev));
 	memset(adummy_dev, 0, sizeof(struct adummy_dev));
 
 
-	atm_dev = atm_dev_register(DEV_LABEL, &adummy_ops, -1, 0);
+	atm_dev = atm_dev_register(DEV_LABEL, &adummy_ops, -1, NULL);
 	if (!atm_dev) {
 	if (!atm_dev) {
 		printk(KERN_ERR DEV_LABEL ": atm_dev_register() failed\n");
 		printk(KERN_ERR DEV_LABEL ": atm_dev_register() failed\n");
 		err = -ENODEV;
 		err = -ENODEV;

+ 0 - 1
drivers/base/memory.c

@@ -28,7 +28,6 @@
 static struct sysdev_class memory_sysdev_class = {
 static struct sysdev_class memory_sysdev_class = {
 	set_kset_name(MEMORY_CLASS_NAME),
 	set_kset_name(MEMORY_CLASS_NAME),
 };
 };
-EXPORT_SYMBOL(memory_sysdev_class);
 
 
 static char *memory_hotplug_name(struct kset *kset, struct kobject *kobj)
 static char *memory_hotplug_name(struct kset *kset, struct kobject *kobj)
 {
 {

+ 3 - 4
drivers/block/cciss.c

@@ -1146,7 +1146,6 @@ static int revalidate_allvol(ctlr_info_t *host)
 				del_gendisk(disk);
 				del_gendisk(disk);
 			if (q)
 			if (q)
 				blk_cleanup_queue(q);
 				blk_cleanup_queue(q);
-			put_disk(disk);
 		}
 		}
 	}
 	}
 
 
@@ -1465,9 +1464,10 @@ static int deregister_disk(struct gendisk *disk, drive_info_struct *drv,
 			request_queue_t *q = disk->queue;
 			request_queue_t *q = disk->queue;
 			if (disk->flags & GENHD_FL_UP)
 			if (disk->flags & GENHD_FL_UP)
 				del_gendisk(disk);
 				del_gendisk(disk);
-			if (q)	
+			if (q) {
 				blk_cleanup_queue(q);
 				blk_cleanup_queue(q);
-			put_disk(disk);	
+				drv->queue = NULL;
+			}
 		}
 		}
 	}
 	}
 
 
@@ -3243,7 +3243,6 @@ static void __devexit cciss_remove_one (struct pci_dev *pdev)
 				del_gendisk(disk);
 				del_gendisk(disk);
 			if (q)
 			if (q)
 				blk_cleanup_queue(q);
 				blk_cleanup_queue(q);
-			put_disk(disk);
 		}
 		}
 	}
 	}
 
 

+ 10 - 10
drivers/char/Kconfig

@@ -687,7 +687,7 @@ config NVRAM
 
 
 config RTC
 config RTC
 	tristate "Enhanced Real Time Clock Support"
 	tristate "Enhanced Real Time Clock Support"
-	depends on !PPC32 && !PARISC && !IA64 && !M68K
+	depends on !PPC32 && !PARISC && !IA64 && !M68K && (!(SPARC32 || SPARC64) || PCI)
 	---help---
 	---help---
 	  If you say Y here and create a character special file /dev/rtc with
 	  If you say Y here and create a character special file /dev/rtc with
 	  major number 10 and minor number 135 using mknod ("man mknod"), you
 	  major number 10 and minor number 135 using mknod ("man mknod"), you
@@ -943,6 +943,15 @@ config RAW_DRIVER
           Applications should simply open the device (eg /dev/hda1)
           Applications should simply open the device (eg /dev/hda1)
           with the O_DIRECT flag.
           with the O_DIRECT flag.
 
 
+config MAX_RAW_DEVS
+	int "Maximum number of RAW devices to support (1-8192)"
+	depends on RAW_DRIVER
+	default "256"
+	help
+	  The maximum number of RAW devices that are supported.
+	  Default is 256. Increase this number in case you need lots of
+	  raw devices.
+
 config HPET
 config HPET
 	bool "HPET - High Precision Event Timer" if (X86 || IA64)
 	bool "HPET - High Precision Event Timer" if (X86 || IA64)
 	default n
 	default n
@@ -974,15 +983,6 @@ config HPET_MMAP
 	  exposed to the user.  If this applies to your hardware,
 	  exposed to the user.  If this applies to your hardware,
 	  say N here.
 	  say N here.
 
 
-config MAX_RAW_DEVS
-	int "Maximum number of RAW devices to support (1-8192)"
-	depends on RAW_DRIVER
-	default "256"
-	help
-	  The maximum number of RAW devices that are supported.
-	  Default is 256. Increase this number in case you need lots of
-	  raw devices.
-
 config HANGCHECK_TIMER
 config HANGCHECK_TIMER
 	tristate "Hangcheck timer"
 	tristate "Hangcheck timer"
 	depends on X86 || IA64 || PPC64 || ARCH_S390
 	depends on X86 || IA64 || PPC64 || ARCH_S390

+ 8 - 3
drivers/char/drm/radeon_cp.c

@@ -1311,7 +1311,9 @@ static void radeon_set_pcigart(drm_radeon_private_t * dev_priv, int on)
 
 
 static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init)
 static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init)
 {
 {
-	drm_radeon_private_t *dev_priv = dev->dev_private;;
+	drm_radeon_private_t *dev_priv = dev->dev_private;
+	unsigned int mem_size;
+
 	DRM_DEBUG("\n");
 	DRM_DEBUG("\n");
 
 
 	dev_priv->is_pci = init->is_pci;
 	dev_priv->is_pci = init->is_pci;
@@ -1521,8 +1523,11 @@ static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init)
 					  + dev_priv->fb_location) >> 10));
 					  + dev_priv->fb_location) >> 10));
 
 
 	dev_priv->gart_size = init->gart_size;
 	dev_priv->gart_size = init->gart_size;
-	dev_priv->gart_vm_start = dev_priv->fb_location
-	    + RADEON_READ(RADEON_CONFIG_APER_SIZE);
+
+	mem_size = RADEON_READ(RADEON_CONFIG_MEMSIZE);
+	if (mem_size == 0)
+		mem_size = 0x800000;
+	dev_priv->gart_vm_start = dev_priv->fb_location + mem_size;
 
 
 #if __OS_HAS_AGP
 #if __OS_HAS_AGP
 	if (!dev_priv->is_pci)
 	if (!dev_priv->is_pci)

+ 1 - 0
drivers/char/drm/radeon_drv.h

@@ -379,6 +379,7 @@ extern int r300_do_cp_cmdbuf(drm_device_t * dev, DRMFILE filp,
 #	define RADEON_PLL_WR_EN			(1 << 7)
 #	define RADEON_PLL_WR_EN			(1 << 7)
 #define RADEON_CLOCK_CNTL_INDEX		0x0008
 #define RADEON_CLOCK_CNTL_INDEX		0x0008
 #define RADEON_CONFIG_APER_SIZE		0x0108
 #define RADEON_CONFIG_APER_SIZE		0x0108
+#define RADEON_CONFIG_MEMSIZE		0x00f8
 #define RADEON_CRTC_OFFSET		0x0224
 #define RADEON_CRTC_OFFSET		0x0224
 #define RADEON_CRTC_OFFSET_CNTL		0x0228
 #define RADEON_CRTC_OFFSET_CNTL		0x0228
 #	define RADEON_CRTC_TILE_EN		(1 << 15)
 #	define RADEON_CRTC_TILE_EN		(1 << 15)

+ 1 - 1
drivers/char/ipmi/ipmi_msghandler.c

@@ -2986,7 +2986,7 @@ static void send_panic_events(char *str)
 	msg.cmd = 2; /* Platform event command. */
 	msg.cmd = 2; /* Platform event command. */
 	msg.data = data;
 	msg.data = data;
 	msg.data_len = 8;
 	msg.data_len = 8;
-	data[0] = 0x21; /* Kernel generator ID, IPMI table 5-4 */
+	data[0] = 0x41; /* Kernel generator ID, IPMI table 5-4 */
 	data[1] = 0x03; /* This is for IPMI 1.0. */
 	data[1] = 0x03; /* This is for IPMI 1.0. */
 	data[2] = 0x20; /* OS Critical Stop, IPMI table 36-3 */
 	data[2] = 0x20; /* OS Critical Stop, IPMI table 36-3 */
 	data[4] = 0x6f; /* Sensor specific, IPMI table 36-1 */
 	data[4] = 0x6f; /* Sensor specific, IPMI table 36-1 */

部分文件因为文件数量过多而无法显示