aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@cantab.net>2005-09-19 04:47:49 -0400
committerAnton Altaparmakov <aia21@cantab.net>2005-09-19 04:47:49 -0400
commit044a500e46742d39d22f1781cfb64ba93b463e39 (patch)
treeb0313211ea7ba26b90c1083ade0e4c9f486b87db /arch
parentf6098cf449b81c14a51e48dd22ae47d03126a1de (diff)
parent6c0741fbdee5bd0f8ed13ac287c4ab18e8ba7d83 (diff)
Merge branch 'master' of /home/src/linux-2.6/
Diffstat (limited to 'arch')
-rw-r--r--arch/alpha/kernel/osf_sys.c7
-rw-r--r--arch/arm/common/locomo.c2
-rw-r--r--arch/arm/configs/enp2611_defconfig182
-rw-r--r--arch/arm/configs/ixdp2400_defconfig182
-rw-r--r--arch/arm/configs/ixdp2401_defconfig182
-rw-r--r--arch/arm/configs/ixdp2800_defconfig182
-rw-r--r--arch/arm/configs/ixdp2801_defconfig182
-rw-r--r--arch/arm/kernel/semaphore.c2
-rw-r--r--arch/arm/mach-ixp4xx/ixdp425-setup.c6
-rw-r--r--arch/arm/mach-pxa/corgi.c57
-rw-r--r--arch/arm/mach-pxa/poodle.c113
-rw-r--r--arch/arm/mach-sa1100/collie.c11
-rw-r--r--arch/arm/mach-sa1100/generic.h3
-rw-r--r--arch/arm26/boot/compressed/hw-bse.c74
-rw-r--r--arch/ia64/kernel/acpi.c2
-rw-r--r--arch/ia64/kernel/entry.S2
-rw-r--r--arch/ia64/kernel/mca_drv.c114
-rw-r--r--arch/ia64/kernel/mca_drv.h2
-rw-r--r--arch/ia64/kernel/mca_drv_asm.S48
-rw-r--r--arch/ia64/kernel/perfmon.c5
-rw-r--r--arch/ppc/syslib/Makefile3
-rw-r--r--arch/ppc/syslib/mpc8xx_devices.c224
-rw-r--r--arch/ppc/syslib/mpc8xx_sys.c61
-rw-r--r--arch/ppc/syslib/open_pic2.c2
-rw-r--r--arch/ppc64/mm/fault.c1
-rw-r--r--arch/s390/defconfig36
-rw-r--r--arch/s390/kernel/Makefile2
-rw-r--r--arch/s390/kernel/entry.S2
-rw-r--r--arch/s390/kernel/entry64.S2
-rw-r--r--arch/s390/kernel/reipl_diag.c39
-rw-r--r--arch/s390/kernel/setup.c5
-rw-r--r--arch/s390/kernel/smp.c3
-rw-r--r--arch/um/Kconfig.i3864
-rw-r--r--arch/um/drivers/mcast_user.c12
-rw-r--r--arch/um/drivers/mconsole_kern.c52
-rw-r--r--arch/um/drivers/mconsole_user.c7
-rw-r--r--arch/um/drivers/pty.c3
-rw-r--r--arch/um/drivers/ubd_user.c75
-rw-r--r--arch/um/drivers/xterm.c6
-rw-r--r--arch/um/include/mconsole.h1
-rw-r--r--arch/um/include/mem_user.h15
-rw-r--r--arch/um/include/os.h5
-rw-r--r--arch/um/kernel/Makefile16
-rw-r--r--arch/um/kernel/helper.c12
-rw-r--r--arch/um/kernel/init_task.c5
-rw-r--r--arch/um/kernel/mem.c16
-rw-r--r--arch/um/kernel/mem_user.c273
-rw-r--r--arch/um/kernel/process_kern.c19
-rw-r--r--arch/um/kernel/skas/include/mode_kern-skas.h2
-rw-r--r--arch/um/kernel/skas/process_kern.c7
-rw-r--r--arch/um/kernel/tempfile.c82
-rw-r--r--arch/um/kernel/tlb.c2
-rw-r--r--arch/um/kernel/tt/include/mode_kern-tt.h2
-rw-r--r--arch/um/kernel/tt/mem_user.c1
-rw-r--r--arch/um/kernel/tt/process_kern.c7
-rw-r--r--arch/um/kernel/um_arch.c5
-rw-r--r--arch/um/kernel/user_util.c12
-rw-r--r--arch/um/os-Linux/Makefile8
-rw-r--r--arch/um/os-Linux/aio.c9
-rw-r--r--arch/um/os-Linux/drivers/tuntap_user.c8
-rw-r--r--arch/um/os-Linux/elf_aux.c3
-rw-r--r--arch/um/os-Linux/file.c82
-rw-r--r--arch/um/os-Linux/mem.c161
-rw-r--r--arch/um/os-Linux/start_up.c109
-rw-r--r--arch/um/os-Linux/tt.c14
-rw-r--r--arch/x86_64/kernel/e820.c2
-rw-r--r--arch/x86_64/kernel/setup.c15
67 files changed, 1542 insertions, 1248 deletions
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
index 0636116210d2..01fe990d3e54 100644
--- a/arch/alpha/kernel/osf_sys.c
+++ b/arch/alpha/kernel/osf_sys.c
@@ -37,6 +37,7 @@
37#include <linux/namei.h> 37#include <linux/namei.h>
38#include <linux/uio.h> 38#include <linux/uio.h>
39#include <linux/vfs.h> 39#include <linux/vfs.h>
40#include <linux/rcupdate.h>
40 41
41#include <asm/fpu.h> 42#include <asm/fpu.h>
42#include <asm/io.h> 43#include <asm/io.h>
@@ -975,6 +976,7 @@ osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp,
975 long timeout; 976 long timeout;
976 int ret = -EINVAL; 977 int ret = -EINVAL;
977 struct fdtable *fdt; 978 struct fdtable *fdt;
979 int max_fdset;
978 980
979 timeout = MAX_SCHEDULE_TIMEOUT; 981 timeout = MAX_SCHEDULE_TIMEOUT;
980 if (tvp) { 982 if (tvp) {
@@ -996,8 +998,11 @@ osf_select(int n, fd_set __user *inp, fd_set __user *outp, fd_set __user *exp,
996 } 998 }
997 } 999 }
998 1000
1001 rcu_read_lock();
999 fdt = files_fdtable(current->files); 1002 fdt = files_fdtable(current->files);
1000 if (n < 0 || n > fdt->max_fdset) 1003 max_fdset = fdt->max_fdset;
1004 rcu_read_unlock();
1005 if (n < 0 || n > max_fdset)
1001 goto out_nofds; 1006 goto out_nofds;
1002 1007
1003 /* 1008 /*
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c
index 2786f7c34b3f..a7bd85700152 100644
--- a/arch/arm/common/locomo.c
+++ b/arch/arm/common/locomo.c
@@ -551,7 +551,7 @@ struct locomo_save_data {
551 u16 LCM_SPIMD; 551 u16 LCM_SPIMD;
552}; 552};
553 553
554static int locomo_suspend(struct device *dev, u32 pm_message_t, u32 level) 554static int locomo_suspend(struct device *dev, pm_message_t state, u32 level)
555{ 555{
556 struct locomo *lchip = dev_get_drvdata(dev); 556 struct locomo *lchip = dev_get_drvdata(dev);
557 struct locomo_save_data *save; 557 struct locomo_save_data *save;
diff --git a/arch/arm/configs/enp2611_defconfig b/arch/arm/configs/enp2611_defconfig
index f67ca01b4982..30e6444f9aaa 100644
--- a/arch/arm/configs/enp2611_defconfig
+++ b/arch/arm/configs/enp2611_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.13-rc2 3# Linux kernel version: 2.6.13
4# Thu Jul 7 16:41:21 2005 4# Wed Sep 14 10:51:52 2005
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -135,7 +135,6 @@ CONFIG_PCI_NAMES=y
135# 135#
136# Kernel Features 136# Kernel Features
137# 137#
138# CONFIG_SMP is not set
139# CONFIG_PREEMPT is not set 138# CONFIG_PREEMPT is not set
140# CONFIG_NO_IDLE_HZ is not set 139# CONFIG_NO_IDLE_HZ is not set
141# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set 140# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
@@ -179,6 +178,68 @@ CONFIG_BINFMT_ELF=y
179# CONFIG_PM is not set 178# CONFIG_PM is not set
180 179
181# 180#
181# Networking
182#
183CONFIG_NET=y
184
185#
186# Networking options
187#
188CONFIG_PACKET=y
189CONFIG_PACKET_MMAP=y
190CONFIG_UNIX=y
191# CONFIG_NET_KEY is not set
192CONFIG_INET=y
193# CONFIG_IP_MULTICAST is not set
194# CONFIG_IP_ADVANCED_ROUTER is not set
195CONFIG_IP_FIB_HASH=y
196CONFIG_IP_PNP=y
197CONFIG_IP_PNP_DHCP=y
198CONFIG_IP_PNP_BOOTP=y
199# CONFIG_IP_PNP_RARP is not set
200# CONFIG_NET_IPIP is not set
201# CONFIG_NET_IPGRE is not set
202# CONFIG_ARPD is not set
203CONFIG_SYN_COOKIES=y
204# CONFIG_INET_AH is not set
205# CONFIG_INET_ESP is not set
206# CONFIG_INET_IPCOMP is not set
207# CONFIG_INET_TUNNEL is not set
208# CONFIG_IP_TCPDIAG is not set
209# CONFIG_IP_TCPDIAG_IPV6 is not set
210# CONFIG_TCP_CONG_ADVANCED is not set
211CONFIG_TCP_CONG_BIC=y
212# CONFIG_IPV6 is not set
213# CONFIG_NETFILTER is not set
214
215#
216# SCTP Configuration (EXPERIMENTAL)
217#
218# CONFIG_IP_SCTP is not set
219# CONFIG_ATM is not set
220# CONFIG_BRIDGE is not set
221# CONFIG_VLAN_8021Q is not set
222# CONFIG_DECNET is not set
223# CONFIG_LLC2 is not set
224# CONFIG_IPX is not set
225# CONFIG_ATALK is not set
226# CONFIG_X25 is not set
227# CONFIG_LAPB is not set
228# CONFIG_NET_DIVERT is not set
229# CONFIG_ECONET is not set
230# CONFIG_WAN_ROUTER is not set
231# CONFIG_NET_SCHED is not set
232# CONFIG_NET_CLS_ROUTE is not set
233
234#
235# Network testing
236#
237# CONFIG_NET_PKTGEN is not set
238# CONFIG_HAMRADIO is not set
239# CONFIG_IRDA is not set
240# CONFIG_BT is not set
241
242#
182# Device Drivers 243# Device Drivers
183# 244#
184 245
@@ -248,6 +309,7 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y
248CONFIG_MTD_IXP2000=y 309CONFIG_MTD_IXP2000=y
249# CONFIG_MTD_EDB7312 is not set 310# CONFIG_MTD_EDB7312 is not set
250# CONFIG_MTD_PCI is not set 311# CONFIG_MTD_PCI is not set
312# CONFIG_MTD_PLATRAM is not set
251 313
252# 314#
253# Self-contained MTD device drivers 315# Self-contained MTD device drivers
@@ -334,72 +396,8 @@ CONFIG_IOSCHED_CFQ=y
334# CONFIG_I2O is not set 396# CONFIG_I2O is not set
335 397
336# 398#
337# Networking support 399# Network device support
338#
339CONFIG_NET=y
340
341#
342# Networking options
343#
344CONFIG_PACKET=y
345CONFIG_PACKET_MMAP=y
346CONFIG_UNIX=y
347# CONFIG_NET_KEY is not set
348CONFIG_INET=y
349# CONFIG_IP_MULTICAST is not set
350# CONFIG_IP_ADVANCED_ROUTER is not set
351CONFIG_IP_FIB_HASH=y
352CONFIG_IP_PNP=y
353CONFIG_IP_PNP_DHCP=y
354CONFIG_IP_PNP_BOOTP=y
355# CONFIG_IP_PNP_RARP is not set
356# CONFIG_NET_IPIP is not set
357# CONFIG_NET_IPGRE is not set
358# CONFIG_ARPD is not set
359CONFIG_SYN_COOKIES=y
360# CONFIG_INET_AH is not set
361# CONFIG_INET_ESP is not set
362# CONFIG_INET_IPCOMP is not set
363# CONFIG_INET_TUNNEL is not set
364# CONFIG_IP_TCPDIAG is not set
365# CONFIG_IP_TCPDIAG_IPV6 is not set
366# CONFIG_TCP_CONG_ADVANCED is not set
367CONFIG_TCP_CONG_BIC=y
368# CONFIG_IPV6 is not set
369# CONFIG_NETFILTER is not set
370
371#
372# SCTP Configuration (EXPERIMENTAL)
373#
374# CONFIG_IP_SCTP is not set
375# CONFIG_ATM is not set
376# CONFIG_BRIDGE is not set
377# CONFIG_VLAN_8021Q is not set
378# CONFIG_DECNET is not set
379# CONFIG_LLC2 is not set
380# CONFIG_IPX is not set
381# CONFIG_ATALK is not set
382# CONFIG_X25 is not set
383# CONFIG_LAPB is not set
384# CONFIG_NET_DIVERT is not set
385# CONFIG_ECONET is not set
386# CONFIG_WAN_ROUTER is not set
387
388#
389# QoS and/or fair queueing
390#
391# CONFIG_NET_SCHED is not set
392# CONFIG_NET_CLS_ROUTE is not set
393
394#
395# Network testing
396# 400#
397# CONFIG_NET_PKTGEN is not set
398# CONFIG_NETPOLL is not set
399# CONFIG_NET_POLL_CONTROLLER is not set
400# CONFIG_HAMRADIO is not set
401# CONFIG_IRDA is not set
402# CONFIG_BT is not set
403CONFIG_NETDEVICES=y 401CONFIG_NETDEVICES=y
404CONFIG_DUMMY=y 402CONFIG_DUMMY=y
405# CONFIG_BONDING is not set 403# CONFIG_BONDING is not set
@@ -509,6 +507,8 @@ CONFIG_DLCI_MAX=8
509# CONFIG_SLIP is not set 507# CONFIG_SLIP is not set
510# CONFIG_SHAPER is not set 508# CONFIG_SHAPER is not set
511# CONFIG_NETCONSOLE is not set 509# CONFIG_NETCONSOLE is not set
510# CONFIG_NETPOLL is not set
511# CONFIG_NET_POLL_CONTROLLER is not set
512 512
513# 513#
514# ISDN subsystem 514# ISDN subsystem
@@ -635,7 +635,7 @@ CONFIG_I2C_ALGOBIT=y
635# CONFIG_I2C_I810 is not set 635# CONFIG_I2C_I810 is not set
636# CONFIG_I2C_PIIX4 is not set 636# CONFIG_I2C_PIIX4 is not set
637# CONFIG_I2C_ISA is not set 637# CONFIG_I2C_ISA is not set
638# CONFIG_I2C_IXP2000 is not set 638CONFIG_I2C_IXP2000=y
639# CONFIG_I2C_NFORCE2 is not set 639# CONFIG_I2C_NFORCE2 is not set
640# CONFIG_I2C_PARPORT_LIGHT is not set 640# CONFIG_I2C_PARPORT_LIGHT is not set
641# CONFIG_I2C_PROSAVAGE is not set 641# CONFIG_I2C_PROSAVAGE is not set
@@ -649,11 +649,28 @@ CONFIG_I2C_ALGOBIT=y
649# CONFIG_I2C_VIAPRO is not set 649# CONFIG_I2C_VIAPRO is not set
650# CONFIG_I2C_VOODOO3 is not set 650# CONFIG_I2C_VOODOO3 is not set
651# CONFIG_I2C_PCA_ISA is not set 651# CONFIG_I2C_PCA_ISA is not set
652CONFIG_I2C_SENSOR=y
652 653
653# 654#
654# Hardware Sensors Chip support 655# Miscellaneous I2C Chip support
655# 656#
656CONFIG_I2C_SENSOR=y 657# CONFIG_SENSORS_DS1337 is not set
658# CONFIG_SENSORS_DS1374 is not set
659CONFIG_SENSORS_EEPROM=y
660# CONFIG_SENSORS_PCF8574 is not set
661# CONFIG_SENSORS_PCA9539 is not set
662# CONFIG_SENSORS_PCF8591 is not set
663# CONFIG_SENSORS_RTC8564 is not set
664# CONFIG_SENSORS_MAX6875 is not set
665# CONFIG_I2C_DEBUG_CORE is not set
666# CONFIG_I2C_DEBUG_ALGO is not set
667# CONFIG_I2C_DEBUG_BUS is not set
668# CONFIG_I2C_DEBUG_CHIP is not set
669
670#
671# Hardware Monitoring support
672#
673CONFIG_HWMON=y
657# CONFIG_SENSORS_ADM1021 is not set 674# CONFIG_SENSORS_ADM1021 is not set
658# CONFIG_SENSORS_ADM1025 is not set 675# CONFIG_SENSORS_ADM1025 is not set
659# CONFIG_SENSORS_ADM1026 is not set 676# CONFIG_SENSORS_ADM1026 is not set
@@ -679,30 +696,15 @@ CONFIG_I2C_SENSOR=y
679# CONFIG_SENSORS_LM92 is not set 696# CONFIG_SENSORS_LM92 is not set
680# CONFIG_SENSORS_MAX1619 is not set 697# CONFIG_SENSORS_MAX1619 is not set
681# CONFIG_SENSORS_PC87360 is not set 698# CONFIG_SENSORS_PC87360 is not set
682# CONFIG_SENSORS_SMSC47B397 is not set
683# CONFIG_SENSORS_SIS5595 is not set 699# CONFIG_SENSORS_SIS5595 is not set
684# CONFIG_SENSORS_SMSC47M1 is not set 700# CONFIG_SENSORS_SMSC47M1 is not set
701# CONFIG_SENSORS_SMSC47B397 is not set
685# CONFIG_SENSORS_VIA686A is not set 702# CONFIG_SENSORS_VIA686A is not set
686# CONFIG_SENSORS_W83781D is not set 703# CONFIG_SENSORS_W83781D is not set
687# CONFIG_SENSORS_W83L785TS is not set 704# CONFIG_SENSORS_W83L785TS is not set
688# CONFIG_SENSORS_W83627HF is not set 705# CONFIG_SENSORS_W83627HF is not set
689# CONFIG_SENSORS_W83627EHF is not set 706# CONFIG_SENSORS_W83627EHF is not set
690 707# CONFIG_HWMON_DEBUG_CHIP is not set
691#
692# Other I2C Chip support
693#
694# CONFIG_SENSORS_DS1337 is not set
695# CONFIG_SENSORS_DS1374 is not set
696CONFIG_SENSORS_EEPROM=y
697# CONFIG_SENSORS_PCF8574 is not set
698# CONFIG_SENSORS_PCA9539 is not set
699# CONFIG_SENSORS_PCF8591 is not set
700# CONFIG_SENSORS_RTC8564 is not set
701# CONFIG_SENSORS_MAX6875 is not set
702# CONFIG_I2C_DEBUG_CORE is not set
703# CONFIG_I2C_DEBUG_ALGO is not set
704# CONFIG_I2C_DEBUG_BUS is not set
705# CONFIG_I2C_DEBUG_CHIP is not set
706 708
707# 709#
708# Misc devices 710# Misc devices
@@ -770,6 +772,7 @@ CONFIG_FS_POSIX_ACL=y
770# CONFIG_XFS_FS is not set 772# CONFIG_XFS_FS is not set
771# CONFIG_MINIX_FS is not set 773# CONFIG_MINIX_FS is not set
772# CONFIG_ROMFS_FS is not set 774# CONFIG_ROMFS_FS is not set
775CONFIG_INOTIFY=y
773# CONFIG_QUOTA is not set 776# CONFIG_QUOTA is not set
774CONFIG_DNOTIFY=y 777CONFIG_DNOTIFY=y
775# CONFIG_AUTOFS_FS is not set 778# CONFIG_AUTOFS_FS is not set
@@ -812,8 +815,7 @@ CONFIG_RAMFS=y
812# CONFIG_JFFS_FS is not set 815# CONFIG_JFFS_FS is not set
813CONFIG_JFFS2_FS=y 816CONFIG_JFFS2_FS=y
814CONFIG_JFFS2_FS_DEBUG=0 817CONFIG_JFFS2_FS_DEBUG=0
815# CONFIG_JFFS2_FS_NAND is not set 818CONFIG_JFFS2_FS_WRITEBUFFER=y
816# CONFIG_JFFS2_FS_NOR_ECC is not set
817# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set 819# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
818CONFIG_JFFS2_ZLIB=y 820CONFIG_JFFS2_ZLIB=y
819CONFIG_JFFS2_RTIME=y 821CONFIG_JFFS2_RTIME=y
diff --git a/arch/arm/configs/ixdp2400_defconfig b/arch/arm/configs/ixdp2400_defconfig
index 5c6c928215d0..678720fa2e2e 100644
--- a/arch/arm/configs/ixdp2400_defconfig
+++ b/arch/arm/configs/ixdp2400_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.13-rc2 3# Linux kernel version: 2.6.13
4# Thu Jul 7 16:49:01 2005 4# Wed Sep 14 10:52:01 2005
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -136,7 +136,6 @@ CONFIG_PCI_NAMES=y
136# 136#
137# Kernel Features 137# Kernel Features
138# 138#
139# CONFIG_SMP is not set
140# CONFIG_PREEMPT is not set 139# CONFIG_PREEMPT is not set
141# CONFIG_NO_IDLE_HZ is not set 140# CONFIG_NO_IDLE_HZ is not set
142# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set 141# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
@@ -180,6 +179,68 @@ CONFIG_BINFMT_ELF=y
180# CONFIG_PM is not set 179# CONFIG_PM is not set
181 180
182# 181#
182# Networking
183#
184CONFIG_NET=y
185
186#
187# Networking options
188#
189CONFIG_PACKET=y
190CONFIG_PACKET_MMAP=y
191CONFIG_UNIX=y
192# CONFIG_NET_KEY is not set
193CONFIG_INET=y
194# CONFIG_IP_MULTICAST is not set
195# CONFIG_IP_ADVANCED_ROUTER is not set
196CONFIG_IP_FIB_HASH=y
197CONFIG_IP_PNP=y
198CONFIG_IP_PNP_DHCP=y
199CONFIG_IP_PNP_BOOTP=y
200# CONFIG_IP_PNP_RARP is not set
201# CONFIG_NET_IPIP is not set
202# CONFIG_NET_IPGRE is not set
203# CONFIG_ARPD is not set
204CONFIG_SYN_COOKIES=y
205# CONFIG_INET_AH is not set
206# CONFIG_INET_ESP is not set
207# CONFIG_INET_IPCOMP is not set
208# CONFIG_INET_TUNNEL is not set
209# CONFIG_IP_TCPDIAG is not set
210# CONFIG_IP_TCPDIAG_IPV6 is not set
211# CONFIG_TCP_CONG_ADVANCED is not set
212CONFIG_TCP_CONG_BIC=y
213# CONFIG_IPV6 is not set
214# CONFIG_NETFILTER is not set
215
216#
217# SCTP Configuration (EXPERIMENTAL)
218#
219# CONFIG_IP_SCTP is not set
220# CONFIG_ATM is not set
221# CONFIG_BRIDGE is not set
222# CONFIG_VLAN_8021Q is not set
223# CONFIG_DECNET is not set
224# CONFIG_LLC2 is not set
225# CONFIG_IPX is not set
226# CONFIG_ATALK is not set
227# CONFIG_X25 is not set
228# CONFIG_LAPB is not set
229# CONFIG_NET_DIVERT is not set
230# CONFIG_ECONET is not set
231# CONFIG_WAN_ROUTER is not set
232# CONFIG_NET_SCHED is not set
233# CONFIG_NET_CLS_ROUTE is not set
234
235#
236# Network testing
237#
238# CONFIG_NET_PKTGEN is not set
239# CONFIG_HAMRADIO is not set
240# CONFIG_IRDA is not set
241# CONFIG_BT is not set
242
243#
183# Device Drivers 244# Device Drivers
184# 245#
185 246
@@ -249,6 +310,7 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y
249CONFIG_MTD_IXP2000=y 310CONFIG_MTD_IXP2000=y
250# CONFIG_MTD_EDB7312 is not set 311# CONFIG_MTD_EDB7312 is not set
251# CONFIG_MTD_PCI is not set 312# CONFIG_MTD_PCI is not set
313# CONFIG_MTD_PLATRAM is not set
252 314
253# 315#
254# Self-contained MTD device drivers 316# Self-contained MTD device drivers
@@ -335,72 +397,8 @@ CONFIG_IOSCHED_CFQ=y
335# CONFIG_I2O is not set 397# CONFIG_I2O is not set
336 398
337# 399#
338# Networking support 400# Network device support
339#
340CONFIG_NET=y
341
342#
343# Networking options
344#
345CONFIG_PACKET=y
346CONFIG_PACKET_MMAP=y
347CONFIG_UNIX=y
348# CONFIG_NET_KEY is not set
349CONFIG_INET=y
350# CONFIG_IP_MULTICAST is not set
351# CONFIG_IP_ADVANCED_ROUTER is not set
352CONFIG_IP_FIB_HASH=y
353CONFIG_IP_PNP=y
354CONFIG_IP_PNP_DHCP=y
355CONFIG_IP_PNP_BOOTP=y
356# CONFIG_IP_PNP_RARP is not set
357# CONFIG_NET_IPIP is not set
358# CONFIG_NET_IPGRE is not set
359# CONFIG_ARPD is not set
360CONFIG_SYN_COOKIES=y
361# CONFIG_INET_AH is not set
362# CONFIG_INET_ESP is not set
363# CONFIG_INET_IPCOMP is not set
364# CONFIG_INET_TUNNEL is not set
365# CONFIG_IP_TCPDIAG is not set
366# CONFIG_IP_TCPDIAG_IPV6 is not set
367# CONFIG_TCP_CONG_ADVANCED is not set
368CONFIG_TCP_CONG_BIC=y
369# CONFIG_IPV6 is not set
370# CONFIG_NETFILTER is not set
371
372#
373# SCTP Configuration (EXPERIMENTAL)
374#
375# CONFIG_IP_SCTP is not set
376# CONFIG_ATM is not set
377# CONFIG_BRIDGE is not set
378# CONFIG_VLAN_8021Q is not set
379# CONFIG_DECNET is not set
380# CONFIG_LLC2 is not set
381# CONFIG_IPX is not set
382# CONFIG_ATALK is not set
383# CONFIG_X25 is not set
384# CONFIG_LAPB is not set
385# CONFIG_NET_DIVERT is not set
386# CONFIG_ECONET is not set
387# CONFIG_WAN_ROUTER is not set
388
389#
390# QoS and/or fair queueing
391#
392# CONFIG_NET_SCHED is not set
393# CONFIG_NET_CLS_ROUTE is not set
394
395#
396# Network testing
397# 401#
398# CONFIG_NET_PKTGEN is not set
399# CONFIG_NETPOLL is not set
400# CONFIG_NET_POLL_CONTROLLER is not set
401# CONFIG_HAMRADIO is not set
402# CONFIG_IRDA is not set
403# CONFIG_BT is not set
404CONFIG_NETDEVICES=y 402CONFIG_NETDEVICES=y
405CONFIG_DUMMY=y 403CONFIG_DUMMY=y
406# CONFIG_BONDING is not set 404# CONFIG_BONDING is not set
@@ -510,6 +508,8 @@ CONFIG_DLCI_MAX=8
510# CONFIG_SLIP is not set 508# CONFIG_SLIP is not set
511# CONFIG_SHAPER is not set 509# CONFIG_SHAPER is not set
512# CONFIG_NETCONSOLE is not set 510# CONFIG_NETCONSOLE is not set
511# CONFIG_NETPOLL is not set
512# CONFIG_NET_POLL_CONTROLLER is not set
513 513
514# 514#
515# ISDN subsystem 515# ISDN subsystem
@@ -636,7 +636,7 @@ CONFIG_I2C_ALGOBIT=y
636# CONFIG_I2C_I810 is not set 636# CONFIG_I2C_I810 is not set
637# CONFIG_I2C_PIIX4 is not set 637# CONFIG_I2C_PIIX4 is not set
638# CONFIG_I2C_ISA is not set 638# CONFIG_I2C_ISA is not set
639# CONFIG_I2C_IXP2000 is not set 639CONFIG_I2C_IXP2000=y
640# CONFIG_I2C_NFORCE2 is not set 640# CONFIG_I2C_NFORCE2 is not set
641# CONFIG_I2C_PARPORT_LIGHT is not set 641# CONFIG_I2C_PARPORT_LIGHT is not set
642# CONFIG_I2C_PROSAVAGE is not set 642# CONFIG_I2C_PROSAVAGE is not set
@@ -650,11 +650,28 @@ CONFIG_I2C_ALGOBIT=y
650# CONFIG_I2C_VIAPRO is not set 650# CONFIG_I2C_VIAPRO is not set
651# CONFIG_I2C_VOODOO3 is not set 651# CONFIG_I2C_VOODOO3 is not set
652# CONFIG_I2C_PCA_ISA is not set 652# CONFIG_I2C_PCA_ISA is not set
653CONFIG_I2C_SENSOR=y
653 654
654# 655#
655# Hardware Sensors Chip support 656# Miscellaneous I2C Chip support
656# 657#
657CONFIG_I2C_SENSOR=y 658# CONFIG_SENSORS_DS1337 is not set
659# CONFIG_SENSORS_DS1374 is not set
660CONFIG_SENSORS_EEPROM=y
661# CONFIG_SENSORS_PCF8574 is not set
662# CONFIG_SENSORS_PCA9539 is not set
663# CONFIG_SENSORS_PCF8591 is not set
664# CONFIG_SENSORS_RTC8564 is not set
665# CONFIG_SENSORS_MAX6875 is not set
666# CONFIG_I2C_DEBUG_CORE is not set
667# CONFIG_I2C_DEBUG_ALGO is not set
668# CONFIG_I2C_DEBUG_BUS is not set
669# CONFIG_I2C_DEBUG_CHIP is not set
670
671#
672# Hardware Monitoring support
673#
674CONFIG_HWMON=y
658# CONFIG_SENSORS_ADM1021 is not set 675# CONFIG_SENSORS_ADM1021 is not set
659# CONFIG_SENSORS_ADM1025 is not set 676# CONFIG_SENSORS_ADM1025 is not set
660# CONFIG_SENSORS_ADM1026 is not set 677# CONFIG_SENSORS_ADM1026 is not set
@@ -680,30 +697,15 @@ CONFIG_I2C_SENSOR=y
680# CONFIG_SENSORS_LM92 is not set 697# CONFIG_SENSORS_LM92 is not set
681# CONFIG_SENSORS_MAX1619 is not set 698# CONFIG_SENSORS_MAX1619 is not set
682# CONFIG_SENSORS_PC87360 is not set 699# CONFIG_SENSORS_PC87360 is not set
683# CONFIG_SENSORS_SMSC47B397 is not set
684# CONFIG_SENSORS_SIS5595 is not set 700# CONFIG_SENSORS_SIS5595 is not set
685# CONFIG_SENSORS_SMSC47M1 is not set 701# CONFIG_SENSORS_SMSC47M1 is not set
702# CONFIG_SENSORS_SMSC47B397 is not set
686# CONFIG_SENSORS_VIA686A is not set 703# CONFIG_SENSORS_VIA686A is not set
687# CONFIG_SENSORS_W83781D is not set 704# CONFIG_SENSORS_W83781D is not set
688# CONFIG_SENSORS_W83L785TS is not set 705# CONFIG_SENSORS_W83L785TS is not set
689# CONFIG_SENSORS_W83627HF is not set 706# CONFIG_SENSORS_W83627HF is not set
690# CONFIG_SENSORS_W83627EHF is not set 707# CONFIG_SENSORS_W83627EHF is not set
691 708# CONFIG_HWMON_DEBUG_CHIP is not set
692#
693# Other I2C Chip support
694#
695# CONFIG_SENSORS_DS1337 is not set
696# CONFIG_SENSORS_DS1374 is not set
697CONFIG_SENSORS_EEPROM=y
698# CONFIG_SENSORS_PCF8574 is not set
699# CONFIG_SENSORS_PCA9539 is not set
700# CONFIG_SENSORS_PCF8591 is not set
701# CONFIG_SENSORS_RTC8564 is not set
702# CONFIG_SENSORS_MAX6875 is not set
703# CONFIG_I2C_DEBUG_CORE is not set
704# CONFIG_I2C_DEBUG_ALGO is not set
705# CONFIG_I2C_DEBUG_BUS is not set
706# CONFIG_I2C_DEBUG_CHIP is not set
707 709
708# 710#
709# Misc devices 711# Misc devices
@@ -771,6 +773,7 @@ CONFIG_FS_POSIX_ACL=y
771# CONFIG_XFS_FS is not set 773# CONFIG_XFS_FS is not set
772# CONFIG_MINIX_FS is not set 774# CONFIG_MINIX_FS is not set
773# CONFIG_ROMFS_FS is not set 775# CONFIG_ROMFS_FS is not set
776CONFIG_INOTIFY=y
774# CONFIG_QUOTA is not set 777# CONFIG_QUOTA is not set
775CONFIG_DNOTIFY=y 778CONFIG_DNOTIFY=y
776# CONFIG_AUTOFS_FS is not set 779# CONFIG_AUTOFS_FS is not set
@@ -813,8 +816,7 @@ CONFIG_RAMFS=y
813# CONFIG_JFFS_FS is not set 816# CONFIG_JFFS_FS is not set
814CONFIG_JFFS2_FS=y 817CONFIG_JFFS2_FS=y
815CONFIG_JFFS2_FS_DEBUG=0 818CONFIG_JFFS2_FS_DEBUG=0
816# CONFIG_JFFS2_FS_NAND is not set 819CONFIG_JFFS2_FS_WRITEBUFFER=y
817# CONFIG_JFFS2_FS_NOR_ECC is not set
818# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set 820# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
819CONFIG_JFFS2_ZLIB=y 821CONFIG_JFFS2_ZLIB=y
820CONFIG_JFFS2_RTIME=y 822CONFIG_JFFS2_RTIME=y
diff --git a/arch/arm/configs/ixdp2401_defconfig b/arch/arm/configs/ixdp2401_defconfig
index 6dc40f6be0ef..38c9a721d5c9 100644
--- a/arch/arm/configs/ixdp2401_defconfig
+++ b/arch/arm/configs/ixdp2401_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.13-rc2 3# Linux kernel version: 2.6.13
4# Thu Jul 7 16:49:08 2005 4# Wed Sep 14 10:52:10 2005
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -136,7 +136,6 @@ CONFIG_PCI_NAMES=y
136# 136#
137# Kernel Features 137# Kernel Features
138# 138#
139# CONFIG_SMP is not set
140# CONFIG_PREEMPT is not set 139# CONFIG_PREEMPT is not set
141# CONFIG_NO_IDLE_HZ is not set 140# CONFIG_NO_IDLE_HZ is not set
142# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set 141# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
@@ -180,6 +179,68 @@ CONFIG_BINFMT_ELF=y
180# CONFIG_PM is not set 179# CONFIG_PM is not set
181 180
182# 181#
182# Networking
183#
184CONFIG_NET=y
185
186#
187# Networking options
188#
189CONFIG_PACKET=y
190CONFIG_PACKET_MMAP=y
191CONFIG_UNIX=y
192# CONFIG_NET_KEY is not set
193CONFIG_INET=y
194# CONFIG_IP_MULTICAST is not set
195# CONFIG_IP_ADVANCED_ROUTER is not set
196CONFIG_IP_FIB_HASH=y
197CONFIG_IP_PNP=y
198CONFIG_IP_PNP_DHCP=y
199CONFIG_IP_PNP_BOOTP=y
200# CONFIG_IP_PNP_RARP is not set
201# CONFIG_NET_IPIP is not set
202# CONFIG_NET_IPGRE is not set
203# CONFIG_ARPD is not set
204CONFIG_SYN_COOKIES=y
205# CONFIG_INET_AH is not set
206# CONFIG_INET_ESP is not set
207# CONFIG_INET_IPCOMP is not set
208# CONFIG_INET_TUNNEL is not set
209CONFIG_IP_TCPDIAG=y
210# CONFIG_IP_TCPDIAG_IPV6 is not set
211# CONFIG_TCP_CONG_ADVANCED is not set
212CONFIG_TCP_CONG_BIC=y
213# CONFIG_IPV6 is not set
214# CONFIG_NETFILTER is not set
215
216#
217# SCTP Configuration (EXPERIMENTAL)
218#
219# CONFIG_IP_SCTP is not set
220# CONFIG_ATM is not set
221# CONFIG_BRIDGE is not set
222# CONFIG_VLAN_8021Q is not set
223# CONFIG_DECNET is not set
224# CONFIG_LLC2 is not set
225# CONFIG_IPX is not set
226# CONFIG_ATALK is not set
227# CONFIG_X25 is not set
228# CONFIG_LAPB is not set
229# CONFIG_NET_DIVERT is not set
230# CONFIG_ECONET is not set
231# CONFIG_WAN_ROUTER is not set
232# CONFIG_NET_SCHED is not set
233# CONFIG_NET_CLS_ROUTE is not set
234
235#
236# Network testing
237#
238# CONFIG_NET_PKTGEN is not set
239# CONFIG_HAMRADIO is not set
240# CONFIG_IRDA is not set
241# CONFIG_BT is not set
242
243#
183# Device Drivers 244# Device Drivers
184# 245#
185 246
@@ -249,6 +310,7 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y
249CONFIG_MTD_IXP2000=y 310CONFIG_MTD_IXP2000=y
250# CONFIG_MTD_EDB7312 is not set 311# CONFIG_MTD_EDB7312 is not set
251# CONFIG_MTD_PCI is not set 312# CONFIG_MTD_PCI is not set
313# CONFIG_MTD_PLATRAM is not set
252 314
253# 315#
254# Self-contained MTD device drivers 316# Self-contained MTD device drivers
@@ -335,72 +397,8 @@ CONFIG_IOSCHED_CFQ=y
335# CONFIG_I2O is not set 397# CONFIG_I2O is not set
336 398
337# 399#
338# Networking support 400# Network device support
339#
340CONFIG_NET=y
341
342#
343# Networking options
344#
345CONFIG_PACKET=y
346CONFIG_PACKET_MMAP=y
347CONFIG_UNIX=y
348# CONFIG_NET_KEY is not set
349CONFIG_INET=y
350# CONFIG_IP_MULTICAST is not set
351# CONFIG_IP_ADVANCED_ROUTER is not set
352CONFIG_IP_FIB_HASH=y
353CONFIG_IP_PNP=y
354CONFIG_IP_PNP_DHCP=y
355CONFIG_IP_PNP_BOOTP=y
356# CONFIG_IP_PNP_RARP is not set
357# CONFIG_NET_IPIP is not set
358# CONFIG_NET_IPGRE is not set
359# CONFIG_ARPD is not set
360CONFIG_SYN_COOKIES=y
361# CONFIG_INET_AH is not set
362# CONFIG_INET_ESP is not set
363# CONFIG_INET_IPCOMP is not set
364# CONFIG_INET_TUNNEL is not set
365CONFIG_IP_TCPDIAG=y
366# CONFIG_IP_TCPDIAG_IPV6 is not set
367# CONFIG_TCP_CONG_ADVANCED is not set
368CONFIG_TCP_CONG_BIC=y
369# CONFIG_IPV6 is not set
370# CONFIG_NETFILTER is not set
371
372#
373# SCTP Configuration (EXPERIMENTAL)
374#
375# CONFIG_IP_SCTP is not set
376# CONFIG_ATM is not set
377# CONFIG_BRIDGE is not set
378# CONFIG_VLAN_8021Q is not set
379# CONFIG_DECNET is not set
380# CONFIG_LLC2 is not set
381# CONFIG_IPX is not set
382# CONFIG_ATALK is not set
383# CONFIG_X25 is not set
384# CONFIG_LAPB is not set
385# CONFIG_NET_DIVERT is not set
386# CONFIG_ECONET is not set
387# CONFIG_WAN_ROUTER is not set
388
389#
390# QoS and/or fair queueing
391#
392# CONFIG_NET_SCHED is not set
393# CONFIG_NET_CLS_ROUTE is not set
394
395#
396# Network testing
397# 401#
398# CONFIG_NET_PKTGEN is not set
399# CONFIG_NETPOLL is not set
400# CONFIG_NET_POLL_CONTROLLER is not set
401# CONFIG_HAMRADIO is not set
402# CONFIG_IRDA is not set
403# CONFIG_BT is not set
404CONFIG_NETDEVICES=y 402CONFIG_NETDEVICES=y
405CONFIG_DUMMY=y 403CONFIG_DUMMY=y
406# CONFIG_BONDING is not set 404# CONFIG_BONDING is not set
@@ -511,6 +509,8 @@ CONFIG_DLCI_MAX=8
511# CONFIG_SLIP is not set 509# CONFIG_SLIP is not set
512# CONFIG_SHAPER is not set 510# CONFIG_SHAPER is not set
513# CONFIG_NETCONSOLE is not set 511# CONFIG_NETCONSOLE is not set
512# CONFIG_NETPOLL is not set
513# CONFIG_NET_POLL_CONTROLLER is not set
514 514
515# 515#
516# ISDN subsystem 516# ISDN subsystem
@@ -637,7 +637,7 @@ CONFIG_I2C_ALGOBIT=y
637# CONFIG_I2C_I810 is not set 637# CONFIG_I2C_I810 is not set
638# CONFIG_I2C_PIIX4 is not set 638# CONFIG_I2C_PIIX4 is not set
639# CONFIG_I2C_ISA is not set 639# CONFIG_I2C_ISA is not set
640# CONFIG_I2C_IXP2000 is not set 640CONFIG_I2C_IXP2000=y
641# CONFIG_I2C_NFORCE2 is not set 641# CONFIG_I2C_NFORCE2 is not set
642# CONFIG_I2C_PARPORT_LIGHT is not set 642# CONFIG_I2C_PARPORT_LIGHT is not set
643# CONFIG_I2C_PROSAVAGE is not set 643# CONFIG_I2C_PROSAVAGE is not set
@@ -651,11 +651,28 @@ CONFIG_I2C_ALGOBIT=y
651# CONFIG_I2C_VIAPRO is not set 651# CONFIG_I2C_VIAPRO is not set
652# CONFIG_I2C_VOODOO3 is not set 652# CONFIG_I2C_VOODOO3 is not set
653# CONFIG_I2C_PCA_ISA is not set 653# CONFIG_I2C_PCA_ISA is not set
654CONFIG_I2C_SENSOR=y
654 655
655# 656#
656# Hardware Sensors Chip support 657# Miscellaneous I2C Chip support
657# 658#
658CONFIG_I2C_SENSOR=y 659# CONFIG_SENSORS_DS1337 is not set
660# CONFIG_SENSORS_DS1374 is not set
661CONFIG_SENSORS_EEPROM=y
662# CONFIG_SENSORS_PCF8574 is not set
663# CONFIG_SENSORS_PCA9539 is not set
664# CONFIG_SENSORS_PCF8591 is not set
665# CONFIG_SENSORS_RTC8564 is not set
666# CONFIG_SENSORS_MAX6875 is not set
667# CONFIG_I2C_DEBUG_CORE is not set
668# CONFIG_I2C_DEBUG_ALGO is not set
669# CONFIG_I2C_DEBUG_BUS is not set
670# CONFIG_I2C_DEBUG_CHIP is not set
671
672#
673# Hardware Monitoring support
674#
675CONFIG_HWMON=y
659# CONFIG_SENSORS_ADM1021 is not set 676# CONFIG_SENSORS_ADM1021 is not set
660# CONFIG_SENSORS_ADM1025 is not set 677# CONFIG_SENSORS_ADM1025 is not set
661# CONFIG_SENSORS_ADM1026 is not set 678# CONFIG_SENSORS_ADM1026 is not set
@@ -681,30 +698,15 @@ CONFIG_I2C_SENSOR=y
681# CONFIG_SENSORS_LM92 is not set 698# CONFIG_SENSORS_LM92 is not set
682# CONFIG_SENSORS_MAX1619 is not set 699# CONFIG_SENSORS_MAX1619 is not set
683# CONFIG_SENSORS_PC87360 is not set 700# CONFIG_SENSORS_PC87360 is not set
684# CONFIG_SENSORS_SMSC47B397 is not set
685# CONFIG_SENSORS_SIS5595 is not set 701# CONFIG_SENSORS_SIS5595 is not set
686# CONFIG_SENSORS_SMSC47M1 is not set 702# CONFIG_SENSORS_SMSC47M1 is not set
703# CONFIG_SENSORS_SMSC47B397 is not set
687# CONFIG_SENSORS_VIA686A is not set 704# CONFIG_SENSORS_VIA686A is not set
688# CONFIG_SENSORS_W83781D is not set 705# CONFIG_SENSORS_W83781D is not set
689# CONFIG_SENSORS_W83L785TS is not set 706# CONFIG_SENSORS_W83L785TS is not set
690# CONFIG_SENSORS_W83627HF is not set 707# CONFIG_SENSORS_W83627HF is not set
691# CONFIG_SENSORS_W83627EHF is not set 708# CONFIG_SENSORS_W83627EHF is not set
692 709# CONFIG_HWMON_DEBUG_CHIP is not set
693#
694# Other I2C Chip support
695#
696# CONFIG_SENSORS_DS1337 is not set
697# CONFIG_SENSORS_DS1374 is not set
698CONFIG_SENSORS_EEPROM=y
699# CONFIG_SENSORS_PCF8574 is not set
700# CONFIG_SENSORS_PCA9539 is not set
701# CONFIG_SENSORS_PCF8591 is not set
702# CONFIG_SENSORS_RTC8564 is not set
703# CONFIG_SENSORS_MAX6875 is not set
704# CONFIG_I2C_DEBUG_CORE is not set
705# CONFIG_I2C_DEBUG_ALGO is not set
706# CONFIG_I2C_DEBUG_BUS is not set
707# CONFIG_I2C_DEBUG_CHIP is not set
708 710
709# 711#
710# Misc devices 712# Misc devices
@@ -772,6 +774,7 @@ CONFIG_FS_POSIX_ACL=y
772# CONFIG_XFS_FS is not set 774# CONFIG_XFS_FS is not set
773# CONFIG_MINIX_FS is not set 775# CONFIG_MINIX_FS is not set
774# CONFIG_ROMFS_FS is not set 776# CONFIG_ROMFS_FS is not set
777CONFIG_INOTIFY=y
775# CONFIG_QUOTA is not set 778# CONFIG_QUOTA is not set
776CONFIG_DNOTIFY=y 779CONFIG_DNOTIFY=y
777# CONFIG_AUTOFS_FS is not set 780# CONFIG_AUTOFS_FS is not set
@@ -814,8 +817,7 @@ CONFIG_RAMFS=y
814# CONFIG_JFFS_FS is not set 817# CONFIG_JFFS_FS is not set
815CONFIG_JFFS2_FS=y 818CONFIG_JFFS2_FS=y
816CONFIG_JFFS2_FS_DEBUG=0 819CONFIG_JFFS2_FS_DEBUG=0
817# CONFIG_JFFS2_FS_NAND is not set 820CONFIG_JFFS2_FS_WRITEBUFFER=y
818# CONFIG_JFFS2_FS_NOR_ECC is not set
819# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set 821# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
820CONFIG_JFFS2_ZLIB=y 822CONFIG_JFFS2_ZLIB=y
821CONFIG_JFFS2_RTIME=y 823CONFIG_JFFS2_RTIME=y
diff --git a/arch/arm/configs/ixdp2800_defconfig b/arch/arm/configs/ixdp2800_defconfig
index d2bb0b7153fe..261e2343903b 100644
--- a/arch/arm/configs/ixdp2800_defconfig
+++ b/arch/arm/configs/ixdp2800_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.13-rc2 3# Linux kernel version: 2.6.13
4# Thu Jul 7 16:49:20 2005 4# Wed Sep 14 10:52:23 2005
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -136,7 +136,6 @@ CONFIG_PCI_NAMES=y
136# 136#
137# Kernel Features 137# Kernel Features
138# 138#
139# CONFIG_SMP is not set
140# CONFIG_PREEMPT is not set 139# CONFIG_PREEMPT is not set
141# CONFIG_NO_IDLE_HZ is not set 140# CONFIG_NO_IDLE_HZ is not set
142# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set 141# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
@@ -180,6 +179,68 @@ CONFIG_BINFMT_ELF=y
180# CONFIG_PM is not set 179# CONFIG_PM is not set
181 180
182# 181#
182# Networking
183#
184CONFIG_NET=y
185
186#
187# Networking options
188#
189CONFIG_PACKET=y
190CONFIG_PACKET_MMAP=y
191CONFIG_UNIX=y
192# CONFIG_NET_KEY is not set
193CONFIG_INET=y
194# CONFIG_IP_MULTICAST is not set
195# CONFIG_IP_ADVANCED_ROUTER is not set
196CONFIG_IP_FIB_HASH=y
197CONFIG_IP_PNP=y
198CONFIG_IP_PNP_DHCP=y
199CONFIG_IP_PNP_BOOTP=y
200# CONFIG_IP_PNP_RARP is not set
201# CONFIG_NET_IPIP is not set
202# CONFIG_NET_IPGRE is not set
203# CONFIG_ARPD is not set
204CONFIG_SYN_COOKIES=y
205# CONFIG_INET_AH is not set
206# CONFIG_INET_ESP is not set
207# CONFIG_INET_IPCOMP is not set
208# CONFIG_INET_TUNNEL is not set
209# CONFIG_IP_TCPDIAG is not set
210# CONFIG_IP_TCPDIAG_IPV6 is not set
211# CONFIG_TCP_CONG_ADVANCED is not set
212CONFIG_TCP_CONG_BIC=y
213# CONFIG_IPV6 is not set
214# CONFIG_NETFILTER is not set
215
216#
217# SCTP Configuration (EXPERIMENTAL)
218#
219# CONFIG_IP_SCTP is not set
220# CONFIG_ATM is not set
221# CONFIG_BRIDGE is not set
222# CONFIG_VLAN_8021Q is not set
223# CONFIG_DECNET is not set
224# CONFIG_LLC2 is not set
225# CONFIG_IPX is not set
226# CONFIG_ATALK is not set
227# CONFIG_X25 is not set
228# CONFIG_LAPB is not set
229# CONFIG_NET_DIVERT is not set
230# CONFIG_ECONET is not set
231# CONFIG_WAN_ROUTER is not set
232# CONFIG_NET_SCHED is not set
233# CONFIG_NET_CLS_ROUTE is not set
234
235#
236# Network testing
237#
238# CONFIG_NET_PKTGEN is not set
239# CONFIG_HAMRADIO is not set
240# CONFIG_IRDA is not set
241# CONFIG_BT is not set
242
243#
183# Device Drivers 244# Device Drivers
184# 245#
185 246
@@ -249,6 +310,7 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y
249CONFIG_MTD_IXP2000=y 310CONFIG_MTD_IXP2000=y
250# CONFIG_MTD_EDB7312 is not set 311# CONFIG_MTD_EDB7312 is not set
251# CONFIG_MTD_PCI is not set 312# CONFIG_MTD_PCI is not set
313# CONFIG_MTD_PLATRAM is not set
252 314
253# 315#
254# Self-contained MTD device drivers 316# Self-contained MTD device drivers
@@ -335,72 +397,8 @@ CONFIG_IOSCHED_CFQ=y
335# CONFIG_I2O is not set 397# CONFIG_I2O is not set
336 398
337# 399#
338# Networking support 400# Network device support
339#
340CONFIG_NET=y
341
342#
343# Networking options
344#
345CONFIG_PACKET=y
346CONFIG_PACKET_MMAP=y
347CONFIG_UNIX=y
348# CONFIG_NET_KEY is not set
349CONFIG_INET=y
350# CONFIG_IP_MULTICAST is not set
351# CONFIG_IP_ADVANCED_ROUTER is not set
352CONFIG_IP_FIB_HASH=y
353CONFIG_IP_PNP=y
354CONFIG_IP_PNP_DHCP=y
355CONFIG_IP_PNP_BOOTP=y
356# CONFIG_IP_PNP_RARP is not set
357# CONFIG_NET_IPIP is not set
358# CONFIG_NET_IPGRE is not set
359# CONFIG_ARPD is not set
360CONFIG_SYN_COOKIES=y
361# CONFIG_INET_AH is not set
362# CONFIG_INET_ESP is not set
363# CONFIG_INET_IPCOMP is not set
364# CONFIG_INET_TUNNEL is not set
365# CONFIG_IP_TCPDIAG is not set
366# CONFIG_IP_TCPDIAG_IPV6 is not set
367# CONFIG_TCP_CONG_ADVANCED is not set
368CONFIG_TCP_CONG_BIC=y
369# CONFIG_IPV6 is not set
370# CONFIG_NETFILTER is not set
371
372#
373# SCTP Configuration (EXPERIMENTAL)
374#
375# CONFIG_IP_SCTP is not set
376# CONFIG_ATM is not set
377# CONFIG_BRIDGE is not set
378# CONFIG_VLAN_8021Q is not set
379# CONFIG_DECNET is not set
380# CONFIG_LLC2 is not set
381# CONFIG_IPX is not set
382# CONFIG_ATALK is not set
383# CONFIG_X25 is not set
384# CONFIG_LAPB is not set
385# CONFIG_NET_DIVERT is not set
386# CONFIG_ECONET is not set
387# CONFIG_WAN_ROUTER is not set
388
389#
390# QoS and/or fair queueing
391#
392# CONFIG_NET_SCHED is not set
393# CONFIG_NET_CLS_ROUTE is not set
394
395#
396# Network testing
397# 401#
398# CONFIG_NET_PKTGEN is not set
399# CONFIG_NETPOLL is not set
400# CONFIG_NET_POLL_CONTROLLER is not set
401# CONFIG_HAMRADIO is not set
402# CONFIG_IRDA is not set
403# CONFIG_BT is not set
404CONFIG_NETDEVICES=y 402CONFIG_NETDEVICES=y
405CONFIG_DUMMY=y 403CONFIG_DUMMY=y
406# CONFIG_BONDING is not set 404# CONFIG_BONDING is not set
@@ -510,6 +508,8 @@ CONFIG_DLCI_MAX=8
510# CONFIG_SLIP is not set 508# CONFIG_SLIP is not set
511# CONFIG_SHAPER is not set 509# CONFIG_SHAPER is not set
512# CONFIG_NETCONSOLE is not set 510# CONFIG_NETCONSOLE is not set
511# CONFIG_NETPOLL is not set
512# CONFIG_NET_POLL_CONTROLLER is not set
513 513
514# 514#
515# ISDN subsystem 515# ISDN subsystem
@@ -636,7 +636,7 @@ CONFIG_I2C_ALGOBIT=y
636# CONFIG_I2C_I810 is not set 636# CONFIG_I2C_I810 is not set
637# CONFIG_I2C_PIIX4 is not set 637# CONFIG_I2C_PIIX4 is not set
638# CONFIG_I2C_ISA is not set 638# CONFIG_I2C_ISA is not set
639# CONFIG_I2C_IXP2000 is not set 639CONFIG_I2C_IXP2000=y
640# CONFIG_I2C_NFORCE2 is not set 640# CONFIG_I2C_NFORCE2 is not set
641# CONFIG_I2C_PARPORT_LIGHT is not set 641# CONFIG_I2C_PARPORT_LIGHT is not set
642# CONFIG_I2C_PROSAVAGE is not set 642# CONFIG_I2C_PROSAVAGE is not set
@@ -650,11 +650,28 @@ CONFIG_I2C_ALGOBIT=y
650# CONFIG_I2C_VIAPRO is not set 650# CONFIG_I2C_VIAPRO is not set
651# CONFIG_I2C_VOODOO3 is not set 651# CONFIG_I2C_VOODOO3 is not set
652# CONFIG_I2C_PCA_ISA is not set 652# CONFIG_I2C_PCA_ISA is not set
653CONFIG_I2C_SENSOR=y
653 654
654# 655#
655# Hardware Sensors Chip support 656# Miscellaneous I2C Chip support
656# 657#
657CONFIG_I2C_SENSOR=y 658# CONFIG_SENSORS_DS1337 is not set
659# CONFIG_SENSORS_DS1374 is not set
660CONFIG_SENSORS_EEPROM=y
661# CONFIG_SENSORS_PCF8574 is not set
662# CONFIG_SENSORS_PCA9539 is not set
663# CONFIG_SENSORS_PCF8591 is not set
664# CONFIG_SENSORS_RTC8564 is not set
665# CONFIG_SENSORS_MAX6875 is not set
666# CONFIG_I2C_DEBUG_CORE is not set
667# CONFIG_I2C_DEBUG_ALGO is not set
668# CONFIG_I2C_DEBUG_BUS is not set
669# CONFIG_I2C_DEBUG_CHIP is not set
670
671#
672# Hardware Monitoring support
673#
674CONFIG_HWMON=y
658# CONFIG_SENSORS_ADM1021 is not set 675# CONFIG_SENSORS_ADM1021 is not set
659# CONFIG_SENSORS_ADM1025 is not set 676# CONFIG_SENSORS_ADM1025 is not set
660# CONFIG_SENSORS_ADM1026 is not set 677# CONFIG_SENSORS_ADM1026 is not set
@@ -680,30 +697,15 @@ CONFIG_I2C_SENSOR=y
680# CONFIG_SENSORS_LM92 is not set 697# CONFIG_SENSORS_LM92 is not set
681# CONFIG_SENSORS_MAX1619 is not set 698# CONFIG_SENSORS_MAX1619 is not set
682# CONFIG_SENSORS_PC87360 is not set 699# CONFIG_SENSORS_PC87360 is not set
683# CONFIG_SENSORS_SMSC47B397 is not set
684# CONFIG_SENSORS_SIS5595 is not set 700# CONFIG_SENSORS_SIS5595 is not set
685# CONFIG_SENSORS_SMSC47M1 is not set 701# CONFIG_SENSORS_SMSC47M1 is not set
702# CONFIG_SENSORS_SMSC47B397 is not set
686# CONFIG_SENSORS_VIA686A is not set 703# CONFIG_SENSORS_VIA686A is not set
687# CONFIG_SENSORS_W83781D is not set 704# CONFIG_SENSORS_W83781D is not set
688# CONFIG_SENSORS_W83L785TS is not set 705# CONFIG_SENSORS_W83L785TS is not set
689# CONFIG_SENSORS_W83627HF is not set 706# CONFIG_SENSORS_W83627HF is not set
690# CONFIG_SENSORS_W83627EHF is not set 707# CONFIG_SENSORS_W83627EHF is not set
691 708# CONFIG_HWMON_DEBUG_CHIP is not set
692#
693# Other I2C Chip support
694#
695# CONFIG_SENSORS_DS1337 is not set
696# CONFIG_SENSORS_DS1374 is not set
697CONFIG_SENSORS_EEPROM=y
698# CONFIG_SENSORS_PCF8574 is not set
699# CONFIG_SENSORS_PCA9539 is not set
700# CONFIG_SENSORS_PCF8591 is not set
701# CONFIG_SENSORS_RTC8564 is not set
702# CONFIG_SENSORS_MAX6875 is not set
703# CONFIG_I2C_DEBUG_CORE is not set
704# CONFIG_I2C_DEBUG_ALGO is not set
705# CONFIG_I2C_DEBUG_BUS is not set
706# CONFIG_I2C_DEBUG_CHIP is not set
707 709
708# 710#
709# Misc devices 711# Misc devices
@@ -771,6 +773,7 @@ CONFIG_FS_POSIX_ACL=y
771# CONFIG_XFS_FS is not set 773# CONFIG_XFS_FS is not set
772# CONFIG_MINIX_FS is not set 774# CONFIG_MINIX_FS is not set
773# CONFIG_ROMFS_FS is not set 775# CONFIG_ROMFS_FS is not set
776CONFIG_INOTIFY=y
774# CONFIG_QUOTA is not set 777# CONFIG_QUOTA is not set
775CONFIG_DNOTIFY=y 778CONFIG_DNOTIFY=y
776# CONFIG_AUTOFS_FS is not set 779# CONFIG_AUTOFS_FS is not set
@@ -813,8 +816,7 @@ CONFIG_RAMFS=y
813# CONFIG_JFFS_FS is not set 816# CONFIG_JFFS_FS is not set
814CONFIG_JFFS2_FS=y 817CONFIG_JFFS2_FS=y
815CONFIG_JFFS2_FS_DEBUG=0 818CONFIG_JFFS2_FS_DEBUG=0
816# CONFIG_JFFS2_FS_NAND is not set 819CONFIG_JFFS2_FS_WRITEBUFFER=y
817# CONFIG_JFFS2_FS_NOR_ECC is not set
818# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set 820# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
819CONFIG_JFFS2_ZLIB=y 821CONFIG_JFFS2_ZLIB=y
820CONFIG_JFFS2_RTIME=y 822CONFIG_JFFS2_RTIME=y
diff --git a/arch/arm/configs/ixdp2801_defconfig b/arch/arm/configs/ixdp2801_defconfig
index 2d6f960e3395..12ef23d1c016 100644
--- a/arch/arm/configs/ixdp2801_defconfig
+++ b/arch/arm/configs/ixdp2801_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.13-rc2 3# Linux kernel version: 2.6.13
4# Thu Jul 7 16:49:13 2005 4# Wed Sep 14 10:52:16 2005
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -136,7 +136,6 @@ CONFIG_PCI_NAMES=y
136# 136#
137# Kernel Features 137# Kernel Features
138# 138#
139# CONFIG_SMP is not set
140# CONFIG_PREEMPT is not set 139# CONFIG_PREEMPT is not set
141# CONFIG_NO_IDLE_HZ is not set 140# CONFIG_NO_IDLE_HZ is not set
142# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set 141# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
@@ -180,6 +179,68 @@ CONFIG_BINFMT_ELF=y
180# CONFIG_PM is not set 179# CONFIG_PM is not set
181 180
182# 181#
182# Networking
183#
184CONFIG_NET=y
185
186#
187# Networking options
188#
189CONFIG_PACKET=y
190CONFIG_PACKET_MMAP=y
191CONFIG_UNIX=y
192# CONFIG_NET_KEY is not set
193CONFIG_INET=y
194# CONFIG_IP_MULTICAST is not set
195# CONFIG_IP_ADVANCED_ROUTER is not set
196CONFIG_IP_FIB_HASH=y
197CONFIG_IP_PNP=y
198CONFIG_IP_PNP_DHCP=y
199CONFIG_IP_PNP_BOOTP=y
200# CONFIG_IP_PNP_RARP is not set
201# CONFIG_NET_IPIP is not set
202# CONFIG_NET_IPGRE is not set
203# CONFIG_ARPD is not set
204CONFIG_SYN_COOKIES=y
205# CONFIG_INET_AH is not set
206# CONFIG_INET_ESP is not set
207# CONFIG_INET_IPCOMP is not set
208# CONFIG_INET_TUNNEL is not set
209# CONFIG_IP_TCPDIAG is not set
210# CONFIG_IP_TCPDIAG_IPV6 is not set
211# CONFIG_TCP_CONG_ADVANCED is not set
212CONFIG_TCP_CONG_BIC=y
213# CONFIG_IPV6 is not set
214# CONFIG_NETFILTER is not set
215
216#
217# SCTP Configuration (EXPERIMENTAL)
218#
219# CONFIG_IP_SCTP is not set
220# CONFIG_ATM is not set
221# CONFIG_BRIDGE is not set
222# CONFIG_VLAN_8021Q is not set
223# CONFIG_DECNET is not set
224# CONFIG_LLC2 is not set
225# CONFIG_IPX is not set
226# CONFIG_ATALK is not set
227# CONFIG_X25 is not set
228# CONFIG_LAPB is not set
229# CONFIG_NET_DIVERT is not set
230# CONFIG_ECONET is not set
231# CONFIG_WAN_ROUTER is not set
232# CONFIG_NET_SCHED is not set
233# CONFIG_NET_CLS_ROUTE is not set
234
235#
236# Network testing
237#
238# CONFIG_NET_PKTGEN is not set
239# CONFIG_HAMRADIO is not set
240# CONFIG_IRDA is not set
241# CONFIG_BT is not set
242
243#
183# Device Drivers 244# Device Drivers
184# 245#
185 246
@@ -249,6 +310,7 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y
249CONFIG_MTD_IXP2000=y 310CONFIG_MTD_IXP2000=y
250# CONFIG_MTD_EDB7312 is not set 311# CONFIG_MTD_EDB7312 is not set
251# CONFIG_MTD_PCI is not set 312# CONFIG_MTD_PCI is not set
313# CONFIG_MTD_PLATRAM is not set
252 314
253# 315#
254# Self-contained MTD device drivers 316# Self-contained MTD device drivers
@@ -335,72 +397,8 @@ CONFIG_IOSCHED_CFQ=y
335# CONFIG_I2O is not set 397# CONFIG_I2O is not set
336 398
337# 399#
338# Networking support 400# Network device support
339#
340CONFIG_NET=y
341
342#
343# Networking options
344#
345CONFIG_PACKET=y
346CONFIG_PACKET_MMAP=y
347CONFIG_UNIX=y
348# CONFIG_NET_KEY is not set
349CONFIG_INET=y
350# CONFIG_IP_MULTICAST is not set
351# CONFIG_IP_ADVANCED_ROUTER is not set
352CONFIG_IP_FIB_HASH=y
353CONFIG_IP_PNP=y
354CONFIG_IP_PNP_DHCP=y
355CONFIG_IP_PNP_BOOTP=y
356# CONFIG_IP_PNP_RARP is not set
357# CONFIG_NET_IPIP is not set
358# CONFIG_NET_IPGRE is not set
359# CONFIG_ARPD is not set
360CONFIG_SYN_COOKIES=y
361# CONFIG_INET_AH is not set
362# CONFIG_INET_ESP is not set
363# CONFIG_INET_IPCOMP is not set
364# CONFIG_INET_TUNNEL is not set
365# CONFIG_IP_TCPDIAG is not set
366# CONFIG_IP_TCPDIAG_IPV6 is not set
367# CONFIG_TCP_CONG_ADVANCED is not set
368CONFIG_TCP_CONG_BIC=y
369# CONFIG_IPV6 is not set
370# CONFIG_NETFILTER is not set
371
372#
373# SCTP Configuration (EXPERIMENTAL)
374#
375# CONFIG_IP_SCTP is not set
376# CONFIG_ATM is not set
377# CONFIG_BRIDGE is not set
378# CONFIG_VLAN_8021Q is not set
379# CONFIG_DECNET is not set
380# CONFIG_LLC2 is not set
381# CONFIG_IPX is not set
382# CONFIG_ATALK is not set
383# CONFIG_X25 is not set
384# CONFIG_LAPB is not set
385# CONFIG_NET_DIVERT is not set
386# CONFIG_ECONET is not set
387# CONFIG_WAN_ROUTER is not set
388
389#
390# QoS and/or fair queueing
391#
392# CONFIG_NET_SCHED is not set
393# CONFIG_NET_CLS_ROUTE is not set
394
395#
396# Network testing
397# 401#
398# CONFIG_NET_PKTGEN is not set
399# CONFIG_NETPOLL is not set
400# CONFIG_NET_POLL_CONTROLLER is not set
401# CONFIG_HAMRADIO is not set
402# CONFIG_IRDA is not set
403# CONFIG_BT is not set
404CONFIG_NETDEVICES=y 402CONFIG_NETDEVICES=y
405CONFIG_DUMMY=y 403CONFIG_DUMMY=y
406# CONFIG_BONDING is not set 404# CONFIG_BONDING is not set
@@ -511,6 +509,8 @@ CONFIG_DLCI_MAX=8
511# CONFIG_SLIP is not set 509# CONFIG_SLIP is not set
512# CONFIG_SHAPER is not set 510# CONFIG_SHAPER is not set
513# CONFIG_NETCONSOLE is not set 511# CONFIG_NETCONSOLE is not set
512# CONFIG_NETPOLL is not set
513# CONFIG_NET_POLL_CONTROLLER is not set
514 514
515# 515#
516# ISDN subsystem 516# ISDN subsystem
@@ -637,7 +637,7 @@ CONFIG_I2C_ALGOBIT=y
637# CONFIG_I2C_I810 is not set 637# CONFIG_I2C_I810 is not set
638# CONFIG_I2C_PIIX4 is not set 638# CONFIG_I2C_PIIX4 is not set
639# CONFIG_I2C_ISA is not set 639# CONFIG_I2C_ISA is not set
640# CONFIG_I2C_IXP2000 is not set 640CONFIG_I2C_IXP2000=y
641# CONFIG_I2C_NFORCE2 is not set 641# CONFIG_I2C_NFORCE2 is not set
642# CONFIG_I2C_PARPORT_LIGHT is not set 642# CONFIG_I2C_PARPORT_LIGHT is not set
643# CONFIG_I2C_PROSAVAGE is not set 643# CONFIG_I2C_PROSAVAGE is not set
@@ -651,11 +651,28 @@ CONFIG_I2C_ALGOBIT=y
651# CONFIG_I2C_VIAPRO is not set 651# CONFIG_I2C_VIAPRO is not set
652# CONFIG_I2C_VOODOO3 is not set 652# CONFIG_I2C_VOODOO3 is not set
653# CONFIG_I2C_PCA_ISA is not set 653# CONFIG_I2C_PCA_ISA is not set
654CONFIG_I2C_SENSOR=y
654 655
655# 656#
656# Hardware Sensors Chip support 657# Miscellaneous I2C Chip support
657# 658#
658CONFIG_I2C_SENSOR=y 659# CONFIG_SENSORS_DS1337 is not set
660# CONFIG_SENSORS_DS1374 is not set
661CONFIG_SENSORS_EEPROM=y
662# CONFIG_SENSORS_PCF8574 is not set
663# CONFIG_SENSORS_PCA9539 is not set
664# CONFIG_SENSORS_PCF8591 is not set
665# CONFIG_SENSORS_RTC8564 is not set
666# CONFIG_SENSORS_MAX6875 is not set
667# CONFIG_I2C_DEBUG_CORE is not set
668# CONFIG_I2C_DEBUG_ALGO is not set
669# CONFIG_I2C_DEBUG_BUS is not set
670# CONFIG_I2C_DEBUG_CHIP is not set
671
672#
673# Hardware Monitoring support
674#
675CONFIG_HWMON=y
659# CONFIG_SENSORS_ADM1021 is not set 676# CONFIG_SENSORS_ADM1021 is not set
660# CONFIG_SENSORS_ADM1025 is not set 677# CONFIG_SENSORS_ADM1025 is not set
661# CONFIG_SENSORS_ADM1026 is not set 678# CONFIG_SENSORS_ADM1026 is not set
@@ -681,30 +698,15 @@ CONFIG_I2C_SENSOR=y
681# CONFIG_SENSORS_LM92 is not set 698# CONFIG_SENSORS_LM92 is not set
682# CONFIG_SENSORS_MAX1619 is not set 699# CONFIG_SENSORS_MAX1619 is not set
683# CONFIG_SENSORS_PC87360 is not set 700# CONFIG_SENSORS_PC87360 is not set
684# CONFIG_SENSORS_SMSC47B397 is not set
685# CONFIG_SENSORS_SIS5595 is not set 701# CONFIG_SENSORS_SIS5595 is not set
686# CONFIG_SENSORS_SMSC47M1 is not set 702# CONFIG_SENSORS_SMSC47M1 is not set
703# CONFIG_SENSORS_SMSC47B397 is not set
687# CONFIG_SENSORS_VIA686A is not set 704# CONFIG_SENSORS_VIA686A is not set
688# CONFIG_SENSORS_W83781D is not set 705# CONFIG_SENSORS_W83781D is not set
689# CONFIG_SENSORS_W83L785TS is not set 706# CONFIG_SENSORS_W83L785TS is not set
690# CONFIG_SENSORS_W83627HF is not set 707# CONFIG_SENSORS_W83627HF is not set
691# CONFIG_SENSORS_W83627EHF is not set 708# CONFIG_SENSORS_W83627EHF is not set
692 709# CONFIG_HWMON_DEBUG_CHIP is not set
693#
694# Other I2C Chip support
695#
696# CONFIG_SENSORS_DS1337 is not set
697# CONFIG_SENSORS_DS1374 is not set
698CONFIG_SENSORS_EEPROM=y
699# CONFIG_SENSORS_PCF8574 is not set
700# CONFIG_SENSORS_PCA9539 is not set
701# CONFIG_SENSORS_PCF8591 is not set
702# CONFIG_SENSORS_RTC8564 is not set
703# CONFIG_SENSORS_MAX6875 is not set
704# CONFIG_I2C_DEBUG_CORE is not set
705# CONFIG_I2C_DEBUG_ALGO is not set
706# CONFIG_I2C_DEBUG_BUS is not set
707# CONFIG_I2C_DEBUG_CHIP is not set
708 710
709# 711#
710# Misc devices 712# Misc devices
@@ -772,6 +774,7 @@ CONFIG_FS_POSIX_ACL=y
772# CONFIG_XFS_FS is not set 774# CONFIG_XFS_FS is not set
773# CONFIG_MINIX_FS is not set 775# CONFIG_MINIX_FS is not set
774# CONFIG_ROMFS_FS is not set 776# CONFIG_ROMFS_FS is not set
777CONFIG_INOTIFY=y
775# CONFIG_QUOTA is not set 778# CONFIG_QUOTA is not set
776CONFIG_DNOTIFY=y 779CONFIG_DNOTIFY=y
777# CONFIG_AUTOFS_FS is not set 780# CONFIG_AUTOFS_FS is not set
@@ -814,8 +817,7 @@ CONFIG_RAMFS=y
814# CONFIG_JFFS_FS is not set 817# CONFIG_JFFS_FS is not set
815CONFIG_JFFS2_FS=y 818CONFIG_JFFS2_FS=y
816CONFIG_JFFS2_FS_DEBUG=0 819CONFIG_JFFS2_FS_DEBUG=0
817# CONFIG_JFFS2_FS_NAND is not set 820CONFIG_JFFS2_FS_WRITEBUFFER=y
818# CONFIG_JFFS2_FS_NOR_ECC is not set
819# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set 821# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
820CONFIG_JFFS2_ZLIB=y 822CONFIG_JFFS2_ZLIB=y
821CONFIG_JFFS2_RTIME=y 823CONFIG_JFFS2_RTIME=y
diff --git a/arch/arm/kernel/semaphore.c b/arch/arm/kernel/semaphore.c
index ac423e3e224b..4c31f2923055 100644
--- a/arch/arm/kernel/semaphore.c
+++ b/arch/arm/kernel/semaphore.c
@@ -178,7 +178,7 @@ int __down_trylock(struct semaphore * sem)
178 * registers (r0 to r3 and lr), but not ip, as we use it as a return 178 * registers (r0 to r3 and lr), but not ip, as we use it as a return
179 * value in some cases.. 179 * value in some cases..
180 */ 180 */
181asm(" .section .sched.text,\"ax\" \n\ 181asm(" .section .sched.text,\"ax\",%progbits \n\
182 .align 5 \n\ 182 .align 5 \n\
183 .globl __down_failed \n\ 183 .globl __down_failed \n\
184__down_failed: \n\ 184__down_failed: \n\
diff --git a/arch/arm/mach-ixp4xx/ixdp425-setup.c b/arch/arm/mach-ixp4xx/ixdp425-setup.c
index ae1fa099d5fa..39b06ed80646 100644
--- a/arch/arm/mach-ixp4xx/ixdp425-setup.c
+++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c
@@ -123,6 +123,7 @@ static void __init ixdp425_init(void)
123 platform_add_devices(ixdp425_devices, ARRAY_SIZE(ixdp425_devices)); 123 platform_add_devices(ixdp425_devices, ARRAY_SIZE(ixdp425_devices));
124} 124}
125 125
126#ifdef CONFIG_ARCH_IXDP465
126MACHINE_START(IXDP425, "Intel IXDP425 Development Platform") 127MACHINE_START(IXDP425, "Intel IXDP425 Development Platform")
127 /* Maintainer: MontaVista Software, Inc. */ 128 /* Maintainer: MontaVista Software, Inc. */
128 .phys_ram = PHYS_OFFSET, 129 .phys_ram = PHYS_OFFSET,
@@ -134,7 +135,9 @@ MACHINE_START(IXDP425, "Intel IXDP425 Development Platform")
134 .boot_params = 0x0100, 135 .boot_params = 0x0100,
135 .init_machine = ixdp425_init, 136 .init_machine = ixdp425_init,
136MACHINE_END 137MACHINE_END
138#endif
137 139
140#ifdef CONFIG_MACH_IXDP465
138MACHINE_START(IXDP465, "Intel IXDP465 Development Platform") 141MACHINE_START(IXDP465, "Intel IXDP465 Development Platform")
139 /* Maintainer: MontaVista Software, Inc. */ 142 /* Maintainer: MontaVista Software, Inc. */
140 .phys_ram = PHYS_OFFSET, 143 .phys_ram = PHYS_OFFSET,
@@ -146,7 +149,9 @@ MACHINE_START(IXDP465, "Intel IXDP465 Development Platform")
146 .boot_params = 0x0100, 149 .boot_params = 0x0100,
147 .init_machine = ixdp425_init, 150 .init_machine = ixdp425_init,
148MACHINE_END 151MACHINE_END
152#endif
149 153
154#ifdef CONFIG_ARCH_PRPMC1100
150MACHINE_START(IXCDP1100, "Intel IXCDP1100 Development Platform") 155MACHINE_START(IXCDP1100, "Intel IXCDP1100 Development Platform")
151 /* Maintainer: MontaVista Software, Inc. */ 156 /* Maintainer: MontaVista Software, Inc. */
152 .phys_ram = PHYS_OFFSET, 157 .phys_ram = PHYS_OFFSET,
@@ -158,6 +163,7 @@ MACHINE_START(IXCDP1100, "Intel IXCDP1100 Development Platform")
158 .boot_params = 0x0100, 163 .boot_params = 0x0100,
159 .init_machine = ixdp425_init, 164 .init_machine = ixdp425_init,
160MACHINE_END 165MACHINE_END
166#endif
161 167
162/* 168/*
163 * Avila is functionally equivalent to IXDP425 except that it adds 169 * Avila is functionally equivalent to IXDP425 except that it adds
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
index 426c2bc517eb..be37586cb1b0 100644
--- a/arch/arm/mach-pxa/corgi.c
+++ b/arch/arm/mach-pxa/corgi.c
@@ -198,13 +198,10 @@ static void corgi_mci_setpower(struct device *dev, unsigned int vdd)
198{ 198{
199 struct pxamci_platform_data* p_d = dev->platform_data; 199 struct pxamci_platform_data* p_d = dev->platform_data;
200 200
201 if (( 1 << vdd) & p_d->ocr_mask) { 201 if (( 1 << vdd) & p_d->ocr_mask)
202 printk(KERN_DEBUG "%s: on\n", __FUNCTION__);
203 GPSR1 = GPIO_bit(CORGI_GPIO_SD_PWR); 202 GPSR1 = GPIO_bit(CORGI_GPIO_SD_PWR);
204 } else { 203 else
205 printk(KERN_DEBUG "%s: off\n", __FUNCTION__);
206 GPCR1 = GPIO_bit(CORGI_GPIO_SD_PWR); 204 GPCR1 = GPIO_bit(CORGI_GPIO_SD_PWR);
207 }
208} 205}
209 206
210static int corgi_mci_get_ro(struct device *dev) 207static int corgi_mci_get_ro(struct device *dev)
@@ -259,6 +256,16 @@ static struct platform_device *devices[] __initdata = {
259 256
260static void __init corgi_init(void) 257static void __init corgi_init(void)
261{ 258{
259 /* setup sleep mode values */
260 PWER = 0x00000002;
261 PFER = 0x00000000;
262 PRER = 0x00000002;
263 PGSR0 = 0x0158C000;
264 PGSR1 = 0x00FF0080;
265 PGSR2 = 0x0001C004;
266 /* Stop 3.6MHz and drive HIGH to PCMCIA and CS */
267 PCFR |= PCFR_OPDE;
268
262 corgi_ssp_set_machinfo(&corgi_ssp_machinfo); 269 corgi_ssp_set_machinfo(&corgi_ssp_machinfo);
263 270
264 pxa_gpio_mode(CORGI_GPIO_USB_PULLUP | GPIO_OUT); 271 pxa_gpio_mode(CORGI_GPIO_USB_PULLUP | GPIO_OUT);
@@ -285,42 +292,14 @@ static void __init fixup_corgi(struct machine_desc *desc,
285 mi->bank[0].size = (64*1024*1024); 292 mi->bank[0].size = (64*1024*1024);
286} 293}
287 294
288static void __init corgi_init_irq(void)
289{
290 pxa_init_irq();
291}
292
293static struct map_desc corgi_io_desc[] __initdata = {
294/* virtual physical length */
295/* { 0xf1000000, 0x08000000, 0x01000000, MT_DEVICE },*/ /* LCDC (readable for Qt driver) */
296/* { 0xef700000, 0x10800000, 0x00001000, MT_DEVICE },*/ /* SCOOP */
297 { 0xef800000, 0x00000000, 0x00800000, MT_DEVICE }, /* Boot Flash */
298};
299
300static void __init corgi_map_io(void)
301{
302 pxa_map_io();
303 iotable_init(corgi_io_desc,ARRAY_SIZE(corgi_io_desc));
304
305 /* setup sleep mode values */
306 PWER = 0x00000002;
307 PFER = 0x00000000;
308 PRER = 0x00000002;
309 PGSR0 = 0x0158C000;
310 PGSR1 = 0x00FF0080;
311 PGSR2 = 0x0001C004;
312 /* Stop 3.6MHz and drive HIGH to PCMCIA and CS */
313 PCFR |= PCFR_OPDE;
314}
315
316#ifdef CONFIG_MACH_CORGI 295#ifdef CONFIG_MACH_CORGI
317MACHINE_START(CORGI, "SHARP Corgi") 296MACHINE_START(CORGI, "SHARP Corgi")
318 .phys_ram = 0xa0000000, 297 .phys_ram = 0xa0000000,
319 .phys_io = 0x40000000, 298 .phys_io = 0x40000000,
320 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, 299 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
321 .fixup = fixup_corgi, 300 .fixup = fixup_corgi,
322 .map_io = corgi_map_io, 301 .map_io = pxa_map_io,
323 .init_irq = corgi_init_irq, 302 .init_irq = pxa_init_irq,
324 .init_machine = corgi_init, 303 .init_machine = corgi_init,
325 .timer = &pxa_timer, 304 .timer = &pxa_timer,
326MACHINE_END 305MACHINE_END
@@ -332,8 +311,8 @@ MACHINE_START(SHEPHERD, "SHARP Shepherd")
332 .phys_io = 0x40000000, 311 .phys_io = 0x40000000,
333 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, 312 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
334 .fixup = fixup_corgi, 313 .fixup = fixup_corgi,
335 .map_io = corgi_map_io, 314 .map_io = pxa_map_io,
336 .init_irq = corgi_init_irq, 315 .init_irq = pxa_init_irq,
337 .init_machine = corgi_init, 316 .init_machine = corgi_init,
338 .timer = &pxa_timer, 317 .timer = &pxa_timer,
339MACHINE_END 318MACHINE_END
@@ -345,8 +324,8 @@ MACHINE_START(HUSKY, "SHARP Husky")
345 .phys_io = 0x40000000, 324 .phys_io = 0x40000000,
346 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, 325 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
347 .fixup = fixup_corgi, 326 .fixup = fixup_corgi,
348 .map_io = corgi_map_io, 327 .map_io = pxa_map_io,
349 .init_irq = corgi_init_irq, 328 .init_irq = pxa_init_irq,
350 .init_machine = corgi_init, 329 .init_machine = corgi_init,
351 .timer = &pxa_timer, 330 .timer = &pxa_timer,
352MACHINE_END 331MACHINE_END
diff --git a/arch/arm/mach-pxa/poodle.c b/arch/arm/mach-pxa/poodle.c
index 47cfb8bb8318..f25638810017 100644
--- a/arch/arm/mach-pxa/poodle.c
+++ b/arch/arm/mach-pxa/poodle.c
@@ -30,6 +30,8 @@
30 30
31#include <asm/arch/pxa-regs.h> 31#include <asm/arch/pxa-regs.h>
32#include <asm/arch/irq.h> 32#include <asm/arch/irq.h>
33#include <asm/arch/mmc.h>
34#include <asm/arch/udc.h>
33#include <asm/arch/poodle.h> 35#include <asm/arch/poodle.h>
34#include <asm/arch/pxafb.h> 36#include <asm/arch/pxafb.h>
35 37
@@ -93,6 +95,83 @@ static struct platform_device locomo_device = {
93 .resource = locomo_resources, 95 .resource = locomo_resources,
94}; 96};
95 97
98
99/*
100 * MMC/SD Device
101 *
102 * The card detect interrupt isn't debounced so we delay it by 250ms
103 * to give the card a chance to fully insert/eject.
104 */
105static struct pxamci_platform_data poodle_mci_platform_data;
106
107static int poodle_mci_init(struct device *dev, irqreturn_t (*poodle_detect_int)(int, void *, struct pt_regs *), void *data)
108{
109 int err;
110
111 /* setup GPIO for PXA25x MMC controller */
112 pxa_gpio_mode(GPIO6_MMCCLK_MD);
113 pxa_gpio_mode(GPIO8_MMCCS0_MD);
114 pxa_gpio_mode(POODLE_GPIO_nSD_DETECT | GPIO_IN);
115 pxa_gpio_mode(POODLE_GPIO_SD_PWR | GPIO_OUT);
116
117 poodle_mci_platform_data.detect_delay = msecs_to_jiffies(250);
118
119 err = request_irq(POODLE_IRQ_GPIO_nSD_DETECT, poodle_detect_int, SA_INTERRUPT,
120 "MMC card detect", data);
121 if (err) {
122 printk(KERN_ERR "poodle_mci_init: MMC/SD: can't request MMC card detect IRQ\n");
123 return -1;
124 }
125
126 set_irq_type(POODLE_IRQ_GPIO_nSD_DETECT, IRQT_BOTHEDGE);
127
128 return 0;
129}
130
131static void poodle_mci_setpower(struct device *dev, unsigned int vdd)
132{
133 struct pxamci_platform_data* p_d = dev->platform_data;
134
135 if (( 1 << vdd) & p_d->ocr_mask)
136 GPSR1 = GPIO_bit(POODLE_GPIO_SD_PWR);
137 else
138 GPCR1 = GPIO_bit(POODLE_GPIO_SD_PWR);
139}
140
141static void poodle_mci_exit(struct device *dev, void *data)
142{
143 free_irq(POODLE_IRQ_GPIO_nSD_DETECT, data);
144}
145
146static struct pxamci_platform_data poodle_mci_platform_data = {
147 .ocr_mask = MMC_VDD_32_33|MMC_VDD_33_34,
148 .init = poodle_mci_init,
149 .setpower = poodle_mci_setpower,
150 .exit = poodle_mci_exit,
151};
152
153
154/*
155 * USB Device Controller
156 */
157static void poodle_udc_command(int cmd)
158{
159 switch(cmd) {
160 case PXA2XX_UDC_CMD_CONNECT:
161 GPSR(POODLE_GPIO_USB_PULLUP) = GPIO_bit(POODLE_GPIO_USB_PULLUP);
162 break;
163 case PXA2XX_UDC_CMD_DISCONNECT:
164 GPCR(POODLE_GPIO_USB_PULLUP) = GPIO_bit(POODLE_GPIO_USB_PULLUP);
165 break;
166 }
167}
168
169static struct pxa2xx_udc_mach_info udc_info __initdata = {
170 /* no connect GPIO; poodle can't tell connection status */
171 .udc_command = poodle_udc_command,
172};
173
174
96/* PXAFB device */ 175/* PXAFB device */
97static struct pxafb_mach_info poodle_fb_info __initdata = { 176static struct pxafb_mach_info poodle_fb_info __initdata = {
98 .pixclock = 144700, 177 .pixclock = 144700,
@@ -126,6 +205,15 @@ static void __init poodle_init(void)
126{ 205{
127 int ret = 0; 206 int ret = 0;
128 207
208 /* setup sleep mode values */
209 PWER = 0x00000002;
210 PFER = 0x00000000;
211 PRER = 0x00000002;
212 PGSR0 = 0x00008000;
213 PGSR1 = 0x003F0202;
214 PGSR2 = 0x0001C000;
215 PCFR |= PCFR_OPDE;
216
129 /* cpu initialize */ 217 /* cpu initialize */
130 /* Pgsr Register */ 218 /* Pgsr Register */
131 PGSR0 = 0x0146dd80; 219 PGSR0 = 0x0146dd80;
@@ -155,6 +243,9 @@ static void __init poodle_init(void)
155 GPSR2 = 0x00000000; 243 GPSR2 = 0x00000000;
156 244
157 set_pxa_fb_info(&poodle_fb_info); 245 set_pxa_fb_info(&poodle_fb_info);
246 pxa_gpio_mode(POODLE_GPIO_USB_PULLUP | GPIO_OUT);
247 pxa_set_udc_info(&udc_info);
248 pxa_set_mci_info(&poodle_mci_platform_data);
158 249
159 scoop_num = 1; 250 scoop_num = 1;
160 scoop_devs = &poodle_pcmcia_scoop[0]; 251 scoop_devs = &poodle_pcmcia_scoop[0];
@@ -171,32 +262,12 @@ static void __init fixup_poodle(struct machine_desc *desc,
171 sharpsl_save_param(); 262 sharpsl_save_param();
172} 263}
173 264
174static struct map_desc poodle_io_desc[] __initdata = {
175 /* virtual physical length */
176 { 0xef800000, 0x00000000, 0x00800000, MT_DEVICE }, /* Boot Flash */
177};
178
179static void __init poodle_map_io(void)
180{
181 pxa_map_io();
182 iotable_init(poodle_io_desc, ARRAY_SIZE(poodle_io_desc));
183
184 /* setup sleep mode values */
185 PWER = 0x00000002;
186 PFER = 0x00000000;
187 PRER = 0x00000002;
188 PGSR0 = 0x00008000;
189 PGSR1 = 0x003F0202;
190 PGSR2 = 0x0001C000;
191 PCFR |= PCFR_OPDE;
192}
193
194MACHINE_START(POODLE, "SHARP Poodle") 265MACHINE_START(POODLE, "SHARP Poodle")
195 .phys_ram = 0xa0000000, 266 .phys_ram = 0xa0000000,
196 .phys_io = 0x40000000, 267 .phys_io = 0x40000000,
197 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc, 268 .io_pg_offst = (io_p2v(0x40000000) >> 18) & 0xfffc,
198 .fixup = fixup_poodle, 269 .fixup = fixup_poodle,
199 .map_io = poodle_map_io, 270 .map_io = pxa_map_io,
200 .init_irq = pxa_init_irq, 271 .init_irq = pxa_init_irq,
201 .timer = &pxa_timer, 272 .timer = &pxa_timer,
202 .init_machine = poodle_init, 273 .init_machine = poodle_init,
diff --git a/arch/arm/mach-sa1100/collie.c b/arch/arm/mach-sa1100/collie.c
index 8cb69113a57c..25d6a4e27533 100644
--- a/arch/arm/mach-sa1100/collie.c
+++ b/arch/arm/mach-sa1100/collie.c
@@ -111,12 +111,11 @@ static struct mtd_partition collie_partitions[] = {
111 111
112static void collie_set_vpp(int vpp) 112static void collie_set_vpp(int vpp)
113{ 113{
114 write_scoop_reg(SCOOP_GPCR, read_scoop_reg(SCOOP_GPCR) | COLLIE_SCP_VPEN); 114 write_scoop_reg(&colliescoop_device.dev, SCOOP_GPCR, read_scoop_reg(SCOOP_GPCR) | COLLIE_SCP_VPEN);
115 if (vpp) { 115 if (vpp)
116 write_scoop_reg(SCOOP_GPWR, read_scoop_reg(SCOOP_GPWR) | COLLIE_SCP_VPEN); 116 write_scoop_reg(&colliescoop_device.dev, SCOOP_GPWR, read_scoop_reg(SCOOP_GPWR) | COLLIE_SCP_VPEN);
117 } else { 117 else
118 write_scoop_reg(SCOOP_GPWR, read_scoop_reg(SCOOP_GPWR) & ~COLLIE_SCP_VPEN); 118 write_scoop_reg(&colliescoop_device.dev, SCOOP_GPWR, read_scoop_reg(SCOOP_GPWR) & ~COLLIE_SCP_VPEN);
119 }
120} 119}
121 120
122static struct flash_platform_data collie_flash_data = { 121static struct flash_platform_data collie_flash_data = {
diff --git a/arch/arm/mach-sa1100/generic.h b/arch/arm/mach-sa1100/generic.h
index 279e3afa3c39..f085d68e568e 100644
--- a/arch/arm/mach-sa1100/generic.h
+++ b/arch/arm/mach-sa1100/generic.h
@@ -39,3 +39,6 @@ extern void sa11x0_set_ssp_data(struct sa11x0_ssp_plat_ops *ops);
39 39
40struct irda_platform_data; 40struct irda_platform_data;
41void sa11x0_set_irda_data(struct irda_platform_data *irda); 41void sa11x0_set_irda_data(struct irda_platform_data *irda);
42
43struct mcp_plat_data;
44void sa11x0_set_mcp_data(struct mcp_plat_data *data);
diff --git a/arch/arm26/boot/compressed/hw-bse.c b/arch/arm26/boot/compressed/hw-bse.c
deleted file mode 100644
index 3e8f07f8e08a..000000000000
--- a/arch/arm26/boot/compressed/hw-bse.c
+++ /dev/null
@@ -1,74 +0,0 @@
1/*
2 * Bright Star Engineering Inc.
3 *
4 * code for readng parameters from the
5 * parameter blocks of the boot block
6 * flash memory
7 *
8 */
9
10static int strcmp(const char *s1, const char *s2)
11{
12 while (*s1 != '\0' && *s1 == *s2)
13 {
14 s1++;
15 s2++;
16 }
17
18 return (*(unsigned char *) s1) - (*(unsigned char *) s2);
19}
20
21struct pblk_t {
22 char type;
23 unsigned short size;
24};
25
26static char *bse_getflashparam(char *name) {
27 unsigned int esize;
28 char *q,*r;
29 unsigned char *p,*e;
30 struct pblk_t *thepb = (struct pblk_t *) 0x00004000;
31 struct pblk_t *altpb = (struct pblk_t *) 0x00006000;
32 if (thepb->type&1) {
33 if (altpb->type&1) {
34 /* no valid param block */
35 return (char*)0;
36 } else {
37 /* altpb is valid */
38 struct pblk_t *tmp;
39 tmp = thepb;
40 thepb = altpb;
41 altpb = tmp;
42 }
43 }
44 p = (char*)thepb + sizeof(struct pblk_t);
45 e = p + thepb->size;
46 while (p < e) {
47 q = p;
48 esize = *p;
49 if (esize == 0xFF) break;
50 if (esize == 0) break;
51 if (esize > 127) {
52 esize = (esize&0x7F)<<8 | p[1];
53 q++;
54 }
55 q++;
56 r=q;
57 if (*r && ((name == 0) || (!strcmp(name,r)))) {
58 while (*q++) ;
59 return q;
60 }
61 p+=esize;
62 }
63 return (char*)0;
64}
65
66void bse_setup(void) {
67 /* extract the linux cmdline from flash */
68 char *name=bse_getflashparam("linuxboot");
69 char *x = (char *)0xc0000100;
70 if (name) {
71 while (*name) *x++=*name++;
72 }
73 *x=0;
74}
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c
index 28a4529fdd60..7e926471e4ec 100644
--- a/arch/ia64/kernel/acpi.c
+++ b/arch/ia64/kernel/acpi.c
@@ -899,7 +899,7 @@ int acpi_register_ioapic(acpi_handle handle, u64 phys_addr, u32 gsi_base)
899 if ((err = iosapic_init(phys_addr, gsi_base))) 899 if ((err = iosapic_init(phys_addr, gsi_base)))
900 return err; 900 return err;
901 901
902#if CONFIG_ACPI_NUMA 902#ifdef CONFIG_ACPI_NUMA
903 acpi_map_iosapic(handle, 0, NULL, NULL); 903 acpi_map_iosapic(handle, 0, NULL, NULL);
904#endif /* CONFIG_ACPI_NUMA */ 904#endif /* CONFIG_ACPI_NUMA */
905 905
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S
index ba0b6a1f429f..0741b066b98f 100644
--- a/arch/ia64/kernel/entry.S
+++ b/arch/ia64/kernel/entry.S
@@ -491,7 +491,7 @@ GLOBAL_ENTRY(prefetch_stack)
491 ;; 491 ;;
492 lfetch.fault [r16], 128 492 lfetch.fault [r16], 128
493 br.ret.sptk.many rp 493 br.ret.sptk.many rp
494END(prefetch_switch_stack) 494END(prefetch_stack)
495 495
496GLOBAL_ENTRY(execve) 496GLOBAL_ENTRY(execve)
497 mov r15=__NR_execve // put syscall number in place 497 mov r15=__NR_execve // put syscall number in place
diff --git a/arch/ia64/kernel/mca_drv.c b/arch/ia64/kernel/mca_drv.c
index 6e683745af49..80f83d6cdbfc 100644
--- a/arch/ia64/kernel/mca_drv.c
+++ b/arch/ia64/kernel/mca_drv.c
@@ -84,23 +84,23 @@ mca_page_isolate(unsigned long paddr)
84 struct page *p; 84 struct page *p;
85 85
86 /* whether physical address is valid or not */ 86 /* whether physical address is valid or not */
87 if ( !ia64_phys_addr_valid(paddr) ) 87 if (!ia64_phys_addr_valid(paddr))
88 return ISOLATE_NG; 88 return ISOLATE_NG;
89 89
90 /* convert physical address to physical page number */ 90 /* convert physical address to physical page number */
91 p = pfn_to_page(paddr>>PAGE_SHIFT); 91 p = pfn_to_page(paddr>>PAGE_SHIFT);
92 92
93 /* check whether a page number have been already registered or not */ 93 /* check whether a page number have been already registered or not */
94 for( i = 0; i < num_page_isolate; i++ ) 94 for (i = 0; i < num_page_isolate; i++)
95 if( page_isolate[i] == p ) 95 if (page_isolate[i] == p)
96 return ISOLATE_OK; /* already listed */ 96 return ISOLATE_OK; /* already listed */
97 97
98 /* limitation check */ 98 /* limitation check */
99 if( num_page_isolate == MAX_PAGE_ISOLATE ) 99 if (num_page_isolate == MAX_PAGE_ISOLATE)
100 return ISOLATE_NG; 100 return ISOLATE_NG;
101 101
102 /* kick pages having attribute 'SLAB' or 'Reserved' */ 102 /* kick pages having attribute 'SLAB' or 'Reserved' */
103 if( PageSlab(p) || PageReserved(p) ) 103 if (PageSlab(p) || PageReserved(p))
104 return ISOLATE_NG; 104 return ISOLATE_NG;
105 105
106 /* add attribute 'Reserved' and register the page */ 106 /* add attribute 'Reserved' and register the page */
@@ -139,10 +139,10 @@ mca_handler_bh(unsigned long paddr)
139 * @peidx: pointer to index of processor error section 139 * @peidx: pointer to index of processor error section
140 */ 140 */
141 141
142static void 142static void
143mca_make_peidx(sal_log_processor_info_t *slpi, peidx_table_t *peidx) 143mca_make_peidx(sal_log_processor_info_t *slpi, peidx_table_t *peidx)
144{ 144{
145 /* 145 /*
146 * calculate the start address of 146 * calculate the start address of
147 * "struct cpuid_info" and "sal_processor_static_info_t". 147 * "struct cpuid_info" and "sal_processor_static_info_t".
148 */ 148 */
@@ -164,7 +164,7 @@ mca_make_peidx(sal_log_processor_info_t *slpi, peidx_table_t *peidx)
164} 164}
165 165
166/** 166/**
167 * mca_make_slidx - Make index of SAL error record 167 * mca_make_slidx - Make index of SAL error record
168 * @buffer: pointer to SAL error record 168 * @buffer: pointer to SAL error record
169 * @slidx: pointer to index of SAL error record 169 * @slidx: pointer to index of SAL error record
170 * 170 *
@@ -172,12 +172,12 @@ mca_make_peidx(sal_log_processor_info_t *slpi, peidx_table_t *peidx)
172 * 1 if record has platform error / 0 if not 172 * 1 if record has platform error / 0 if not
173 */ 173 */
174#define LOG_INDEX_ADD_SECT_PTR(sect, ptr) \ 174#define LOG_INDEX_ADD_SECT_PTR(sect, ptr) \
175 { slidx_list_t *hl = &slidx_pool.buffer[slidx_pool.cur_idx]; \ 175 {slidx_list_t *hl = &slidx_pool.buffer[slidx_pool.cur_idx]; \
176 hl->hdr = ptr; \ 176 hl->hdr = ptr; \
177 list_add(&hl->list, &(sect)); \ 177 list_add(&hl->list, &(sect)); \
178 slidx_pool.cur_idx = (slidx_pool.cur_idx + 1)%slidx_pool.max_idx; } 178 slidx_pool.cur_idx = (slidx_pool.cur_idx + 1)%slidx_pool.max_idx; }
179 179
180static int 180static int
181mca_make_slidx(void *buffer, slidx_table_t *slidx) 181mca_make_slidx(void *buffer, slidx_table_t *slidx)
182{ 182{
183 int platform_err = 0; 183 int platform_err = 0;
@@ -214,28 +214,36 @@ mca_make_slidx(void *buffer, slidx_table_t *slidx)
214 sp = (sal_log_section_hdr_t *)((char*)buffer + ercd_pos); 214 sp = (sal_log_section_hdr_t *)((char*)buffer + ercd_pos);
215 if (!efi_guidcmp(sp->guid, SAL_PROC_DEV_ERR_SECT_GUID)) { 215 if (!efi_guidcmp(sp->guid, SAL_PROC_DEV_ERR_SECT_GUID)) {
216 LOG_INDEX_ADD_SECT_PTR(slidx->proc_err, sp); 216 LOG_INDEX_ADD_SECT_PTR(slidx->proc_err, sp);
217 } else if (!efi_guidcmp(sp->guid, SAL_PLAT_MEM_DEV_ERR_SECT_GUID)) { 217 } else if (!efi_guidcmp(sp->guid,
218 SAL_PLAT_MEM_DEV_ERR_SECT_GUID)) {
218 platform_err = 1; 219 platform_err = 1;
219 LOG_INDEX_ADD_SECT_PTR(slidx->mem_dev_err, sp); 220 LOG_INDEX_ADD_SECT_PTR(slidx->mem_dev_err, sp);
220 } else if (!efi_guidcmp(sp->guid, SAL_PLAT_SEL_DEV_ERR_SECT_GUID)) { 221 } else if (!efi_guidcmp(sp->guid,
222 SAL_PLAT_SEL_DEV_ERR_SECT_GUID)) {
221 platform_err = 1; 223 platform_err = 1;
222 LOG_INDEX_ADD_SECT_PTR(slidx->sel_dev_err, sp); 224 LOG_INDEX_ADD_SECT_PTR(slidx->sel_dev_err, sp);
223 } else if (!efi_guidcmp(sp->guid, SAL_PLAT_PCI_BUS_ERR_SECT_GUID)) { 225 } else if (!efi_guidcmp(sp->guid,
226 SAL_PLAT_PCI_BUS_ERR_SECT_GUID)) {
224 platform_err = 1; 227 platform_err = 1;
225 LOG_INDEX_ADD_SECT_PTR(slidx->pci_bus_err, sp); 228 LOG_INDEX_ADD_SECT_PTR(slidx->pci_bus_err, sp);
226 } else if (!efi_guidcmp(sp->guid, SAL_PLAT_SMBIOS_DEV_ERR_SECT_GUID)) { 229 } else if (!efi_guidcmp(sp->guid,
230 SAL_PLAT_SMBIOS_DEV_ERR_SECT_GUID)) {
227 platform_err = 1; 231 platform_err = 1;
228 LOG_INDEX_ADD_SECT_PTR(slidx->smbios_dev_err, sp); 232 LOG_INDEX_ADD_SECT_PTR(slidx->smbios_dev_err, sp);
229 } else if (!efi_guidcmp(sp->guid, SAL_PLAT_PCI_COMP_ERR_SECT_GUID)) { 233 } else if (!efi_guidcmp(sp->guid,
234 SAL_PLAT_PCI_COMP_ERR_SECT_GUID)) {
230 platform_err = 1; 235 platform_err = 1;
231 LOG_INDEX_ADD_SECT_PTR(slidx->pci_comp_err, sp); 236 LOG_INDEX_ADD_SECT_PTR(slidx->pci_comp_err, sp);
232 } else if (!efi_guidcmp(sp->guid, SAL_PLAT_SPECIFIC_ERR_SECT_GUID)) { 237 } else if (!efi_guidcmp(sp->guid,
238 SAL_PLAT_SPECIFIC_ERR_SECT_GUID)) {
233 platform_err = 1; 239 platform_err = 1;
234 LOG_INDEX_ADD_SECT_PTR(slidx->plat_specific_err, sp); 240 LOG_INDEX_ADD_SECT_PTR(slidx->plat_specific_err, sp);
235 } else if (!efi_guidcmp(sp->guid, SAL_PLAT_HOST_CTLR_ERR_SECT_GUID)) { 241 } else if (!efi_guidcmp(sp->guid,
242 SAL_PLAT_HOST_CTLR_ERR_SECT_GUID)) {
236 platform_err = 1; 243 platform_err = 1;
237 LOG_INDEX_ADD_SECT_PTR(slidx->host_ctlr_err, sp); 244 LOG_INDEX_ADD_SECT_PTR(slidx->host_ctlr_err, sp);
238 } else if (!efi_guidcmp(sp->guid, SAL_PLAT_BUS_ERR_SECT_GUID)) { 245 } else if (!efi_guidcmp(sp->guid,
246 SAL_PLAT_BUS_ERR_SECT_GUID)) {
239 platform_err = 1; 247 platform_err = 1;
240 LOG_INDEX_ADD_SECT_PTR(slidx->plat_bus_err, sp); 248 LOG_INDEX_ADD_SECT_PTR(slidx->plat_bus_err, sp);
241 } else { 249 } else {
@@ -253,15 +261,16 @@ mca_make_slidx(void *buffer, slidx_table_t *slidx)
253 * Return value: 261 * Return value:
254 * 0 on Success / -ENOMEM on Failure 262 * 0 on Success / -ENOMEM on Failure
255 */ 263 */
256static int 264static int
257init_record_index_pools(void) 265init_record_index_pools(void)
258{ 266{
259 int i; 267 int i;
260 int rec_max_size; /* Maximum size of SAL error records */ 268 int rec_max_size; /* Maximum size of SAL error records */
261 int sect_min_size; /* Minimum size of SAL error sections */ 269 int sect_min_size; /* Minimum size of SAL error sections */
262 /* minimum size table of each section */ 270 /* minimum size table of each section */
263 static int sal_log_sect_min_sizes[] = { 271 static int sal_log_sect_min_sizes[] = {
264 sizeof(sal_log_processor_info_t) + sizeof(sal_processor_static_info_t), 272 sizeof(sal_log_processor_info_t)
273 + sizeof(sal_processor_static_info_t),
265 sizeof(sal_log_mem_dev_err_info_t), 274 sizeof(sal_log_mem_dev_err_info_t),
266 sizeof(sal_log_sel_dev_err_info_t), 275 sizeof(sal_log_sel_dev_err_info_t),
267 sizeof(sal_log_pci_bus_err_info_t), 276 sizeof(sal_log_pci_bus_err_info_t),
@@ -294,7 +303,8 @@ init_record_index_pools(void)
294 303
295 /* - 3 - */ 304 /* - 3 - */
296 slidx_pool.max_idx = (rec_max_size/sect_min_size) * 2 + 1; 305 slidx_pool.max_idx = (rec_max_size/sect_min_size) * 2 + 1;
297 slidx_pool.buffer = (slidx_list_t *) kmalloc(slidx_pool.max_idx * sizeof(slidx_list_t), GFP_KERNEL); 306 slidx_pool.buffer = (slidx_list_t *)
307 kmalloc(slidx_pool.max_idx * sizeof(slidx_list_t), GFP_KERNEL);
298 308
299 return slidx_pool.buffer ? 0 : -ENOMEM; 309 return slidx_pool.buffer ? 0 : -ENOMEM;
300} 310}
@@ -308,6 +318,7 @@ init_record_index_pools(void)
308 * is_mca_global - Check whether this MCA is global or not 318 * is_mca_global - Check whether this MCA is global or not
309 * @peidx: pointer of index of processor error section 319 * @peidx: pointer of index of processor error section
310 * @pbci: pointer to pal_bus_check_info_t 320 * @pbci: pointer to pal_bus_check_info_t
321 * @sos: pointer to hand off struct between SAL and OS
311 * 322 *
312 * Return value: 323 * Return value:
313 * MCA_IS_LOCAL / MCA_IS_GLOBAL 324 * MCA_IS_LOCAL / MCA_IS_GLOBAL
@@ -317,11 +328,12 @@ static mca_type_t
317is_mca_global(peidx_table_t *peidx, pal_bus_check_info_t *pbci, 328is_mca_global(peidx_table_t *peidx, pal_bus_check_info_t *pbci,
318 struct ia64_sal_os_state *sos) 329 struct ia64_sal_os_state *sos)
319{ 330{
320 pal_processor_state_info_t *psp = (pal_processor_state_info_t*)peidx_psp(peidx); 331 pal_processor_state_info_t *psp =
332 (pal_processor_state_info_t*)peidx_psp(peidx);
321 333
322 /* 334 /*
323 * PAL can request a rendezvous, if the MCA has a global scope. 335 * PAL can request a rendezvous, if the MCA has a global scope.
324 * If "rz_always" flag is set, SAL requests MCA rendezvous 336 * If "rz_always" flag is set, SAL requests MCA rendezvous
325 * in spite of global MCA. 337 * in spite of global MCA.
326 * Therefore it is local MCA when rendezvous has not been requested. 338 * Therefore it is local MCA when rendezvous has not been requested.
327 * Failed to rendezvous, the system must be down. 339 * Failed to rendezvous, the system must be down.
@@ -381,13 +393,15 @@ is_mca_global(peidx_table_t *peidx, pal_bus_check_info_t *pbci,
381 * @slidx: pointer of index of SAL error record 393 * @slidx: pointer of index of SAL error record
382 * @peidx: pointer of index of processor error section 394 * @peidx: pointer of index of processor error section
383 * @pbci: pointer of pal_bus_check_info 395 * @pbci: pointer of pal_bus_check_info
396 * @sos: pointer to hand off struct between SAL and OS
384 * 397 *
385 * Return value: 398 * Return value:
386 * 1 on Success / 0 on Failure 399 * 1 on Success / 0 on Failure
387 */ 400 */
388 401
389static int 402static int
390recover_from_read_error(slidx_table_t *slidx, peidx_table_t *peidx, pal_bus_check_info_t *pbci, 403recover_from_read_error(slidx_table_t *slidx,
404 peidx_table_t *peidx, pal_bus_check_info_t *pbci,
391 struct ia64_sal_os_state *sos) 405 struct ia64_sal_os_state *sos)
392{ 406{
393 sal_log_mod_error_info_t *smei; 407 sal_log_mod_error_info_t *smei;
@@ -453,24 +467,28 @@ recover_from_read_error(slidx_table_t *slidx, peidx_table_t *peidx, pal_bus_chec
453 * @slidx: pointer of index of SAL error record 467 * @slidx: pointer of index of SAL error record
454 * @peidx: pointer of index of processor error section 468 * @peidx: pointer of index of processor error section
455 * @pbci: pointer of pal_bus_check_info 469 * @pbci: pointer of pal_bus_check_info
470 * @sos: pointer to hand off struct between SAL and OS
456 * 471 *
457 * Return value: 472 * Return value:
458 * 1 on Success / 0 on Failure 473 * 1 on Success / 0 on Failure
459 */ 474 */
460 475
461static int 476static int
462recover_from_platform_error(slidx_table_t *slidx, peidx_table_t *peidx, pal_bus_check_info_t *pbci, 477recover_from_platform_error(slidx_table_t *slidx, peidx_table_t *peidx,
478 pal_bus_check_info_t *pbci,
463 struct ia64_sal_os_state *sos) 479 struct ia64_sal_os_state *sos)
464{ 480{
465 int status = 0; 481 int status = 0;
466 pal_processor_state_info_t *psp = (pal_processor_state_info_t*)peidx_psp(peidx); 482 pal_processor_state_info_t *psp =
483 (pal_processor_state_info_t*)peidx_psp(peidx);
467 484
468 if (psp->bc && pbci->eb && pbci->bsi == 0) { 485 if (psp->bc && pbci->eb && pbci->bsi == 0) {
469 switch(pbci->type) { 486 switch(pbci->type) {
470 case 1: /* partial read */ 487 case 1: /* partial read */
471 case 3: /* full line(cpu) read */ 488 case 3: /* full line(cpu) read */
472 case 9: /* I/O space read */ 489 case 9: /* I/O space read */
473 status = recover_from_read_error(slidx, peidx, pbci, sos); 490 status = recover_from_read_error(slidx, peidx, pbci,
491 sos);
474 break; 492 break;
475 case 0: /* unknown */ 493 case 0: /* unknown */
476 case 2: /* partial write */ 494 case 2: /* partial write */
@@ -481,7 +499,8 @@ recover_from_platform_error(slidx_table_t *slidx, peidx_table_t *peidx, pal_bus_
481 case 8: /* write coalescing transactions */ 499 case 8: /* write coalescing transactions */
482 case 10: /* I/O space write */ 500 case 10: /* I/O space write */
483 case 11: /* inter-processor interrupt message(IPI) */ 501 case 11: /* inter-processor interrupt message(IPI) */
484 case 12: /* interrupt acknowledge or external task priority cycle */ 502 case 12: /* interrupt acknowledge or
503 external task priority cycle */
485 default: 504 default:
486 break; 505 break;
487 } 506 }
@@ -496,6 +515,7 @@ recover_from_platform_error(slidx_table_t *slidx, peidx_table_t *peidx, pal_bus_
496 * @slidx: pointer of index of SAL error record 515 * @slidx: pointer of index of SAL error record
497 * @peidx: pointer of index of processor error section 516 * @peidx: pointer of index of processor error section
498 * @pbci: pointer of pal_bus_check_info 517 * @pbci: pointer of pal_bus_check_info
518 * @sos: pointer to hand off struct between SAL and OS
499 * 519 *
500 * Return value: 520 * Return value:
501 * 1 on Success / 0 on Failure 521 * 1 on Success / 0 on Failure
@@ -509,15 +529,17 @@ recover_from_platform_error(slidx_table_t *slidx, peidx_table_t *peidx, pal_bus_
509 */ 529 */
510 530
511static int 531static int
512recover_from_processor_error(int platform, slidx_table_t *slidx, peidx_table_t *peidx, pal_bus_check_info_t *pbci, 532recover_from_processor_error(int platform, slidx_table_t *slidx,
533 peidx_table_t *peidx, pal_bus_check_info_t *pbci,
513 struct ia64_sal_os_state *sos) 534 struct ia64_sal_os_state *sos)
514{ 535{
515 pal_processor_state_info_t *psp = (pal_processor_state_info_t*)peidx_psp(peidx); 536 pal_processor_state_info_t *psp =
537 (pal_processor_state_info_t*)peidx_psp(peidx);
516 538
517 /* 539 /*
518 * We cannot recover errors with other than bus_check. 540 * We cannot recover errors with other than bus_check.
519 */ 541 */
520 if (psp->cc || psp->rc || psp->uc) 542 if (psp->cc || psp->rc || psp->uc)
521 return 0; 543 return 0;
522 544
523 /* 545 /*
@@ -546,10 +568,10 @@ recover_from_processor_error(int platform, slidx_table_t *slidx, peidx_table_t *
546 * (e.g. a load from poisoned memory) 568 * (e.g. a load from poisoned memory)
547 * This means "there are some platform errors". 569 * This means "there are some platform errors".
548 */ 570 */
549 if (platform) 571 if (platform)
550 return recover_from_platform_error(slidx, peidx, pbci, sos); 572 return recover_from_platform_error(slidx, peidx, pbci, sos);
551 /* 573 /*
552 * On account of strange SAL error record, we cannot recover. 574 * On account of strange SAL error record, we cannot recover.
553 */ 575 */
554 return 0; 576 return 0;
555} 577}
@@ -557,14 +579,14 @@ recover_from_processor_error(int platform, slidx_table_t *slidx, peidx_table_t *
557/** 579/**
558 * mca_try_to_recover - Try to recover from MCA 580 * mca_try_to_recover - Try to recover from MCA
559 * @rec: pointer to a SAL error record 581 * @rec: pointer to a SAL error record
582 * @sos: pointer to hand off struct between SAL and OS
560 * 583 *
561 * Return value: 584 * Return value:
562 * 1 on Success / 0 on Failure 585 * 1 on Success / 0 on Failure
563 */ 586 */
564 587
565static int 588static int
566mca_try_to_recover(void *rec, 589mca_try_to_recover(void *rec, struct ia64_sal_os_state *sos)
567 struct ia64_sal_os_state *sos)
568{ 590{
569 int platform_err; 591 int platform_err;
570 int n_proc_err; 592 int n_proc_err;
@@ -588,7 +610,8 @@ mca_try_to_recover(void *rec,
588 } 610 }
589 611
590 /* Make index of processor error section */ 612 /* Make index of processor error section */
591 mca_make_peidx((sal_log_processor_info_t*)slidx_first_entry(&slidx.proc_err)->hdr, &peidx); 613 mca_make_peidx((sal_log_processor_info_t*)
614 slidx_first_entry(&slidx.proc_err)->hdr, &peidx);
592 615
593 /* Extract Processor BUS_CHECK[0] */ 616 /* Extract Processor BUS_CHECK[0] */
594 *((u64*)&pbci) = peidx_check_info(&peidx, bus_check, 0); 617 *((u64*)&pbci) = peidx_check_info(&peidx, bus_check, 0);
@@ -598,7 +621,8 @@ mca_try_to_recover(void *rec,
598 return 0; 621 return 0;
599 622
600 /* Try to recover a processor error */ 623 /* Try to recover a processor error */
601 return recover_from_processor_error(platform_err, &slidx, &peidx, &pbci, sos); 624 return recover_from_processor_error(platform_err, &slidx, &peidx,
625 &pbci, sos);
602} 626}
603 627
604/* 628/*
@@ -611,7 +635,7 @@ int __init mca_external_handler_init(void)
611 return -ENOMEM; 635 return -ENOMEM;
612 636
613 /* register external mca handlers */ 637 /* register external mca handlers */
614 if (ia64_reg_MCA_extension(mca_try_to_recover)){ 638 if (ia64_reg_MCA_extension(mca_try_to_recover)) {
615 printk(KERN_ERR "ia64_reg_MCA_extension failed.\n"); 639 printk(KERN_ERR "ia64_reg_MCA_extension failed.\n");
616 kfree(slidx_pool.buffer); 640 kfree(slidx_pool.buffer);
617 return -EFAULT; 641 return -EFAULT;
diff --git a/arch/ia64/kernel/mca_drv.h b/arch/ia64/kernel/mca_drv.h
index 0227b761f2c4..e2f6fa1e0ef6 100644
--- a/arch/ia64/kernel/mca_drv.h
+++ b/arch/ia64/kernel/mca_drv.h
@@ -6,7 +6,7 @@
6 * Copyright (C) Hidetoshi Seto (seto.hidetoshi@jp.fujitsu.com) 6 * Copyright (C) Hidetoshi Seto (seto.hidetoshi@jp.fujitsu.com)
7 */ 7 */
8/* 8/*
9 * Processor error section: 9 * Processor error section:
10 * 10 *
11 * +-sal_log_processor_info_t *info-------------+ 11 * +-sal_log_processor_info_t *info-------------+
12 * | sal_log_section_hdr_t header; | 12 * | sal_log_section_hdr_t header; |
diff --git a/arch/ia64/kernel/mca_drv_asm.S b/arch/ia64/kernel/mca_drv_asm.S
index 2d7e0217638d..3f298ee4d00c 100644
--- a/arch/ia64/kernel/mca_drv_asm.S
+++ b/arch/ia64/kernel/mca_drv_asm.S
@@ -13,45 +13,45 @@
13#include <asm/ptrace.h> 13#include <asm/ptrace.h>
14 14
15GLOBAL_ENTRY(mca_handler_bhhook) 15GLOBAL_ENTRY(mca_handler_bhhook)
16 invala // clear RSE ? 16 invala // clear RSE ?
17 ;; // 17 ;;
18 cover // 18 cover
19 ;; // 19 ;;
20 clrrrb // 20 clrrrb
21 ;; 21 ;;
22 alloc r16=ar.pfs,0,2,1,0 // make a new frame 22 alloc r16=ar.pfs,0,2,1,0 // make a new frame
23 ;; 23 ;;
24 mov ar.rsc=0 24 mov ar.rsc=0
25 ;; 25 ;;
26 mov r13=IA64_KR(CURRENT) // current task pointer 26 mov r13=IA64_KR(CURRENT) // current task pointer
27 ;; 27 ;;
28 mov r2=r13 28 mov r2=r13
29 ;; 29 ;;
30 addl r22=IA64_RBS_OFFSET,r2 30 addl r22=IA64_RBS_OFFSET,r2
31 ;; 31 ;;
32 mov ar.bspstore=r22 32 mov ar.bspstore=r22
33 ;; 33 ;;
34 addl sp=IA64_STK_OFFSET-IA64_PT_REGS_SIZE,r2 34 addl sp=IA64_STK_OFFSET-IA64_PT_REGS_SIZE,r2
35 ;; 35 ;;
36 adds r2=IA64_TASK_THREAD_ON_USTACK_OFFSET,r13 36 adds r2=IA64_TASK_THREAD_ON_USTACK_OFFSET,r13
37 ;; 37 ;;
38 st1 [r2]=r0 // clear current->thread.on_ustack flag 38 st1 [r2]=r0 // clear current->thread.on_ustack flag
39 mov loc0=r16 39 mov loc0=r16
40 movl loc1=mca_handler_bh // recovery C function 40 movl loc1=mca_handler_bh // recovery C function
41 ;; 41 ;;
42 mov out0=r8 // poisoned address 42 mov out0=r8 // poisoned address
43 mov b6=loc1 43 mov b6=loc1
44 ;; 44 ;;
45 mov loc1=rp 45 mov loc1=rp
46 ;; 46 ;;
47 ssm psr.i 47 ssm psr.i
48 ;; 48 ;;
49 br.call.sptk.many rp=b6 // does not return ... 49 br.call.sptk.many rp=b6 // does not return ...
50 ;; 50 ;;
51 mov ar.pfs=loc0 51 mov ar.pfs=loc0
52 mov rp=loc1 52 mov rp=loc1
53 ;; 53 ;;
54 mov r8=r0 54 mov r8=r0
55 br.ret.sptk.many rp 55 br.ret.sptk.many rp
56 ;; 56 ;;
57END(mca_handler_bhhook) 57END(mca_handler_bhhook)
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index 1650353e3f77..d71731ee5b61 100644
--- a/arch/ia64/kernel/perfmon.c
+++ b/arch/ia64/kernel/perfmon.c
@@ -574,7 +574,7 @@ pfm_protect_ctx_ctxsw(pfm_context_t *x)
574 return 0UL; 574 return 0UL;
575} 575}
576 576
577static inline unsigned long 577static inline void
578pfm_unprotect_ctx_ctxsw(pfm_context_t *x, unsigned long f) 578pfm_unprotect_ctx_ctxsw(pfm_context_t *x, unsigned long f)
579{ 579{
580 spin_unlock(&(x)->ctx_lock); 580 spin_unlock(&(x)->ctx_lock);
@@ -2218,12 +2218,13 @@ static void
2218pfm_free_fd(int fd, struct file *file) 2218pfm_free_fd(int fd, struct file *file)
2219{ 2219{
2220 struct files_struct *files = current->files; 2220 struct files_struct *files = current->files;
2221 struct fdtable *fdt = files_fdtable(files); 2221 struct fdtable *fdt;
2222 2222
2223 /* 2223 /*
2224 * there ie no fd_uninstall(), so we do it here 2224 * there ie no fd_uninstall(), so we do it here
2225 */ 2225 */
2226 spin_lock(&files->file_lock); 2226 spin_lock(&files->file_lock);
2227 fdt = files_fdtable(files);
2227 rcu_assign_pointer(fdt->fd[fd], NULL); 2228 rcu_assign_pointer(fdt->fd[fd], NULL);
2228 spin_unlock(&files->file_lock); 2229 spin_unlock(&files->file_lock);
2229 2230
diff --git a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile
index 8b9b226005d1..b8d08f33f7ee 100644
--- a/arch/ppc/syslib/Makefile
+++ b/arch/ppc/syslib/Makefile
@@ -34,7 +34,8 @@ ifeq ($(CONFIG_40x),y)
34obj-$(CONFIG_PCI) += indirect_pci.o pci_auto.o ppc405_pci.o 34obj-$(CONFIG_PCI) += indirect_pci.o pci_auto.o ppc405_pci.o
35endif 35endif
36endif 36endif
37obj-$(CONFIG_8xx) += m8xx_setup.o ppc8xx_pic.o $(wdt-mpc8xx-y) 37obj-$(CONFIG_8xx) += m8xx_setup.o ppc8xx_pic.o $(wdt-mpc8xx-y) \
38 ppc_sys.o mpc8xx_devices.o mpc8xx_sys.o
38ifeq ($(CONFIG_8xx),y) 39ifeq ($(CONFIG_8xx),y)
39obj-$(CONFIG_PCI) += qspan_pci.o i8259.o 40obj-$(CONFIG_PCI) += qspan_pci.o i8259.o
40endif 41endif
diff --git a/arch/ppc/syslib/mpc8xx_devices.c b/arch/ppc/syslib/mpc8xx_devices.c
new file mode 100644
index 000000000000..2b5f0e701687
--- /dev/null
+++ b/arch/ppc/syslib/mpc8xx_devices.c
@@ -0,0 +1,224 @@
1/*
2 * arch/ppc/syslib/mpc8xx_devices.c
3 *
4 * MPC8xx Device descriptions
5 *
6 * Maintainer: Kumar Gala <kumar.gala@freescale.com>
7 *
8 * Copyright 2005 MontaVista Software, Inc. by Vitaly Bordug<vbordug@ru.mvista.com>
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
14 */
15
16#include <linux/init.h>
17#include <linux/module.h>
18#include <linux/device.h>
19#include <linux/serial_8250.h>
20#include <linux/mii.h>
21#include <asm/commproc.h>
22#include <asm/mpc8xx.h>
23#include <asm/irq.h>
24#include <asm/ppc_sys.h>
25
26/* We use offsets for IORESOURCE_MEM to do not set dependences at compile time.
27 * They will get fixed up by mach_mpc8xx_fixup
28 */
29
30struct platform_device ppc_sys_platform_devices[] = {
31 [MPC8xx_CPM_FEC1] = {
32 .name = "fsl-cpm-fec",
33 .id = 1,
34 .num_resources = 2,
35 .resource = (struct resource[]) {
36 {
37 .name = "regs",
38 .start = 0xe00,
39 .end = 0xe88,
40 .flags = IORESOURCE_MEM,
41 },
42 {
43 .name = "interrupt",
44 .start = MPC8xx_INT_FEC1,
45 .end = MPC8xx_INT_FEC1,
46 .flags = IORESOURCE_IRQ,
47 },
48 },
49 },
50 [MPC8xx_CPM_FEC2] = {
51 .name = "fsl-cpm-fec",
52 .id = 2,
53 .num_resources = 2,
54 .resource = (struct resource[]) {
55 {
56 .name = "regs",
57 .start = 0x1e00,
58 .end = 0x1e88,
59 .flags = IORESOURCE_MEM,
60 },
61 {
62 .name = "interrupt",
63 .start = MPC8xx_INT_FEC2,
64 .end = MPC8xx_INT_FEC2,
65 .flags = IORESOURCE_IRQ,
66 },
67 },
68 },
69 [MPC8xx_CPM_SCC1] = {
70 .name = "fsl-cpm-scc",
71 .id = 1,
72 .num_resources = 3,
73 .resource = (struct resource[]) {
74 {
75 .name = "regs",
76 .start = 0xa00,
77 .end = 0xa18,
78 .flags = IORESOURCE_MEM,
79 },
80 {
81 .name = "pram",
82 .start = 0x3c00,
83 .end = 0x3c80,
84 .flags = IORESOURCE_MEM,
85 },
86 {
87 .name = "interrupt",
88 .start = MPC8xx_INT_SCC1,
89 .end = MPC8xx_INT_SCC1,
90 .flags = IORESOURCE_IRQ,
91 },
92 },
93 },
94 [MPC8xx_CPM_SCC2] = {
95 .name = "fsl-cpm-scc",
96 .id = 2,
97 .num_resources = 3,
98 .resource = (struct resource[]) {
99 {
100 .name = "regs",
101 .start = 0xa20,
102 .end = 0xa38,
103 .flags = IORESOURCE_MEM,
104 },
105 {
106 .name = "pram",
107 .start = 0x3d00,
108 .end = 0x3d80,
109 .flags = IORESOURCE_MEM,
110 },
111
112 {
113 .name = "interrupt",
114 .start = MPC8xx_INT_SCC2,
115 .end = MPC8xx_INT_SCC2,
116 .flags = IORESOURCE_IRQ,
117 },
118 },
119 },
120 [MPC8xx_CPM_SCC3] = {
121 .name = "fsl-cpm-scc",
122 .id = 3,
123 .num_resources = 3,
124 .resource = (struct resource[]) {
125 {
126 .name = "regs",
127 .start = 0xa40,
128 .end = 0xa58,
129 .flags = IORESOURCE_MEM,
130 },
131 {
132 .name = "pram",
133 .start = 0x3e00,
134 .end = 0x3e80,
135 .flags = IORESOURCE_MEM,
136 },
137
138 {
139 .name = "interrupt",
140 .start = MPC8xx_INT_SCC3,
141 .end = MPC8xx_INT_SCC3,
142 .flags = IORESOURCE_IRQ,
143 },
144 },
145 },
146 [MPC8xx_CPM_SCC4] = {
147 .name = "fsl-cpm-scc",
148 .id = 4,
149 .num_resources = 3,
150 .resource = (struct resource[]) {
151 {
152 .name = "regs",
153 .start = 0xa60,
154 .end = 0xa78,
155 .flags = IORESOURCE_MEM,
156 },
157 {
158 .name = "pram",
159 .start = 0x3f00,
160 .end = 0x3f80,
161 .flags = IORESOURCE_MEM,
162 },
163
164 {
165 .name = "interrupt",
166 .start = MPC8xx_INT_SCC4,
167 .end = MPC8xx_INT_SCC4,
168 .flags = IORESOURCE_IRQ,
169 },
170 },
171 },
172 [MPC8xx_CPM_SMC1] = {
173 .name = "fsl-cpm-smc",
174 .id = 1,
175 .num_resources = 2,
176 .resource = (struct resource[]) {
177 {
178 .name = "regs",
179 .start = 0xa82,
180 .end = 0xa91,
181 .flags = IORESOURCE_MEM,
182 },
183 {
184 .name = "interrupt",
185 .start = MPC8xx_INT_SMC1,
186 .end = MPC8xx_INT_SMC1,
187 .flags = IORESOURCE_IRQ,
188 },
189 },
190 },
191 [MPC8xx_CPM_SMC2] = {
192 .name = "fsl-cpm-smc",
193 .id = 2,
194 .num_resources = 2,
195 .resource = (struct resource[]) {
196 {
197 .name = "regs",
198 .start = 0xa92,
199 .end = 0xaa1,
200 .flags = IORESOURCE_MEM,
201 },
202 {
203 .name = "interrupt",
204 .start = MPC8xx_INT_SMC2,
205 .end = MPC8xx_INT_SMC2,
206 .flags = IORESOURCE_IRQ,
207 },
208 },
209 },
210};
211
212static int __init mach_mpc8xx_fixup(struct platform_device *pdev)
213{
214 ppc_sys_fixup_mem_resource (pdev, IMAP_ADDR);
215 return 0;
216}
217
218static int __init mach_mpc8xx_init(void)
219{
220 ppc_sys_device_fixup = mach_mpc8xx_fixup;
221 return 0;
222}
223
224postcore_initcall(mach_mpc8xx_init);
diff --git a/arch/ppc/syslib/mpc8xx_sys.c b/arch/ppc/syslib/mpc8xx_sys.c
new file mode 100644
index 000000000000..a532ccc861c0
--- /dev/null
+++ b/arch/ppc/syslib/mpc8xx_sys.c
@@ -0,0 +1,61 @@
1/*
2 * arch/ppc/platforms/mpc8xx_sys.c
3 *
4 * MPC8xx System descriptions
5 *
6 * Maintainer: Kumar Gala <kumar.gala@freescale.com>
7 *
8 * Copyright 2005 MontaVista Software, Inc. by Vitaly Bordug <vbordug@ru.mvista.com>
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation; either version 2 of the License, or (at your
13 * option) any later version.
14 */
15
16#include <linux/init.h>
17#include <linux/module.h>
18#include <linux/device.h>
19#include <asm/ppc_sys.h>
20
21struct ppc_sys_spec *cur_ppc_sys_spec;
22struct ppc_sys_spec ppc_sys_specs[] = {
23 {
24 .ppc_sys_name = "MPC86X",
25 .mask = 0xFFFFFFFF,
26 .value = 0x00000000,
27 .num_devices = 2,
28 .device_list = (enum ppc_sys_devices[])
29 {
30 MPC8xx_CPM_FEC1,
31 MPC8xx_CPM_SCC1,
32 MPC8xx_CPM_SCC2,
33 MPC8xx_CPM_SCC3,
34 MPC8xx_CPM_SCC4,
35 MPC8xx_CPM_SMC1,
36 MPC8xx_CPM_SMC2,
37 },
38 },
39 {
40 .ppc_sys_name = "MPC885",
41 .mask = 0xFFFFFFFF,
42 .value = 0x00000000,
43 .num_devices = 3,
44 .device_list = (enum ppc_sys_devices[])
45 {
46 MPC8xx_CPM_FEC1,
47 MPC8xx_CPM_FEC2,
48 MPC8xx_CPM_SCC1,
49 MPC8xx_CPM_SCC2,
50 MPC8xx_CPM_SCC3,
51 MPC8xx_CPM_SCC4,
52 MPC8xx_CPM_SMC1,
53 MPC8xx_CPM_SMC2,
54 },
55 },
56 { /* default match */
57 .ppc_sys_name = "",
58 .mask = 0x00000000,
59 .value = 0x00000000,
60 },
61};
diff --git a/arch/ppc/syslib/open_pic2.c b/arch/ppc/syslib/open_pic2.c
index 2e0ea92144f6..9a7e8748e2b2 100644
--- a/arch/ppc/syslib/open_pic2.c
+++ b/arch/ppc/syslib/open_pic2.c
@@ -575,7 +575,7 @@ static void openpic2_cached_disable_irq(u_int irq)
575 * we need something better to deal with that... Maybe switch to S1 for 575 * we need something better to deal with that... Maybe switch to S1 for
576 * cpufreq changes 576 * cpufreq changes
577 */ 577 */
578int openpic2_suspend(struct sys_device *sysdev, u32 state) 578int openpic2_suspend(struct sys_device *sysdev, pm_message_t state)
579{ 579{
580 int i; 580 int i;
581 unsigned long flags; 581 unsigned long flags;
diff --git a/arch/ppc64/mm/fault.c b/arch/ppc64/mm/fault.c
index 7fbc68bbb739..be3f25cf3e9f 100644
--- a/arch/ppc64/mm/fault.c
+++ b/arch/ppc64/mm/fault.c
@@ -38,6 +38,7 @@
38#include <asm/system.h> 38#include <asm/system.h>
39#include <asm/uaccess.h> 39#include <asm/uaccess.h>
40#include <asm/kdebug.h> 40#include <asm/kdebug.h>
41#include <asm/siginfo.h>
41 42
42/* 43/*
43 * Check whether the instruction at regs->nip is a store using 44 * Check whether the instruction at regs->nip is a store using
diff --git a/arch/s390/defconfig b/arch/s390/defconfig
index 0865251a3f44..45d44c6bb39d 100644
--- a/arch/s390/defconfig
+++ b/arch/s390/defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.13-rc4 3# Linux kernel version: 2.6.14-rc1
4# Fri Jul 29 14:49:30 2005 4# Wed Sep 14 16:46:19 2005
5# 5#
6CONFIG_MMU=y 6CONFIG_MMU=y
7CONFIG_RWSEM_XCHGADD_ALGORITHM=y 7CONFIG_RWSEM_XCHGADD_ALGORITHM=y
@@ -21,6 +21,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
21# General setup 21# General setup
22# 22#
23CONFIG_LOCALVERSION="" 23CONFIG_LOCALVERSION=""
24CONFIG_LOCALVERSION_AUTO=y
24CONFIG_SWAP=y 25CONFIG_SWAP=y
25CONFIG_SYSVIPC=y 26CONFIG_SYSVIPC=y
26CONFIG_POSIX_MQUEUE=y 27CONFIG_POSIX_MQUEUE=y
@@ -33,6 +34,7 @@ CONFIG_KOBJECT_UEVENT=y
33CONFIG_IKCONFIG=y 34CONFIG_IKCONFIG=y
34CONFIG_IKCONFIG_PROC=y 35CONFIG_IKCONFIG_PROC=y
35# CONFIG_CPUSETS is not set 36# CONFIG_CPUSETS is not set
37CONFIG_INITRAMFS_SOURCE=""
36# CONFIG_EMBEDDED is not set 38# CONFIG_EMBEDDED is not set
37CONFIG_KALLSYMS=y 39CONFIG_KALLSYMS=y
38# CONFIG_KALLSYMS_ALL is not set 40# CONFIG_KALLSYMS_ALL is not set
@@ -94,6 +96,7 @@ CONFIG_FLATMEM_MANUAL=y
94# CONFIG_SPARSEMEM_MANUAL is not set 96# CONFIG_SPARSEMEM_MANUAL is not set
95CONFIG_FLATMEM=y 97CONFIG_FLATMEM=y
96CONFIG_FLAT_NODE_MEM_MAP=y 98CONFIG_FLAT_NODE_MEM_MAP=y
99# CONFIG_SPARSEMEM_STATIC is not set
97 100
98# 101#
99# I/O subsystem configuration 102# I/O subsystem configuration
@@ -151,8 +154,8 @@ CONFIG_IP_FIB_HASH=y
151# CONFIG_INET_ESP is not set 154# CONFIG_INET_ESP is not set
152# CONFIG_INET_IPCOMP is not set 155# CONFIG_INET_IPCOMP is not set
153# CONFIG_INET_TUNNEL is not set 156# CONFIG_INET_TUNNEL is not set
154CONFIG_IP_TCPDIAG=y 157CONFIG_INET_DIAG=y
155CONFIG_IP_TCPDIAG_IPV6=y 158CONFIG_INET_TCP_DIAG=y
156# CONFIG_TCP_CONG_ADVANCED is not set 159# CONFIG_TCP_CONG_ADVANCED is not set
157CONFIG_TCP_CONG_BIC=y 160CONFIG_TCP_CONG_BIC=y
158CONFIG_IPV6=y 161CONFIG_IPV6=y
@@ -165,6 +168,11 @@ CONFIG_IPV6=y
165# CONFIG_NETFILTER is not set 168# CONFIG_NETFILTER is not set
166 169
167# 170#
171# DCCP Configuration (EXPERIMENTAL)
172#
173# CONFIG_IP_DCCP is not set
174
175#
168# SCTP Configuration (EXPERIMENTAL) 176# SCTP Configuration (EXPERIMENTAL)
169# 177#
170# CONFIG_IP_SCTP is not set 178# CONFIG_IP_SCTP is not set
@@ -217,9 +225,11 @@ CONFIG_NET_CLS_POLICE=y
217# Network testing 225# Network testing
218# 226#
219# CONFIG_NET_PKTGEN is not set 227# CONFIG_NET_PKTGEN is not set
228# CONFIG_NETFILTER_NETLINK is not set
220# CONFIG_HAMRADIO is not set 229# CONFIG_HAMRADIO is not set
221# CONFIG_IRDA is not set 230# CONFIG_IRDA is not set
222# CONFIG_BT is not set 231# CONFIG_BT is not set
232# CONFIG_IEEE80211 is not set
223# CONFIG_PCMCIA is not set 233# CONFIG_PCMCIA is not set
224 234
225# 235#
@@ -233,6 +243,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y
233# 243#
234# SCSI device support 244# SCSI device support
235# 245#
246# CONFIG_RAID_ATTRS is not set
236CONFIG_SCSI=y 247CONFIG_SCSI=y
237CONFIG_SCSI_PROC_FS=y 248CONFIG_SCSI_PROC_FS=y
238 249
@@ -260,6 +271,7 @@ CONFIG_SCSI_LOGGING=y
260# CONFIG_SCSI_SPI_ATTRS is not set 271# CONFIG_SCSI_SPI_ATTRS is not set
261CONFIG_SCSI_FC_ATTRS=y 272CONFIG_SCSI_FC_ATTRS=y
262# CONFIG_SCSI_ISCSI_ATTRS is not set 273# CONFIG_SCSI_ISCSI_ATTRS is not set
274# CONFIG_SCSI_SAS_ATTRS is not set
263 275
264# 276#
265# SCSI low-level drivers 277# SCSI low-level drivers
@@ -280,7 +292,6 @@ CONFIG_BLK_DEV_RAM=y
280CONFIG_BLK_DEV_RAM_COUNT=16 292CONFIG_BLK_DEV_RAM_COUNT=16
281CONFIG_BLK_DEV_RAM_SIZE=4096 293CONFIG_BLK_DEV_RAM_SIZE=4096
282CONFIG_BLK_DEV_INITRD=y 294CONFIG_BLK_DEV_INITRD=y
283CONFIG_INITRAMFS_SOURCE=""
284# CONFIG_LBD is not set 295# CONFIG_LBD is not set
285# CONFIG_CDROM_PKTCDVD is not set 296# CONFIG_CDROM_PKTCDVD is not set
286 297
@@ -384,6 +395,10 @@ CONFIG_EQUALIZER=m
384CONFIG_TUN=m 395CONFIG_TUN=m
385 396
386# 397#
398# PHY device support
399#
400
401#
387# Ethernet (10 or 100Mbit) 402# Ethernet (10 or 100Mbit)
388# 403#
389CONFIG_NET_ETHERNET=y 404CONFIG_NET_ETHERNET=y
@@ -453,10 +468,6 @@ CONFIG_FS_MBCACHE=y
453# CONFIG_REISERFS_FS is not set 468# CONFIG_REISERFS_FS is not set
454# CONFIG_JFS_FS is not set 469# CONFIG_JFS_FS is not set
455# CONFIG_FS_POSIX_ACL is not set 470# CONFIG_FS_POSIX_ACL is not set
456
457#
458# XFS support
459#
460# CONFIG_XFS_FS is not set 471# CONFIG_XFS_FS is not set
461# CONFIG_MINIX_FS is not set 472# CONFIG_MINIX_FS is not set
462# CONFIG_ROMFS_FS is not set 473# CONFIG_ROMFS_FS is not set
@@ -465,6 +476,7 @@ CONFIG_INOTIFY=y
465CONFIG_DNOTIFY=y 476CONFIG_DNOTIFY=y
466# CONFIG_AUTOFS_FS is not set 477# CONFIG_AUTOFS_FS is not set
467# CONFIG_AUTOFS4_FS is not set 478# CONFIG_AUTOFS4_FS is not set
479# CONFIG_FUSE_FS is not set
468 480
469# 481#
470# CD-ROM/DVD Filesystems 482# CD-ROM/DVD Filesystems
@@ -485,11 +497,10 @@ CONFIG_DNOTIFY=y
485CONFIG_PROC_FS=y 497CONFIG_PROC_FS=y
486CONFIG_PROC_KCORE=y 498CONFIG_PROC_KCORE=y
487CONFIG_SYSFS=y 499CONFIG_SYSFS=y
488# CONFIG_DEVPTS_FS_XATTR is not set
489CONFIG_TMPFS=y 500CONFIG_TMPFS=y
490# CONFIG_TMPFS_XATTR is not set
491# CONFIG_HUGETLB_PAGE is not set 501# CONFIG_HUGETLB_PAGE is not set
492CONFIG_RAMFS=y 502CONFIG_RAMFS=y
503# CONFIG_RELAYFS_FS is not set
493 504
494# 505#
495# Miscellaneous filesystems 506# Miscellaneous filesystems
@@ -533,6 +544,7 @@ CONFIG_SUNRPC=y
533# CONFIG_NCP_FS is not set 544# CONFIG_NCP_FS is not set
534# CONFIG_CODA_FS is not set 545# CONFIG_CODA_FS is not set
535# CONFIG_AFS_FS is not set 546# CONFIG_AFS_FS is not set
547# CONFIG_9P_FS is not set
536 548
537# 549#
538# Partition Types 550# Partition Types
@@ -572,6 +584,7 @@ CONFIG_MSDOS_PARTITION=y
572CONFIG_DEBUG_KERNEL=y 584CONFIG_DEBUG_KERNEL=y
573CONFIG_MAGIC_SYSRQ=y 585CONFIG_MAGIC_SYSRQ=y
574CONFIG_LOG_BUF_SHIFT=17 586CONFIG_LOG_BUF_SHIFT=17
587CONFIG_DETECT_SOFTLOCKUP=y
575# CONFIG_SCHEDSTATS is not set 588# CONFIG_SCHEDSTATS is not set
576# CONFIG_DEBUG_SLAB is not set 589# CONFIG_DEBUG_SLAB is not set
577CONFIG_DEBUG_PREEMPT=y 590CONFIG_DEBUG_PREEMPT=y
@@ -626,5 +639,6 @@ CONFIG_CRYPTO=y
626# Library routines 639# Library routines
627# 640#
628# CONFIG_CRC_CCITT is not set 641# CONFIG_CRC_CCITT is not set
642# CONFIG_CRC16 is not set
629CONFIG_CRC32=m 643CONFIG_CRC32=m
630# CONFIG_LIBCRC32C is not set 644# CONFIG_LIBCRC32C is not set
diff --git a/arch/s390/kernel/Makefile b/arch/s390/kernel/Makefile
index ab1e49d2e518..8584dd823218 100644
--- a/arch/s390/kernel/Makefile
+++ b/arch/s390/kernel/Makefile
@@ -6,7 +6,7 @@ EXTRA_AFLAGS := -traditional
6 6
7obj-y := bitmap.o traps.o time.o process.o \ 7obj-y := bitmap.o traps.o time.o process.o \
8 setup.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o \ 8 setup.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o \
9 semaphore.o s390_ext.o debug.o profile.o irq.o 9 semaphore.o s390_ext.o debug.o profile.o irq.o reipl_diag.o
10 10
11extra-$(CONFIG_ARCH_S390_31) += head.o 11extra-$(CONFIG_ARCH_S390_31) += head.o
12extra-$(CONFIG_ARCH_S390X) += head64.o 12extra-$(CONFIG_ARCH_S390X) += head64.o
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S
index 58fc7fbcb40e..9b30f4cf32c4 100644
--- a/arch/s390/kernel/entry.S
+++ b/arch/s390/kernel/entry.S
@@ -108,7 +108,7 @@ STACK_SIZE = 1 << STACK_SHIFT
108 bl BASED(0f) 108 bl BASED(0f)
109 l %r14,BASED(.Lcleanup_critical) 109 l %r14,BASED(.Lcleanup_critical)
110 basr %r14,%r14 110 basr %r14,%r14
111 tm 0(%r12),0x01 # retest problem state after cleanup 111 tm 1(%r12),0x01 # retest problem state after cleanup
112 bnz BASED(1f) 112 bnz BASED(1f)
1130: l %r14,__LC_ASYNC_STACK # are we already on the async stack ? 1130: l %r14,__LC_ASYNC_STACK # are we already on the async stack ?
114 slr %r14,%r15 114 slr %r14,%r15
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S
index d0c9ffaa25db..7b9b4a2ba1d7 100644
--- a/arch/s390/kernel/entry64.S
+++ b/arch/s390/kernel/entry64.S
@@ -101,7 +101,7 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_NEED_RESCHED | _TIF_MCCK_PENDING)
101 clc \psworg+8(8),BASED(.Lcritical_start) 101 clc \psworg+8(8),BASED(.Lcritical_start)
102 jl 0f 102 jl 0f
103 brasl %r14,cleanup_critical 103 brasl %r14,cleanup_critical
104 tm 0(%r12),0x01 # retest problem state after cleanup 104 tm 1(%r12),0x01 # retest problem state after cleanup
105 jnz 1f 105 jnz 1f
1060: lg %r14,__LC_ASYNC_STACK # are we already on the async. stack ? 1060: lg %r14,__LC_ASYNC_STACK # are we already on the async. stack ?
107 slgr %r14,%r15 107 slgr %r14,%r15
diff --git a/arch/s390/kernel/reipl_diag.c b/arch/s390/kernel/reipl_diag.c
new file mode 100644
index 000000000000..83cb42bc0b76
--- /dev/null
+++ b/arch/s390/kernel/reipl_diag.c
@@ -0,0 +1,39 @@
1/*
2 * This file contains the implementation of the
3 * Linux re-IPL support
4 *
5 * (C) Copyright IBM Corp. 2005
6 *
7 * Author(s): Volker Sameske (sameske@de.ibm.com)
8 *
9 */
10
11#include <linux/kernel.h>
12
13static unsigned int reipl_diag_rc1;
14static unsigned int reipl_diag_rc2;
15
16/*
17 * re-IPL the system using the last used IPL parameters
18 */
19void reipl_diag(void)
20{
21 asm volatile (
22 " la %%r4,0\n"
23 " la %%r5,0\n"
24 " diag %%r4,%2,0x308\n"
25 "0:\n"
26 " st %%r4,%0\n"
27 " st %%r5,%1\n"
28 ".section __ex_table,\"a\"\n"
29#ifdef __s390x__
30 " .align 8\n"
31 " .quad 0b, 0b\n"
32#else
33 " .align 4\n"
34 " .long 0b, 0b\n"
35#endif
36 ".previous\n"
37 : "=m" (reipl_diag_rc1), "=m" (reipl_diag_rc2)
38 : "d" (3) : "cc", "4", "5" );
39}
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c
index 5ba5a5485da9..5204778b8e5e 100644
--- a/arch/s390/kernel/setup.c
+++ b/arch/s390/kernel/setup.c
@@ -261,8 +261,11 @@ void (*_machine_power_off)(void) = machine_power_off_smp;
261 * Reboot, halt and power_off routines for non SMP. 261 * Reboot, halt and power_off routines for non SMP.
262 */ 262 */
263extern void reipl(unsigned long devno); 263extern void reipl(unsigned long devno);
264extern void reipl_diag(void);
264static void do_machine_restart_nonsmp(char * __unused) 265static void do_machine_restart_nonsmp(char * __unused)
265{ 266{
267 reipl_diag();
268
266 if (MACHINE_IS_VM) 269 if (MACHINE_IS_VM)
267 cpcmd ("IPL", NULL, 0); 270 cpcmd ("IPL", NULL, 0);
268 else 271 else
@@ -634,6 +637,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
634 struct cpuinfo_S390 *cpuinfo; 637 struct cpuinfo_S390 *cpuinfo;
635 unsigned long n = (unsigned long) v - 1; 638 unsigned long n = (unsigned long) v - 1;
636 639
640 preempt_disable();
637 if (!n) { 641 if (!n) {
638 seq_printf(m, "vendor_id : IBM/S390\n" 642 seq_printf(m, "vendor_id : IBM/S390\n"
639 "# processors : %i\n" 643 "# processors : %i\n"
@@ -658,6 +662,7 @@ static int show_cpuinfo(struct seq_file *m, void *v)
658 cpuinfo->cpu_id.ident, 662 cpuinfo->cpu_id.ident,
659 cpuinfo->cpu_id.machine); 663 cpuinfo->cpu_id.machine);
660 } 664 }
665 preempt_enable();
661 return 0; 666 return 0;
662} 667}
663 668
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 85222fee4361..e13c87b446b2 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -65,6 +65,7 @@ extern char vmhalt_cmd[];
65extern char vmpoff_cmd[]; 65extern char vmpoff_cmd[];
66 66
67extern void reipl(unsigned long devno); 67extern void reipl(unsigned long devno);
68extern void reipl_diag(void);
68 69
69static void smp_ext_bitcall(int, ec_bit_sig); 70static void smp_ext_bitcall(int, ec_bit_sig);
70static void smp_ext_bitcall_others(ec_bit_sig); 71static void smp_ext_bitcall_others(ec_bit_sig);
@@ -283,6 +284,8 @@ static void do_machine_restart(void * __unused)
283 * interrupted by an external interrupt and s390irq 284 * interrupted by an external interrupt and s390irq
284 * locks are always held disabled). 285 * locks are always held disabled).
285 */ 286 */
287 reipl_diag();
288
286 if (MACHINE_IS_VM) 289 if (MACHINE_IS_VM)
287 cpcmd ("IPL", NULL, 0, NULL); 290 cpcmd ("IPL", NULL, 0, NULL);
288 else 291 else
diff --git a/arch/um/Kconfig.i386 b/arch/um/Kconfig.i386
index 8ad156a00499..5d92cacd56c6 100644
--- a/arch/um/Kconfig.i386
+++ b/arch/um/Kconfig.i386
@@ -42,3 +42,7 @@ config ARCH_HAS_SC_SIGNALS
42config ARCH_REUSE_HOST_VSYSCALL_AREA 42config ARCH_REUSE_HOST_VSYSCALL_AREA
43 bool 43 bool
44 default y 44 default y
45
46config X86_CMPXCHG
47 bool
48 default y
diff --git a/arch/um/drivers/mcast_user.c b/arch/um/drivers/mcast_user.c
index 7a0d115b29d0..5db136e2651c 100644
--- a/arch/um/drivers/mcast_user.c
+++ b/arch/um/drivers/mcast_user.c
@@ -13,7 +13,6 @@
13 13
14#include <errno.h> 14#include <errno.h>
15#include <unistd.h> 15#include <unistd.h>
16#include <linux/inet.h>
17#include <sys/socket.h> 16#include <sys/socket.h>
18#include <sys/un.h> 17#include <sys/un.h>
19#include <sys/time.h> 18#include <sys/time.h>
@@ -55,7 +54,7 @@ static int mcast_open(void *data)
55 struct mcast_data *pri = data; 54 struct mcast_data *pri = data;
56 struct sockaddr_in *sin = pri->mcast_addr; 55 struct sockaddr_in *sin = pri->mcast_addr;
57 struct ip_mreq mreq; 56 struct ip_mreq mreq;
58 int fd = -EINVAL, yes = 1, err = -EINVAL;; 57 int fd, yes = 1, err = 0;
59 58
60 59
61 if ((sin->sin_addr.s_addr == 0) || (sin->sin_port == 0)) 60 if ((sin->sin_addr.s_addr == 0) || (sin->sin_port == 0))
@@ -66,13 +65,14 @@ static int mcast_open(void *data)
66 if (fd < 0){ 65 if (fd < 0){
67 printk("mcast_open : data socket failed, errno = %d\n", 66 printk("mcast_open : data socket failed, errno = %d\n",
68 errno); 67 errno);
69 fd = -errno; 68 err = -errno;
70 goto out; 69 goto out;
71 } 70 }
72 71
73 if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes)) < 0) { 72 if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes)) < 0) {
74 printk("mcast_open: SO_REUSEADDR failed, errno = %d\n", 73 printk("mcast_open: SO_REUSEADDR failed, errno = %d\n",
75 errno); 74 errno);
75 err = -errno;
76 goto out_close; 76 goto out_close;
77 } 77 }
78 78
@@ -81,6 +81,7 @@ static int mcast_open(void *data)
81 sizeof(pri->ttl)) < 0) { 81 sizeof(pri->ttl)) < 0) {
82 printk("mcast_open: IP_MULTICAST_TTL failed, error = %d\n", 82 printk("mcast_open: IP_MULTICAST_TTL failed, error = %d\n",
83 errno); 83 errno);
84 err = -errno;
84 goto out_close; 85 goto out_close;
85 } 86 }
86 87
@@ -88,12 +89,14 @@ static int mcast_open(void *data)
88 if (setsockopt(fd, SOL_IP, IP_MULTICAST_LOOP, &yes, sizeof(yes)) < 0) { 89 if (setsockopt(fd, SOL_IP, IP_MULTICAST_LOOP, &yes, sizeof(yes)) < 0) {
89 printk("mcast_open: IP_MULTICAST_LOOP failed, error = %d\n", 90 printk("mcast_open: IP_MULTICAST_LOOP failed, error = %d\n",
90 errno); 91 errno);
92 err = -errno;
91 goto out_close; 93 goto out_close;
92 } 94 }
93 95
94 /* bind socket to mcast address */ 96 /* bind socket to mcast address */
95 if (bind(fd, (struct sockaddr *) sin, sizeof(*sin)) < 0) { 97 if (bind(fd, (struct sockaddr *) sin, sizeof(*sin)) < 0) {
96 printk("mcast_open : data bind failed, errno = %d\n", errno); 98 printk("mcast_open : data bind failed, errno = %d\n", errno);
99 err = -errno;
97 goto out_close; 100 goto out_close;
98 } 101 }
99 102
@@ -108,14 +111,15 @@ static int mcast_open(void *data)
108 "interface on the host.\n"); 111 "interface on the host.\n");
109 printk("eth0 should be configured in order to use the " 112 printk("eth0 should be configured in order to use the "
110 "multicast transport.\n"); 113 "multicast transport.\n");
114 err = -errno;
111 goto out_close; 115 goto out_close;
112 } 116 }
113 117
114 out:
115 return fd; 118 return fd;
116 119
117 out_close: 120 out_close:
118 os_close_file(fd); 121 os_close_file(fd);
122 out:
119 return err; 123 return err;
120} 124}
121 125
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c
index c190c2414197..12c95368124a 100644
--- a/arch/um/drivers/mconsole_kern.c
+++ b/arch/um/drivers/mconsole_kern.c
@@ -32,6 +32,7 @@
32#include "os.h" 32#include "os.h"
33#include "umid.h" 33#include "umid.h"
34#include "irq_kern.h" 34#include "irq_kern.h"
35#include "choose-mode.h"
35 36
36static int do_unlink_socket(struct notifier_block *notifier, 37static int do_unlink_socket(struct notifier_block *notifier,
37 unsigned long what, void *data) 38 unsigned long what, void *data)
@@ -276,6 +277,7 @@ void mconsole_proc(struct mc_request *req)
276 go - continue the UML after a 'stop' \n\ 277 go - continue the UML after a 'stop' \n\
277 log <string> - make UML enter <string> into the kernel log\n\ 278 log <string> - make UML enter <string> into the kernel log\n\
278 proc <file> - returns the contents of the UML's /proc/<file>\n\ 279 proc <file> - returns the contents of the UML's /proc/<file>\n\
280 stack <pid> - returns the stack of the specified pid\n\
279" 281"
280 282
281void mconsole_help(struct mc_request *req) 283void mconsole_help(struct mc_request *req)
@@ -479,6 +481,56 @@ void mconsole_sysrq(struct mc_request *req)
479} 481}
480#endif 482#endif
481 483
484/* Mconsole stack trace
485 * Added by Allan Graves, Jeff Dike
486 * Dumps a stacks registers to the linux console.
487 * Usage stack <pid>.
488 */
489void do_stack(struct mc_request *req)
490{
491 char *ptr = req->request.data;
492 int pid_requested= -1;
493 struct task_struct *from = NULL;
494 struct task_struct *to = NULL;
495
496 /* Would be nice:
497 * 1) Send showregs output to mconsole.
498 * 2) Add a way to stack dump all pids.
499 */
500
501 ptr += strlen("stack");
502 while(isspace(*ptr)) ptr++;
503
504 /* Should really check for multiple pids or reject bad args here */
505 /* What do the arguments in mconsole_reply mean? */
506 if(sscanf(ptr, "%d", &pid_requested) == 0){
507 mconsole_reply(req, "Please specify a pid", 1, 0);
508 return;
509 }
510
511 from = current;
512 to = find_task_by_pid(pid_requested);
513
514 if((to == NULL) || (pid_requested == 0)) {
515 mconsole_reply(req, "Couldn't find that pid", 1, 0);
516 return;
517 }
518 to->thread.saved_task = current;
519
520 switch_to(from, to, from);
521 mconsole_reply(req, "Stack Dumped to console and message log", 0, 0);
522}
523
524void mconsole_stack(struct mc_request *req)
525{
526 /* This command doesn't work in TT mode, so let's check and then
527 * get out of here
528 */
529 CHOOSE_MODE(mconsole_reply(req, "Sorry, this doesn't work in TT mode",
530 1, 0),
531 do_stack(req));
532}
533
482/* Changed by mconsole_setup, which is __setup, and called before SMP is 534/* Changed by mconsole_setup, which is __setup, and called before SMP is
483 * active. 535 * active.
484 */ 536 */
diff --git a/arch/um/drivers/mconsole_user.c b/arch/um/drivers/mconsole_user.c
index fe5afb13252c..310c1f823f26 100644
--- a/arch/um/drivers/mconsole_user.c
+++ b/arch/um/drivers/mconsole_user.c
@@ -30,6 +30,7 @@ static struct mconsole_command commands[] = {
30 { "go", mconsole_go, MCONSOLE_INTR }, 30 { "go", mconsole_go, MCONSOLE_INTR },
31 { "log", mconsole_log, MCONSOLE_INTR }, 31 { "log", mconsole_log, MCONSOLE_INTR },
32 { "proc", mconsole_proc, MCONSOLE_PROC }, 32 { "proc", mconsole_proc, MCONSOLE_PROC },
33 { "stack", mconsole_stack, MCONSOLE_INTR },
33}; 34};
34 35
35/* Initialized in mconsole_init, which is an initcall */ 36/* Initialized in mconsole_init, which is an initcall */
@@ -172,9 +173,9 @@ int mconsole_notify(char *sock_name, int type, const void *data, int len)
172 if(notify_sock < 0){ 173 if(notify_sock < 0){
173 notify_sock = socket(PF_UNIX, SOCK_DGRAM, 0); 174 notify_sock = socket(PF_UNIX, SOCK_DGRAM, 0);
174 if(notify_sock < 0){ 175 if(notify_sock < 0){
175 printk("mconsole_notify - socket failed, errno = %d\n",
176 errno);
177 err = -errno; 176 err = -errno;
177 printk("mconsole_notify - socket failed, errno = %d\n",
178 err);
178 } 179 }
179 } 180 }
180 unlock_notify(); 181 unlock_notify();
@@ -197,8 +198,8 @@ int mconsole_notify(char *sock_name, int type, const void *data, int len)
197 n = sendto(notify_sock, &packet, len, 0, (struct sockaddr *) &target, 198 n = sendto(notify_sock, &packet, len, 0, (struct sockaddr *) &target,
198 sizeof(target)); 199 sizeof(target));
199 if(n < 0){ 200 if(n < 0){
200 printk("mconsole_notify - sendto failed, errno = %d\n", errno);
201 err = -errno; 201 err = -errno;
202 printk("mconsole_notify - sendto failed, errno = %d\n", errno);
202 } 203 }
203 return(err); 204 return(err);
204} 205}
diff --git a/arch/um/drivers/pty.c b/arch/um/drivers/pty.c
index ed84d01df6cc..0306a1b215b7 100644
--- a/arch/um/drivers/pty.c
+++ b/arch/um/drivers/pty.c
@@ -43,8 +43,9 @@ static int pts_open(int input, int output, int primary, void *d,
43 43
44 fd = get_pty(); 44 fd = get_pty();
45 if(fd < 0){ 45 if(fd < 0){
46 err = -errno;
46 printk("open_pts : Failed to open pts\n"); 47 printk("open_pts : Failed to open pts\n");
47 return(-errno); 48 return err;
48 } 49 }
49 if(data->raw){ 50 if(data->raw){
50 CATCH_EINTR(err = tcgetattr(fd, &data->tt)); 51 CATCH_EINTR(err = tcgetattr(fd, &data->tt));
diff --git a/arch/um/drivers/ubd_user.c b/arch/um/drivers/ubd_user.c
deleted file mode 100644
index b94d2bc4fe06..000000000000
--- a/arch/um/drivers/ubd_user.c
+++ /dev/null
@@ -1,75 +0,0 @@
1/*
2 * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com)
3 * Copyright (C) 2001 Ridgerun,Inc (glonnon@ridgerun.com)
4 * Licensed under the GPL
5 */
6
7#include <stddef.h>
8#include <unistd.h>
9#include <errno.h>
10#include <sched.h>
11#include <signal.h>
12#include <string.h>
13#include <netinet/in.h>
14#include <sys/time.h>
15#include <sys/socket.h>
16#include <sys/mman.h>
17#include <sys/param.h>
18#include "asm/types.h"
19#include "user_util.h"
20#include "kern_util.h"
21#include "user.h"
22#include "ubd_user.h"
23#include "os.h"
24#include "cow.h"
25
26#include <endian.h>
27#include <byteswap.h>
28
29void ignore_sigwinch_sig(void)
30{
31 signal(SIGWINCH, SIG_IGN);
32}
33
34int start_io_thread(unsigned long sp, int *fd_out)
35{
36 int pid, fds[2], err;
37
38 err = os_pipe(fds, 1, 1);
39 if(err < 0){
40 printk("start_io_thread - os_pipe failed, err = %d\n", -err);
41 goto out;
42 }
43
44 kernel_fd = fds[0];
45 *fd_out = fds[1];
46
47 pid = clone(io_thread, (void *) sp, CLONE_FILES | CLONE_VM | SIGCHLD,
48 NULL);
49 if(pid < 0){
50 printk("start_io_thread - clone failed : errno = %d\n", errno);
51 err = -errno;
52 goto out_close;
53 }
54
55 return(pid);
56
57 out_close:
58 os_close_file(fds[0]);
59 os_close_file(fds[1]);
60 kernel_fd = -1;
61 *fd_out = -1;
62 out:
63 return(err);
64}
65
66/*
67 * Overrides for Emacs so that we follow Linus's tabbing style.
68 * Emacs will notice this stuff at the end of the file and automatically
69 * adjust the settings for this buffer only. This must remain at the end
70 * of the file.
71 * ---------------------------------------------------------------------------
72 * Local variables:
73 * c-file-style: "linux"
74 * End:
75 */
diff --git a/arch/um/drivers/xterm.c b/arch/um/drivers/xterm.c
index 93dc1911363f..90e0e5ff451e 100644
--- a/arch/um/drivers/xterm.c
+++ b/arch/um/drivers/xterm.c
@@ -110,13 +110,15 @@ int xterm_open(int input, int output, int primary, void *d,
110 110
111 fd = mkstemp(file); 111 fd = mkstemp(file);
112 if(fd < 0){ 112 if(fd < 0){
113 err = -errno;
113 printk("xterm_open : mkstemp failed, errno = %d\n", errno); 114 printk("xterm_open : mkstemp failed, errno = %d\n", errno);
114 return(-errno); 115 return err;
115 } 116 }
116 117
117 if(unlink(file)){ 118 if(unlink(file)){
119 err = -errno;
118 printk("xterm_open : unlink failed, errno = %d\n", errno); 120 printk("xterm_open : unlink failed, errno = %d\n", errno);
119 return(-errno); 121 return err;
120 } 122 }
121 os_close_file(fd); 123 os_close_file(fd);
122 124
diff --git a/arch/um/include/mconsole.h b/arch/um/include/mconsole.h
index cfa368e045a5..b1b512f47035 100644
--- a/arch/um/include/mconsole.h
+++ b/arch/um/include/mconsole.h
@@ -81,6 +81,7 @@ extern void mconsole_stop(struct mc_request *req);
81extern void mconsole_go(struct mc_request *req); 81extern void mconsole_go(struct mc_request *req);
82extern void mconsole_log(struct mc_request *req); 82extern void mconsole_log(struct mc_request *req);
83extern void mconsole_proc(struct mc_request *req); 83extern void mconsole_proc(struct mc_request *req);
84extern void mconsole_stack(struct mc_request *req);
84 85
85extern int mconsole_get_request(int fd, struct mc_request *req); 86extern int mconsole_get_request(int fd, struct mc_request *req);
86extern int mconsole_notify(char *sock_name, int type, const void *data, 87extern int mconsole_notify(char *sock_name, int type, const void *data,
diff --git a/arch/um/include/mem_user.h b/arch/um/include/mem_user.h
index d6404bb64662..9fef4123a65a 100644
--- a/arch/um/include/mem_user.h
+++ b/arch/um/include/mem_user.h
@@ -51,7 +51,6 @@ extern unsigned long task_size;
51 51
52extern void check_devanon(void); 52extern void check_devanon(void);
53extern int init_mem_user(void); 53extern int init_mem_user(void);
54extern int create_mem_file(unsigned long len);
55extern void setup_memory(void *entry); 54extern void setup_memory(void *entry);
56extern unsigned long find_iomem(char *driver, unsigned long *len_out); 55extern unsigned long find_iomem(char *driver, unsigned long *len_out);
57extern int init_maps(unsigned long physmem, unsigned long iomem, 56extern int init_maps(unsigned long physmem, unsigned long iomem,
@@ -64,20 +63,6 @@ extern unsigned long phys_offset(unsigned long phys);
64extern void unmap_physmem(void); 63extern void unmap_physmem(void);
65extern void map_memory(unsigned long virt, unsigned long phys, 64extern void map_memory(unsigned long virt, unsigned long phys,
66 unsigned long len, int r, int w, int x); 65 unsigned long len, int r, int w, int x);
67extern int protect_memory(unsigned long addr, unsigned long len,
68 int r, int w, int x, int must_succeed);
69extern unsigned long get_kmem_end(void); 66extern unsigned long get_kmem_end(void);
70extern void check_tmpexec(void);
71 67
72#endif 68#endif
73
74/*
75 * Overrides for Emacs so that we follow Linus's tabbing style.
76 * Emacs will notice this stuff at the end of the file and automatically
77 * adjust the settings for this buffer only. This must remain at the end
78 * of the file.
79 * ---------------------------------------------------------------------------
80 * Local variables:
81 * c-file-style: "linux"
82 * End:
83 */
diff --git a/arch/um/include/os.h b/arch/um/include/os.h
index 4c362458052c..583329d0a539 100644
--- a/arch/um/include/os.h
+++ b/arch/um/include/os.h
@@ -157,6 +157,9 @@ extern int os_lock_file(int fd, int excl);
157extern void os_early_checks(void); 157extern void os_early_checks(void);
158extern int can_do_skas(void); 158extern int can_do_skas(void);
159 159
160/* mem.c */
161extern int create_mem_file(unsigned long len);
162
160/* process.c */ 163/* process.c */
161extern unsigned long os_process_pc(int pid); 164extern unsigned long os_process_pc(int pid);
162extern int os_process_parent(int pid); 165extern int os_process_parent(int pid);
@@ -181,6 +184,8 @@ extern unsigned long long os_usecs(void);
181/* tt.c 184/* tt.c
182 * for tt mode only (will be deleted in future...) 185 * for tt mode only (will be deleted in future...)
183 */ 186 */
187extern int protect_memory(unsigned long addr, unsigned long len,
188 int r, int w, int x, int must_succeed);
184extern void forward_pending_sigio(int target); 189extern void forward_pending_sigio(int target);
185extern int start_fork_tramp(void *arg, unsigned long temp_stack, 190extern int start_fork_tramp(void *arg, unsigned long temp_stack,
186 int clone_flags, int (*tramp)(void *)); 191 int clone_flags, int (*tramp)(void *));
diff --git a/arch/um/kernel/Makefile b/arch/um/kernel/Makefile
index 614b8ebeb0ed..1a0001b3850c 100644
--- a/arch/um/kernel/Makefile
+++ b/arch/um/kernel/Makefile
@@ -1,4 +1,4 @@
1# 1#
2# Copyright (C) 2002 Jeff Dike (jdike@karaya.com) 2# Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3# Licensed under the GPL 3# Licensed under the GPL
4# 4#
@@ -7,11 +7,11 @@ extra-y := vmlinux.lds
7clean-files := 7clean-files :=
8 8
9obj-y = config.o exec_kern.o exitcode.o \ 9obj-y = config.o exec_kern.o exitcode.o \
10 helper.o init_task.o irq.o irq_user.o ksyms.o main.o mem.o mem_user.o \ 10 helper.o init_task.o irq.o irq_user.o ksyms.o main.o mem.o physmem.o \
11 physmem.o process_kern.o ptrace.o reboot.o resource.o sigio_user.o \ 11 process_kern.o ptrace.o reboot.o resource.o sigio_user.o sigio_kern.o \
12 sigio_kern.o signal_kern.o signal_user.o smp.o syscall_kern.o sysrq.o \ 12 signal_kern.o signal_user.o smp.o syscall_kern.o sysrq.o time.o \
13 tempfile.o time.o time_kern.o tlb.o trap_kern.o trap_user.o \ 13 time_kern.o tlb.o trap_kern.o trap_user.o uaccess_user.o um_arch.o \
14 uaccess_user.o um_arch.o umid.o user_util.o 14 umid.o user_util.o
15 15
16obj-$(CONFIG_BLK_DEV_INITRD) += initrd.o 16obj-$(CONFIG_BLK_DEV_INITRD) += initrd.o
17obj-$(CONFIG_GPROF) += gprof_syms.o 17obj-$(CONFIG_GPROF) += gprof_syms.o
@@ -24,8 +24,8 @@ obj-$(CONFIG_MODE_SKAS) += skas/
24 24
25user-objs-$(CONFIG_TTY_LOG) += tty_log.o 25user-objs-$(CONFIG_TTY_LOG) += tty_log.o
26 26
27USER_OBJS := $(user-objs-y) config.o helper.o main.o tempfile.o time.o \ 27USER_OBJS := $(user-objs-y) config.o helper.o main.o time.o tty_log.o umid.o \
28 tty_log.o umid.o user_util.o 28 user_util.o
29 29
30include arch/um/scripts/Makefile.rules 30include arch/um/scripts/Makefile.rules
31 31
diff --git a/arch/um/kernel/helper.c b/arch/um/kernel/helper.c
index f83e1e8e2392..33fb0bd3b11a 100644
--- a/arch/um/kernel/helper.c
+++ b/arch/um/kernel/helper.c
@@ -85,8 +85,8 @@ int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv,
85 data.fd = fds[1]; 85 data.fd = fds[1];
86 pid = clone(helper_child, (void *) sp, CLONE_VM | SIGCHLD, &data); 86 pid = clone(helper_child, (void *) sp, CLONE_VM | SIGCHLD, &data);
87 if(pid < 0){ 87 if(pid < 0){
88 printk("run_helper : clone failed, errno = %d\n", errno);
89 ret = -errno; 88 ret = -errno;
89 printk("run_helper : clone failed, errno = %d\n", errno);
90 goto out_close; 90 goto out_close;
91 } 91 }
92 92
@@ -122,7 +122,7 @@ int run_helper_thread(int (*proc)(void *), void *arg, unsigned int flags,
122 unsigned long *stack_out, int stack_order) 122 unsigned long *stack_out, int stack_order)
123{ 123{
124 unsigned long stack, sp; 124 unsigned long stack, sp;
125 int pid, status; 125 int pid, status, err;
126 126
127 stack = alloc_stack(stack_order, um_in_interrupt()); 127 stack = alloc_stack(stack_order, um_in_interrupt());
128 if(stack == 0) return(-ENOMEM); 128 if(stack == 0) return(-ENOMEM);
@@ -130,16 +130,18 @@ int run_helper_thread(int (*proc)(void *), void *arg, unsigned int flags,
130 sp = stack + (page_size() << stack_order) - sizeof(void *); 130 sp = stack + (page_size() << stack_order) - sizeof(void *);
131 pid = clone(proc, (void *) sp, flags | SIGCHLD, arg); 131 pid = clone(proc, (void *) sp, flags | SIGCHLD, arg);
132 if(pid < 0){ 132 if(pid < 0){
133 err = -errno;
133 printk("run_helper_thread : clone failed, errno = %d\n", 134 printk("run_helper_thread : clone failed, errno = %d\n",
134 errno); 135 errno);
135 return(-errno); 136 return err;
136 } 137 }
137 if(stack_out == NULL){ 138 if(stack_out == NULL){
138 CATCH_EINTR(pid = waitpid(pid, &status, 0)); 139 CATCH_EINTR(pid = waitpid(pid, &status, 0));
139 if(pid < 0){ 140 if(pid < 0){
141 err = -errno;
140 printk("run_helper_thread - wait failed, errno = %d\n", 142 printk("run_helper_thread - wait failed, errno = %d\n",
141 errno); 143 errno);
142 pid = -errno; 144 pid = err;
143 } 145 }
144 if(!WIFEXITED(status) || (WEXITSTATUS(status) != 0)) 146 if(!WIFEXITED(status) || (WEXITSTATUS(status) != 0))
145 printk("run_helper_thread - thread returned status " 147 printk("run_helper_thread - thread returned status "
@@ -156,8 +158,8 @@ int helper_wait(int pid)
156 158
157 CATCH_EINTR(ret = waitpid(pid, NULL, WNOHANG)); 159 CATCH_EINTR(ret = waitpid(pid, NULL, WNOHANG));
158 if(ret < 0){ 160 if(ret < 0){
161 ret = -errno;
159 printk("helper_wait : waitpid failed, errno = %d\n", errno); 162 printk("helper_wait : waitpid failed, errno = %d\n", errno);
160 return(-errno);
161 } 163 }
162 return(ret); 164 return(ret);
163} 165}
diff --git a/arch/um/kernel/init_task.c b/arch/um/kernel/init_task.c
index cd7c85be0a1b..49ed5ddf0704 100644
--- a/arch/um/kernel/init_task.c
+++ b/arch/um/kernel/init_task.c
@@ -13,6 +13,7 @@
13#include "asm/pgtable.h" 13#include "asm/pgtable.h"
14#include "user_util.h" 14#include "user_util.h"
15#include "mem_user.h" 15#include "mem_user.h"
16#include "os.h"
16 17
17static struct fs_struct init_fs = INIT_FS; 18static struct fs_struct init_fs = INIT_FS;
18struct mm_struct init_mm = INIT_MM(init_mm); 19struct mm_struct init_mm = INIT_MM(init_mm);
@@ -45,8 +46,8 @@ __attribute__((__section__(".data.init_task"))) =
45 46
46void unprotect_stack(unsigned long stack) 47void unprotect_stack(unsigned long stack)
47{ 48{
48 protect_memory(stack, (1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE, 49 os_protect_memory((void *) stack, (1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE,
49 1, 1, 0, 1); 50 1, 1, 0);
50} 51}
51 52
52/* 53/*
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c
index 64fa062cc119..ea008b031a8f 100644
--- a/arch/um/kernel/mem.c
+++ b/arch/um/kernel/mem.c
@@ -1,4 +1,4 @@
1/* 1/*
2 * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com) 2 * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com)
3 * Licensed under the GPL 3 * Licensed under the GPL
4 */ 4 */
@@ -19,6 +19,10 @@
19#include "mem_user.h" 19#include "mem_user.h"
20#include "uml_uaccess.h" 20#include "uml_uaccess.h"
21#include "os.h" 21#include "os.h"
22#include "linux/types.h"
23#include "linux/string.h"
24#include "init.h"
25#include "kern_constants.h"
22 26
23extern char __binary_start; 27extern char __binary_start;
24 28
@@ -368,6 +372,16 @@ struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address)
368 return pte; 372 return pte;
369} 373}
370 374
375struct iomem_region *iomem_regions = NULL;
376int iomem_size = 0;
377
378extern int parse_iomem(char *str, int *add) __init;
379
380__uml_setup("iomem=", parse_iomem,
381"iomem=<name>,<file>\n"
382" Configure <file> as an IO memory region named <name>.\n\n"
383);
384
371/* 385/*
372 * Overrides for Emacs so that we follow Linus's tabbing style. 386 * Overrides for Emacs so that we follow Linus's tabbing style.
373 * Emacs will notice this stuff at the end of the file and automatically 387 * Emacs will notice this stuff at the end of the file and automatically
diff --git a/arch/um/kernel/mem_user.c b/arch/um/kernel/mem_user.c
deleted file mode 100644
index 4a663fd434bb..000000000000
--- a/arch/um/kernel/mem_user.c
+++ /dev/null
@@ -1,273 +0,0 @@
1/*
2 * arch/um/kernel/mem_user.c
3 *
4 * BRIEF MODULE DESCRIPTION
5 * user side memory routines for supporting IO memory inside user mode linux
6 *
7 * Copyright (C) 2001 RidgeRun, Inc.
8 * Author: RidgeRun, Inc.
9 * Greg Lonnon glonnon@ridgerun.com or info@ridgerun.com
10 *
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the
13 * Free Software Foundation; either version 2 of the License, or (at your
14 * option) any later version.
15 *
16 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
19 * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
22 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
23 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 *
27 * You should have received a copy of the GNU General Public License along
28 * with this program; if not, write to the Free Software Foundation, Inc.,
29 * 675 Mass Ave, Cambridge, MA 02139, USA.
30 */
31
32#include <stdio.h>
33#include <stdlib.h>
34#include <stddef.h>
35#include <stdarg.h>
36#include <unistd.h>
37#include <errno.h>
38#include <string.h>
39#include <fcntl.h>
40#include <sys/types.h>
41#include <sys/mman.h>
42#include "kern_util.h"
43#include "user.h"
44#include "user_util.h"
45#include "mem_user.h"
46#include "init.h"
47#include "os.h"
48#include "tempfile.h"
49#include "kern_constants.h"
50
51#define TEMPNAME_TEMPLATE "vm_file-XXXXXX"
52
53static int create_tmp_file(unsigned long len)
54{
55 int fd, err;
56 char zero;
57
58 fd = make_tempfile(TEMPNAME_TEMPLATE, NULL, 1);
59 if(fd < 0) {
60 os_print_error(fd, "make_tempfile");
61 exit(1);
62 }
63
64 err = os_mode_fd(fd, 0777);
65 if(err < 0){
66 os_print_error(err, "os_mode_fd");
67 exit(1);
68 }
69 err = os_seek_file(fd, len);
70 if(err < 0){
71 os_print_error(err, "os_seek_file");
72 exit(1);
73 }
74 zero = 0;
75 err = os_write_file(fd, &zero, 1);
76 if(err != 1){
77 os_print_error(err, "os_write_file");
78 exit(1);
79 }
80
81 return(fd);
82}
83
84void check_tmpexec(void)
85{
86 void *addr;
87 int err, fd = create_tmp_file(UM_KERN_PAGE_SIZE);
88
89 addr = mmap(NULL, UM_KERN_PAGE_SIZE,
90 PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE, fd, 0);
91 printf("Checking PROT_EXEC mmap in /tmp...");
92 fflush(stdout);
93 if(addr == MAP_FAILED){
94 err = errno;
95 perror("failed");
96 if(err == EPERM)
97 printf("/tmp must be not mounted noexec\n");
98 exit(1);
99 }
100 printf("OK\n");
101 munmap(addr, UM_KERN_PAGE_SIZE);
102
103 os_close_file(fd);
104}
105
106static int have_devanon = 0;
107
108void check_devanon(void)
109{
110 int fd;
111
112 printk("Checking for /dev/anon on the host...");
113 fd = open("/dev/anon", O_RDWR);
114 if(fd < 0){
115 printk("Not available (open failed with errno %d)\n", errno);
116 return;
117 }
118
119 printk("OK\n");
120 have_devanon = 1;
121}
122
123static int create_anon_file(unsigned long len)
124{
125 void *addr;
126 int fd;
127
128 fd = open("/dev/anon", O_RDWR);
129 if(fd < 0) {
130 os_print_error(fd, "opening /dev/anon");
131 exit(1);
132 }
133
134 addr = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
135 if(addr == MAP_FAILED){
136 perror("mapping physmem file");
137 exit(1);
138 }
139 munmap(addr, len);
140
141 return(fd);
142}
143
144int create_mem_file(unsigned long len)
145{
146 int err, fd;
147
148 if(have_devanon)
149 fd = create_anon_file(len);
150 else fd = create_tmp_file(len);
151
152 err = os_set_exec_close(fd, 1);
153 if(err < 0)
154 os_print_error(err, "exec_close");
155 return(fd);
156}
157
158struct iomem_region *iomem_regions = NULL;
159int iomem_size = 0;
160
161static int __init parse_iomem(char *str, int *add)
162{
163 struct iomem_region *new;
164 struct uml_stat buf;
165 char *file, *driver;
166 int fd, err, size;
167
168 driver = str;
169 file = strchr(str,',');
170 if(file == NULL){
171 printf("parse_iomem : failed to parse iomem\n");
172 goto out;
173 }
174 *file = '\0';
175 file++;
176 fd = os_open_file(file, of_rdwr(OPENFLAGS()), 0);
177 if(fd < 0){
178 os_print_error(fd, "parse_iomem - Couldn't open io file");
179 goto out;
180 }
181
182 err = os_stat_fd(fd, &buf);
183 if(err < 0){
184 os_print_error(err, "parse_iomem - cannot stat_fd file");
185 goto out_close;
186 }
187
188 new = malloc(sizeof(*new));
189 if(new == NULL){
190 perror("Couldn't allocate iomem_region struct");
191 goto out_close;
192 }
193
194 size = (buf.ust_size + UM_KERN_PAGE_SIZE) & ~(UM_KERN_PAGE_SIZE - 1);
195
196 *new = ((struct iomem_region) { .next = iomem_regions,
197 .driver = driver,
198 .fd = fd,
199 .size = size,
200 .phys = 0,
201 .virt = 0 });
202 iomem_regions = new;
203 iomem_size += new->size + UM_KERN_PAGE_SIZE;
204
205 return(0);
206 out_close:
207 os_close_file(fd);
208 out:
209 return(1);
210}
211
212__uml_setup("iomem=", parse_iomem,
213"iomem=<name>,<file>\n"
214" Configure <file> as an IO memory region named <name>.\n\n"
215);
216
217int protect_memory(unsigned long addr, unsigned long len, int r, int w, int x,
218 int must_succeed)
219{
220 int err;
221
222 err = os_protect_memory((void *) addr, len, r, w, x);
223 if(err < 0){
224 if(must_succeed)
225 panic("protect failed, err = %d", -err);
226 else return(err);
227 }
228 return(0);
229}
230
231#if 0
232/* Debugging facility for dumping stuff out to the host, avoiding the timing
233 * problems that come with printf and breakpoints.
234 * Enable in case of emergency.
235 */
236
237int logging = 1;
238int logging_fd = -1;
239
240int logging_line = 0;
241char logging_buf[512];
242
243void log(char *fmt, ...)
244{
245 va_list ap;
246 struct timeval tv;
247 struct openflags flags;
248
249 if(logging == 0) return;
250 if(logging_fd < 0){
251 flags = of_create(of_trunc(of_rdwr(OPENFLAGS())));
252 logging_fd = os_open_file("log", flags, 0644);
253 }
254 gettimeofday(&tv, NULL);
255 sprintf(logging_buf, "%d\t %u.%u ", logging_line++, tv.tv_sec,
256 tv.tv_usec);
257 va_start(ap, fmt);
258 vsprintf(&logging_buf[strlen(logging_buf)], fmt, ap);
259 va_end(ap);
260 write(logging_fd, logging_buf, strlen(logging_buf));
261}
262#endif
263
264/*
265 * Overrides for Emacs so that we follow Linus's tabbing style.
266 * Emacs will notice this stuff at the end of the file and automatically
267 * adjust the settings for this buffer only. This must remain at the end
268 * of the file.
269 * ---------------------------------------------------------------------------
270 * Local variables:
271 * c-file-style: "linux"
272 * End:
273 */
diff --git a/arch/um/kernel/process_kern.c b/arch/um/kernel/process_kern.c
index c23d8a08d0ff..39cf568ccfaf 100644
--- a/arch/um/kernel/process_kern.c
+++ b/arch/um/kernel/process_kern.c
@@ -113,8 +113,23 @@ void set_current(void *t)
113 113
114void *_switch_to(void *prev, void *next, void *last) 114void *_switch_to(void *prev, void *next, void *last)
115{ 115{
116 return(CHOOSE_MODE(switch_to_tt(prev, next), 116 struct task_struct *from = prev;
117 switch_to_skas(prev, next))); 117 struct task_struct *to= next;
118
119 to->thread.prev_sched = from;
120 set_current(to);
121
122 do {
123 current->thread.saved_task = NULL ;
124 CHOOSE_MODE_PROC(switch_to_tt, switch_to_skas, prev, next);
125 if(current->thread.saved_task)
126 show_regs(&(current->thread.regs));
127 next= current->thread.saved_task;
128 prev= current;
129 } while(current->thread.saved_task);
130
131 return(current->thread.prev_sched);
132
118} 133}
119 134
120void interrupt_end(void) 135void interrupt_end(void)
diff --git a/arch/um/kernel/skas/include/mode_kern-skas.h b/arch/um/kernel/skas/include/mode_kern-skas.h
index e48490028111..c97a80dfe370 100644
--- a/arch/um/kernel/skas/include/mode_kern-skas.h
+++ b/arch/um/kernel/skas/include/mode_kern-skas.h
@@ -11,7 +11,7 @@
11#include "asm/ptrace.h" 11#include "asm/ptrace.h"
12 12
13extern void flush_thread_skas(void); 13extern void flush_thread_skas(void);
14extern void *switch_to_skas(void *prev, void *next); 14extern void switch_to_skas(void *prev, void *next);
15extern void start_thread_skas(struct pt_regs *regs, unsigned long eip, 15extern void start_thread_skas(struct pt_regs *regs, unsigned long eip,
16 unsigned long esp); 16 unsigned long esp);
17extern int copy_thread_skas(int nr, unsigned long clone_flags, 17extern int copy_thread_skas(int nr, unsigned long clone_flags,
diff --git a/arch/um/kernel/skas/process_kern.c b/arch/um/kernel/skas/process_kern.c
index 3d1b227226e6..efe92e8aa2a9 100644
--- a/arch/um/kernel/skas/process_kern.c
+++ b/arch/um/kernel/skas/process_kern.c
@@ -24,7 +24,7 @@
24#include "proc_mm.h" 24#include "proc_mm.h"
25#include "registers.h" 25#include "registers.h"
26 26
27void *switch_to_skas(void *prev, void *next) 27void switch_to_skas(void *prev, void *next)
28{ 28{
29 struct task_struct *from, *to; 29 struct task_struct *from, *to;
30 30
@@ -35,16 +35,11 @@ void *switch_to_skas(void *prev, void *next)
35 if(current->pid == 0) 35 if(current->pid == 0)
36 switch_timers(0); 36 switch_timers(0);
37 37
38 to->thread.prev_sched = from;
39 set_current(to);
40
41 switch_threads(&from->thread.mode.skas.switch_buf, 38 switch_threads(&from->thread.mode.skas.switch_buf,
42 to->thread.mode.skas.switch_buf); 39 to->thread.mode.skas.switch_buf);
43 40
44 if(current->pid == 0) 41 if(current->pid == 0)
45 switch_timers(1); 42 switch_timers(1);
46
47 return(current->thread.prev_sched);
48} 43}
49 44
50extern void schedule_tail(struct task_struct *prev); 45extern void schedule_tail(struct task_struct *prev);
diff --git a/arch/um/kernel/tempfile.c b/arch/um/kernel/tempfile.c
deleted file mode 100644
index b1674bc1395d..000000000000
--- a/arch/um/kernel/tempfile.c
+++ /dev/null
@@ -1,82 +0,0 @@
1/*
2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
4 */
5
6#include <stdio.h>
7#include <stdlib.h>
8#include <unistd.h>
9#include <string.h>
10#include <errno.h>
11#include <sys/param.h>
12#include "init.h"
13
14/* Modified from create_mem_file and start_debugger */
15static char *tempdir = NULL;
16
17static void __init find_tempdir(void)
18{
19 char *dirs[] = { "TMP", "TEMP", "TMPDIR", NULL };
20 int i;
21 char *dir = NULL;
22
23 if(tempdir != NULL) return; /* We've already been called */
24 for(i = 0; dirs[i]; i++){
25 dir = getenv(dirs[i]);
26 if((dir != NULL) && (*dir != '\0'))
27 break;
28 }
29 if((dir == NULL) || (*dir == '\0'))
30 dir = "/tmp";
31
32 tempdir = malloc(strlen(dir) + 2);
33 if(tempdir == NULL){
34 fprintf(stderr, "Failed to malloc tempdir, "
35 "errno = %d\n", errno);
36 return;
37 }
38 strcpy(tempdir, dir);
39 strcat(tempdir, "/");
40}
41
42int make_tempfile(const char *template, char **out_tempname, int do_unlink)
43{
44 char tempname[MAXPATHLEN];
45 int fd;
46
47 find_tempdir();
48 if (*template != '/')
49 strcpy(tempname, tempdir);
50 else
51 *tempname = 0;
52 strcat(tempname, template);
53 fd = mkstemp(tempname);
54 if(fd < 0){
55 fprintf(stderr, "open - cannot create %s: %s\n", tempname,
56 strerror(errno));
57 return -1;
58 }
59 if(do_unlink && (unlink(tempname) < 0)){
60 perror("unlink");
61 return -1;
62 }
63 if(out_tempname){
64 *out_tempname = strdup(tempname);
65 if(*out_tempname == NULL){
66 perror("strdup");
67 return -1;
68 }
69 }
70 return(fd);
71}
72
73/*
74 * Overrides for Emacs so that we follow Linus's tabbing style.
75 * Emacs will notice this stuff at the end of the file and automatically
76 * adjust the settings for this buffer only. This must remain at the end
77 * of the file.
78 * ---------------------------------------------------------------------------
79 * Local variables:
80 * c-file-style: "linux"
81 * End:
82 */
diff --git a/arch/um/kernel/tlb.c b/arch/um/kernel/tlb.c
index 80ed6188e8a2..0a562c3c0fd8 100644
--- a/arch/um/kernel/tlb.c
+++ b/arch/um/kernel/tlb.c
@@ -307,7 +307,7 @@ int flush_tlb_kernel_range_common(unsigned long start, unsigned long end)
307 } 307 }
308 else if(pte_newprot(*pte)){ 308 else if(pte_newprot(*pte)){
309 updated = 1; 309 updated = 1;
310 protect_memory(addr, PAGE_SIZE, 1, 1, 1, 1); 310 os_protect_memory((void *) addr, PAGE_SIZE, 1, 1, 1);
311 } 311 }
312 addr += PAGE_SIZE; 312 addr += PAGE_SIZE;
313 } 313 }
diff --git a/arch/um/kernel/tt/include/mode_kern-tt.h b/arch/um/kernel/tt/include/mode_kern-tt.h
index e0ca0e0b2516..2a35b15c5fef 100644
--- a/arch/um/kernel/tt/include/mode_kern-tt.h
+++ b/arch/um/kernel/tt/include/mode_kern-tt.h
@@ -11,7 +11,7 @@
11#include "asm/ptrace.h" 11#include "asm/ptrace.h"
12#include "asm/uaccess.h" 12#include "asm/uaccess.h"
13 13
14extern void *switch_to_tt(void *prev, void *next); 14extern void switch_to_tt(void *prev, void *next);
15extern void flush_thread_tt(void); 15extern void flush_thread_tt(void);
16extern void start_thread_tt(struct pt_regs *regs, unsigned long eip, 16extern void start_thread_tt(struct pt_regs *regs, unsigned long eip,
17 unsigned long esp); 17 unsigned long esp);
diff --git a/arch/um/kernel/tt/mem_user.c b/arch/um/kernel/tt/mem_user.c
index 3085267459b1..03e589895388 100644
--- a/arch/um/kernel/tt/mem_user.c
+++ b/arch/um/kernel/tt/mem_user.c
@@ -12,6 +12,7 @@
12#include "tt.h" 12#include "tt.h"
13#include "mem_user.h" 13#include "mem_user.h"
14#include "user_util.h" 14#include "user_util.h"
15#include "os.h"
15 16
16void remap_data(void *segment_start, void *segment_end, int w) 17void remap_data(void *segment_start, void *segment_end, int w)
17{ 18{
diff --git a/arch/um/kernel/tt/process_kern.c b/arch/um/kernel/tt/process_kern.c
index a189a2b92935..0de05a268b22 100644
--- a/arch/um/kernel/tt/process_kern.c
+++ b/arch/um/kernel/tt/process_kern.c
@@ -26,7 +26,7 @@
26#include "init.h" 26#include "init.h"
27#include "tt.h" 27#include "tt.h"
28 28
29void *switch_to_tt(void *prev, void *next, void *last) 29int switch_to_tt(void *prev, void *next, void *last)
30{ 30{
31 struct task_struct *from, *to, *prev_sched; 31 struct task_struct *from, *to, *prev_sched;
32 unsigned long flags; 32 unsigned long flags;
@@ -36,8 +36,6 @@ void *switch_to_tt(void *prev, void *next, void *last)
36 from = prev; 36 from = prev;
37 to = next; 37 to = next;
38 38
39 to->thread.prev_sched = from;
40
41 cpu = from->thread_info->cpu; 39 cpu = from->thread_info->cpu;
42 if(cpu == 0) 40 if(cpu == 0)
43 forward_interrupts(to->thread.mode.tt.extern_pid); 41 forward_interrupts(to->thread.mode.tt.extern_pid);
@@ -53,7 +51,6 @@ void *switch_to_tt(void *prev, void *next, void *last)
53 forward_pending_sigio(to->thread.mode.tt.extern_pid); 51 forward_pending_sigio(to->thread.mode.tt.extern_pid);
54 52
55 c = 0; 53 c = 0;
56 set_current(to);
57 54
58 err = os_write_file(to->thread.mode.tt.switch_pipe[1], &c, sizeof(c)); 55 err = os_write_file(to->thread.mode.tt.switch_pipe[1], &c, sizeof(c));
59 if(err != sizeof(c)) 56 if(err != sizeof(c))
@@ -85,8 +82,6 @@ void *switch_to_tt(void *prev, void *next, void *last)
85 82
86 flush_tlb_all(); 83 flush_tlb_all();
87 local_irq_restore(flags); 84 local_irq_restore(flags);
88
89 return(current->thread.prev_sched);
90} 85}
91 86
92void release_thread_tt(struct task_struct *task) 87void release_thread_tt(struct task_struct *task)
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c
index 09f6f7ce4695..f0a275947d34 100644
--- a/arch/um/kernel/um_arch.c
+++ b/arch/um/kernel/um_arch.c
@@ -361,11 +361,6 @@ int linux_main(int argc, char **argv)
361 uml_start = CHOOSE_MODE_PROC(set_task_sizes_tt, set_task_sizes_skas, 0, 361 uml_start = CHOOSE_MODE_PROC(set_task_sizes_tt, set_task_sizes_skas, 0,
362 &host_task_size, &task_size); 362 &host_task_size, &task_size);
363 363
364 /* Need to check this early because mmapping happens before the
365 * kernel is running.
366 */
367 check_tmpexec();
368
369 brk_start = (unsigned long) sbrk(0); 364 brk_start = (unsigned long) sbrk(0);
370 CHOOSE_MODE_PROC(before_mem_tt, before_mem_skas, brk_start); 365 CHOOSE_MODE_PROC(before_mem_tt, before_mem_skas, brk_start);
371 /* Increase physical memory size for exec-shield users 366 /* Increase physical memory size for exec-shield users
diff --git a/arch/um/kernel/user_util.c b/arch/um/kernel/user_util.c
index 954ff67cc8b3..a25f3ea11fd7 100644
--- a/arch/um/kernel/user_util.c
+++ b/arch/um/kernel/user_util.c
@@ -109,18 +109,14 @@ int raw(int fd)
109 int err; 109 int err;
110 110
111 CATCH_EINTR(err = tcgetattr(fd, &tt)); 111 CATCH_EINTR(err = tcgetattr(fd, &tt));
112 if (err < 0) { 112 if(err < 0)
113 printk("tcgetattr failed, errno = %d\n", errno); 113 return -errno;
114 return(-errno);
115 }
116 114
117 cfmakeraw(&tt); 115 cfmakeraw(&tt);
118 116
119 CATCH_EINTR(err = tcsetattr(fd, TCSADRAIN, &tt)); 117 CATCH_EINTR(err = tcsetattr(fd, TCSADRAIN, &tt));
120 if (err < 0) { 118 if(err < 0)
121 printk("tcsetattr failed, errno = %d\n", errno); 119 return -errno;
122 return(-errno);
123 }
124 120
125 /* XXX tcsetattr could have applied only some changes 121 /* XXX tcsetattr could have applied only some changes
126 * (and cfmakeraw() is a set of changes) */ 122 * (and cfmakeraw() is a set of changes) */
diff --git a/arch/um/os-Linux/Makefile b/arch/um/os-Linux/Makefile
index 7a1662419c0c..d15ec2af6a22 100644
--- a/arch/um/os-Linux/Makefile
+++ b/arch/um/os-Linux/Makefile
@@ -3,11 +3,11 @@
3# Licensed under the GPL 3# Licensed under the GPL
4# 4#
5 5
6obj-y = aio.o elf_aux.o file.o process.o signal.o start_up.o time.o tt.o \ 6obj-y = aio.o elf_aux.o file.o mem.o process.o signal.o start_up.o time.o \
7 tty.o user_syms.o drivers/ sys-$(SUBARCH)/ 7 tt.o tty.o user_syms.o drivers/ sys-$(SUBARCH)/
8 8
9USER_OBJS := aio.o elf_aux.o file.o process.o signal.o start_up.o time.o tt.o \ 9USER_OBJS := aio.o elf_aux.o file.o mem.o process.o signal.o start_up.o \
10 tty.o 10 time.o tt.o tty.o
11 11
12elf_aux.o: $(ARCH_DIR)/kernel-offsets.h 12elf_aux.o: $(ARCH_DIR)/kernel-offsets.h
13CFLAGS_elf_aux.o += -I$(objtree)/arch/um 13CFLAGS_elf_aux.o += -I$(objtree)/arch/um
diff --git a/arch/um/os-Linux/aio.c b/arch/um/os-Linux/aio.c
index b04897cd995d..298d5632128b 100644
--- a/arch/um/os-Linux/aio.c
+++ b/arch/um/os-Linux/aio.c
@@ -117,6 +117,8 @@ static int do_aio(aio_context_t ctx, struct aio_context *aio)
117 err = io_submit(ctx, 1, &iocbp); 117 err = io_submit(ctx, 1, &iocbp);
118 if(err > 0) 118 if(err > 0)
119 err = 0; 119 err = 0;
120 else
121 err = -errno;
120 122
121 out: 123 out:
122 return err; 124 return err;
@@ -142,7 +144,7 @@ static int aio_thread(void *arg)
142 "errno = %d\n", errno); 144 "errno = %d\n", errno);
143 } 145 }
144 else { 146 else {
145 aio = (struct aio_context *) event.data; 147 aio = (struct aio_context *) (long) event.data;
146 if(update_aio(aio, event.res)){ 148 if(update_aio(aio, event.res)){
147 do_aio(ctx, aio); 149 do_aio(ctx, aio);
148 continue; 150 continue;
@@ -313,15 +315,16 @@ static int init_aio_26(void)
313 int err; 315 int err;
314 316
315 if(io_setup(256, &ctx)){ 317 if(io_setup(256, &ctx)){
318 err = -errno;
316 printk("aio_thread failed to initialize context, err = %d\n", 319 printk("aio_thread failed to initialize context, err = %d\n",
317 errno); 320 errno);
318 return -errno; 321 return err;
319 } 322 }
320 323
321 err = run_helper_thread(aio_thread, NULL, 324 err = run_helper_thread(aio_thread, NULL,
322 CLONE_FILES | CLONE_VM | SIGCHLD, &stack, 0); 325 CLONE_FILES | CLONE_VM | SIGCHLD, &stack, 0);
323 if(err < 0) 326 if(err < 0)
324 return -errno; 327 return err;
325 328
326 aio_pid = err; 329 aio_pid = err;
327 330
diff --git a/arch/um/os-Linux/drivers/tuntap_user.c b/arch/um/os-Linux/drivers/tuntap_user.c
index 4b83c6c3f48d..4ba9b17adf13 100644
--- a/arch/um/os-Linux/drivers/tuntap_user.c
+++ b/arch/um/os-Linux/drivers/tuntap_user.c
@@ -75,7 +75,7 @@ static int tuntap_open_tramp(char *gate, int *fd_out, int me, int remote,
75 struct msghdr msg; 75 struct msghdr msg;
76 struct cmsghdr *cmsg; 76 struct cmsghdr *cmsg;
77 struct iovec iov; 77 struct iovec iov;
78 int pid, n; 78 int pid, n, err;
79 79
80 sprintf(version_buf, "%d", UML_NET_VERSION); 80 sprintf(version_buf, "%d", UML_NET_VERSION);
81 81
@@ -105,9 +105,10 @@ static int tuntap_open_tramp(char *gate, int *fd_out, int me, int remote,
105 n = recvmsg(me, &msg, 0); 105 n = recvmsg(me, &msg, 0);
106 *used_out = n; 106 *used_out = n;
107 if(n < 0){ 107 if(n < 0){
108 err = -errno;
108 printk("tuntap_open_tramp : recvmsg failed - errno = %d\n", 109 printk("tuntap_open_tramp : recvmsg failed - errno = %d\n",
109 errno); 110 errno);
110 return(-errno); 111 return err;
111 } 112 }
112 CATCH_EINTR(waitpid(pid, NULL, 0)); 113 CATCH_EINTR(waitpid(pid, NULL, 0));
113 114
@@ -147,9 +148,10 @@ static int tuntap_open(void *data)
147 ifr.ifr_flags = IFF_TAP | IFF_NO_PI; 148 ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
148 strlcpy(ifr.ifr_name, pri->dev_name, sizeof(ifr.ifr_name)); 149 strlcpy(ifr.ifr_name, pri->dev_name, sizeof(ifr.ifr_name));
149 if(ioctl(pri->fd, TUNSETIFF, (void *) &ifr) < 0){ 150 if(ioctl(pri->fd, TUNSETIFF, (void *) &ifr) < 0){
151 err = -errno;
150 printk("TUNSETIFF failed, errno = %d\n", errno); 152 printk("TUNSETIFF failed, errno = %d\n", errno);
151 os_close_file(pri->fd); 153 os_close_file(pri->fd);
152 return(-errno); 154 return err;
153 } 155 }
154 } 156 }
155 else { 157 else {
diff --git a/arch/um/os-Linux/elf_aux.c b/arch/um/os-Linux/elf_aux.c
index 1399520a8588..e770cb029578 100644
--- a/arch/um/os-Linux/elf_aux.c
+++ b/arch/um/os-Linux/elf_aux.c
@@ -54,7 +54,8 @@ __init void scan_elf_aux( char **envp)
54 * a_un, so we have to use a_val, which is 54 * a_un, so we have to use a_val, which is
55 * all that's left. 55 * all that's left.
56 */ 56 */
57 elf_aux_platform = (char *) auxv->a_un.a_val; 57 elf_aux_platform =
58 (char *) (long) auxv->a_un.a_val;
58 break; 59 break;
59 case AT_PAGESZ: 60 case AT_PAGESZ:
60 page_size = auxv->a_un.a_val; 61 page_size = auxv->a_un.a_val;
diff --git a/arch/um/os-Linux/file.c b/arch/um/os-Linux/file.c
index fd45bb260907..f55773c819e6 100644
--- a/arch/um/os-Linux/file.c
+++ b/arch/um/os-Linux/file.c
@@ -119,15 +119,11 @@ int os_window_size(int fd, int *rows, int *cols)
119 119
120int os_new_tty_pgrp(int fd, int pid) 120int os_new_tty_pgrp(int fd, int pid)
121{ 121{
122 if(ioctl(fd, TIOCSCTTY, 0) < 0){ 122 if(ioctl(fd, TIOCSCTTY, 0) < 0)
123 printk("TIOCSCTTY failed, errno = %d\n", errno); 123 return -errno;
124 return(-errno);
125 }
126 124
127 if(tcsetpgrp(fd, pid) < 0){ 125 if(tcsetpgrp(fd, pid) < 0)
128 printk("tcsetpgrp failed, errno = %d\n", errno); 126 return -errno;
129 return(-errno);
130 }
131 127
132 return(0); 128 return(0);
133} 129}
@@ -146,18 +142,12 @@ int os_set_slip(int fd)
146 int disc, sencap; 142 int disc, sencap;
147 143
148 disc = N_SLIP; 144 disc = N_SLIP;
149 if(ioctl(fd, TIOCSETD, &disc) < 0){ 145 if(ioctl(fd, TIOCSETD, &disc) < 0)
150 printk("Failed to set slip line discipline - " 146 return -errno;
151 "errno = %d\n", errno);
152 return(-errno);
153 }
154 147
155 sencap = 0; 148 sencap = 0;
156 if(ioctl(fd, SIOCSIFENCAP, &sencap) < 0){ 149 if(ioctl(fd, SIOCSIFENCAP, &sencap) < 0)
157 printk("Failed to set slip encapsulation - " 150 return -errno;
158 "errno = %d\n", errno);
159 return(-errno);
160 }
161 151
162 return(0); 152 return(0);
163} 153}
@@ -180,22 +170,15 @@ int os_sigio_async(int master, int slave)
180 int flags; 170 int flags;
181 171
182 flags = fcntl(master, F_GETFL); 172 flags = fcntl(master, F_GETFL);
183 if(flags < 0) { 173 if(flags < 0)
184 printk("fcntl F_GETFL failed, errno = %d\n", errno); 174 return errno;
185 return(-errno);
186 }
187 175
188 if((fcntl(master, F_SETFL, flags | O_NONBLOCK | O_ASYNC) < 0) || 176 if((fcntl(master, F_SETFL, flags | O_NONBLOCK | O_ASYNC) < 0) ||
189 (fcntl(master, F_SETOWN, os_getpid()) < 0)){ 177 (fcntl(master, F_SETOWN, os_getpid()) < 0))
190 printk("fcntl F_SETFL or F_SETOWN failed, errno = %d\n", 178 return -errno;
191 errno);
192 return(-errno);
193 }
194 179
195 if((fcntl(slave, F_SETFL, flags | O_NONBLOCK) < 0)){ 180 if((fcntl(slave, F_SETFL, flags | O_NONBLOCK) < 0))
196 printk("fcntl F_SETFL failed, errno = %d\n", errno); 181 return -errno;
197 return(-errno);
198 }
199 182
200 return(0); 183 return(0);
201} 184}
@@ -255,7 +238,7 @@ int os_file_mode(char *file, struct openflags *mode_out)
255 238
256int os_open_file(char *file, struct openflags flags, int mode) 239int os_open_file(char *file, struct openflags flags, int mode)
257{ 240{
258 int fd, f = 0; 241 int fd, err, f = 0;
259 242
260 if(flags.r && flags.w) f = O_RDWR; 243 if(flags.r && flags.w) f = O_RDWR;
261 else if(flags.r) f = O_RDONLY; 244 else if(flags.r) f = O_RDONLY;
@@ -272,8 +255,9 @@ int os_open_file(char *file, struct openflags flags, int mode)
272 return(-errno); 255 return(-errno);
273 256
274 if(flags.cl && fcntl(fd, F_SETFD, 1)){ 257 if(flags.cl && fcntl(fd, F_SETFD, 1)){
258 err = -errno;
275 os_close_file(fd); 259 os_close_file(fd);
276 return(-errno); 260 return err;
277 } 261 }
278 262
279 return(fd); 263 return(fd);
@@ -383,9 +367,9 @@ int os_file_size(char *file, unsigned long long *size_out)
383 return(fd); 367 return(fd);
384 } 368 }
385 if(ioctl(fd, BLKGETSIZE, &blocks) < 0){ 369 if(ioctl(fd, BLKGETSIZE, &blocks) < 0){
370 err = -errno;
386 printk("Couldn't get the block size of \"%s\", " 371 printk("Couldn't get the block size of \"%s\", "
387 "errno = %d\n", file, errno); 372 "errno = %d\n", file, errno);
388 err = -errno;
389 os_close_file(fd); 373 os_close_file(fd);
390 return(err); 374 return(err);
391 } 375 }
@@ -473,11 +457,14 @@ int os_pipe(int *fds, int stream, int close_on_exec)
473 457
474int os_set_fd_async(int fd, int owner) 458int os_set_fd_async(int fd, int owner)
475{ 459{
460 int err;
461
476 /* XXX This should do F_GETFL first */ 462 /* XXX This should do F_GETFL first */
477 if(fcntl(fd, F_SETFL, O_ASYNC | O_NONBLOCK) < 0){ 463 if(fcntl(fd, F_SETFL, O_ASYNC | O_NONBLOCK) < 0){
464 err = -errno;
478 printk("os_set_fd_async : failed to set O_ASYNC and " 465 printk("os_set_fd_async : failed to set O_ASYNC and "
479 "O_NONBLOCK on fd # %d, errno = %d\n", fd, errno); 466 "O_NONBLOCK on fd # %d, errno = %d\n", fd, errno);
480 return(-errno); 467 return err;
481 } 468 }
482#ifdef notdef 469#ifdef notdef
483 if(fcntl(fd, F_SETFD, 1) < 0){ 470 if(fcntl(fd, F_SETFD, 1) < 0){
@@ -488,10 +475,11 @@ int os_set_fd_async(int fd, int owner)
488 475
489 if((fcntl(fd, F_SETSIG, SIGIO) < 0) || 476 if((fcntl(fd, F_SETSIG, SIGIO) < 0) ||
490 (fcntl(fd, F_SETOWN, owner) < 0)){ 477 (fcntl(fd, F_SETOWN, owner) < 0)){
478 err = -errno;
491 printk("os_set_fd_async : Failed to fcntl F_SETOWN " 479 printk("os_set_fd_async : Failed to fcntl F_SETOWN "
492 "(or F_SETSIG) fd %d to pid %d, errno = %d\n", fd, 480 "(or F_SETSIG) fd %d to pid %d, errno = %d\n", fd,
493 owner, errno); 481 owner, errno);
494 return(-errno); 482 return err;
495 } 483 }
496 484
497 return(0); 485 return(0);
@@ -516,11 +504,9 @@ int os_set_fd_block(int fd, int blocking)
516 if(blocking) flags &= ~O_NONBLOCK; 504 if(blocking) flags &= ~O_NONBLOCK;
517 else flags |= O_NONBLOCK; 505 else flags |= O_NONBLOCK;
518 506
519 if(fcntl(fd, F_SETFL, flags) < 0){ 507 if(fcntl(fd, F_SETFL, flags) < 0)
520 printk("Failed to change blocking on fd # %d, errno = %d\n", 508 return -errno;
521 fd, errno); 509
522 return(-errno);
523 }
524 return(0); 510 return(0);
525} 511}
526 512
@@ -609,11 +595,8 @@ int os_create_unix_socket(char *file, int len, int close_on_exec)
609 int sock, err; 595 int sock, err;
610 596
611 sock = socket(PF_UNIX, SOCK_DGRAM, 0); 597 sock = socket(PF_UNIX, SOCK_DGRAM, 0);
612 if (sock < 0){ 598 if(sock < 0)
613 printk("create_unix_socket - socket failed, errno = %d\n", 599 return -errno;
614 errno);
615 return(-errno);
616 }
617 600
618 if(close_on_exec) { 601 if(close_on_exec) {
619 err = os_set_exec_close(sock, 1); 602 err = os_set_exec_close(sock, 1);
@@ -628,11 +611,8 @@ int os_create_unix_socket(char *file, int len, int close_on_exec)
628 snprintf(addr.sun_path, len, "%s", file); 611 snprintf(addr.sun_path, len, "%s", file);
629 612
630 err = bind(sock, (struct sockaddr *) &addr, sizeof(addr)); 613 err = bind(sock, (struct sockaddr *) &addr, sizeof(addr));
631 if (err < 0){ 614 if(err < 0)
632 printk("create_listening_socket at '%s' - bind failed, " 615 return -errno;
633 "errno = %d\n", file, errno);
634 return(-errno);
635 }
636 616
637 return(sock); 617 return(sock);
638} 618}
diff --git a/arch/um/os-Linux/mem.c b/arch/um/os-Linux/mem.c
new file mode 100644
index 000000000000..8e71edaaf80b
--- /dev/null
+++ b/arch/um/os-Linux/mem.c
@@ -0,0 +1,161 @@
1#include <stdio.h>
2#include <stdlib.h>
3#include <stddef.h>
4#include <stdarg.h>
5#include <unistd.h>
6#include <errno.h>
7#include <string.h>
8#include <fcntl.h>
9#include <sys/types.h>
10#include <sys/mman.h>
11#include "kern_util.h"
12#include "user.h"
13#include "user_util.h"
14#include "mem_user.h"
15#include "init.h"
16#include "os.h"
17#include "tempfile.h"
18#include "kern_constants.h"
19
20#include <sys/param.h>
21
22static char *tempdir = NULL;
23
24static void __init find_tempdir(void)
25{
26 char *dirs[] = { "TMP", "TEMP", "TMPDIR", NULL };
27 int i;
28 char *dir = NULL;
29
30 if(tempdir != NULL) return; /* We've already been called */
31 for(i = 0; dirs[i]; i++){
32 dir = getenv(dirs[i]);
33 if((dir != NULL) && (*dir != '\0'))
34 break;
35 }
36 if((dir == NULL) || (*dir == '\0'))
37 dir = "/tmp";
38
39 tempdir = malloc(strlen(dir) + 2);
40 if(tempdir == NULL){
41 fprintf(stderr, "Failed to malloc tempdir, "
42 "errno = %d\n", errno);
43 return;
44 }
45 strcpy(tempdir, dir);
46 strcat(tempdir, "/");
47}
48
49/*
50 * This proc still used in tt-mode
51 * (file: kernel/tt/ptproxy/proxy.c, proc: start_debugger).
52 * So it isn't 'static' yet.
53 */
54int make_tempfile(const char *template, char **out_tempname, int do_unlink)
55{
56 char tempname[MAXPATHLEN];
57 int fd;
58
59 find_tempdir();
60 if (*template != '/')
61 strcpy(tempname, tempdir);
62 else
63 *tempname = 0;
64 strcat(tempname, template);
65 fd = mkstemp(tempname);
66 if(fd < 0){
67 fprintf(stderr, "open - cannot create %s: %s\n", tempname,
68 strerror(errno));
69 return -1;
70 }
71 if(do_unlink && (unlink(tempname) < 0)){
72 perror("unlink");
73 return -1;
74 }
75 if(out_tempname){
76 *out_tempname = strdup(tempname);
77 if(*out_tempname == NULL){
78 perror("strdup");
79 return -1;
80 }
81 }
82 return(fd);
83}
84
85#define TEMPNAME_TEMPLATE "vm_file-XXXXXX"
86
87/*
88 * This proc is used in start_up.c
89 * So it isn't 'static'.
90 */
91int create_tmp_file(unsigned long len)
92{
93 int fd, err;
94 char zero;
95
96 fd = make_tempfile(TEMPNAME_TEMPLATE, NULL, 1);
97 if(fd < 0) {
98 exit(1);
99 }
100
101 err = fchmod(fd, 0777);
102 if(err < 0){
103 perror("os_mode_fd");
104 exit(1);
105 }
106
107 if (lseek64(fd, len, SEEK_SET) < 0) {
108 perror("os_seek_file");
109 exit(1);
110 }
111
112 zero = 0;
113
114 err = os_write_file(fd, &zero, 1);
115 if(err != 1){
116 errno = -err;
117 perror("os_write_file");
118 exit(1);
119 }
120
121 return(fd);
122}
123
124static int create_anon_file(unsigned long len)
125{
126 void *addr;
127 int fd;
128
129 fd = open("/dev/anon", O_RDWR);
130 if(fd < 0) {
131 perror("opening /dev/anon");
132 exit(1);
133 }
134
135 addr = mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
136 if(addr == MAP_FAILED){
137 perror("mapping physmem file");
138 exit(1);
139 }
140 munmap(addr, len);
141
142 return(fd);
143}
144
145extern int have_devanon;
146
147int create_mem_file(unsigned long len)
148{
149 int err, fd;
150
151 if(have_devanon)
152 fd = create_anon_file(len);
153 else fd = create_tmp_file(len);
154
155 err = os_set_exec_close(fd, 1);
156 if(err < 0){
157 errno = -err;
158 perror("exec_close");
159 }
160 return(fd);
161}
diff --git a/arch/um/os-Linux/start_up.c b/arch/um/os-Linux/start_up.c
index 040cc1472bc7..6af83171ca4e 100644
--- a/arch/um/os-Linux/start_up.c
+++ b/arch/um/os-Linux/start_up.c
@@ -4,18 +4,22 @@
4 */ 4 */
5 5
6#include <stdio.h> 6#include <stdio.h>
7#include <stddef.h>
8#include <stdarg.h>
9#include <stdlib.h>
10#include <string.h>
7#include <unistd.h> 11#include <unistd.h>
8#include <signal.h> 12#include <signal.h>
9#include <sched.h> 13#include <sched.h>
14#include <fcntl.h>
10#include <errno.h> 15#include <errno.h>
11#include <stdarg.h>
12#include <stdlib.h>
13#include <setjmp.h> 16#include <setjmp.h>
14#include <sys/time.h> 17#include <sys/time.h>
15#include <sys/wait.h> 18#include <sys/wait.h>
16#include <sys/mman.h> 19#include <sys/mman.h>
17#include <asm/unistd.h> 20#include <asm/unistd.h>
18#include <asm/page.h> 21#include <asm/page.h>
22#include <sys/types.h>
19#include "user_util.h" 23#include "user_util.h"
20#include "kern_util.h" 24#include "kern_util.h"
21#include "user.h" 25#include "user.h"
@@ -25,6 +29,7 @@
25#include "sysdep/sigcontext.h" 29#include "sysdep/sigcontext.h"
26#include "irq_user.h" 30#include "irq_user.h"
27#include "ptrace_user.h" 31#include "ptrace_user.h"
32#include "mem_user.h"
28#include "time_user.h" 33#include "time_user.h"
29#include "init.h" 34#include "init.h"
30#include "os.h" 35#include "os.h"
@@ -32,6 +37,8 @@
32#include "choose-mode.h" 37#include "choose-mode.h"
33#include "mode.h" 38#include "mode.h"
34#include "tempfile.h" 39#include "tempfile.h"
40#include "kern_constants.h"
41
35#ifdef UML_CONFIG_MODE_SKAS 42#ifdef UML_CONFIG_MODE_SKAS
36#include "skas.h" 43#include "skas.h"
37#include "skas_ptrace.h" 44#include "skas_ptrace.h"
@@ -276,9 +283,38 @@ static void __init check_ptrace(void)
276 check_sysemu(); 283 check_sysemu();
277} 284}
278 285
286extern int create_tmp_file(unsigned long len);
287
288static void check_tmpexec(void)
289{
290 void *addr;
291 int err, fd = create_tmp_file(UM_KERN_PAGE_SIZE);
292
293 addr = mmap(NULL, UM_KERN_PAGE_SIZE,
294 PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE, fd, 0);
295 printf("Checking PROT_EXEC mmap in /tmp...");
296 fflush(stdout);
297 if(addr == MAP_FAILED){
298 err = errno;
299 perror("failed");
300 if(err == EPERM)
301 printf("/tmp must be not mounted noexec\n");
302 exit(1);
303 }
304 printf("OK\n");
305 munmap(addr, UM_KERN_PAGE_SIZE);
306
307 close(fd);
308}
309
279void os_early_checks(void) 310void os_early_checks(void)
280{ 311{
281 check_ptrace(); 312 check_ptrace();
313
314 /* Need to check this early because mmapping happens before the
315 * kernel is running.
316 */
317 check_tmpexec();
282} 318}
283 319
284static int __init noprocmm_cmd_param(char *str, int* add) 320static int __init noprocmm_cmd_param(char *str, int* add)
@@ -357,3 +393,72 @@ int can_do_skas(void)
357 return(0); 393 return(0);
358} 394}
359#endif 395#endif
396
397int have_devanon = 0;
398
399void check_devanon(void)
400{
401 int fd;
402
403 printk("Checking for /dev/anon on the host...");
404 fd = open("/dev/anon", O_RDWR);
405 if(fd < 0){
406 printk("Not available (open failed with errno %d)\n", errno);
407 return;
408 }
409
410 printk("OK\n");
411 have_devanon = 1;
412}
413
414int __init parse_iomem(char *str, int *add)
415{
416 struct iomem_region *new;
417 struct uml_stat buf;
418 char *file, *driver;
419 int fd, err, size;
420
421 driver = str;
422 file = strchr(str,',');
423 if(file == NULL){
424 printf("parse_iomem : failed to parse iomem\n");
425 goto out;
426 }
427 *file = '\0';
428 file++;
429 fd = os_open_file(file, of_rdwr(OPENFLAGS()), 0);
430 if(fd < 0){
431 os_print_error(fd, "parse_iomem - Couldn't open io file");
432 goto out;
433 }
434
435 err = os_stat_fd(fd, &buf);
436 if(err < 0){
437 os_print_error(err, "parse_iomem - cannot stat_fd file");
438 goto out_close;
439 }
440
441 new = malloc(sizeof(*new));
442 if(new == NULL){
443 perror("Couldn't allocate iomem_region struct");
444 goto out_close;
445 }
446
447 size = (buf.ust_size + UM_KERN_PAGE_SIZE) & ~(UM_KERN_PAGE_SIZE - 1);
448
449 *new = ((struct iomem_region) { .next = iomem_regions,
450 .driver = driver,
451 .fd = fd,
452 .size = size,
453 .phys = 0,
454 .virt = 0 });
455 iomem_regions = new;
456 iomem_size += new->size + UM_KERN_PAGE_SIZE;
457
458 return(0);
459 out_close:
460 os_close_file(fd);
461 out:
462 return(1);
463}
464
diff --git a/arch/um/os-Linux/tt.c b/arch/um/os-Linux/tt.c
index 5b047ab8416a..a6db8877931a 100644
--- a/arch/um/os-Linux/tt.c
+++ b/arch/um/os-Linux/tt.c
@@ -36,6 +36,20 @@
36#include "mode.h" 36#include "mode.h"
37#include "tempfile.h" 37#include "tempfile.h"
38 38
39int protect_memory(unsigned long addr, unsigned long len, int r, int w, int x,
40 int must_succeed)
41{
42 int err;
43
44 err = os_protect_memory((void *) addr, len, r, w, x);
45 if(err < 0){
46 if(must_succeed)
47 panic("protect failed, err = %d", -err);
48 else return(err);
49 }
50 return(0);
51}
52
39/* 53/*
40 *------------------------- 54 *-------------------------
41 * only for tt mode (will be deleted in future...) 55 * only for tt mode (will be deleted in future...)
diff --git a/arch/x86_64/kernel/e820.c b/arch/x86_64/kernel/e820.c
index 4e34b0f9d613..ab3f87aaff70 100644
--- a/arch/x86_64/kernel/e820.c
+++ b/arch/x86_64/kernel/e820.c
@@ -17,6 +17,8 @@
17#include <linux/ioport.h> 17#include <linux/ioport.h>
18#include <linux/string.h> 18#include <linux/string.h>
19#include <linux/kexec.h> 19#include <linux/kexec.h>
20#include <linux/module.h>
21
20#include <asm/page.h> 22#include <asm/page.h>
21#include <asm/e820.h> 23#include <asm/e820.h>
22#include <asm/proto.h> 24#include <asm/proto.h>
diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c
index 351d8d64c2fb..238f73e1a834 100644
--- a/arch/x86_64/kernel/setup.c
+++ b/arch/x86_64/kernel/setup.c
@@ -831,11 +831,26 @@ static void __init amd_detect_cmp(struct cpuinfo_x86 *c)
831#endif 831#endif
832} 832}
833 833
834#define HWCR 0xc0010015
835
834static int __init init_amd(struct cpuinfo_x86 *c) 836static int __init init_amd(struct cpuinfo_x86 *c)
835{ 837{
836 int r; 838 int r;
837 int level; 839 int level;
838 840
841#ifdef CONFIG_SMP
842 unsigned long value;
843
844 // Disable TLB flush filter by setting HWCR.FFDIS:
845 // bit 6 of msr C001_0015
846 //
847 // Errata 63 for SH-B3 steppings
848 // Errata 122 for all(?) steppings
849 rdmsrl(HWCR, value);
850 value |= 1 << 6;
851 wrmsrl(HWCR, value);
852#endif
853
839 /* Bit 31 in normal CPUID used for nonstandard 3DNow ID; 854 /* Bit 31 in normal CPUID used for nonstandard 3DNow ID;
840 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway */ 855 3DNow is IDd by bit 31 in extended CPUID (1*32+31) anyway */
841 clear_bit(0*32+31, &c->x86_capability); 856 clear_bit(0*32+31, &c->x86_capability);