aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/configs/cell_defconfig40
-rw-r--r--arch/powerpc/configs/g5_defconfig58
-rw-r--r--arch/powerpc/configs/iseries_defconfig43
-rw-r--r--arch/powerpc/configs/pseries_defconfig54
-rw-r--r--arch/powerpc/kernel/cputable.c16
-rw-r--r--arch/powerpc/kernel/iommu.c36
-rw-r--r--arch/powerpc/kernel/kprobes.c14
-rw-r--r--arch/powerpc/kernel/module_64.c16
-rw-r--r--arch/powerpc/kernel/pci_iommu.c40
-rw-r--r--arch/powerpc/kernel/ppc_ksyms.c1
-rw-r--r--arch/powerpc/kernel/prom.c72
-rw-r--r--arch/powerpc/kernel/prom_init.c112
-rw-r--r--arch/powerpc/kernel/ptrace.c5
-rw-r--r--arch/powerpc/kernel/setup-common.c8
-rw-r--r--arch/powerpc/kernel/setup_64.c8
-rw-r--r--arch/powerpc/kernel/sysfs.c22
-rw-r--r--arch/powerpc/kernel/systbl.S19
-rw-r--r--arch/powerpc/kernel/vio.c6
-rw-r--r--arch/powerpc/mm/hugetlbpage.c295
-rw-r--r--arch/powerpc/mm/init_64.c7
-rw-r--r--arch/powerpc/mm/numa.c32
-rw-r--r--arch/powerpc/platforms/cell/Kconfig3
-rw-r--r--arch/powerpc/platforms/cell/setup.c78
-rw-r--r--arch/powerpc/platforms/cell/spu_base.c101
-rw-r--r--arch/powerpc/platforms/cell/spu_callbacks.c19
-rw-r--r--arch/powerpc/platforms/powermac/low_i2c.c78
-rw-r--r--arch/powerpc/platforms/powermac/pci.c2
-rw-r--r--arch/powerpc/platforms/pseries/eeh_event.c8
-rw-r--r--arch/powerpc/sysdev/dart_iommu.c12
29 files changed, 876 insertions, 329 deletions
diff --git a/arch/powerpc/configs/cell_defconfig b/arch/powerpc/configs/cell_defconfig
index fe22e54ab2b0..dbe421dc3c11 100644
--- a/arch/powerpc/configs/cell_defconfig
+++ b/arch/powerpc/configs/cell_defconfig
@@ -9,6 +9,7 @@ CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y 10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_RWSEM_XCHGADD_ALGORITHM=y 11CONFIG_RWSEM_XCHGADD_ALGORITHM=y
12CONFIG_GENERIC_HWEIGHT=y
12CONFIG_GENERIC_CALIBRATE_DELAY=y 13CONFIG_GENERIC_CALIBRATE_DELAY=y
13CONFIG_PPC=y 14CONFIG_PPC=y
14CONFIG_EARLY_PRINTK=y 15CONFIG_EARLY_PRINTK=y
@@ -55,6 +56,7 @@ CONFIG_SYSCTL=y
55CONFIG_IKCONFIG=y 56CONFIG_IKCONFIG=y
56CONFIG_IKCONFIG_PROC=y 57CONFIG_IKCONFIG_PROC=y
57# CONFIG_CPUSETS is not set 58# CONFIG_CPUSETS is not set
59# CONFIG_RELAY is not set
58CONFIG_INITRAMFS_SOURCE="" 60CONFIG_INITRAMFS_SOURCE=""
59CONFIG_CC_OPTIMIZE_FOR_SIZE=y 61CONFIG_CC_OPTIMIZE_FOR_SIZE=y
60# CONFIG_EMBEDDED is not set 62# CONFIG_EMBEDDED is not set
@@ -69,10 +71,6 @@ CONFIG_BASE_FULL=y
69CONFIG_FUTEX=y 71CONFIG_FUTEX=y
70CONFIG_EPOLL=y 72CONFIG_EPOLL=y
71CONFIG_SHMEM=y 73CONFIG_SHMEM=y
72CONFIG_CC_ALIGN_FUNCTIONS=0
73CONFIG_CC_ALIGN_LABELS=0
74CONFIG_CC_ALIGN_LOOPS=0
75CONFIG_CC_ALIGN_JUMPS=0
76CONFIG_SLAB=y 74CONFIG_SLAB=y
77# CONFIG_TINY_SHMEM is not set 75# CONFIG_TINY_SHMEM is not set
78CONFIG_BASE_SMALL=0 76CONFIG_BASE_SMALL=0
@@ -84,7 +82,6 @@ CONFIG_BASE_SMALL=0
84CONFIG_MODULES=y 82CONFIG_MODULES=y
85CONFIG_MODULE_UNLOAD=y 83CONFIG_MODULE_UNLOAD=y
86# CONFIG_MODULE_FORCE_UNLOAD is not set 84# CONFIG_MODULE_FORCE_UNLOAD is not set
87CONFIG_OBSOLETE_MODPARM=y
88# CONFIG_MODVERSIONS is not set 85# CONFIG_MODVERSIONS is not set
89# CONFIG_MODULE_SRCVERSION_ALL is not set 86# CONFIG_MODULE_SRCVERSION_ALL is not set
90CONFIG_KMOD=y 87CONFIG_KMOD=y
@@ -93,6 +90,7 @@ CONFIG_STOP_MACHINE=y
93# 90#
94# Block layer 91# Block layer
95# 92#
93# CONFIG_BLK_DEV_IO_TRACE is not set
96 94
97# 95#
98# IO Schedulers 96# IO Schedulers
@@ -126,6 +124,7 @@ CONFIG_RTAS_FLASH=y
126CONFIG_MMIO_NVRAM=y 124CONFIG_MMIO_NVRAM=y
127CONFIG_CELL_IIC=y 125CONFIG_CELL_IIC=y
128# CONFIG_PPC_MPC106 is not set 126# CONFIG_PPC_MPC106 is not set
127# CONFIG_PPC_970_NAP is not set
129# CONFIG_CPU_FREQ is not set 128# CONFIG_CPU_FREQ is not set
130# CONFIG_WANT_EARLY_SERIAL is not set 129# CONFIG_WANT_EARLY_SERIAL is not set
131 130
@@ -167,7 +166,6 @@ CONFIG_HAVE_MEMORY_PRESENT=y
167CONFIG_SPARSEMEM_EXTREME=y 166CONFIG_SPARSEMEM_EXTREME=y
168# CONFIG_MEMORY_HOTPLUG is not set 167# CONFIG_MEMORY_HOTPLUG is not set
169CONFIG_SPLIT_PTLOCK_CPUS=4 168CONFIG_SPLIT_PTLOCK_CPUS=4
170CONFIG_MIGRATION=y
171# CONFIG_PPC_64K_PAGES is not set 169# CONFIG_PPC_64K_PAGES is not set
172CONFIG_SCHED_SMT=y 170CONFIG_SCHED_SMT=y
173CONFIG_PROC_DEVICETREE=y 171CONFIG_PROC_DEVICETREE=y
@@ -184,7 +182,6 @@ CONFIG_GENERIC_ISA_DMA=y
184# CONFIG_PPC_INDIRECT_PCI is not set 182# CONFIG_PPC_INDIRECT_PCI is not set
185CONFIG_PCI=y 183CONFIG_PCI=y
186CONFIG_PCI_DOMAINS=y 184CONFIG_PCI_DOMAINS=y
187CONFIG_PCI_LEGACY_PROC=y
188# CONFIG_PCI_DEBUG is not set 185# CONFIG_PCI_DEBUG is not set
189 186
190# 187#
@@ -226,6 +223,7 @@ CONFIG_SYN_COOKIES=y
226# CONFIG_INET_AH is not set 223# CONFIG_INET_AH is not set
227# CONFIG_INET_ESP is not set 224# CONFIG_INET_ESP is not set
228# CONFIG_INET_IPCOMP is not set 225# CONFIG_INET_IPCOMP is not set
226# CONFIG_INET_XFRM_TUNNEL is not set
229CONFIG_INET_TUNNEL=y 227CONFIG_INET_TUNNEL=y
230CONFIG_INET_DIAG=y 228CONFIG_INET_DIAG=y
231CONFIG_INET_TCP_DIAG=y 229CONFIG_INET_TCP_DIAG=y
@@ -242,6 +240,7 @@ CONFIG_IPV6=y
242CONFIG_INET6_AH=m 240CONFIG_INET6_AH=m
243CONFIG_INET6_ESP=m 241CONFIG_INET6_ESP=m
244CONFIG_INET6_IPCOMP=m 242CONFIG_INET6_IPCOMP=m
243CONFIG_INET6_XFRM_TUNNEL=m
245CONFIG_INET6_TUNNEL=m 244CONFIG_INET6_TUNNEL=m
246CONFIG_IPV6_TUNNEL=m 245CONFIG_IPV6_TUNNEL=m
247CONFIG_NETFILTER=y 246CONFIG_NETFILTER=y
@@ -632,6 +631,7 @@ CONFIG_SERIAL_NONSTANDARD=y
632# 631#
633CONFIG_SERIAL_8250=y 632CONFIG_SERIAL_8250=y
634CONFIG_SERIAL_8250_CONSOLE=y 633CONFIG_SERIAL_8250_CONSOLE=y
634CONFIG_SERIAL_8250_PCI=y
635CONFIG_SERIAL_8250_NR_UARTS=4 635CONFIG_SERIAL_8250_NR_UARTS=4
636CONFIG_SERIAL_8250_RUNTIME_UARTS=4 636CONFIG_SERIAL_8250_RUNTIME_UARTS=4
637# CONFIG_SERIAL_8250_EXTENDED is not set 637# CONFIG_SERIAL_8250_EXTENDED is not set
@@ -717,7 +717,6 @@ CONFIG_I2C_ALGOBIT=y
717# CONFIG_I2C_PARPORT_LIGHT is not set 717# CONFIG_I2C_PARPORT_LIGHT is not set
718# CONFIG_I2C_PROSAVAGE is not set 718# CONFIG_I2C_PROSAVAGE is not set
719# CONFIG_I2C_SAVAGE4 is not set 719# CONFIG_I2C_SAVAGE4 is not set
720# CONFIG_SCx200_ACB is not set
721# CONFIG_I2C_SIS5595 is not set 720# CONFIG_I2C_SIS5595 is not set
722# CONFIG_I2C_SIS630 is not set 721# CONFIG_I2C_SIS630 is not set
723# CONFIG_I2C_SIS96X is not set 722# CONFIG_I2C_SIS96X is not set
@@ -736,9 +735,7 @@ CONFIG_I2C_ALGOBIT=y
736# CONFIG_SENSORS_PCF8574 is not set 735# CONFIG_SENSORS_PCF8574 is not set
737# CONFIG_SENSORS_PCA9539 is not set 736# CONFIG_SENSORS_PCA9539 is not set
738# CONFIG_SENSORS_PCF8591 is not set 737# CONFIG_SENSORS_PCF8591 is not set
739# CONFIG_SENSORS_RTC8564 is not set
740# CONFIG_SENSORS_MAX6875 is not set 738# CONFIG_SENSORS_MAX6875 is not set
741# CONFIG_RTC_X1205_I2C is not set
742# CONFIG_I2C_DEBUG_CORE is not set 739# CONFIG_I2C_DEBUG_CORE is not set
743# CONFIG_I2C_DEBUG_ALGO is not set 740# CONFIG_I2C_DEBUG_ALGO is not set
744# CONFIG_I2C_DEBUG_BUS is not set 741# CONFIG_I2C_DEBUG_BUS is not set
@@ -766,10 +763,6 @@ CONFIG_I2C_ALGOBIT=y
766# 763#
767 764
768# 765#
769# Multimedia Capabilities Port drivers
770#
771
772#
773# Multimedia devices 766# Multimedia devices
774# 767#
775# CONFIG_VIDEO_DEV is not set 768# CONFIG_VIDEO_DEV is not set
@@ -818,6 +811,19 @@ CONFIG_USB_ARCH_HAS_EHCI=y
818# CONFIG_MMC is not set 811# CONFIG_MMC is not set
819 812
820# 813#
814# LED devices
815#
816# CONFIG_NEW_LEDS is not set
817
818#
819# LED drivers
820#
821
822#
823# LED Triggers
824#
825
826#
821# InfiniBand support 827# InfiniBand support
822# 828#
823CONFIG_INFINIBAND=y 829CONFIG_INFINIBAND=y
@@ -834,6 +840,11 @@ CONFIG_INFINIBAND_IPOIB_DEBUG_DATA=y
834# 840#
835 841
836# 842#
843# Real Time Clock
844#
845# CONFIG_RTC_CLASS is not set
846
847#
837# File systems 848# File systems
838# 849#
839CONFIG_EXT2_FS=y 850CONFIG_EXT2_FS=y
@@ -889,7 +900,6 @@ CONFIG_TMPFS=y
889CONFIG_HUGETLBFS=y 900CONFIG_HUGETLBFS=y
890CONFIG_HUGETLB_PAGE=y 901CONFIG_HUGETLB_PAGE=y
891CONFIG_RAMFS=y 902CONFIG_RAMFS=y
892# CONFIG_RELAYFS_FS is not set
893# CONFIG_CONFIGFS_FS is not set 903# CONFIG_CONFIGFS_FS is not set
894 904
895# 905#
diff --git a/arch/powerpc/configs/g5_defconfig b/arch/powerpc/configs/g5_defconfig
index 2c3fd2007676..a45627547d03 100644
--- a/arch/powerpc/configs/g5_defconfig
+++ b/arch/powerpc/configs/g5_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.16-rc2 3# Linux kernel version: 2.6.17-rc1
4# Fri Feb 10 17:33:08 2006 4# Wed Apr 19 13:24:37 2006
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -9,6 +9,7 @@ CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y 10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_RWSEM_XCHGADD_ALGORITHM=y 11CONFIG_RWSEM_XCHGADD_ALGORITHM=y
12CONFIG_GENERIC_HWEIGHT=y
12CONFIG_GENERIC_CALIBRATE_DELAY=y 13CONFIG_GENERIC_CALIBRATE_DELAY=y
13CONFIG_PPC=y 14CONFIG_PPC=y
14CONFIG_EARLY_PRINTK=y 15CONFIG_EARLY_PRINTK=y
@@ -29,6 +30,7 @@ CONFIG_POWER4=y
29CONFIG_PPC_FPU=y 30CONFIG_PPC_FPU=y
30CONFIG_ALTIVEC=y 31CONFIG_ALTIVEC=y
31CONFIG_PPC_STD_MMU=y 32CONFIG_PPC_STD_MMU=y
33CONFIG_VIRT_CPU_ACCOUNTING=y
32CONFIG_SMP=y 34CONFIG_SMP=y
33CONFIG_NR_CPUS=4 35CONFIG_NR_CPUS=4
34 36
@@ -53,6 +55,7 @@ CONFIG_SYSCTL=y
53CONFIG_IKCONFIG=y 55CONFIG_IKCONFIG=y
54CONFIG_IKCONFIG_PROC=y 56CONFIG_IKCONFIG_PROC=y
55# CONFIG_CPUSETS is not set 57# CONFIG_CPUSETS is not set
58# CONFIG_RELAY is not set
56CONFIG_INITRAMFS_SOURCE="" 59CONFIG_INITRAMFS_SOURCE=""
57CONFIG_CC_OPTIMIZE_FOR_SIZE=y 60CONFIG_CC_OPTIMIZE_FOR_SIZE=y
58# CONFIG_EMBEDDED is not set 61# CONFIG_EMBEDDED is not set
@@ -67,10 +70,6 @@ CONFIG_BASE_FULL=y
67CONFIG_FUTEX=y 70CONFIG_FUTEX=y
68CONFIG_EPOLL=y 71CONFIG_EPOLL=y
69CONFIG_SHMEM=y 72CONFIG_SHMEM=y
70CONFIG_CC_ALIGN_FUNCTIONS=0
71CONFIG_CC_ALIGN_LABELS=0
72CONFIG_CC_ALIGN_LOOPS=0
73CONFIG_CC_ALIGN_JUMPS=0
74CONFIG_SLAB=y 73CONFIG_SLAB=y
75# CONFIG_TINY_SHMEM is not set 74# CONFIG_TINY_SHMEM is not set
76CONFIG_BASE_SMALL=0 75CONFIG_BASE_SMALL=0
@@ -82,7 +81,6 @@ CONFIG_BASE_SMALL=0
82CONFIG_MODULES=y 81CONFIG_MODULES=y
83CONFIG_MODULE_UNLOAD=y 82CONFIG_MODULE_UNLOAD=y
84# CONFIG_MODULE_FORCE_UNLOAD is not set 83# CONFIG_MODULE_FORCE_UNLOAD is not set
85CONFIG_OBSOLETE_MODPARM=y
86CONFIG_MODVERSIONS=y 84CONFIG_MODVERSIONS=y
87CONFIG_MODULE_SRCVERSION_ALL=y 85CONFIG_MODULE_SRCVERSION_ALL=y
88CONFIG_KMOD=y 86CONFIG_KMOD=y
@@ -91,6 +89,7 @@ CONFIG_STOP_MACHINE=y
91# 89#
92# Block layer 90# Block layer
93# 91#
92# CONFIG_BLK_DEV_IO_TRACE is not set
94 93
95# 94#
96# IO Schedulers 95# IO Schedulers
@@ -185,7 +184,6 @@ CONFIG_GENERIC_ISA_DMA=y
185# CONFIG_PPC_INDIRECT_PCI is not set 184# CONFIG_PPC_INDIRECT_PCI is not set
186CONFIG_PCI=y 185CONFIG_PCI=y
187CONFIG_PCI_DOMAINS=y 186CONFIG_PCI_DOMAINS=y
188CONFIG_PCI_LEGACY_PROC=y
189# CONFIG_PCI_DEBUG is not set 187# CONFIG_PCI_DEBUG is not set
190 188
191# 189#
@@ -227,6 +225,7 @@ CONFIG_SYN_COOKIES=y
227CONFIG_INET_AH=m 225CONFIG_INET_AH=m
228CONFIG_INET_ESP=m 226CONFIG_INET_ESP=m
229CONFIG_INET_IPCOMP=m 227CONFIG_INET_IPCOMP=m
228CONFIG_INET_XFRM_TUNNEL=m
230CONFIG_INET_TUNNEL=y 229CONFIG_INET_TUNNEL=y
231CONFIG_INET_DIAG=y 230CONFIG_INET_DIAG=y
232CONFIG_INET_TCP_DIAG=y 231CONFIG_INET_TCP_DIAG=y
@@ -238,6 +237,8 @@ CONFIG_TCP_CONG_BIC=y
238# 237#
239# CONFIG_IP_VS is not set 238# CONFIG_IP_VS is not set
240# CONFIG_IPV6 is not set 239# CONFIG_IPV6 is not set
240# CONFIG_INET6_XFRM_TUNNEL is not set
241# CONFIG_INET6_TUNNEL is not set
241CONFIG_NETFILTER=y 242CONFIG_NETFILTER=y
242# CONFIG_NETFILTER_DEBUG is not set 243# CONFIG_NETFILTER_DEBUG is not set
243 244
@@ -261,6 +262,7 @@ CONFIG_IP_NF_IRC=m
261CONFIG_IP_NF_TFTP=m 262CONFIG_IP_NF_TFTP=m
262CONFIG_IP_NF_AMANDA=m 263CONFIG_IP_NF_AMANDA=m
263# CONFIG_IP_NF_PPTP is not set 264# CONFIG_IP_NF_PPTP is not set
265# CONFIG_IP_NF_H323 is not set
264CONFIG_IP_NF_QUEUE=m 266CONFIG_IP_NF_QUEUE=m
265 267
266# 268#
@@ -513,6 +515,7 @@ CONFIG_MD_RAID0=y
513CONFIG_MD_RAID1=y 515CONFIG_MD_RAID1=y
514CONFIG_MD_RAID10=m 516CONFIG_MD_RAID10=m
515CONFIG_MD_RAID5=y 517CONFIG_MD_RAID5=y
518# CONFIG_MD_RAID5_RESHAPE is not set
516CONFIG_MD_RAID6=m 519CONFIG_MD_RAID6=m
517CONFIG_MD_MULTIPATH=m 520CONFIG_MD_MULTIPATH=m
518CONFIG_MD_FAULTY=m 521CONFIG_MD_FAULTY=m
@@ -761,7 +764,6 @@ CONFIG_LEGACY_PTY_COUNT=256
761# Watchdog Cards 764# Watchdog Cards
762# 765#
763# CONFIG_WATCHDOG is not set 766# CONFIG_WATCHDOG is not set
764# CONFIG_RTC is not set
765CONFIG_GEN_RTC=y 767CONFIG_GEN_RTC=y
766# CONFIG_GEN_RTC_X is not set 768# CONFIG_GEN_RTC_X is not set
767# CONFIG_DTLK is not set 769# CONFIG_DTLK is not set
@@ -772,6 +774,7 @@ CONFIG_GEN_RTC=y
772# Ftape, the floppy tape device driver 774# Ftape, the floppy tape device driver
773# 775#
774CONFIG_AGP=m 776CONFIG_AGP=m
777# CONFIG_AGP_VIA is not set
775CONFIG_AGP_UNINORTH=m 778CONFIG_AGP_UNINORTH=m
776# CONFIG_DRM is not set 779# CONFIG_DRM is not set
777CONFIG_RAW_DRIVER=y 780CONFIG_RAW_DRIVER=y
@@ -813,7 +816,6 @@ CONFIG_I2C_POWERMAC=y
813# CONFIG_I2C_PARPORT_LIGHT is not set 816# CONFIG_I2C_PARPORT_LIGHT is not set
814# CONFIG_I2C_PROSAVAGE is not set 817# CONFIG_I2C_PROSAVAGE is not set
815# CONFIG_I2C_SAVAGE4 is not set 818# CONFIG_I2C_SAVAGE4 is not set
816# CONFIG_SCx200_ACB is not set
817# CONFIG_I2C_SIS5595 is not set 819# CONFIG_I2C_SIS5595 is not set
818# CONFIG_I2C_SIS630 is not set 820# CONFIG_I2C_SIS630 is not set
819# CONFIG_I2C_SIS96X is not set 821# CONFIG_I2C_SIS96X is not set
@@ -832,9 +834,7 @@ CONFIG_I2C_POWERMAC=y
832# CONFIG_SENSORS_PCF8574 is not set 834# CONFIG_SENSORS_PCF8574 is not set
833# CONFIG_SENSORS_PCA9539 is not set 835# CONFIG_SENSORS_PCA9539 is not set
834# CONFIG_SENSORS_PCF8591 is not set 836# CONFIG_SENSORS_PCF8591 is not set
835# CONFIG_SENSORS_RTC8564 is not set
836# CONFIG_SENSORS_MAX6875 is not set 837# CONFIG_SENSORS_MAX6875 is not set
837# CONFIG_RTC_X1205_I2C is not set
838# CONFIG_I2C_DEBUG_CORE is not set 838# CONFIG_I2C_DEBUG_CORE is not set
839# CONFIG_I2C_DEBUG_ALGO is not set 839# CONFIG_I2C_DEBUG_ALGO is not set
840# CONFIG_I2C_DEBUG_BUS is not set 840# CONFIG_I2C_DEBUG_BUS is not set
@@ -862,10 +862,6 @@ CONFIG_I2C_POWERMAC=y
862# 862#
863 863
864# 864#
865# Multimedia Capabilities Port drivers
866#
867
868#
869# Multimedia devices 865# Multimedia devices
870# 866#
871# CONFIG_VIDEO_DEV is not set 867# CONFIG_VIDEO_DEV is not set
@@ -874,6 +870,7 @@ CONFIG_I2C_POWERMAC=y
874# Digital Video Broadcasting Devices 870# Digital Video Broadcasting Devices
875# 871#
876# CONFIG_DVB is not set 872# CONFIG_DVB is not set
873# CONFIG_USB_DABUSB is not set
877 874
878# 875#
879# Graphics support 876# Graphics support
@@ -883,6 +880,7 @@ CONFIG_FB_CFB_FILLRECT=y
883CONFIG_FB_CFB_COPYAREA=y 880CONFIG_FB_CFB_COPYAREA=y
884CONFIG_FB_CFB_IMAGEBLIT=y 881CONFIG_FB_CFB_IMAGEBLIT=y
885CONFIG_FB_MACMODES=y 882CONFIG_FB_MACMODES=y
883CONFIG_FB_FIRMWARE_EDID=y
886CONFIG_FB_MODE_HELPERS=y 884CONFIG_FB_MODE_HELPERS=y
887CONFIG_FB_TILEBLITTING=y 885CONFIG_FB_TILEBLITTING=y
888# CONFIG_FB_CIRRUS is not set 886# CONFIG_FB_CIRRUS is not set
@@ -901,7 +899,6 @@ CONFIG_FB_NVIDIA=y
901CONFIG_FB_NVIDIA_I2C=y 899CONFIG_FB_NVIDIA_I2C=y
902# CONFIG_FB_RIVA is not set 900# CONFIG_FB_RIVA is not set
903# CONFIG_FB_MATROX is not set 901# CONFIG_FB_MATROX is not set
904# CONFIG_FB_RADEON_OLD is not set
905CONFIG_FB_RADEON=y 902CONFIG_FB_RADEON=y
906CONFIG_FB_RADEON_I2C=y 903CONFIG_FB_RADEON_I2C=y
907# CONFIG_FB_RADEON_DEBUG is not set 904# CONFIG_FB_RADEON_DEBUG is not set
@@ -958,9 +955,11 @@ CONFIG_SND_SEQUENCER=m
958CONFIG_SND_OSSEMUL=y 955CONFIG_SND_OSSEMUL=y
959CONFIG_SND_MIXER_OSS=m 956CONFIG_SND_MIXER_OSS=m
960CONFIG_SND_PCM_OSS=m 957CONFIG_SND_PCM_OSS=m
958CONFIG_SND_PCM_OSS_PLUGINS=y
961CONFIG_SND_SEQUENCER_OSS=y 959CONFIG_SND_SEQUENCER_OSS=y
962# CONFIG_SND_DYNAMIC_MINORS is not set 960# CONFIG_SND_DYNAMIC_MINORS is not set
963CONFIG_SND_SUPPORT_OLD_API=y 961CONFIG_SND_SUPPORT_OLD_API=y
962CONFIG_SND_VERBOSE_PROCFS=y
964# CONFIG_SND_VERBOSE_PRINTK is not set 963# CONFIG_SND_VERBOSE_PRINTK is not set
965# CONFIG_SND_DEBUG is not set 964# CONFIG_SND_DEBUG is not set
966 965
@@ -977,6 +976,7 @@ CONFIG_SND_SUPPORT_OLD_API=y
977# PCI devices 976# PCI devices
978# 977#
979# CONFIG_SND_AD1889 is not set 978# CONFIG_SND_AD1889 is not set
979# CONFIG_SND_ALS300 is not set
980# CONFIG_SND_ALS4000 is not set 980# CONFIG_SND_ALS4000 is not set
981# CONFIG_SND_ALI5451 is not set 981# CONFIG_SND_ALI5451 is not set
982# CONFIG_SND_ATIIXP is not set 982# CONFIG_SND_ATIIXP is not set
@@ -1009,6 +1009,7 @@ CONFIG_SND_SUPPORT_OLD_API=y
1009# CONFIG_SND_MIXART is not set 1009# CONFIG_SND_MIXART is not set
1010# CONFIG_SND_NM256 is not set 1010# CONFIG_SND_NM256 is not set
1011# CONFIG_SND_PCXHR is not set 1011# CONFIG_SND_PCXHR is not set
1012# CONFIG_SND_RIPTIDE is not set
1012# CONFIG_SND_RME32 is not set 1013# CONFIG_SND_RME32 is not set
1013# CONFIG_SND_RME96 is not set 1014# CONFIG_SND_RME96 is not set
1014# CONFIG_SND_RME9652 is not set 1015# CONFIG_SND_RME9652 is not set
@@ -1041,6 +1042,7 @@ CONFIG_SND_USB_AUDIO=m
1041# 1042#
1042CONFIG_USB_ARCH_HAS_HCD=y 1043CONFIG_USB_ARCH_HAS_HCD=y
1043CONFIG_USB_ARCH_HAS_OHCI=y 1044CONFIG_USB_ARCH_HAS_OHCI=y
1045CONFIG_USB_ARCH_HAS_EHCI=y
1044CONFIG_USB=y 1046CONFIG_USB=y
1045# CONFIG_USB_DEBUG is not set 1047# CONFIG_USB_DEBUG is not set
1046 1048
@@ -1068,7 +1070,6 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y
1068# 1070#
1069# USB Device Class drivers 1071# USB Device Class drivers
1070# 1072#
1071# CONFIG_OBSOLETE_OSS_USB_DRIVER is not set
1072CONFIG_USB_ACM=m 1073CONFIG_USB_ACM=m
1073CONFIG_USB_PRINTER=y 1074CONFIG_USB_PRINTER=y
1074 1075
@@ -1126,15 +1127,6 @@ CONFIG_USB_HIDDEV=y
1126# CONFIG_USB_MICROTEK is not set 1127# CONFIG_USB_MICROTEK is not set
1127 1128
1128# 1129#
1129# USB Multimedia devices
1130#
1131# CONFIG_USB_DABUSB is not set
1132
1133#
1134# Video4Linux support is needed for USB Multimedia device support
1135#
1136
1137#
1138# USB Network Adapters 1130# USB Network Adapters
1139# 1131#
1140CONFIG_USB_CATC=m 1132CONFIG_USB_CATC=m
@@ -1194,6 +1186,7 @@ CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
1194CONFIG_USB_SERIAL_KLSI=m 1186CONFIG_USB_SERIAL_KLSI=m
1195CONFIG_USB_SERIAL_KOBIL_SCT=m 1187CONFIG_USB_SERIAL_KOBIL_SCT=m
1196CONFIG_USB_SERIAL_MCT_U232=m 1188CONFIG_USB_SERIAL_MCT_U232=m
1189# CONFIG_USB_SERIAL_NAVMAN is not set
1197CONFIG_USB_SERIAL_PL2303=m 1190CONFIG_USB_SERIAL_PL2303=m
1198# CONFIG_USB_SERIAL_HP4X is not set 1191# CONFIG_USB_SERIAL_HP4X is not set
1199CONFIG_USB_SERIAL_SAFE=m 1192CONFIG_USB_SERIAL_SAFE=m
@@ -1237,17 +1230,23 @@ CONFIG_USB_EZUSB=y
1237# CONFIG_MMC is not set 1230# CONFIG_MMC is not set
1238 1231
1239# 1232#
1233# LED devices
1234#
1235# CONFIG_NEW_LEDS is not set
1236
1237#
1240# InfiniBand support 1238# InfiniBand support
1241# 1239#
1242# CONFIG_INFINIBAND is not set 1240# CONFIG_INFINIBAND is not set
1243 1241
1244# 1242#
1245# SN Devices 1243# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1246# 1244#
1247 1245
1248# 1246#
1249# EDAC - error detection and reporting (RAS) 1247# Real Time Clock
1250# 1248#
1249# CONFIG_RTC_CLASS is not set
1251 1250
1252# 1251#
1253# File systems 1252# File systems
@@ -1319,7 +1318,6 @@ CONFIG_TMPFS=y
1319CONFIG_HUGETLBFS=y 1318CONFIG_HUGETLBFS=y
1320CONFIG_HUGETLB_PAGE=y 1319CONFIG_HUGETLB_PAGE=y
1321CONFIG_RAMFS=y 1320CONFIG_RAMFS=y
1322# CONFIG_RELAYFS_FS is not set
1323# CONFIG_CONFIGFS_FS is not set 1321# CONFIG_CONFIGFS_FS is not set
1324 1322
1325# 1323#
diff --git a/arch/powerpc/configs/iseries_defconfig b/arch/powerpc/configs/iseries_defconfig
index 1816a46742f6..a95e455a1944 100644
--- a/arch/powerpc/configs/iseries_defconfig
+++ b/arch/powerpc/configs/iseries_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.16-rc6 3# Linux kernel version: 2.6.17-rc1
4# Wed Mar 15 16:19:52 2006 4# Wed Apr 19 11:46:44 2006
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -9,6 +9,7 @@ CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y 10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_RWSEM_XCHGADD_ALGORITHM=y 11CONFIG_RWSEM_XCHGADD_ALGORITHM=y
12CONFIG_GENERIC_HWEIGHT=y
12CONFIG_GENERIC_CALIBRATE_DELAY=y 13CONFIG_GENERIC_CALIBRATE_DELAY=y
13CONFIG_PPC=y 14CONFIG_PPC=y
14CONFIG_EARLY_PRINTK=y 15CONFIG_EARLY_PRINTK=y
@@ -30,6 +31,7 @@ CONFIG_POWER4=y
30CONFIG_PPC_FPU=y 31CONFIG_PPC_FPU=y
31# CONFIG_ALTIVEC is not set 32# CONFIG_ALTIVEC is not set
32CONFIG_PPC_STD_MMU=y 33CONFIG_PPC_STD_MMU=y
34CONFIG_VIRT_CPU_ACCOUNTING=y
33CONFIG_SMP=y 35CONFIG_SMP=y
34CONFIG_NR_CPUS=32 36CONFIG_NR_CPUS=32
35 37
@@ -55,6 +57,7 @@ CONFIG_AUDITSYSCALL=y
55CONFIG_IKCONFIG=y 57CONFIG_IKCONFIG=y
56CONFIG_IKCONFIG_PROC=y 58CONFIG_IKCONFIG_PROC=y
57# CONFIG_CPUSETS is not set 59# CONFIG_CPUSETS is not set
60# CONFIG_RELAY is not set
58CONFIG_INITRAMFS_SOURCE="" 61CONFIG_INITRAMFS_SOURCE=""
59CONFIG_CC_OPTIMIZE_FOR_SIZE=y 62CONFIG_CC_OPTIMIZE_FOR_SIZE=y
60# CONFIG_EMBEDDED is not set 63# CONFIG_EMBEDDED is not set
@@ -69,10 +72,6 @@ CONFIG_BASE_FULL=y
69CONFIG_FUTEX=y 72CONFIG_FUTEX=y
70CONFIG_EPOLL=y 73CONFIG_EPOLL=y
71CONFIG_SHMEM=y 74CONFIG_SHMEM=y
72CONFIG_CC_ALIGN_FUNCTIONS=0
73CONFIG_CC_ALIGN_LABELS=0
74CONFIG_CC_ALIGN_LOOPS=0
75CONFIG_CC_ALIGN_JUMPS=0
76CONFIG_SLAB=y 75CONFIG_SLAB=y
77# CONFIG_TINY_SHMEM is not set 76# CONFIG_TINY_SHMEM is not set
78CONFIG_BASE_SMALL=0 77CONFIG_BASE_SMALL=0
@@ -84,7 +83,6 @@ CONFIG_BASE_SMALL=0
84CONFIG_MODULES=y 83CONFIG_MODULES=y
85CONFIG_MODULE_UNLOAD=y 84CONFIG_MODULE_UNLOAD=y
86# CONFIG_MODULE_FORCE_UNLOAD is not set 85# CONFIG_MODULE_FORCE_UNLOAD is not set
87CONFIG_OBSOLETE_MODPARM=y
88CONFIG_MODVERSIONS=y 86CONFIG_MODVERSIONS=y
89CONFIG_MODULE_SRCVERSION_ALL=y 87CONFIG_MODULE_SRCVERSION_ALL=y
90CONFIG_KMOD=y 88CONFIG_KMOD=y
@@ -93,6 +91,7 @@ CONFIG_STOP_MACHINE=y
93# 91#
94# Block layer 92# Block layer
95# 93#
94# CONFIG_BLK_DEV_IO_TRACE is not set
96 95
97# 96#
98# IO Schedulers 97# IO Schedulers
@@ -165,7 +164,6 @@ CONFIG_GENERIC_ISA_DMA=y
165# CONFIG_PPC_INDIRECT_PCI is not set 164# CONFIG_PPC_INDIRECT_PCI is not set
166CONFIG_PCI=y 165CONFIG_PCI=y
167CONFIG_PCI_DOMAINS=y 166CONFIG_PCI_DOMAINS=y
168CONFIG_PCI_LEGACY_PROC=y
169# CONFIG_PCI_DEBUG is not set 167# CONFIG_PCI_DEBUG is not set
170 168
171# 169#
@@ -207,6 +205,7 @@ CONFIG_SYN_COOKIES=y
207CONFIG_INET_AH=m 205CONFIG_INET_AH=m
208CONFIG_INET_ESP=m 206CONFIG_INET_ESP=m
209CONFIG_INET_IPCOMP=m 207CONFIG_INET_IPCOMP=m
208CONFIG_INET_XFRM_TUNNEL=m
210CONFIG_INET_TUNNEL=y 209CONFIG_INET_TUNNEL=y
211CONFIG_INET_DIAG=y 210CONFIG_INET_DIAG=y
212CONFIG_INET_TCP_DIAG=y 211CONFIG_INET_TCP_DIAG=y
@@ -218,6 +217,8 @@ CONFIG_TCP_CONG_BIC=y
218# 217#
219# CONFIG_IP_VS is not set 218# CONFIG_IP_VS is not set
220# CONFIG_IPV6 is not set 219# CONFIG_IPV6 is not set
220# CONFIG_INET6_XFRM_TUNNEL is not set
221# CONFIG_INET6_TUNNEL is not set
221CONFIG_NETFILTER=y 222CONFIG_NETFILTER=y
222# CONFIG_NETFILTER_DEBUG is not set 223# CONFIG_NETFILTER_DEBUG is not set
223 224
@@ -236,11 +237,14 @@ CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
236CONFIG_NETFILTER_XT_MATCH_CONNMARK=m 237CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
237CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m 238CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
238# CONFIG_NETFILTER_XT_MATCH_DCCP is not set 239# CONFIG_NETFILTER_XT_MATCH_DCCP is not set
240# CONFIG_NETFILTER_XT_MATCH_ESP is not set
239CONFIG_NETFILTER_XT_MATCH_HELPER=m 241CONFIG_NETFILTER_XT_MATCH_HELPER=m
240CONFIG_NETFILTER_XT_MATCH_LENGTH=m 242CONFIG_NETFILTER_XT_MATCH_LENGTH=m
241CONFIG_NETFILTER_XT_MATCH_LIMIT=m 243CONFIG_NETFILTER_XT_MATCH_LIMIT=m
242CONFIG_NETFILTER_XT_MATCH_MAC=m 244CONFIG_NETFILTER_XT_MATCH_MAC=m
243CONFIG_NETFILTER_XT_MATCH_MARK=m 245CONFIG_NETFILTER_XT_MATCH_MARK=m
246# CONFIG_NETFILTER_XT_MATCH_POLICY is not set
247# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set
244CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m 248CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
245CONFIG_NETFILTER_XT_MATCH_REALM=m 249CONFIG_NETFILTER_XT_MATCH_REALM=m
246CONFIG_NETFILTER_XT_MATCH_SCTP=m 250CONFIG_NETFILTER_XT_MATCH_SCTP=m
@@ -262,20 +266,19 @@ CONFIG_IP_NF_IRC=m
262CONFIG_IP_NF_TFTP=m 266CONFIG_IP_NF_TFTP=m
263CONFIG_IP_NF_AMANDA=m 267CONFIG_IP_NF_AMANDA=m
264# CONFIG_IP_NF_PPTP is not set 268# CONFIG_IP_NF_PPTP is not set
269# CONFIG_IP_NF_H323 is not set
265CONFIG_IP_NF_QUEUE=m 270CONFIG_IP_NF_QUEUE=m
266CONFIG_IP_NF_IPTABLES=m 271CONFIG_IP_NF_IPTABLES=m
267CONFIG_IP_NF_MATCH_IPRANGE=m 272CONFIG_IP_NF_MATCH_IPRANGE=m
268CONFIG_IP_NF_MATCH_MULTIPORT=m
269CONFIG_IP_NF_MATCH_TOS=m 273CONFIG_IP_NF_MATCH_TOS=m
270CONFIG_IP_NF_MATCH_RECENT=m 274CONFIG_IP_NF_MATCH_RECENT=m
271CONFIG_IP_NF_MATCH_ECN=m 275CONFIG_IP_NF_MATCH_ECN=m
272CONFIG_IP_NF_MATCH_DSCP=m 276CONFIG_IP_NF_MATCH_DSCP=m
273CONFIG_IP_NF_MATCH_AH_ESP=m 277# CONFIG_IP_NF_MATCH_AH is not set
274CONFIG_IP_NF_MATCH_TTL=m 278CONFIG_IP_NF_MATCH_TTL=m
275CONFIG_IP_NF_MATCH_OWNER=m 279CONFIG_IP_NF_MATCH_OWNER=m
276CONFIG_IP_NF_MATCH_ADDRTYPE=m 280CONFIG_IP_NF_MATCH_ADDRTYPE=m
277CONFIG_IP_NF_MATCH_HASHLIMIT=m 281CONFIG_IP_NF_MATCH_HASHLIMIT=m
278CONFIG_IP_NF_MATCH_POLICY=m
279CONFIG_IP_NF_FILTER=m 282CONFIG_IP_NF_FILTER=m
280CONFIG_IP_NF_TARGET_REJECT=m 283CONFIG_IP_NF_TARGET_REJECT=m
281CONFIG_IP_NF_TARGET_LOG=m 284CONFIG_IP_NF_TARGET_LOG=m
@@ -479,6 +482,7 @@ CONFIG_MD_RAID0=y
479CONFIG_MD_RAID1=y 482CONFIG_MD_RAID1=y
480CONFIG_MD_RAID10=m 483CONFIG_MD_RAID10=m
481CONFIG_MD_RAID5=y 484CONFIG_MD_RAID5=y
485# CONFIG_MD_RAID5_RESHAPE is not set
482CONFIG_MD_RAID6=m 486CONFIG_MD_RAID6=m
483CONFIG_MD_MULTIPATH=m 487CONFIG_MD_MULTIPATH=m
484CONFIG_MD_FAULTY=m 488CONFIG_MD_FAULTY=m
@@ -702,7 +706,6 @@ CONFIG_LEGACY_PTY_COUNT=256
702# Watchdog Cards 706# Watchdog Cards
703# 707#
704# CONFIG_WATCHDOG is not set 708# CONFIG_WATCHDOG is not set
705# CONFIG_RTC is not set
706CONFIG_GEN_RTC=y 709CONFIG_GEN_RTC=y
707# CONFIG_GEN_RTC_X is not set 710# CONFIG_GEN_RTC_X is not set
708# CONFIG_DTLK is not set 711# CONFIG_DTLK is not set
@@ -751,10 +754,6 @@ CONFIG_MAX_RAW_DEVS=256
751# 754#
752 755
753# 756#
754# Multimedia Capabilities Port drivers
755#
756
757#
758# Multimedia devices 757# Multimedia devices
759# 758#
760# CONFIG_VIDEO_DEV is not set 759# CONFIG_VIDEO_DEV is not set
@@ -779,6 +778,7 @@ CONFIG_MAX_RAW_DEVS=256
779# 778#
780CONFIG_USB_ARCH_HAS_HCD=y 779CONFIG_USB_ARCH_HAS_HCD=y
781CONFIG_USB_ARCH_HAS_OHCI=y 780CONFIG_USB_ARCH_HAS_OHCI=y
781CONFIG_USB_ARCH_HAS_EHCI=y
782# CONFIG_USB is not set 782# CONFIG_USB is not set
783 783
784# 784#
@@ -796,6 +796,11 @@ CONFIG_USB_ARCH_HAS_OHCI=y
796# CONFIG_MMC is not set 796# CONFIG_MMC is not set
797 797
798# 798#
799# LED devices
800#
801# CONFIG_NEW_LEDS is not set
802
803#
799# InfiniBand support 804# InfiniBand support
800# 805#
801# CONFIG_INFINIBAND is not set 806# CONFIG_INFINIBAND is not set
@@ -805,6 +810,11 @@ CONFIG_USB_ARCH_HAS_OHCI=y
805# 810#
806 811
807# 812#
813# Real Time Clock
814#
815# CONFIG_RTC_CLASS is not set
816
817#
808# File systems 818# File systems
809# 819#
810CONFIG_EXT2_FS=y 820CONFIG_EXT2_FS=y
@@ -878,7 +888,6 @@ CONFIG_TMPFS=y
878# CONFIG_HUGETLBFS is not set 888# CONFIG_HUGETLBFS is not set
879# CONFIG_HUGETLB_PAGE is not set 889# CONFIG_HUGETLB_PAGE is not set
880CONFIG_RAMFS=y 890CONFIG_RAMFS=y
881# CONFIG_RELAYFS_FS is not set
882# CONFIG_CONFIGFS_FS is not set 891# CONFIG_CONFIGFS_FS is not set
883 892
884# 893#
diff --git a/arch/powerpc/configs/pseries_defconfig b/arch/powerpc/configs/pseries_defconfig
index daaf038a1faa..58e68ce09b0f 100644
--- a/arch/powerpc/configs/pseries_defconfig
+++ b/arch/powerpc/configs/pseries_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.16-rc2 3# Linux kernel version: 2.6.17-rc1
4# Fri Feb 10 17:33:32 2006 4# Wed Apr 19 11:48:00 2006
5# 5#
6CONFIG_PPC64=y 6CONFIG_PPC64=y
7CONFIG_64BIT=y 7CONFIG_64BIT=y
@@ -9,6 +9,7 @@ CONFIG_PPC_MERGE=y
9CONFIG_MMU=y 9CONFIG_MMU=y
10CONFIG_GENERIC_HARDIRQS=y 10CONFIG_GENERIC_HARDIRQS=y
11CONFIG_RWSEM_XCHGADD_ALGORITHM=y 11CONFIG_RWSEM_XCHGADD_ALGORITHM=y
12CONFIG_GENERIC_HWEIGHT=y
12CONFIG_GENERIC_CALIBRATE_DELAY=y 13CONFIG_GENERIC_CALIBRATE_DELAY=y
13CONFIG_PPC=y 14CONFIG_PPC=y
14CONFIG_EARLY_PRINTK=y 15CONFIG_EARLY_PRINTK=y
@@ -30,6 +31,7 @@ CONFIG_POWER4=y
30CONFIG_PPC_FPU=y 31CONFIG_PPC_FPU=y
31CONFIG_ALTIVEC=y 32CONFIG_ALTIVEC=y
32CONFIG_PPC_STD_MMU=y 33CONFIG_PPC_STD_MMU=y
34CONFIG_VIRT_CPU_ACCOUNTING=y
33CONFIG_SMP=y 35CONFIG_SMP=y
34CONFIG_NR_CPUS=128 36CONFIG_NR_CPUS=128
35 37
@@ -55,6 +57,7 @@ CONFIG_AUDITSYSCALL=y
55CONFIG_IKCONFIG=y 57CONFIG_IKCONFIG=y
56CONFIG_IKCONFIG_PROC=y 58CONFIG_IKCONFIG_PROC=y
57CONFIG_CPUSETS=y 59CONFIG_CPUSETS=y
60# CONFIG_RELAY is not set
58CONFIG_INITRAMFS_SOURCE="" 61CONFIG_INITRAMFS_SOURCE=""
59CONFIG_CC_OPTIMIZE_FOR_SIZE=y 62CONFIG_CC_OPTIMIZE_FOR_SIZE=y
60# CONFIG_EMBEDDED is not set 63# CONFIG_EMBEDDED is not set
@@ -69,10 +72,6 @@ CONFIG_BASE_FULL=y
69CONFIG_FUTEX=y 72CONFIG_FUTEX=y
70CONFIG_EPOLL=y 73CONFIG_EPOLL=y
71CONFIG_SHMEM=y 74CONFIG_SHMEM=y
72CONFIG_CC_ALIGN_FUNCTIONS=0
73CONFIG_CC_ALIGN_LABELS=0
74CONFIG_CC_ALIGN_LOOPS=0
75CONFIG_CC_ALIGN_JUMPS=0
76CONFIG_SLAB=y 75CONFIG_SLAB=y
77# CONFIG_TINY_SHMEM is not set 76# CONFIG_TINY_SHMEM is not set
78CONFIG_BASE_SMALL=0 77CONFIG_BASE_SMALL=0
@@ -84,7 +83,6 @@ CONFIG_BASE_SMALL=0
84CONFIG_MODULES=y 83CONFIG_MODULES=y
85CONFIG_MODULE_UNLOAD=y 84CONFIG_MODULE_UNLOAD=y
86# CONFIG_MODULE_FORCE_UNLOAD is not set 85# CONFIG_MODULE_FORCE_UNLOAD is not set
87CONFIG_OBSOLETE_MODPARM=y
88CONFIG_MODVERSIONS=y 86CONFIG_MODVERSIONS=y
89CONFIG_MODULE_SRCVERSION_ALL=y 87CONFIG_MODULE_SRCVERSION_ALL=y
90CONFIG_KMOD=y 88CONFIG_KMOD=y
@@ -93,6 +91,7 @@ CONFIG_STOP_MACHINE=y
93# 91#
94# Block layer 92# Block layer
95# 93#
94# CONFIG_BLK_DEV_IO_TRACE is not set
96 95
97# 96#
98# IO Schedulers 97# IO Schedulers
@@ -188,7 +187,6 @@ CONFIG_PPC_I8259=y
188# CONFIG_PPC_INDIRECT_PCI is not set 187# CONFIG_PPC_INDIRECT_PCI is not set
189CONFIG_PCI=y 188CONFIG_PCI=y
190CONFIG_PCI_DOMAINS=y 189CONFIG_PCI_DOMAINS=y
191CONFIG_PCI_LEGACY_PROC=y
192# CONFIG_PCI_DEBUG is not set 190# CONFIG_PCI_DEBUG is not set
193 191
194# 192#
@@ -235,6 +233,7 @@ CONFIG_SYN_COOKIES=y
235CONFIG_INET_AH=m 233CONFIG_INET_AH=m
236CONFIG_INET_ESP=m 234CONFIG_INET_ESP=m
237CONFIG_INET_IPCOMP=m 235CONFIG_INET_IPCOMP=m
236CONFIG_INET_XFRM_TUNNEL=m
238CONFIG_INET_TUNNEL=y 237CONFIG_INET_TUNNEL=y
239CONFIG_INET_DIAG=y 238CONFIG_INET_DIAG=y
240CONFIG_INET_TCP_DIAG=y 239CONFIG_INET_TCP_DIAG=y
@@ -246,6 +245,8 @@ CONFIG_TCP_CONG_BIC=y
246# 245#
247# CONFIG_IP_VS is not set 246# CONFIG_IP_VS is not set
248# CONFIG_IPV6 is not set 247# CONFIG_IPV6 is not set
248# CONFIG_INET6_XFRM_TUNNEL is not set
249# CONFIG_INET6_TUNNEL is not set
249CONFIG_NETFILTER=y 250CONFIG_NETFILTER=y
250# CONFIG_NETFILTER_DEBUG is not set 251# CONFIG_NETFILTER_DEBUG is not set
251 252
@@ -272,6 +273,7 @@ CONFIG_IP_NF_IRC=m
272CONFIG_IP_NF_TFTP=m 273CONFIG_IP_NF_TFTP=m
273CONFIG_IP_NF_AMANDA=m 274CONFIG_IP_NF_AMANDA=m
274# CONFIG_IP_NF_PPTP is not set 275# CONFIG_IP_NF_PPTP is not set
276# CONFIG_IP_NF_H323 is not set
275CONFIG_IP_NF_QUEUE=m 277CONFIG_IP_NF_QUEUE=m
276 278
277# 279#
@@ -519,6 +521,7 @@ CONFIG_MD_RAID0=y
519CONFIG_MD_RAID1=y 521CONFIG_MD_RAID1=y
520CONFIG_MD_RAID10=m 522CONFIG_MD_RAID10=m
521CONFIG_MD_RAID5=y 523CONFIG_MD_RAID5=y
524# CONFIG_MD_RAID5_RESHAPE is not set
522CONFIG_MD_RAID6=m 525CONFIG_MD_RAID6=m
523CONFIG_MD_MULTIPATH=m 526CONFIG_MD_MULTIPATH=m
524CONFIG_MD_FAULTY=m 527CONFIG_MD_FAULTY=m
@@ -750,6 +753,7 @@ CONFIG_HW_CONSOLE=y
750# 753#
751CONFIG_SERIAL_8250=y 754CONFIG_SERIAL_8250=y
752CONFIG_SERIAL_8250_CONSOLE=y 755CONFIG_SERIAL_8250_CONSOLE=y
756CONFIG_SERIAL_8250_PCI=y
753CONFIG_SERIAL_8250_NR_UARTS=4 757CONFIG_SERIAL_8250_NR_UARTS=4
754CONFIG_SERIAL_8250_RUNTIME_UARTS=4 758CONFIG_SERIAL_8250_RUNTIME_UARTS=4
755# CONFIG_SERIAL_8250_EXTENDED is not set 759# CONFIG_SERIAL_8250_EXTENDED is not set
@@ -767,7 +771,9 @@ CONFIG_LEGACY_PTY_COUNT=256
767# CONFIG_PRINTER is not set 771# CONFIG_PRINTER is not set
768# CONFIG_PPDEV is not set 772# CONFIG_PPDEV is not set
769# CONFIG_TIPAR is not set 773# CONFIG_TIPAR is not set
774CONFIG_HVC_DRIVER=y
770CONFIG_HVC_CONSOLE=y 775CONFIG_HVC_CONSOLE=y
776# CONFIG_HVC_RTAS is not set
771CONFIG_HVCS=m 777CONFIG_HVCS=m
772 778
773# 779#
@@ -779,7 +785,6 @@ CONFIG_HVCS=m
779# Watchdog Cards 785# Watchdog Cards
780# 786#
781# CONFIG_WATCHDOG is not set 787# CONFIG_WATCHDOG is not set
782# CONFIG_RTC is not set
783CONFIG_GEN_RTC=y 788CONFIG_GEN_RTC=y
784# CONFIG_GEN_RTC_X is not set 789# CONFIG_GEN_RTC_X is not set
785# CONFIG_DTLK is not set 790# CONFIG_DTLK is not set
@@ -830,7 +835,6 @@ CONFIG_I2C_ALGOBIT=y
830# CONFIG_I2C_PARPORT_LIGHT is not set 835# CONFIG_I2C_PARPORT_LIGHT is not set
831# CONFIG_I2C_PROSAVAGE is not set 836# CONFIG_I2C_PROSAVAGE is not set
832# CONFIG_I2C_SAVAGE4 is not set 837# CONFIG_I2C_SAVAGE4 is not set
833# CONFIG_SCx200_ACB is not set
834# CONFIG_I2C_SIS5595 is not set 838# CONFIG_I2C_SIS5595 is not set
835# CONFIG_I2C_SIS630 is not set 839# CONFIG_I2C_SIS630 is not set
836# CONFIG_I2C_SIS96X is not set 840# CONFIG_I2C_SIS96X is not set
@@ -849,9 +853,7 @@ CONFIG_I2C_ALGOBIT=y
849# CONFIG_SENSORS_PCF8574 is not set 853# CONFIG_SENSORS_PCF8574 is not set
850# CONFIG_SENSORS_PCA9539 is not set 854# CONFIG_SENSORS_PCA9539 is not set
851# CONFIG_SENSORS_PCF8591 is not set 855# CONFIG_SENSORS_PCF8591 is not set
852# CONFIG_SENSORS_RTC8564 is not set
853# CONFIG_SENSORS_MAX6875 is not set 856# CONFIG_SENSORS_MAX6875 is not set
854# CONFIG_RTC_X1205_I2C is not set
855# CONFIG_I2C_DEBUG_CORE is not set 857# CONFIG_I2C_DEBUG_CORE is not set
856# CONFIG_I2C_DEBUG_ALGO is not set 858# CONFIG_I2C_DEBUG_ALGO is not set
857# CONFIG_I2C_DEBUG_BUS is not set 859# CONFIG_I2C_DEBUG_BUS is not set
@@ -879,10 +881,6 @@ CONFIG_I2C_ALGOBIT=y
879# 881#
880 882
881# 883#
882# Multimedia Capabilities Port drivers
883#
884
885#
886# Multimedia devices 884# Multimedia devices
887# 885#
888# CONFIG_VIDEO_DEV is not set 886# CONFIG_VIDEO_DEV is not set
@@ -891,6 +889,7 @@ CONFIG_I2C_ALGOBIT=y
891# Digital Video Broadcasting Devices 889# Digital Video Broadcasting Devices
892# 890#
893# CONFIG_DVB is not set 891# CONFIG_DVB is not set
892# CONFIG_USB_DABUSB is not set
894 893
895# 894#
896# Graphics support 895# Graphics support
@@ -900,6 +899,7 @@ CONFIG_FB_CFB_FILLRECT=y
900CONFIG_FB_CFB_COPYAREA=y 899CONFIG_FB_CFB_COPYAREA=y
901CONFIG_FB_CFB_IMAGEBLIT=y 900CONFIG_FB_CFB_IMAGEBLIT=y
902CONFIG_FB_MACMODES=y 901CONFIG_FB_MACMODES=y
902CONFIG_FB_FIRMWARE_EDID=y
903CONFIG_FB_MODE_HELPERS=y 903CONFIG_FB_MODE_HELPERS=y
904CONFIG_FB_TILEBLITTING=y 904CONFIG_FB_TILEBLITTING=y
905# CONFIG_FB_CIRRUS is not set 905# CONFIG_FB_CIRRUS is not set
@@ -919,7 +919,6 @@ CONFIG_FB_MATROX_MYSTIQUE=y
919CONFIG_FB_MATROX_G=y 919CONFIG_FB_MATROX_G=y
920# CONFIG_FB_MATROX_I2C is not set 920# CONFIG_FB_MATROX_I2C is not set
921CONFIG_FB_MATROX_MULTIHEAD=y 921CONFIG_FB_MATROX_MULTIHEAD=y
922# CONFIG_FB_RADEON_OLD is not set
923CONFIG_FB_RADEON=y 922CONFIG_FB_RADEON=y
924CONFIG_FB_RADEON_I2C=y 923CONFIG_FB_RADEON_I2C=y
925# CONFIG_FB_RADEON_DEBUG is not set 924# CONFIG_FB_RADEON_DEBUG is not set
@@ -968,6 +967,7 @@ CONFIG_LCD_DEVICE=y
968# 967#
969CONFIG_USB_ARCH_HAS_HCD=y 968CONFIG_USB_ARCH_HAS_HCD=y
970CONFIG_USB_ARCH_HAS_OHCI=y 969CONFIG_USB_ARCH_HAS_OHCI=y
970CONFIG_USB_ARCH_HAS_EHCI=y
971CONFIG_USB=y 971CONFIG_USB=y
972# CONFIG_USB_DEBUG is not set 972# CONFIG_USB_DEBUG is not set
973 973
@@ -1048,15 +1048,6 @@ CONFIG_USB_HIDDEV=y
1048# CONFIG_USB_MICROTEK is not set 1048# CONFIG_USB_MICROTEK is not set
1049 1049
1050# 1050#
1051# USB Multimedia devices
1052#
1053# CONFIG_USB_DABUSB is not set
1054
1055#
1056# Video4Linux support is needed for USB Multimedia device support
1057#
1058
1059#
1060# USB Network Adapters 1051# USB Network Adapters
1061# 1052#
1062# CONFIG_USB_CATC is not set 1053# CONFIG_USB_CATC is not set
@@ -1109,6 +1100,11 @@ CONFIG_USB_MON=y
1109# CONFIG_MMC is not set 1100# CONFIG_MMC is not set
1110 1101
1111# 1102#
1103# LED devices
1104#
1105# CONFIG_NEW_LEDS is not set
1106
1107#
1112# InfiniBand support 1108# InfiniBand support
1113# 1109#
1114CONFIG_INFINIBAND=m 1110CONFIG_INFINIBAND=m
@@ -1121,12 +1117,13 @@ CONFIG_INFINIBAND_IPOIB=m
1121# CONFIG_INFINIBAND_SRP is not set 1117# CONFIG_INFINIBAND_SRP is not set
1122 1118
1123# 1119#
1124# SN Devices 1120# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
1125# 1121#
1126 1122
1127# 1123#
1128# EDAC - error detection and reporting (RAS) 1124# Real Time Clock
1129# 1125#
1126# CONFIG_RTC_CLASS is not set
1130 1127
1131# 1128#
1132# File systems 1129# File systems
@@ -1202,7 +1199,6 @@ CONFIG_TMPFS=y
1202CONFIG_HUGETLBFS=y 1199CONFIG_HUGETLBFS=y
1203CONFIG_HUGETLB_PAGE=y 1200CONFIG_HUGETLB_PAGE=y
1204CONFIG_RAMFS=y 1201CONFIG_RAMFS=y
1205# CONFIG_RELAYFS_FS is not set
1206# CONFIG_CONFIGFS_FS is not set 1202# CONFIG_CONFIGFS_FS is not set
1207 1203
1208# 1204#
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c
index 39e348a3ade2..3f7182db9ed5 100644
--- a/arch/powerpc/kernel/cputable.c
+++ b/arch/powerpc/kernel/cputable.c
@@ -57,6 +57,8 @@ extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
57 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP) 57 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
58#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\ 58#define COMMON_USER_POWER5_PLUS (COMMON_USER_PPC64 | PPC_FEATURE_POWER5_PLUS|\
59 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP) 59 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
60#define COMMON_USER_POWER6 (COMMON_USER_PPC64 | PPC_FEATURE_ARCH_2_05 |\
61 PPC_FEATURE_SMT | PPC_FEATURE_ICACHE_SNOOP)
60#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \ 62#define COMMON_USER_BOOKE (PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | \
61 PPC_FEATURE_BOOKE) 63 PPC_FEATURE_BOOKE)
62 64
@@ -263,6 +265,20 @@ struct cpu_spec cpu_specs[] = {
263 .oprofile_type = PPC_OPROFILE_POWER4, 265 .oprofile_type = PPC_OPROFILE_POWER4,
264 .platform = "power5+", 266 .platform = "power5+",
265 }, 267 },
268 { /* Power6 */
269 .pvr_mask = 0xffff0000,
270 .pvr_value = 0x003e0000,
271 .cpu_name = "POWER6",
272 .cpu_features = CPU_FTRS_POWER6,
273 .cpu_user_features = COMMON_USER_POWER6,
274 .icache_bsize = 128,
275 .dcache_bsize = 128,
276 .num_pmcs = 6,
277 .cpu_setup = __setup_cpu_power4,
278 .oprofile_cpu_type = "ppc64/power6",
279 .oprofile_type = PPC_OPROFILE_POWER4,
280 .platform = "power6",
281 },
266 { /* Cell Broadband Engine */ 282 { /* Cell Broadband Engine */
267 .pvr_mask = 0xffff0000, 283 .pvr_mask = 0xffff0000,
268 .pvr_value = 0x00700000, 284 .pvr_value = 0x00700000,
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c
index d9a7fdef59b9..4eba60a32890 100644
--- a/arch/powerpc/kernel/iommu.c
+++ b/arch/powerpc/kernel/iommu.c
@@ -61,6 +61,7 @@ __setup("iommu=", setup_iommu);
61static unsigned long iommu_range_alloc(struct iommu_table *tbl, 61static unsigned long iommu_range_alloc(struct iommu_table *tbl,
62 unsigned long npages, 62 unsigned long npages,
63 unsigned long *handle, 63 unsigned long *handle,
64 unsigned long mask,
64 unsigned int align_order) 65 unsigned int align_order)
65{ 66{
66 unsigned long n, end, i, start; 67 unsigned long n, end, i, start;
@@ -97,9 +98,21 @@ static unsigned long iommu_range_alloc(struct iommu_table *tbl,
97 */ 98 */
98 if (start >= limit) 99 if (start >= limit)
99 start = largealloc ? tbl->it_largehint : tbl->it_hint; 100 start = largealloc ? tbl->it_largehint : tbl->it_hint;
100 101
101 again: 102 again:
102 103
104 if (limit + tbl->it_offset > mask) {
105 limit = mask - tbl->it_offset + 1;
106 /* If we're constrained on address range, first try
107 * at the masked hint to avoid O(n) search complexity,
108 * but on second pass, start at 0.
109 */
110 if ((start & mask) >= limit || pass > 0)
111 start = 0;
112 else
113 start &= mask;
114 }
115
103 n = find_next_zero_bit(tbl->it_map, limit, start); 116 n = find_next_zero_bit(tbl->it_map, limit, start);
104 117
105 /* Align allocation */ 118 /* Align allocation */
@@ -150,14 +163,14 @@ static unsigned long iommu_range_alloc(struct iommu_table *tbl,
150 163
151static dma_addr_t iommu_alloc(struct iommu_table *tbl, void *page, 164static dma_addr_t iommu_alloc(struct iommu_table *tbl, void *page,
152 unsigned int npages, enum dma_data_direction direction, 165 unsigned int npages, enum dma_data_direction direction,
153 unsigned int align_order) 166 unsigned long mask, unsigned int align_order)
154{ 167{
155 unsigned long entry, flags; 168 unsigned long entry, flags;
156 dma_addr_t ret = DMA_ERROR_CODE; 169 dma_addr_t ret = DMA_ERROR_CODE;
157 170
158 spin_lock_irqsave(&(tbl->it_lock), flags); 171 spin_lock_irqsave(&(tbl->it_lock), flags);
159 172
160 entry = iommu_range_alloc(tbl, npages, NULL, align_order); 173 entry = iommu_range_alloc(tbl, npages, NULL, mask, align_order);
161 174
162 if (unlikely(entry == DMA_ERROR_CODE)) { 175 if (unlikely(entry == DMA_ERROR_CODE)) {
163 spin_unlock_irqrestore(&(tbl->it_lock), flags); 176 spin_unlock_irqrestore(&(tbl->it_lock), flags);
@@ -236,7 +249,7 @@ static void iommu_free(struct iommu_table *tbl, dma_addr_t dma_addr,
236 249
237int iommu_map_sg(struct device *dev, struct iommu_table *tbl, 250int iommu_map_sg(struct device *dev, struct iommu_table *tbl,
238 struct scatterlist *sglist, int nelems, 251 struct scatterlist *sglist, int nelems,
239 enum dma_data_direction direction) 252 unsigned long mask, enum dma_data_direction direction)
240{ 253{
241 dma_addr_t dma_next = 0, dma_addr; 254 dma_addr_t dma_next = 0, dma_addr;
242 unsigned long flags; 255 unsigned long flags;
@@ -274,7 +287,7 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl,
274 vaddr = (unsigned long)page_address(s->page) + s->offset; 287 vaddr = (unsigned long)page_address(s->page) + s->offset;
275 npages = PAGE_ALIGN(vaddr + slen) - (vaddr & PAGE_MASK); 288 npages = PAGE_ALIGN(vaddr + slen) - (vaddr & PAGE_MASK);
276 npages >>= PAGE_SHIFT; 289 npages >>= PAGE_SHIFT;
277 entry = iommu_range_alloc(tbl, npages, &handle, 0); 290 entry = iommu_range_alloc(tbl, npages, &handle, mask >> PAGE_SHIFT, 0);
278 291
279 DBG(" - vaddr: %lx, size: %lx\n", vaddr, slen); 292 DBG(" - vaddr: %lx, size: %lx\n", vaddr, slen);
280 293
@@ -479,7 +492,8 @@ void iommu_free_table(struct device_node *dn)
479 * byte within the page as vaddr. 492 * byte within the page as vaddr.
480 */ 493 */
481dma_addr_t iommu_map_single(struct iommu_table *tbl, void *vaddr, 494dma_addr_t iommu_map_single(struct iommu_table *tbl, void *vaddr,
482 size_t size, enum dma_data_direction direction) 495 size_t size, unsigned long mask,
496 enum dma_data_direction direction)
483{ 497{
484 dma_addr_t dma_handle = DMA_ERROR_CODE; 498 dma_addr_t dma_handle = DMA_ERROR_CODE;
485 unsigned long uaddr; 499 unsigned long uaddr;
@@ -492,7 +506,8 @@ dma_addr_t iommu_map_single(struct iommu_table *tbl, void *vaddr,
492 npages >>= PAGE_SHIFT; 506 npages >>= PAGE_SHIFT;
493 507
494 if (tbl) { 508 if (tbl) {
495 dma_handle = iommu_alloc(tbl, vaddr, npages, direction, 0); 509 dma_handle = iommu_alloc(tbl, vaddr, npages, direction,
510 mask >> PAGE_SHIFT, 0);
496 if (dma_handle == DMA_ERROR_CODE) { 511 if (dma_handle == DMA_ERROR_CODE) {
497 if (printk_ratelimit()) { 512 if (printk_ratelimit()) {
498 printk(KERN_INFO "iommu_alloc failed, " 513 printk(KERN_INFO "iommu_alloc failed, "
@@ -521,7 +536,7 @@ void iommu_unmap_single(struct iommu_table *tbl, dma_addr_t dma_handle,
521 * to the dma address (mapping) of the first page. 536 * to the dma address (mapping) of the first page.
522 */ 537 */
523void *iommu_alloc_coherent(struct iommu_table *tbl, size_t size, 538void *iommu_alloc_coherent(struct iommu_table *tbl, size_t size,
524 dma_addr_t *dma_handle, gfp_t flag) 539 dma_addr_t *dma_handle, unsigned long mask, gfp_t flag)
525{ 540{
526 void *ret = NULL; 541 void *ret = NULL;
527 dma_addr_t mapping; 542 dma_addr_t mapping;
@@ -551,7 +566,8 @@ void *iommu_alloc_coherent(struct iommu_table *tbl, size_t size,
551 memset(ret, 0, size); 566 memset(ret, 0, size);
552 567
553 /* Set up tces to cover the allocated range */ 568 /* Set up tces to cover the allocated range */
554 mapping = iommu_alloc(tbl, ret, npages, DMA_BIDIRECTIONAL, order); 569 mapping = iommu_alloc(tbl, ret, npages, DMA_BIDIRECTIONAL,
570 mask >> PAGE_SHIFT, order);
555 if (mapping == DMA_ERROR_CODE) { 571 if (mapping == DMA_ERROR_CODE) {
556 free_pages((unsigned long)ret, order); 572 free_pages((unsigned long)ret, order);
557 ret = NULL; 573 ret = NULL;
diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c
index 856ef1a832b9..f78866367b70 100644
--- a/arch/powerpc/kernel/kprobes.c
+++ b/arch/powerpc/kernel/kprobes.c
@@ -90,15 +90,15 @@ void __kprobes arch_remove_kprobe(struct kprobe *p)
90 90
91static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs) 91static void __kprobes prepare_singlestep(struct kprobe *p, struct pt_regs *regs)
92{ 92{
93 kprobe_opcode_t insn = *p->ainsn.insn;
94
95 regs->msr |= MSR_SE; 93 regs->msr |= MSR_SE;
96 94
97 /* single step inline if it is a trap variant */ 95 /*
98 if (is_trap(insn)) 96 * On powerpc we should single step on the original
99 regs->nip = (unsigned long)p->addr; 97 * instruction even if the probed insn is a trap
100 else 98 * variant as values in regs could play a part in
101 regs->nip = (unsigned long)p->ainsn.insn; 99 * if the trap is taken or not
100 */
101 regs->nip = (unsigned long)p->ainsn.insn;
102} 102}
103 103
104static void __kprobes save_previous_kprobe(struct kprobe_ctlblk *kcb) 104static void __kprobes save_previous_kprobe(struct kprobe_ctlblk *kcb)
diff --git a/arch/powerpc/kernel/module_64.c b/arch/powerpc/kernel/module_64.c
index 928b8581fcb0..ba34001fca8e 100644
--- a/arch/powerpc/kernel/module_64.c
+++ b/arch/powerpc/kernel/module_64.c
@@ -191,11 +191,19 @@ int module_frob_arch_sections(Elf64_Ehdr *hdr,
191 (void *)hdr 191 (void *)hdr
192 + sechdrs[sechdrs[i].sh_link].sh_offset); 192 + sechdrs[sechdrs[i].sh_link].sh_offset);
193 } 193 }
194 if (!me->arch.stubs_section || !me->arch.toc_section) { 194
195 printk("%s: doesn't contain .toc or .stubs.\n", me->name); 195 if (!me->arch.stubs_section) {
196 printk("%s: doesn't contain .stubs.\n", me->name);
196 return -ENOEXEC; 197 return -ENOEXEC;
197 } 198 }
198 199
200 /* If we don't have a .toc, just use .stubs. We need to set r2
201 to some reasonable value in case the module calls out to
202 other functions via a stub, or if a function pointer escapes
203 the module by some means. */
204 if (!me->arch.toc_section)
205 me->arch.toc_section = me->arch.stubs_section;
206
199 /* Override the stubs size */ 207 /* Override the stubs size */
200 sechdrs[me->arch.stubs_section].sh_size = get_stubs_size(hdr, sechdrs); 208 sechdrs[me->arch.stubs_section].sh_size = get_stubs_size(hdr, sechdrs);
201 return 0; 209 return 0;
@@ -342,7 +350,7 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,
342 break; 350 break;
343 351
344 case R_PPC64_TOC16: 352 case R_PPC64_TOC16:
345 /* Subtact TOC pointer */ 353 /* Subtract TOC pointer */
346 value -= my_r2(sechdrs, me); 354 value -= my_r2(sechdrs, me);
347 if (value + 0x8000 > 0xffff) { 355 if (value + 0x8000 > 0xffff) {
348 printk("%s: bad TOC16 relocation (%lu)\n", 356 printk("%s: bad TOC16 relocation (%lu)\n",
@@ -355,7 +363,7 @@ int apply_relocate_add(Elf64_Shdr *sechdrs,
355 break; 363 break;
356 364
357 case R_PPC64_TOC16_DS: 365 case R_PPC64_TOC16_DS:
358 /* Subtact TOC pointer */ 366 /* Subtract TOC pointer */
359 value -= my_r2(sechdrs, me); 367 value -= my_r2(sechdrs, me);
360 if ((value & 3) != 0 || value + 0x8000 > 0xffff) { 368 if ((value & 3) != 0 || value + 0x8000 > 0xffff) {
361 printk("%s: bad TOC16_DS relocation (%lu)\n", 369 printk("%s: bad TOC16_DS relocation (%lu)\n",
diff --git a/arch/powerpc/kernel/pci_iommu.c b/arch/powerpc/kernel/pci_iommu.c
index c336f3e31cff..c1d95e14bbed 100644
--- a/arch/powerpc/kernel/pci_iommu.c
+++ b/arch/powerpc/kernel/pci_iommu.c
@@ -59,6 +59,25 @@ static inline struct iommu_table *devnode_table(struct device *dev)
59} 59}
60 60
61 61
62static inline unsigned long device_to_mask(struct device *hwdev)
63{
64 struct pci_dev *pdev;
65
66 if (!hwdev) {
67 pdev = ppc64_isabridge_dev;
68 if (!pdev) /* This is the best guess we can do */
69 return 0xfffffffful;
70 } else
71 pdev = to_pci_dev(hwdev);
72
73 if (pdev->dma_mask)
74 return pdev->dma_mask;
75
76 /* Assume devices without mask can take 32 bit addresses */
77 return 0xfffffffful;
78}
79
80
62/* Allocates a contiguous real buffer and creates mappings over it. 81/* Allocates a contiguous real buffer and creates mappings over it.
63 * Returns the virtual address of the buffer and sets dma_handle 82 * Returns the virtual address of the buffer and sets dma_handle
64 * to the dma address (mapping) of the first page. 83 * to the dma address (mapping) of the first page.
@@ -67,7 +86,7 @@ static void *pci_iommu_alloc_coherent(struct device *hwdev, size_t size,
67 dma_addr_t *dma_handle, gfp_t flag) 86 dma_addr_t *dma_handle, gfp_t flag)
68{ 87{
69 return iommu_alloc_coherent(devnode_table(hwdev), size, dma_handle, 88 return iommu_alloc_coherent(devnode_table(hwdev), size, dma_handle,
70 flag); 89 device_to_mask(hwdev), flag);
71} 90}
72 91
73static void pci_iommu_free_coherent(struct device *hwdev, size_t size, 92static void pci_iommu_free_coherent(struct device *hwdev, size_t size,
@@ -85,7 +104,8 @@ static void pci_iommu_free_coherent(struct device *hwdev, size_t size,
85static dma_addr_t pci_iommu_map_single(struct device *hwdev, void *vaddr, 104static dma_addr_t pci_iommu_map_single(struct device *hwdev, void *vaddr,
86 size_t size, enum dma_data_direction direction) 105 size_t size, enum dma_data_direction direction)
87{ 106{
88 return iommu_map_single(devnode_table(hwdev), vaddr, size, direction); 107 return iommu_map_single(devnode_table(hwdev), vaddr, size,
108 device_to_mask(hwdev), direction);
89} 109}
90 110
91 111
@@ -100,7 +120,7 @@ static int pci_iommu_map_sg(struct device *pdev, struct scatterlist *sglist,
100 int nelems, enum dma_data_direction direction) 120 int nelems, enum dma_data_direction direction)
101{ 121{
102 return iommu_map_sg(pdev, devnode_table(pdev), sglist, 122 return iommu_map_sg(pdev, devnode_table(pdev), sglist,
103 nelems, direction); 123 nelems, device_to_mask(pdev), direction);
104} 124}
105 125
106static void pci_iommu_unmap_sg(struct device *pdev, struct scatterlist *sglist, 126static void pci_iommu_unmap_sg(struct device *pdev, struct scatterlist *sglist,
@@ -112,7 +132,19 @@ static void pci_iommu_unmap_sg(struct device *pdev, struct scatterlist *sglist,
112/* We support DMA to/from any memory page via the iommu */ 132/* We support DMA to/from any memory page via the iommu */
113static int pci_iommu_dma_supported(struct device *dev, u64 mask) 133static int pci_iommu_dma_supported(struct device *dev, u64 mask)
114{ 134{
115 return 1; 135 struct iommu_table *tbl = devnode_table(dev);
136
137 if (!tbl || tbl->it_offset > mask) {
138 printk(KERN_INFO "Warning: IOMMU table offset too big for device mask\n");
139 if (tbl)
140 printk(KERN_INFO "mask: 0x%08lx, table offset: 0x%08lx\n",
141 mask, tbl->it_offset);
142 else
143 printk(KERN_INFO "mask: 0x%08lx, table unavailable\n",
144 mask);
145 return 0;
146 } else
147 return 1;
116} 148}
117 149
118void pci_iommu_init(void) 150void pci_iommu_init(void)
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c
index dfa5398ab3c8..4b052ae5dc34 100644
--- a/arch/powerpc/kernel/ppc_ksyms.c
+++ b/arch/powerpc/kernel/ppc_ksyms.c
@@ -81,6 +81,7 @@ EXPORT_SYMBOL(strcat);
81EXPORT_SYMBOL(strlen); 81EXPORT_SYMBOL(strlen);
82EXPORT_SYMBOL(strcmp); 82EXPORT_SYMBOL(strcmp);
83EXPORT_SYMBOL(strcasecmp); 83EXPORT_SYMBOL(strcasecmp);
84EXPORT_SYMBOL(strncasecmp);
84 85
85EXPORT_SYMBOL(csum_partial); 86EXPORT_SYMBOL(csum_partial);
86EXPORT_SYMBOL(csum_partial_copy_generic); 87EXPORT_SYMBOL(csum_partial_copy_generic);
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 4336390bcf34..9a07f97f0712 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -62,7 +62,7 @@ static int __initdata dt_root_addr_cells;
62static int __initdata dt_root_size_cells; 62static int __initdata dt_root_size_cells;
63 63
64#ifdef CONFIG_PPC64 64#ifdef CONFIG_PPC64
65static int __initdata iommu_is_off; 65int __initdata iommu_is_off;
66int __initdata iommu_force_on; 66int __initdata iommu_force_on;
67unsigned long tce_alloc_start, tce_alloc_end; 67unsigned long tce_alloc_start, tce_alloc_end;
68#endif 68#endif
@@ -885,6 +885,74 @@ void __init unflatten_device_tree(void)
885 DBG(" <- unflatten_device_tree()\n"); 885 DBG(" <- unflatten_device_tree()\n");
886} 886}
887 887
888/*
889 * ibm,pa-features is a per-cpu property that contains a string of
890 * attribute descriptors, each of which has a 2 byte header plus up
891 * to 254 bytes worth of processor attribute bits. First header
892 * byte specifies the number of bytes following the header.
893 * Second header byte is an "attribute-specifier" type, of which
894 * zero is the only currently-defined value.
895 * Implementation: Pass in the byte and bit offset for the feature
896 * that we are interested in. The function will return -1 if the
897 * pa-features property is missing, or a 1/0 to indicate if the feature
898 * is supported/not supported. Note that the bit numbers are
899 * big-endian to match the definition in PAPR.
900 */
901static struct ibm_pa_feature {
902 unsigned long cpu_features; /* CPU_FTR_xxx bit */
903 unsigned int cpu_user_ftrs; /* PPC_FEATURE_xxx bit */
904 unsigned char pabyte; /* byte number in ibm,pa-features */
905 unsigned char pabit; /* bit number (big-endian) */
906 unsigned char invert; /* if 1, pa bit set => clear feature */
907} ibm_pa_features[] __initdata = {
908 {0, PPC_FEATURE_HAS_MMU, 0, 0, 0},
909 {0, PPC_FEATURE_HAS_FPU, 0, 1, 0},
910 {CPU_FTR_SLB, 0, 0, 2, 0},
911 {CPU_FTR_CTRL, 0, 0, 3, 0},
912 {CPU_FTR_NOEXECUTE, 0, 0, 6, 0},
913 {CPU_FTR_NODSISRALIGN, 0, 1, 1, 1},
914 {CPU_FTR_CI_LARGE_PAGE, 0, 1, 2, 0},
915};
916
917static void __init check_cpu_pa_features(unsigned long node)
918{
919 unsigned char *pa_ftrs;
920 unsigned long len, tablelen, i, bit;
921
922 pa_ftrs = of_get_flat_dt_prop(node, "ibm,pa-features", &tablelen);
923 if (pa_ftrs == NULL)
924 return;
925
926 /* find descriptor with type == 0 */
927 for (;;) {
928 if (tablelen < 3)
929 return;
930 len = 2 + pa_ftrs[0];
931 if (tablelen < len)
932 return; /* descriptor 0 not found */
933 if (pa_ftrs[1] == 0)
934 break;
935 tablelen -= len;
936 pa_ftrs += len;
937 }
938
939 /* loop over bits we know about */
940 for (i = 0; i < ARRAY_SIZE(ibm_pa_features); ++i) {
941 struct ibm_pa_feature *fp = &ibm_pa_features[i];
942
943 if (fp->pabyte >= pa_ftrs[0])
944 continue;
945 bit = (pa_ftrs[2 + fp->pabyte] >> (7 - fp->pabit)) & 1;
946 if (bit ^ fp->invert) {
947 cur_cpu_spec->cpu_features |= fp->cpu_features;
948 cur_cpu_spec->cpu_user_features |= fp->cpu_user_ftrs;
949 } else {
950 cur_cpu_spec->cpu_features &= ~fp->cpu_features;
951 cur_cpu_spec->cpu_user_features &= ~fp->cpu_user_ftrs;
952 }
953 }
954}
955
888static int __init early_init_dt_scan_cpus(unsigned long node, 956static int __init early_init_dt_scan_cpus(unsigned long node,
889 const char *uname, int depth, 957 const char *uname, int depth,
890 void *data) 958 void *data)
@@ -969,6 +1037,8 @@ static int __init early_init_dt_scan_cpus(unsigned long node,
969 } 1037 }
970#endif /* CONFIG_ALTIVEC */ 1038#endif /* CONFIG_ALTIVEC */
971 1039
1040 check_cpu_pa_features(node);
1041
972#ifdef CONFIG_PPC_PSERIES 1042#ifdef CONFIG_PPC_PSERIES
973 if (nthreads > 1) 1043 if (nthreads > 1)
974 cur_cpu_spec->cpu_features |= CPU_FTR_SMT; 1044 cur_cpu_spec->cpu_features |= CPU_FTR_SMT;
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 7e4d54821a07..078fb5533541 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -636,10 +636,96 @@ static void __init early_cmdline_parse(void)
636 636
637#ifdef CONFIG_PPC_PSERIES 637#ifdef CONFIG_PPC_PSERIES
638/* 638/*
639 * To tell the firmware what our capabilities are, we have to pass 639 * There are two methods for telling firmware what our capabilities are.
640 * it a fake 32-bit ELF header containing a couple of PT_NOTE sections 640 * Newer machines have an "ibm,client-architecture-support" method on the
641 * that contain structures that contain the actual values. 641 * root node. For older machines, we have to call the "process-elf-header"
642 * method in the /packages/elf-loader node, passing it a fake 32-bit
643 * ELF header containing a couple of PT_NOTE sections that contain
644 * structures that contain various information.
642 */ 645 */
646
647/*
648 * New method - extensible architecture description vector.
649 *
650 * Because the description vector contains a mix of byte and word
651 * values, we declare it as an unsigned char array, and use this
652 * macro to put word values in.
653 */
654#define W(x) ((x) >> 24) & 0xff, ((x) >> 16) & 0xff, \
655 ((x) >> 8) & 0xff, (x) & 0xff
656
657/* Option vector bits - generic bits in byte 1 */
658#define OV_IGNORE 0x80 /* ignore this vector */
659#define OV_CESSATION_POLICY 0x40 /* halt if unsupported option present*/
660
661/* Option vector 1: processor architectures supported */
662#define OV1_PPC_2_00 0x80 /* set if we support PowerPC 2.00 */
663#define OV1_PPC_2_01 0x40 /* set if we support PowerPC 2.01 */
664#define OV1_PPC_2_02 0x20 /* set if we support PowerPC 2.02 */
665#define OV1_PPC_2_03 0x10 /* set if we support PowerPC 2.03 */
666#define OV1_PPC_2_04 0x08 /* set if we support PowerPC 2.04 */
667#define OV1_PPC_2_05 0x04 /* set if we support PowerPC 2.05 */
668
669/* Option vector 2: Open Firmware options supported */
670#define OV2_REAL_MODE 0x20 /* set if we want OF in real mode */
671
672/* Option vector 3: processor options supported */
673#define OV3_FP 0x80 /* floating point */
674#define OV3_VMX 0x40 /* VMX/Altivec */
675
676/* Option vector 5: PAPR/OF options supported */
677#define OV5_LPAR 0x80 /* logical partitioning supported */
678#define OV5_SPLPAR 0x40 /* shared-processor LPAR supported */
679/* ibm,dynamic-reconfiguration-memory property supported */
680#define OV5_DRCONF_MEMORY 0x20
681#define OV5_LARGE_PAGES 0x10 /* large pages supported */
682
683/*
684 * The architecture vector has an array of PVR mask/value pairs,
685 * followed by # option vectors - 1, followed by the option vectors.
686 */
687static unsigned char ibm_architecture_vec[] = {
688 W(0xfffe0000), W(0x003a0000), /* POWER5/POWER5+ */
689 W(0xffff0000), W(0x003e0000), /* POWER6 */
690 W(0xfffffffe), W(0x0f000001), /* all 2.04-compliant and earlier */
691 5 - 1, /* 5 option vectors */
692
693 /* option vector 1: processor architectures supported */
694 3 - 1, /* length */
695 0, /* don't ignore, don't halt */
696 OV1_PPC_2_00 | OV1_PPC_2_01 | OV1_PPC_2_02 | OV1_PPC_2_03 |
697 OV1_PPC_2_04 | OV1_PPC_2_05,
698
699 /* option vector 2: Open Firmware options supported */
700 34 - 1, /* length */
701 OV2_REAL_MODE,
702 0, 0,
703 W(0xffffffff), /* real_base */
704 W(0xffffffff), /* real_size */
705 W(0xffffffff), /* virt_base */
706 W(0xffffffff), /* virt_size */
707 W(0xffffffff), /* load_base */
708 W(64), /* 128MB min RMA */
709 W(0xffffffff), /* full client load */
710 0, /* min RMA percentage of total RAM */
711 48, /* max log_2(hash table size) */
712
713 /* option vector 3: processor options supported */
714 3 - 1, /* length */
715 0, /* don't ignore, don't halt */
716 OV3_FP | OV3_VMX,
717
718 /* option vector 4: IBM PAPR implementation */
719 2 - 1, /* length */
720 0, /* don't halt */
721
722 /* option vector 5: PAPR/OF options */
723 3 - 1, /* length */
724 0, /* don't ignore, don't halt */
725 OV5_LPAR | OV5_SPLPAR | OV5_LARGE_PAGES,
726};
727
728/* Old method - ELF header with PT_NOTE sections */
643static struct fake_elf { 729static struct fake_elf {
644 Elf32_Ehdr elfhdr; 730 Elf32_Ehdr elfhdr;
645 Elf32_Phdr phdr[2]; 731 Elf32_Phdr phdr[2];
@@ -728,8 +814,26 @@ static struct fake_elf {
728 814
729static void __init prom_send_capabilities(void) 815static void __init prom_send_capabilities(void)
730{ 816{
731 ihandle elfloader; 817 ihandle elfloader, root;
818 prom_arg_t ret;
819
820 root = call_prom("open", 1, 1, ADDR("/"));
821 if (root != 0) {
822 /* try calling the ibm,client-architecture-support method */
823 if (call_prom_ret("call-method", 3, 2, &ret,
824 ADDR("ibm,client-architecture-support"),
825 ADDR(ibm_architecture_vec)) == 0) {
826 /* the call exists... */
827 if (ret)
828 prom_printf("WARNING: ibm,client-architecture"
829 "-support call FAILED!\n");
830 call_prom("close", 1, 0, root);
831 return;
832 }
833 call_prom("close", 1, 0, root);
834 }
732 835
836 /* no ibm,client-architecture-support call, try the old way */
733 elfloader = call_prom("open", 1, 1, ADDR("/packages/elf-loader")); 837 elfloader = call_prom("open", 1, 1, ADDR("/packages/elf-loader"));
734 if (elfloader == 0) { 838 if (elfloader == 0) {
735 prom_printf("couldn't open /packages/elf-loader\n"); 839 prom_printf("couldn't open /packages/elf-loader\n");
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index bcb83574335b..4a677d1bd4ef 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -538,7 +538,7 @@ void do_syscall_trace_enter(struct pt_regs *regs)
538 do_syscall_trace(); 538 do_syscall_trace();
539 539
540 if (unlikely(current->audit_context)) 540 if (unlikely(current->audit_context))
541 audit_syscall_entry(current, 541 audit_syscall_entry(
542#ifdef CONFIG_PPC32 542#ifdef CONFIG_PPC32
543 AUDIT_ARCH_PPC, 543 AUDIT_ARCH_PPC,
544#else 544#else
@@ -556,8 +556,7 @@ void do_syscall_trace_leave(struct pt_regs *regs)
556#endif 556#endif
557 557
558 if (unlikely(current->audit_context)) 558 if (unlikely(current->audit_context))
559 audit_syscall_exit(current, 559 audit_syscall_exit((regs->ccr&0x1000)?AUDITSC_FAILURE:AUDITSC_SUCCESS,
560 (regs->ccr&0x1000)?AUDITSC_FAILURE:AUDITSC_SUCCESS,
561 regs->result); 560 regs->result);
562 561
563 if ((test_thread_flag(TIF_SYSCALL_TRACE) 562 if ((test_thread_flag(TIF_SYSCALL_TRACE)
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index 1d93e73a7003..684ab1d49c65 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -516,3 +516,11 @@ void probe_machine(void)
516 516
517 printk(KERN_INFO "Using %s machine description\n", ppc_md.name); 517 printk(KERN_INFO "Using %s machine description\n", ppc_md.name);
518} 518}
519
520int check_legacy_ioport(unsigned long base_port)
521{
522 if (ppc_md.check_legacy_ioport == NULL)
523 return 0;
524 return ppc_md.check_legacy_ioport(base_port);
525}
526EXPORT_SYMBOL(check_legacy_ioport);
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 13e91c4d70a8..4467c49903b6 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -594,14 +594,6 @@ void ppc64_terminate_msg(unsigned int src, const char *msg)
594 printk("[terminate]%04x %s\n", src, msg); 594 printk("[terminate]%04x %s\n", src, msg);
595} 595}
596 596
597int check_legacy_ioport(unsigned long base_port)
598{
599 if (ppc_md.check_legacy_ioport == NULL)
600 return 0;
601 return ppc_md.check_legacy_ioport(base_port);
602}
603EXPORT_SYMBOL(check_legacy_ioport);
604
605void cpu_die(void) 597void cpu_die(void)
606{ 598{
607 if (ppc_md.cpu_die) 599 if (ppc_md.cpu_die)
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c
index 73560ef6f802..5bc2585c8036 100644
--- a/arch/powerpc/kernel/sysfs.c
+++ b/arch/powerpc/kernel/sysfs.c
@@ -279,7 +279,7 @@ static void unregister_cpu_online(unsigned int cpu)
279} 279}
280#endif /* CONFIG_HOTPLUG_CPU */ 280#endif /* CONFIG_HOTPLUG_CPU */
281 281
282static int __devinit sysfs_cpu_notify(struct notifier_block *self, 282static int sysfs_cpu_notify(struct notifier_block *self,
283 unsigned long action, void *hcpu) 283 unsigned long action, void *hcpu)
284{ 284{
285 unsigned int cpu = (unsigned int)(long)hcpu; 285 unsigned int cpu = (unsigned int)(long)hcpu;
@@ -297,7 +297,7 @@ static int __devinit sysfs_cpu_notify(struct notifier_block *self,
297 return NOTIFY_OK; 297 return NOTIFY_OK;
298} 298}
299 299
300static struct notifier_block __devinitdata sysfs_cpu_nb = { 300static struct notifier_block sysfs_cpu_nb = {
301 .notifier_call = sysfs_cpu_notify, 301 .notifier_call = sysfs_cpu_notify,
302}; 302};
303 303
@@ -322,13 +322,31 @@ static void register_nodes(void)
322 } 322 }
323 } 323 }
324} 324}
325
326int sysfs_add_device_to_node(struct sys_device *dev, int nid)
327{
328 struct node *node = &node_devices[nid];
329 return sysfs_create_link(&node->sysdev.kobj, &dev->kobj,
330 kobject_name(&dev->kobj));
331}
332
333void sysfs_remove_device_from_node(struct sys_device *dev, int nid)
334{
335 struct node *node = &node_devices[nid];
336 sysfs_remove_link(&node->sysdev.kobj, kobject_name(&dev->kobj));
337}
338
325#else 339#else
326static void register_nodes(void) 340static void register_nodes(void)
327{ 341{
328 return; 342 return;
329} 343}
344
330#endif 345#endif
331 346
347EXPORT_SYMBOL_GPL(sysfs_add_device_to_node);
348EXPORT_SYMBOL_GPL(sysfs_remove_device_from_node);
349
332/* Only valid if CPU is present. */ 350/* Only valid if CPU is present. */
333static ssize_t show_physical_id(struct sys_device *dev, char *buf) 351static ssize_t show_physical_id(struct sys_device *dev, char *buf)
334{ 352{
diff --git a/arch/powerpc/kernel/systbl.S b/arch/powerpc/kernel/systbl.S
index a14c96403840..cf56a1d499ff 100644
--- a/arch/powerpc/kernel/systbl.S
+++ b/arch/powerpc/kernel/systbl.S
@@ -324,3 +324,22 @@ COMPAT_SYS(ppoll)
324SYSCALL(unshare) 324SYSCALL(unshare)
325SYSCALL(splice) 325SYSCALL(splice)
326SYSCALL(tee) 326SYSCALL(tee)
327SYSCALL(vmsplice)
328COMPAT_SYS(openat)
329SYSCALL(mkdirat)
330SYSCALL(mknodat)
331SYSCALL(fchownat)
332COMPAT_SYS(futimesat)
333SYSX(sys_newfstatat, sys_fstatat64, sys_fstatat64)
334SYSCALL(unlinkat)
335SYSCALL(renameat)
336SYSCALL(linkat)
337SYSCALL(symlinkat)
338SYSCALL(readlinkat)
339SYSCALL(fchmodat)
340SYSCALL(faccessat)
341
342/*
343 * please add new calls to arch/powerpc/platforms/cell/spu_callbacks.c
344 * as well when appropriate.
345 */
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
index 13c655ba2841..971020cf3f7d 100644
--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -202,7 +202,7 @@ static dma_addr_t vio_map_single(struct device *dev, void *vaddr,
202 size_t size, enum dma_data_direction direction) 202 size_t size, enum dma_data_direction direction)
203{ 203{
204 return iommu_map_single(to_vio_dev(dev)->iommu_table, vaddr, size, 204 return iommu_map_single(to_vio_dev(dev)->iommu_table, vaddr, size,
205 direction); 205 ~0ul, direction);
206} 206}
207 207
208static void vio_unmap_single(struct device *dev, dma_addr_t dma_handle, 208static void vio_unmap_single(struct device *dev, dma_addr_t dma_handle,
@@ -216,7 +216,7 @@ static int vio_map_sg(struct device *dev, struct scatterlist *sglist,
216 int nelems, enum dma_data_direction direction) 216 int nelems, enum dma_data_direction direction)
217{ 217{
218 return iommu_map_sg(dev, to_vio_dev(dev)->iommu_table, sglist, 218 return iommu_map_sg(dev, to_vio_dev(dev)->iommu_table, sglist,
219 nelems, direction); 219 nelems, ~0ul, direction);
220} 220}
221 221
222static void vio_unmap_sg(struct device *dev, struct scatterlist *sglist, 222static void vio_unmap_sg(struct device *dev, struct scatterlist *sglist,
@@ -229,7 +229,7 @@ static void *vio_alloc_coherent(struct device *dev, size_t size,
229 dma_addr_t *dma_handle, gfp_t flag) 229 dma_addr_t *dma_handle, gfp_t flag)
230{ 230{
231 return iommu_alloc_coherent(to_vio_dev(dev)->iommu_table, size, 231 return iommu_alloc_coherent(to_vio_dev(dev)->iommu_table, size,
232 dma_handle, flag); 232 dma_handle, ~0ul, flag);
233} 233}
234 234
235static void vio_free_coherent(struct device *dev, size_t size, 235static void vio_free_coherent(struct device *dev, size_t size,
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index 7370f9f33e29..266b8b2ceac9 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -30,13 +30,66 @@
30#define NUM_LOW_AREAS (0x100000000UL >> SID_SHIFT) 30#define NUM_LOW_AREAS (0x100000000UL >> SID_SHIFT)
31#define NUM_HIGH_AREAS (PGTABLE_RANGE >> HTLB_AREA_SHIFT) 31#define NUM_HIGH_AREAS (PGTABLE_RANGE >> HTLB_AREA_SHIFT)
32 32
33#ifdef CONFIG_PPC_64K_PAGES
34#define HUGEPTE_INDEX_SIZE (PMD_SHIFT-HPAGE_SHIFT)
35#else
36#define HUGEPTE_INDEX_SIZE (PUD_SHIFT-HPAGE_SHIFT)
37#endif
38#define PTRS_PER_HUGEPTE (1 << HUGEPTE_INDEX_SIZE)
39#define HUGEPTE_TABLE_SIZE (sizeof(pte_t) << HUGEPTE_INDEX_SIZE)
40
41#define HUGEPD_SHIFT (HPAGE_SHIFT + HUGEPTE_INDEX_SIZE)
42#define HUGEPD_SIZE (1UL << HUGEPD_SHIFT)
43#define HUGEPD_MASK (~(HUGEPD_SIZE-1))
44
45#define huge_pgtable_cache (pgtable_cache[HUGEPTE_CACHE_NUM])
46
47/* Flag to mark huge PD pointers. This means pmd_bad() and pud_bad()
48 * will choke on pointers to hugepte tables, which is handy for
49 * catching screwups early. */
50#define HUGEPD_OK 0x1
51
52typedef struct { unsigned long pd; } hugepd_t;
53
54#define hugepd_none(hpd) ((hpd).pd == 0)
55
56static inline pte_t *hugepd_page(hugepd_t hpd)
57{
58 BUG_ON(!(hpd.pd & HUGEPD_OK));
59 return (pte_t *)(hpd.pd & ~HUGEPD_OK);
60}
61
62static inline pte_t *hugepte_offset(hugepd_t *hpdp, unsigned long addr)
63{
64 unsigned long idx = ((addr >> HPAGE_SHIFT) & (PTRS_PER_HUGEPTE-1));
65 pte_t *dir = hugepd_page(*hpdp);
66
67 return dir + idx;
68}
69
70static int __hugepte_alloc(struct mm_struct *mm, hugepd_t *hpdp,
71 unsigned long address)
72{
73 pte_t *new = kmem_cache_alloc(huge_pgtable_cache,
74 GFP_KERNEL|__GFP_REPEAT);
75
76 if (! new)
77 return -ENOMEM;
78
79 spin_lock(&mm->page_table_lock);
80 if (!hugepd_none(*hpdp))
81 kmem_cache_free(huge_pgtable_cache, new);
82 else
83 hpdp->pd = (unsigned long)new | HUGEPD_OK;
84 spin_unlock(&mm->page_table_lock);
85 return 0;
86}
87
33/* Modelled after find_linux_pte() */ 88/* Modelled after find_linux_pte() */
34pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) 89pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr)
35{ 90{
36 pgd_t *pg; 91 pgd_t *pg;
37 pud_t *pu; 92 pud_t *pu;
38 pmd_t *pm;
39 pte_t *pt;
40 93
41 BUG_ON(! in_hugepage_area(mm->context, addr)); 94 BUG_ON(! in_hugepage_area(mm->context, addr));
42 95
@@ -46,26 +99,14 @@ pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr)
46 if (!pgd_none(*pg)) { 99 if (!pgd_none(*pg)) {
47 pu = pud_offset(pg, addr); 100 pu = pud_offset(pg, addr);
48 if (!pud_none(*pu)) { 101 if (!pud_none(*pu)) {
49 pm = pmd_offset(pu, addr);
50#ifdef CONFIG_PPC_64K_PAGES 102#ifdef CONFIG_PPC_64K_PAGES
51 /* Currently, we use the normal PTE offset within full 103 pmd_t *pm;
52 * size PTE pages, thus our huge PTEs are scattered in 104 pm = pmd_offset(pu, addr);
53 * the PTE page and we do waste some. We may change 105 if (!pmd_none(*pm))
54 * that in the future, but the current mecanism keeps 106 return hugepte_offset((hugepd_t *)pm, addr);
55 * things much simpler 107#else
56 */ 108 return hugepte_offset((hugepd_t *)pu, addr);
57 if (!pmd_none(*pm)) { 109#endif
58 /* Note: pte_offset_* are all equivalent on
59 * ppc64 as we don't have HIGHMEM
60 */
61 pt = pte_offset_kernel(pm, addr);
62 return pt;
63 }
64#else /* CONFIG_PPC_64K_PAGES */
65 /* On 4k pages, we put huge PTEs in the PMD page */
66 pt = (pte_t *)pm;
67 return pt;
68#endif /* CONFIG_PPC_64K_PAGES */
69 } 110 }
70 } 111 }
71 112
@@ -76,8 +117,7 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr)
76{ 117{
77 pgd_t *pg; 118 pgd_t *pg;
78 pud_t *pu; 119 pud_t *pu;
79 pmd_t *pm; 120 hugepd_t *hpdp = NULL;
80 pte_t *pt;
81 121
82 BUG_ON(! in_hugepage_area(mm->context, addr)); 122 BUG_ON(! in_hugepage_area(mm->context, addr));
83 123
@@ -87,23 +127,182 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr)
87 pu = pud_alloc(mm, pg, addr); 127 pu = pud_alloc(mm, pg, addr);
88 128
89 if (pu) { 129 if (pu) {
130#ifdef CONFIG_PPC_64K_PAGES
131 pmd_t *pm;
90 pm = pmd_alloc(mm, pu, addr); 132 pm = pmd_alloc(mm, pu, addr);
91 if (pm) { 133 if (pm)
134 hpdp = (hugepd_t *)pm;
135#else
136 hpdp = (hugepd_t *)pu;
137#endif
138 }
139
140 if (! hpdp)
141 return NULL;
142
143 if (hugepd_none(*hpdp) && __hugepte_alloc(mm, hpdp, addr))
144 return NULL;
145
146 return hugepte_offset(hpdp, addr);
147}
148
149static void free_hugepte_range(struct mmu_gather *tlb, hugepd_t *hpdp)
150{
151 pte_t *hugepte = hugepd_page(*hpdp);
152
153 hpdp->pd = 0;
154 tlb->need_flush = 1;
155 pgtable_free_tlb(tlb, pgtable_free_cache(hugepte, HUGEPTE_CACHE_NUM,
156 HUGEPTE_TABLE_SIZE-1));
157}
158
92#ifdef CONFIG_PPC_64K_PAGES 159#ifdef CONFIG_PPC_64K_PAGES
93 /* See comment in huge_pte_offset. Note that if we ever 160static void hugetlb_free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
94 * want to put the page size in the PMD, we would have 161 unsigned long addr, unsigned long end,
95 * to open code our own pte_alloc* function in order 162 unsigned long floor, unsigned long ceiling)
96 * to populate and set the size atomically 163{
97 */ 164 pmd_t *pmd;
98 pt = pte_alloc_map(mm, pm, addr); 165 unsigned long next;
99#else /* CONFIG_PPC_64K_PAGES */ 166 unsigned long start;
100 pt = (pte_t *)pm; 167
101#endif /* CONFIG_PPC_64K_PAGES */ 168 start = addr;
102 return pt; 169 pmd = pmd_offset(pud, addr);
103 } 170 do {
171 next = pmd_addr_end(addr, end);
172 if (pmd_none(*pmd))
173 continue;
174 free_hugepte_range(tlb, (hugepd_t *)pmd);
175 } while (pmd++, addr = next, addr != end);
176
177 start &= PUD_MASK;
178 if (start < floor)
179 return;
180 if (ceiling) {
181 ceiling &= PUD_MASK;
182 if (!ceiling)
183 return;
104 } 184 }
185 if (end - 1 > ceiling - 1)
186 return;
105 187
106 return NULL; 188 pmd = pmd_offset(pud, start);
189 pud_clear(pud);
190 pmd_free_tlb(tlb, pmd);
191}
192#endif
193
194static void hugetlb_free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
195 unsigned long addr, unsigned long end,
196 unsigned long floor, unsigned long ceiling)
197{
198 pud_t *pud;
199 unsigned long next;
200 unsigned long start;
201
202 start = addr;
203 pud = pud_offset(pgd, addr);
204 do {
205 next = pud_addr_end(addr, end);
206#ifdef CONFIG_PPC_64K_PAGES
207 if (pud_none_or_clear_bad(pud))
208 continue;
209 hugetlb_free_pmd_range(tlb, pud, addr, next, floor, ceiling);
210#else
211 if (pud_none(*pud))
212 continue;
213 free_hugepte_range(tlb, (hugepd_t *)pud);
214#endif
215 } while (pud++, addr = next, addr != end);
216
217 start &= PGDIR_MASK;
218 if (start < floor)
219 return;
220 if (ceiling) {
221 ceiling &= PGDIR_MASK;
222 if (!ceiling)
223 return;
224 }
225 if (end - 1 > ceiling - 1)
226 return;
227
228 pud = pud_offset(pgd, start);
229 pgd_clear(pgd);
230 pud_free_tlb(tlb, pud);
231}
232
233/*
234 * This function frees user-level page tables of a process.
235 *
236 * Must be called with pagetable lock held.
237 */
238void hugetlb_free_pgd_range(struct mmu_gather **tlb,
239 unsigned long addr, unsigned long end,
240 unsigned long floor, unsigned long ceiling)
241{
242 pgd_t *pgd;
243 unsigned long next;
244 unsigned long start;
245
246 /*
247 * Comments below take from the normal free_pgd_range(). They
248 * apply here too. The tests against HUGEPD_MASK below are
249 * essential, because we *don't* test for this at the bottom
250 * level. Without them we'll attempt to free a hugepte table
251 * when we unmap just part of it, even if there are other
252 * active mappings using it.
253 *
254 * The next few lines have given us lots of grief...
255 *
256 * Why are we testing HUGEPD* at this top level? Because
257 * often there will be no work to do at all, and we'd prefer
258 * not to go all the way down to the bottom just to discover
259 * that.
260 *
261 * Why all these "- 1"s? Because 0 represents both the bottom
262 * of the address space and the top of it (using -1 for the
263 * top wouldn't help much: the masks would do the wrong thing).
264 * The rule is that addr 0 and floor 0 refer to the bottom of
265 * the address space, but end 0 and ceiling 0 refer to the top
266 * Comparisons need to use "end - 1" and "ceiling - 1" (though
267 * that end 0 case should be mythical).
268 *
269 * Wherever addr is brought up or ceiling brought down, we
270 * must be careful to reject "the opposite 0" before it
271 * confuses the subsequent tests. But what about where end is
272 * brought down by HUGEPD_SIZE below? no, end can't go down to
273 * 0 there.
274 *
275 * Whereas we round start (addr) and ceiling down, by different
276 * masks at different levels, in order to test whether a table
277 * now has no other vmas using it, so can be freed, we don't
278 * bother to round floor or end up - the tests don't need that.
279 */
280
281 addr &= HUGEPD_MASK;
282 if (addr < floor) {
283 addr += HUGEPD_SIZE;
284 if (!addr)
285 return;
286 }
287 if (ceiling) {
288 ceiling &= HUGEPD_MASK;
289 if (!ceiling)
290 return;
291 }
292 if (end - 1 > ceiling - 1)
293 end -= HUGEPD_SIZE;
294 if (addr > end - 1)
295 return;
296
297 start = addr;
298 pgd = pgd_offset((*tlb)->mm, addr);
299 do {
300 BUG_ON(! in_hugepage_area((*tlb)->mm->context, addr));
301 next = pgd_addr_end(addr, end);
302 if (pgd_none_or_clear_bad(pgd))
303 continue;
304 hugetlb_free_pud_range(*tlb, pgd, addr, next, floor, ceiling);
305 } while (pgd++, addr = next, addr != end);
107} 306}
108 307
109void set_huge_pte_at(struct mm_struct *mm, unsigned long addr, 308void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
@@ -841,3 +1040,27 @@ repeat:
841 out: 1040 out:
842 return err; 1041 return err;
843} 1042}
1043
1044static void zero_ctor(void *addr, kmem_cache_t *cache, unsigned long flags)
1045{
1046 memset(addr, 0, kmem_cache_size(cache));
1047}
1048
1049static int __init hugetlbpage_init(void)
1050{
1051 if (!cpu_has_feature(CPU_FTR_16M_PAGE))
1052 return -ENODEV;
1053
1054 huge_pgtable_cache = kmem_cache_create("hugepte_cache",
1055 HUGEPTE_TABLE_SIZE,
1056 HUGEPTE_TABLE_SIZE,
1057 SLAB_HWCACHE_ALIGN |
1058 SLAB_MUST_HWCACHE_ALIGN,
1059 zero_ctor, NULL);
1060 if (! huge_pgtable_cache)
1061 panic("hugetlbpage_init(): could not create hugepte cache\n");
1062
1063 return 0;
1064}
1065
1066module_init(hugetlbpage_init);
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c
index babebd15bdc4..9e30f968c184 100644
--- a/arch/powerpc/mm/init_64.c
+++ b/arch/powerpc/mm/init_64.c
@@ -162,7 +162,14 @@ static const char *pgtable_cache_name[ARRAY_SIZE(pgtable_cache_size)] = {
162}; 162};
163#endif /* CONFIG_PPC_64K_PAGES */ 163#endif /* CONFIG_PPC_64K_PAGES */
164 164
165#ifdef CONFIG_HUGETLB_PAGE
166/* Hugepages need one extra cache, initialized in hugetlbpage.c. We
167 * can't put into the tables above, because HPAGE_SHIFT is not compile
168 * time constant. */
169kmem_cache_t *pgtable_cache[ARRAY_SIZE(pgtable_cache_size)+1];
170#else
165kmem_cache_t *pgtable_cache[ARRAY_SIZE(pgtable_cache_size)]; 171kmem_cache_t *pgtable_cache[ARRAY_SIZE(pgtable_cache_size)];
172#endif
166 173
167void pgtable_cache_init(void) 174void pgtable_cache_init(void)
168{ 175{
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 0a335f34974c..092355f37399 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -194,7 +194,7 @@ static int *of_get_associativity(struct device_node *dev)
194/* Returns nid in the range [0..MAX_NUMNODES-1], or -1 if no useful numa 194/* Returns nid in the range [0..MAX_NUMNODES-1], or -1 if no useful numa
195 * info is found. 195 * info is found.
196 */ 196 */
197static int of_node_to_nid(struct device_node *device) 197static int of_node_to_nid_single(struct device_node *device)
198{ 198{
199 int nid = -1; 199 int nid = -1;
200 unsigned int *tmp; 200 unsigned int *tmp;
@@ -216,6 +216,28 @@ out:
216 return nid; 216 return nid;
217} 217}
218 218
219/* Walk the device tree upwards, looking for an associativity id */
220int of_node_to_nid(struct device_node *device)
221{
222 struct device_node *tmp;
223 int nid = -1;
224
225 of_node_get(device);
226 while (device) {
227 nid = of_node_to_nid_single(device);
228 if (nid != -1)
229 break;
230
231 tmp = device;
232 device = of_get_parent(tmp);
233 of_node_put(tmp);
234 }
235 of_node_put(device);
236
237 return nid;
238}
239EXPORT_SYMBOL_GPL(of_node_to_nid);
240
219/* 241/*
220 * In theory, the "ibm,associativity" property may contain multiple 242 * In theory, the "ibm,associativity" property may contain multiple
221 * associativity lists because a resource may be multiply connected 243 * associativity lists because a resource may be multiply connected
@@ -300,7 +322,7 @@ static int __cpuinit numa_setup_cpu(unsigned long lcpu)
300 goto out; 322 goto out;
301 } 323 }
302 324
303 nid = of_node_to_nid(cpu); 325 nid = of_node_to_nid_single(cpu);
304 326
305 if (nid < 0 || !node_online(nid)) 327 if (nid < 0 || !node_online(nid))
306 nid = any_online_node(NODE_MASK_ALL); 328 nid = any_online_node(NODE_MASK_ALL);
@@ -393,7 +415,7 @@ static int __init parse_numa_properties(void)
393 415
394 cpu = find_cpu_node(i); 416 cpu = find_cpu_node(i);
395 BUG_ON(!cpu); 417 BUG_ON(!cpu);
396 nid = of_node_to_nid(cpu); 418 nid = of_node_to_nid_single(cpu);
397 of_node_put(cpu); 419 of_node_put(cpu);
398 420
399 /* 421 /*
@@ -437,7 +459,7 @@ new_range:
437 * have associativity properties. If none, then 459 * have associativity properties. If none, then
438 * everything goes to default_nid. 460 * everything goes to default_nid.
439 */ 461 */
440 nid = of_node_to_nid(memory); 462 nid = of_node_to_nid_single(memory);
441 if (nid < 0) 463 if (nid < 0)
442 nid = default_nid; 464 nid = default_nid;
443 node_set_online(nid); 465 node_set_online(nid);
@@ -776,7 +798,7 @@ int hot_add_scn_to_nid(unsigned long scn_addr)
776ha_new_range: 798ha_new_range:
777 start = read_n_cells(n_mem_addr_cells, &memcell_buf); 799 start = read_n_cells(n_mem_addr_cells, &memcell_buf);
778 size = read_n_cells(n_mem_size_cells, &memcell_buf); 800 size = read_n_cells(n_mem_size_cells, &memcell_buf);
779 nid = of_node_to_nid(memory); 801 nid = of_node_to_nid_single(memory);
780 802
781 /* Domains not present at boot default to 0 */ 803 /* Domains not present at boot default to 0 */
782 if (nid < 0 || !node_online(nid)) 804 if (nid < 0 || !node_online(nid))
diff --git a/arch/powerpc/platforms/cell/Kconfig b/arch/powerpc/platforms/cell/Kconfig
index c2a3db8edb0c..6a02d51086c8 100644
--- a/arch/powerpc/platforms/cell/Kconfig
+++ b/arch/powerpc/platforms/cell/Kconfig
@@ -12,7 +12,8 @@ config SPU_FS
12 12
13config SPUFS_MMAP 13config SPUFS_MMAP
14 bool 14 bool
15 depends on SPU_FS && SPARSEMEM && !PPC_64K_PAGES 15 depends on SPU_FS && SPARSEMEM
16 select MEMORY_HOTPLUG
16 default y 17 default y
17 18
18endmenu 19endmenu
diff --git a/arch/powerpc/platforms/cell/setup.c b/arch/powerpc/platforms/cell/setup.c
index dac5d0365fde..6574b22b3cf3 100644
--- a/arch/powerpc/platforms/cell/setup.c
+++ b/arch/powerpc/platforms/cell/setup.c
@@ -29,6 +29,8 @@
29#include <linux/seq_file.h> 29#include <linux/seq_file.h>
30#include <linux/root_dev.h> 30#include <linux/root_dev.h>
31#include <linux/console.h> 31#include <linux/console.h>
32#include <linux/mutex.h>
33#include <linux/memory_hotplug.h>
32 34
33#include <asm/mmu.h> 35#include <asm/mmu.h>
34#include <asm/processor.h> 36#include <asm/processor.h>
@@ -46,6 +48,7 @@
46#include <asm/cputable.h> 48#include <asm/cputable.h>
47#include <asm/ppc-pci.h> 49#include <asm/ppc-pci.h>
48#include <asm/irq.h> 50#include <asm/irq.h>
51#include <asm/spu.h>
49 52
50#include "interrupt.h" 53#include "interrupt.h"
51#include "iommu.h" 54#include "iommu.h"
@@ -69,77 +72,6 @@ static void cell_show_cpuinfo(struct seq_file *m)
69 of_node_put(root); 72 of_node_put(root);
70} 73}
71 74
72#ifdef CONFIG_SPARSEMEM
73static int __init find_spu_node_id(struct device_node *spe)
74{
75 unsigned int *id;
76#ifdef CONFIG_NUMA
77 struct device_node *cpu;
78 cpu = spe->parent->parent;
79 id = (unsigned int *)get_property(cpu, "node-id", NULL);
80#else
81 id = NULL;
82#endif
83 return id ? *id : 0;
84}
85
86static void __init cell_spuprop_present(struct device_node *spe,
87 const char *prop, int early)
88{
89 struct address_prop {
90 unsigned long address;
91 unsigned int len;
92 } __attribute__((packed)) *p;
93 int proplen;
94
95 unsigned long start_pfn, end_pfn, pfn;
96 int node_id;
97
98 p = (void*)get_property(spe, prop, &proplen);
99 WARN_ON(proplen != sizeof (*p));
100
101 node_id = find_spu_node_id(spe);
102
103 start_pfn = p->address >> PAGE_SHIFT;
104 end_pfn = (p->address + p->len + PAGE_SIZE - 1) >> PAGE_SHIFT;
105
106 /* We need to call memory_present *before* the call to sparse_init,
107 but we can initialize the page structs only *after* that call.
108 Thus, we're being called twice. */
109 if (early)
110 memory_present(node_id, start_pfn, end_pfn);
111 else {
112 /* As the pages backing SPU LS and I/O are outside the range
113 of regular memory, their page structs were not initialized
114 by free_area_init. Do it here instead. */
115 for (pfn = start_pfn; pfn < end_pfn; pfn++) {
116 struct page *page = pfn_to_page(pfn);
117 set_page_links(page, ZONE_DMA, node_id, pfn);
118 init_page_count(page);
119 reset_page_mapcount(page);
120 SetPageReserved(page);
121 INIT_LIST_HEAD(&page->lru);
122 }
123 }
124}
125
126static void __init cell_spumem_init(int early)
127{
128 struct device_node *node;
129 for (node = of_find_node_by_type(NULL, "spe");
130 node; node = of_find_node_by_type(node, "spe")) {
131 cell_spuprop_present(node, "local-store", early);
132 cell_spuprop_present(node, "problem", early);
133 cell_spuprop_present(node, "priv1", early);
134 cell_spuprop_present(node, "priv2", early);
135 }
136}
137#else
138static void __init cell_spumem_init(int early)
139{
140}
141#endif
142
143static void cell_progress(char *s, unsigned short hex) 75static void cell_progress(char *s, unsigned short hex)
144{ 76{
145 printk("*** %04x : %s\n", hex, s ? s : ""); 77 printk("*** %04x : %s\n", hex, s ? s : "");
@@ -172,8 +104,6 @@ static void __init cell_setup_arch(void)
172#endif 104#endif
173 105
174 mmio_nvram_init(); 106 mmio_nvram_init();
175
176 cell_spumem_init(0);
177} 107}
178 108
179/* 109/*
@@ -189,8 +119,6 @@ static void __init cell_init_early(void)
189 119
190 ppc64_interrupt_controller = IC_CELL_PIC; 120 ppc64_interrupt_controller = IC_CELL_PIC;
191 121
192 cell_spumem_init(1);
193
194 DBG(" <- cell_init_early()\n"); 122 DBG(" <- cell_init_early()\n");
195} 123}
196 124
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c
index 269dda4fd0b4..ad141fe8d52d 100644
--- a/arch/powerpc/platforms/cell/spu_base.c
+++ b/arch/powerpc/platforms/cell/spu_base.c
@@ -306,19 +306,19 @@ spu_request_irqs(struct spu *spu)
306 306
307 snprintf(spu->irq_c0, sizeof (spu->irq_c0), "spe%02d.0", spu->number); 307 snprintf(spu->irq_c0, sizeof (spu->irq_c0), "spe%02d.0", spu->number);
308 ret = request_irq(irq_base + spu->isrc, 308 ret = request_irq(irq_base + spu->isrc,
309 spu_irq_class_0, 0, spu->irq_c0, spu); 309 spu_irq_class_0, SA_INTERRUPT, spu->irq_c0, spu);
310 if (ret) 310 if (ret)
311 goto out; 311 goto out;
312 312
313 snprintf(spu->irq_c1, sizeof (spu->irq_c1), "spe%02d.1", spu->number); 313 snprintf(spu->irq_c1, sizeof (spu->irq_c1), "spe%02d.1", spu->number);
314 ret = request_irq(irq_base + IIC_CLASS_STRIDE + spu->isrc, 314 ret = request_irq(irq_base + IIC_CLASS_STRIDE + spu->isrc,
315 spu_irq_class_1, 0, spu->irq_c1, spu); 315 spu_irq_class_1, SA_INTERRUPT, spu->irq_c1, spu);
316 if (ret) 316 if (ret)
317 goto out1; 317 goto out1;
318 318
319 snprintf(spu->irq_c2, sizeof (spu->irq_c2), "spe%02d.2", spu->number); 319 snprintf(spu->irq_c2, sizeof (spu->irq_c2), "spe%02d.2", spu->number);
320 ret = request_irq(irq_base + 2*IIC_CLASS_STRIDE + spu->isrc, 320 ret = request_irq(irq_base + 2*IIC_CLASS_STRIDE + spu->isrc,
321 spu_irq_class_2, 0, spu->irq_c2, spu); 321 spu_irq_class_2, SA_INTERRUPT, spu->irq_c2, spu);
322 if (ret) 322 if (ret)
323 goto out2; 323 goto out2;
324 goto out; 324 goto out;
@@ -487,10 +487,14 @@ int spu_irq_class_1_bottom(struct spu *spu)
487 ea = spu->dar; 487 ea = spu->dar;
488 dsisr = spu->dsisr; 488 dsisr = spu->dsisr;
489 if (dsisr & (MFC_DSISR_PTE_NOT_FOUND | MFC_DSISR_ACCESS_DENIED)) { 489 if (dsisr & (MFC_DSISR_PTE_NOT_FOUND | MFC_DSISR_ACCESS_DENIED)) {
490 u64 flags;
491
490 access = (_PAGE_PRESENT | _PAGE_USER); 492 access = (_PAGE_PRESENT | _PAGE_USER);
491 access |= (dsisr & MFC_DSISR_ACCESS_PUT) ? _PAGE_RW : 0UL; 493 access |= (dsisr & MFC_DSISR_ACCESS_PUT) ? _PAGE_RW : 0UL;
494 local_irq_save(flags);
492 if (hash_page(ea, access, 0x300) != 0) 495 if (hash_page(ea, access, 0x300) != 0)
493 error |= CLASS1_ENABLE_STORAGE_FAULT_INTR; 496 error |= CLASS1_ENABLE_STORAGE_FAULT_INTR;
497 local_irq_restore(flags);
494 } 498 }
495 if (error & CLASS1_ENABLE_STORAGE_FAULT_INTR) { 499 if (error & CLASS1_ENABLE_STORAGE_FAULT_INTR) {
496 if ((ret = spu_handle_mm_fault(spu)) != 0) 500 if ((ret = spu_handle_mm_fault(spu)) != 0)
@@ -516,8 +520,50 @@ void spu_irq_setaffinity(struct spu *spu, int cpu)
516} 520}
517EXPORT_SYMBOL_GPL(spu_irq_setaffinity); 521EXPORT_SYMBOL_GPL(spu_irq_setaffinity);
518 522
519static void __iomem * __init map_spe_prop(struct device_node *n, 523static int __init find_spu_node_id(struct device_node *spe)
520 const char *name) 524{
525 unsigned int *id;
526 struct device_node *cpu;
527 cpu = spe->parent->parent;
528 id = (unsigned int *)get_property(cpu, "node-id", NULL);
529 return id ? *id : 0;
530}
531
532static int __init cell_spuprop_present(struct spu *spu, struct device_node *spe,
533 const char *prop)
534{
535 static DEFINE_MUTEX(add_spumem_mutex);
536
537 struct address_prop {
538 unsigned long address;
539 unsigned int len;
540 } __attribute__((packed)) *p;
541 int proplen;
542
543 unsigned long start_pfn, nr_pages;
544 struct pglist_data *pgdata;
545 struct zone *zone;
546 int ret;
547
548 p = (void*)get_property(spe, prop, &proplen);
549 WARN_ON(proplen != sizeof (*p));
550
551 start_pfn = p->address >> PAGE_SHIFT;
552 nr_pages = ((unsigned long)p->len + PAGE_SIZE - 1) >> PAGE_SHIFT;
553
554 pgdata = NODE_DATA(spu->nid);
555 zone = pgdata->node_zones;
556
557 /* XXX rethink locking here */
558 mutex_lock(&add_spumem_mutex);
559 ret = __add_pages(zone, start_pfn, nr_pages);
560 mutex_unlock(&add_spumem_mutex);
561
562 return ret;
563}
564
565static void __iomem * __init map_spe_prop(struct spu *spu,
566 struct device_node *n, const char *name)
521{ 567{
522 struct address_prop { 568 struct address_prop {
523 unsigned long address; 569 unsigned long address;
@@ -526,6 +572,8 @@ static void __iomem * __init map_spe_prop(struct device_node *n,
526 572
527 void *p; 573 void *p;
528 int proplen; 574 int proplen;
575 void* ret = NULL;
576 int err = 0;
529 577
530 p = get_property(n, name, &proplen); 578 p = get_property(n, name, &proplen);
531 if (proplen != sizeof (struct address_prop)) 579 if (proplen != sizeof (struct address_prop))
@@ -533,7 +581,14 @@ static void __iomem * __init map_spe_prop(struct device_node *n,
533 581
534 prop = p; 582 prop = p;
535 583
536 return ioremap(prop->address, prop->len); 584 err = cell_spuprop_present(spu, n, name);
585 if (err && (err != -EEXIST))
586 goto out;
587
588 ret = ioremap(prop->address, prop->len);
589
590 out:
591 return ret;
537} 592}
538 593
539static void spu_unmap(struct spu *spu) 594static void spu_unmap(struct spu *spu)
@@ -544,44 +599,45 @@ static void spu_unmap(struct spu *spu)
544 iounmap((u8 __iomem *)spu->local_store); 599 iounmap((u8 __iomem *)spu->local_store);
545} 600}
546 601
547static int __init spu_map_device(struct spu *spu, struct device_node *spe) 602static int __init spu_map_device(struct spu *spu, struct device_node *node)
548{ 603{
549 char *prop; 604 char *prop;
550 int ret; 605 int ret;
551 606
552 ret = -ENODEV; 607 ret = -ENODEV;
553 prop = get_property(spe, "isrc", NULL); 608 prop = get_property(node, "isrc", NULL);
554 if (!prop) 609 if (!prop)
555 goto out; 610 goto out;
556 spu->isrc = *(unsigned int *)prop; 611 spu->isrc = *(unsigned int *)prop;
557 612
558 spu->name = get_property(spe, "name", NULL); 613 spu->name = get_property(node, "name", NULL);
559 if (!spu->name) 614 if (!spu->name)
560 goto out; 615 goto out;
561 616
562 prop = get_property(spe, "local-store", NULL); 617 prop = get_property(node, "local-store", NULL);
563 if (!prop) 618 if (!prop)
564 goto out; 619 goto out;
565 spu->local_store_phys = *(unsigned long *)prop; 620 spu->local_store_phys = *(unsigned long *)prop;
566 621
567 /* we use local store as ram, not io memory */ 622 /* we use local store as ram, not io memory */
568 spu->local_store = (void __force *)map_spe_prop(spe, "local-store"); 623 spu->local_store = (void __force *)
624 map_spe_prop(spu, node, "local-store");
569 if (!spu->local_store) 625 if (!spu->local_store)
570 goto out; 626 goto out;
571 627
572 prop = get_property(spe, "problem", NULL); 628 prop = get_property(node, "problem", NULL);
573 if (!prop) 629 if (!prop)
574 goto out_unmap; 630 goto out_unmap;
575 spu->problem_phys = *(unsigned long *)prop; 631 spu->problem_phys = *(unsigned long *)prop;
576 632
577 spu->problem= map_spe_prop(spe, "problem"); 633 spu->problem= map_spe_prop(spu, node, "problem");
578 if (!spu->problem) 634 if (!spu->problem)
579 goto out_unmap; 635 goto out_unmap;
580 636
581 spu->priv1= map_spe_prop(spe, "priv1"); 637 spu->priv1= map_spe_prop(spu, node, "priv1");
582 /* priv1 is not available on a hypervisor */ 638 /* priv1 is not available on a hypervisor */
583 639
584 spu->priv2= map_spe_prop(spe, "priv2"); 640 spu->priv2= map_spe_prop(spu, node, "priv2");
585 if (!spu->priv2) 641 if (!spu->priv2)
586 goto out_unmap; 642 goto out_unmap;
587 ret = 0; 643 ret = 0;
@@ -593,17 +649,6 @@ out:
593 return ret; 649 return ret;
594} 650}
595 651
596static int __init find_spu_node_id(struct device_node *spe)
597{
598 unsigned int *id;
599 struct device_node *cpu;
600
601 cpu = spe->parent->parent;
602 id = (unsigned int *)get_property(cpu, "node-id", NULL);
603
604 return id ? *id : 0;
605}
606
607static int __init create_spu(struct device_node *spe) 652static int __init create_spu(struct device_node *spe)
608{ 653{
609 struct spu *spu; 654 struct spu *spu;
@@ -620,6 +665,10 @@ static int __init create_spu(struct device_node *spe)
620 goto out_free; 665 goto out_free;
621 666
622 spu->node = find_spu_node_id(spe); 667 spu->node = find_spu_node_id(spe);
668 spu->nid = of_node_to_nid(spe);
669 if (spu->nid == -1)
670 spu->nid = 0;
671
623 spu->stop_code = 0; 672 spu->stop_code = 0;
624 spu->slb_replace = 0; 673 spu->slb_replace = 0;
625 spu->mm = NULL; 674 spu->mm = NULL;
diff --git a/arch/powerpc/platforms/cell/spu_callbacks.c b/arch/powerpc/platforms/cell/spu_callbacks.c
index 6594bec73882..95b36430aa0f 100644
--- a/arch/powerpc/platforms/cell/spu_callbacks.c
+++ b/arch/powerpc/platforms/cell/spu_callbacks.c
@@ -317,17 +317,30 @@ void *spu_syscall_table[] = {
317 [__NR_ppoll] sys_ni_syscall, /* sys_ppoll */ 317 [__NR_ppoll] sys_ni_syscall, /* sys_ppoll */
318 [__NR_unshare] sys_unshare, 318 [__NR_unshare] sys_unshare,
319 [__NR_splice] sys_splice, 319 [__NR_splice] sys_splice,
320 [__NR_tee] sys_tee,
321 [__NR_vmsplice] sys_vmsplice,
322 [__NR_openat] sys_openat,
323 [__NR_mkdirat] sys_mkdirat,
324 [__NR_mknodat] sys_mknodat,
325 [__NR_fchownat] sys_fchownat,
326 [__NR_futimesat] sys_futimesat,
327 [__NR_newfstatat] sys_newfstatat,
328 [__NR_unlinkat] sys_unlinkat,
329 [__NR_renameat] sys_renameat,
330 [__NR_linkat] sys_linkat,
331 [__NR_symlinkat] sys_symlinkat,
332 [__NR_readlinkat] sys_readlinkat,
333 [__NR_fchmodat] sys_fchmodat,
334 [__NR_faccessat] sys_faccessat,
320}; 335};
321 336
322long spu_sys_callback(struct spu_syscall_block *s) 337long spu_sys_callback(struct spu_syscall_block *s)
323{ 338{
324 long (*syscall)(u64 a1, u64 a2, u64 a3, u64 a4, u64 a5, u64 a6); 339 long (*syscall)(u64 a1, u64 a2, u64 a3, u64 a4, u64 a5, u64 a6);
325 340
326 BUILD_BUG_ON(ARRAY_SIZE(spu_syscall_table) != __NR_syscalls);
327
328 syscall = spu_syscall_table[s->nr_ret]; 341 syscall = spu_syscall_table[s->nr_ret];
329 342
330 if (s->nr_ret >= __NR_syscalls) { 343 if (s->nr_ret >= ARRAY_SIZE(spu_syscall_table)) {
331 pr_debug("%s: invalid syscall #%ld", __FUNCTION__, s->nr_ret); 344 pr_debug("%s: invalid syscall #%ld", __FUNCTION__, s->nr_ret);
332 return -ENOSYS; 345 return -ENOSYS;
333 } 346 }
diff --git a/arch/powerpc/platforms/powermac/low_i2c.c b/arch/powerpc/platforms/powermac/low_i2c.c
index e14f9ac55cf4..df2343e1956b 100644
--- a/arch/powerpc/platforms/powermac/low_i2c.c
+++ b/arch/powerpc/platforms/powermac/low_i2c.c
@@ -231,6 +231,14 @@ static u8 kw_i2c_wait_interrupt(struct pmac_i2c_host_kw *host)
231 return isr; 231 return isr;
232} 232}
233 233
234static void kw_i2c_do_stop(struct pmac_i2c_host_kw *host, int result)
235{
236 kw_write_reg(reg_control, KW_I2C_CTL_STOP);
237 host->state = state_stop;
238 host->result = result;
239}
240
241
234static void kw_i2c_handle_interrupt(struct pmac_i2c_host_kw *host, u8 isr) 242static void kw_i2c_handle_interrupt(struct pmac_i2c_host_kw *host, u8 isr)
235{ 243{
236 u8 ack; 244 u8 ack;
@@ -246,42 +254,36 @@ static void kw_i2c_handle_interrupt(struct pmac_i2c_host_kw *host, u8 isr)
246 } 254 }
247 255
248 if (isr == 0) { 256 if (isr == 0) {
257 printk(KERN_WARNING "low_i2c: Timeout in i2c transfer"
258 " on keywest !\n");
249 if (host->state != state_stop) { 259 if (host->state != state_stop) {
250 DBG_LOW("KW: Timeout !\n"); 260 kw_i2c_do_stop(host, -EIO);
251 host->result = -EIO; 261 return;
252 goto stop;
253 }
254 if (host->state == state_stop) {
255 ack = kw_read_reg(reg_status);
256 if (ack & KW_I2C_STAT_BUSY)
257 kw_write_reg(reg_status, 0);
258 host->state = state_idle;
259 kw_write_reg(reg_ier, 0x00);
260 if (!host->polled)
261 complete(&host->complete);
262 } 262 }
263 ack = kw_read_reg(reg_status);
264 if (ack & KW_I2C_STAT_BUSY)
265 kw_write_reg(reg_status, 0);
266 host->state = state_idle;
267 kw_write_reg(reg_ier, 0x00);
268 if (!host->polled)
269 complete(&host->complete);
263 return; 270 return;
264 } 271 }
265 272
266 if (isr & KW_I2C_IRQ_ADDR) { 273 if (isr & KW_I2C_IRQ_ADDR) {
267 ack = kw_read_reg(reg_status); 274 ack = kw_read_reg(reg_status);
268 if (host->state != state_addr) { 275 if (host->state != state_addr) {
269 kw_write_reg(reg_isr, KW_I2C_IRQ_ADDR);
270 WRONG_STATE("KW_I2C_IRQ_ADDR"); 276 WRONG_STATE("KW_I2C_IRQ_ADDR");
271 host->result = -EIO; 277 kw_i2c_do_stop(host, -EIO);
272 goto stop;
273 } 278 }
274 if ((ack & KW_I2C_STAT_LAST_AAK) == 0) { 279 if ((ack & KW_I2C_STAT_LAST_AAK) == 0) {
275 host->result = -ENODEV; 280 host->result = -ENXIO;
276 DBG_LOW("KW: NAK on address\n");
277 host->state = state_stop; 281 host->state = state_stop;
278 return; 282 DBG_LOW("KW: NAK on address\n");
279 } else { 283 } else {
280 if (host->len == 0) { 284 if (host->len == 0)
281 kw_write_reg(reg_isr, KW_I2C_IRQ_ADDR); 285 kw_i2c_do_stop(host, 0);
282 goto stop; 286 else if (host->rw) {
283 }
284 if (host->rw) {
285 host->state = state_read; 287 host->state = state_read;
286 if (host->len > 1) 288 if (host->len > 1)
287 kw_write_reg(reg_control, 289 kw_write_reg(reg_control,
@@ -308,25 +310,19 @@ static void kw_i2c_handle_interrupt(struct pmac_i2c_host_kw *host, u8 isr)
308 ack = kw_read_reg(reg_status); 310 ack = kw_read_reg(reg_status);
309 if ((ack & KW_I2C_STAT_LAST_AAK) == 0) { 311 if ((ack & KW_I2C_STAT_LAST_AAK) == 0) {
310 DBG_LOW("KW: nack on data write\n"); 312 DBG_LOW("KW: nack on data write\n");
311 host->result = -EIO; 313 host->result = -EFBIG;
312 goto stop; 314 host->state = state_stop;
313 } else if (host->len) { 315 } else if (host->len) {
314 kw_write_reg(reg_data, *(host->data++)); 316 kw_write_reg(reg_data, *(host->data++));
315 host->len--; 317 host->len--;
316 } else { 318 } else
317 kw_write_reg(reg_control, KW_I2C_CTL_STOP); 319 kw_i2c_do_stop(host, 0);
318 host->state = state_stop;
319 host->result = 0;
320 }
321 kw_write_reg(reg_isr, KW_I2C_IRQ_DATA);
322 } else { 320 } else {
323 kw_write_reg(reg_isr, KW_I2C_IRQ_DATA);
324 WRONG_STATE("KW_I2C_IRQ_DATA"); 321 WRONG_STATE("KW_I2C_IRQ_DATA");
325 if (host->state != state_stop) { 322 if (host->state != state_stop)
326 host->result = -EIO; 323 kw_i2c_do_stop(host, -EIO);
327 goto stop;
328 }
329 } 324 }
325 kw_write_reg(reg_isr, KW_I2C_IRQ_DATA);
330 } 326 }
331 327
332 if (isr & KW_I2C_IRQ_STOP) { 328 if (isr & KW_I2C_IRQ_STOP) {
@@ -340,14 +336,10 @@ static void kw_i2c_handle_interrupt(struct pmac_i2c_host_kw *host, u8 isr)
340 complete(&host->complete); 336 complete(&host->complete);
341 } 337 }
342 338
339 /* Below should only happen in manual mode which we don't use ... */
343 if (isr & KW_I2C_IRQ_START) 340 if (isr & KW_I2C_IRQ_START)
344 kw_write_reg(reg_isr, KW_I2C_IRQ_START); 341 kw_write_reg(reg_isr, KW_I2C_IRQ_START);
345 342
346 return;
347 stop:
348 kw_write_reg(reg_control, KW_I2C_CTL_STOP);
349 host->state = state_stop;
350 return;
351} 343}
352 344
353/* Interrupt handler */ 345/* Interrupt handler */
@@ -544,11 +536,11 @@ static struct pmac_i2c_host_kw *__init kw_i2c_host_init(struct device_node *np)
544 return NULL; 536 return NULL;
545 } 537 }
546 538
547 /* Make sure IRA is disabled */ 539 /* Make sure IRQ is disabled */
548 kw_write_reg(reg_ier, 0); 540 kw_write_reg(reg_ier, 0);
549 541
550 /* Request chip interrupt */ 542 /* Request chip interrupt */
551 if (request_irq(host->irq, kw_i2c_irq, SA_SHIRQ, "keywest i2c", host)) 543 if (request_irq(host->irq, kw_i2c_irq, 0, "keywest i2c", host))
552 host->irq = NO_IRQ; 544 host->irq = NO_IRQ;
553 545
554 printk(KERN_INFO "KeyWest i2c @0x%08x irq %d %s\n", 546 printk(KERN_INFO "KeyWest i2c @0x%08x irq %d %s\n",
diff --git a/arch/powerpc/platforms/powermac/pci.c b/arch/powerpc/platforms/powermac/pci.c
index f5d8d15d74fa..ea179afea632 100644
--- a/arch/powerpc/platforms/powermac/pci.c
+++ b/arch/powerpc/platforms/powermac/pci.c
@@ -1097,7 +1097,7 @@ pmac_pci_enable_device_hook(struct pci_dev *dev, int initial)
1097 * (iBook second controller) 1097 * (iBook second controller)
1098 */ 1098 */
1099 if (dev->vendor == PCI_VENDOR_ID_APPLE 1099 if (dev->vendor == PCI_VENDOR_ID_APPLE
1100 && (dev->class == ((PCI_CLASS_SERIAL_USB << 8) | 0x10)) 1100 && dev->class == PCI_CLASS_SERIAL_USB_OHCI
1101 && !node) { 1101 && !node) {
1102 printk(KERN_INFO "Apple USB OHCI %s disabled by firmware\n", 1102 printk(KERN_INFO "Apple USB OHCI %s disabled by firmware\n",
1103 pci_name(dev)); 1103 pci_name(dev));
diff --git a/arch/powerpc/platforms/pseries/eeh_event.c b/arch/powerpc/platforms/pseries/eeh_event.c
index a1bda6f96fd1..40020c65c89e 100644
--- a/arch/powerpc/platforms/pseries/eeh_event.c
+++ b/arch/powerpc/platforms/pseries/eeh_event.c
@@ -118,7 +118,15 @@ int eeh_send_failure_event (struct device_node *dn,
118{ 118{
119 unsigned long flags; 119 unsigned long flags;
120 struct eeh_event *event; 120 struct eeh_event *event;
121 char *location;
121 122
123 if (!mem_init_done) {
124 printk(KERN_ERR "EEH: event during early boot not handled\n");
125 location = (char *) get_property(dn, "ibm,loc-code", NULL);
126 printk(KERN_ERR "EEH: device node = %s\n", dn->full_name);
127 printk(KERN_ERR "EEH: PCI location = %s\n", location);
128 return 1;
129 }
122 event = kmalloc(sizeof(*event), GFP_ATOMIC); 130 event = kmalloc(sizeof(*event), GFP_ATOMIC);
123 if (event == NULL) { 131 if (event == NULL) {
124 printk (KERN_ERR "EEH: out of memory, event not handled\n"); 132 printk (KERN_ERR "EEH: out of memory, event not handled\n");
diff --git a/arch/powerpc/sysdev/dart_iommu.c b/arch/powerpc/sysdev/dart_iommu.c
index 61d317428610..38087bd6e3cf 100644
--- a/arch/powerpc/sysdev/dart_iommu.c
+++ b/arch/powerpc/sysdev/dart_iommu.c
@@ -49,6 +49,7 @@
49 49
50#include "dart.h" 50#include "dart.h"
51 51
52extern int iommu_is_off;
52extern int iommu_force_on; 53extern int iommu_force_on;
53 54
54/* Physical base address and size of the DART table */ 55/* Physical base address and size of the DART table */
@@ -329,10 +330,17 @@ void iommu_init_early_dart(void)
329 330
330void __init alloc_dart_table(void) 331void __init alloc_dart_table(void)
331{ 332{
332 /* Only reserve DART space if machine has more than 2GB of RAM 333 /* Only reserve DART space if machine has more than 1GB of RAM
333 * or if requested with iommu=on on cmdline. 334 * or if requested with iommu=on on cmdline.
335 *
336 * 1GB of RAM is picked as limit because some default devices
337 * (i.e. Airport Extreme) have 30 bit address range limits.
334 */ 338 */
335 if (lmb_end_of_DRAM() <= 0x80000000ull && !iommu_force_on) 339
340 if (iommu_is_off)
341 return;
342
343 if (!iommu_force_on && lmb_end_of_DRAM() <= 0x40000000ull)
336 return; 344 return;
337 345
338 /* 512 pages (2MB) is max DART tablesize. */ 346 /* 512 pages (2MB) is max DART tablesize. */