aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2005-11-12 22:53:33 -0500
committerSteve French <sfrench@us.ibm.com>2005-11-12 22:53:33 -0500
commit1b98a8221e3c9c86ae7e292ba7542d2dd6f10eb9 (patch)
tree2e0051ccb147b0553d50c14681c50881098859d6 /arch
parente89dc9209692293434da45ec31826a55becb91c0 (diff)
parent9e6c67fd2716720d9029d38ea25884efcfdedeb6 (diff)
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/common/locomo.c38
-rw-r--r--arch/arm/common/sa1111.c42
-rw-r--r--arch/arm/common/scoop.c30
-rw-r--r--arch/arm/configs/enp2611_defconfig95
-rw-r--r--arch/arm/configs/ixdp2400_defconfig95
-rw-r--r--arch/arm/configs/ixdp2401_defconfig95
-rw-r--r--arch/arm/configs/ixdp2800_defconfig95
-rw-r--r--arch/arm/configs/ixdp2801_defconfig95
-rw-r--r--arch/arm/lib/csumpartial.S28
-rw-r--r--arch/arm/lib/csumpartialcopygeneric.S70
-rw-r--r--arch/arm/lib/delay.S4
-rw-r--r--arch/arm/lib/findbit.S18
-rw-r--r--arch/arm/lib/io-acorn.S4
-rw-r--r--arch/arm/lib/io-readsb.S24
-rw-r--r--arch/arm/lib/io-readsw-armv3.S30
-rw-r--r--arch/arm/lib/io-readsw-armv4.S24
-rw-r--r--arch/arm/lib/io-writesb.S25
-rw-r--r--arch/arm/lib/io-writesw-armv3.S30
-rw-r--r--arch/arm/lib/io-writesw-armv4.S25
-rw-r--r--arch/arm/lib/uaccess.S230
-rw-r--r--arch/arm/mach-pxa/corgi_ssp.c17
-rw-r--r--arch/arm/mach-sa1100/neponset.c31
-rw-r--r--arch/arm/tools/mach-types43
-rw-r--r--arch/ia64/Kconfig13
-rw-r--r--arch/ia64/configs/sn2_defconfig2
-rw-r--r--arch/ia64/defconfig2
-rw-r--r--arch/ia64/kernel/ivt.S63
-rw-r--r--arch/ia64/sn/kernel/setup.c157
-rw-r--r--arch/powerpc/Kconfig11
-rw-r--r--arch/powerpc/kernel/Makefile10
-rw-r--r--arch/powerpc/kernel/asm-offsets.c45
-rw-r--r--arch/powerpc/kernel/head_32.S1
-rw-r--r--arch/powerpc/kernel/ioctl32.c4
-rw-r--r--arch/powerpc/kernel/lparcfg.c23
-rw-r--r--arch/powerpc/kernel/paca.c7
-rw-r--r--arch/powerpc/kernel/proc_ppc64.c4
-rw-r--r--arch/powerpc/kernel/rtas-proc.c1
-rw-r--r--arch/powerpc/kernel/setup-common.c8
-rw-r--r--arch/powerpc/kernel/setup_64.c62
-rw-r--r--arch/powerpc/kernel/signal_32.c12
-rw-r--r--arch/powerpc/kernel/smp.c4
-rw-r--r--arch/powerpc/kernel/sysfs.c1
-rw-r--r--arch/powerpc/kernel/time.c40
-rw-r--r--arch/powerpc/kernel/traps.c1
-rw-r--r--arch/powerpc/kernel/udbg.c (renamed from arch/ppc64/kernel/udbg.c)0
-rw-r--r--arch/powerpc/kernel/udbg_16550.c (renamed from arch/ppc64/kernel/udbg_16550.c)0
-rw-r--r--arch/powerpc/kernel/udbg_scc.c (renamed from arch/ppc64/kernel/udbg_scc.c)0
-rw-r--r--arch/powerpc/kernel/vdso.c746
-rw-r--r--arch/powerpc/kernel/vdso32/Makefile (renamed from arch/ppc64/kernel/vdso32/Makefile)6
-rw-r--r--arch/powerpc/kernel/vdso32/cacheflush.S (renamed from arch/ppc64/kernel/vdso32/cacheflush.S)0
-rw-r--r--arch/powerpc/kernel/vdso32/datapage.S (renamed from arch/ppc64/kernel/vdso32/datapage.S)16
-rw-r--r--arch/powerpc/kernel/vdso32/gettimeofday.S315
-rw-r--r--arch/powerpc/kernel/vdso32/note.S (renamed from arch/ppc64/kernel/vdso32/note.S)0
-rw-r--r--arch/powerpc/kernel/vdso32/sigtramp.S (renamed from arch/ppc64/kernel/vdso32/sigtramp.S)0
-rw-r--r--arch/powerpc/kernel/vdso32/vdso32.lds.S (renamed from arch/ppc64/kernel/vdso32/vdso32.lds.S)5
-rw-r--r--arch/powerpc/kernel/vdso32/vdso32_wrapper.S (renamed from arch/ppc64/kernel/vdso32/vdso32_wrapper.S)2
-rw-r--r--arch/powerpc/kernel/vdso64/Makefile (renamed from arch/ppc64/kernel/vdso64/Makefile)0
-rw-r--r--arch/powerpc/kernel/vdso64/cacheflush.S (renamed from arch/ppc64/kernel/vdso64/cacheflush.S)0
-rw-r--r--arch/powerpc/kernel/vdso64/datapage.S (renamed from arch/ppc64/kernel/vdso64/datapage.S)16
-rw-r--r--arch/powerpc/kernel/vdso64/gettimeofday.S242
-rw-r--r--arch/powerpc/kernel/vdso64/note.S (renamed from arch/ppc64/kernel/vdso64/note.S)0
-rw-r--r--arch/powerpc/kernel/vdso64/sigtramp.S (renamed from arch/ppc64/kernel/vdso64/sigtramp.S)0
-rw-r--r--arch/powerpc/kernel/vdso64/vdso64.lds.S (renamed from arch/ppc64/kernel/vdso64/vdso64.lds.S)5
-rw-r--r--arch/powerpc/kernel/vdso64/vdso64_wrapper.S (renamed from arch/ppc64/kernel/vdso64/vdso64_wrapper.S)2
-rw-r--r--arch/powerpc/mm/mem.c4
-rw-r--r--arch/powerpc/mm/numa.c369
-rw-r--r--arch/powerpc/oprofile/op_model_power4.c1
-rw-r--r--arch/powerpc/platforms/pseries/rtasd.c1
-rw-r--r--arch/powerpc/platforms/pseries/setup.c4
-rw-r--r--arch/powerpc/platforms/pseries/smp.c4
-rw-r--r--arch/powerpc/xmon/xmon.c25
-rw-r--r--arch/ppc/kernel/asm-offsets.c28
-rw-r--r--arch/ppc/syslib/cpm2_pic.c2
-rw-r--r--arch/ppc64/Kconfig11
-rw-r--r--arch/ppc64/kernel/Makefile10
-rw-r--r--arch/ppc64/kernel/misc.S3
-rw-r--r--arch/ppc64/kernel/vdso32/gettimeofday.S140
-rw-r--r--arch/ppc64/kernel/vdso64/gettimeofday.S91
-rw-r--r--arch/sparc64/kernel/ioctl32.c92
-rw-r--r--arch/sparc64/kernel/setup.c19
-rw-r--r--arch/sparc64/kernel/smp.c1
-rw-r--r--arch/um/drivers/net_kern.c9
-rw-r--r--arch/um/drivers/ubd_kern.c9
-rw-r--r--arch/xtensa/platform-iss/network.c9
84 files changed, 2642 insertions, 1204 deletions
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c
index ad55680726ed..557e52c1c869 100644
--- a/arch/arm/common/locomo.c
+++ b/arch/arm/common/locomo.c
@@ -550,9 +550,9 @@ struct locomo_save_data {
550 u16 LCM_SPIMD; 550 u16 LCM_SPIMD;
551}; 551};
552 552
553static int locomo_suspend(struct device *dev, pm_message_t state) 553static int locomo_suspend(struct platform_device *dev, pm_message_t state)
554{ 554{
555 struct locomo *lchip = dev_get_drvdata(dev); 555 struct locomo *lchip = platform_get_drvdata(dev);
556 struct locomo_save_data *save; 556 struct locomo_save_data *save;
557 unsigned long flags; 557 unsigned long flags;
558 558
@@ -560,7 +560,7 @@ static int locomo_suspend(struct device *dev, pm_message_t state)
560 if (!save) 560 if (!save)
561 return -ENOMEM; 561 return -ENOMEM;
562 562
563 dev->power.saved_state = (void *) save; 563 dev->dev.power.saved_state = (void *) save;
564 564
565 spin_lock_irqsave(&lchip->lock, flags); 565 spin_lock_irqsave(&lchip->lock, flags);
566 566
@@ -594,14 +594,14 @@ static int locomo_suspend(struct device *dev, pm_message_t state)
594 return 0; 594 return 0;
595} 595}
596 596
597static int locomo_resume(struct device *dev) 597static int locomo_resume(struct platform_device *dev)
598{ 598{
599 struct locomo *lchip = dev_get_drvdata(dev); 599 struct locomo *lchip = platform_get_drvdata(dev);
600 struct locomo_save_data *save; 600 struct locomo_save_data *save;
601 unsigned long r; 601 unsigned long r;
602 unsigned long flags; 602 unsigned long flags;
603 603
604 save = (struct locomo_save_data *) dev->power.saved_state; 604 save = (struct locomo_save_data *) dev->dev.power.saved_state;
605 if (!save) 605 if (!save)
606 return 0; 606 return 0;
607 607
@@ -760,27 +760,26 @@ static void __locomo_remove(struct locomo *lchip)
760 kfree(lchip); 760 kfree(lchip);
761} 761}
762 762
763static int locomo_probe(struct device *dev) 763static int locomo_probe(struct platform_device *dev)
764{ 764{
765 struct platform_device *pdev = to_platform_device(dev);
766 struct resource *mem; 765 struct resource *mem;
767 int irq; 766 int irq;
768 767
769 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); 768 mem = platform_get_resource(dev, IORESOURCE_MEM, 0);
770 if (!mem) 769 if (!mem)
771 return -EINVAL; 770 return -EINVAL;
772 irq = platform_get_irq(pdev, 0); 771 irq = platform_get_irq(dev, 0);
773 772
774 return __locomo_probe(dev, mem, irq); 773 return __locomo_probe(&dev->dev, mem, irq);
775} 774}
776 775
777static int locomo_remove(struct device *dev) 776static int locomo_remove(struct platform_device *dev)
778{ 777{
779 struct locomo *lchip = dev_get_drvdata(dev); 778 struct locomo *lchip = platform__get_drvdata(dev);
780 779
781 if (lchip) { 780 if (lchip) {
782 __locomo_remove(lchip); 781 __locomo_remove(lchip);
783 dev_set_drvdata(dev, NULL); 782 platform_set_drvdata(dev, NULL);
784 } 783 }
785 784
786 return 0; 785 return 0;
@@ -792,15 +791,16 @@ static int locomo_remove(struct device *dev)
792 * the per-machine level, and then have this driver pick 791 * the per-machine level, and then have this driver pick
793 * up the registered devices. 792 * up the registered devices.
794 */ 793 */
795static struct device_driver locomo_device_driver = { 794static struct platform_driver locomo_device_driver = {
796 .name = "locomo",
797 .bus = &platform_bus_type,
798 .probe = locomo_probe, 795 .probe = locomo_probe,
799 .remove = locomo_remove, 796 .remove = locomo_remove,
800#ifdef CONFIG_PM 797#ifdef CONFIG_PM
801 .suspend = locomo_suspend, 798 .suspend = locomo_suspend,
802 .resume = locomo_resume, 799 .resume = locomo_resume,
803#endif 800#endif
801 .driver = {
802 .name = "locomo",
803 },
804}; 804};
805 805
806/* 806/*
@@ -1126,13 +1126,13 @@ static int __init locomo_init(void)
1126{ 1126{
1127 int ret = bus_register(&locomo_bus_type); 1127 int ret = bus_register(&locomo_bus_type);
1128 if (ret == 0) 1128 if (ret == 0)
1129 driver_register(&locomo_device_driver); 1129 platform_driver_register(&locomo_device_driver);
1130 return ret; 1130 return ret;
1131} 1131}
1132 1132
1133static void __exit locomo_exit(void) 1133static void __exit locomo_exit(void)
1134{ 1134{
1135 driver_unregister(&locomo_device_driver); 1135 platform_driver_unregister(&locomo_device_driver);
1136 bus_unregister(&locomo_bus_type); 1136 bus_unregister(&locomo_bus_type);
1137} 1137}
1138 1138
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index 174aa86ee816..7b07acb03f3b 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -801,9 +801,9 @@ struct sa1111_save_data {
801 801
802#ifdef CONFIG_PM 802#ifdef CONFIG_PM
803 803
804static int sa1111_suspend(struct device *dev, pm_message_t state) 804static int sa1111_suspend(struct platform_device *dev, pm_message_t state)
805{ 805{
806 struct sa1111 *sachip = dev_get_drvdata(dev); 806 struct sa1111 *sachip = platform_get_drvdata(dev);
807 struct sa1111_save_data *save; 807 struct sa1111_save_data *save;
808 unsigned long flags; 808 unsigned long flags;
809 unsigned int val; 809 unsigned int val;
@@ -812,7 +812,7 @@ static int sa1111_suspend(struct device *dev, pm_message_t state)
812 save = kmalloc(sizeof(struct sa1111_save_data), GFP_KERNEL); 812 save = kmalloc(sizeof(struct sa1111_save_data), GFP_KERNEL);
813 if (!save) 813 if (!save)
814 return -ENOMEM; 814 return -ENOMEM;
815 dev->power.saved_state = save; 815 dev->dev.power.saved_state = save;
816 816
817 spin_lock_irqsave(&sachip->lock, flags); 817 spin_lock_irqsave(&sachip->lock, flags);
818 818
@@ -859,14 +859,14 @@ static int sa1111_suspend(struct device *dev, pm_message_t state)
859 * restored by their respective drivers, and must be called 859 * restored by their respective drivers, and must be called
860 * via LDM after this function. 860 * via LDM after this function.
861 */ 861 */
862static int sa1111_resume(struct device *dev) 862static int sa1111_resume(struct platform_device *dev)
863{ 863{
864 struct sa1111 *sachip = dev_get_drvdata(dev); 864 struct sa1111 *sachip = platform_get_drvdata(dev);
865 struct sa1111_save_data *save; 865 struct sa1111_save_data *save;
866 unsigned long flags, id; 866 unsigned long flags, id;
867 void __iomem *base; 867 void __iomem *base;
868 868
869 save = (struct sa1111_save_data *)dev->power.saved_state; 869 save = (struct sa1111_save_data *)dev->dev.power.saved_state;
870 if (!save) 870 if (!save)
871 return 0; 871 return 0;
872 872
@@ -879,7 +879,7 @@ static int sa1111_resume(struct device *dev)
879 id = sa1111_readl(sachip->base + SA1111_SKID); 879 id = sa1111_readl(sachip->base + SA1111_SKID);
880 if ((id & SKID_ID_MASK) != SKID_SA1111_ID) { 880 if ((id & SKID_ID_MASK) != SKID_SA1111_ID) {
881 __sa1111_remove(sachip); 881 __sa1111_remove(sachip);
882 dev_set_drvdata(dev, NULL); 882 platform_set_drvdata(dev, NULL);
883 kfree(save); 883 kfree(save);
884 return 0; 884 return 0;
885 } 885 }
@@ -911,7 +911,7 @@ static int sa1111_resume(struct device *dev)
911 911
912 spin_unlock_irqrestore(&sachip->lock, flags); 912 spin_unlock_irqrestore(&sachip->lock, flags);
913 913
914 dev->power.saved_state = NULL; 914 dev->dev.power.saved_state = NULL;
915 kfree(save); 915 kfree(save);
916 916
917 return 0; 917 return 0;
@@ -922,9 +922,8 @@ static int sa1111_resume(struct device *dev)
922#define sa1111_resume NULL 922#define sa1111_resume NULL
923#endif 923#endif
924 924
925static int sa1111_probe(struct device *dev) 925static int sa1111_probe(struct platform_device *pdev)
926{ 926{
927 struct platform_device *pdev = to_platform_device(dev);
928 struct resource *mem; 927 struct resource *mem;
929 int irq; 928 int irq;
930 929
@@ -933,20 +932,20 @@ static int sa1111_probe(struct device *dev)
933 return -EINVAL; 932 return -EINVAL;
934 irq = platform_get_irq(pdev, 0); 933 irq = platform_get_irq(pdev, 0);
935 934
936 return __sa1111_probe(dev, mem, irq); 935 return __sa1111_probe(&pdev->dev, mem, irq);
937} 936}
938 937
939static int sa1111_remove(struct device *dev) 938static int sa1111_remove(struct platform_device *pdev)
940{ 939{
941 struct sa1111 *sachip = dev_get_drvdata(dev); 940 struct sa1111 *sachip = platform_get_drvdata(pdev);
942 941
943 if (sachip) { 942 if (sachip) {
944 __sa1111_remove(sachip); 943 __sa1111_remove(sachip);
945 dev_set_drvdata(dev, NULL); 944 platform_set_drvdata(pdev, NULL);
946 945
947#ifdef CONFIG_PM 946#ifdef CONFIG_PM
948 kfree(dev->power.saved_state); 947 kfree(pdev->dev.power.saved_state);
949 dev->power.saved_state = NULL; 948 pdev->dev.power.saved_state = NULL;
950#endif 949#endif
951 } 950 }
952 951
@@ -962,13 +961,14 @@ static int sa1111_remove(struct device *dev)
962 * We also need to handle the SDRAM configuration for 961 * We also need to handle the SDRAM configuration for
963 * PXA250/SA1110 machine classes. 962 * PXA250/SA1110 machine classes.
964 */ 963 */
965static struct device_driver sa1111_device_driver = { 964static struct platform_driver sa1111_device_driver = {
966 .name = "sa1111",
967 .bus = &platform_bus_type,
968 .probe = sa1111_probe, 965 .probe = sa1111_probe,
969 .remove = sa1111_remove, 966 .remove = sa1111_remove,
970 .suspend = sa1111_suspend, 967 .suspend = sa1111_suspend,
971 .resume = sa1111_resume, 968 .resume = sa1111_resume,
969 .driver = {
970 .name = "sa1111",
971 },
972}; 972};
973 973
974/* 974/*
@@ -1256,13 +1256,13 @@ static int __init sa1111_init(void)
1256{ 1256{
1257 int ret = bus_register(&sa1111_bus_type); 1257 int ret = bus_register(&sa1111_bus_type);
1258 if (ret == 0) 1258 if (ret == 0)
1259 driver_register(&sa1111_device_driver); 1259 platform_driver_register(&sa1111_device_driver);
1260 return ret; 1260 return ret;
1261} 1261}
1262 1262
1263static void __exit sa1111_exit(void) 1263static void __exit sa1111_exit(void)
1264{ 1264{
1265 driver_unregister(&sa1111_device_driver); 1265 platform_driver_unregister(&sa1111_device_driver);
1266 bus_unregister(&sa1111_bus_type); 1266 bus_unregister(&sa1111_bus_type);
1267} 1267}
1268 1268
diff --git a/arch/arm/common/scoop.c b/arch/arm/common/scoop.c
index c7fdf390cef9..32924c6714fe 100644
--- a/arch/arm/common/scoop.c
+++ b/arch/arm/common/scoop.c
@@ -98,9 +98,9 @@ static void check_scoop_reg(struct scoop_dev *sdev)
98} 98}
99 99
100#ifdef CONFIG_PM 100#ifdef CONFIG_PM
101static int scoop_suspend(struct device *dev, pm_message_t state) 101static int scoop_suspend(struct platform_device *dev, pm_message_t state)
102{ 102{
103 struct scoop_dev *sdev = dev_get_drvdata(dev); 103 struct scoop_dev *sdev = platform_get_drvdata(dev);
104 104
105 check_scoop_reg(sdev); 105 check_scoop_reg(sdev);
106 sdev->scoop_gpwr = SCOOP_REG(sdev->base, SCOOP_GPWR); 106 sdev->scoop_gpwr = SCOOP_REG(sdev->base, SCOOP_GPWR);
@@ -109,9 +109,9 @@ static int scoop_suspend(struct device *dev, pm_message_t state)
109 return 0; 109 return 0;
110} 110}
111 111
112static int scoop_resume(struct device *dev) 112static int scoop_resume(struct platform_device *dev)
113{ 113{
114 struct scoop_dev *sdev = dev_get_drvdata(dev); 114 struct scoop_dev *sdev = platform_get_drvdata(dev);
115 115
116 check_scoop_reg(sdev); 116 check_scoop_reg(sdev);
117 SCOOP_REG(sdev->base,SCOOP_GPWR) = sdev->scoop_gpwr; 117 SCOOP_REG(sdev->base,SCOOP_GPWR) = sdev->scoop_gpwr;
@@ -123,11 +123,10 @@ static int scoop_resume(struct device *dev)
123#define scoop_resume NULL 123#define scoop_resume NULL
124#endif 124#endif
125 125
126int __init scoop_probe(struct device *dev) 126int __init scoop_probe(struct platform_device *pdev)
127{ 127{
128 struct scoop_dev *devptr; 128 struct scoop_dev *devptr;
129 struct scoop_config *inf; 129 struct scoop_config *inf;
130 struct platform_device *pdev = to_platform_device(dev);
131 struct resource *mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); 130 struct resource *mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
132 131
133 if (!mem) 132 if (!mem)
@@ -141,7 +140,7 @@ int __init scoop_probe(struct device *dev)
141 memset(devptr, 0, sizeof(struct scoop_dev)); 140 memset(devptr, 0, sizeof(struct scoop_dev));
142 spin_lock_init(&devptr->scoop_lock); 141 spin_lock_init(&devptr->scoop_lock);
143 142
144 inf = dev->platform_data; 143 inf = pdev->dev.platform_data;
145 devptr->base = ioremap(mem->start, mem->end - mem->start + 1); 144 devptr->base = ioremap(mem->start, mem->end - mem->start + 1);
146 145
147 if (!devptr->base) { 146 if (!devptr->base) {
@@ -149,7 +148,7 @@ int __init scoop_probe(struct device *dev)
149 return -ENOMEM; 148 return -ENOMEM;
150 } 149 }
151 150
152 dev_set_drvdata(dev, devptr); 151 platform_set_drvdata(pdev, devptr);
153 152
154 printk("Sharp Scoop Device found at 0x%08x -> 0x%08x\n",(unsigned int)mem->start,(unsigned int)devptr->base); 153 printk("Sharp Scoop Device found at 0x%08x -> 0x%08x\n",(unsigned int)mem->start,(unsigned int)devptr->base);
155 154
@@ -164,29 +163,30 @@ int __init scoop_probe(struct device *dev)
164 return 0; 163 return 0;
165} 164}
166 165
167static int scoop_remove(struct device *dev) 166static int scoop_remove(struct platform_device *pdev)
168{ 167{
169 struct scoop_dev *sdev = dev_get_drvdata(dev); 168 struct scoop_dev *sdev = platform_get_drvdata(pdev);
170 if (sdev) { 169 if (sdev) {
171 iounmap(sdev->base); 170 iounmap(sdev->base);
172 kfree(sdev); 171 kfree(sdev);
173 dev_set_drvdata(dev, NULL); 172 platform_set_drvdata(pdev, NULL);
174 } 173 }
175 return 0; 174 return 0;
176} 175}
177 176
178static struct device_driver scoop_driver = { 177static struct platform_driver scoop_driver = {
179 .name = "sharp-scoop",
180 .bus = &platform_bus_type,
181 .probe = scoop_probe, 178 .probe = scoop_probe,
182 .remove = scoop_remove, 179 .remove = scoop_remove,
183 .suspend = scoop_suspend, 180 .suspend = scoop_suspend,
184 .resume = scoop_resume, 181 .resume = scoop_resume,
182 .driver = {
183 .name = "sharp-scoop",
184 },
185}; 185};
186 186
187int __init scoop_init(void) 187int __init scoop_init(void)
188{ 188{
189 return driver_register(&scoop_driver); 189 return platform_driver_register(&scoop_driver);
190} 190}
191 191
192subsys_initcall(scoop_init); 192subsys_initcall(scoop_init);
diff --git a/arch/arm/configs/enp2611_defconfig b/arch/arm/configs/enp2611_defconfig
index 30e6444f9aaa..fd7c0042bcca 100644
--- a/arch/arm/configs/enp2611_defconfig
+++ b/arch/arm/configs/enp2611_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.13 3# Linux kernel version: 2.6.14-git13
4# Wed Sep 14 10:51:52 2005 4# Thu Nov 10 15:12:48 2005
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -21,6 +21,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
21# General setup 21# General setup
22# 22#
23CONFIG_LOCALVERSION="" 23CONFIG_LOCALVERSION=""
24CONFIG_LOCALVERSION_AUTO=y
24CONFIG_SWAP=y 25CONFIG_SWAP=y
25CONFIG_SYSVIPC=y 26CONFIG_SYSVIPC=y
26# CONFIG_POSIX_MQUEUE is not set 27# CONFIG_POSIX_MQUEUE is not set
@@ -31,6 +32,7 @@ CONFIG_SYSCTL=y
31# CONFIG_HOTPLUG is not set 32# CONFIG_HOTPLUG is not set
32CONFIG_KOBJECT_UEVENT=y 33CONFIG_KOBJECT_UEVENT=y
33# CONFIG_IKCONFIG is not set 34# CONFIG_IKCONFIG is not set
35CONFIG_INITRAMFS_SOURCE=""
34CONFIG_EMBEDDED=y 36CONFIG_EMBEDDED=y
35CONFIG_KALLSYMS=y 37CONFIG_KALLSYMS=y
36# CONFIG_KALLSYMS_ALL is not set 38# CONFIG_KALLSYMS_ALL is not set
@@ -61,6 +63,23 @@ CONFIG_OBSOLETE_MODPARM=y
61CONFIG_KMOD=y 63CONFIG_KMOD=y
62 64
63# 65#
66# Block layer
67#
68
69#
70# IO Schedulers
71#
72CONFIG_IOSCHED_NOOP=y
73CONFIG_IOSCHED_AS=y
74CONFIG_IOSCHED_DEADLINE=y
75CONFIG_IOSCHED_CFQ=y
76CONFIG_DEFAULT_AS=y
77# CONFIG_DEFAULT_DEADLINE is not set
78# CONFIG_DEFAULT_CFQ is not set
79# CONFIG_DEFAULT_NOOP is not set
80CONFIG_DEFAULT_IOSCHED="anticipatory"
81
82#
64# System Type 83# System Type
65# 84#
66# CONFIG_ARCH_CLPS7500 is not set 85# CONFIG_ARCH_CLPS7500 is not set
@@ -82,6 +101,7 @@ CONFIG_ARCH_IXP2000=y
82# CONFIG_ARCH_LH7A40X is not set 101# CONFIG_ARCH_LH7A40X is not set
83# CONFIG_ARCH_OMAP is not set 102# CONFIG_ARCH_OMAP is not set
84# CONFIG_ARCH_VERSATILE is not set 103# CONFIG_ARCH_VERSATILE is not set
104# CONFIG_ARCH_REALVIEW is not set
85# CONFIG_ARCH_IMX is not set 105# CONFIG_ARCH_IMX is not set
86# CONFIG_ARCH_H720X is not set 106# CONFIG_ARCH_H720X is not set
87# CONFIG_ARCH_AAEC2000 is not set 107# CONFIG_ARCH_AAEC2000 is not set
@@ -124,7 +144,6 @@ CONFIG_XSCALE_PMU=y
124CONFIG_ISA_DMA_API=y 144CONFIG_ISA_DMA_API=y
125CONFIG_PCI=y 145CONFIG_PCI=y
126CONFIG_PCI_LEGACY_PROC=y 146CONFIG_PCI_LEGACY_PROC=y
127CONFIG_PCI_NAMES=y
128# CONFIG_PCI_DEBUG is not set 147# CONFIG_PCI_DEBUG is not set
129 148
130# 149#
@@ -144,6 +163,8 @@ CONFIG_FLATMEM_MANUAL=y
144# CONFIG_SPARSEMEM_MANUAL is not set 163# CONFIG_SPARSEMEM_MANUAL is not set
145CONFIG_FLATMEM=y 164CONFIG_FLATMEM=y
146CONFIG_FLAT_NODE_MEM_MAP=y 165CONFIG_FLAT_NODE_MEM_MAP=y
166# CONFIG_SPARSEMEM_STATIC is not set
167CONFIG_SPLIT_PTLOCK_CPUS=4096
147CONFIG_ALIGNMENT_TRAP=y 168CONFIG_ALIGNMENT_TRAP=y
148 169
149# 170#
@@ -162,6 +183,7 @@ CONFIG_CMDLINE="console=ttyS0,57600 root=/dev/nfs ip=bootp mem=64M@0x0 pci=firmw
162# At least one emulation must be selected 183# At least one emulation must be selected
163# 184#
164CONFIG_FPE_NWFPE=y 185CONFIG_FPE_NWFPE=y
186CONFIG_FPE_NWFPE_XP=y
165# CONFIG_FPE_FASTFPE is not set 187# CONFIG_FPE_FASTFPE is not set
166 188
167# 189#
@@ -205,14 +227,19 @@ CONFIG_SYN_COOKIES=y
205# CONFIG_INET_ESP is not set 227# CONFIG_INET_ESP is not set
206# CONFIG_INET_IPCOMP is not set 228# CONFIG_INET_IPCOMP is not set
207# CONFIG_INET_TUNNEL is not set 229# CONFIG_INET_TUNNEL is not set
208# CONFIG_IP_TCPDIAG is not set 230CONFIG_INET_DIAG=y
209# CONFIG_IP_TCPDIAG_IPV6 is not set 231CONFIG_INET_TCP_DIAG=y
210# CONFIG_TCP_CONG_ADVANCED is not set 232# CONFIG_TCP_CONG_ADVANCED is not set
211CONFIG_TCP_CONG_BIC=y 233CONFIG_TCP_CONG_BIC=y
212# CONFIG_IPV6 is not set 234# CONFIG_IPV6 is not set
213# CONFIG_NETFILTER is not set 235# CONFIG_NETFILTER is not set
214 236
215# 237#
238# DCCP Configuration (EXPERIMENTAL)
239#
240# CONFIG_IP_DCCP is not set
241
242#
216# SCTP Configuration (EXPERIMENTAL) 243# SCTP Configuration (EXPERIMENTAL)
217# 244#
218# CONFIG_IP_SCTP is not set 245# CONFIG_IP_SCTP is not set
@@ -228,6 +255,10 @@ CONFIG_TCP_CONG_BIC=y
228# CONFIG_NET_DIVERT is not set 255# CONFIG_NET_DIVERT is not set
229# CONFIG_ECONET is not set 256# CONFIG_ECONET is not set
230# CONFIG_WAN_ROUTER is not set 257# CONFIG_WAN_ROUTER is not set
258
259#
260# QoS and/or fair queueing
261#
231# CONFIG_NET_SCHED is not set 262# CONFIG_NET_SCHED is not set
232# CONFIG_NET_CLS_ROUTE is not set 263# CONFIG_NET_CLS_ROUTE is not set
233 264
@@ -238,6 +269,7 @@ CONFIG_TCP_CONG_BIC=y
238# CONFIG_HAMRADIO is not set 269# CONFIG_HAMRADIO is not set
239# CONFIG_IRDA is not set 270# CONFIG_IRDA is not set
240# CONFIG_BT is not set 271# CONFIG_BT is not set
272# CONFIG_IEEE80211 is not set
241 273
242# 274#
243# Device Drivers 275# Device Drivers
@@ -273,6 +305,7 @@ CONFIG_MTD_BLOCK=y
273# CONFIG_FTL is not set 305# CONFIG_FTL is not set
274# CONFIG_NFTL is not set 306# CONFIG_NFTL is not set
275# CONFIG_INFTL is not set 307# CONFIG_INFTL is not set
308# CONFIG_RFD_FTL is not set
276 309
277# 310#
278# RAM/ROM/Flash chip drivers 311# RAM/ROM/Flash chip drivers
@@ -307,7 +340,6 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y
307# CONFIG_MTD_PHYSMAP is not set 340# CONFIG_MTD_PHYSMAP is not set
308# CONFIG_MTD_ARM_INTEGRATOR is not set 341# CONFIG_MTD_ARM_INTEGRATOR is not set
309CONFIG_MTD_IXP2000=y 342CONFIG_MTD_IXP2000=y
310# CONFIG_MTD_EDB7312 is not set
311# CONFIG_MTD_PCI is not set 343# CONFIG_MTD_PCI is not set
312# CONFIG_MTD_PLATRAM is not set 344# CONFIG_MTD_PLATRAM is not set
313 345
@@ -334,6 +366,11 @@ CONFIG_MTD_IXP2000=y
334# CONFIG_MTD_NAND is not set 366# CONFIG_MTD_NAND is not set
335 367
336# 368#
369# OneNAND Flash Device Drivers
370#
371# CONFIG_MTD_ONENAND is not set
372
373#
337# Parallel port support 374# Parallel port support
338# 375#
339# CONFIG_PARPORT is not set 376# CONFIG_PARPORT is not set
@@ -358,21 +395,13 @@ CONFIG_BLK_DEV_RAM=y
358CONFIG_BLK_DEV_RAM_COUNT=16 395CONFIG_BLK_DEV_RAM_COUNT=16
359CONFIG_BLK_DEV_RAM_SIZE=8192 396CONFIG_BLK_DEV_RAM_SIZE=8192
360CONFIG_BLK_DEV_INITRD=y 397CONFIG_BLK_DEV_INITRD=y
361CONFIG_INITRAMFS_SOURCE=""
362# CONFIG_CDROM_PKTCDVD is not set 398# CONFIG_CDROM_PKTCDVD is not set
363
364#
365# IO Schedulers
366#
367CONFIG_IOSCHED_NOOP=y
368CONFIG_IOSCHED_AS=y
369CONFIG_IOSCHED_DEADLINE=y
370CONFIG_IOSCHED_CFQ=y
371# CONFIG_ATA_OVER_ETH is not set 399# CONFIG_ATA_OVER_ETH is not set
372 400
373# 401#
374# SCSI device support 402# SCSI device support
375# 403#
404# CONFIG_RAID_ATTRS is not set
376# CONFIG_SCSI is not set 405# CONFIG_SCSI is not set
377 406
378# 407#
@@ -410,12 +439,18 @@ CONFIG_DUMMY=y
410# CONFIG_ARCNET is not set 439# CONFIG_ARCNET is not set
411 440
412# 441#
442# PHY device support
443#
444# CONFIG_PHYLIB is not set
445
446#
413# Ethernet (10 or 100Mbit) 447# Ethernet (10 or 100Mbit)
414# 448#
415CONFIG_NET_ETHERNET=y 449CONFIG_NET_ETHERNET=y
416CONFIG_MII=y 450CONFIG_MII=y
417# CONFIG_HAPPYMEAL is not set 451# CONFIG_HAPPYMEAL is not set
418# CONFIG_SUNGEM is not set 452# CONFIG_SUNGEM is not set
453# CONFIG_CASSINI is not set
419# CONFIG_NET_VENDOR_3COM is not set 454# CONFIG_NET_VENDOR_3COM is not set
420# CONFIG_SMC91X is not set 455# CONFIG_SMC91X is not set
421# CONFIG_DM9000 is not set 456# CONFIG_DM9000 is not set
@@ -455,6 +490,7 @@ CONFIG_EEPRO100=y
455# CONFIG_HAMACHI is not set 490# CONFIG_HAMACHI is not set
456# CONFIG_YELLOWFIN is not set 491# CONFIG_YELLOWFIN is not set
457# CONFIG_R8169 is not set 492# CONFIG_R8169 is not set
493# CONFIG_SIS190 is not set
458# CONFIG_SKGE is not set 494# CONFIG_SKGE is not set
459# CONFIG_SK98LIN is not set 495# CONFIG_SK98LIN is not set
460# CONFIG_VIA_VELOCITY is not set 496# CONFIG_VIA_VELOCITY is not set
@@ -464,6 +500,7 @@ CONFIG_EEPRO100=y
464# 500#
465# Ethernet (10000 Mbit) 501# Ethernet (10000 Mbit)
466# 502#
503# CONFIG_CHELSIO_T1 is not set
467# CONFIG_IXGB is not set 504# CONFIG_IXGB is not set
468# CONFIG_S2IO is not set 505# CONFIG_S2IO is not set
469 506
@@ -609,6 +646,7 @@ CONFIG_IXP2000_WATCHDOG=y
609# TPM devices 646# TPM devices
610# 647#
611# CONFIG_TCG_TPM is not set 648# CONFIG_TCG_TPM is not set
649# CONFIG_TELCLOCK is not set
612 650
613# 651#
614# I2C support 652# I2C support
@@ -634,7 +672,6 @@ CONFIG_I2C_ALGOBIT=y
634# CONFIG_I2C_I801 is not set 672# CONFIG_I2C_I801 is not set
635# CONFIG_I2C_I810 is not set 673# CONFIG_I2C_I810 is not set
636# CONFIG_I2C_PIIX4 is not set 674# CONFIG_I2C_PIIX4 is not set
637# CONFIG_I2C_ISA is not set
638CONFIG_I2C_IXP2000=y 675CONFIG_I2C_IXP2000=y
639# CONFIG_I2C_NFORCE2 is not set 676# CONFIG_I2C_NFORCE2 is not set
640# CONFIG_I2C_PARPORT_LIGHT is not set 677# CONFIG_I2C_PARPORT_LIGHT is not set
@@ -649,7 +686,6 @@ CONFIG_I2C_IXP2000=y
649# CONFIG_I2C_VIAPRO is not set 686# CONFIG_I2C_VIAPRO is not set
650# CONFIG_I2C_VOODOO3 is not set 687# CONFIG_I2C_VOODOO3 is not set
651# CONFIG_I2C_PCA_ISA is not set 688# CONFIG_I2C_PCA_ISA is not set
652CONFIG_I2C_SENSOR=y
653 689
654# 690#
655# Miscellaneous I2C Chip support 691# Miscellaneous I2C Chip support
@@ -662,6 +698,7 @@ CONFIG_SENSORS_EEPROM=y
662# CONFIG_SENSORS_PCF8591 is not set 698# CONFIG_SENSORS_PCF8591 is not set
663# CONFIG_SENSORS_RTC8564 is not set 699# CONFIG_SENSORS_RTC8564 is not set
664# CONFIG_SENSORS_MAX6875 is not set 700# CONFIG_SENSORS_MAX6875 is not set
701# CONFIG_RTC_X1205_I2C is not set
665# CONFIG_I2C_DEBUG_CORE is not set 702# CONFIG_I2C_DEBUG_CORE is not set
666# CONFIG_I2C_DEBUG_ALGO is not set 703# CONFIG_I2C_DEBUG_ALGO is not set
667# CONFIG_I2C_DEBUG_BUS is not set 704# CONFIG_I2C_DEBUG_BUS is not set
@@ -671,6 +708,7 @@ CONFIG_SENSORS_EEPROM=y
671# Hardware Monitoring support 708# Hardware Monitoring support
672# 709#
673CONFIG_HWMON=y 710CONFIG_HWMON=y
711# CONFIG_HWMON_VID is not set
674# CONFIG_SENSORS_ADM1021 is not set 712# CONFIG_SENSORS_ADM1021 is not set
675# CONFIG_SENSORS_ADM1025 is not set 713# CONFIG_SENSORS_ADM1025 is not set
676# CONFIG_SENSORS_ADM1026 is not set 714# CONFIG_SENSORS_ADM1026 is not set
@@ -701,6 +739,7 @@ CONFIG_HWMON=y
701# CONFIG_SENSORS_SMSC47B397 is not set 739# CONFIG_SENSORS_SMSC47B397 is not set
702# CONFIG_SENSORS_VIA686A is not set 740# CONFIG_SENSORS_VIA686A is not set
703# CONFIG_SENSORS_W83781D is not set 741# CONFIG_SENSORS_W83781D is not set
742# CONFIG_SENSORS_W83792D is not set
704# CONFIG_SENSORS_W83L785TS is not set 743# CONFIG_SENSORS_W83L785TS is not set
705# CONFIG_SENSORS_W83627HF is not set 744# CONFIG_SENSORS_W83627HF is not set
706# CONFIG_SENSORS_W83627EHF is not set 745# CONFIG_SENSORS_W83627EHF is not set
@@ -711,6 +750,10 @@ CONFIG_HWMON=y
711# 750#
712 751
713# 752#
753# Multimedia Capabilities Port drivers
754#
755
756#
714# Multimedia devices 757# Multimedia devices
715# 758#
716# CONFIG_VIDEO_DEV is not set 759# CONFIG_VIDEO_DEV is not set
@@ -738,6 +781,10 @@ CONFIG_USB_ARCH_HAS_OHCI=y
738# CONFIG_USB is not set 781# CONFIG_USB is not set
739 782
740# 783#
784# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
785#
786
787#
741# USB Gadget Support 788# USB Gadget Support
742# 789#
743# CONFIG_USB_GADGET is not set 790# CONFIG_USB_GADGET is not set
@@ -765,10 +812,6 @@ CONFIG_FS_MBCACHE=y
765# CONFIG_REISERFS_FS is not set 812# CONFIG_REISERFS_FS is not set
766# CONFIG_JFS_FS is not set 813# CONFIG_JFS_FS is not set
767CONFIG_FS_POSIX_ACL=y 814CONFIG_FS_POSIX_ACL=y
768
769#
770# XFS support
771#
772# CONFIG_XFS_FS is not set 815# CONFIG_XFS_FS is not set
773# CONFIG_MINIX_FS is not set 816# CONFIG_MINIX_FS is not set
774# CONFIG_ROMFS_FS is not set 817# CONFIG_ROMFS_FS is not set
@@ -777,6 +820,7 @@ CONFIG_INOTIFY=y
777CONFIG_DNOTIFY=y 820CONFIG_DNOTIFY=y
778# CONFIG_AUTOFS_FS is not set 821# CONFIG_AUTOFS_FS is not set
779# CONFIG_AUTOFS4_FS is not set 822# CONFIG_AUTOFS4_FS is not set
823# CONFIG_FUSE_FS is not set
780 824
781# 825#
782# CD-ROM/DVD Filesystems 826# CD-ROM/DVD Filesystems
@@ -796,11 +840,10 @@ CONFIG_DNOTIFY=y
796# 840#
797CONFIG_PROC_FS=y 841CONFIG_PROC_FS=y
798CONFIG_SYSFS=y 842CONFIG_SYSFS=y
799# CONFIG_DEVPTS_FS_XATTR is not set
800CONFIG_TMPFS=y 843CONFIG_TMPFS=y
801# CONFIG_TMPFS_XATTR is not set
802# CONFIG_HUGETLB_PAGE is not set 844# CONFIG_HUGETLB_PAGE is not set
803CONFIG_RAMFS=y 845CONFIG_RAMFS=y
846# CONFIG_RELAYFS_FS is not set
804 847
805# 848#
806# Miscellaneous filesystems 849# Miscellaneous filesystems
@@ -816,6 +859,7 @@ CONFIG_RAMFS=y
816CONFIG_JFFS2_FS=y 859CONFIG_JFFS2_FS=y
817CONFIG_JFFS2_FS_DEBUG=0 860CONFIG_JFFS2_FS_DEBUG=0
818CONFIG_JFFS2_FS_WRITEBUFFER=y 861CONFIG_JFFS2_FS_WRITEBUFFER=y
862# CONFIG_JFFS2_SUMMARY is not set
819# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set 863# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
820CONFIG_JFFS2_ZLIB=y 864CONFIG_JFFS2_ZLIB=y
821CONFIG_JFFS2_RTIME=y 865CONFIG_JFFS2_RTIME=y
@@ -848,6 +892,7 @@ CONFIG_SUNRPC=y
848# CONFIG_NCP_FS is not set 892# CONFIG_NCP_FS is not set
849# CONFIG_CODA_FS is not set 893# CONFIG_CODA_FS is not set
850# CONFIG_AFS_FS is not set 894# CONFIG_AFS_FS is not set
895# CONFIG_9P_FS is not set
851 896
852# 897#
853# Partition Types 898# Partition Types
@@ -886,6 +931,7 @@ CONFIG_MSDOS_PARTITION=y
886CONFIG_DEBUG_KERNEL=y 931CONFIG_DEBUG_KERNEL=y
887CONFIG_MAGIC_SYSRQ=y 932CONFIG_MAGIC_SYSRQ=y
888CONFIG_LOG_BUF_SHIFT=14 933CONFIG_LOG_BUF_SHIFT=14
934CONFIG_DETECT_SOFTLOCKUP=y
889# CONFIG_SCHEDSTATS is not set 935# CONFIG_SCHEDSTATS is not set
890# CONFIG_DEBUG_SLAB is not set 936# CONFIG_DEBUG_SLAB is not set
891# CONFIG_DEBUG_SPINLOCK is not set 937# CONFIG_DEBUG_SPINLOCK is not set
@@ -894,7 +940,9 @@ CONFIG_LOG_BUF_SHIFT=14
894CONFIG_DEBUG_BUGVERBOSE=y 940CONFIG_DEBUG_BUGVERBOSE=y
895# CONFIG_DEBUG_INFO is not set 941# CONFIG_DEBUG_INFO is not set
896# CONFIG_DEBUG_FS is not set 942# CONFIG_DEBUG_FS is not set
943# CONFIG_DEBUG_VM is not set
897CONFIG_FRAME_POINTER=y 944CONFIG_FRAME_POINTER=y
945# CONFIG_RCU_TORTURE_TEST is not set
898CONFIG_DEBUG_USER=y 946CONFIG_DEBUG_USER=y
899# CONFIG_DEBUG_WAITQ is not set 947# CONFIG_DEBUG_WAITQ is not set
900CONFIG_DEBUG_ERRORS=y 948CONFIG_DEBUG_ERRORS=y
@@ -920,6 +968,7 @@ CONFIG_DEBUG_LL=y
920# Library routines 968# Library routines
921# 969#
922# CONFIG_CRC_CCITT is not set 970# CONFIG_CRC_CCITT is not set
971# CONFIG_CRC16 is not set
923CONFIG_CRC32=y 972CONFIG_CRC32=y
924# CONFIG_LIBCRC32C is not set 973# CONFIG_LIBCRC32C is not set
925CONFIG_ZLIB_INFLATE=y 974CONFIG_ZLIB_INFLATE=y
diff --git a/arch/arm/configs/ixdp2400_defconfig b/arch/arm/configs/ixdp2400_defconfig
index ddeb9f99d662..e6a4d2656fe5 100644
--- a/arch/arm/configs/ixdp2400_defconfig
+++ b/arch/arm/configs/ixdp2400_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.13 3# Linux kernel version: 2.6.14-git13
4# Wed Sep 14 10:52:01 2005 4# Thu Nov 10 15:14:13 2005
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -21,6 +21,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
21# General setup 21# General setup
22# 22#
23CONFIG_LOCALVERSION="" 23CONFIG_LOCALVERSION=""
24CONFIG_LOCALVERSION_AUTO=y
24CONFIG_SWAP=y 25CONFIG_SWAP=y
25CONFIG_SYSVIPC=y 26CONFIG_SYSVIPC=y
26# CONFIG_POSIX_MQUEUE is not set 27# CONFIG_POSIX_MQUEUE is not set
@@ -31,6 +32,7 @@ CONFIG_SYSCTL=y
31# CONFIG_HOTPLUG is not set 32# CONFIG_HOTPLUG is not set
32CONFIG_KOBJECT_UEVENT=y 33CONFIG_KOBJECT_UEVENT=y
33# CONFIG_IKCONFIG is not set 34# CONFIG_IKCONFIG is not set
35CONFIG_INITRAMFS_SOURCE=""
34CONFIG_EMBEDDED=y 36CONFIG_EMBEDDED=y
35CONFIG_KALLSYMS=y 37CONFIG_KALLSYMS=y
36# CONFIG_KALLSYMS_ALL is not set 38# CONFIG_KALLSYMS_ALL is not set
@@ -61,6 +63,23 @@ CONFIG_OBSOLETE_MODPARM=y
61CONFIG_KMOD=y 63CONFIG_KMOD=y
62 64
63# 65#
66# Block layer
67#
68
69#
70# IO Schedulers
71#
72CONFIG_IOSCHED_NOOP=y
73CONFIG_IOSCHED_AS=y
74CONFIG_IOSCHED_DEADLINE=y
75CONFIG_IOSCHED_CFQ=y
76CONFIG_DEFAULT_AS=y
77# CONFIG_DEFAULT_DEADLINE is not set
78# CONFIG_DEFAULT_CFQ is not set
79# CONFIG_DEFAULT_NOOP is not set
80CONFIG_DEFAULT_IOSCHED="anticipatory"
81
82#
64# System Type 83# System Type
65# 84#
66# CONFIG_ARCH_CLPS7500 is not set 85# CONFIG_ARCH_CLPS7500 is not set
@@ -82,6 +101,7 @@ CONFIG_ARCH_IXP2000=y
82# CONFIG_ARCH_LH7A40X is not set 101# CONFIG_ARCH_LH7A40X is not set
83# CONFIG_ARCH_OMAP is not set 102# CONFIG_ARCH_OMAP is not set
84# CONFIG_ARCH_VERSATILE is not set 103# CONFIG_ARCH_VERSATILE is not set
104# CONFIG_ARCH_REALVIEW is not set
85# CONFIG_ARCH_IMX is not set 105# CONFIG_ARCH_IMX is not set
86# CONFIG_ARCH_H720X is not set 106# CONFIG_ARCH_H720X is not set
87# CONFIG_ARCH_AAEC2000 is not set 107# CONFIG_ARCH_AAEC2000 is not set
@@ -125,7 +145,6 @@ CONFIG_XSCALE_PMU=y
125CONFIG_ISA_DMA_API=y 145CONFIG_ISA_DMA_API=y
126CONFIG_PCI=y 146CONFIG_PCI=y
127CONFIG_PCI_LEGACY_PROC=y 147CONFIG_PCI_LEGACY_PROC=y
128CONFIG_PCI_NAMES=y
129# CONFIG_PCI_DEBUG is not set 148# CONFIG_PCI_DEBUG is not set
130 149
131# 150#
@@ -145,6 +164,8 @@ CONFIG_FLATMEM_MANUAL=y
145# CONFIG_SPARSEMEM_MANUAL is not set 164# CONFIG_SPARSEMEM_MANUAL is not set
146CONFIG_FLATMEM=y 165CONFIG_FLATMEM=y
147CONFIG_FLAT_NODE_MEM_MAP=y 166CONFIG_FLAT_NODE_MEM_MAP=y
167# CONFIG_SPARSEMEM_STATIC is not set
168CONFIG_SPLIT_PTLOCK_CPUS=4096
148CONFIG_ALIGNMENT_TRAP=y 169CONFIG_ALIGNMENT_TRAP=y
149 170
150# 171#
@@ -163,6 +184,7 @@ CONFIG_CMDLINE="console=ttyS0,57600 root=/dev/nfs ip=bootp mem=64M@0x0 pci=firmw
163# At least one emulation must be selected 184# At least one emulation must be selected
164# 185#
165CONFIG_FPE_NWFPE=y 186CONFIG_FPE_NWFPE=y
187CONFIG_FPE_NWFPE_XP=y
166# CONFIG_FPE_FASTFPE is not set 188# CONFIG_FPE_FASTFPE is not set
167 189
168# 190#
@@ -206,14 +228,19 @@ CONFIG_SYN_COOKIES=y
206# CONFIG_INET_ESP is not set 228# CONFIG_INET_ESP is not set
207# CONFIG_INET_IPCOMP is not set 229# CONFIG_INET_IPCOMP is not set
208# CONFIG_INET_TUNNEL is not set 230# CONFIG_INET_TUNNEL is not set
209# CONFIG_IP_TCPDIAG is not set 231CONFIG_INET_DIAG=y
210# CONFIG_IP_TCPDIAG_IPV6 is not set 232CONFIG_INET_TCP_DIAG=y
211# CONFIG_TCP_CONG_ADVANCED is not set 233# CONFIG_TCP_CONG_ADVANCED is not set
212CONFIG_TCP_CONG_BIC=y 234CONFIG_TCP_CONG_BIC=y
213# CONFIG_IPV6 is not set 235# CONFIG_IPV6 is not set
214# CONFIG_NETFILTER is not set 236# CONFIG_NETFILTER is not set
215 237
216# 238#
239# DCCP Configuration (EXPERIMENTAL)
240#
241# CONFIG_IP_DCCP is not set
242
243#
217# SCTP Configuration (EXPERIMENTAL) 244# SCTP Configuration (EXPERIMENTAL)
218# 245#
219# CONFIG_IP_SCTP is not set 246# CONFIG_IP_SCTP is not set
@@ -229,6 +256,10 @@ CONFIG_TCP_CONG_BIC=y
229# CONFIG_NET_DIVERT is not set 256# CONFIG_NET_DIVERT is not set
230# CONFIG_ECONET is not set 257# CONFIG_ECONET is not set
231# CONFIG_WAN_ROUTER is not set 258# CONFIG_WAN_ROUTER is not set
259
260#
261# QoS and/or fair queueing
262#
232# CONFIG_NET_SCHED is not set 263# CONFIG_NET_SCHED is not set
233# CONFIG_NET_CLS_ROUTE is not set 264# CONFIG_NET_CLS_ROUTE is not set
234 265
@@ -239,6 +270,7 @@ CONFIG_TCP_CONG_BIC=y
239# CONFIG_HAMRADIO is not set 270# CONFIG_HAMRADIO is not set
240# CONFIG_IRDA is not set 271# CONFIG_IRDA is not set
241# CONFIG_BT is not set 272# CONFIG_BT is not set
273# CONFIG_IEEE80211 is not set
242 274
243# 275#
244# Device Drivers 276# Device Drivers
@@ -274,6 +306,7 @@ CONFIG_MTD_BLOCK=y
274# CONFIG_FTL is not set 306# CONFIG_FTL is not set
275# CONFIG_NFTL is not set 307# CONFIG_NFTL is not set
276# CONFIG_INFTL is not set 308# CONFIG_INFTL is not set
309# CONFIG_RFD_FTL is not set
277 310
278# 311#
279# RAM/ROM/Flash chip drivers 312# RAM/ROM/Flash chip drivers
@@ -308,7 +341,6 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y
308# CONFIG_MTD_PHYSMAP is not set 341# CONFIG_MTD_PHYSMAP is not set
309# CONFIG_MTD_ARM_INTEGRATOR is not set 342# CONFIG_MTD_ARM_INTEGRATOR is not set
310CONFIG_MTD_IXP2000=y 343CONFIG_MTD_IXP2000=y
311# CONFIG_MTD_EDB7312 is not set
312# CONFIG_MTD_PCI is not set 344# CONFIG_MTD_PCI is not set
313# CONFIG_MTD_PLATRAM is not set 345# CONFIG_MTD_PLATRAM is not set
314 346
@@ -335,6 +367,11 @@ CONFIG_MTD_IXP2000=y
335# CONFIG_MTD_NAND is not set 367# CONFIG_MTD_NAND is not set
336 368
337# 369#
370# OneNAND Flash Device Drivers
371#
372# CONFIG_MTD_ONENAND is not set
373
374#
338# Parallel port support 375# Parallel port support
339# 376#
340# CONFIG_PARPORT is not set 377# CONFIG_PARPORT is not set
@@ -359,21 +396,13 @@ CONFIG_BLK_DEV_RAM=y
359CONFIG_BLK_DEV_RAM_COUNT=16 396CONFIG_BLK_DEV_RAM_COUNT=16
360CONFIG_BLK_DEV_RAM_SIZE=8192 397CONFIG_BLK_DEV_RAM_SIZE=8192
361CONFIG_BLK_DEV_INITRD=y 398CONFIG_BLK_DEV_INITRD=y
362CONFIG_INITRAMFS_SOURCE=""
363# CONFIG_CDROM_PKTCDVD is not set 399# CONFIG_CDROM_PKTCDVD is not set
364
365#
366# IO Schedulers
367#
368CONFIG_IOSCHED_NOOP=y
369CONFIG_IOSCHED_AS=y
370CONFIG_IOSCHED_DEADLINE=y
371CONFIG_IOSCHED_CFQ=y
372# CONFIG_ATA_OVER_ETH is not set 400# CONFIG_ATA_OVER_ETH is not set
373 401
374# 402#
375# SCSI device support 403# SCSI device support
376# 404#
405# CONFIG_RAID_ATTRS is not set
377# CONFIG_SCSI is not set 406# CONFIG_SCSI is not set
378 407
379# 408#
@@ -411,12 +440,18 @@ CONFIG_DUMMY=y
411# CONFIG_ARCNET is not set 440# CONFIG_ARCNET is not set
412 441
413# 442#
443# PHY device support
444#
445# CONFIG_PHYLIB is not set
446
447#
414# Ethernet (10 or 100Mbit) 448# Ethernet (10 or 100Mbit)
415# 449#
416CONFIG_NET_ETHERNET=y 450CONFIG_NET_ETHERNET=y
417CONFIG_MII=y 451CONFIG_MII=y
418# CONFIG_HAPPYMEAL is not set 452# CONFIG_HAPPYMEAL is not set
419# CONFIG_SUNGEM is not set 453# CONFIG_SUNGEM is not set
454# CONFIG_CASSINI is not set
420# CONFIG_NET_VENDOR_3COM is not set 455# CONFIG_NET_VENDOR_3COM is not set
421# CONFIG_SMC91X is not set 456# CONFIG_SMC91X is not set
422# CONFIG_DM9000 is not set 457# CONFIG_DM9000 is not set
@@ -456,6 +491,7 @@ CONFIG_EEPRO100=y
456# CONFIG_HAMACHI is not set 491# CONFIG_HAMACHI is not set
457# CONFIG_YELLOWFIN is not set 492# CONFIG_YELLOWFIN is not set
458# CONFIG_R8169 is not set 493# CONFIG_R8169 is not set
494# CONFIG_SIS190 is not set
459# CONFIG_SKGE is not set 495# CONFIG_SKGE is not set
460# CONFIG_SK98LIN is not set 496# CONFIG_SK98LIN is not set
461# CONFIG_VIA_VELOCITY is not set 497# CONFIG_VIA_VELOCITY is not set
@@ -465,6 +501,7 @@ CONFIG_EEPRO100=y
465# 501#
466# Ethernet (10000 Mbit) 502# Ethernet (10000 Mbit)
467# 503#
504# CONFIG_CHELSIO_T1 is not set
468# CONFIG_IXGB is not set 505# CONFIG_IXGB is not set
469# CONFIG_S2IO is not set 506# CONFIG_S2IO is not set
470 507
@@ -610,6 +647,7 @@ CONFIG_IXP2000_WATCHDOG=y
610# TPM devices 647# TPM devices
611# 648#
612# CONFIG_TCG_TPM is not set 649# CONFIG_TCG_TPM is not set
650# CONFIG_TELCLOCK is not set
613 651
614# 652#
615# I2C support 653# I2C support
@@ -635,7 +673,6 @@ CONFIG_I2C_ALGOBIT=y
635# CONFIG_I2C_I801 is not set 673# CONFIG_I2C_I801 is not set
636# CONFIG_I2C_I810 is not set 674# CONFIG_I2C_I810 is not set
637# CONFIG_I2C_PIIX4 is not set 675# CONFIG_I2C_PIIX4 is not set
638# CONFIG_I2C_ISA is not set
639CONFIG_I2C_IXP2000=y 676CONFIG_I2C_IXP2000=y
640# CONFIG_I2C_NFORCE2 is not set 677# CONFIG_I2C_NFORCE2 is not set
641# CONFIG_I2C_PARPORT_LIGHT is not set 678# CONFIG_I2C_PARPORT_LIGHT is not set
@@ -650,7 +687,6 @@ CONFIG_I2C_IXP2000=y
650# CONFIG_I2C_VIAPRO is not set 687# CONFIG_I2C_VIAPRO is not set
651# CONFIG_I2C_VOODOO3 is not set 688# CONFIG_I2C_VOODOO3 is not set
652# CONFIG_I2C_PCA_ISA is not set 689# CONFIG_I2C_PCA_ISA is not set
653CONFIG_I2C_SENSOR=y
654 690
655# 691#
656# Miscellaneous I2C Chip support 692# Miscellaneous I2C Chip support
@@ -663,6 +699,7 @@ CONFIG_SENSORS_EEPROM=y
663# CONFIG_SENSORS_PCF8591 is not set 699# CONFIG_SENSORS_PCF8591 is not set
664# CONFIG_SENSORS_RTC8564 is not set 700# CONFIG_SENSORS_RTC8564 is not set
665# CONFIG_SENSORS_MAX6875 is not set 701# CONFIG_SENSORS_MAX6875 is not set
702# CONFIG_RTC_X1205_I2C is not set
666# CONFIG_I2C_DEBUG_CORE is not set 703# CONFIG_I2C_DEBUG_CORE is not set
667# CONFIG_I2C_DEBUG_ALGO is not set 704# CONFIG_I2C_DEBUG_ALGO is not set
668# CONFIG_I2C_DEBUG_BUS is not set 705# CONFIG_I2C_DEBUG_BUS is not set
@@ -672,6 +709,7 @@ CONFIG_SENSORS_EEPROM=y
672# Hardware Monitoring support 709# Hardware Monitoring support
673# 710#
674CONFIG_HWMON=y 711CONFIG_HWMON=y
712# CONFIG_HWMON_VID is not set
675# CONFIG_SENSORS_ADM1021 is not set 713# CONFIG_SENSORS_ADM1021 is not set
676# CONFIG_SENSORS_ADM1025 is not set 714# CONFIG_SENSORS_ADM1025 is not set
677# CONFIG_SENSORS_ADM1026 is not set 715# CONFIG_SENSORS_ADM1026 is not set
@@ -702,6 +740,7 @@ CONFIG_HWMON=y
702# CONFIG_SENSORS_SMSC47B397 is not set 740# CONFIG_SENSORS_SMSC47B397 is not set
703# CONFIG_SENSORS_VIA686A is not set 741# CONFIG_SENSORS_VIA686A is not set
704# CONFIG_SENSORS_W83781D is not set 742# CONFIG_SENSORS_W83781D is not set
743# CONFIG_SENSORS_W83792D is not set
705# CONFIG_SENSORS_W83L785TS is not set 744# CONFIG_SENSORS_W83L785TS is not set
706# CONFIG_SENSORS_W83627HF is not set 745# CONFIG_SENSORS_W83627HF is not set
707# CONFIG_SENSORS_W83627EHF is not set 746# CONFIG_SENSORS_W83627EHF is not set
@@ -712,6 +751,10 @@ CONFIG_HWMON=y
712# 751#
713 752
714# 753#
754# Multimedia Capabilities Port drivers
755#
756
757#
715# Multimedia devices 758# Multimedia devices
716# 759#
717# CONFIG_VIDEO_DEV is not set 760# CONFIG_VIDEO_DEV is not set
@@ -739,6 +782,10 @@ CONFIG_USB_ARCH_HAS_OHCI=y
739# CONFIG_USB is not set 782# CONFIG_USB is not set
740 783
741# 784#
785# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
786#
787
788#
742# USB Gadget Support 789# USB Gadget Support
743# 790#
744# CONFIG_USB_GADGET is not set 791# CONFIG_USB_GADGET is not set
@@ -766,10 +813,6 @@ CONFIG_FS_MBCACHE=y
766# CONFIG_REISERFS_FS is not set 813# CONFIG_REISERFS_FS is not set
767# CONFIG_JFS_FS is not set 814# CONFIG_JFS_FS is not set
768CONFIG_FS_POSIX_ACL=y 815CONFIG_FS_POSIX_ACL=y
769
770#
771# XFS support
772#
773# CONFIG_XFS_FS is not set 816# CONFIG_XFS_FS is not set
774# CONFIG_MINIX_FS is not set 817# CONFIG_MINIX_FS is not set
775# CONFIG_ROMFS_FS is not set 818# CONFIG_ROMFS_FS is not set
@@ -778,6 +821,7 @@ CONFIG_INOTIFY=y
778CONFIG_DNOTIFY=y 821CONFIG_DNOTIFY=y
779# CONFIG_AUTOFS_FS is not set 822# CONFIG_AUTOFS_FS is not set
780# CONFIG_AUTOFS4_FS is not set 823# CONFIG_AUTOFS4_FS is not set
824# CONFIG_FUSE_FS is not set
781 825
782# 826#
783# CD-ROM/DVD Filesystems 827# CD-ROM/DVD Filesystems
@@ -797,11 +841,10 @@ CONFIG_DNOTIFY=y
797# 841#
798CONFIG_PROC_FS=y 842CONFIG_PROC_FS=y
799CONFIG_SYSFS=y 843CONFIG_SYSFS=y
800# CONFIG_DEVPTS_FS_XATTR is not set
801CONFIG_TMPFS=y 844CONFIG_TMPFS=y
802# CONFIG_TMPFS_XATTR is not set
803# CONFIG_HUGETLB_PAGE is not set 845# CONFIG_HUGETLB_PAGE is not set
804CONFIG_RAMFS=y 846CONFIG_RAMFS=y
847# CONFIG_RELAYFS_FS is not set
805 848
806# 849#
807# Miscellaneous filesystems 850# Miscellaneous filesystems
@@ -817,6 +860,7 @@ CONFIG_RAMFS=y
817CONFIG_JFFS2_FS=y 860CONFIG_JFFS2_FS=y
818CONFIG_JFFS2_FS_DEBUG=0 861CONFIG_JFFS2_FS_DEBUG=0
819CONFIG_JFFS2_FS_WRITEBUFFER=y 862CONFIG_JFFS2_FS_WRITEBUFFER=y
863# CONFIG_JFFS2_SUMMARY is not set
820# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set 864# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
821CONFIG_JFFS2_ZLIB=y 865CONFIG_JFFS2_ZLIB=y
822CONFIG_JFFS2_RTIME=y 866CONFIG_JFFS2_RTIME=y
@@ -849,6 +893,7 @@ CONFIG_SUNRPC=y
849# CONFIG_NCP_FS is not set 893# CONFIG_NCP_FS is not set
850# CONFIG_CODA_FS is not set 894# CONFIG_CODA_FS is not set
851# CONFIG_AFS_FS is not set 895# CONFIG_AFS_FS is not set
896# CONFIG_9P_FS is not set
852 897
853# 898#
854# Partition Types 899# Partition Types
@@ -887,6 +932,7 @@ CONFIG_MSDOS_PARTITION=y
887CONFIG_DEBUG_KERNEL=y 932CONFIG_DEBUG_KERNEL=y
888CONFIG_MAGIC_SYSRQ=y 933CONFIG_MAGIC_SYSRQ=y
889CONFIG_LOG_BUF_SHIFT=14 934CONFIG_LOG_BUF_SHIFT=14
935CONFIG_DETECT_SOFTLOCKUP=y
890# CONFIG_SCHEDSTATS is not set 936# CONFIG_SCHEDSTATS is not set
891# CONFIG_DEBUG_SLAB is not set 937# CONFIG_DEBUG_SLAB is not set
892# CONFIG_DEBUG_SPINLOCK is not set 938# CONFIG_DEBUG_SPINLOCK is not set
@@ -895,7 +941,9 @@ CONFIG_LOG_BUF_SHIFT=14
895CONFIG_DEBUG_BUGVERBOSE=y 941CONFIG_DEBUG_BUGVERBOSE=y
896# CONFIG_DEBUG_INFO is not set 942# CONFIG_DEBUG_INFO is not set
897# CONFIG_DEBUG_FS is not set 943# CONFIG_DEBUG_FS is not set
944# CONFIG_DEBUG_VM is not set
898CONFIG_FRAME_POINTER=y 945CONFIG_FRAME_POINTER=y
946# CONFIG_RCU_TORTURE_TEST is not set
899CONFIG_DEBUG_USER=y 947CONFIG_DEBUG_USER=y
900# CONFIG_DEBUG_WAITQ is not set 948# CONFIG_DEBUG_WAITQ is not set
901CONFIG_DEBUG_ERRORS=y 949CONFIG_DEBUG_ERRORS=y
@@ -921,6 +969,7 @@ CONFIG_DEBUG_LL=y
921# Library routines 969# Library routines
922# 970#
923# CONFIG_CRC_CCITT is not set 971# CONFIG_CRC_CCITT is not set
972# CONFIG_CRC16 is not set
924CONFIG_CRC32=y 973CONFIG_CRC32=y
925# CONFIG_LIBCRC32C is not set 974# CONFIG_LIBCRC32C is not set
926CONFIG_ZLIB_INFLATE=y 975CONFIG_ZLIB_INFLATE=y
diff --git a/arch/arm/configs/ixdp2401_defconfig b/arch/arm/configs/ixdp2401_defconfig
index 32bd552e0986..5572cf95d5f8 100644
--- a/arch/arm/configs/ixdp2401_defconfig
+++ b/arch/arm/configs/ixdp2401_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.13 3# Linux kernel version: 2.6.14-git13
4# Wed Sep 14 10:52:10 2005 4# Thu Nov 10 15:14:50 2005
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -21,6 +21,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
21# General setup 21# General setup
22# 22#
23CONFIG_LOCALVERSION="" 23CONFIG_LOCALVERSION=""
24CONFIG_LOCALVERSION_AUTO=y
24CONFIG_SWAP=y 25CONFIG_SWAP=y
25CONFIG_SYSVIPC=y 26CONFIG_SYSVIPC=y
26# CONFIG_POSIX_MQUEUE is not set 27# CONFIG_POSIX_MQUEUE is not set
@@ -31,6 +32,7 @@ CONFIG_SYSCTL=y
31# CONFIG_HOTPLUG is not set 32# CONFIG_HOTPLUG is not set
32CONFIG_KOBJECT_UEVENT=y 33CONFIG_KOBJECT_UEVENT=y
33# CONFIG_IKCONFIG is not set 34# CONFIG_IKCONFIG is not set
35CONFIG_INITRAMFS_SOURCE=""
34CONFIG_EMBEDDED=y 36CONFIG_EMBEDDED=y
35CONFIG_KALLSYMS=y 37CONFIG_KALLSYMS=y
36# CONFIG_KALLSYMS_ALL is not set 38# CONFIG_KALLSYMS_ALL is not set
@@ -61,6 +63,23 @@ CONFIG_OBSOLETE_MODPARM=y
61CONFIG_KMOD=y 63CONFIG_KMOD=y
62 64
63# 65#
66# Block layer
67#
68
69#
70# IO Schedulers
71#
72CONFIG_IOSCHED_NOOP=y
73CONFIG_IOSCHED_AS=y
74CONFIG_IOSCHED_DEADLINE=y
75CONFIG_IOSCHED_CFQ=y
76CONFIG_DEFAULT_AS=y
77# CONFIG_DEFAULT_DEADLINE is not set
78# CONFIG_DEFAULT_CFQ is not set
79# CONFIG_DEFAULT_NOOP is not set
80CONFIG_DEFAULT_IOSCHED="anticipatory"
81
82#
64# System Type 83# System Type
65# 84#
66# CONFIG_ARCH_CLPS7500 is not set 85# CONFIG_ARCH_CLPS7500 is not set
@@ -82,6 +101,7 @@ CONFIG_ARCH_IXP2000=y
82# CONFIG_ARCH_LH7A40X is not set 101# CONFIG_ARCH_LH7A40X is not set
83# CONFIG_ARCH_OMAP is not set 102# CONFIG_ARCH_OMAP is not set
84# CONFIG_ARCH_VERSATILE is not set 103# CONFIG_ARCH_VERSATILE is not set
104# CONFIG_ARCH_REALVIEW is not set
85# CONFIG_ARCH_IMX is not set 105# CONFIG_ARCH_IMX is not set
86# CONFIG_ARCH_H720X is not set 106# CONFIG_ARCH_H720X is not set
87# CONFIG_ARCH_AAEC2000 is not set 107# CONFIG_ARCH_AAEC2000 is not set
@@ -125,7 +145,6 @@ CONFIG_XSCALE_PMU=y
125CONFIG_ISA_DMA_API=y 145CONFIG_ISA_DMA_API=y
126CONFIG_PCI=y 146CONFIG_PCI=y
127CONFIG_PCI_LEGACY_PROC=y 147CONFIG_PCI_LEGACY_PROC=y
128CONFIG_PCI_NAMES=y
129# CONFIG_PCI_DEBUG is not set 148# CONFIG_PCI_DEBUG is not set
130 149
131# 150#
@@ -145,6 +164,8 @@ CONFIG_FLATMEM_MANUAL=y
145# CONFIG_SPARSEMEM_MANUAL is not set 164# CONFIG_SPARSEMEM_MANUAL is not set
146CONFIG_FLATMEM=y 165CONFIG_FLATMEM=y
147CONFIG_FLAT_NODE_MEM_MAP=y 166CONFIG_FLAT_NODE_MEM_MAP=y
167# CONFIG_SPARSEMEM_STATIC is not set
168CONFIG_SPLIT_PTLOCK_CPUS=4096
148CONFIG_ALIGNMENT_TRAP=y 169CONFIG_ALIGNMENT_TRAP=y
149 170
150# 171#
@@ -163,6 +184,7 @@ CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs ip=bootp mem=64M@0x0 pci=firm
163# At least one emulation must be selected 184# At least one emulation must be selected
164# 185#
165CONFIG_FPE_NWFPE=y 186CONFIG_FPE_NWFPE=y
187CONFIG_FPE_NWFPE_XP=y
166# CONFIG_FPE_FASTFPE is not set 188# CONFIG_FPE_FASTFPE is not set
167 189
168# 190#
@@ -206,14 +228,19 @@ CONFIG_SYN_COOKIES=y
206# CONFIG_INET_ESP is not set 228# CONFIG_INET_ESP is not set
207# CONFIG_INET_IPCOMP is not set 229# CONFIG_INET_IPCOMP is not set
208# CONFIG_INET_TUNNEL is not set 230# CONFIG_INET_TUNNEL is not set
209CONFIG_IP_TCPDIAG=y 231CONFIG_INET_DIAG=y
210# CONFIG_IP_TCPDIAG_IPV6 is not set 232CONFIG_INET_TCP_DIAG=y
211# CONFIG_TCP_CONG_ADVANCED is not set 233# CONFIG_TCP_CONG_ADVANCED is not set
212CONFIG_TCP_CONG_BIC=y 234CONFIG_TCP_CONG_BIC=y
213# CONFIG_IPV6 is not set 235# CONFIG_IPV6 is not set
214# CONFIG_NETFILTER is not set 236# CONFIG_NETFILTER is not set
215 237
216# 238#
239# DCCP Configuration (EXPERIMENTAL)
240#
241# CONFIG_IP_DCCP is not set
242
243#
217# SCTP Configuration (EXPERIMENTAL) 244# SCTP Configuration (EXPERIMENTAL)
218# 245#
219# CONFIG_IP_SCTP is not set 246# CONFIG_IP_SCTP is not set
@@ -229,6 +256,10 @@ CONFIG_TCP_CONG_BIC=y
229# CONFIG_NET_DIVERT is not set 256# CONFIG_NET_DIVERT is not set
230# CONFIG_ECONET is not set 257# CONFIG_ECONET is not set
231# CONFIG_WAN_ROUTER is not set 258# CONFIG_WAN_ROUTER is not set
259
260#
261# QoS and/or fair queueing
262#
232# CONFIG_NET_SCHED is not set 263# CONFIG_NET_SCHED is not set
233# CONFIG_NET_CLS_ROUTE is not set 264# CONFIG_NET_CLS_ROUTE is not set
234 265
@@ -239,6 +270,7 @@ CONFIG_TCP_CONG_BIC=y
239# CONFIG_HAMRADIO is not set 270# CONFIG_HAMRADIO is not set
240# CONFIG_IRDA is not set 271# CONFIG_IRDA is not set
241# CONFIG_BT is not set 272# CONFIG_BT is not set
273# CONFIG_IEEE80211 is not set
242 274
243# 275#
244# Device Drivers 276# Device Drivers
@@ -274,6 +306,7 @@ CONFIG_MTD_BLOCK=y
274# CONFIG_FTL is not set 306# CONFIG_FTL is not set
275# CONFIG_NFTL is not set 307# CONFIG_NFTL is not set
276# CONFIG_INFTL is not set 308# CONFIG_INFTL is not set
309# CONFIG_RFD_FTL is not set
277 310
278# 311#
279# RAM/ROM/Flash chip drivers 312# RAM/ROM/Flash chip drivers
@@ -308,7 +341,6 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y
308# CONFIG_MTD_PHYSMAP is not set 341# CONFIG_MTD_PHYSMAP is not set
309# CONFIG_MTD_ARM_INTEGRATOR is not set 342# CONFIG_MTD_ARM_INTEGRATOR is not set
310CONFIG_MTD_IXP2000=y 343CONFIG_MTD_IXP2000=y
311# CONFIG_MTD_EDB7312 is not set
312# CONFIG_MTD_PCI is not set 344# CONFIG_MTD_PCI is not set
313# CONFIG_MTD_PLATRAM is not set 345# CONFIG_MTD_PLATRAM is not set
314 346
@@ -335,6 +367,11 @@ CONFIG_MTD_IXP2000=y
335# CONFIG_MTD_NAND is not set 367# CONFIG_MTD_NAND is not set
336 368
337# 369#
370# OneNAND Flash Device Drivers
371#
372# CONFIG_MTD_ONENAND is not set
373
374#
338# Parallel port support 375# Parallel port support
339# 376#
340# CONFIG_PARPORT is not set 377# CONFIG_PARPORT is not set
@@ -359,21 +396,13 @@ CONFIG_BLK_DEV_RAM=y
359CONFIG_BLK_DEV_RAM_COUNT=16 396CONFIG_BLK_DEV_RAM_COUNT=16
360CONFIG_BLK_DEV_RAM_SIZE=8192 397CONFIG_BLK_DEV_RAM_SIZE=8192
361CONFIG_BLK_DEV_INITRD=y 398CONFIG_BLK_DEV_INITRD=y
362CONFIG_INITRAMFS_SOURCE=""
363# CONFIG_CDROM_PKTCDVD is not set 399# CONFIG_CDROM_PKTCDVD is not set
364
365#
366# IO Schedulers
367#
368CONFIG_IOSCHED_NOOP=y
369CONFIG_IOSCHED_AS=y
370CONFIG_IOSCHED_DEADLINE=y
371CONFIG_IOSCHED_CFQ=y
372# CONFIG_ATA_OVER_ETH is not set 400# CONFIG_ATA_OVER_ETH is not set
373 401
374# 402#
375# SCSI device support 403# SCSI device support
376# 404#
405# CONFIG_RAID_ATTRS is not set
377# CONFIG_SCSI is not set 406# CONFIG_SCSI is not set
378 407
379# 408#
@@ -411,12 +440,18 @@ CONFIG_DUMMY=y
411# CONFIG_ARCNET is not set 440# CONFIG_ARCNET is not set
412 441
413# 442#
443# PHY device support
444#
445# CONFIG_PHYLIB is not set
446
447#
414# Ethernet (10 or 100Mbit) 448# Ethernet (10 or 100Mbit)
415# 449#
416CONFIG_NET_ETHERNET=y 450CONFIG_NET_ETHERNET=y
417CONFIG_MII=y 451CONFIG_MII=y
418# CONFIG_HAPPYMEAL is not set 452# CONFIG_HAPPYMEAL is not set
419# CONFIG_SUNGEM is not set 453# CONFIG_SUNGEM is not set
454# CONFIG_CASSINI is not set
420# CONFIG_NET_VENDOR_3COM is not set 455# CONFIG_NET_VENDOR_3COM is not set
421# CONFIG_SMC91X is not set 456# CONFIG_SMC91X is not set
422# CONFIG_DM9000 is not set 457# CONFIG_DM9000 is not set
@@ -457,6 +492,7 @@ CONFIG_EEPRO100=y
457# CONFIG_HAMACHI is not set 492# CONFIG_HAMACHI is not set
458# CONFIG_YELLOWFIN is not set 493# CONFIG_YELLOWFIN is not set
459# CONFIG_R8169 is not set 494# CONFIG_R8169 is not set
495# CONFIG_SIS190 is not set
460# CONFIG_SKGE is not set 496# CONFIG_SKGE is not set
461# CONFIG_SK98LIN is not set 497# CONFIG_SK98LIN is not set
462# CONFIG_VIA_VELOCITY is not set 498# CONFIG_VIA_VELOCITY is not set
@@ -466,6 +502,7 @@ CONFIG_EEPRO100=y
466# 502#
467# Ethernet (10000 Mbit) 503# Ethernet (10000 Mbit)
468# 504#
505# CONFIG_CHELSIO_T1 is not set
469# CONFIG_IXGB is not set 506# CONFIG_IXGB is not set
470# CONFIG_S2IO is not set 507# CONFIG_S2IO is not set
471 508
@@ -611,6 +648,7 @@ CONFIG_IXP2000_WATCHDOG=y
611# TPM devices 648# TPM devices
612# 649#
613# CONFIG_TCG_TPM is not set 650# CONFIG_TCG_TPM is not set
651# CONFIG_TELCLOCK is not set
614 652
615# 653#
616# I2C support 654# I2C support
@@ -636,7 +674,6 @@ CONFIG_I2C_ALGOBIT=y
636# CONFIG_I2C_I801 is not set 674# CONFIG_I2C_I801 is not set
637# CONFIG_I2C_I810 is not set 675# CONFIG_I2C_I810 is not set
638# CONFIG_I2C_PIIX4 is not set 676# CONFIG_I2C_PIIX4 is not set
639# CONFIG_I2C_ISA is not set
640CONFIG_I2C_IXP2000=y 677CONFIG_I2C_IXP2000=y
641# CONFIG_I2C_NFORCE2 is not set 678# CONFIG_I2C_NFORCE2 is not set
642# CONFIG_I2C_PARPORT_LIGHT is not set 679# CONFIG_I2C_PARPORT_LIGHT is not set
@@ -651,7 +688,6 @@ CONFIG_I2C_IXP2000=y
651# CONFIG_I2C_VIAPRO is not set 688# CONFIG_I2C_VIAPRO is not set
652# CONFIG_I2C_VOODOO3 is not set 689# CONFIG_I2C_VOODOO3 is not set
653# CONFIG_I2C_PCA_ISA is not set 690# CONFIG_I2C_PCA_ISA is not set
654CONFIG_I2C_SENSOR=y
655 691
656# 692#
657# Miscellaneous I2C Chip support 693# Miscellaneous I2C Chip support
@@ -664,6 +700,7 @@ CONFIG_SENSORS_EEPROM=y
664# CONFIG_SENSORS_PCF8591 is not set 700# CONFIG_SENSORS_PCF8591 is not set
665# CONFIG_SENSORS_RTC8564 is not set 701# CONFIG_SENSORS_RTC8564 is not set
666# CONFIG_SENSORS_MAX6875 is not set 702# CONFIG_SENSORS_MAX6875 is not set
703# CONFIG_RTC_X1205_I2C is not set
667# CONFIG_I2C_DEBUG_CORE is not set 704# CONFIG_I2C_DEBUG_CORE is not set
668# CONFIG_I2C_DEBUG_ALGO is not set 705# CONFIG_I2C_DEBUG_ALGO is not set
669# CONFIG_I2C_DEBUG_BUS is not set 706# CONFIG_I2C_DEBUG_BUS is not set
@@ -673,6 +710,7 @@ CONFIG_SENSORS_EEPROM=y
673# Hardware Monitoring support 710# Hardware Monitoring support
674# 711#
675CONFIG_HWMON=y 712CONFIG_HWMON=y
713# CONFIG_HWMON_VID is not set
676# CONFIG_SENSORS_ADM1021 is not set 714# CONFIG_SENSORS_ADM1021 is not set
677# CONFIG_SENSORS_ADM1025 is not set 715# CONFIG_SENSORS_ADM1025 is not set
678# CONFIG_SENSORS_ADM1026 is not set 716# CONFIG_SENSORS_ADM1026 is not set
@@ -703,6 +741,7 @@ CONFIG_HWMON=y
703# CONFIG_SENSORS_SMSC47B397 is not set 741# CONFIG_SENSORS_SMSC47B397 is not set
704# CONFIG_SENSORS_VIA686A is not set 742# CONFIG_SENSORS_VIA686A is not set
705# CONFIG_SENSORS_W83781D is not set 743# CONFIG_SENSORS_W83781D is not set
744# CONFIG_SENSORS_W83792D is not set
706# CONFIG_SENSORS_W83L785TS is not set 745# CONFIG_SENSORS_W83L785TS is not set
707# CONFIG_SENSORS_W83627HF is not set 746# CONFIG_SENSORS_W83627HF is not set
708# CONFIG_SENSORS_W83627EHF is not set 747# CONFIG_SENSORS_W83627EHF is not set
@@ -713,6 +752,10 @@ CONFIG_HWMON=y
713# 752#
714 753
715# 754#
755# Multimedia Capabilities Port drivers
756#
757
758#
716# Multimedia devices 759# Multimedia devices
717# 760#
718# CONFIG_VIDEO_DEV is not set 761# CONFIG_VIDEO_DEV is not set
@@ -740,6 +783,10 @@ CONFIG_USB_ARCH_HAS_OHCI=y
740# CONFIG_USB is not set 783# CONFIG_USB is not set
741 784
742# 785#
786# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
787#
788
789#
743# USB Gadget Support 790# USB Gadget Support
744# 791#
745# CONFIG_USB_GADGET is not set 792# CONFIG_USB_GADGET is not set
@@ -767,10 +814,6 @@ CONFIG_FS_MBCACHE=y
767# CONFIG_REISERFS_FS is not set 814# CONFIG_REISERFS_FS is not set
768# CONFIG_JFS_FS is not set 815# CONFIG_JFS_FS is not set
769CONFIG_FS_POSIX_ACL=y 816CONFIG_FS_POSIX_ACL=y
770
771#
772# XFS support
773#
774# CONFIG_XFS_FS is not set 817# CONFIG_XFS_FS is not set
775# CONFIG_MINIX_FS is not set 818# CONFIG_MINIX_FS is not set
776# CONFIG_ROMFS_FS is not set 819# CONFIG_ROMFS_FS is not set
@@ -779,6 +822,7 @@ CONFIG_INOTIFY=y
779CONFIG_DNOTIFY=y 822CONFIG_DNOTIFY=y
780# CONFIG_AUTOFS_FS is not set 823# CONFIG_AUTOFS_FS is not set
781# CONFIG_AUTOFS4_FS is not set 824# CONFIG_AUTOFS4_FS is not set
825# CONFIG_FUSE_FS is not set
782 826
783# 827#
784# CD-ROM/DVD Filesystems 828# CD-ROM/DVD Filesystems
@@ -798,11 +842,10 @@ CONFIG_DNOTIFY=y
798# 842#
799CONFIG_PROC_FS=y 843CONFIG_PROC_FS=y
800CONFIG_SYSFS=y 844CONFIG_SYSFS=y
801# CONFIG_DEVPTS_FS_XATTR is not set
802CONFIG_TMPFS=y 845CONFIG_TMPFS=y
803# CONFIG_TMPFS_XATTR is not set
804# CONFIG_HUGETLB_PAGE is not set 846# CONFIG_HUGETLB_PAGE is not set
805CONFIG_RAMFS=y 847CONFIG_RAMFS=y
848# CONFIG_RELAYFS_FS is not set
806 849
807# 850#
808# Miscellaneous filesystems 851# Miscellaneous filesystems
@@ -818,6 +861,7 @@ CONFIG_RAMFS=y
818CONFIG_JFFS2_FS=y 861CONFIG_JFFS2_FS=y
819CONFIG_JFFS2_FS_DEBUG=0 862CONFIG_JFFS2_FS_DEBUG=0
820CONFIG_JFFS2_FS_WRITEBUFFER=y 863CONFIG_JFFS2_FS_WRITEBUFFER=y
864# CONFIG_JFFS2_SUMMARY is not set
821# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set 865# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
822CONFIG_JFFS2_ZLIB=y 866CONFIG_JFFS2_ZLIB=y
823CONFIG_JFFS2_RTIME=y 867CONFIG_JFFS2_RTIME=y
@@ -850,6 +894,7 @@ CONFIG_SUNRPC=y
850# CONFIG_NCP_FS is not set 894# CONFIG_NCP_FS is not set
851# CONFIG_CODA_FS is not set 895# CONFIG_CODA_FS is not set
852# CONFIG_AFS_FS is not set 896# CONFIG_AFS_FS is not set
897# CONFIG_9P_FS is not set
853 898
854# 899#
855# Partition Types 900# Partition Types
@@ -888,6 +933,7 @@ CONFIG_MSDOS_PARTITION=y
888CONFIG_DEBUG_KERNEL=y 933CONFIG_DEBUG_KERNEL=y
889CONFIG_MAGIC_SYSRQ=y 934CONFIG_MAGIC_SYSRQ=y
890CONFIG_LOG_BUF_SHIFT=14 935CONFIG_LOG_BUF_SHIFT=14
936CONFIG_DETECT_SOFTLOCKUP=y
891# CONFIG_SCHEDSTATS is not set 937# CONFIG_SCHEDSTATS is not set
892# CONFIG_DEBUG_SLAB is not set 938# CONFIG_DEBUG_SLAB is not set
893# CONFIG_DEBUG_SPINLOCK is not set 939# CONFIG_DEBUG_SPINLOCK is not set
@@ -896,7 +942,9 @@ CONFIG_LOG_BUF_SHIFT=14
896CONFIG_DEBUG_BUGVERBOSE=y 942CONFIG_DEBUG_BUGVERBOSE=y
897# CONFIG_DEBUG_INFO is not set 943# CONFIG_DEBUG_INFO is not set
898# CONFIG_DEBUG_FS is not set 944# CONFIG_DEBUG_FS is not set
945# CONFIG_DEBUG_VM is not set
899CONFIG_FRAME_POINTER=y 946CONFIG_FRAME_POINTER=y
947# CONFIG_RCU_TORTURE_TEST is not set
900CONFIG_DEBUG_USER=y 948CONFIG_DEBUG_USER=y
901# CONFIG_DEBUG_WAITQ is not set 949# CONFIG_DEBUG_WAITQ is not set
902CONFIG_DEBUG_ERRORS=y 950CONFIG_DEBUG_ERRORS=y
@@ -922,6 +970,7 @@ CONFIG_DEBUG_LL=y
922# Library routines 970# Library routines
923# 971#
924# CONFIG_CRC_CCITT is not set 972# CONFIG_CRC_CCITT is not set
973# CONFIG_CRC16 is not set
925CONFIG_CRC32=y 974CONFIG_CRC32=y
926# CONFIG_LIBCRC32C is not set 975# CONFIG_LIBCRC32C is not set
927CONFIG_ZLIB_INFLATE=y 976CONFIG_ZLIB_INFLATE=y
diff --git a/arch/arm/configs/ixdp2800_defconfig b/arch/arm/configs/ixdp2800_defconfig
index 81d3a0606f95..0fddbde85835 100644
--- a/arch/arm/configs/ixdp2800_defconfig
+++ b/arch/arm/configs/ixdp2800_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.13 3# Linux kernel version: 2.6.14-git13
4# Wed Sep 14 10:52:23 2005 4# Thu Nov 10 15:14:56 2005
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -21,6 +21,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
21# General setup 21# General setup
22# 22#
23CONFIG_LOCALVERSION="" 23CONFIG_LOCALVERSION=""
24CONFIG_LOCALVERSION_AUTO=y
24CONFIG_SWAP=y 25CONFIG_SWAP=y
25CONFIG_SYSVIPC=y 26CONFIG_SYSVIPC=y
26# CONFIG_POSIX_MQUEUE is not set 27# CONFIG_POSIX_MQUEUE is not set
@@ -31,6 +32,7 @@ CONFIG_SYSCTL=y
31# CONFIG_HOTPLUG is not set 32# CONFIG_HOTPLUG is not set
32CONFIG_KOBJECT_UEVENT=y 33CONFIG_KOBJECT_UEVENT=y
33# CONFIG_IKCONFIG is not set 34# CONFIG_IKCONFIG is not set
35CONFIG_INITRAMFS_SOURCE=""
34CONFIG_EMBEDDED=y 36CONFIG_EMBEDDED=y
35CONFIG_KALLSYMS=y 37CONFIG_KALLSYMS=y
36# CONFIG_KALLSYMS_ALL is not set 38# CONFIG_KALLSYMS_ALL is not set
@@ -61,6 +63,23 @@ CONFIG_OBSOLETE_MODPARM=y
61CONFIG_KMOD=y 63CONFIG_KMOD=y
62 64
63# 65#
66# Block layer
67#
68
69#
70# IO Schedulers
71#
72CONFIG_IOSCHED_NOOP=y
73CONFIG_IOSCHED_AS=y
74CONFIG_IOSCHED_DEADLINE=y
75CONFIG_IOSCHED_CFQ=y
76CONFIG_DEFAULT_AS=y
77# CONFIG_DEFAULT_DEADLINE is not set
78# CONFIG_DEFAULT_CFQ is not set
79# CONFIG_DEFAULT_NOOP is not set
80CONFIG_DEFAULT_IOSCHED="anticipatory"
81
82#
64# System Type 83# System Type
65# 84#
66# CONFIG_ARCH_CLPS7500 is not set 85# CONFIG_ARCH_CLPS7500 is not set
@@ -82,6 +101,7 @@ CONFIG_ARCH_IXP2000=y
82# CONFIG_ARCH_LH7A40X is not set 101# CONFIG_ARCH_LH7A40X is not set
83# CONFIG_ARCH_OMAP is not set 102# CONFIG_ARCH_OMAP is not set
84# CONFIG_ARCH_VERSATILE is not set 103# CONFIG_ARCH_VERSATILE is not set
104# CONFIG_ARCH_REALVIEW is not set
85# CONFIG_ARCH_IMX is not set 105# CONFIG_ARCH_IMX is not set
86# CONFIG_ARCH_H720X is not set 106# CONFIG_ARCH_H720X is not set
87# CONFIG_ARCH_AAEC2000 is not set 107# CONFIG_ARCH_AAEC2000 is not set
@@ -125,7 +145,6 @@ CONFIG_XSCALE_PMU=y
125CONFIG_ISA_DMA_API=y 145CONFIG_ISA_DMA_API=y
126CONFIG_PCI=y 146CONFIG_PCI=y
127CONFIG_PCI_LEGACY_PROC=y 147CONFIG_PCI_LEGACY_PROC=y
128CONFIG_PCI_NAMES=y
129# CONFIG_PCI_DEBUG is not set 148# CONFIG_PCI_DEBUG is not set
130 149
131# 150#
@@ -145,6 +164,8 @@ CONFIG_FLATMEM_MANUAL=y
145# CONFIG_SPARSEMEM_MANUAL is not set 164# CONFIG_SPARSEMEM_MANUAL is not set
146CONFIG_FLATMEM=y 165CONFIG_FLATMEM=y
147CONFIG_FLAT_NODE_MEM_MAP=y 166CONFIG_FLAT_NODE_MEM_MAP=y
167# CONFIG_SPARSEMEM_STATIC is not set
168CONFIG_SPLIT_PTLOCK_CPUS=4096
148CONFIG_ALIGNMENT_TRAP=y 169CONFIG_ALIGNMENT_TRAP=y
149 170
150# 171#
@@ -163,6 +184,7 @@ CONFIG_CMDLINE="console=ttyS0,9600 root=/dev/nfs ip=bootp mem=64M@0x0"
163# At least one emulation must be selected 184# At least one emulation must be selected
164# 185#
165CONFIG_FPE_NWFPE=y 186CONFIG_FPE_NWFPE=y
187CONFIG_FPE_NWFPE_XP=y
166# CONFIG_FPE_FASTFPE is not set 188# CONFIG_FPE_FASTFPE is not set
167 189
168# 190#
@@ -206,14 +228,19 @@ CONFIG_SYN_COOKIES=y
206# CONFIG_INET_ESP is not set 228# CONFIG_INET_ESP is not set
207# CONFIG_INET_IPCOMP is not set 229# CONFIG_INET_IPCOMP is not set
208# CONFIG_INET_TUNNEL is not set 230# CONFIG_INET_TUNNEL is not set
209# CONFIG_IP_TCPDIAG is not set 231CONFIG_INET_DIAG=y
210# CONFIG_IP_TCPDIAG_IPV6 is not set 232CONFIG_INET_TCP_DIAG=y
211# CONFIG_TCP_CONG_ADVANCED is not set 233# CONFIG_TCP_CONG_ADVANCED is not set
212CONFIG_TCP_CONG_BIC=y 234CONFIG_TCP_CONG_BIC=y
213# CONFIG_IPV6 is not set 235# CONFIG_IPV6 is not set
214# CONFIG_NETFILTER is not set 236# CONFIG_NETFILTER is not set
215 237
216# 238#
239# DCCP Configuration (EXPERIMENTAL)
240#
241# CONFIG_IP_DCCP is not set
242
243#
217# SCTP Configuration (EXPERIMENTAL) 244# SCTP Configuration (EXPERIMENTAL)
218# 245#
219# CONFIG_IP_SCTP is not set 246# CONFIG_IP_SCTP is not set
@@ -229,6 +256,10 @@ CONFIG_TCP_CONG_BIC=y
229# CONFIG_NET_DIVERT is not set 256# CONFIG_NET_DIVERT is not set
230# CONFIG_ECONET is not set 257# CONFIG_ECONET is not set
231# CONFIG_WAN_ROUTER is not set 258# CONFIG_WAN_ROUTER is not set
259
260#
261# QoS and/or fair queueing
262#
232# CONFIG_NET_SCHED is not set 263# CONFIG_NET_SCHED is not set
233# CONFIG_NET_CLS_ROUTE is not set 264# CONFIG_NET_CLS_ROUTE is not set
234 265
@@ -239,6 +270,7 @@ CONFIG_TCP_CONG_BIC=y
239# CONFIG_HAMRADIO is not set 270# CONFIG_HAMRADIO is not set
240# CONFIG_IRDA is not set 271# CONFIG_IRDA is not set
241# CONFIG_BT is not set 272# CONFIG_BT is not set
273# CONFIG_IEEE80211 is not set
242 274
243# 275#
244# Device Drivers 276# Device Drivers
@@ -274,6 +306,7 @@ CONFIG_MTD_BLOCK=y
274# CONFIG_FTL is not set 306# CONFIG_FTL is not set
275# CONFIG_NFTL is not set 307# CONFIG_NFTL is not set
276# CONFIG_INFTL is not set 308# CONFIG_INFTL is not set
309# CONFIG_RFD_FTL is not set
277 310
278# 311#
279# RAM/ROM/Flash chip drivers 312# RAM/ROM/Flash chip drivers
@@ -308,7 +341,6 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y
308# CONFIG_MTD_PHYSMAP is not set 341# CONFIG_MTD_PHYSMAP is not set
309# CONFIG_MTD_ARM_INTEGRATOR is not set 342# CONFIG_MTD_ARM_INTEGRATOR is not set
310CONFIG_MTD_IXP2000=y 343CONFIG_MTD_IXP2000=y
311# CONFIG_MTD_EDB7312 is not set
312# CONFIG_MTD_PCI is not set 344# CONFIG_MTD_PCI is not set
313# CONFIG_MTD_PLATRAM is not set 345# CONFIG_MTD_PLATRAM is not set
314 346
@@ -335,6 +367,11 @@ CONFIG_MTD_IXP2000=y
335# CONFIG_MTD_NAND is not set 367# CONFIG_MTD_NAND is not set
336 368
337# 369#
370# OneNAND Flash Device Drivers
371#
372# CONFIG_MTD_ONENAND is not set
373
374#
338# Parallel port support 375# Parallel port support
339# 376#
340# CONFIG_PARPORT is not set 377# CONFIG_PARPORT is not set
@@ -359,21 +396,13 @@ CONFIG_BLK_DEV_RAM=y
359CONFIG_BLK_DEV_RAM_COUNT=16 396CONFIG_BLK_DEV_RAM_COUNT=16
360CONFIG_BLK_DEV_RAM_SIZE=8192 397CONFIG_BLK_DEV_RAM_SIZE=8192
361CONFIG_BLK_DEV_INITRD=y 398CONFIG_BLK_DEV_INITRD=y
362CONFIG_INITRAMFS_SOURCE=""
363# CONFIG_CDROM_PKTCDVD is not set 399# CONFIG_CDROM_PKTCDVD is not set
364
365#
366# IO Schedulers
367#
368CONFIG_IOSCHED_NOOP=y
369CONFIG_IOSCHED_AS=y
370CONFIG_IOSCHED_DEADLINE=y
371CONFIG_IOSCHED_CFQ=y
372# CONFIG_ATA_OVER_ETH is not set 400# CONFIG_ATA_OVER_ETH is not set
373 401
374# 402#
375# SCSI device support 403# SCSI device support
376# 404#
405# CONFIG_RAID_ATTRS is not set
377# CONFIG_SCSI is not set 406# CONFIG_SCSI is not set
378 407
379# 408#
@@ -411,12 +440,18 @@ CONFIG_DUMMY=y
411# CONFIG_ARCNET is not set 440# CONFIG_ARCNET is not set
412 441
413# 442#
443# PHY device support
444#
445# CONFIG_PHYLIB is not set
446
447#
414# Ethernet (10 or 100Mbit) 448# Ethernet (10 or 100Mbit)
415# 449#
416CONFIG_NET_ETHERNET=y 450CONFIG_NET_ETHERNET=y
417CONFIG_MII=y 451CONFIG_MII=y
418# CONFIG_HAPPYMEAL is not set 452# CONFIG_HAPPYMEAL is not set
419# CONFIG_SUNGEM is not set 453# CONFIG_SUNGEM is not set
454# CONFIG_CASSINI is not set
420# CONFIG_NET_VENDOR_3COM is not set 455# CONFIG_NET_VENDOR_3COM is not set
421# CONFIG_SMC91X is not set 456# CONFIG_SMC91X is not set
422# CONFIG_DM9000 is not set 457# CONFIG_DM9000 is not set
@@ -456,6 +491,7 @@ CONFIG_EEPRO100=y
456# CONFIG_HAMACHI is not set 491# CONFIG_HAMACHI is not set
457# CONFIG_YELLOWFIN is not set 492# CONFIG_YELLOWFIN is not set
458# CONFIG_R8169 is not set 493# CONFIG_R8169 is not set
494# CONFIG_SIS190 is not set
459# CONFIG_SKGE is not set 495# CONFIG_SKGE is not set
460# CONFIG_SK98LIN is not set 496# CONFIG_SK98LIN is not set
461# CONFIG_VIA_VELOCITY is not set 497# CONFIG_VIA_VELOCITY is not set
@@ -465,6 +501,7 @@ CONFIG_EEPRO100=y
465# 501#
466# Ethernet (10000 Mbit) 502# Ethernet (10000 Mbit)
467# 503#
504# CONFIG_CHELSIO_T1 is not set
468# CONFIG_IXGB is not set 505# CONFIG_IXGB is not set
469# CONFIG_S2IO is not set 506# CONFIG_S2IO is not set
470 507
@@ -610,6 +647,7 @@ CONFIG_IXP2000_WATCHDOG=y
610# TPM devices 647# TPM devices
611# 648#
612# CONFIG_TCG_TPM is not set 649# CONFIG_TCG_TPM is not set
650# CONFIG_TELCLOCK is not set
613 651
614# 652#
615# I2C support 653# I2C support
@@ -635,7 +673,6 @@ CONFIG_I2C_ALGOBIT=y
635# CONFIG_I2C_I801 is not set 673# CONFIG_I2C_I801 is not set
636# CONFIG_I2C_I810 is not set 674# CONFIG_I2C_I810 is not set
637# CONFIG_I2C_PIIX4 is not set 675# CONFIG_I2C_PIIX4 is not set
638# CONFIG_I2C_ISA is not set
639CONFIG_I2C_IXP2000=y 676CONFIG_I2C_IXP2000=y
640# CONFIG_I2C_NFORCE2 is not set 677# CONFIG_I2C_NFORCE2 is not set
641# CONFIG_I2C_PARPORT_LIGHT is not set 678# CONFIG_I2C_PARPORT_LIGHT is not set
@@ -650,7 +687,6 @@ CONFIG_I2C_IXP2000=y
650# CONFIG_I2C_VIAPRO is not set 687# CONFIG_I2C_VIAPRO is not set
651# CONFIG_I2C_VOODOO3 is not set 688# CONFIG_I2C_VOODOO3 is not set
652# CONFIG_I2C_PCA_ISA is not set 689# CONFIG_I2C_PCA_ISA is not set
653CONFIG_I2C_SENSOR=y
654 690
655# 691#
656# Miscellaneous I2C Chip support 692# Miscellaneous I2C Chip support
@@ -663,6 +699,7 @@ CONFIG_SENSORS_EEPROM=y
663# CONFIG_SENSORS_PCF8591 is not set 699# CONFIG_SENSORS_PCF8591 is not set
664# CONFIG_SENSORS_RTC8564 is not set 700# CONFIG_SENSORS_RTC8564 is not set
665# CONFIG_SENSORS_MAX6875 is not set 701# CONFIG_SENSORS_MAX6875 is not set
702# CONFIG_RTC_X1205_I2C is not set
666# CONFIG_I2C_DEBUG_CORE is not set 703# CONFIG_I2C_DEBUG_CORE is not set
667# CONFIG_I2C_DEBUG_ALGO is not set 704# CONFIG_I2C_DEBUG_ALGO is not set
668# CONFIG_I2C_DEBUG_BUS is not set 705# CONFIG_I2C_DEBUG_BUS is not set
@@ -672,6 +709,7 @@ CONFIG_SENSORS_EEPROM=y
672# Hardware Monitoring support 709# Hardware Monitoring support
673# 710#
674CONFIG_HWMON=y 711CONFIG_HWMON=y
712# CONFIG_HWMON_VID is not set
675# CONFIG_SENSORS_ADM1021 is not set 713# CONFIG_SENSORS_ADM1021 is not set
676# CONFIG_SENSORS_ADM1025 is not set 714# CONFIG_SENSORS_ADM1025 is not set
677# CONFIG_SENSORS_ADM1026 is not set 715# CONFIG_SENSORS_ADM1026 is not set
@@ -702,6 +740,7 @@ CONFIG_HWMON=y
702# CONFIG_SENSORS_SMSC47B397 is not set 740# CONFIG_SENSORS_SMSC47B397 is not set
703# CONFIG_SENSORS_VIA686A is not set 741# CONFIG_SENSORS_VIA686A is not set
704# CONFIG_SENSORS_W83781D is not set 742# CONFIG_SENSORS_W83781D is not set
743# CONFIG_SENSORS_W83792D is not set
705# CONFIG_SENSORS_W83L785TS is not set 744# CONFIG_SENSORS_W83L785TS is not set
706# CONFIG_SENSORS_W83627HF is not set 745# CONFIG_SENSORS_W83627HF is not set
707# CONFIG_SENSORS_W83627EHF is not set 746# CONFIG_SENSORS_W83627EHF is not set
@@ -712,6 +751,10 @@ CONFIG_HWMON=y
712# 751#
713 752
714# 753#
754# Multimedia Capabilities Port drivers
755#
756
757#
715# Multimedia devices 758# Multimedia devices
716# 759#
717# CONFIG_VIDEO_DEV is not set 760# CONFIG_VIDEO_DEV is not set
@@ -739,6 +782,10 @@ CONFIG_USB_ARCH_HAS_OHCI=y
739# CONFIG_USB is not set 782# CONFIG_USB is not set
740 783
741# 784#
785# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
786#
787
788#
742# USB Gadget Support 789# USB Gadget Support
743# 790#
744# CONFIG_USB_GADGET is not set 791# CONFIG_USB_GADGET is not set
@@ -766,10 +813,6 @@ CONFIG_FS_MBCACHE=y
766# CONFIG_REISERFS_FS is not set 813# CONFIG_REISERFS_FS is not set
767# CONFIG_JFS_FS is not set 814# CONFIG_JFS_FS is not set
768CONFIG_FS_POSIX_ACL=y 815CONFIG_FS_POSIX_ACL=y
769
770#
771# XFS support
772#
773# CONFIG_XFS_FS is not set 816# CONFIG_XFS_FS is not set
774# CONFIG_MINIX_FS is not set 817# CONFIG_MINIX_FS is not set
775# CONFIG_ROMFS_FS is not set 818# CONFIG_ROMFS_FS is not set
@@ -778,6 +821,7 @@ CONFIG_INOTIFY=y
778CONFIG_DNOTIFY=y 821CONFIG_DNOTIFY=y
779# CONFIG_AUTOFS_FS is not set 822# CONFIG_AUTOFS_FS is not set
780# CONFIG_AUTOFS4_FS is not set 823# CONFIG_AUTOFS4_FS is not set
824# CONFIG_FUSE_FS is not set
781 825
782# 826#
783# CD-ROM/DVD Filesystems 827# CD-ROM/DVD Filesystems
@@ -797,11 +841,10 @@ CONFIG_DNOTIFY=y
797# 841#
798CONFIG_PROC_FS=y 842CONFIG_PROC_FS=y
799CONFIG_SYSFS=y 843CONFIG_SYSFS=y
800# CONFIG_DEVPTS_FS_XATTR is not set
801CONFIG_TMPFS=y 844CONFIG_TMPFS=y
802# CONFIG_TMPFS_XATTR is not set
803# CONFIG_HUGETLB_PAGE is not set 845# CONFIG_HUGETLB_PAGE is not set
804CONFIG_RAMFS=y 846CONFIG_RAMFS=y
847# CONFIG_RELAYFS_FS is not set
805 848
806# 849#
807# Miscellaneous filesystems 850# Miscellaneous filesystems
@@ -817,6 +860,7 @@ CONFIG_RAMFS=y
817CONFIG_JFFS2_FS=y 860CONFIG_JFFS2_FS=y
818CONFIG_JFFS2_FS_DEBUG=0 861CONFIG_JFFS2_FS_DEBUG=0
819CONFIG_JFFS2_FS_WRITEBUFFER=y 862CONFIG_JFFS2_FS_WRITEBUFFER=y
863# CONFIG_JFFS2_SUMMARY is not set
820# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set 864# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
821CONFIG_JFFS2_ZLIB=y 865CONFIG_JFFS2_ZLIB=y
822CONFIG_JFFS2_RTIME=y 866CONFIG_JFFS2_RTIME=y
@@ -849,6 +893,7 @@ CONFIG_SUNRPC=y
849# CONFIG_NCP_FS is not set 893# CONFIG_NCP_FS is not set
850# CONFIG_CODA_FS is not set 894# CONFIG_CODA_FS is not set
851# CONFIG_AFS_FS is not set 895# CONFIG_AFS_FS is not set
896# CONFIG_9P_FS is not set
852 897
853# 898#
854# Partition Types 899# Partition Types
@@ -887,6 +932,7 @@ CONFIG_MSDOS_PARTITION=y
887CONFIG_DEBUG_KERNEL=y 932CONFIG_DEBUG_KERNEL=y
888CONFIG_MAGIC_SYSRQ=y 933CONFIG_MAGIC_SYSRQ=y
889CONFIG_LOG_BUF_SHIFT=14 934CONFIG_LOG_BUF_SHIFT=14
935CONFIG_DETECT_SOFTLOCKUP=y
890# CONFIG_SCHEDSTATS is not set 936# CONFIG_SCHEDSTATS is not set
891# CONFIG_DEBUG_SLAB is not set 937# CONFIG_DEBUG_SLAB is not set
892# CONFIG_DEBUG_SPINLOCK is not set 938# CONFIG_DEBUG_SPINLOCK is not set
@@ -895,7 +941,9 @@ CONFIG_LOG_BUF_SHIFT=14
895CONFIG_DEBUG_BUGVERBOSE=y 941CONFIG_DEBUG_BUGVERBOSE=y
896# CONFIG_DEBUG_INFO is not set 942# CONFIG_DEBUG_INFO is not set
897# CONFIG_DEBUG_FS is not set 943# CONFIG_DEBUG_FS is not set
944# CONFIG_DEBUG_VM is not set
898CONFIG_FRAME_POINTER=y 945CONFIG_FRAME_POINTER=y
946# CONFIG_RCU_TORTURE_TEST is not set
899CONFIG_DEBUG_USER=y 947CONFIG_DEBUG_USER=y
900# CONFIG_DEBUG_WAITQ is not set 948# CONFIG_DEBUG_WAITQ is not set
901CONFIG_DEBUG_ERRORS=y 949CONFIG_DEBUG_ERRORS=y
@@ -921,6 +969,7 @@ CONFIG_DEBUG_LL=y
921# Library routines 969# Library routines
922# 970#
923# CONFIG_CRC_CCITT is not set 971# CONFIG_CRC_CCITT is not set
972# CONFIG_CRC16 is not set
924CONFIG_CRC32=y 973CONFIG_CRC32=y
925# CONFIG_LIBCRC32C is not set 974# CONFIG_LIBCRC32C is not set
926CONFIG_ZLIB_INFLATE=y 975CONFIG_ZLIB_INFLATE=y
diff --git a/arch/arm/configs/ixdp2801_defconfig b/arch/arm/configs/ixdp2801_defconfig
index 66ac0885df3e..89b9aa06aa91 100644
--- a/arch/arm/configs/ixdp2801_defconfig
+++ b/arch/arm/configs/ixdp2801_defconfig
@@ -1,7 +1,7 @@
1# 1#
2# Automatically generated make config: don't edit 2# Automatically generated make config: don't edit
3# Linux kernel version: 2.6.13 3# Linux kernel version: 2.6.14-git13
4# Wed Sep 14 10:52:16 2005 4# Thu Nov 10 15:15:03 2005
5# 5#
6CONFIG_ARM=y 6CONFIG_ARM=y
7CONFIG_MMU=y 7CONFIG_MMU=y
@@ -21,6 +21,7 @@ CONFIG_INIT_ENV_ARG_LIMIT=32
21# General setup 21# General setup
22# 22#
23CONFIG_LOCALVERSION="" 23CONFIG_LOCALVERSION=""
24CONFIG_LOCALVERSION_AUTO=y
24CONFIG_SWAP=y 25CONFIG_SWAP=y
25CONFIG_SYSVIPC=y 26CONFIG_SYSVIPC=y
26# CONFIG_POSIX_MQUEUE is not set 27# CONFIG_POSIX_MQUEUE is not set
@@ -31,6 +32,7 @@ CONFIG_SYSCTL=y
31# CONFIG_HOTPLUG is not set 32# CONFIG_HOTPLUG is not set
32CONFIG_KOBJECT_UEVENT=y 33CONFIG_KOBJECT_UEVENT=y
33# CONFIG_IKCONFIG is not set 34# CONFIG_IKCONFIG is not set
35CONFIG_INITRAMFS_SOURCE=""
34CONFIG_EMBEDDED=y 36CONFIG_EMBEDDED=y
35CONFIG_KALLSYMS=y 37CONFIG_KALLSYMS=y
36# CONFIG_KALLSYMS_ALL is not set 38# CONFIG_KALLSYMS_ALL is not set
@@ -61,6 +63,23 @@ CONFIG_OBSOLETE_MODPARM=y
61CONFIG_KMOD=y 63CONFIG_KMOD=y
62 64
63# 65#
66# Block layer
67#
68
69#
70# IO Schedulers
71#
72CONFIG_IOSCHED_NOOP=y
73CONFIG_IOSCHED_AS=y
74CONFIG_IOSCHED_DEADLINE=y
75CONFIG_IOSCHED_CFQ=y
76CONFIG_DEFAULT_AS=y
77# CONFIG_DEFAULT_DEADLINE is not set
78# CONFIG_DEFAULT_CFQ is not set
79# CONFIG_DEFAULT_NOOP is not set
80CONFIG_DEFAULT_IOSCHED="anticipatory"
81
82#
64# System Type 83# System Type
65# 84#
66# CONFIG_ARCH_CLPS7500 is not set 85# CONFIG_ARCH_CLPS7500 is not set
@@ -82,6 +101,7 @@ CONFIG_ARCH_IXP2000=y
82# CONFIG_ARCH_LH7A40X is not set 101# CONFIG_ARCH_LH7A40X is not set
83# CONFIG_ARCH_OMAP is not set 102# CONFIG_ARCH_OMAP is not set
84# CONFIG_ARCH_VERSATILE is not set 103# CONFIG_ARCH_VERSATILE is not set
104# CONFIG_ARCH_REALVIEW is not set
85# CONFIG_ARCH_IMX is not set 105# CONFIG_ARCH_IMX is not set
86# CONFIG_ARCH_H720X is not set 106# CONFIG_ARCH_H720X is not set
87# CONFIG_ARCH_AAEC2000 is not set 107# CONFIG_ARCH_AAEC2000 is not set
@@ -125,7 +145,6 @@ CONFIG_XSCALE_PMU=y
125CONFIG_ISA_DMA_API=y 145CONFIG_ISA_DMA_API=y
126CONFIG_PCI=y 146CONFIG_PCI=y
127CONFIG_PCI_LEGACY_PROC=y 147CONFIG_PCI_LEGACY_PROC=y
128CONFIG_PCI_NAMES=y
129# CONFIG_PCI_DEBUG is not set 148# CONFIG_PCI_DEBUG is not set
130 149
131# 150#
@@ -145,6 +164,8 @@ CONFIG_FLATMEM_MANUAL=y
145# CONFIG_SPARSEMEM_MANUAL is not set 164# CONFIG_SPARSEMEM_MANUAL is not set
146CONFIG_FLATMEM=y 165CONFIG_FLATMEM=y
147CONFIG_FLAT_NODE_MEM_MAP=y 166CONFIG_FLAT_NODE_MEM_MAP=y
167# CONFIG_SPARSEMEM_STATIC is not set
168CONFIG_SPLIT_PTLOCK_CPUS=4096
148CONFIG_ALIGNMENT_TRAP=y 169CONFIG_ALIGNMENT_TRAP=y
149 170
150# 171#
@@ -163,6 +184,7 @@ CONFIG_CMDLINE="console=ttyS0,115200 root=/dev/nfs ip=bootp mem=64M@0x0 pci=firm
163# At least one emulation must be selected 184# At least one emulation must be selected
164# 185#
165CONFIG_FPE_NWFPE=y 186CONFIG_FPE_NWFPE=y
187CONFIG_FPE_NWFPE_XP=y
166# CONFIG_FPE_FASTFPE is not set 188# CONFIG_FPE_FASTFPE is not set
167 189
168# 190#
@@ -206,14 +228,19 @@ CONFIG_SYN_COOKIES=y
206# CONFIG_INET_ESP is not set 228# CONFIG_INET_ESP is not set
207# CONFIG_INET_IPCOMP is not set 229# CONFIG_INET_IPCOMP is not set
208# CONFIG_INET_TUNNEL is not set 230# CONFIG_INET_TUNNEL is not set
209# CONFIG_IP_TCPDIAG is not set 231CONFIG_INET_DIAG=y
210# CONFIG_IP_TCPDIAG_IPV6 is not set 232CONFIG_INET_TCP_DIAG=y
211# CONFIG_TCP_CONG_ADVANCED is not set 233# CONFIG_TCP_CONG_ADVANCED is not set
212CONFIG_TCP_CONG_BIC=y 234CONFIG_TCP_CONG_BIC=y
213# CONFIG_IPV6 is not set 235# CONFIG_IPV6 is not set
214# CONFIG_NETFILTER is not set 236# CONFIG_NETFILTER is not set
215 237
216# 238#
239# DCCP Configuration (EXPERIMENTAL)
240#
241# CONFIG_IP_DCCP is not set
242
243#
217# SCTP Configuration (EXPERIMENTAL) 244# SCTP Configuration (EXPERIMENTAL)
218# 245#
219# CONFIG_IP_SCTP is not set 246# CONFIG_IP_SCTP is not set
@@ -229,6 +256,10 @@ CONFIG_TCP_CONG_BIC=y
229# CONFIG_NET_DIVERT is not set 256# CONFIG_NET_DIVERT is not set
230# CONFIG_ECONET is not set 257# CONFIG_ECONET is not set
231# CONFIG_WAN_ROUTER is not set 258# CONFIG_WAN_ROUTER is not set
259
260#
261# QoS and/or fair queueing
262#
232# CONFIG_NET_SCHED is not set 263# CONFIG_NET_SCHED is not set
233# CONFIG_NET_CLS_ROUTE is not set 264# CONFIG_NET_CLS_ROUTE is not set
234 265
@@ -239,6 +270,7 @@ CONFIG_TCP_CONG_BIC=y
239# CONFIG_HAMRADIO is not set 270# CONFIG_HAMRADIO is not set
240# CONFIG_IRDA is not set 271# CONFIG_IRDA is not set
241# CONFIG_BT is not set 272# CONFIG_BT is not set
273# CONFIG_IEEE80211 is not set
242 274
243# 275#
244# Device Drivers 276# Device Drivers
@@ -274,6 +306,7 @@ CONFIG_MTD_BLOCK=y
274# CONFIG_FTL is not set 306# CONFIG_FTL is not set
275# CONFIG_NFTL is not set 307# CONFIG_NFTL is not set
276# CONFIG_INFTL is not set 308# CONFIG_INFTL is not set
309# CONFIG_RFD_FTL is not set
277 310
278# 311#
279# RAM/ROM/Flash chip drivers 312# RAM/ROM/Flash chip drivers
@@ -308,7 +341,6 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y
308# CONFIG_MTD_PHYSMAP is not set 341# CONFIG_MTD_PHYSMAP is not set
309# CONFIG_MTD_ARM_INTEGRATOR is not set 342# CONFIG_MTD_ARM_INTEGRATOR is not set
310CONFIG_MTD_IXP2000=y 343CONFIG_MTD_IXP2000=y
311# CONFIG_MTD_EDB7312 is not set
312# CONFIG_MTD_PCI is not set 344# CONFIG_MTD_PCI is not set
313# CONFIG_MTD_PLATRAM is not set 345# CONFIG_MTD_PLATRAM is not set
314 346
@@ -335,6 +367,11 @@ CONFIG_MTD_IXP2000=y
335# CONFIG_MTD_NAND is not set 367# CONFIG_MTD_NAND is not set
336 368
337# 369#
370# OneNAND Flash Device Drivers
371#
372# CONFIG_MTD_ONENAND is not set
373
374#
338# Parallel port support 375# Parallel port support
339# 376#
340# CONFIG_PARPORT is not set 377# CONFIG_PARPORT is not set
@@ -359,21 +396,13 @@ CONFIG_BLK_DEV_RAM=y
359CONFIG_BLK_DEV_RAM_COUNT=16 396CONFIG_BLK_DEV_RAM_COUNT=16
360CONFIG_BLK_DEV_RAM_SIZE=8192 397CONFIG_BLK_DEV_RAM_SIZE=8192
361CONFIG_BLK_DEV_INITRD=y 398CONFIG_BLK_DEV_INITRD=y
362CONFIG_INITRAMFS_SOURCE=""
363# CONFIG_CDROM_PKTCDVD is not set 399# CONFIG_CDROM_PKTCDVD is not set
364
365#
366# IO Schedulers
367#
368CONFIG_IOSCHED_NOOP=y
369CONFIG_IOSCHED_AS=y
370CONFIG_IOSCHED_DEADLINE=y
371CONFIG_IOSCHED_CFQ=y
372# CONFIG_ATA_OVER_ETH is not set 400# CONFIG_ATA_OVER_ETH is not set
373 401
374# 402#
375# SCSI device support 403# SCSI device support
376# 404#
405# CONFIG_RAID_ATTRS is not set
377# CONFIG_SCSI is not set 406# CONFIG_SCSI is not set
378 407
379# 408#
@@ -411,12 +440,18 @@ CONFIG_DUMMY=y
411# CONFIG_ARCNET is not set 440# CONFIG_ARCNET is not set
412 441
413# 442#
443# PHY device support
444#
445# CONFIG_PHYLIB is not set
446
447#
414# Ethernet (10 or 100Mbit) 448# Ethernet (10 or 100Mbit)
415# 449#
416CONFIG_NET_ETHERNET=y 450CONFIG_NET_ETHERNET=y
417CONFIG_MII=y 451CONFIG_MII=y
418# CONFIG_HAPPYMEAL is not set 452# CONFIG_HAPPYMEAL is not set
419# CONFIG_SUNGEM is not set 453# CONFIG_SUNGEM is not set
454# CONFIG_CASSINI is not set
420# CONFIG_NET_VENDOR_3COM is not set 455# CONFIG_NET_VENDOR_3COM is not set
421# CONFIG_SMC91X is not set 456# CONFIG_SMC91X is not set
422# CONFIG_DM9000 is not set 457# CONFIG_DM9000 is not set
@@ -457,6 +492,7 @@ CONFIG_EEPRO100=y
457# CONFIG_HAMACHI is not set 492# CONFIG_HAMACHI is not set
458# CONFIG_YELLOWFIN is not set 493# CONFIG_YELLOWFIN is not set
459# CONFIG_R8169 is not set 494# CONFIG_R8169 is not set
495# CONFIG_SIS190 is not set
460# CONFIG_SKGE is not set 496# CONFIG_SKGE is not set
461# CONFIG_SK98LIN is not set 497# CONFIG_SK98LIN is not set
462# CONFIG_VIA_VELOCITY is not set 498# CONFIG_VIA_VELOCITY is not set
@@ -466,6 +502,7 @@ CONFIG_EEPRO100=y
466# 502#
467# Ethernet (10000 Mbit) 503# Ethernet (10000 Mbit)
468# 504#
505# CONFIG_CHELSIO_T1 is not set
469# CONFIG_IXGB is not set 506# CONFIG_IXGB is not set
470# CONFIG_S2IO is not set 507# CONFIG_S2IO is not set
471 508
@@ -611,6 +648,7 @@ CONFIG_IXP2000_WATCHDOG=y
611# TPM devices 648# TPM devices
612# 649#
613# CONFIG_TCG_TPM is not set 650# CONFIG_TCG_TPM is not set
651# CONFIG_TELCLOCK is not set
614 652
615# 653#
616# I2C support 654# I2C support
@@ -636,7 +674,6 @@ CONFIG_I2C_ALGOBIT=y
636# CONFIG_I2C_I801 is not set 674# CONFIG_I2C_I801 is not set
637# CONFIG_I2C_I810 is not set 675# CONFIG_I2C_I810 is not set
638# CONFIG_I2C_PIIX4 is not set 676# CONFIG_I2C_PIIX4 is not set
639# CONFIG_I2C_ISA is not set
640CONFIG_I2C_IXP2000=y 677CONFIG_I2C_IXP2000=y
641# CONFIG_I2C_NFORCE2 is not set 678# CONFIG_I2C_NFORCE2 is not set
642# CONFIG_I2C_PARPORT_LIGHT is not set 679# CONFIG_I2C_PARPORT_LIGHT is not set
@@ -651,7 +688,6 @@ CONFIG_I2C_IXP2000=y
651# CONFIG_I2C_VIAPRO is not set 688# CONFIG_I2C_VIAPRO is not set
652# CONFIG_I2C_VOODOO3 is not set 689# CONFIG_I2C_VOODOO3 is not set
653# CONFIG_I2C_PCA_ISA is not set 690# CONFIG_I2C_PCA_ISA is not set
654CONFIG_I2C_SENSOR=y
655 691
656# 692#
657# Miscellaneous I2C Chip support 693# Miscellaneous I2C Chip support
@@ -664,6 +700,7 @@ CONFIG_SENSORS_EEPROM=y
664# CONFIG_SENSORS_PCF8591 is not set 700# CONFIG_SENSORS_PCF8591 is not set
665# CONFIG_SENSORS_RTC8564 is not set 701# CONFIG_SENSORS_RTC8564 is not set
666# CONFIG_SENSORS_MAX6875 is not set 702# CONFIG_SENSORS_MAX6875 is not set
703# CONFIG_RTC_X1205_I2C is not set
667# CONFIG_I2C_DEBUG_CORE is not set 704# CONFIG_I2C_DEBUG_CORE is not set
668# CONFIG_I2C_DEBUG_ALGO is not set 705# CONFIG_I2C_DEBUG_ALGO is not set
669# CONFIG_I2C_DEBUG_BUS is not set 706# CONFIG_I2C_DEBUG_BUS is not set
@@ -673,6 +710,7 @@ CONFIG_SENSORS_EEPROM=y
673# Hardware Monitoring support 710# Hardware Monitoring support
674# 711#
675CONFIG_HWMON=y 712CONFIG_HWMON=y
713# CONFIG_HWMON_VID is not set
676# CONFIG_SENSORS_ADM1021 is not set 714# CONFIG_SENSORS_ADM1021 is not set
677# CONFIG_SENSORS_ADM1025 is not set 715# CONFIG_SENSORS_ADM1025 is not set
678# CONFIG_SENSORS_ADM1026 is not set 716# CONFIG_SENSORS_ADM1026 is not set
@@ -703,6 +741,7 @@ CONFIG_HWMON=y
703# CONFIG_SENSORS_SMSC47B397 is not set 741# CONFIG_SENSORS_SMSC47B397 is not set
704# CONFIG_SENSORS_VIA686A is not set 742# CONFIG_SENSORS_VIA686A is not set
705# CONFIG_SENSORS_W83781D is not set 743# CONFIG_SENSORS_W83781D is not set
744# CONFIG_SENSORS_W83792D is not set
706# CONFIG_SENSORS_W83L785TS is not set 745# CONFIG_SENSORS_W83L785TS is not set
707# CONFIG_SENSORS_W83627HF is not set 746# CONFIG_SENSORS_W83627HF is not set
708# CONFIG_SENSORS_W83627EHF is not set 747# CONFIG_SENSORS_W83627EHF is not set
@@ -713,6 +752,10 @@ CONFIG_HWMON=y
713# 752#
714 753
715# 754#
755# Multimedia Capabilities Port drivers
756#
757
758#
716# Multimedia devices 759# Multimedia devices
717# 760#
718# CONFIG_VIDEO_DEV is not set 761# CONFIG_VIDEO_DEV is not set
@@ -740,6 +783,10 @@ CONFIG_USB_ARCH_HAS_OHCI=y
740# CONFIG_USB is not set 783# CONFIG_USB is not set
741 784
742# 785#
786# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
787#
788
789#
743# USB Gadget Support 790# USB Gadget Support
744# 791#
745# CONFIG_USB_GADGET is not set 792# CONFIG_USB_GADGET is not set
@@ -767,10 +814,6 @@ CONFIG_FS_MBCACHE=y
767# CONFIG_REISERFS_FS is not set 814# CONFIG_REISERFS_FS is not set
768# CONFIG_JFS_FS is not set 815# CONFIG_JFS_FS is not set
769CONFIG_FS_POSIX_ACL=y 816CONFIG_FS_POSIX_ACL=y
770
771#
772# XFS support
773#
774# CONFIG_XFS_FS is not set 817# CONFIG_XFS_FS is not set
775# CONFIG_MINIX_FS is not set 818# CONFIG_MINIX_FS is not set
776# CONFIG_ROMFS_FS is not set 819# CONFIG_ROMFS_FS is not set
@@ -779,6 +822,7 @@ CONFIG_INOTIFY=y
779CONFIG_DNOTIFY=y 822CONFIG_DNOTIFY=y
780# CONFIG_AUTOFS_FS is not set 823# CONFIG_AUTOFS_FS is not set
781# CONFIG_AUTOFS4_FS is not set 824# CONFIG_AUTOFS4_FS is not set
825# CONFIG_FUSE_FS is not set
782 826
783# 827#
784# CD-ROM/DVD Filesystems 828# CD-ROM/DVD Filesystems
@@ -798,11 +842,10 @@ CONFIG_DNOTIFY=y
798# 842#
799CONFIG_PROC_FS=y 843CONFIG_PROC_FS=y
800CONFIG_SYSFS=y 844CONFIG_SYSFS=y
801# CONFIG_DEVPTS_FS_XATTR is not set
802CONFIG_TMPFS=y 845CONFIG_TMPFS=y
803# CONFIG_TMPFS_XATTR is not set
804# CONFIG_HUGETLB_PAGE is not set 846# CONFIG_HUGETLB_PAGE is not set
805CONFIG_RAMFS=y 847CONFIG_RAMFS=y
848# CONFIG_RELAYFS_FS is not set
806 849
807# 850#
808# Miscellaneous filesystems 851# Miscellaneous filesystems
@@ -818,6 +861,7 @@ CONFIG_RAMFS=y
818CONFIG_JFFS2_FS=y 861CONFIG_JFFS2_FS=y
819CONFIG_JFFS2_FS_DEBUG=0 862CONFIG_JFFS2_FS_DEBUG=0
820CONFIG_JFFS2_FS_WRITEBUFFER=y 863CONFIG_JFFS2_FS_WRITEBUFFER=y
864# CONFIG_JFFS2_SUMMARY is not set
821# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set 865# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
822CONFIG_JFFS2_ZLIB=y 866CONFIG_JFFS2_ZLIB=y
823CONFIG_JFFS2_RTIME=y 867CONFIG_JFFS2_RTIME=y
@@ -850,6 +894,7 @@ CONFIG_SUNRPC=y
850# CONFIG_NCP_FS is not set 894# CONFIG_NCP_FS is not set
851# CONFIG_CODA_FS is not set 895# CONFIG_CODA_FS is not set
852# CONFIG_AFS_FS is not set 896# CONFIG_AFS_FS is not set
897# CONFIG_9P_FS is not set
853 898
854# 899#
855# Partition Types 900# Partition Types
@@ -888,6 +933,7 @@ CONFIG_MSDOS_PARTITION=y
888CONFIG_DEBUG_KERNEL=y 933CONFIG_DEBUG_KERNEL=y
889CONFIG_MAGIC_SYSRQ=y 934CONFIG_MAGIC_SYSRQ=y
890CONFIG_LOG_BUF_SHIFT=14 935CONFIG_LOG_BUF_SHIFT=14
936CONFIG_DETECT_SOFTLOCKUP=y
891# CONFIG_SCHEDSTATS is not set 937# CONFIG_SCHEDSTATS is not set
892# CONFIG_DEBUG_SLAB is not set 938# CONFIG_DEBUG_SLAB is not set
893# CONFIG_DEBUG_SPINLOCK is not set 939# CONFIG_DEBUG_SPINLOCK is not set
@@ -896,7 +942,9 @@ CONFIG_LOG_BUF_SHIFT=14
896CONFIG_DEBUG_BUGVERBOSE=y 942CONFIG_DEBUG_BUGVERBOSE=y
897# CONFIG_DEBUG_INFO is not set 943# CONFIG_DEBUG_INFO is not set
898# CONFIG_DEBUG_FS is not set 944# CONFIG_DEBUG_FS is not set
945# CONFIG_DEBUG_VM is not set
899CONFIG_FRAME_POINTER=y 946CONFIG_FRAME_POINTER=y
947# CONFIG_RCU_TORTURE_TEST is not set
900CONFIG_DEBUG_USER=y 948CONFIG_DEBUG_USER=y
901# CONFIG_DEBUG_WAITQ is not set 949# CONFIG_DEBUG_WAITQ is not set
902CONFIG_DEBUG_ERRORS=y 950CONFIG_DEBUG_ERRORS=y
@@ -922,6 +970,7 @@ CONFIG_DEBUG_LL=y
922# Library routines 970# Library routines
923# 971#
924# CONFIG_CRC_CCITT is not set 972# CONFIG_CRC_CCITT is not set
973# CONFIG_CRC16 is not set
925CONFIG_CRC32=y 974CONFIG_CRC32=y
926# CONFIG_LIBCRC32C is not set 975# CONFIG_LIBCRC32C is not set
927CONFIG_ZLIB_INFLATE=y 976CONFIG_ZLIB_INFLATE=y
diff --git a/arch/arm/lib/csumpartial.S b/arch/arm/lib/csumpartial.S
index fe797cf320bb..a78dae5a7b28 100644
--- a/arch/arm/lib/csumpartial.S
+++ b/arch/arm/lib/csumpartial.S
@@ -26,7 +26,7 @@ td1 .req r4 @ save before use
26td2 .req r5 @ save before use 26td2 .req r5 @ save before use
27td3 .req lr 27td3 .req lr
28 28
29.zero: mov r0, sum 29.Lzero: mov r0, sum
30 add sp, sp, #4 30 add sp, sp, #4
31 ldr pc, [sp], #4 31 ldr pc, [sp], #4
32 32
@@ -34,8 +34,8 @@ td3 .req lr
34 * Handle 0 to 7 bytes, with any alignment of source and 34 * Handle 0 to 7 bytes, with any alignment of source and
35 * destination pointers. Note that when we get here, C = 0 35 * destination pointers. Note that when we get here, C = 0
36 */ 36 */
37.less8: teq len, #0 @ check for zero count 37.Lless8: teq len, #0 @ check for zero count
38 beq .zero 38 beq .Lzero
39 39
40 /* we must have at least one byte. */ 40 /* we must have at least one byte. */
41 tst buf, #1 @ odd address? 41 tst buf, #1 @ odd address?
@@ -44,12 +44,12 @@ td3 .req lr
44 subne len, len, #1 44 subne len, len, #1
45 adcnes sum, sum, td0, put_byte_1 45 adcnes sum, sum, td0, put_byte_1
46 46
47.less4: tst len, #6 47.Lless4: tst len, #6
48 beq .less8_byte 48 beq .Lless8_byte
49 49
50 /* we are now half-word aligned */ 50 /* we are now half-word aligned */
51 51
52.less8_wordlp: 52.Lless8_wordlp:
53#if __LINUX_ARM_ARCH__ >= 4 53#if __LINUX_ARM_ARCH__ >= 4
54 ldrh td0, [buf], #2 54 ldrh td0, [buf], #2
55 sub len, len, #2 55 sub len, len, #2
@@ -65,19 +65,19 @@ td3 .req lr
65#endif 65#endif
66 adcs sum, sum, td0 66 adcs sum, sum, td0
67 tst len, #6 67 tst len, #6
68 bne .less8_wordlp 68 bne .Lless8_wordlp
69 69
70.less8_byte: tst len, #1 @ odd number of bytes 70.Lless8_byte: tst len, #1 @ odd number of bytes
71 ldrneb td0, [buf], #1 @ include last byte 71 ldrneb td0, [buf], #1 @ include last byte
72 adcnes sum, sum, td0, put_byte_0 @ update checksum 72 adcnes sum, sum, td0, put_byte_0 @ update checksum
73 73
74.done: adc r0, sum, #0 @ collect up the last carry 74.Ldone: adc r0, sum, #0 @ collect up the last carry
75 ldr td0, [sp], #4 75 ldr td0, [sp], #4
76 tst td0, #1 @ check buffer alignment 76 tst td0, #1 @ check buffer alignment
77 movne r0, r0, ror #8 @ rotate checksum by 8 bits 77 movne r0, r0, ror #8 @ rotate checksum by 8 bits
78 ldr pc, [sp], #4 @ return 78 ldr pc, [sp], #4 @ return
79 79
80.not_aligned: tst buf, #1 @ odd address 80.Lnot_aligned: tst buf, #1 @ odd address
81 ldrneb td0, [buf], #1 @ make even 81 ldrneb td0, [buf], #1 @ make even
82 subne len, len, #1 82 subne len, len, #1
83 adcnes sum, sum, td0, put_byte_1 @ update checksum 83 adcnes sum, sum, td0, put_byte_1 @ update checksum
@@ -102,14 +102,14 @@ td3 .req lr
102ENTRY(csum_partial) 102ENTRY(csum_partial)
103 stmfd sp!, {buf, lr} 103 stmfd sp!, {buf, lr}
104 cmp len, #8 @ Ensure that we have at least 104 cmp len, #8 @ Ensure that we have at least
105 blo .less8 @ 8 bytes to copy. 105 blo .Lless8 @ 8 bytes to copy.
106 106
107 tst buf, #1 107 tst buf, #1
108 movne sum, sum, ror #8 108 movne sum, sum, ror #8
109 109
110 adds sum, sum, #0 @ C = 0 110 adds sum, sum, #0 @ C = 0
111 tst buf, #3 @ Test destination alignment 111 tst buf, #3 @ Test destination alignment
112 blne .not_aligned @ aligh destination, return here 112 blne .Lnot_aligned @ align destination, return here
113 113
1141: bics ip, len, #31 1141: bics ip, len, #31
115 beq 3f 115 beq 3f
@@ -131,11 +131,11 @@ ENTRY(csum_partial)
131 ldmfd sp!, {r4 - r5} 131 ldmfd sp!, {r4 - r5}
132 132
1333: tst len, #0x1c @ should not change C 1333: tst len, #0x1c @ should not change C
134 beq .less4 134 beq .Lless4
135 135
1364: ldr td0, [buf], #4 1364: ldr td0, [buf], #4
137 sub len, len, #4 137 sub len, len, #4
138 adcs sum, sum, td0 138 adcs sum, sum, td0
139 tst len, #0x1c 139 tst len, #0x1c
140 bne 4b 140 bne 4b
141 b .less4 141 b .Lless4
diff --git a/arch/arm/lib/csumpartialcopygeneric.S b/arch/arm/lib/csumpartialcopygeneric.S
index d3a2f4667db4..4a4609c19095 100644
--- a/arch/arm/lib/csumpartialcopygeneric.S
+++ b/arch/arm/lib/csumpartialcopygeneric.S
@@ -22,7 +22,7 @@ dst .req r1
22len .req r2 22len .req r2
23sum .req r3 23sum .req r3
24 24
25.zero: mov r0, sum 25.Lzero: mov r0, sum
26 load_regs ea 26 load_regs ea
27 27
28 /* 28 /*
@@ -31,8 +31,9 @@ sum .req r3
31 * the length. Note that the source pointer hasn't been 31 * the length. Note that the source pointer hasn't been
32 * aligned yet. 32 * aligned yet.
33 */ 33 */
34.dst_unaligned: tst dst, #1 34.Ldst_unaligned:
35 beq .dst_16bit 35 tst dst, #1
36 beq .Ldst_16bit
36 37
37 load1b ip 38 load1b ip
38 sub len, len, #1 39 sub len, len, #1
@@ -41,7 +42,7 @@ sum .req r3
41 tst dst, #2 42 tst dst, #2
42 moveq pc, lr @ dst is now 32bit aligned 43 moveq pc, lr @ dst is now 32bit aligned
43 44
44.dst_16bit: load2b r8, ip 45.Ldst_16bit: load2b r8, ip
45 sub len, len, #2 46 sub len, len, #2
46 adcs sum, sum, r8, put_byte_0 47 adcs sum, sum, r8, put_byte_0
47 strb r8, [dst], #1 48 strb r8, [dst], #1
@@ -53,12 +54,12 @@ sum .req r3
53 * Handle 0 to 7 bytes, with any alignment of source and 54 * Handle 0 to 7 bytes, with any alignment of source and
54 * destination pointers. Note that when we get here, C = 0 55 * destination pointers. Note that when we get here, C = 0
55 */ 56 */
56.less8: teq len, #0 @ check for zero count 57.Lless8: teq len, #0 @ check for zero count
57 beq .zero 58 beq .Lzero
58 59
59 /* we must have at least one byte. */ 60 /* we must have at least one byte. */
60 tst dst, #1 @ dst 16-bit aligned 61 tst dst, #1 @ dst 16-bit aligned
61 beq .less8_aligned 62 beq .Lless8_aligned
62 63
63 /* Align dst */ 64 /* Align dst */
64 load1b ip 65 load1b ip
@@ -66,7 +67,7 @@ sum .req r3
66 adcs sum, sum, ip, put_byte_1 @ update checksum 67 adcs sum, sum, ip, put_byte_1 @ update checksum
67 strb ip, [dst], #1 68 strb ip, [dst], #1
68 tst len, #6 69 tst len, #6
69 beq .less8_byteonly 70 beq .Lless8_byteonly
70 71
711: load2b r8, ip 721: load2b r8, ip
72 sub len, len, #2 73 sub len, len, #2
@@ -74,15 +75,16 @@ sum .req r3
74 strb r8, [dst], #1 75 strb r8, [dst], #1
75 adcs sum, sum, ip, put_byte_1 76 adcs sum, sum, ip, put_byte_1
76 strb ip, [dst], #1 77 strb ip, [dst], #1
77.less8_aligned: tst len, #6 78.Lless8_aligned:
79 tst len, #6
78 bne 1b 80 bne 1b
79.less8_byteonly: 81.Lless8_byteonly:
80 tst len, #1 82 tst len, #1
81 beq .done 83 beq .Ldone
82 load1b r8 84 load1b r8
83 adcs sum, sum, r8, put_byte_0 @ update checksum 85 adcs sum, sum, r8, put_byte_0 @ update checksum
84 strb r8, [dst], #1 86 strb r8, [dst], #1
85 b .done 87 b .Ldone
86 88
87FN_ENTRY 89FN_ENTRY
88 mov ip, sp 90 mov ip, sp
@@ -90,11 +92,11 @@ FN_ENTRY
90 sub fp, ip, #4 92 sub fp, ip, #4
91 93
92 cmp len, #8 @ Ensure that we have at least 94 cmp len, #8 @ Ensure that we have at least
93 blo .less8 @ 8 bytes to copy. 95 blo .Lless8 @ 8 bytes to copy.
94 96
95 adds sum, sum, #0 @ C = 0 97 adds sum, sum, #0 @ C = 0
96 tst dst, #3 @ Test destination alignment 98 tst dst, #3 @ Test destination alignment
97 blne .dst_unaligned @ align destination, return here 99 blne .Ldst_unaligned @ align destination, return here
98 100
99 /* 101 /*
100 * Ok, the dst pointer is now 32bit aligned, and we know 102 * Ok, the dst pointer is now 32bit aligned, and we know
@@ -103,7 +105,7 @@ FN_ENTRY
103 */ 105 */
104 106
105 tst src, #3 @ Test source alignment 107 tst src, #3 @ Test source alignment
106 bne .src_not_aligned 108 bne .Lsrc_not_aligned
107 109
108 /* Routine for src & dst aligned */ 110 /* Routine for src & dst aligned */
109 111
@@ -136,17 +138,17 @@ FN_ENTRY
136 adcs sum, sum, r4 138 adcs sum, sum, r4
137 139
1384: ands len, len, #3 1404: ands len, len, #3
139 beq .done 141 beq .Ldone
140 load1l r4 142 load1l r4
141 tst len, #2 143 tst len, #2
142 mov r5, r4, get_byte_0 144 mov r5, r4, get_byte_0
143 beq .exit 145 beq .Lexit
144 adcs sum, sum, r4, push #16 146 adcs sum, sum, r4, push #16
145 strb r5, [dst], #1 147 strb r5, [dst], #1
146 mov r5, r4, get_byte_1 148 mov r5, r4, get_byte_1
147 strb r5, [dst], #1 149 strb r5, [dst], #1
148 mov r5, r4, get_byte_2 150 mov r5, r4, get_byte_2
149.exit: tst len, #1 151.Lexit: tst len, #1
150 strneb r5, [dst], #1 152 strneb r5, [dst], #1
151 andne r5, r5, #255 153 andne r5, r5, #255
152 adcnes sum, sum, r5, put_byte_0 154 adcnes sum, sum, r5, put_byte_0
@@ -157,20 +159,20 @@ FN_ENTRY
157 * the inefficient byte manipulations in the 159 * the inefficient byte manipulations in the
158 * architecture independent code. 160 * architecture independent code.
159 */ 161 */
160.done: adc r0, sum, #0 162.Ldone: adc r0, sum, #0
161 ldr sum, [sp, #0] @ dst 163 ldr sum, [sp, #0] @ dst
162 tst sum, #1 164 tst sum, #1
163 movne r0, r0, ror #8 165 movne r0, r0, ror #8
164 load_regs ea 166 load_regs ea
165 167
166.src_not_aligned: 168.Lsrc_not_aligned:
167 adc sum, sum, #0 @ include C from dst alignment 169 adc sum, sum, #0 @ include C from dst alignment
168 and ip, src, #3 170 and ip, src, #3
169 bic src, src, #3 171 bic src, src, #3
170 load1l r5 172 load1l r5
171 cmp ip, #2 173 cmp ip, #2
172 beq .src2_aligned 174 beq .Lsrc2_aligned
173 bhi .src3_aligned 175 bhi .Lsrc3_aligned
174 mov r4, r5, pull #8 @ C = 0 176 mov r4, r5, pull #8 @ C = 0
175 bics ip, len, #15 177 bics ip, len, #15
176 beq 2f 178 beq 2f
@@ -211,18 +213,18 @@ FN_ENTRY
211 adcs sum, sum, r4 213 adcs sum, sum, r4
212 mov r4, r5, pull #8 214 mov r4, r5, pull #8
2134: ands len, len, #3 2154: ands len, len, #3
214 beq .done 216 beq .Ldone
215 mov r5, r4, get_byte_0 217 mov r5, r4, get_byte_0
216 tst len, #2 218 tst len, #2
217 beq .exit 219 beq .Lexit
218 adcs sum, sum, r4, push #16 220 adcs sum, sum, r4, push #16
219 strb r5, [dst], #1 221 strb r5, [dst], #1
220 mov r5, r4, get_byte_1 222 mov r5, r4, get_byte_1
221 strb r5, [dst], #1 223 strb r5, [dst], #1
222 mov r5, r4, get_byte_2 224 mov r5, r4, get_byte_2
223 b .exit 225 b .Lexit
224 226
225.src2_aligned: mov r4, r5, pull #16 227.Lsrc2_aligned: mov r4, r5, pull #16
226 adds sum, sum, #0 228 adds sum, sum, #0
227 bics ip, len, #15 229 bics ip, len, #15
228 beq 2f 230 beq 2f
@@ -263,20 +265,20 @@ FN_ENTRY
263 adcs sum, sum, r4 265 adcs sum, sum, r4
264 mov r4, r5, pull #16 266 mov r4, r5, pull #16
2654: ands len, len, #3 2674: ands len, len, #3
266 beq .done 268 beq .Ldone
267 mov r5, r4, get_byte_0 269 mov r5, r4, get_byte_0
268 tst len, #2 270 tst len, #2
269 beq .exit 271 beq .Lexit
270 adcs sum, sum, r4 272 adcs sum, sum, r4
271 strb r5, [dst], #1 273 strb r5, [dst], #1
272 mov r5, r4, get_byte_1 274 mov r5, r4, get_byte_1
273 strb r5, [dst], #1 275 strb r5, [dst], #1
274 tst len, #1 276 tst len, #1
275 beq .done 277 beq .Ldone
276 load1b r5 278 load1b r5
277 b .exit 279 b .Lexit
278 280
279.src3_aligned: mov r4, r5, pull #24 281.Lsrc3_aligned: mov r4, r5, pull #24
280 adds sum, sum, #0 282 adds sum, sum, #0
281 bics ip, len, #15 283 bics ip, len, #15
282 beq 2f 284 beq 2f
@@ -317,10 +319,10 @@ FN_ENTRY
317 adcs sum, sum, r4 319 adcs sum, sum, r4
318 mov r4, r5, pull #24 320 mov r4, r5, pull #24
3194: ands len, len, #3 3214: ands len, len, #3
320 beq .done 322 beq .Ldone
321 mov r5, r4, get_byte_0 323 mov r5, r4, get_byte_0
322 tst len, #2 324 tst len, #2
323 beq .exit 325 beq .Lexit
324 strb r5, [dst], #1 326 strb r5, [dst], #1
325 adcs sum, sum, r4 327 adcs sum, sum, r4
326 load1l r4 328 load1l r4
@@ -328,4 +330,4 @@ FN_ENTRY
328 strb r5, [dst], #1 330 strb r5, [dst], #1
329 adcs sum, sum, r4, push #24 331 adcs sum, sum, r4, push #24
330 mov r5, r4, get_byte_1 332 mov r5, r4, get_byte_1
331 b .exit 333 b .Lexit
diff --git a/arch/arm/lib/delay.S b/arch/arm/lib/delay.S
index 3c7f7e675dd8..b3fb475b4120 100644
--- a/arch/arm/lib/delay.S
+++ b/arch/arm/lib/delay.S
@@ -11,7 +11,7 @@
11#include <asm/assembler.h> 11#include <asm/assembler.h>
12 .text 12 .text
13 13
14LC0: .word loops_per_jiffy 14.LC0: .word loops_per_jiffy
15 15
16/* 16/*
17 * 0 <= r0 <= 2000 17 * 0 <= r0 <= 2000
@@ -21,7 +21,7 @@ ENTRY(__udelay)
21 orr r2, r2, #0x00db 21 orr r2, r2, #0x00db
22 mul r0, r2, r0 22 mul r0, r2, r0
23ENTRY(__const_udelay) @ 0 <= r0 <= 0x01ffffff 23ENTRY(__const_udelay) @ 0 <= r0 <= 0x01ffffff
24 ldr r2, LC0 24 ldr r2, .LC0
25 ldr r2, [r2] @ max = 0x0fffffff 25 ldr r2, [r2] @ max = 0x0fffffff
26 mov r0, r0, lsr #11 @ max = 0x00003fff 26 mov r0, r0, lsr #11 @ max = 0x00003fff
27 mov r2, r2, lsr #11 @ max = 0x0003ffff 27 mov r2, r2, lsr #11 @ max = 0x0003ffff
diff --git a/arch/arm/lib/findbit.S b/arch/arm/lib/findbit.S
index f055d56ea68a..6f8e27a58c78 100644
--- a/arch/arm/lib/findbit.S
+++ b/arch/arm/lib/findbit.S
@@ -27,7 +27,7 @@ ENTRY(_find_first_zero_bit_le)
27 mov r2, #0 27 mov r2, #0
281: ldrb r3, [r0, r2, lsr #3] 281: ldrb r3, [r0, r2, lsr #3]
29 eors r3, r3, #0xff @ invert bits 29 eors r3, r3, #0xff @ invert bits
30 bne .found @ any now set - found zero bit 30 bne .L_found @ any now set - found zero bit
31 add r2, r2, #8 @ next bit pointer 31 add r2, r2, #8 @ next bit pointer
322: cmp r2, r1 @ any more? 322: cmp r2, r1 @ any more?
33 blo 1b 33 blo 1b
@@ -46,7 +46,7 @@ ENTRY(_find_next_zero_bit_le)
46 ldrb r3, [r0, r2, lsr #3] 46 ldrb r3, [r0, r2, lsr #3]
47 eor r3, r3, #0xff @ now looking for a 1 bit 47 eor r3, r3, #0xff @ now looking for a 1 bit
48 movs r3, r3, lsr ip @ shift off unused bits 48 movs r3, r3, lsr ip @ shift off unused bits
49 bne .found 49 bne .L_found
50 orr r2, r2, #7 @ if zero, then no bits here 50 orr r2, r2, #7 @ if zero, then no bits here
51 add r2, r2, #1 @ align bit pointer 51 add r2, r2, #1 @ align bit pointer
52 b 2b @ loop for next bit 52 b 2b @ loop for next bit
@@ -61,7 +61,7 @@ ENTRY(_find_first_bit_le)
61 mov r2, #0 61 mov r2, #0
621: ldrb r3, [r0, r2, lsr #3] 621: ldrb r3, [r0, r2, lsr #3]
63 movs r3, r3 63 movs r3, r3
64 bne .found @ any now set - found zero bit 64 bne .L_found @ any now set - found zero bit
65 add r2, r2, #8 @ next bit pointer 65 add r2, r2, #8 @ next bit pointer
662: cmp r2, r1 @ any more? 662: cmp r2, r1 @ any more?
67 blo 1b 67 blo 1b
@@ -79,7 +79,7 @@ ENTRY(_find_next_bit_le)
79 beq 1b @ If new byte, goto old routine 79 beq 1b @ If new byte, goto old routine
80 ldrb r3, [r0, r2, lsr #3] 80 ldrb r3, [r0, r2, lsr #3]
81 movs r3, r3, lsr ip @ shift off unused bits 81 movs r3, r3, lsr ip @ shift off unused bits
82 bne .found 82 bne .L_found
83 orr r2, r2, #7 @ if zero, then no bits here 83 orr r2, r2, #7 @ if zero, then no bits here
84 add r2, r2, #1 @ align bit pointer 84 add r2, r2, #1 @ align bit pointer
85 b 2b @ loop for next bit 85 b 2b @ loop for next bit
@@ -93,7 +93,7 @@ ENTRY(_find_first_zero_bit_be)
931: eor r3, r2, #0x18 @ big endian byte ordering 931: eor r3, r2, #0x18 @ big endian byte ordering
94 ldrb r3, [r0, r3, lsr #3] 94 ldrb r3, [r0, r3, lsr #3]
95 eors r3, r3, #0xff @ invert bits 95 eors r3, r3, #0xff @ invert bits
96 bne .found @ any now set - found zero bit 96 bne .L_found @ any now set - found zero bit
97 add r2, r2, #8 @ next bit pointer 97 add r2, r2, #8 @ next bit pointer
982: cmp r2, r1 @ any more? 982: cmp r2, r1 @ any more?
99 blo 1b 99 blo 1b
@@ -109,7 +109,7 @@ ENTRY(_find_next_zero_bit_be)
109 ldrb r3, [r0, r3, lsr #3] 109 ldrb r3, [r0, r3, lsr #3]
110 eor r3, r3, #0xff @ now looking for a 1 bit 110 eor r3, r3, #0xff @ now looking for a 1 bit
111 movs r3, r3, lsr ip @ shift off unused bits 111 movs r3, r3, lsr ip @ shift off unused bits
112 bne .found 112 bne .L_found
113 orr r2, r2, #7 @ if zero, then no bits here 113 orr r2, r2, #7 @ if zero, then no bits here
114 add r2, r2, #1 @ align bit pointer 114 add r2, r2, #1 @ align bit pointer
115 b 2b @ loop for next bit 115 b 2b @ loop for next bit
@@ -121,7 +121,7 @@ ENTRY(_find_first_bit_be)
1211: eor r3, r2, #0x18 @ big endian byte ordering 1211: eor r3, r2, #0x18 @ big endian byte ordering
122 ldrb r3, [r0, r3, lsr #3] 122 ldrb r3, [r0, r3, lsr #3]
123 movs r3, r3 123 movs r3, r3
124 bne .found @ any now set - found zero bit 124 bne .L_found @ any now set - found zero bit
125 add r2, r2, #8 @ next bit pointer 125 add r2, r2, #8 @ next bit pointer
1262: cmp r2, r1 @ any more? 1262: cmp r2, r1 @ any more?
127 blo 1b 127 blo 1b
@@ -136,7 +136,7 @@ ENTRY(_find_next_bit_be)
136 eor r3, r2, #0x18 @ big endian byte ordering 136 eor r3, r2, #0x18 @ big endian byte ordering
137 ldrb r3, [r0, r3, lsr #3] 137 ldrb r3, [r0, r3, lsr #3]
138 movs r3, r3, lsr ip @ shift off unused bits 138 movs r3, r3, lsr ip @ shift off unused bits
139 bne .found 139 bne .L_found
140 orr r2, r2, #7 @ if zero, then no bits here 140 orr r2, r2, #7 @ if zero, then no bits here
141 add r2, r2, #1 @ align bit pointer 141 add r2, r2, #1 @ align bit pointer
142 b 2b @ loop for next bit 142 b 2b @ loop for next bit
@@ -146,7 +146,7 @@ ENTRY(_find_next_bit_be)
146/* 146/*
147 * One or more bits in the LSB of r3 are assumed to be set. 147 * One or more bits in the LSB of r3 are assumed to be set.
148 */ 148 */
149.found: 149.L_found:
150#if __LINUX_ARM_ARCH__ >= 5 150#if __LINUX_ARM_ARCH__ >= 5
151 rsb r1, r3, #0 151 rsb r1, r3, #0
152 and r3, r3, r1 152 and r3, r3, r1
diff --git a/arch/arm/lib/io-acorn.S b/arch/arm/lib/io-acorn.S
index 3aacd01d40e1..b153523631c3 100644
--- a/arch/arm/lib/io-acorn.S
+++ b/arch/arm/lib/io-acorn.S
@@ -17,7 +17,7 @@
17 .text 17 .text
18 .align 18 .align
19 19
20.iosl_warning: 20.Liosl_warning:
21 .ascii "<4>insl/outsl not implemented, called from %08lX\0" 21 .ascii "<4>insl/outsl not implemented, called from %08lX\0"
22 .align 22 .align
23 23
@@ -27,6 +27,6 @@
27 */ 27 */
28ENTRY(insl) 28ENTRY(insl)
29ENTRY(outsl) 29ENTRY(outsl)
30 adr r0, .iosl_warning 30 adr r0, .Liosl_warning
31 mov r1, lr 31 mov r1, lr
32 b printk 32 b printk
diff --git a/arch/arm/lib/io-readsb.S b/arch/arm/lib/io-readsb.S
index 081ef749298a..d3d8de71a2c8 100644
--- a/arch/arm/lib/io-readsb.S
+++ b/arch/arm/lib/io-readsb.S
@@ -10,7 +10,7 @@
10#include <linux/linkage.h> 10#include <linux/linkage.h>
11#include <asm/assembler.h> 11#include <asm/assembler.h>
12 12
13.insb_align: rsb ip, ip, #4 13.Linsb_align: rsb ip, ip, #4
14 cmp ip, r2 14 cmp ip, r2
15 movgt ip, r2 15 movgt ip, r2
16 cmp ip, #2 16 cmp ip, #2
@@ -21,20 +21,20 @@
21 ldrgtb r3, [r0] 21 ldrgtb r3, [r0]
22 strgtb r3, [r1], #1 22 strgtb r3, [r1], #1
23 subs r2, r2, ip 23 subs r2, r2, ip
24 bne .insb_aligned 24 bne .Linsb_aligned
25 25
26ENTRY(__raw_readsb) 26ENTRY(__raw_readsb)
27 teq r2, #0 @ do we have to check for the zero len? 27 teq r2, #0 @ do we have to check for the zero len?
28 moveq pc, lr 28 moveq pc, lr
29 ands ip, r1, #3 29 ands ip, r1, #3
30 bne .insb_align 30 bne .Linsb_align
31 31
32.insb_aligned: stmfd sp!, {r4 - r6, lr} 32.Linsb_aligned: stmfd sp!, {r4 - r6, lr}
33 33
34 subs r2, r2, #16 34 subs r2, r2, #16
35 bmi .insb_no_16 35 bmi .Linsb_no_16
36 36
37.insb_16_lp: ldrb r3, [r0] 37.Linsb_16_lp: ldrb r3, [r0]
38 ldrb r4, [r0] 38 ldrb r4, [r0]
39 ldrb r5, [r0] 39 ldrb r5, [r0]
40 mov r3, r3, put_byte_0 40 mov r3, r3, put_byte_0
@@ -69,13 +69,13 @@ ENTRY(__raw_readsb)
69 stmia r1!, {r3 - r6} 69 stmia r1!, {r3 - r6}
70 70
71 subs r2, r2, #16 71 subs r2, r2, #16
72 bpl .insb_16_lp 72 bpl .Linsb_16_lp
73 73
74 tst r2, #15 74 tst r2, #15
75 LOADREGS(eqfd, sp!, {r4 - r6, pc}) 75 LOADREGS(eqfd, sp!, {r4 - r6, pc})
76 76
77.insb_no_16: tst r2, #8 77.Linsb_no_16: tst r2, #8
78 beq .insb_no_8 78 beq .Linsb_no_8
79 79
80 ldrb r3, [r0] 80 ldrb r3, [r0]
81 ldrb r4, [r0] 81 ldrb r4, [r0]
@@ -95,8 +95,8 @@ ENTRY(__raw_readsb)
95 orr r4, r4, ip, put_byte_3 95 orr r4, r4, ip, put_byte_3
96 stmia r1!, {r3, r4} 96 stmia r1!, {r3, r4}
97 97
98.insb_no_8: tst r2, #4 98.Linsb_no_8: tst r2, #4
99 beq .insb_no_4 99 beq .Linsb_no_4
100 100
101 ldrb r3, [r0] 101 ldrb r3, [r0]
102 ldrb r4, [r0] 102 ldrb r4, [r0]
@@ -108,7 +108,7 @@ ENTRY(__raw_readsb)
108 orr r3, r3, r6, put_byte_3 108 orr r3, r3, r6, put_byte_3
109 str r3, [r1], #4 109 str r3, [r1], #4
110 110
111.insb_no_4: ands r2, r2, #3 111.Linsb_no_4: ands r2, r2, #3
112 LOADREGS(eqfd, sp!, {r4 - r6, pc}) 112 LOADREGS(eqfd, sp!, {r4 - r6, pc})
113 113
114 cmp r2, #2 114 cmp r2, #2
diff --git a/arch/arm/lib/io-readsw-armv3.S b/arch/arm/lib/io-readsw-armv3.S
index 476cf7f8a633..146d47c15455 100644
--- a/arch/arm/lib/io-readsw-armv3.S
+++ b/arch/arm/lib/io-readsw-armv3.S
@@ -11,16 +11,16 @@
11#include <asm/assembler.h> 11#include <asm/assembler.h>
12#include <asm/hardware.h> 12#include <asm/hardware.h>
13 13
14.insw_bad_alignment: 14.Linsw_bad_alignment:
15 adr r0, .insw_bad_align_msg 15 adr r0, .Linsw_bad_align_msg
16 mov r2, lr 16 mov r2, lr
17 b panic 17 b panic
18.insw_bad_align_msg: 18.Linsw_bad_align_msg:
19 .asciz "insw: bad buffer alignment (0x%p, lr=0x%08lX)\n" 19 .asciz "insw: bad buffer alignment (0x%p, lr=0x%08lX)\n"
20 .align 20 .align
21 21
22.insw_align: tst r1, #1 22.Linsw_align: tst r1, #1
23 bne .insw_bad_alignment 23 bne .Linsw_bad_alignment
24 24
25 ldr r3, [r0] 25 ldr r3, [r0]
26 strb r3, [r1], #1 26 strb r3, [r1], #1
@@ -34,16 +34,16 @@ ENTRY(__raw_readsw)
34 teq r2, #0 @ do we have to check for the zero len? 34 teq r2, #0 @ do we have to check for the zero len?
35 moveq pc, lr 35 moveq pc, lr
36 tst r1, #3 36 tst r1, #3
37 bne .insw_align 37 bne .Linsw_align
38 38
39.insw_aligned: mov ip, #0xff 39.Linsw_aligned: mov ip, #0xff
40 orr ip, ip, ip, lsl #8 40 orr ip, ip, ip, lsl #8
41 stmfd sp!, {r4, r5, r6, lr} 41 stmfd sp!, {r4, r5, r6, lr}
42 42
43 subs r2, r2, #8 43 subs r2, r2, #8
44 bmi .no_insw_8 44 bmi .Lno_insw_8
45 45
46.insw_8_lp: ldr r3, [r0] 46.Linsw_8_lp: ldr r3, [r0]
47 and r3, r3, ip 47 and r3, r3, ip
48 ldr r4, [r0] 48 ldr r4, [r0]
49 orr r3, r3, r4, lsl #16 49 orr r3, r3, r4, lsl #16
@@ -66,13 +66,13 @@ ENTRY(__raw_readsw)
66 stmia r1!, {r3 - r6} 66 stmia r1!, {r3 - r6}
67 67
68 subs r2, r2, #8 68 subs r2, r2, #8
69 bpl .insw_8_lp 69 bpl .Linsw_8_lp
70 70
71 tst r2, #7 71 tst r2, #7
72 LOADREGS(eqfd, sp!, {r4, r5, r6, pc}) 72 LOADREGS(eqfd, sp!, {r4, r5, r6, pc})
73 73
74.no_insw_8: tst r2, #4 74.Lno_insw_8: tst r2, #4
75 beq .no_insw_4 75 beq .Lno_insw_4
76 76
77 ldr r3, [r0] 77 ldr r3, [r0]
78 and r3, r3, ip 78 and r3, r3, ip
@@ -86,8 +86,8 @@ ENTRY(__raw_readsw)
86 86
87 stmia r1!, {r3, r4} 87 stmia r1!, {r3, r4}
88 88
89.no_insw_4: tst r2, #2 89.Lno_insw_4: tst r2, #2
90 beq .no_insw_2 90 beq .Lno_insw_2
91 91
92 ldr r3, [r0] 92 ldr r3, [r0]
93 and r3, r3, ip 93 and r3, r3, ip
@@ -96,7 +96,7 @@ ENTRY(__raw_readsw)
96 96
97 str r3, [r1], #4 97 str r3, [r1], #4
98 98
99.no_insw_2: tst r2, #1 99.Lno_insw_2: tst r2, #1
100 ldrne r3, [r0] 100 ldrne r3, [r0]
101 strneb r3, [r1], #1 101 strneb r3, [r1], #1
102 movne r3, r3, lsr #8 102 movne r3, r3, lsr #8
diff --git a/arch/arm/lib/io-readsw-armv4.S b/arch/arm/lib/io-readsw-armv4.S
index c92b66ecbe86..4db1c5f0b219 100644
--- a/arch/arm/lib/io-readsw-armv4.S
+++ b/arch/arm/lib/io-readsw-armv4.S
@@ -18,8 +18,8 @@
18#endif 18#endif
19 .endm 19 .endm
20 20
21.insw_align: movs ip, r1, lsl #31 21.Linsw_align: movs ip, r1, lsl #31
22 bne .insw_noalign 22 bne .Linsw_noalign
23 ldrh ip, [r0] 23 ldrh ip, [r0]
24 sub r2, r2, #1 24 sub r2, r2, #1
25 strh ip, [r1], #2 25 strh ip, [r1], #2
@@ -28,14 +28,14 @@ ENTRY(__raw_readsw)
28 teq r2, #0 28 teq r2, #0
29 moveq pc, lr 29 moveq pc, lr
30 tst r1, #3 30 tst r1, #3
31 bne .insw_align 31 bne .Linsw_align
32 32
33 stmfd sp!, {r4, r5, lr} 33 stmfd sp!, {r4, r5, lr}
34 34
35 subs r2, r2, #8 35 subs r2, r2, #8
36 bmi .no_insw_8 36 bmi .Lno_insw_8
37 37
38.insw_8_lp: ldrh r3, [r0] 38.Linsw_8_lp: ldrh r3, [r0]
39 ldrh r4, [r0] 39 ldrh r4, [r0]
40 pack r3, r3, r4 40 pack r3, r3, r4
41 41
@@ -53,10 +53,10 @@ ENTRY(__raw_readsw)
53 53
54 subs r2, r2, #8 54 subs r2, r2, #8
55 stmia r1!, {r3 - r5, ip} 55 stmia r1!, {r3 - r5, ip}
56 bpl .insw_8_lp 56 bpl .Linsw_8_lp
57 57
58.no_insw_8: tst r2, #4 58.Lno_insw_8: tst r2, #4
59 beq .no_insw_4 59 beq .Lno_insw_4
60 60
61 ldrh r3, [r0] 61 ldrh r3, [r0]
62 ldrh r4, [r0] 62 ldrh r4, [r0]
@@ -68,15 +68,15 @@ ENTRY(__raw_readsw)
68 68
69 stmia r1!, {r3, r4} 69 stmia r1!, {r3, r4}
70 70
71.no_insw_4: movs r2, r2, lsl #31 71.Lno_insw_4: movs r2, r2, lsl #31
72 bcc .no_insw_2 72 bcc .Lno_insw_2
73 73
74 ldrh r3, [r0] 74 ldrh r3, [r0]
75 ldrh ip, [r0] 75 ldrh ip, [r0]
76 pack r3, r3, ip 76 pack r3, r3, ip
77 str r3, [r1], #4 77 str r3, [r1], #4
78 78
79.no_insw_2: ldrneh r3, [r0] 79.Lno_insw_2: ldrneh r3, [r0]
80 strneh r3, [r1] 80 strneh r3, [r1]
81 81
82 ldmfd sp!, {r4, r5, pc} 82 ldmfd sp!, {r4, r5, pc}
@@ -93,7 +93,7 @@ ENTRY(__raw_readsw)
93#define pull_hbyte1 lsr #8 93#define pull_hbyte1 lsr #8
94#endif 94#endif
95 95
96.insw_noalign: stmfd sp!, {r4, lr} 96.Linsw_noalign: stmfd sp!, {r4, lr}
97 ldrccb ip, [r1, #-1]! 97 ldrccb ip, [r1, #-1]!
98 bcc 1f 98 bcc 1f
99 99
diff --git a/arch/arm/lib/io-writesb.S b/arch/arm/lib/io-writesb.S
index 70b2561bdb09..08209fc640ea 100644
--- a/arch/arm/lib/io-writesb.S
+++ b/arch/arm/lib/io-writesb.S
@@ -30,7 +30,7 @@
30#endif 30#endif
31 .endm 31 .endm
32 32
33.outsb_align: rsb ip, ip, #4 33.Loutsb_align: rsb ip, ip, #4
34 cmp ip, r2 34 cmp ip, r2
35 movgt ip, r2 35 movgt ip, r2
36 cmp ip, #2 36 cmp ip, #2
@@ -41,44 +41,45 @@
41 ldrgtb r3, [r1], #1 41 ldrgtb r3, [r1], #1
42 strgtb r3, [r0] 42 strgtb r3, [r0]
43 subs r2, r2, ip 43 subs r2, r2, ip
44 bne .outsb_aligned 44 bne .Loutsb_aligned
45 45
46ENTRY(__raw_writesb) 46ENTRY(__raw_writesb)
47 teq r2, #0 @ do we have to check for the zero len? 47 teq r2, #0 @ do we have to check for the zero len?
48 moveq pc, lr 48 moveq pc, lr
49 ands ip, r1, #3 49 ands ip, r1, #3
50 bne .outsb_align 50 bne .Loutsb_align
51 51
52.outsb_aligned: stmfd sp!, {r4, r5, lr} 52.Loutsb_aligned:
53 stmfd sp!, {r4, r5, lr}
53 54
54 subs r2, r2, #16 55 subs r2, r2, #16
55 bmi .outsb_no_16 56 bmi .Loutsb_no_16
56 57
57.outsb_16_lp: ldmia r1!, {r3, r4, r5, ip} 58.Loutsb_16_lp: ldmia r1!, {r3, r4, r5, ip}
58 outword r3 59 outword r3
59 outword r4 60 outword r4
60 outword r5 61 outword r5
61 outword ip 62 outword ip
62 subs r2, r2, #16 63 subs r2, r2, #16
63 bpl .outsb_16_lp 64 bpl .Loutsb_16_lp
64 65
65 tst r2, #15 66 tst r2, #15
66 LOADREGS(eqfd, sp!, {r4, r5, pc}) 67 LOADREGS(eqfd, sp!, {r4, r5, pc})
67 68
68.outsb_no_16: tst r2, #8 69.Loutsb_no_16: tst r2, #8
69 beq .outsb_no_8 70 beq .Loutsb_no_8
70 71
71 ldmia r1!, {r3, r4} 72 ldmia r1!, {r3, r4}
72 outword r3 73 outword r3
73 outword r4 74 outword r4
74 75
75.outsb_no_8: tst r2, #4 76.Loutsb_no_8: tst r2, #4
76 beq .outsb_no_4 77 beq .Loutsb_no_4
77 78
78 ldr r3, [r1], #4 79 ldr r3, [r1], #4
79 outword r3 80 outword r3
80 81
81.outsb_no_4: ands r2, r2, #3 82.Loutsb_no_4: ands r2, r2, #3
82 LOADREGS(eqfd, sp!, {r4, r5, pc}) 83 LOADREGS(eqfd, sp!, {r4, r5, pc})
83 84
84 cmp r2, #2 85 cmp r2, #2
diff --git a/arch/arm/lib/io-writesw-armv3.S b/arch/arm/lib/io-writesw-armv3.S
index 950e7e310f1a..52d62b481295 100644
--- a/arch/arm/lib/io-writesw-armv3.S
+++ b/arch/arm/lib/io-writesw-armv3.S
@@ -11,16 +11,16 @@
11#include <asm/assembler.h> 11#include <asm/assembler.h>
12#include <asm/hardware.h> 12#include <asm/hardware.h>
13 13
14.outsw_bad_alignment: 14.Loutsw_bad_alignment:
15 adr r0, .outsw_bad_align_msg 15 adr r0, .Loutsw_bad_align_msg
16 mov r2, lr 16 mov r2, lr
17 b panic 17 b panic
18.outsw_bad_align_msg: 18.Loutsw_bad_align_msg:
19 .asciz "outsw: bad buffer alignment (0x%p, lr=0x%08lX)\n" 19 .asciz "outsw: bad buffer alignment (0x%p, lr=0x%08lX)\n"
20 .align 20 .align
21 21
22.outsw_align: tst r1, #1 22.Loutsw_align: tst r1, #1
23 bne .outsw_bad_alignment 23 bne .Loutsw_bad_alignment
24 24
25 add r1, r1, #2 25 add r1, r1, #2
26 26
@@ -35,14 +35,14 @@ ENTRY(__raw_writesw)
35 teq r2, #0 @ do we have to check for the zero len? 35 teq r2, #0 @ do we have to check for the zero len?
36 moveq pc, lr 36 moveq pc, lr
37 tst r1, #3 37 tst r1, #3
38 bne .outsw_align 38 bne .Loutsw_align
39 39
40.outsw_aligned: stmfd sp!, {r4, r5, r6, lr} 40 stmfd sp!, {r4, r5, r6, lr}
41 41
42 subs r2, r2, #8 42 subs r2, r2, #8
43 bmi .no_outsw_8 43 bmi .Lno_outsw_8
44 44
45.outsw_8_lp: ldmia r1!, {r3, r4, r5, r6} 45.Loutsw_8_lp: ldmia r1!, {r3, r4, r5, r6}
46 46
47 mov ip, r3, lsl #16 47 mov ip, r3, lsl #16
48 orr ip, ip, ip, lsr #16 48 orr ip, ip, ip, lsr #16
@@ -77,13 +77,13 @@ ENTRY(__raw_writesw)
77 str ip, [r0] 77 str ip, [r0]
78 78
79 subs r2, r2, #8 79 subs r2, r2, #8
80 bpl .outsw_8_lp 80 bpl .Loutsw_8_lp
81 81
82 tst r2, #7 82 tst r2, #7
83 LOADREGS(eqfd, sp!, {r4, r5, r6, pc}) 83 LOADREGS(eqfd, sp!, {r4, r5, r6, pc})
84 84
85.no_outsw_8: tst r2, #4 85.Lno_outsw_8: tst r2, #4
86 beq .no_outsw_4 86 beq .Lno_outsw_4
87 87
88 ldmia r1!, {r3, r4} 88 ldmia r1!, {r3, r4}
89 89
@@ -103,8 +103,8 @@ ENTRY(__raw_writesw)
103 orr ip, ip, ip, lsl #16 103 orr ip, ip, ip, lsl #16
104 str ip, [r0] 104 str ip, [r0]
105 105
106.no_outsw_4: tst r2, #2 106.Lno_outsw_4: tst r2, #2
107 beq .no_outsw_2 107 beq .Lno_outsw_2
108 108
109 ldr r3, [r1], #4 109 ldr r3, [r1], #4
110 110
@@ -116,7 +116,7 @@ ENTRY(__raw_writesw)
116 orr ip, ip, ip, lsl #16 116 orr ip, ip, ip, lsl #16
117 str ip, [r0] 117 str ip, [r0]
118 118
119.no_outsw_2: tst r2, #1 119.Lno_outsw_2: tst r2, #1
120 120
121 ldrne r3, [r1] 121 ldrne r3, [r1]
122 122
diff --git a/arch/arm/lib/io-writesw-armv4.S b/arch/arm/lib/io-writesw-armv4.S
index 5e240e452af6..c8e85bd653b7 100644
--- a/arch/arm/lib/io-writesw-armv4.S
+++ b/arch/arm/lib/io-writesw-armv4.S
@@ -22,8 +22,8 @@
22#endif 22#endif
23 .endm 23 .endm
24 24
25.outsw_align: movs ip, r1, lsl #31 25.Loutsw_align: movs ip, r1, lsl #31
26 bne .outsw_noalign 26 bne .Loutsw_noalign
27 27
28 ldrh r3, [r1], #2 28 ldrh r3, [r1], #2
29 sub r2, r2, #1 29 sub r2, r2, #1
@@ -33,35 +33,35 @@ ENTRY(__raw_writesw)
33 teq r2, #0 33 teq r2, #0
34 moveq pc, lr 34 moveq pc, lr
35 ands r3, r1, #3 35 ands r3, r1, #3
36 bne .outsw_align 36 bne .Loutsw_align
37 37
38 stmfd sp!, {r4, r5, lr} 38 stmfd sp!, {r4, r5, lr}
39 39
40 subs r2, r2, #8 40 subs r2, r2, #8
41 bmi .no_outsw_8 41 bmi .Lno_outsw_8
42 42
43.outsw_8_lp: ldmia r1!, {r3, r4, r5, ip} 43.Loutsw_8_lp: ldmia r1!, {r3, r4, r5, ip}
44 subs r2, r2, #8 44 subs r2, r2, #8
45 outword r3 45 outword r3
46 outword r4 46 outword r4
47 outword r5 47 outword r5
48 outword ip 48 outword ip
49 bpl .outsw_8_lp 49 bpl .Loutsw_8_lp
50 50
51.no_outsw_8: tst r2, #4 51.Lno_outsw_8: tst r2, #4
52 beq .no_outsw_4 52 beq .Lno_outsw_4
53 53
54 ldmia r1!, {r3, ip} 54 ldmia r1!, {r3, ip}
55 outword r3 55 outword r3
56 outword ip 56 outword ip
57 57
58.no_outsw_4: movs r2, r2, lsl #31 58.Lno_outsw_4: movs r2, r2, lsl #31
59 bcc .no_outsw_2 59 bcc .Lno_outsw_2
60 60
61 ldr r3, [r1], #4 61 ldr r3, [r1], #4
62 outword r3 62 outword r3
63 63
64.no_outsw_2: ldrneh r3, [r1] 64.Lno_outsw_2: ldrneh r3, [r1]
65 strneh r3, [r0] 65 strneh r3, [r0]
66 66
67 ldmfd sp!, {r4, r5, pc} 67 ldmfd sp!, {r4, r5, pc}
@@ -74,7 +74,8 @@ ENTRY(__raw_writesw)
74#define push_hbyte1 lsl #8 74#define push_hbyte1 lsl #8
75#endif 75#endif
76 76
77.outsw_noalign: ldr r3, [r1, -r3]! 77.Loutsw_noalign:
78 ldr r3, [r1, -r3]!
78 subcs r2, r2, #1 79 subcs r2, r2, #1
79 bcs 2f 80 bcs 2f
80 subs r2, r2, #2 81 subs r2, r2, #2
diff --git a/arch/arm/lib/uaccess.S b/arch/arm/lib/uaccess.S
index 6f1b5b49fe4c..0cc450f863b6 100644
--- a/arch/arm/lib/uaccess.S
+++ b/arch/arm/lib/uaccess.S
@@ -27,7 +27,7 @@
27 * Returns : Number of bytes NOT copied. 27 * Returns : Number of bytes NOT copied.
28 */ 28 */
29 29
30.c2u_dest_not_aligned: 30.Lc2u_dest_not_aligned:
31 rsb ip, ip, #4 31 rsb ip, ip, #4
32 cmp ip, #2 32 cmp ip, #2
33 ldrb r3, [r1], #1 33 ldrb r3, [r1], #1
@@ -37,32 +37,32 @@ USER( strgebt r3, [r0], #1) @ May fault
37 ldrgtb r3, [r1], #1 37 ldrgtb r3, [r1], #1
38USER( strgtbt r3, [r0], #1) @ May fault 38USER( strgtbt r3, [r0], #1) @ May fault
39 sub r2, r2, ip 39 sub r2, r2, ip
40 b .c2u_dest_aligned 40 b .Lc2u_dest_aligned
41 41
42ENTRY(__arch_copy_to_user) 42ENTRY(__arch_copy_to_user)
43 stmfd sp!, {r2, r4 - r7, lr} 43 stmfd sp!, {r2, r4 - r7, lr}
44 cmp r2, #4 44 cmp r2, #4
45 blt .c2u_not_enough 45 blt .Lc2u_not_enough
46 ands ip, r0, #3 46 ands ip, r0, #3
47 bne .c2u_dest_not_aligned 47 bne .Lc2u_dest_not_aligned
48.c2u_dest_aligned: 48.Lc2u_dest_aligned:
49 49
50 ands ip, r1, #3 50 ands ip, r1, #3
51 bne .c2u_src_not_aligned 51 bne .Lc2u_src_not_aligned
52/* 52/*
53 * Seeing as there has to be at least 8 bytes to copy, we can 53 * Seeing as there has to be at least 8 bytes to copy, we can
54 * copy one word, and force a user-mode page fault... 54 * copy one word, and force a user-mode page fault...
55 */ 55 */
56 56
57.c2u_0fupi: subs r2, r2, #4 57.Lc2u_0fupi: subs r2, r2, #4
58 addmi ip, r2, #4 58 addmi ip, r2, #4
59 bmi .c2u_0nowords 59 bmi .Lc2u_0nowords
60 ldr r3, [r1], #4 60 ldr r3, [r1], #4
61USER( strt r3, [r0], #4) @ May fault 61USER( strt r3, [r0], #4) @ May fault
62 mov ip, r0, lsl #32 - PAGE_SHIFT @ On each page, use a ld/st??t instruction 62 mov ip, r0, lsl #32 - PAGE_SHIFT @ On each page, use a ld/st??t instruction
63 rsb ip, ip, #0 63 rsb ip, ip, #0
64 movs ip, ip, lsr #32 - PAGE_SHIFT 64 movs ip, ip, lsr #32 - PAGE_SHIFT
65 beq .c2u_0fupi 65 beq .Lc2u_0fupi
66/* 66/*
67 * ip = max no. of bytes to copy before needing another "strt" insn 67 * ip = max no. of bytes to copy before needing another "strt" insn
68 */ 68 */
@@ -70,16 +70,16 @@ USER( strt r3, [r0], #4) @ May fault
70 movlt ip, r2 70 movlt ip, r2
71 sub r2, r2, ip 71 sub r2, r2, ip
72 subs ip, ip, #32 72 subs ip, ip, #32
73 blt .c2u_0rem8lp 73 blt .Lc2u_0rem8lp
74 74
75.c2u_0cpy8lp: ldmia r1!, {r3 - r6} 75.Lc2u_0cpy8lp: ldmia r1!, {r3 - r6}
76 stmia r0!, {r3 - r6} @ Shouldnt fault 76 stmia r0!, {r3 - r6} @ Shouldnt fault
77 ldmia r1!, {r3 - r6} 77 ldmia r1!, {r3 - r6}
78 subs ip, ip, #32 78 subs ip, ip, #32
79 stmia r0!, {r3 - r6} @ Shouldnt fault 79 stmia r0!, {r3 - r6} @ Shouldnt fault
80 bpl .c2u_0cpy8lp 80 bpl .Lc2u_0cpy8lp
81 81
82.c2u_0rem8lp: cmn ip, #16 82.Lc2u_0rem8lp: cmn ip, #16
83 ldmgeia r1!, {r3 - r6} 83 ldmgeia r1!, {r3 - r6}
84 stmgeia r0!, {r3 - r6} @ Shouldnt fault 84 stmgeia r0!, {r3 - r6} @ Shouldnt fault
85 tst ip, #8 85 tst ip, #8
@@ -89,33 +89,33 @@ USER( strt r3, [r0], #4) @ May fault
89 ldrne r3, [r1], #4 89 ldrne r3, [r1], #4
90 strnet r3, [r0], #4 @ Shouldnt fault 90 strnet r3, [r0], #4 @ Shouldnt fault
91 ands ip, ip, #3 91 ands ip, ip, #3
92 beq .c2u_0fupi 92 beq .Lc2u_0fupi
93.c2u_0nowords: teq ip, #0 93.Lc2u_0nowords: teq ip, #0
94 beq .c2u_finished 94 beq .Lc2u_finished
95.c2u_nowords: cmp ip, #2 95.Lc2u_nowords: cmp ip, #2
96 ldrb r3, [r1], #1 96 ldrb r3, [r1], #1
97USER( strbt r3, [r0], #1) @ May fault 97USER( strbt r3, [r0], #1) @ May fault
98 ldrgeb r3, [r1], #1 98 ldrgeb r3, [r1], #1
99USER( strgebt r3, [r0], #1) @ May fault 99USER( strgebt r3, [r0], #1) @ May fault
100 ldrgtb r3, [r1], #1 100 ldrgtb r3, [r1], #1
101USER( strgtbt r3, [r0], #1) @ May fault 101USER( strgtbt r3, [r0], #1) @ May fault
102 b .c2u_finished 102 b .Lc2u_finished
103 103
104.c2u_not_enough: 104.Lc2u_not_enough:
105 movs ip, r2 105 movs ip, r2
106 bne .c2u_nowords 106 bne .Lc2u_nowords
107.c2u_finished: mov r0, #0 107.Lc2u_finished: mov r0, #0
108 LOADREGS(fd,sp!,{r2, r4 - r7, pc}) 108 LOADREGS(fd,sp!,{r2, r4 - r7, pc})
109 109
110.c2u_src_not_aligned: 110.Lc2u_src_not_aligned:
111 bic r1, r1, #3 111 bic r1, r1, #3
112 ldr r7, [r1], #4 112 ldr r7, [r1], #4
113 cmp ip, #2 113 cmp ip, #2
114 bgt .c2u_3fupi 114 bgt .Lc2u_3fupi
115 beq .c2u_2fupi 115 beq .Lc2u_2fupi
116.c2u_1fupi: subs r2, r2, #4 116.Lc2u_1fupi: subs r2, r2, #4
117 addmi ip, r2, #4 117 addmi ip, r2, #4
118 bmi .c2u_1nowords 118 bmi .Lc2u_1nowords
119 mov r3, r7, pull #8 119 mov r3, r7, pull #8
120 ldr r7, [r1], #4 120 ldr r7, [r1], #4
121 orr r3, r3, r7, push #24 121 orr r3, r3, r7, push #24
@@ -123,14 +123,14 @@ USER( strt r3, [r0], #4) @ May fault
123 mov ip, r0, lsl #32 - PAGE_SHIFT 123 mov ip, r0, lsl #32 - PAGE_SHIFT
124 rsb ip, ip, #0 124 rsb ip, ip, #0
125 movs ip, ip, lsr #32 - PAGE_SHIFT 125 movs ip, ip, lsr #32 - PAGE_SHIFT
126 beq .c2u_1fupi 126 beq .Lc2u_1fupi
127 cmp r2, ip 127 cmp r2, ip
128 movlt ip, r2 128 movlt ip, r2
129 sub r2, r2, ip 129 sub r2, r2, ip
130 subs ip, ip, #16 130 subs ip, ip, #16
131 blt .c2u_1rem8lp 131 blt .Lc2u_1rem8lp
132 132
133.c2u_1cpy8lp: mov r3, r7, pull #8 133.Lc2u_1cpy8lp: mov r3, r7, pull #8
134 ldmia r1!, {r4 - r7} 134 ldmia r1!, {r4 - r7}
135 subs ip, ip, #16 135 subs ip, ip, #16
136 orr r3, r3, r4, push #24 136 orr r3, r3, r4, push #24
@@ -141,9 +141,9 @@ USER( strt r3, [r0], #4) @ May fault
141 mov r6, r6, pull #8 141 mov r6, r6, pull #8
142 orr r6, r6, r7, push #24 142 orr r6, r6, r7, push #24
143 stmia r0!, {r3 - r6} @ Shouldnt fault 143 stmia r0!, {r3 - r6} @ Shouldnt fault
144 bpl .c2u_1cpy8lp 144 bpl .Lc2u_1cpy8lp
145 145
146.c2u_1rem8lp: tst ip, #8 146.Lc2u_1rem8lp: tst ip, #8
147 movne r3, r7, pull #8 147 movne r3, r7, pull #8
148 ldmneia r1!, {r4, r7} 148 ldmneia r1!, {r4, r7}
149 orrne r3, r3, r4, push #24 149 orrne r3, r3, r4, push #24
@@ -156,21 +156,21 @@ USER( strt r3, [r0], #4) @ May fault
156 orrne r3, r3, r7, push #24 156 orrne r3, r3, r7, push #24
157 strnet r3, [r0], #4 @ Shouldnt fault 157 strnet r3, [r0], #4 @ Shouldnt fault
158 ands ip, ip, #3 158 ands ip, ip, #3
159 beq .c2u_1fupi 159 beq .Lc2u_1fupi
160.c2u_1nowords: mov r3, r7, get_byte_1 160.Lc2u_1nowords: mov r3, r7, get_byte_1
161 teq ip, #0 161 teq ip, #0
162 beq .c2u_finished 162 beq .Lc2u_finished
163 cmp ip, #2 163 cmp ip, #2
164USER( strbt r3, [r0], #1) @ May fault 164USER( strbt r3, [r0], #1) @ May fault
165 movge r3, r7, get_byte_2 165 movge r3, r7, get_byte_2
166USER( strgebt r3, [r0], #1) @ May fault 166USER( strgebt r3, [r0], #1) @ May fault
167 movgt r3, r7, get_byte_3 167 movgt r3, r7, get_byte_3
168USER( strgtbt r3, [r0], #1) @ May fault 168USER( strgtbt r3, [r0], #1) @ May fault
169 b .c2u_finished 169 b .Lc2u_finished
170 170
171.c2u_2fupi: subs r2, r2, #4 171.Lc2u_2fupi: subs r2, r2, #4
172 addmi ip, r2, #4 172 addmi ip, r2, #4
173 bmi .c2u_2nowords 173 bmi .Lc2u_2nowords
174 mov r3, r7, pull #16 174 mov r3, r7, pull #16
175 ldr r7, [r1], #4 175 ldr r7, [r1], #4
176 orr r3, r3, r7, push #16 176 orr r3, r3, r7, push #16
@@ -178,14 +178,14 @@ USER( strt r3, [r0], #4) @ May fault
178 mov ip, r0, lsl #32 - PAGE_SHIFT 178 mov ip, r0, lsl #32 - PAGE_SHIFT
179 rsb ip, ip, #0 179 rsb ip, ip, #0
180 movs ip, ip, lsr #32 - PAGE_SHIFT 180 movs ip, ip, lsr #32 - PAGE_SHIFT
181 beq .c2u_2fupi 181 beq .Lc2u_2fupi
182 cmp r2, ip 182 cmp r2, ip
183 movlt ip, r2 183 movlt ip, r2
184 sub r2, r2, ip 184 sub r2, r2, ip
185 subs ip, ip, #16 185 subs ip, ip, #16
186 blt .c2u_2rem8lp 186 blt .Lc2u_2rem8lp
187 187
188.c2u_2cpy8lp: mov r3, r7, pull #16 188.Lc2u_2cpy8lp: mov r3, r7, pull #16
189 ldmia r1!, {r4 - r7} 189 ldmia r1!, {r4 - r7}
190 subs ip, ip, #16 190 subs ip, ip, #16
191 orr r3, r3, r4, push #16 191 orr r3, r3, r4, push #16
@@ -196,9 +196,9 @@ USER( strt r3, [r0], #4) @ May fault
196 mov r6, r6, pull #16 196 mov r6, r6, pull #16
197 orr r6, r6, r7, push #16 197 orr r6, r6, r7, push #16
198 stmia r0!, {r3 - r6} @ Shouldnt fault 198 stmia r0!, {r3 - r6} @ Shouldnt fault
199 bpl .c2u_2cpy8lp 199 bpl .Lc2u_2cpy8lp
200 200
201.c2u_2rem8lp: tst ip, #8 201.Lc2u_2rem8lp: tst ip, #8
202 movne r3, r7, pull #16 202 movne r3, r7, pull #16
203 ldmneia r1!, {r4, r7} 203 ldmneia r1!, {r4, r7}
204 orrne r3, r3, r4, push #16 204 orrne r3, r3, r4, push #16
@@ -211,21 +211,21 @@ USER( strt r3, [r0], #4) @ May fault
211 orrne r3, r3, r7, push #16 211 orrne r3, r3, r7, push #16
212 strnet r3, [r0], #4 @ Shouldnt fault 212 strnet r3, [r0], #4 @ Shouldnt fault
213 ands ip, ip, #3 213 ands ip, ip, #3
214 beq .c2u_2fupi 214 beq .Lc2u_2fupi
215.c2u_2nowords: mov r3, r7, get_byte_2 215.Lc2u_2nowords: mov r3, r7, get_byte_2
216 teq ip, #0 216 teq ip, #0
217 beq .c2u_finished 217 beq .Lc2u_finished
218 cmp ip, #2 218 cmp ip, #2
219USER( strbt r3, [r0], #1) @ May fault 219USER( strbt r3, [r0], #1) @ May fault
220 movge r3, r7, get_byte_3 220 movge r3, r7, get_byte_3
221USER( strgebt r3, [r0], #1) @ May fault 221USER( strgebt r3, [r0], #1) @ May fault
222 ldrgtb r3, [r1], #0 222 ldrgtb r3, [r1], #0
223USER( strgtbt r3, [r0], #1) @ May fault 223USER( strgtbt r3, [r0], #1) @ May fault
224 b .c2u_finished 224 b .Lc2u_finished
225 225
226.c2u_3fupi: subs r2, r2, #4 226.Lc2u_3fupi: subs r2, r2, #4
227 addmi ip, r2, #4 227 addmi ip, r2, #4
228 bmi .c2u_3nowords 228 bmi .Lc2u_3nowords
229 mov r3, r7, pull #24 229 mov r3, r7, pull #24
230 ldr r7, [r1], #4 230 ldr r7, [r1], #4
231 orr r3, r3, r7, push #8 231 orr r3, r3, r7, push #8
@@ -233,14 +233,14 @@ USER( strt r3, [r0], #4) @ May fault
233 mov ip, r0, lsl #32 - PAGE_SHIFT 233 mov ip, r0, lsl #32 - PAGE_SHIFT
234 rsb ip, ip, #0 234 rsb ip, ip, #0
235 movs ip, ip, lsr #32 - PAGE_SHIFT 235 movs ip, ip, lsr #32 - PAGE_SHIFT
236 beq .c2u_3fupi 236 beq .Lc2u_3fupi
237 cmp r2, ip 237 cmp r2, ip
238 movlt ip, r2 238 movlt ip, r2
239 sub r2, r2, ip 239 sub r2, r2, ip
240 subs ip, ip, #16 240 subs ip, ip, #16
241 blt .c2u_3rem8lp 241 blt .Lc2u_3rem8lp
242 242
243.c2u_3cpy8lp: mov r3, r7, pull #24 243.Lc2u_3cpy8lp: mov r3, r7, pull #24
244 ldmia r1!, {r4 - r7} 244 ldmia r1!, {r4 - r7}
245 subs ip, ip, #16 245 subs ip, ip, #16
246 orr r3, r3, r4, push #8 246 orr r3, r3, r4, push #8
@@ -251,9 +251,9 @@ USER( strt r3, [r0], #4) @ May fault
251 mov r6, r6, pull #24 251 mov r6, r6, pull #24
252 orr r6, r6, r7, push #8 252 orr r6, r6, r7, push #8
253 stmia r0!, {r3 - r6} @ Shouldnt fault 253 stmia r0!, {r3 - r6} @ Shouldnt fault
254 bpl .c2u_3cpy8lp 254 bpl .Lc2u_3cpy8lp
255 255
256.c2u_3rem8lp: tst ip, #8 256.Lc2u_3rem8lp: tst ip, #8
257 movne r3, r7, pull #24 257 movne r3, r7, pull #24
258 ldmneia r1!, {r4, r7} 258 ldmneia r1!, {r4, r7}
259 orrne r3, r3, r4, push #8 259 orrne r3, r3, r4, push #8
@@ -266,17 +266,17 @@ USER( strt r3, [r0], #4) @ May fault
266 orrne r3, r3, r7, push #8 266 orrne r3, r3, r7, push #8
267 strnet r3, [r0], #4 @ Shouldnt fault 267 strnet r3, [r0], #4 @ Shouldnt fault
268 ands ip, ip, #3 268 ands ip, ip, #3
269 beq .c2u_3fupi 269 beq .Lc2u_3fupi
270.c2u_3nowords: mov r3, r7, get_byte_3 270.Lc2u_3nowords: mov r3, r7, get_byte_3
271 teq ip, #0 271 teq ip, #0
272 beq .c2u_finished 272 beq .Lc2u_finished
273 cmp ip, #2 273 cmp ip, #2
274USER( strbt r3, [r0], #1) @ May fault 274USER( strbt r3, [r0], #1) @ May fault
275 ldrgeb r3, [r1], #1 275 ldrgeb r3, [r1], #1
276USER( strgebt r3, [r0], #1) @ May fault 276USER( strgebt r3, [r0], #1) @ May fault
277 ldrgtb r3, [r1], #0 277 ldrgtb r3, [r1], #0
278USER( strgtbt r3, [r0], #1) @ May fault 278USER( strgtbt r3, [r0], #1) @ May fault
279 b .c2u_finished 279 b .Lc2u_finished
280 280
281 .section .fixup,"ax" 281 .section .fixup,"ax"
282 .align 0 282 .align 0
@@ -290,7 +290,7 @@ USER( strgtbt r3, [r0], #1) @ May fault
290 * : n - number of bytes to copy 290 * : n - number of bytes to copy
291 * Returns : Number of bytes NOT copied. 291 * Returns : Number of bytes NOT copied.
292 */ 292 */
293.cfu_dest_not_aligned: 293.Lcfu_dest_not_aligned:
294 rsb ip, ip, #4 294 rsb ip, ip, #4
295 cmp ip, #2 295 cmp ip, #2
296USER( ldrbt r3, [r1], #1) @ May fault 296USER( ldrbt r3, [r1], #1) @ May fault
@@ -300,31 +300,32 @@ USER( ldrgebt r3, [r1], #1) @ May fault
300USER( ldrgtbt r3, [r1], #1) @ May fault 300USER( ldrgtbt r3, [r1], #1) @ May fault
301 strgtb r3, [r0], #1 301 strgtb r3, [r0], #1
302 sub r2, r2, ip 302 sub r2, r2, ip
303 b .cfu_dest_aligned 303 b .Lcfu_dest_aligned
304 304
305ENTRY(__arch_copy_from_user) 305ENTRY(__arch_copy_from_user)
306 stmfd sp!, {r0, r2, r4 - r7, lr} 306 stmfd sp!, {r0, r2, r4 - r7, lr}
307 cmp r2, #4 307 cmp r2, #4
308 blt .cfu_not_enough 308 blt .Lcfu_not_enough
309 ands ip, r0, #3 309 ands ip, r0, #3
310 bne .cfu_dest_not_aligned 310 bne .Lcfu_dest_not_aligned
311.cfu_dest_aligned: 311.Lcfu_dest_aligned:
312 ands ip, r1, #3 312 ands ip, r1, #3
313 bne .cfu_src_not_aligned 313 bne .Lcfu_src_not_aligned
314
314/* 315/*
315 * Seeing as there has to be at least 8 bytes to copy, we can 316 * Seeing as there has to be at least 8 bytes to copy, we can
316 * copy one word, and force a user-mode page fault... 317 * copy one word, and force a user-mode page fault...
317 */ 318 */
318 319
319.cfu_0fupi: subs r2, r2, #4 320.Lcfu_0fupi: subs r2, r2, #4
320 addmi ip, r2, #4 321 addmi ip, r2, #4
321 bmi .cfu_0nowords 322 bmi .Lcfu_0nowords
322USER( ldrt r3, [r1], #4) 323USER( ldrt r3, [r1], #4)
323 str r3, [r0], #4 324 str r3, [r0], #4
324 mov ip, r1, lsl #32 - PAGE_SHIFT @ On each page, use a ld/st??t instruction 325 mov ip, r1, lsl #32 - PAGE_SHIFT @ On each page, use a ld/st??t instruction
325 rsb ip, ip, #0 326 rsb ip, ip, #0
326 movs ip, ip, lsr #32 - PAGE_SHIFT 327 movs ip, ip, lsr #32 - PAGE_SHIFT
327 beq .cfu_0fupi 328 beq .Lcfu_0fupi
328/* 329/*
329 * ip = max no. of bytes to copy before needing another "strt" insn 330 * ip = max no. of bytes to copy before needing another "strt" insn
330 */ 331 */
@@ -332,16 +333,16 @@ USER( ldrt r3, [r1], #4)
332 movlt ip, r2 333 movlt ip, r2
333 sub r2, r2, ip 334 sub r2, r2, ip
334 subs ip, ip, #32 335 subs ip, ip, #32
335 blt .cfu_0rem8lp 336 blt .Lcfu_0rem8lp
336 337
337.cfu_0cpy8lp: ldmia r1!, {r3 - r6} @ Shouldnt fault 338.Lcfu_0cpy8lp: ldmia r1!, {r3 - r6} @ Shouldnt fault
338 stmia r0!, {r3 - r6} 339 stmia r0!, {r3 - r6}
339 ldmia r1!, {r3 - r6} @ Shouldnt fault 340 ldmia r1!, {r3 - r6} @ Shouldnt fault
340 subs ip, ip, #32 341 subs ip, ip, #32
341 stmia r0!, {r3 - r6} 342 stmia r0!, {r3 - r6}
342 bpl .cfu_0cpy8lp 343 bpl .Lcfu_0cpy8lp
343 344
344.cfu_0rem8lp: cmn ip, #16 345.Lcfu_0rem8lp: cmn ip, #16
345 ldmgeia r1!, {r3 - r6} @ Shouldnt fault 346 ldmgeia r1!, {r3 - r6} @ Shouldnt fault
346 stmgeia r0!, {r3 - r6} 347 stmgeia r0!, {r3 - r6}
347 tst ip, #8 348 tst ip, #8
@@ -351,34 +352,34 @@ USER( ldrt r3, [r1], #4)
351 ldrnet r3, [r1], #4 @ Shouldnt fault 352 ldrnet r3, [r1], #4 @ Shouldnt fault
352 strne r3, [r0], #4 353 strne r3, [r0], #4
353 ands ip, ip, #3 354 ands ip, ip, #3
354 beq .cfu_0fupi 355 beq .Lcfu_0fupi
355.cfu_0nowords: teq ip, #0 356.Lcfu_0nowords: teq ip, #0
356 beq .cfu_finished 357 beq .Lcfu_finished
357.cfu_nowords: cmp ip, #2 358.Lcfu_nowords: cmp ip, #2
358USER( ldrbt r3, [r1], #1) @ May fault 359USER( ldrbt r3, [r1], #1) @ May fault
359 strb r3, [r0], #1 360 strb r3, [r0], #1
360USER( ldrgebt r3, [r1], #1) @ May fault 361USER( ldrgebt r3, [r1], #1) @ May fault
361 strgeb r3, [r0], #1 362 strgeb r3, [r0], #1
362USER( ldrgtbt r3, [r1], #1) @ May fault 363USER( ldrgtbt r3, [r1], #1) @ May fault
363 strgtb r3, [r0], #1 364 strgtb r3, [r0], #1
364 b .cfu_finished 365 b .Lcfu_finished
365 366
366.cfu_not_enough: 367.Lcfu_not_enough:
367 movs ip, r2 368 movs ip, r2
368 bne .cfu_nowords 369 bne .Lcfu_nowords
369.cfu_finished: mov r0, #0 370.Lcfu_finished: mov r0, #0
370 add sp, sp, #8 371 add sp, sp, #8
371 LOADREGS(fd,sp!,{r4 - r7, pc}) 372 LOADREGS(fd,sp!,{r4 - r7, pc})
372 373
373.cfu_src_not_aligned: 374.Lcfu_src_not_aligned:
374 bic r1, r1, #3 375 bic r1, r1, #3
375USER( ldrt r7, [r1], #4) @ May fault 376USER( ldrt r7, [r1], #4) @ May fault
376 cmp ip, #2 377 cmp ip, #2
377 bgt .cfu_3fupi 378 bgt .Lcfu_3fupi
378 beq .cfu_2fupi 379 beq .Lcfu_2fupi
379.cfu_1fupi: subs r2, r2, #4 380.Lcfu_1fupi: subs r2, r2, #4
380 addmi ip, r2, #4 381 addmi ip, r2, #4
381 bmi .cfu_1nowords 382 bmi .Lcfu_1nowords
382 mov r3, r7, pull #8 383 mov r3, r7, pull #8
383USER( ldrt r7, [r1], #4) @ May fault 384USER( ldrt r7, [r1], #4) @ May fault
384 orr r3, r3, r7, push #24 385 orr r3, r3, r7, push #24
@@ -386,14 +387,14 @@ USER( ldrt r7, [r1], #4) @ May fault
386 mov ip, r1, lsl #32 - PAGE_SHIFT 387 mov ip, r1, lsl #32 - PAGE_SHIFT
387 rsb ip, ip, #0 388 rsb ip, ip, #0
388 movs ip, ip, lsr #32 - PAGE_SHIFT 389 movs ip, ip, lsr #32 - PAGE_SHIFT
389 beq .cfu_1fupi 390 beq .Lcfu_1fupi
390 cmp r2, ip 391 cmp r2, ip
391 movlt ip, r2 392 movlt ip, r2
392 sub r2, r2, ip 393 sub r2, r2, ip
393 subs ip, ip, #16 394 subs ip, ip, #16
394 blt .cfu_1rem8lp 395 blt .Lcfu_1rem8lp
395 396
396.cfu_1cpy8lp: mov r3, r7, pull #8 397.Lcfu_1cpy8lp: mov r3, r7, pull #8
397 ldmia r1!, {r4 - r7} @ Shouldnt fault 398 ldmia r1!, {r4 - r7} @ Shouldnt fault
398 subs ip, ip, #16 399 subs ip, ip, #16
399 orr r3, r3, r4, push #24 400 orr r3, r3, r4, push #24
@@ -404,9 +405,9 @@ USER( ldrt r7, [r1], #4) @ May fault
404 mov r6, r6, pull #8 405 mov r6, r6, pull #8
405 orr r6, r6, r7, push #24 406 orr r6, r6, r7, push #24
406 stmia r0!, {r3 - r6} 407 stmia r0!, {r3 - r6}
407 bpl .cfu_1cpy8lp 408 bpl .Lcfu_1cpy8lp
408 409
409.cfu_1rem8lp: tst ip, #8 410.Lcfu_1rem8lp: tst ip, #8
410 movne r3, r7, pull #8 411 movne r3, r7, pull #8
411 ldmneia r1!, {r4, r7} @ Shouldnt fault 412 ldmneia r1!, {r4, r7} @ Shouldnt fault
412 orrne r3, r3, r4, push #24 413 orrne r3, r3, r4, push #24
@@ -419,21 +420,21 @@ USER( ldrnet r7, [r1], #4) @ May fault
419 orrne r3, r3, r7, push #24 420 orrne r3, r3, r7, push #24
420 strne r3, [r0], #4 421 strne r3, [r0], #4
421 ands ip, ip, #3 422 ands ip, ip, #3
422 beq .cfu_1fupi 423 beq .Lcfu_1fupi
423.cfu_1nowords: mov r3, r7, get_byte_1 424.Lcfu_1nowords: mov r3, r7, get_byte_1
424 teq ip, #0 425 teq ip, #0
425 beq .cfu_finished 426 beq .Lcfu_finished
426 cmp ip, #2 427 cmp ip, #2
427 strb r3, [r0], #1 428 strb r3, [r0], #1
428 movge r3, r7, get_byte_2 429 movge r3, r7, get_byte_2
429 strgeb r3, [r0], #1 430 strgeb r3, [r0], #1
430 movgt r3, r7, get_byte_3 431 movgt r3, r7, get_byte_3
431 strgtb r3, [r0], #1 432 strgtb r3, [r0], #1
432 b .cfu_finished 433 b .Lcfu_finished
433 434
434.cfu_2fupi: subs r2, r2, #4 435.Lcfu_2fupi: subs r2, r2, #4
435 addmi ip, r2, #4 436 addmi ip, r2, #4
436 bmi .cfu_2nowords 437 bmi .Lcfu_2nowords
437 mov r3, r7, pull #16 438 mov r3, r7, pull #16
438USER( ldrt r7, [r1], #4) @ May fault 439USER( ldrt r7, [r1], #4) @ May fault
439 orr r3, r3, r7, push #16 440 orr r3, r3, r7, push #16
@@ -441,14 +442,15 @@ USER( ldrt r7, [r1], #4) @ May fault
441 mov ip, r1, lsl #32 - PAGE_SHIFT 442 mov ip, r1, lsl #32 - PAGE_SHIFT
442 rsb ip, ip, #0 443 rsb ip, ip, #0
443 movs ip, ip, lsr #32 - PAGE_SHIFT 444 movs ip, ip, lsr #32 - PAGE_SHIFT
444 beq .cfu_2fupi 445 beq .Lcfu_2fupi
445 cmp r2, ip 446 cmp r2, ip
446 movlt ip, r2 447 movlt ip, r2
447 sub r2, r2, ip 448 sub r2, r2, ip
448 subs ip, ip, #16 449 subs ip, ip, #16
449 blt .cfu_2rem8lp 450 blt .Lcfu_2rem8lp
451
450 452
451.cfu_2cpy8lp: mov r3, r7, pull #16 453.Lcfu_2cpy8lp: mov r3, r7, pull #16
452 ldmia r1!, {r4 - r7} @ Shouldnt fault 454 ldmia r1!, {r4 - r7} @ Shouldnt fault
453 subs ip, ip, #16 455 subs ip, ip, #16
454 orr r3, r3, r4, push #16 456 orr r3, r3, r4, push #16
@@ -459,9 +461,9 @@ USER( ldrt r7, [r1], #4) @ May fault
459 mov r6, r6, pull #16 461 mov r6, r6, pull #16
460 orr r6, r6, r7, push #16 462 orr r6, r6, r7, push #16
461 stmia r0!, {r3 - r6} 463 stmia r0!, {r3 - r6}
462 bpl .cfu_2cpy8lp 464 bpl .Lcfu_2cpy8lp
463 465
464.cfu_2rem8lp: tst ip, #8 466.Lcfu_2rem8lp: tst ip, #8
465 movne r3, r7, pull #16 467 movne r3, r7, pull #16
466 ldmneia r1!, {r4, r7} @ Shouldnt fault 468 ldmneia r1!, {r4, r7} @ Shouldnt fault
467 orrne r3, r3, r4, push #16 469 orrne r3, r3, r4, push #16
@@ -474,21 +476,21 @@ USER( ldrnet r7, [r1], #4) @ May fault
474 orrne r3, r3, r7, push #16 476 orrne r3, r3, r7, push #16
475 strne r3, [r0], #4 477 strne r3, [r0], #4
476 ands ip, ip, #3 478 ands ip, ip, #3
477 beq .cfu_2fupi 479 beq .Lcfu_2fupi
478.cfu_2nowords: mov r3, r7, get_byte_2 480.Lcfu_2nowords: mov r3, r7, get_byte_2
479 teq ip, #0 481 teq ip, #0
480 beq .cfu_finished 482 beq .Lcfu_finished
481 cmp ip, #2 483 cmp ip, #2
482 strb r3, [r0], #1 484 strb r3, [r0], #1
483 movge r3, r7, get_byte_3 485 movge r3, r7, get_byte_3
484 strgeb r3, [r0], #1 486 strgeb r3, [r0], #1
485USER( ldrgtbt r3, [r1], #0) @ May fault 487USER( ldrgtbt r3, [r1], #0) @ May fault
486 strgtb r3, [r0], #1 488 strgtb r3, [r0], #1
487 b .cfu_finished 489 b .Lcfu_finished
488 490
489.cfu_3fupi: subs r2, r2, #4 491.Lcfu_3fupi: subs r2, r2, #4
490 addmi ip, r2, #4 492 addmi ip, r2, #4
491 bmi .cfu_3nowords 493 bmi .Lcfu_3nowords
492 mov r3, r7, pull #24 494 mov r3, r7, pull #24
493USER( ldrt r7, [r1], #4) @ May fault 495USER( ldrt r7, [r1], #4) @ May fault
494 orr r3, r3, r7, push #8 496 orr r3, r3, r7, push #8
@@ -496,14 +498,14 @@ USER( ldrt r7, [r1], #4) @ May fault
496 mov ip, r1, lsl #32 - PAGE_SHIFT 498 mov ip, r1, lsl #32 - PAGE_SHIFT
497 rsb ip, ip, #0 499 rsb ip, ip, #0
498 movs ip, ip, lsr #32 - PAGE_SHIFT 500 movs ip, ip, lsr #32 - PAGE_SHIFT
499 beq .cfu_3fupi 501 beq .Lcfu_3fupi
500 cmp r2, ip 502 cmp r2, ip
501 movlt ip, r2 503 movlt ip, r2
502 sub r2, r2, ip 504 sub r2, r2, ip
503 subs ip, ip, #16 505 subs ip, ip, #16
504 blt .cfu_3rem8lp 506 blt .Lcfu_3rem8lp
505 507
506.cfu_3cpy8lp: mov r3, r7, pull #24 508.Lcfu_3cpy8lp: mov r3, r7, pull #24
507 ldmia r1!, {r4 - r7} @ Shouldnt fault 509 ldmia r1!, {r4 - r7} @ Shouldnt fault
508 orr r3, r3, r4, push #8 510 orr r3, r3, r4, push #8
509 mov r4, r4, pull #24 511 mov r4, r4, pull #24
@@ -514,9 +516,9 @@ USER( ldrt r7, [r1], #4) @ May fault
514 orr r6, r6, r7, push #8 516 orr r6, r6, r7, push #8
515 stmia r0!, {r3 - r6} 517 stmia r0!, {r3 - r6}
516 subs ip, ip, #16 518 subs ip, ip, #16
517 bpl .cfu_3cpy8lp 519 bpl .Lcfu_3cpy8lp
518 520
519.cfu_3rem8lp: tst ip, #8 521.Lcfu_3rem8lp: tst ip, #8
520 movne r3, r7, pull #24 522 movne r3, r7, pull #24
521 ldmneia r1!, {r4, r7} @ Shouldnt fault 523 ldmneia r1!, {r4, r7} @ Shouldnt fault
522 orrne r3, r3, r4, push #8 524 orrne r3, r3, r4, push #8
@@ -529,17 +531,17 @@ USER( ldrnet r7, [r1], #4) @ May fault
529 orrne r3, r3, r7, push #8 531 orrne r3, r3, r7, push #8
530 strne r3, [r0], #4 532 strne r3, [r0], #4
531 ands ip, ip, #3 533 ands ip, ip, #3
532 beq .cfu_3fupi 534 beq .Lcfu_3fupi
533.cfu_3nowords: mov r3, r7, get_byte_3 535.Lcfu_3nowords: mov r3, r7, get_byte_3
534 teq ip, #0 536 teq ip, #0
535 beq .cfu_finished 537 beq .Lcfu_finished
536 cmp ip, #2 538 cmp ip, #2
537 strb r3, [r0], #1 539 strb r3, [r0], #1
538USER( ldrgebt r3, [r1], #1) @ May fault 540USER( ldrgebt r3, [r1], #1) @ May fault
539 strgeb r3, [r0], #1 541 strgeb r3, [r0], #1
540USER( ldrgtbt r3, [r1], #1) @ May fault 542USER( ldrgtbt r3, [r1], #1) @ May fault
541 strgtb r3, [r0], #1 543 strgtb r3, [r0], #1
542 b .cfu_finished 544 b .Lcfu_finished
543 545
544 .section .fixup,"ax" 546 .section .fixup,"ax"
545 .align 0 547 .align 0
diff --git a/arch/arm/mach-pxa/corgi_ssp.c b/arch/arm/mach-pxa/corgi_ssp.c
index bdf10cfa9440..b371d723635f 100644
--- a/arch/arm/mach-pxa/corgi_ssp.c
+++ b/arch/arm/mach-pxa/corgi_ssp.c
@@ -191,7 +191,7 @@ void __init corgi_ssp_set_machinfo(struct corgissp_machinfo *machinfo)
191 ssp_machinfo = machinfo; 191 ssp_machinfo = machinfo;
192} 192}
193 193
194static int __init corgi_ssp_probe(struct device *dev) 194static int __init corgi_ssp_probe(struct platform_device *dev)
195{ 195{
196 int ret; 196 int ret;
197 197
@@ -216,13 +216,13 @@ static int __init corgi_ssp_probe(struct device *dev)
216 return ret; 216 return ret;
217} 217}
218 218
219static int corgi_ssp_remove(struct device *dev) 219static int corgi_ssp_remove(struct platform_device *dev)
220{ 220{
221 ssp_exit(&corgi_ssp_dev); 221 ssp_exit(&corgi_ssp_dev);
222 return 0; 222 return 0;
223} 223}
224 224
225static int corgi_ssp_suspend(struct device *dev, pm_message_t state) 225static int corgi_ssp_suspend(struct platform_device *dev, pm_message_t state)
226{ 226{
227 ssp_flush(&corgi_ssp_dev); 227 ssp_flush(&corgi_ssp_dev);
228 ssp_save_state(&corgi_ssp_dev,&corgi_ssp_state); 228 ssp_save_state(&corgi_ssp_dev,&corgi_ssp_state);
@@ -230,7 +230,7 @@ static int corgi_ssp_suspend(struct device *dev, pm_message_t state)
230 return 0; 230 return 0;
231} 231}
232 232
233static int corgi_ssp_resume(struct device *dev) 233static int corgi_ssp_resume(struct platform_device *dev)
234{ 234{
235 GPSR(ssp_machinfo->cs_lcdcon) = GPIO_bit(ssp_machinfo->cs_lcdcon); /* High - Disable LCD Control/Timing Gen */ 235 GPSR(ssp_machinfo->cs_lcdcon) = GPIO_bit(ssp_machinfo->cs_lcdcon); /* High - Disable LCD Control/Timing Gen */
236 GPSR(ssp_machinfo->cs_max1111) = GPIO_bit(ssp_machinfo->cs_max1111); /* High - Disable MAX1111*/ 236 GPSR(ssp_machinfo->cs_max1111) = GPIO_bit(ssp_machinfo->cs_max1111); /* High - Disable MAX1111*/
@@ -241,18 +241,19 @@ static int corgi_ssp_resume(struct device *dev)
241 return 0; 241 return 0;
242} 242}
243 243
244static struct device_driver corgissp_driver = { 244static struct platform_driver corgissp_driver = {
245 .name = "corgi-ssp",
246 .bus = &platform_bus_type,
247 .probe = corgi_ssp_probe, 245 .probe = corgi_ssp_probe,
248 .remove = corgi_ssp_remove, 246 .remove = corgi_ssp_remove,
249 .suspend = corgi_ssp_suspend, 247 .suspend = corgi_ssp_suspend,
250 .resume = corgi_ssp_resume, 248 .resume = corgi_ssp_resume,
249 .driver = {
250 .name = "corgi-ssp",
251 },
251}; 252};
252 253
253int __init corgi_ssp_init(void) 254int __init corgi_ssp_init(void)
254{ 255{
255 return driver_register(&corgissp_driver); 256 return platform_driver_register(&corgissp_driver);
256} 257}
257 258
258arch_initcall(corgi_ssp_init); 259arch_initcall(corgi_ssp_init);
diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c
index 69f1970646c6..9e02bc3712a0 100644
--- a/arch/arm/mach-sa1100/neponset.c
+++ b/arch/arm/mach-sa1100/neponset.c
@@ -137,7 +137,7 @@ static struct sa1100_port_fns neponset_port_fns __initdata = {
137 .get_mctrl = neponset_get_mctrl, 137 .get_mctrl = neponset_get_mctrl,
138}; 138};
139 139
140static int neponset_probe(struct device *dev) 140static int neponset_probe(struct platform_device *dev)
141{ 141{
142 sa1100_register_uart_fns(&neponset_port_fns); 142 sa1100_register_uart_fns(&neponset_port_fns);
143 143
@@ -178,27 +178,27 @@ static int neponset_probe(struct device *dev)
178/* 178/*
179 * LDM power management. 179 * LDM power management.
180 */ 180 */
181static int neponset_suspend(struct device *dev, pm_message_t state) 181static int neponset_suspend(struct platform_device *dev, pm_message_t state)
182{ 182{
183 /* 183 /*
184 * Save state. 184 * Save state.
185 */ 185 */
186 if (!dev->power.saved_state) 186 if (!dev->dev.power.saved_state)
187 dev->power.saved_state = kmalloc(sizeof(unsigned int), GFP_KERNEL); 187 dev->dev.power.saved_state = kmalloc(sizeof(unsigned int), GFP_KERNEL);
188 if (!dev->power.saved_state) 188 if (!dev->dev.power.saved_state)
189 return -ENOMEM; 189 return -ENOMEM;
190 190
191 *(unsigned int *)dev->power.saved_state = NCR_0; 191 *(unsigned int *)dev->dev.power.saved_state = NCR_0;
192 192
193 return 0; 193 return 0;
194} 194}
195 195
196static int neponset_resume(struct device *dev) 196static int neponset_resume(struct platform_device *dev)
197{ 197{
198 if (dev->power.saved_state) { 198 if (dev->dev.power.saved_state) {
199 NCR_0 = *(unsigned int *)dev->power.saved_state; 199 NCR_0 = *(unsigned int *)dev->dev.power.saved_state;
200 kfree(dev->power.saved_state); 200 kfree(dev->dev.power.saved_state);
201 dev->power.saved_state = NULL; 201 dev->dev.power.saved_state = NULL;
202 } 202 }
203 203
204 return 0; 204 return 0;
@@ -209,12 +209,13 @@ static int neponset_resume(struct device *dev)
209#define neponset_resume NULL 209#define neponset_resume NULL
210#endif 210#endif
211 211
212static struct device_driver neponset_device_driver = { 212static struct platform_driver neponset_device_driver = {
213 .name = "neponset",
214 .bus = &platform_bus_type,
215 .probe = neponset_probe, 213 .probe = neponset_probe,
216 .suspend = neponset_suspend, 214 .suspend = neponset_suspend,
217 .resume = neponset_resume, 215 .resume = neponset_resume,
216 .driver = {
217 .name = "neponset",
218 },
218}; 219};
219 220
220static struct resource neponset_resources[] = { 221static struct resource neponset_resources[] = {
@@ -293,7 +294,7 @@ static struct platform_device *devices[] __initdata = {
293 294
294static int __init neponset_init(void) 295static int __init neponset_init(void)
295{ 296{
296 driver_register(&neponset_device_driver); 297 platform_driver_register(&neponset_device_driver);
297 298
298 /* 299 /*
299 * The Neponset is only present on the Assabet machine type. 300 * The Neponset is only present on the Assabet machine type.
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
index ae7c64b8cec3..048c9c19aa4f 100644
--- a/arch/arm/tools/mach-types
+++ b/arch/arm/tools/mach-types
@@ -12,7 +12,7 @@
12# 12#
13# http://www.arm.linux.org.uk/developer/machines/?action=new 13# http://www.arm.linux.org.uk/developer/machines/?action=new
14# 14#
15# Last update: Mon Oct 10 09:46:25 2005 15# Last update: Fri Nov 11 21:55:04 2005
16# 16#
17# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number 17# machine_is_xxx CONFIG_xxxx MACH_TYPE_xxx number
18# 18#
@@ -460,7 +460,7 @@ esl_sarva MACH_ESL_SARVA ESL_SARVA 443
460xm250 MACH_XM250 XM250 444 460xm250 MACH_XM250 XM250 444
461t6tc1xb MACH_T6TC1XB T6TC1XB 445 461t6tc1xb MACH_T6TC1XB T6TC1XB 445
462ess710 MACH_ESS710 ESS710 446 462ess710 MACH_ESS710 ESS710 446
463mx31ads MACH_MX3ADS MX3ADS 447 463mx31ads MACH_MX31ADS MX31ADS 447
464himalaya MACH_HIMALAYA HIMALAYA 448 464himalaya MACH_HIMALAYA HIMALAYA 448
465bolfenk MACH_BOLFENK BOLFENK 449 465bolfenk MACH_BOLFENK BOLFENK 449
466at91rm9200kr MACH_AT91RM9200KR AT91RM9200KR 450 466at91rm9200kr MACH_AT91RM9200KR AT91RM9200KR 450
@@ -802,7 +802,7 @@ cpuat91 MACH_CPUAT91 CPUAT91 787
802rea9200 MACH_REA9200 REA9200 788 802rea9200 MACH_REA9200 REA9200 788
803acts_pune_sa1110 MACH_ACTS_PUNE_SA1110 ACTS_PUNE_SA1110 789 803acts_pune_sa1110 MACH_ACTS_PUNE_SA1110 ACTS_PUNE_SA1110 789
804ixp425 MACH_IXP425 IXP425 790 804ixp425 MACH_IXP425 IXP425 790
805argonplusodyssey MACH_ODYSSEY ODYSSEY 791 805argonplusodyssey MACH_ARGONPLUSODYSSEY ARGONPLUSODYSSEY 791
806perch MACH_PERCH PERCH 792 806perch MACH_PERCH PERCH 792
807eis05r1 MACH_EIS05R1 EIS05R1 793 807eis05r1 MACH_EIS05R1 EIS05R1 793
808pepperpad MACH_PEPPERPAD PEPPERPAD 794 808pepperpad MACH_PEPPERPAD PEPPERPAD 794
@@ -816,7 +816,7 @@ iq_nextgen_c MACH_IQ_NEXTGEN_C IQ_NEXTGEN_C 801
816iq_nextgen_d MACH_IQ_NEXTGEN_D IQ_NEXTGEN_D 802 816iq_nextgen_d MACH_IQ_NEXTGEN_D IQ_NEXTGEN_D 802
817iq_nextgen_e MACH_IQ_NEXTGEN_E IQ_NEXTGEN_E 803 817iq_nextgen_e MACH_IQ_NEXTGEN_E IQ_NEXTGEN_E 803
818mallow_at91 MACH_MALLOW_AT91 MALLOW_AT91 804 818mallow_at91 MACH_MALLOW_AT91 MALLOW_AT91 804
819cybertracker MACH_CYBERTRACKER CYBERTRACKER 805 819cybertracker_i MACH_CYBERTRACKER_I CYBERTRACKER_I 805
820gesbc931x MACH_GESBC931X GESBC931X 806 820gesbc931x MACH_GESBC931X GESBC931X 806
821centipad MACH_CENTIPAD CENTIPAD 807 821centipad MACH_CENTIPAD CENTIPAD 807
822armsoc MACH_ARMSOC ARMSOC 808 822armsoc MACH_ARMSOC ARMSOC 808
@@ -869,3 +869,38 @@ davinci_dvdp MACH_DAVINCI_DVDP DAVINCI_DVDP 854
869htcuniversal MACH_HTCUNIVERSAL HTCUNIVERSAL 855 869htcuniversal MACH_HTCUNIVERSAL HTCUNIVERSAL 855
870tpad MACH_TPAD TPAD 856 870tpad MACH_TPAD TPAD 856
871roverp3 MACH_ROVERP3 ROVERP3 857 871roverp3 MACH_ROVERP3 ROVERP3 857
872jornada928 MACH_JORNADA928 JORNADA928 858
873mv88fxx81 MACH_MV88FXX81 MV88FXX81 859
874stmp36xx MACH_STMP36XX STMP36XX 860
875sxni79524 MACH_SXNI79524 SXNI79524 861
876ams_delta MACH_AMS_DELTA AMS_DELTA 862
877uranium MACH_URANIUM URANIUM 863
878ucon MACH_UCON UCON 864
879nas100d MACH_NAS100D NAS100D 865
880l083 MACH_L083_1000 L083_1000 866
881ezx MACH_EZX EZX 867
882pnx5220 MACH_PNX5220 PNX5220 868
883butte MACH_BUTTE BUTTE 869
884srm2 MACH_SRM2 SRM2 870
885dsbr MACH_DSBR DSBR 871
886crystalball MACH_CRYSTALBALL CRYSTALBALL 872
887tinypxa27x MACH_TINYPXA27X TINYPXA27X 873
888herbie MACH_HERBIE HERBIE 874
889magician MACH_MAGICIAN MAGICIAN 875
890cm4002 MACH_CM4002 CM4002 876
891b4 MACH_B4 B4 877
892maui MACH_MAUI MAUI 878
893cybertracker_g MACH_CYBERTRACKER_G CYBERTRACKER_G 879
894nxdkn MACH_NXDKN NXDKN 880
895mio8390 MACH_MIO8390 MIO8390 881
896omi_board MACH_OMI_BOARD OMI_BOARD 882
897mx21civ MACH_MX21CIV MX21CIV 883
898mahi_cdac MACH_MAHI_CDAC MAHI_CDAC 884
899xscale_palmtx MACH_XSCALE_PALMTX XSCALE_PALMTX 885
900arch_s3c2413 MACH_ARCH_S3C2413 ARCH_S3C2413 886
901s3c2413 MACH_S3C2413 S3C2413 887
902samsys_ep0 MACH_SAMSYS_EP0 SAMSYS_EP0 888
903wg302v1 MACH_WG302V1 WG302V1 889
904wg302v2 MACH_WG302V2 WG302V2 890
905eb42x MACH_EB42X EB42X 891
906iq331es MACH_IQ331ES IQ331ES 892
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index d4de8a4814be..8796e12c56f3 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -164,6 +164,19 @@ config IA64_PAGE_SIZE_64KB
164 164
165endchoice 165endchoice
166 166
167choice
168 prompt "Page Table Levels"
169 default PGTABLE_3
170
171config PGTABLE_3
172 bool "3 Levels"
173
174config PGTABLE_4
175 depends on !IA64_PAGE_SIZE_64KB
176 bool "4 Levels"
177
178endchoice
179
167source kernel/Kconfig.hz 180source kernel/Kconfig.hz
168 181
169config IA64_BRL_EMU 182config IA64_BRL_EMU
diff --git a/arch/ia64/configs/sn2_defconfig b/arch/ia64/configs/sn2_defconfig
index 08112ab38468..87cfd31a4a39 100644
--- a/arch/ia64/configs/sn2_defconfig
+++ b/arch/ia64/configs/sn2_defconfig
@@ -80,6 +80,8 @@ CONFIG_MCKINLEY=y
80# CONFIG_IA64_PAGE_SIZE_8KB is not set 80# CONFIG_IA64_PAGE_SIZE_8KB is not set
81CONFIG_IA64_PAGE_SIZE_16KB=y 81CONFIG_IA64_PAGE_SIZE_16KB=y
82# CONFIG_IA64_PAGE_SIZE_64KB is not set 82# CONFIG_IA64_PAGE_SIZE_64KB is not set
83# CONFIG_PGTABLE_3 is not set
84CONFIG_PGTABLE_4=y
83# CONFIG_HZ_100 is not set 85# CONFIG_HZ_100 is not set
84CONFIG_HZ_250=y 86CONFIG_HZ_250=y
85# CONFIG_HZ_1000 is not set 87# CONFIG_HZ_1000 is not set
diff --git a/arch/ia64/defconfig b/arch/ia64/defconfig
index 6e3f147e03e5..275a26c6e5aa 100644
--- a/arch/ia64/defconfig
+++ b/arch/ia64/defconfig
@@ -82,6 +82,8 @@ CONFIG_MCKINLEY=y
82# CONFIG_IA64_PAGE_SIZE_8KB is not set 82# CONFIG_IA64_PAGE_SIZE_8KB is not set
83CONFIG_IA64_PAGE_SIZE_16KB=y 83CONFIG_IA64_PAGE_SIZE_16KB=y
84# CONFIG_IA64_PAGE_SIZE_64KB is not set 84# CONFIG_IA64_PAGE_SIZE_64KB is not set
85CONFIG_PGTABLE_3=y
86# CONFIG_PGTABLE_4 is not set
85# CONFIG_HZ_100 is not set 87# CONFIG_HZ_100 is not set
86CONFIG_HZ_250=y 88CONFIG_HZ_250=y
87# CONFIG_HZ_1000 is not set 89# CONFIG_HZ_1000 is not set
diff --git a/arch/ia64/kernel/ivt.S b/arch/ia64/kernel/ivt.S
index c13ca0d49c4a..e06f21f60dc5 100644
--- a/arch/ia64/kernel/ivt.S
+++ b/arch/ia64/kernel/ivt.S
@@ -114,7 +114,7 @@ ENTRY(vhpt_miss)
114 shl r21=r16,3 // shift bit 60 into sign bit 114 shl r21=r16,3 // shift bit 60 into sign bit
115 shr.u r17=r16,61 // get the region number into r17 115 shr.u r17=r16,61 // get the region number into r17
116 ;; 116 ;;
117 shr r22=r21,3 117 shr.u r22=r21,3
118#ifdef CONFIG_HUGETLB_PAGE 118#ifdef CONFIG_HUGETLB_PAGE
119 extr.u r26=r25,2,6 119 extr.u r26=r25,2,6
120 ;; 120 ;;
@@ -140,20 +140,34 @@ ENTRY(vhpt_miss)
140(p6) dep r17=r18,r19,3,(PAGE_SHIFT-3) // r17=PTA + IFA(33,42)*8 140(p6) dep r17=r18,r19,3,(PAGE_SHIFT-3) // r17=PTA + IFA(33,42)*8
141(p7) dep r17=r18,r17,3,(PAGE_SHIFT-6) // r17=PTA + (((IFA(61,63) << 7) | IFA(33,39))*8) 141(p7) dep r17=r18,r17,3,(PAGE_SHIFT-6) // r17=PTA + (((IFA(61,63) << 7) | IFA(33,39))*8)
142 cmp.eq p7,p6=0,r21 // unused address bits all zeroes? 142 cmp.eq p7,p6=0,r21 // unused address bits all zeroes?
143 shr.u r18=r22,PMD_SHIFT // shift L2 index into position 143#ifdef CONFIG_PGTABLE_4
144 shr.u r28=r22,PUD_SHIFT // shift L2 index into position
145#else
146 shr.u r18=r22,PMD_SHIFT // shift L3 index into position
147#endif
144 ;; 148 ;;
145 ld8 r17=[r17] // fetch the L1 entry (may be 0) 149 ld8 r17=[r17] // fetch the L1 entry (may be 0)
146 ;; 150 ;;
147(p7) cmp.eq p6,p7=r17,r0 // was L1 entry NULL? 151(p7) cmp.eq p6,p7=r17,r0 // was L1 entry NULL?
148 dep r17=r18,r17,3,(PAGE_SHIFT-3) // compute address of L2 page table entry 152#ifdef CONFIG_PGTABLE_4
153 dep r28=r28,r17,3,(PAGE_SHIFT-3) // compute address of L2 page table entry
154 ;;
155 shr.u r18=r22,PMD_SHIFT // shift L3 index into position
156(p7) ld8 r29=[r28] // fetch the L2 entry (may be 0)
149 ;; 157 ;;
150(p7) ld8 r20=[r17] // fetch the L2 entry (may be 0) 158(p7) cmp.eq.or.andcm p6,p7=r29,r0 // was L2 entry NULL?
151 shr.u r19=r22,PAGE_SHIFT // shift L3 index into position 159 dep r17=r18,r29,3,(PAGE_SHIFT-3) // compute address of L3 page table entry
160#else
161 dep r17=r18,r17,3,(PAGE_SHIFT-3) // compute address of L3 page table entry
162#endif
152 ;; 163 ;;
153(p7) cmp.eq.or.andcm p6,p7=r20,r0 // was L2 entry NULL? 164(p7) ld8 r20=[r17] // fetch the L3 entry (may be 0)
154 dep r21=r19,r20,3,(PAGE_SHIFT-3) // compute address of L3 page table entry 165 shr.u r19=r22,PAGE_SHIFT // shift L4 index into position
155 ;; 166 ;;
156(p7) ld8 r18=[r21] // read the L3 PTE 167(p7) cmp.eq.or.andcm p6,p7=r20,r0 // was L3 entry NULL?
168 dep r21=r19,r20,3,(PAGE_SHIFT-3) // compute address of L4 page table entry
169 ;;
170(p7) ld8 r18=[r21] // read the L4 PTE
157 mov r19=cr.isr // cr.isr bit 0 tells us if this is an insn miss 171 mov r19=cr.isr // cr.isr bit 0 tells us if this is an insn miss
158 ;; 172 ;;
159(p7) tbit.z p6,p7=r18,_PAGE_P_BIT // page present bit cleared? 173(p7) tbit.z p6,p7=r18,_PAGE_P_BIT // page present bit cleared?
@@ -192,14 +206,21 @@ ENTRY(vhpt_miss)
192 * between reading the pagetable and the "itc". If so, flush the entry we 206 * between reading the pagetable and the "itc". If so, flush the entry we
193 * inserted and retry. 207 * inserted and retry.
194 */ 208 */
195 ld8 r25=[r21] // read L3 PTE again 209 ld8 r25=[r21] // read L4 entry again
196 ld8 r26=[r17] // read L2 entry again 210 ld8 r26=[r17] // read L3 PTE again
211#ifdef CONFIG_PGTABLE_4
212 ld8 r18=[r28] // read L2 entry again
213#endif
214 cmp.ne p6,p7=r0,r0
197 ;; 215 ;;
198 cmp.ne p6,p7=r26,r20 // did L2 entry change 216 cmp.ne.or.andcm p6,p7=r26,r20 // did L3 entry change
217#ifdef CONFIG_PGTABLE_4
218 cmp.ne.or.andcm p6,p7=r29,r18 // did L4 PTE change
219#endif
199 mov r27=PAGE_SHIFT<<2 220 mov r27=PAGE_SHIFT<<2
200 ;; 221 ;;
201(p6) ptc.l r22,r27 // purge PTE page translation 222(p6) ptc.l r22,r27 // purge PTE page translation
202(p7) cmp.ne.or.andcm p6,p7=r25,r18 // did L3 PTE change 223(p7) cmp.ne.or.andcm p6,p7=r25,r18 // did L4 PTE change
203 ;; 224 ;;
204(p6) ptc.l r16,r27 // purge translation 225(p6) ptc.l r16,r27 // purge translation
205#endif 226#endif
@@ -432,18 +453,30 @@ ENTRY(nested_dtlb_miss)
432(p6) dep r17=r18,r19,3,(PAGE_SHIFT-3) // r17=PTA + IFA(33,42)*8 453(p6) dep r17=r18,r19,3,(PAGE_SHIFT-3) // r17=PTA + IFA(33,42)*8
433(p7) dep r17=r18,r17,3,(PAGE_SHIFT-6) // r17=PTA + (((IFA(61,63) << 7) | IFA(33,39))*8) 454(p7) dep r17=r18,r17,3,(PAGE_SHIFT-6) // r17=PTA + (((IFA(61,63) << 7) | IFA(33,39))*8)
434 cmp.eq p7,p6=0,r21 // unused address bits all zeroes? 455 cmp.eq p7,p6=0,r21 // unused address bits all zeroes?
435 shr.u r18=r22,PMD_SHIFT // shift L2 index into position 456#ifdef CONFIG_PGTABLE_4
457 shr.u r18=r22,PUD_SHIFT // shift L2 index into position
458#else
459 shr.u r18=r22,PMD_SHIFT // shift L3 index into position
460#endif
436 ;; 461 ;;
437 ld8 r17=[r17] // fetch the L1 entry (may be 0) 462 ld8 r17=[r17] // fetch the L1 entry (may be 0)
438 ;; 463 ;;
439(p7) cmp.eq p6,p7=r17,r0 // was L1 entry NULL? 464(p7) cmp.eq p6,p7=r17,r0 // was L1 entry NULL?
440 dep r17=r18,r17,3,(PAGE_SHIFT-3) // compute address of L2 page table entry 465 dep r17=r18,r17,3,(PAGE_SHIFT-3) // compute address of L2 page table entry
441 ;; 466 ;;
467#ifdef CONFIG_PGTABLE_4
442(p7) ld8 r17=[r17] // fetch the L2 entry (may be 0) 468(p7) ld8 r17=[r17] // fetch the L2 entry (may be 0)
443 shr.u r19=r22,PAGE_SHIFT // shift L3 index into position 469 shr.u r18=r22,PMD_SHIFT // shift L3 index into position
444 ;; 470 ;;
445(p7) cmp.eq.or.andcm p6,p7=r17,r0 // was L2 entry NULL? 471(p7) cmp.eq.or.andcm p6,p7=r17,r0 // was L2 entry NULL?
446 dep r17=r19,r17,3,(PAGE_SHIFT-3) // compute address of L3 page table entry 472 dep r17=r18,r17,3,(PAGE_SHIFT-3) // compute address of L2 page table entry
473 ;;
474#endif
475(p7) ld8 r17=[r17] // fetch the L3 entry (may be 0)
476 shr.u r19=r22,PAGE_SHIFT // shift L4 index into position
477 ;;
478(p7) cmp.eq.or.andcm p6,p7=r17,r0 // was L3 entry NULL?
479 dep r17=r19,r17,3,(PAGE_SHIFT-3) // compute address of L4 page table entry
447(p6) br.cond.spnt page_fault 480(p6) br.cond.spnt page_fault
448 mov b0=r30 481 mov b0=r30
449 br.sptk.many b0 // return to continuation point 482 br.sptk.many b0 // return to continuation point
diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c
index 0fb579ef18c2..e510dce9971f 100644
--- a/arch/ia64/sn/kernel/setup.c
+++ b/arch/ia64/sn/kernel/setup.c
@@ -30,6 +30,7 @@
30#include <linux/root_dev.h> 30#include <linux/root_dev.h>
31#include <linux/nodemask.h> 31#include <linux/nodemask.h>
32#include <linux/pm.h> 32#include <linux/pm.h>
33#include <linux/efi.h>
33 34
34#include <asm/io.h> 35#include <asm/io.h>
35#include <asm/sal.h> 36#include <asm/sal.h>
@@ -242,6 +243,135 @@ static void __init sn_check_for_wars(void)
242 } 243 }
243} 244}
244 245
246/*
247 * Scan the EFI PCDP table (if it exists) for an acceptable VGA console
248 * output device. If one exists, pick it and set sn_legacy_{io,mem} to
249 * reflect the bus offsets needed to address it.
250 *
251 * Since pcdp support in SN is not supported in the 2.4 kernel (or at least
252 * the one lbs is based on) just declare the needed structs here.
253 *
254 * Reference spec http://www.dig64.org/specifications/DIG64_PCDPv20.pdf
255 *
256 * Returns 0 if no acceptable vga is found, !0 otherwise.
257 *
258 * Note: This stuff is duped here because Altix requires the PCDP to
259 * locate a usable VGA device due to lack of proper ACPI support. Structures
260 * could be used from drivers/firmware/pcdp.h, but it was decided that moving
261 * this file to a more public location just for Altix use was undesireable.
262 */
263
264struct hcdp_uart_desc {
265 u8 pad[45];
266};
267
268struct pcdp {
269 u8 signature[4]; /* should be 'HCDP' */
270 u32 length;
271 u8 rev; /* should be >=3 for pcdp, <3 for hcdp */
272 u8 sum;
273 u8 oem_id[6];
274 u64 oem_tableid;
275 u32 oem_rev;
276 u32 creator_id;
277 u32 creator_rev;
278 u32 num_type0;
279 struct hcdp_uart_desc uart[0]; /* num_type0 of these */
280 /* pcdp descriptors follow */
281} __attribute__((packed));
282
283struct pcdp_device_desc {
284 u8 type;
285 u8 primary;
286 u16 length;
287 u16 index;
288 /* interconnect specific structure follows */
289 /* device specific structure follows that */
290} __attribute__((packed));
291
292struct pcdp_interface_pci {
293 u8 type; /* 1 == pci */
294 u8 reserved;
295 u16 length;
296 u8 segment;
297 u8 bus;
298 u8 dev;
299 u8 fun;
300 u16 devid;
301 u16 vendid;
302 u32 acpi_interrupt;
303 u64 mmio_tra;
304 u64 ioport_tra;
305 u8 flags;
306 u8 translation;
307} __attribute__((packed));
308
309struct pcdp_vga_device {
310 u8 num_eas_desc;
311 /* ACPI Extended Address Space Desc follows */
312} __attribute__((packed));
313
314/* from pcdp_device_desc.primary */
315#define PCDP_PRIMARY_CONSOLE 0x01
316
317/* from pcdp_device_desc.type */
318#define PCDP_CONSOLE_INOUT 0x0
319#define PCDP_CONSOLE_DEBUG 0x1
320#define PCDP_CONSOLE_OUT 0x2
321#define PCDP_CONSOLE_IN 0x3
322#define PCDP_CONSOLE_TYPE_VGA 0x8
323
324#define PCDP_CONSOLE_VGA (PCDP_CONSOLE_TYPE_VGA | PCDP_CONSOLE_OUT)
325
326/* from pcdp_interface_pci.type */
327#define PCDP_IF_PCI 1
328
329/* from pcdp_interface_pci.translation */
330#define PCDP_PCI_TRANS_IOPORT 0x02
331#define PCDP_PCI_TRANS_MMIO 0x01
332
333static void
334sn_scan_pcdp(void)
335{
336 u8 *bp;
337 struct pcdp *pcdp;
338 struct pcdp_device_desc device;
339 struct pcdp_interface_pci if_pci;
340 extern struct efi efi;
341
342 pcdp = efi.hcdp;
343 if (! pcdp)
344 return; /* no hcdp/pcdp table */
345
346 if (pcdp->rev < 3)
347 return; /* only support PCDP (rev >= 3) */
348
349 for (bp = (u8 *)&pcdp->uart[pcdp->num_type0];
350 bp < (u8 *)pcdp + pcdp->length;
351 bp += device.length) {
352 memcpy(&device, bp, sizeof(device));
353 if (! (device.primary & PCDP_PRIMARY_CONSOLE))
354 continue; /* not primary console */
355
356 if (device.type != PCDP_CONSOLE_VGA)
357 continue; /* not VGA descriptor */
358
359 memcpy(&if_pci, bp+sizeof(device), sizeof(if_pci));
360 if (if_pci.type != PCDP_IF_PCI)
361 continue; /* not PCI interconnect */
362
363 if (if_pci.translation & PCDP_PCI_TRANS_IOPORT)
364 vga_console_iobase =
365 if_pci.ioport_tra | __IA64_UNCACHED_OFFSET;
366
367 if (if_pci.translation & PCDP_PCI_TRANS_MMIO)
368 vga_console_membase =
369 if_pci.mmio_tra | __IA64_UNCACHED_OFFSET;
370
371 break; /* once we find the primary, we're done */
372 }
373}
374
245/** 375/**
246 * sn_setup - SN platform setup routine 376 * sn_setup - SN platform setup routine
247 * @cmdline_p: kernel command line 377 * @cmdline_p: kernel command line
@@ -263,16 +393,35 @@ void __init sn_setup(char **cmdline_p)
263 393
264#if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE) 394#if defined(CONFIG_VT) && defined(CONFIG_VGA_CONSOLE)
265 /* 395 /*
266 * If there was a primary vga adapter identified through the 396 * Handle SN vga console.
267 * EFI PCDP table, make it the preferred console. Otherwise 397 *
268 * zero out conswitchp. 398 * SN systems do not have enough ACPI table information
399 * being passed from prom to identify VGA adapters and the legacy
400 * addresses to access them. Until that is done, SN systems rely
401 * on the PCDP table to identify the primary VGA console if one
402 * exists.
403 *
404 * However, kernel PCDP support is optional, and even if it is built
405 * into the kernel, it will not be used if the boot cmdline contains
406 * console= directives.
407 *
408 * So, to work around this mess, we duplicate some of the PCDP code
409 * here so that the primary VGA console (as defined by PCDP) will
410 * work on SN systems even if a different console (e.g. serial) is
411 * selected on the boot line (or CONFIG_EFI_PCDP is off).
269 */ 412 */
270 413
414 if (! vga_console_membase)
415 sn_scan_pcdp();
416
271 if (vga_console_membase) { 417 if (vga_console_membase) {
272 /* usable vga ... make tty0 the preferred default console */ 418 /* usable vga ... make tty0 the preferred default console */
273 add_preferred_console("tty", 0, NULL); 419 if (!strstr(*cmdline_p, "console="))
420 add_preferred_console("tty", 0, NULL);
274 } else { 421 } else {
275 printk(KERN_DEBUG "SGI: Disabling VGA console\n"); 422 printk(KERN_DEBUG "SGI: Disabling VGA console\n");
423 if (!strstr(*cmdline_p, "console="))
424 add_preferred_console("ttySG", 0, NULL);
276#ifdef CONFIG_DUMMY_CONSOLE 425#ifdef CONFIG_DUMMY_CONSOLE
277 conswitchp = &dummy_con; 426 conswitchp = &dummy_con;
278#else 427#else
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index ed31062029f7..c523029674e6 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -581,17 +581,12 @@ config ARCH_FLATMEM_ENABLE
581 def_bool y 581 def_bool y
582 depends on PPC64 && !NUMA 582 depends on PPC64 && !NUMA
583 583
584config ARCH_DISCONTIGMEM_ENABLE 584config ARCH_SPARSEMEM_ENABLE
585 def_bool y
586 depends on SMP && PPC_PSERIES
587
588config ARCH_DISCONTIGMEM_DEFAULT
589 def_bool y 585 def_bool y
590 depends on ARCH_DISCONTIGMEM_ENABLE
591 586
592config ARCH_SPARSEMEM_ENABLE 587config ARCH_SPARSEMEM_DEFAULT
593 def_bool y 588 def_bool y
594 depends on ARCH_DISCONTIGMEM_ENABLE 589 depends on SMP && PPC_PSERIES
595 590
596source "mm/Kconfig" 591source "mm/Kconfig"
597 592
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index c04bbd320594..9a74b7ab03a4 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -12,11 +12,13 @@ CFLAGS_btext.o += -fPIC
12endif 12endif
13 13
14obj-y := semaphore.o cputable.o ptrace.o syscalls.o \ 14obj-y := semaphore.o cputable.o ptrace.o syscalls.o \
15 irq.o signal_32.o pmc.o 15 irq.o signal_32.o pmc.o vdso.o
16obj-y += vdso32/
16obj-$(CONFIG_PPC64) += setup_64.o binfmt_elf32.o sys_ppc32.o \ 17obj-$(CONFIG_PPC64) += setup_64.o binfmt_elf32.o sys_ppc32.o \
17 signal_64.o ptrace32.o systbl.o \ 18 signal_64.o ptrace32.o systbl.o \
18 paca.o ioctl32.o cpu_setup_power4.o \ 19 paca.o ioctl32.o cpu_setup_power4.o \
19 firmware.o sysfs.o 20 firmware.o sysfs.o udbg.o
21obj-$(CONFIG_PPC64) += vdso64/
20obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o 22obj-$(CONFIG_ALTIVEC) += vecemu.o vector.o
21obj-$(CONFIG_POWER4) += idle_power4.o 23obj-$(CONFIG_POWER4) += idle_power4.o
22obj-$(CONFIG_PPC_OF) += of_device.o 24obj-$(CONFIG_PPC_OF) += of_device.o
@@ -29,6 +31,10 @@ obj-$(CONFIG_RTAS_PROC) += rtas-proc.o
29obj-$(CONFIG_LPARCFG) += lparcfg.o 31obj-$(CONFIG_LPARCFG) += lparcfg.o
30obj-$(CONFIG_IBMVIO) += vio.o 32obj-$(CONFIG_IBMVIO) += vio.o
31obj-$(CONFIG_GENERIC_TBSYNC) += smp-tbsync.o 33obj-$(CONFIG_GENERIC_TBSYNC) += smp-tbsync.o
34obj-$(CONFIG_PPC_PSERIES) += udbg_16550.o
35obj-$(CONFIG_PPC_MAPLE) += udbg_16550.o
36udbgscc-$(CONFIG_PPC64) := udbg_scc.o
37obj-$(CONFIG_PPC_PMAC) += $(udbgscc-y)
32 38
33ifeq ($(CONFIG_PPC_MERGE),y) 39ifeq ($(CONFIG_PPC_MERGE),y)
34 40
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c
index 8793102711a8..4550eb4f4fbd 100644
--- a/arch/powerpc/kernel/asm-offsets.c
+++ b/arch/powerpc/kernel/asm-offsets.c
@@ -37,12 +37,12 @@
37#include <asm/cputable.h> 37#include <asm/cputable.h>
38#include <asm/thread_info.h> 38#include <asm/thread_info.h>
39#include <asm/rtas.h> 39#include <asm/rtas.h>
40#include <asm/vdso_datapage.h>
40#ifdef CONFIG_PPC64 41#ifdef CONFIG_PPC64
41#include <asm/paca.h> 42#include <asm/paca.h>
42#include <asm/lppaca.h> 43#include <asm/lppaca.h>
43#include <asm/iseries/hv_lp_event.h> 44#include <asm/iseries/hv_lp_event.h>
44#include <asm/cache.h> 45#include <asm/cache.h>
45#include <asm/systemcfg.h>
46#include <asm/compat.h> 46#include <asm/compat.h>
47#endif 47#endif
48 48
@@ -251,25 +251,42 @@ int main(void)
251 251
252 DEFINE(TASK_SIZE, TASK_SIZE); 252 DEFINE(TASK_SIZE, TASK_SIZE);
253 DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28); 253 DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28);
254#else /* CONFIG_PPC64 */ 254#endif /* ! CONFIG_PPC64 */
255 /* systemcfg offsets for use by vdso */
256 DEFINE(CFG_TB_ORIG_STAMP, offsetof(struct systemcfg, tb_orig_stamp));
257 DEFINE(CFG_TB_TICKS_PER_SEC, offsetof(struct systemcfg, tb_ticks_per_sec));
258 DEFINE(CFG_TB_TO_XS, offsetof(struct systemcfg, tb_to_xs));
259 DEFINE(CFG_STAMP_XSEC, offsetof(struct systemcfg, stamp_xsec));
260 DEFINE(CFG_TB_UPDATE_COUNT, offsetof(struct systemcfg, tb_update_count));
261 DEFINE(CFG_TZ_MINUTEWEST, offsetof(struct systemcfg, tz_minuteswest));
262 DEFINE(CFG_TZ_DSTTIME, offsetof(struct systemcfg, tz_dsttime));
263 DEFINE(CFG_SYSCALL_MAP32, offsetof(struct systemcfg, syscall_map_32));
264 DEFINE(CFG_SYSCALL_MAP64, offsetof(struct systemcfg, syscall_map_64));
265 255
266 /* timeval/timezone offsets for use by vdso */ 256 /* datapage offsets for use by vdso */
257 DEFINE(CFG_TB_ORIG_STAMP, offsetof(struct vdso_data, tb_orig_stamp));
258 DEFINE(CFG_TB_TICKS_PER_SEC, offsetof(struct vdso_data, tb_ticks_per_sec));
259 DEFINE(CFG_TB_TO_XS, offsetof(struct vdso_data, tb_to_xs));
260 DEFINE(CFG_STAMP_XSEC, offsetof(struct vdso_data, stamp_xsec));
261 DEFINE(CFG_TB_UPDATE_COUNT, offsetof(struct vdso_data, tb_update_count));
262 DEFINE(CFG_TZ_MINUTEWEST, offsetof(struct vdso_data, tz_minuteswest));
263 DEFINE(CFG_TZ_DSTTIME, offsetof(struct vdso_data, tz_dsttime));
264 DEFINE(CFG_SYSCALL_MAP32, offsetof(struct vdso_data, syscall_map_32));
265 DEFINE(WTOM_CLOCK_SEC, offsetof(struct vdso_data, wtom_clock_sec));
266 DEFINE(WTOM_CLOCK_NSEC, offsetof(struct vdso_data, wtom_clock_nsec));
267#ifdef CONFIG_PPC64
268 DEFINE(CFG_SYSCALL_MAP64, offsetof(struct vdso_data, syscall_map_64));
267 DEFINE(TVAL64_TV_SEC, offsetof(struct timeval, tv_sec)); 269 DEFINE(TVAL64_TV_SEC, offsetof(struct timeval, tv_sec));
268 DEFINE(TVAL64_TV_USEC, offsetof(struct timeval, tv_usec)); 270 DEFINE(TVAL64_TV_USEC, offsetof(struct timeval, tv_usec));
269 DEFINE(TVAL32_TV_SEC, offsetof(struct compat_timeval, tv_sec)); 271 DEFINE(TVAL32_TV_SEC, offsetof(struct compat_timeval, tv_sec));
270 DEFINE(TVAL32_TV_USEC, offsetof(struct compat_timeval, tv_usec)); 272 DEFINE(TVAL32_TV_USEC, offsetof(struct compat_timeval, tv_usec));
273 DEFINE(TSPC32_TV_SEC, offsetof(struct compat_timespec, tv_sec));
274 DEFINE(TSPC32_TV_NSEC, offsetof(struct compat_timespec, tv_nsec));
275#else
276 DEFINE(TVAL32_TV_SEC, offsetof(struct timeval, tv_sec));
277 DEFINE(TVAL32_TV_USEC, offsetof(struct timeval, tv_usec));
278 DEFINE(TSPEC32_TV_SEC, offsetof(struct timespec, tv_sec));
279 DEFINE(TSPEC32_TV_NSEC, offsetof(struct timespec, tv_nsec));
280#endif
281 /* timeval/timezone offsets for use by vdso */
271 DEFINE(TZONE_TZ_MINWEST, offsetof(struct timezone, tz_minuteswest)); 282 DEFINE(TZONE_TZ_MINWEST, offsetof(struct timezone, tz_minuteswest));
272 DEFINE(TZONE_TZ_DSTTIME, offsetof(struct timezone, tz_dsttime)); 283 DEFINE(TZONE_TZ_DSTTIME, offsetof(struct timezone, tz_dsttime));
273#endif /* CONFIG_PPC64 */ 284
285 /* Other bits used by the vdso */
286 DEFINE(CLOCK_REALTIME, CLOCK_REALTIME);
287 DEFINE(CLOCK_MONOTONIC, CLOCK_MONOTONIC);
288 DEFINE(NSEC_PER_SEC, NSEC_PER_SEC);
289 DEFINE(CLOCK_REALTIME_RES, TICK_NSEC);
290
274 return 0; 291 return 0;
275} 292}
diff --git a/arch/powerpc/kernel/head_32.S b/arch/powerpc/kernel/head_32.S
index b102e3a2415e..ccdf94731e30 100644
--- a/arch/powerpc/kernel/head_32.S
+++ b/arch/powerpc/kernel/head_32.S
@@ -1100,6 +1100,7 @@ start_here:
1100 mr r3,r31 1100 mr r3,r31
1101 mr r4,r30 1101 mr r4,r30
1102 bl machine_init 1102 bl machine_init
1103 bl __save_cpu_setup
1103 bl MMU_init 1104 bl MMU_init
1104 1105
1105#ifdef CONFIG_APUS 1106#ifdef CONFIG_APUS
diff --git a/arch/powerpc/kernel/ioctl32.c b/arch/powerpc/kernel/ioctl32.c
index 3fa6a93adbd0..0fa3d27fef01 100644
--- a/arch/powerpc/kernel/ioctl32.c
+++ b/arch/powerpc/kernel/ioctl32.c
@@ -40,10 +40,6 @@ IOCTL_TABLE_START
40#define DECLARES 40#define DECLARES
41#include "compat_ioctl.c" 41#include "compat_ioctl.c"
42 42
43/* Little p (/dev/rtc, /dev/envctrl, etc.) */
44COMPATIBLE_IOCTL(_IOR('p', 20, int[7])) /* RTCGET */
45COMPATIBLE_IOCTL(_IOW('p', 21, int[7])) /* RTCSET */
46
47IOCTL_TABLE_END 43IOCTL_TABLE_END
48 44
49int ioctl_table_size = ARRAY_SIZE(ioctl_start); 45int ioctl_table_size = ARRAY_SIZE(ioctl_start);
diff --git a/arch/powerpc/kernel/lparcfg.c b/arch/powerpc/kernel/lparcfg.c
index 5e954fae031f..1b3ba8a440a6 100644
--- a/arch/powerpc/kernel/lparcfg.c
+++ b/arch/powerpc/kernel/lparcfg.c
@@ -35,7 +35,7 @@
35#include <asm/time.h> 35#include <asm/time.h>
36#include <asm/iseries/it_exp_vpd_panel.h> 36#include <asm/iseries/it_exp_vpd_panel.h>
37#include <asm/prom.h> 37#include <asm/prom.h>
38#include <asm/systemcfg.h> 38#include <asm/vdso_datapage.h>
39 39
40#define MODULE_VERS "1.6" 40#define MODULE_VERS "1.6"
41#define MODULE_NAME "lparcfg" 41#define MODULE_NAME "lparcfg"
@@ -43,7 +43,7 @@
43/* #define LPARCFG_DEBUG */ 43/* #define LPARCFG_DEBUG */
44 44
45/* find a better place for this function... */ 45/* find a better place for this function... */
46void log_plpar_hcall_return(unsigned long rc, char *tag) 46static void log_plpar_hcall_return(unsigned long rc, char *tag)
47{ 47{
48 if (rc == 0) /* success, return */ 48 if (rc == 0) /* success, return */
49 return; 49 return;
@@ -213,11 +213,10 @@ static void h_pic(unsigned long *pool_idle_time, unsigned long *num_procs)
213 unsigned long dummy; 213 unsigned long dummy;
214 rc = plpar_hcall(H_PIC, 0, 0, 0, 0, pool_idle_time, num_procs, &dummy); 214 rc = plpar_hcall(H_PIC, 0, 0, 0, 0, pool_idle_time, num_procs, &dummy);
215 215
216 log_plpar_hcall_return(rc, "H_PIC"); 216 if (rc != H_Authority)
217 log_plpar_hcall_return(rc, "H_PIC");
217} 218}
218 219
219static unsigned long get_purr(void);
220
221/* Track sum of all purrs across all processors. This is used to further */ 220/* Track sum of all purrs across all processors. This is used to further */
222/* calculate usage values by different applications */ 221/* calculate usage values by different applications */
223 222
@@ -319,8 +318,6 @@ static void parse_system_parameter_string(struct seq_file *m)
319 kfree(local_buffer); 318 kfree(local_buffer);
320} 319}
321 320
322static int lparcfg_count_active_processors(void);
323
324/* Return the number of processors in the system. 321/* Return the number of processors in the system.
325 * This function reads through the device tree and counts 322 * This function reads through the device tree and counts
326 * the virtual processors, this does not include threads. 323 * the virtual processors, this does not include threads.
@@ -372,7 +369,7 @@ static int lparcfg_data(struct seq_file *m, void *v)
372 lrdrp = (int *)get_property(rtas_node, "ibm,lrdr-capacity", NULL); 369 lrdrp = (int *)get_property(rtas_node, "ibm,lrdr-capacity", NULL);
373 370
374 if (lrdrp == NULL) { 371 if (lrdrp == NULL) {
375 partition_potential_processors = _systemcfg->processorCount; 372 partition_potential_processors = vdso_data->processorCount;
376 } else { 373 } else {
377 partition_potential_processors = *(lrdrp + 4); 374 partition_potential_processors = *(lrdrp + 4);
378 } 375 }
@@ -548,7 +545,7 @@ static ssize_t lparcfg_write(struct file *file, const char __user * buf,
548 retval = -EIO; 545 retval = -EIO;
549 } 546 }
550 547
551 out: 548out:
552 kfree(kbuf); 549 kfree(kbuf);
553 return retval; 550 return retval;
554} 551}
@@ -561,10 +558,10 @@ static int lparcfg_open(struct inode *inode, struct file *file)
561} 558}
562 559
563struct file_operations lparcfg_fops = { 560struct file_operations lparcfg_fops = {
564 .owner = THIS_MODULE, 561 .owner = THIS_MODULE,
565 .read = seq_read, 562 .read = seq_read,
566 .open = lparcfg_open, 563 .open = lparcfg_open,
567 .release = single_release, 564 .release = single_release,
568}; 565};
569 566
570int __init lparcfg_init(void) 567int __init lparcfg_init(void)
diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c
index 3cf2517c5f91..a7b68f911eb1 100644
--- a/arch/powerpc/kernel/paca.c
+++ b/arch/powerpc/kernel/paca.c
@@ -15,17 +15,10 @@
15#include <asm/processor.h> 15#include <asm/processor.h>
16#include <asm/ptrace.h> 16#include <asm/ptrace.h>
17#include <asm/page.h> 17#include <asm/page.h>
18#include <asm/systemcfg.h>
19#include <asm/lppaca.h> 18#include <asm/lppaca.h>
20#include <asm/iseries/it_lp_queue.h> 19#include <asm/iseries/it_lp_queue.h>
21#include <asm/paca.h> 20#include <asm/paca.h>
22 21
23static union {
24 struct systemcfg data;
25 u8 page[PAGE_SIZE];
26} systemcfg_store __attribute__((__section__(".data.page.aligned")));
27struct systemcfg *_systemcfg = &systemcfg_store.data;
28
29 22
30/* This symbol is provided by the linker - let it fill in the paca 23/* This symbol is provided by the linker - let it fill in the paca
31 * field correctly */ 24 * field correctly */
diff --git a/arch/powerpc/kernel/proc_ppc64.c b/arch/powerpc/kernel/proc_ppc64.c
index a1c19502fe8b..7ba42a405f41 100644
--- a/arch/powerpc/kernel/proc_ppc64.c
+++ b/arch/powerpc/kernel/proc_ppc64.c
@@ -23,7 +23,7 @@
23#include <linux/slab.h> 23#include <linux/slab.h>
24#include <linux/kernel.h> 24#include <linux/kernel.h>
25 25
26#include <asm/systemcfg.h> 26#include <asm/vdso_datapage.h>
27#include <asm/rtas.h> 27#include <asm/rtas.h>
28#include <asm/uaccess.h> 28#include <asm/uaccess.h>
29#include <asm/prom.h> 29#include <asm/prom.h>
@@ -72,7 +72,7 @@ static int __init proc_ppc64_init(void)
72 if (!pde) 72 if (!pde)
73 return 1; 73 return 1;
74 pde->nlink = 1; 74 pde->nlink = 1;
75 pde->data = _systemcfg; 75 pde->data = vdso_data;
76 pde->size = PAGE_SIZE; 76 pde->size = PAGE_SIZE;
77 pde->proc_fops = &page_map_fops; 77 pde->proc_fops = &page_map_fops;
78 78
diff --git a/arch/powerpc/kernel/rtas-proc.c b/arch/powerpc/kernel/rtas-proc.c
index ae1a36449ccd..7a95b8a28354 100644
--- a/arch/powerpc/kernel/rtas-proc.c
+++ b/arch/powerpc/kernel/rtas-proc.c
@@ -32,7 +32,6 @@
32#include <asm/rtas.h> 32#include <asm/rtas.h>
33#include <asm/machdep.h> /* for ppc_md */ 33#include <asm/machdep.h> /* for ppc_md */
34#include <asm/time.h> 34#include <asm/time.h>
35#include <asm/systemcfg.h>
36 35
37/* Token for Sensors */ 36/* Token for Sensors */
38#define KEY_SWITCH 0x0001 37#define KEY_SWITCH 0x0001
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c
index bae4bff138f1..33e7f2c7f194 100644
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -33,7 +33,7 @@
33#include <asm/io.h> 33#include <asm/io.h>
34#include <asm/prom.h> 34#include <asm/prom.h>
35#include <asm/processor.h> 35#include <asm/processor.h>
36#include <asm/systemcfg.h> 36#include <asm/vdso_datapage.h>
37#include <asm/pgtable.h> 37#include <asm/pgtable.h>
38#include <asm/smp.h> 38#include <asm/smp.h>
39#include <asm/elf.h> 39#include <asm/elf.h>
@@ -444,10 +444,8 @@ void __init check_for_initrd(void)
444 if (initrd_start >= KERNELBASE && initrd_end >= KERNELBASE && 444 if (initrd_start >= KERNELBASE && initrd_end >= KERNELBASE &&
445 initrd_end > initrd_start) 445 initrd_end > initrd_start)
446 ROOT_DEV = Root_RAM0; 446 ROOT_DEV = Root_RAM0;
447 else { 447 else
448 printk("Bogus initrd %08lx %08lx\n", initrd_start, initrd_end);
449 initrd_start = initrd_end = 0; 448 initrd_start = initrd_end = 0;
450 }
451 449
452 if (initrd_start) 450 if (initrd_start)
453 printk("Found initrd at 0x%lx:0x%lx\n", initrd_start, initrd_end); 451 printk("Found initrd at 0x%lx:0x%lx\n", initrd_start, initrd_end);
@@ -566,7 +564,7 @@ void __init smp_setup_cpu_maps(void)
566 cpu_set(cpu ^ 0x1, cpu_sibling_map[cpu]); 564 cpu_set(cpu ^ 0x1, cpu_sibling_map[cpu]);
567 } 565 }
568 566
569 _systemcfg->processorCount = num_present_cpus(); 567 vdso_data->processorCount = num_present_cpus();
570#endif /* CONFIG_PPC64 */ 568#endif /* CONFIG_PPC64 */
571} 569}
572#endif /* CONFIG_SMP */ 570#endif /* CONFIG_SMP */
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 6791668213e7..fdbd9f9122f2 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -57,7 +57,6 @@
57#include <asm/lmb.h> 57#include <asm/lmb.h>
58#include <asm/iseries/it_lp_naca.h> 58#include <asm/iseries/it_lp_naca.h>
59#include <asm/firmware.h> 59#include <asm/firmware.h>
60#include <asm/systemcfg.h>
61#include <asm/xmon.h> 60#include <asm/xmon.h>
62#include <asm/udbg.h> 61#include <asm/udbg.h>
63 62
@@ -375,9 +374,8 @@ static void __init initialize_cache_info(void)
375 DBG("Argh, can't find dcache properties ! " 374 DBG("Argh, can't find dcache properties ! "
376 "sizep: %p, lsizep: %p\n", sizep, lsizep); 375 "sizep: %p, lsizep: %p\n", sizep, lsizep);
377 376
378 _systemcfg->dcache_size = ppc64_caches.dsize = size; 377 ppc64_caches.dsize = size;
379 _systemcfg->dcache_line_size = 378 ppc64_caches.dline_size = lsize;
380 ppc64_caches.dline_size = lsize;
381 ppc64_caches.log_dline_size = __ilog2(lsize); 379 ppc64_caches.log_dline_size = __ilog2(lsize);
382 ppc64_caches.dlines_per_page = PAGE_SIZE / lsize; 380 ppc64_caches.dlines_per_page = PAGE_SIZE / lsize;
383 381
@@ -393,22 +391,13 @@ static void __init initialize_cache_info(void)
393 DBG("Argh, can't find icache properties ! " 391 DBG("Argh, can't find icache properties ! "
394 "sizep: %p, lsizep: %p\n", sizep, lsizep); 392 "sizep: %p, lsizep: %p\n", sizep, lsizep);
395 393
396 _systemcfg->icache_size = ppc64_caches.isize = size; 394 ppc64_caches.isize = size;
397 _systemcfg->icache_line_size = 395 ppc64_caches.iline_size = lsize;
398 ppc64_caches.iline_size = lsize;
399 ppc64_caches.log_iline_size = __ilog2(lsize); 396 ppc64_caches.log_iline_size = __ilog2(lsize);
400 ppc64_caches.ilines_per_page = PAGE_SIZE / lsize; 397 ppc64_caches.ilines_per_page = PAGE_SIZE / lsize;
401 } 398 }
402 } 399 }
403 400
404 /* Add an eye catcher and the systemcfg layout version number */
405 strcpy(_systemcfg->eye_catcher, "SYSTEMCFG:PPC64");
406 _systemcfg->version.major = SYSTEMCFG_MAJOR;
407 _systemcfg->version.minor = SYSTEMCFG_MINOR;
408 _systemcfg->processor = mfspr(SPRN_PVR);
409 _systemcfg->platform = _machine;
410 _systemcfg->physicalMemorySize = lmb_phys_mem_size();
411
412 DBG(" <- initialize_cache_info()\n"); 401 DBG(" <- initialize_cache_info()\n");
413} 402}
414 403
@@ -495,15 +484,14 @@ void __init setup_system(void)
495 484
496 printk("-----------------------------------------------------\n"); 485 printk("-----------------------------------------------------\n");
497 printk("ppc64_pft_size = 0x%lx\n", ppc64_pft_size); 486 printk("ppc64_pft_size = 0x%lx\n", ppc64_pft_size);
498 printk("ppc64_interrupt_controller = 0x%ld\n", ppc64_interrupt_controller); 487 printk("ppc64_interrupt_controller = 0x%ld\n",
499 printk("systemcfg = 0x%p\n", _systemcfg); 488 ppc64_interrupt_controller);
500 printk("systemcfg->platform = 0x%x\n", _systemcfg->platform); 489 printk("platform = 0x%x\n", _machine);
501 printk("systemcfg->processorCount = 0x%lx\n", _systemcfg->processorCount); 490 printk("physicalMemorySize = 0x%lx\n", lmb_phys_mem_size());
502 printk("systemcfg->physicalMemorySize = 0x%lx\n", _systemcfg->physicalMemorySize);
503 printk("ppc64_caches.dcache_line_size = 0x%x\n", 491 printk("ppc64_caches.dcache_line_size = 0x%x\n",
504 ppc64_caches.dline_size); 492 ppc64_caches.dline_size);
505 printk("ppc64_caches.icache_line_size = 0x%x\n", 493 printk("ppc64_caches.icache_line_size = 0x%x\n",
506 ppc64_caches.iline_size); 494 ppc64_caches.iline_size);
507 printk("htab_address = 0x%p\n", htab_address); 495 printk("htab_address = 0x%p\n", htab_address);
508 printk("htab_hash_mask = 0x%lx\n", htab_hash_mask); 496 printk("htab_hash_mask = 0x%lx\n", htab_hash_mask);
509 printk("-----------------------------------------------------\n"); 497 printk("-----------------------------------------------------\n");
@@ -568,33 +556,6 @@ static void __init emergency_stack_init(void)
568} 556}
569 557
570/* 558/*
571 * Called from setup_arch to initialize the bitmap of available
572 * syscalls in the systemcfg page
573 */
574void __init setup_syscall_map(void)
575{
576 unsigned int i, count64 = 0, count32 = 0;
577 extern unsigned long *sys_call_table;
578 extern unsigned long sys_ni_syscall;
579
580
581 for (i = 0; i < __NR_syscalls; i++) {
582 if (sys_call_table[i*2] != sys_ni_syscall) {
583 count64++;
584 _systemcfg->syscall_map_64[i >> 5] |=
585 0x80000000UL >> (i & 0x1f);
586 }
587 if (sys_call_table[i*2+1] != sys_ni_syscall) {
588 count32++;
589 _systemcfg->syscall_map_32[i >> 5] |=
590 0x80000000UL >> (i & 0x1f);
591 }
592 }
593 printk(KERN_INFO "Syscall map setup, %d 32-bit and %d 64-bit syscalls\n",
594 count32, count64);
595}
596
597/*
598 * Called into from start_kernel, after lock_kernel has been called. 559 * Called into from start_kernel, after lock_kernel has been called.
599 * Initializes bootmem, which is unsed to manage page allocation until 560 * Initializes bootmem, which is unsed to manage page allocation until
600 * mem_init is called. 561 * mem_init is called.
@@ -635,9 +596,6 @@ void __init setup_arch(char **cmdline_p)
635 do_init_bootmem(); 596 do_init_bootmem();
636 sparse_init(); 597 sparse_init();
637 598
638 /* initialize the syscall map in systemcfg */
639 setup_syscall_map();
640
641#ifdef CONFIG_DUMMY_CONSOLE 599#ifdef CONFIG_DUMMY_CONSOLE
642 conswitchp = &dummy_con; 600 conswitchp = &dummy_con;
643#endif 601#endif
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c
index a7c4515f320f..8bdf95b7e420 100644
--- a/arch/powerpc/kernel/signal_32.c
+++ b/arch/powerpc/kernel/signal_32.c
@@ -43,10 +43,10 @@
43#include <asm/uaccess.h> 43#include <asm/uaccess.h>
44#include <asm/cacheflush.h> 44#include <asm/cacheflush.h>
45#include <asm/sigcontext.h> 45#include <asm/sigcontext.h>
46#include <asm/vdso.h>
46#ifdef CONFIG_PPC64 47#ifdef CONFIG_PPC64
47#include "ppc32.h" 48#include "ppc32.h"
48#include <asm/unistd.h> 49#include <asm/unistd.h>
49#include <asm/vdso.h>
50#else 50#else
51#include <asm/ucontext.h> 51#include <asm/ucontext.h>
52#include <asm/pgtable.h> 52#include <asm/pgtable.h>
@@ -809,14 +809,11 @@ static int handle_rt_signal(unsigned long sig, struct k_sigaction *ka,
809 809
810 /* Save user registers on the stack */ 810 /* Save user registers on the stack */
811 frame = &rt_sf->uc.uc_mcontext; 811 frame = &rt_sf->uc.uc_mcontext;
812#ifdef CONFIG_PPC64
813 if (vdso32_rt_sigtramp && current->thread.vdso_base) { 812 if (vdso32_rt_sigtramp && current->thread.vdso_base) {
814 if (save_user_regs(regs, frame, 0)) 813 if (save_user_regs(regs, frame, 0))
815 goto badframe; 814 goto badframe;
816 regs->link = current->thread.vdso_base + vdso32_rt_sigtramp; 815 regs->link = current->thread.vdso_base + vdso32_rt_sigtramp;
817 } else 816 } else {
818#endif
819 {
820 if (save_user_regs(regs, frame, __NR_rt_sigreturn)) 817 if (save_user_regs(regs, frame, __NR_rt_sigreturn))
821 goto badframe; 818 goto badframe;
822 regs->link = (unsigned long) frame->tramp; 819 regs->link = (unsigned long) frame->tramp;
@@ -1090,14 +1087,11 @@ static int handle_signal(unsigned long sig, struct k_sigaction *ka,
1090 || __put_user(sig, &sc->signal)) 1087 || __put_user(sig, &sc->signal))
1091 goto badframe; 1088 goto badframe;
1092 1089
1093#ifdef CONFIG_PPC64
1094 if (vdso32_sigtramp && current->thread.vdso_base) { 1090 if (vdso32_sigtramp && current->thread.vdso_base) {
1095 if (save_user_regs(regs, &frame->mctx, 0)) 1091 if (save_user_regs(regs, &frame->mctx, 0))
1096 goto badframe; 1092 goto badframe;
1097 regs->link = current->thread.vdso_base + vdso32_sigtramp; 1093 regs->link = current->thread.vdso_base + vdso32_sigtramp;
1098 } else 1094 } else {
1099#endif
1100 {
1101 if (save_user_regs(regs, &frame->mctx, __NR_sigreturn)) 1095 if (save_user_regs(regs, &frame->mctx, __NR_sigreturn))
1102 goto badframe; 1096 goto badframe;
1103 regs->link = (unsigned long) frame->mctx.tramp; 1097 regs->link = (unsigned long) frame->mctx.tramp;
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index e28a139c29d0..62dfc5b8d765 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -44,7 +44,7 @@
44#include <asm/cputable.h> 44#include <asm/cputable.h>
45#include <asm/system.h> 45#include <asm/system.h>
46#include <asm/mpic.h> 46#include <asm/mpic.h>
47#include <asm/systemcfg.h> 47#include <asm/vdso_datapage.h>
48#ifdef CONFIG_PPC64 48#ifdef CONFIG_PPC64
49#include <asm/paca.h> 49#include <asm/paca.h>
50#endif 50#endif
@@ -371,7 +371,7 @@ int generic_cpu_disable(void)
371 371
372 cpu_clear(cpu, cpu_online_map); 372 cpu_clear(cpu, cpu_online_map);
373#ifdef CONFIG_PPC64 373#ifdef CONFIG_PPC64
374 _systemcfg->processorCount--; 374 vdso_data->processorCount--;
375 fixup_irqs(cpu_online_map); 375 fixup_irqs(cpu_online_map);
376#endif 376#endif
377 return 0; 377 return 0;
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c
index 850af198fb5f..0f0c3a9ae2e5 100644
--- a/arch/powerpc/kernel/sysfs.c
+++ b/arch/powerpc/kernel/sysfs.c
@@ -16,7 +16,6 @@
16#include <asm/firmware.h> 16#include <asm/firmware.h>
17#include <asm/hvcall.h> 17#include <asm/hvcall.h>
18#include <asm/prom.h> 18#include <asm/prom.h>
19#include <asm/systemcfg.h>
20#include <asm/paca.h> 19#include <asm/paca.h>
21#include <asm/lppaca.h> 20#include <asm/lppaca.h>
22#include <asm/machdep.h> 21#include <asm/machdep.h>
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index 260b6ecd26a9..070b4b458aaf 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -62,8 +62,8 @@
62#include <asm/irq.h> 62#include <asm/irq.h>
63#include <asm/div64.h> 63#include <asm/div64.h>
64#include <asm/smp.h> 64#include <asm/smp.h>
65#include <asm/vdso_datapage.h>
65#ifdef CONFIG_PPC64 66#ifdef CONFIG_PPC64
66#include <asm/systemcfg.h>
67#include <asm/firmware.h> 67#include <asm/firmware.h>
68#endif 68#endif
69#ifdef CONFIG_PPC_ISERIES 69#ifdef CONFIG_PPC_ISERIES
@@ -261,7 +261,6 @@ static inline void update_gtod(u64 new_tb_stamp, u64 new_stamp_xsec,
261 do_gtod.varp = temp_varp; 261 do_gtod.varp = temp_varp;
262 do_gtod.var_idx = temp_idx; 262 do_gtod.var_idx = temp_idx;
263 263
264#ifdef CONFIG_PPC64
265 /* 264 /*
266 * tb_update_count is used to allow the userspace gettimeofday code 265 * tb_update_count is used to allow the userspace gettimeofday code
267 * to assure itself that it sees a consistent view of the tb_to_xs and 266 * to assure itself that it sees a consistent view of the tb_to_xs and
@@ -271,14 +270,15 @@ static inline void update_gtod(u64 new_tb_stamp, u64 new_stamp_xsec,
271 * tb_to_xs and stamp_xsec values are consistent. If not, then it 270 * tb_to_xs and stamp_xsec values are consistent. If not, then it
272 * loops back and reads them again until this criteria is met. 271 * loops back and reads them again until this criteria is met.
273 */ 272 */
274 ++(_systemcfg->tb_update_count); 273 ++(vdso_data->tb_update_count);
275 smp_wmb(); 274 smp_wmb();
276 _systemcfg->tb_orig_stamp = new_tb_stamp; 275 vdso_data->tb_orig_stamp = new_tb_stamp;
277 _systemcfg->stamp_xsec = new_stamp_xsec; 276 vdso_data->stamp_xsec = new_stamp_xsec;
278 _systemcfg->tb_to_xs = new_tb_to_xs; 277 vdso_data->tb_to_xs = new_tb_to_xs;
278 vdso_data->wtom_clock_sec = wall_to_monotonic.tv_sec;
279 vdso_data->wtom_clock_nsec = wall_to_monotonic.tv_nsec;
279 smp_wmb(); 280 smp_wmb();
280 ++(_systemcfg->tb_update_count); 281 ++(vdso_data->tb_update_count);
281#endif
282} 282}
283 283
284/* 284/*
@@ -357,9 +357,8 @@ static void iSeries_tb_recal(void)
357 do_gtod.tb_ticks_per_sec = tb_ticks_per_sec; 357 do_gtod.tb_ticks_per_sec = tb_ticks_per_sec;
358 tb_to_xs = divres.result_low; 358 tb_to_xs = divres.result_low;
359 do_gtod.varp->tb_to_xs = tb_to_xs; 359 do_gtod.varp->tb_to_xs = tb_to_xs;
360 _systemcfg->tb_ticks_per_sec = 360 vdso_data->tb_ticks_per_sec = tb_ticks_per_sec;
361 tb_ticks_per_sec; 361 vdso_data->tb_to_xs = tb_to_xs;
362 _systemcfg->tb_to_xs = tb_to_xs;
363 } 362 }
364 else { 363 else {
365 printk( "Titan recalibrate: FAILED (difference > 4 percent)\n" 364 printk( "Titan recalibrate: FAILED (difference > 4 percent)\n"
@@ -561,10 +560,8 @@ int do_settimeofday(struct timespec *tv)
561 new_xsec += (u64)new_sec * XSEC_PER_SEC - tb_delta_xs; 560 new_xsec += (u64)new_sec * XSEC_PER_SEC - tb_delta_xs;
562 update_gtod(tb_last_jiffy, new_xsec, do_gtod.varp->tb_to_xs); 561 update_gtod(tb_last_jiffy, new_xsec, do_gtod.varp->tb_to_xs);
563 562
564#ifdef CONFIG_PPC64 563 vdso_data->tz_minuteswest = sys_tz.tz_minuteswest;
565 _systemcfg->tz_minuteswest = sys_tz.tz_minuteswest; 564 vdso_data->tz_dsttime = sys_tz.tz_dsttime;
566 _systemcfg->tz_dsttime = sys_tz.tz_dsttime;
567#endif
568 565
569 write_sequnlock_irqrestore(&xtime_lock, flags); 566 write_sequnlock_irqrestore(&xtime_lock, flags);
570 clock_was_set(); 567 clock_was_set();
@@ -713,13 +710,12 @@ void __init time_init(void)
713 do_gtod.tb_ticks_per_sec = tb_ticks_per_sec; 710 do_gtod.tb_ticks_per_sec = tb_ticks_per_sec;
714 do_gtod.varp->tb_to_xs = tb_to_xs; 711 do_gtod.varp->tb_to_xs = tb_to_xs;
715 do_gtod.tb_to_us = tb_to_us; 712 do_gtod.tb_to_us = tb_to_us;
716#ifdef CONFIG_PPC64 713
717 _systemcfg->tb_orig_stamp = tb_last_jiffy; 714 vdso_data->tb_orig_stamp = tb_last_jiffy;
718 _systemcfg->tb_update_count = 0; 715 vdso_data->tb_update_count = 0;
719 _systemcfg->tb_ticks_per_sec = tb_ticks_per_sec; 716 vdso_data->tb_ticks_per_sec = tb_ticks_per_sec;
720 _systemcfg->stamp_xsec = xtime.tv_sec * XSEC_PER_SEC; 717 vdso_data->stamp_xsec = xtime.tv_sec * XSEC_PER_SEC;
721 _systemcfg->tb_to_xs = tb_to_xs; 718 vdso_data->tb_to_xs = tb_to_xs;
722#endif
723 719
724 time_freq = 0; 720 time_freq = 0;
725 721
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 2020bb7648fb..1511454c4690 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -49,7 +49,6 @@
49#ifdef CONFIG_PPC64 49#ifdef CONFIG_PPC64
50#include <asm/firmware.h> 50#include <asm/firmware.h>
51#include <asm/processor.h> 51#include <asm/processor.h>
52#include <asm/systemcfg.h>
53#endif 52#endif
54 53
55#ifdef CONFIG_PPC64 /* XXX */ 54#ifdef CONFIG_PPC64 /* XXX */
diff --git a/arch/ppc64/kernel/udbg.c b/arch/powerpc/kernel/udbg.c
index 0d878e72fc44..0d878e72fc44 100644
--- a/arch/ppc64/kernel/udbg.c
+++ b/arch/powerpc/kernel/udbg.c
diff --git a/arch/ppc64/kernel/udbg_16550.c b/arch/powerpc/kernel/udbg_16550.c
index 9313574ab935..9313574ab935 100644
--- a/arch/ppc64/kernel/udbg_16550.c
+++ b/arch/powerpc/kernel/udbg_16550.c
diff --git a/arch/ppc64/kernel/udbg_scc.c b/arch/powerpc/kernel/udbg_scc.c
index 820c53551507..820c53551507 100644
--- a/arch/ppc64/kernel/udbg_scc.c
+++ b/arch/powerpc/kernel/udbg_scc.c
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
new file mode 100644
index 000000000000..0d4d8bec0df4
--- /dev/null
+++ b/arch/powerpc/kernel/vdso.c
@@ -0,0 +1,746 @@
1/*
2 * linux/arch/ppc64/kernel/vdso.c
3 *
4 * Copyright (C) 2004 Benjamin Herrenschmidt, IBM Corp.
5 * <benh@kernel.crashing.org>
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version.
11 */
12
13#include <linux/config.h>
14#include <linux/module.h>
15#include <linux/errno.h>
16#include <linux/sched.h>
17#include <linux/kernel.h>
18#include <linux/mm.h>
19#include <linux/smp.h>
20#include <linux/smp_lock.h>
21#include <linux/stddef.h>
22#include <linux/unistd.h>
23#include <linux/slab.h>
24#include <linux/user.h>
25#include <linux/elf.h>
26#include <linux/security.h>
27#include <linux/bootmem.h>
28
29#include <asm/pgtable.h>
30#include <asm/system.h>
31#include <asm/processor.h>
32#include <asm/mmu.h>
33#include <asm/mmu_context.h>
34#include <asm/lmb.h>
35#include <asm/machdep.h>
36#include <asm/cputable.h>
37#include <asm/sections.h>
38#include <asm/vdso.h>
39#include <asm/vdso_datapage.h>
40
41#undef DEBUG
42
43#ifdef DEBUG
44#define DBG(fmt...) printk(fmt)
45#else
46#define DBG(fmt...)
47#endif
48
49/* Max supported size for symbol names */
50#define MAX_SYMNAME 64
51
52extern char vdso32_start, vdso32_end;
53static void *vdso32_kbase = &vdso32_start;
54unsigned int vdso32_pages;
55unsigned long vdso32_sigtramp;
56unsigned long vdso32_rt_sigtramp;
57
58#ifdef CONFIG_PPC64
59extern char vdso64_start, vdso64_end;
60static void *vdso64_kbase = &vdso64_start;
61unsigned int vdso64_pages;
62unsigned long vdso64_rt_sigtramp;
63#endif /* CONFIG_PPC64 */
64
65/*
66 * The vdso data page (aka. systemcfg for old ppc64 fans) is here.
67 * Once the early boot kernel code no longer needs to muck around
68 * with it, it will become dynamically allocated
69 */
70static union {
71 struct vdso_data data;
72 u8 page[PAGE_SIZE];
73} vdso_data_store __attribute__((__section__(".data.page_aligned")));
74struct vdso_data *vdso_data = &vdso_data_store.data;
75
76/* Format of the patch table */
77struct vdso_patch_def
78{
79 unsigned long ftr_mask, ftr_value;
80 const char *gen_name;
81 const char *fix_name;
82};
83
84/* Table of functions to patch based on the CPU type/revision
85 *
86 * Currently, we only change sync_dicache to do nothing on processors
87 * with a coherent icache
88 */
89static struct vdso_patch_def vdso_patches[] = {
90 {
91 CPU_FTR_COHERENT_ICACHE, CPU_FTR_COHERENT_ICACHE,
92 "__kernel_sync_dicache", "__kernel_sync_dicache_p5"
93 },
94 {
95 CPU_FTR_USE_TB, 0,
96 "__kernel_gettimeofday", NULL
97 },
98};
99
100/*
101 * Some infos carried around for each of them during parsing at
102 * boot time.
103 */
104struct lib32_elfinfo
105{
106 Elf32_Ehdr *hdr; /* ptr to ELF */
107 Elf32_Sym *dynsym; /* ptr to .dynsym section */
108 unsigned long dynsymsize; /* size of .dynsym section */
109 char *dynstr; /* ptr to .dynstr section */
110 unsigned long text; /* offset of .text section in .so */
111};
112
113struct lib64_elfinfo
114{
115 Elf64_Ehdr *hdr;
116 Elf64_Sym *dynsym;
117 unsigned long dynsymsize;
118 char *dynstr;
119 unsigned long text;
120};
121
122
123#ifdef __DEBUG
124static void dump_one_vdso_page(struct page *pg, struct page *upg)
125{
126 printk("kpg: %p (c:%d,f:%08lx)", __va(page_to_pfn(pg) << PAGE_SHIFT),
127 page_count(pg),
128 pg->flags);
129 if (upg/* && pg != upg*/) {
130 printk(" upg: %p (c:%d,f:%08lx)", __va(page_to_pfn(upg)
131 << PAGE_SHIFT),
132 page_count(upg),
133 upg->flags);
134 }
135 printk("\n");
136}
137
138static void dump_vdso_pages(struct vm_area_struct * vma)
139{
140 int i;
141
142 if (!vma || test_thread_flag(TIF_32BIT)) {
143 printk("vDSO32 @ %016lx:\n", (unsigned long)vdso32_kbase);
144 for (i=0; i<vdso32_pages; i++) {
145 struct page *pg = virt_to_page(vdso32_kbase +
146 i*PAGE_SIZE);
147 struct page *upg = (vma && vma->vm_mm) ?
148 follow_page(vma->vm_mm, vma->vm_start +
149 i*PAGE_SIZE, 0)
150 : NULL;
151 dump_one_vdso_page(pg, upg);
152 }
153 }
154 if (!vma || !test_thread_flag(TIF_32BIT)) {
155 printk("vDSO64 @ %016lx:\n", (unsigned long)vdso64_kbase);
156 for (i=0; i<vdso64_pages; i++) {
157 struct page *pg = virt_to_page(vdso64_kbase +
158 i*PAGE_SIZE);
159 struct page *upg = (vma && vma->vm_mm) ?
160 follow_page(vma->vm_mm, vma->vm_start +
161 i*PAGE_SIZE, 0)
162 : NULL;
163 dump_one_vdso_page(pg, upg);
164 }
165 }
166}
167#endif /* DEBUG */
168
169/*
170 * Keep a dummy vma_close for now, it will prevent VMA merging.
171 */
172static void vdso_vma_close(struct vm_area_struct * vma)
173{
174}
175
176/*
177 * Our nopage() function, maps in the actual vDSO kernel pages, they will
178 * be mapped read-only by do_no_page(), and eventually COW'ed, either
179 * right away for an initial write access, or by do_wp_page().
180 */
181static struct page * vdso_vma_nopage(struct vm_area_struct * vma,
182 unsigned long address, int *type)
183{
184 unsigned long offset = address - vma->vm_start;
185 struct page *pg;
186#ifdef CONFIG_PPC64
187 void *vbase = test_thread_flag(TIF_32BIT) ?
188 vdso32_kbase : vdso64_kbase;
189#else
190 void *vbase = vdso32_kbase;
191#endif
192
193 DBG("vdso_vma_nopage(current: %s, address: %016lx, off: %lx)\n",
194 current->comm, address, offset);
195
196 if (address < vma->vm_start || address > vma->vm_end)
197 return NOPAGE_SIGBUS;
198
199 /*
200 * Last page is systemcfg.
201 */
202 if ((vma->vm_end - address) <= PAGE_SIZE)
203 pg = virt_to_page(vdso_data);
204 else
205 pg = virt_to_page(vbase + offset);
206
207 get_page(pg);
208 DBG(" ->page count: %d\n", page_count(pg));
209
210 return pg;
211}
212
213static struct vm_operations_struct vdso_vmops = {
214 .close = vdso_vma_close,
215 .nopage = vdso_vma_nopage,
216};
217
218/*
219 * This is called from binfmt_elf, we create the special vma for the
220 * vDSO and insert it into the mm struct tree
221 */
222int arch_setup_additional_pages(struct linux_binprm *bprm,
223 int executable_stack)
224{
225 struct mm_struct *mm = current->mm;
226 struct vm_area_struct *vma;
227 unsigned long vdso_pages;
228 unsigned long vdso_base;
229
230#ifdef CONFIG_PPC64
231 if (test_thread_flag(TIF_32BIT)) {
232 vdso_pages = vdso32_pages;
233 vdso_base = VDSO32_MBASE;
234 } else {
235 vdso_pages = vdso64_pages;
236 vdso_base = VDSO64_MBASE;
237 }
238#else
239 vdso_pages = vdso32_pages;
240 vdso_base = VDSO32_MBASE;
241#endif
242
243 current->thread.vdso_base = 0;
244
245 /* vDSO has a problem and was disabled, just don't "enable" it for the
246 * process
247 */
248 if (vdso_pages == 0)
249 return 0;
250
251 vma = kmem_cache_alloc(vm_area_cachep, SLAB_KERNEL);
252 if (vma == NULL)
253 return -ENOMEM;
254
255 memset(vma, 0, sizeof(*vma));
256
257 /* Add a page to the vdso size for the data page */
258 vdso_pages ++;
259
260 /*
261 * pick a base address for the vDSO in process space. We try to put it
262 * at vdso_base which is the "natural" base for it, but we might fail
263 * and end up putting it elsewhere.
264 */
265 vdso_base = get_unmapped_area(NULL, vdso_base,
266 vdso_pages << PAGE_SHIFT, 0, 0);
267 if (vdso_base & ~PAGE_MASK) {
268 kmem_cache_free(vm_area_cachep, vma);
269 return (int)vdso_base;
270 }
271
272 current->thread.vdso_base = vdso_base;
273
274 vma->vm_mm = mm;
275 vma->vm_start = current->thread.vdso_base;
276 vma->vm_end = vma->vm_start + (vdso_pages << PAGE_SHIFT);
277
278 /*
279 * our vma flags don't have VM_WRITE so by default, the process isn't
280 * allowed to write those pages.
281 * gdb can break that with ptrace interface, and thus trigger COW on
282 * those pages but it's then your responsibility to never do that on
283 * the "data" page of the vDSO or you'll stop getting kernel updates
284 * and your nice userland gettimeofday will be totally dead.
285 * It's fine to use that for setting breakpoints in the vDSO code
286 * pages though
287 */
288 vma->vm_flags = VM_READ | VM_EXEC | VM_MAYREAD | VM_MAYWRITE |
289 VM_MAYEXEC | VM_RESERVED;
290 vma->vm_flags |= mm->def_flags;
291 vma->vm_page_prot = protection_map[vma->vm_flags & 0x7];
292 vma->vm_ops = &vdso_vmops;
293
294 down_write(&mm->mmap_sem);
295 if (insert_vm_struct(mm, vma)) {
296 up_write(&mm->mmap_sem);
297 kmem_cache_free(vm_area_cachep, vma);
298 return -ENOMEM;
299 }
300 mm->total_vm += (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
301 up_write(&mm->mmap_sem);
302
303 return 0;
304}
305
306static void * __init find_section32(Elf32_Ehdr *ehdr, const char *secname,
307 unsigned long *size)
308{
309 Elf32_Shdr *sechdrs;
310 unsigned int i;
311 char *secnames;
312
313 /* Grab section headers and strings so we can tell who is who */
314 sechdrs = (void *)ehdr + ehdr->e_shoff;
315 secnames = (void *)ehdr + sechdrs[ehdr->e_shstrndx].sh_offset;
316
317 /* Find the section they want */
318 for (i = 1; i < ehdr->e_shnum; i++) {
319 if (strcmp(secnames+sechdrs[i].sh_name, secname) == 0) {
320 if (size)
321 *size = sechdrs[i].sh_size;
322 return (void *)ehdr + sechdrs[i].sh_offset;
323 }
324 }
325 *size = 0;
326 return NULL;
327}
328
329static Elf32_Sym * __init find_symbol32(struct lib32_elfinfo *lib,
330 const char *symname)
331{
332 unsigned int i;
333 char name[MAX_SYMNAME], *c;
334
335 for (i = 0; i < (lib->dynsymsize / sizeof(Elf32_Sym)); i++) {
336 if (lib->dynsym[i].st_name == 0)
337 continue;
338 strlcpy(name, lib->dynstr + lib->dynsym[i].st_name,
339 MAX_SYMNAME);
340 c = strchr(name, '@');
341 if (c)
342 *c = 0;
343 if (strcmp(symname, name) == 0)
344 return &lib->dynsym[i];
345 }
346 return NULL;
347}
348
349/* Note that we assume the section is .text and the symbol is relative to
350 * the library base
351 */
352static unsigned long __init find_function32(struct lib32_elfinfo *lib,
353 const char *symname)
354{
355 Elf32_Sym *sym = find_symbol32(lib, symname);
356
357 if (sym == NULL) {
358 printk(KERN_WARNING "vDSO32: function %s not found !\n",
359 symname);
360 return 0;
361 }
362 return sym->st_value - VDSO32_LBASE;
363}
364
365static int vdso_do_func_patch32(struct lib32_elfinfo *v32,
366 struct lib64_elfinfo *v64,
367 const char *orig, const char *fix)
368{
369 Elf32_Sym *sym32_gen, *sym32_fix;
370
371 sym32_gen = find_symbol32(v32, orig);
372 if (sym32_gen == NULL) {
373 printk(KERN_ERR "vDSO32: Can't find symbol %s !\n", orig);
374 return -1;
375 }
376 if (fix == NULL) {
377 sym32_gen->st_name = 0;
378 return 0;
379 }
380 sym32_fix = find_symbol32(v32, fix);
381 if (sym32_fix == NULL) {
382 printk(KERN_ERR "vDSO32: Can't find symbol %s !\n", fix);
383 return -1;
384 }
385 sym32_gen->st_value = sym32_fix->st_value;
386 sym32_gen->st_size = sym32_fix->st_size;
387 sym32_gen->st_info = sym32_fix->st_info;
388 sym32_gen->st_other = sym32_fix->st_other;
389 sym32_gen->st_shndx = sym32_fix->st_shndx;
390
391 return 0;
392}
393
394
395#ifdef CONFIG_PPC64
396
397static void * __init find_section64(Elf64_Ehdr *ehdr, const char *secname,
398 unsigned long *size)
399{
400 Elf64_Shdr *sechdrs;
401 unsigned int i;
402 char *secnames;
403
404 /* Grab section headers and strings so we can tell who is who */
405 sechdrs = (void *)ehdr + ehdr->e_shoff;
406 secnames = (void *)ehdr + sechdrs[ehdr->e_shstrndx].sh_offset;
407
408 /* Find the section they want */
409 for (i = 1; i < ehdr->e_shnum; i++) {
410 if (strcmp(secnames+sechdrs[i].sh_name, secname) == 0) {
411 if (size)
412 *size = sechdrs[i].sh_size;
413 return (void *)ehdr + sechdrs[i].sh_offset;
414 }
415 }
416 if (size)
417 *size = 0;
418 return NULL;
419}
420
421static Elf64_Sym * __init find_symbol64(struct lib64_elfinfo *lib,
422 const char *symname)
423{
424 unsigned int i;
425 char name[MAX_SYMNAME], *c;
426
427 for (i = 0; i < (lib->dynsymsize / sizeof(Elf64_Sym)); i++) {
428 if (lib->dynsym[i].st_name == 0)
429 continue;
430 strlcpy(name, lib->dynstr + lib->dynsym[i].st_name,
431 MAX_SYMNAME);
432 c = strchr(name, '@');
433 if (c)
434 *c = 0;
435 if (strcmp(symname, name) == 0)
436 return &lib->dynsym[i];
437 }
438 return NULL;
439}
440
441/* Note that we assume the section is .text and the symbol is relative to
442 * the library base
443 */
444static unsigned long __init find_function64(struct lib64_elfinfo *lib,
445 const char *symname)
446{
447 Elf64_Sym *sym = find_symbol64(lib, symname);
448
449 if (sym == NULL) {
450 printk(KERN_WARNING "vDSO64: function %s not found !\n",
451 symname);
452 return 0;
453 }
454#ifdef VDS64_HAS_DESCRIPTORS
455 return *((u64 *)(vdso64_kbase + sym->st_value - VDSO64_LBASE)) -
456 VDSO64_LBASE;
457#else
458 return sym->st_value - VDSO64_LBASE;
459#endif
460}
461
462static int vdso_do_func_patch64(struct lib32_elfinfo *v32,
463 struct lib64_elfinfo *v64,
464 const char *orig, const char *fix)
465{
466 Elf64_Sym *sym64_gen, *sym64_fix;
467
468 sym64_gen = find_symbol64(v64, orig);
469 if (sym64_gen == NULL) {
470 printk(KERN_ERR "vDSO64: Can't find symbol %s !\n", orig);
471 return -1;
472 }
473 if (fix == NULL) {
474 sym64_gen->st_name = 0;
475 return 0;
476 }
477 sym64_fix = find_symbol64(v64, fix);
478 if (sym64_fix == NULL) {
479 printk(KERN_ERR "vDSO64: Can't find symbol %s !\n", fix);
480 return -1;
481 }
482 sym64_gen->st_value = sym64_fix->st_value;
483 sym64_gen->st_size = sym64_fix->st_size;
484 sym64_gen->st_info = sym64_fix->st_info;
485 sym64_gen->st_other = sym64_fix->st_other;
486 sym64_gen->st_shndx = sym64_fix->st_shndx;
487
488 return 0;
489}
490
491#endif /* CONFIG_PPC64 */
492
493
494static __init int vdso_do_find_sections(struct lib32_elfinfo *v32,
495 struct lib64_elfinfo *v64)
496{
497 void *sect;
498
499 /*
500 * Locate symbol tables & text section
501 */
502
503 v32->dynsym = find_section32(v32->hdr, ".dynsym", &v32->dynsymsize);
504 v32->dynstr = find_section32(v32->hdr, ".dynstr", NULL);
505 if (v32->dynsym == NULL || v32->dynstr == NULL) {
506 printk(KERN_ERR "vDSO32: required symbol section not found\n");
507 return -1;
508 }
509 sect = find_section32(v32->hdr, ".text", NULL);
510 if (sect == NULL) {
511 printk(KERN_ERR "vDSO32: the .text section was not found\n");
512 return -1;
513 }
514 v32->text = sect - vdso32_kbase;
515
516#ifdef CONFIG_PPC64
517 v64->dynsym = find_section64(v64->hdr, ".dynsym", &v64->dynsymsize);
518 v64->dynstr = find_section64(v64->hdr, ".dynstr", NULL);
519 if (v64->dynsym == NULL || v64->dynstr == NULL) {
520 printk(KERN_ERR "vDSO64: required symbol section not found\n");
521 return -1;
522 }
523 sect = find_section64(v64->hdr, ".text", NULL);
524 if (sect == NULL) {
525 printk(KERN_ERR "vDSO64: the .text section was not found\n");
526 return -1;
527 }
528 v64->text = sect - vdso64_kbase;
529#endif /* CONFIG_PPC64 */
530
531 return 0;
532}
533
534static __init void vdso_setup_trampolines(struct lib32_elfinfo *v32,
535 struct lib64_elfinfo *v64)
536{
537 /*
538 * Find signal trampolines
539 */
540
541#ifdef CONFIG_PPC64
542 vdso64_rt_sigtramp = find_function64(v64, "__kernel_sigtramp_rt64");
543#endif
544 vdso32_sigtramp = find_function32(v32, "__kernel_sigtramp32");
545 vdso32_rt_sigtramp = find_function32(v32, "__kernel_sigtramp_rt32");
546}
547
548static __init int vdso_fixup_datapage(struct lib32_elfinfo *v32,
549 struct lib64_elfinfo *v64)
550{
551 Elf32_Sym *sym32;
552#ifdef CONFIG_PPC64
553 Elf64_Sym *sym64;
554
555 sym64 = find_symbol64(v64, "__kernel_datapage_offset");
556 if (sym64 == NULL) {
557 printk(KERN_ERR "vDSO64: Can't find symbol "
558 "__kernel_datapage_offset !\n");
559 return -1;
560 }
561 *((int *)(vdso64_kbase + sym64->st_value - VDSO64_LBASE)) =
562 (vdso64_pages << PAGE_SHIFT) -
563 (sym64->st_value - VDSO64_LBASE);
564#endif /* CONFIG_PPC64 */
565
566 sym32 = find_symbol32(v32, "__kernel_datapage_offset");
567 if (sym32 == NULL) {
568 printk(KERN_ERR "vDSO32: Can't find symbol "
569 "__kernel_datapage_offset !\n");
570 return -1;
571 }
572 *((int *)(vdso32_kbase + (sym32->st_value - VDSO32_LBASE))) =
573 (vdso32_pages << PAGE_SHIFT) -
574 (sym32->st_value - VDSO32_LBASE);
575
576 return 0;
577}
578
579static __init int vdso_fixup_alt_funcs(struct lib32_elfinfo *v32,
580 struct lib64_elfinfo *v64)
581{
582 int i;
583
584 for (i = 0; i < ARRAY_SIZE(vdso_patches); i++) {
585 struct vdso_patch_def *patch = &vdso_patches[i];
586 int match = (cur_cpu_spec->cpu_features & patch->ftr_mask)
587 == patch->ftr_value;
588 if (!match)
589 continue;
590
591 DBG("replacing %s with %s...\n", patch->gen_name,
592 patch->fix_name ? "NONE" : patch->fix_name);
593
594 /*
595 * Patch the 32 bits and 64 bits symbols. Note that we do not
596 * patch the "." symbol on 64 bits.
597 * It would be easy to do, but doesn't seem to be necessary,
598 * patching the OPD symbol is enough.
599 */
600 vdso_do_func_patch32(v32, v64, patch->gen_name,
601 patch->fix_name);
602#ifdef CONFIG_PPC64
603 vdso_do_func_patch64(v32, v64, patch->gen_name,
604 patch->fix_name);
605#endif /* CONFIG_PPC64 */
606 }
607
608 return 0;
609}
610
611
612static __init int vdso_setup(void)
613{
614 struct lib32_elfinfo v32;
615 struct lib64_elfinfo v64;
616
617 v32.hdr = vdso32_kbase;
618#ifdef CONFIG_PPC64
619 v64.hdr = vdso64_kbase;
620#endif
621 if (vdso_do_find_sections(&v32, &v64))
622 return -1;
623
624 if (vdso_fixup_datapage(&v32, &v64))
625 return -1;
626
627 if (vdso_fixup_alt_funcs(&v32, &v64))
628 return -1;
629
630 vdso_setup_trampolines(&v32, &v64);
631
632 return 0;
633}
634
635/*
636 * Called from setup_arch to initialize the bitmap of available
637 * syscalls in the systemcfg page
638 */
639static void __init vdso_setup_syscall_map(void)
640{
641 unsigned int i;
642 extern unsigned long *sys_call_table;
643 extern unsigned long sys_ni_syscall;
644
645
646 for (i = 0; i < __NR_syscalls; i++) {
647#ifdef CONFIG_PPC64
648 if (sys_call_table[i*2] != sys_ni_syscall)
649 vdso_data->syscall_map_64[i >> 5] |=
650 0x80000000UL >> (i & 0x1f);
651 if (sys_call_table[i*2+1] != sys_ni_syscall)
652 vdso_data->syscall_map_32[i >> 5] |=
653 0x80000000UL >> (i & 0x1f);
654#else /* CONFIG_PPC64 */
655 if (sys_call_table[i] != sys_ni_syscall)
656 vdso_data->syscall_map_32[i >> 5] |=
657 0x80000000UL >> (i & 0x1f);
658#endif /* CONFIG_PPC64 */
659 }
660}
661
662
663void __init vdso_init(void)
664{
665 int i;
666
667#ifdef CONFIG_PPC64
668 /*
669 * Fill up the "systemcfg" stuff for backward compatiblity
670 */
671 strcpy(vdso_data->eye_catcher, "SYSTEMCFG:PPC64");
672 vdso_data->version.major = SYSTEMCFG_MAJOR;
673 vdso_data->version.minor = SYSTEMCFG_MINOR;
674 vdso_data->processor = mfspr(SPRN_PVR);
675 vdso_data->platform = _machine;
676 vdso_data->physicalMemorySize = lmb_phys_mem_size();
677 vdso_data->dcache_size = ppc64_caches.dsize;
678 vdso_data->dcache_line_size = ppc64_caches.dline_size;
679 vdso_data->icache_size = ppc64_caches.isize;
680 vdso_data->icache_line_size = ppc64_caches.iline_size;
681
682 /*
683 * Calculate the size of the 64 bits vDSO
684 */
685 vdso64_pages = (&vdso64_end - &vdso64_start) >> PAGE_SHIFT;
686 DBG("vdso64_kbase: %p, 0x%x pages\n", vdso64_kbase, vdso64_pages);
687#endif /* CONFIG_PPC64 */
688
689
690 /*
691 * Calculate the size of the 32 bits vDSO
692 */
693 vdso32_pages = (&vdso32_end - &vdso32_start) >> PAGE_SHIFT;
694 DBG("vdso32_kbase: %p, 0x%x pages\n", vdso32_kbase, vdso32_pages);
695
696
697 /*
698 * Setup the syscall map in the vDOS
699 */
700 vdso_setup_syscall_map();
701 /*
702 * Initialize the vDSO images in memory, that is do necessary
703 * fixups of vDSO symbols, locate trampolines, etc...
704 */
705 if (vdso_setup()) {
706 printk(KERN_ERR "vDSO setup failure, not enabled !\n");
707 vdso32_pages = 0;
708#ifdef CONFIG_PPC64
709 vdso64_pages = 0;
710#endif
711 return;
712 }
713
714 /* Make sure pages are in the correct state */
715 for (i = 0; i < vdso32_pages; i++) {
716 struct page *pg = virt_to_page(vdso32_kbase + i*PAGE_SIZE);
717 ClearPageReserved(pg);
718 get_page(pg);
719
720 }
721#ifdef CONFIG_PPC64
722 for (i = 0; i < vdso64_pages; i++) {
723 struct page *pg = virt_to_page(vdso64_kbase + i*PAGE_SIZE);
724 ClearPageReserved(pg);
725 get_page(pg);
726 }
727#endif /* CONFIG_PPC64 */
728
729 get_page(virt_to_page(vdso_data));
730}
731
732int in_gate_area_no_task(unsigned long addr)
733{
734 return 0;
735}
736
737int in_gate_area(struct task_struct *task, unsigned long addr)
738{
739 return 0;
740}
741
742struct vm_area_struct *get_gate_vma(struct task_struct *tsk)
743{
744 return NULL;
745}
746
diff --git a/arch/ppc64/kernel/vdso32/Makefile b/arch/powerpc/kernel/vdso32/Makefile
index 0b1b0df973eb..8a3bed5f143a 100644
--- a/arch/ppc64/kernel/vdso32/Makefile
+++ b/arch/powerpc/kernel/vdso32/Makefile
@@ -5,6 +5,10 @@ obj-vdso32 = sigtramp.o gettimeofday.o datapage.o cacheflush.o note.o
5 5
6# Build rules 6# Build rules
7 7
8ifeq ($(CONFIG_PPC32),y)
9CROSS32CC := $(CC)
10endif
11
8targets := $(obj-vdso32) vdso32.so 12targets := $(obj-vdso32) vdso32.so
9obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32)) 13obj-vdso32 := $(addprefix $(obj)/, $(obj-vdso32))
10 14
@@ -15,7 +19,7 @@ EXTRA_AFLAGS := -D__VDSO32__ -s
15 19
16obj-y += vdso32_wrapper.o 20obj-y += vdso32_wrapper.o
17extra-y += vdso32.lds 21extra-y += vdso32.lds
18CPPFLAGS_vdso32.lds += -P -C -U$(ARCH) 22CPPFLAGS_vdso32.lds += -P -C -Upowerpc
19 23
20# Force dependency (incbin is bad) 24# Force dependency (incbin is bad)
21$(obj)/vdso32_wrapper.o : $(obj)/vdso32.so 25$(obj)/vdso32_wrapper.o : $(obj)/vdso32.so
diff --git a/arch/ppc64/kernel/vdso32/cacheflush.S b/arch/powerpc/kernel/vdso32/cacheflush.S
index c8db993574ee..c8db993574ee 100644
--- a/arch/ppc64/kernel/vdso32/cacheflush.S
+++ b/arch/powerpc/kernel/vdso32/cacheflush.S
diff --git a/arch/ppc64/kernel/vdso32/datapage.S b/arch/powerpc/kernel/vdso32/datapage.S
index 4f4eb0be3992..a08c26e87835 100644
--- a/arch/ppc64/kernel/vdso32/datapage.S
+++ b/arch/powerpc/kernel/vdso32/datapage.S
@@ -66,3 +66,19 @@ V_FUNCTION_BEGIN(__kernel_get_syscall_map)
66 blr 66 blr
67 .cfi_endproc 67 .cfi_endproc
68V_FUNCTION_END(__kernel_get_syscall_map) 68V_FUNCTION_END(__kernel_get_syscall_map)
69
70/*
71 * void unsigned long long __kernel_get_tbfreq(void);
72 *
73 * returns the timebase frequency in HZ
74 */
75V_FUNCTION_BEGIN(__kernel_get_tbfreq)
76 .cfi_startproc
77 mflr r12
78 .cfi_register lr,r12
79 bl __get_datapage@local
80 lwz r3,CFG_TB_TICKS_PER_SEC(r3)
81 lwz r4,(CFG_TB_TICKS_PER_SEC + 4)(r3)
82 mtlr r12
83 .cfi_endproc
84V_FUNCTION_END(__kernel_get_tbfreq)
diff --git a/arch/powerpc/kernel/vdso32/gettimeofday.S b/arch/powerpc/kernel/vdso32/gettimeofday.S
new file mode 100644
index 000000000000..aeb5fc9b87b3
--- /dev/null
+++ b/arch/powerpc/kernel/vdso32/gettimeofday.S
@@ -0,0 +1,315 @@
1/*
2 * Userland implementation of gettimeofday() for 32 bits processes in a
3 * ppc64 kernel for use in the vDSO
4 *
5 * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org,
6 * IBM Corp.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version
11 * 2 of the License, or (at your option) any later version.
12 */
13#include <linux/config.h>
14#include <asm/processor.h>
15#include <asm/ppc_asm.h>
16#include <asm/vdso.h>
17#include <asm/asm-offsets.h>
18#include <asm/unistd.h>
19
20 .text
21/*
22 * Exact prototype of gettimeofday
23 *
24 * int __kernel_gettimeofday(struct timeval *tv, struct timezone *tz);
25 *
26 */
27V_FUNCTION_BEGIN(__kernel_gettimeofday)
28 .cfi_startproc
29 mflr r12
30 .cfi_register lr,r12
31
32 mr r10,r3 /* r10 saves tv */
33 mr r11,r4 /* r11 saves tz */
34 bl __get_datapage@local /* get data page */
35 mr r9, r3 /* datapage ptr in r9 */
36 bl __do_get_xsec@local /* get xsec from tb & kernel */
37 bne- 2f /* out of line -> do syscall */
38
39 /* seconds are xsec >> 20 */
40 rlwinm r5,r4,12,20,31
41 rlwimi r5,r3,12,0,19
42 stw r5,TVAL32_TV_SEC(r10)
43
44 /* get remaining xsec and convert to usec. we scale
45 * up remaining xsec by 12 bits and get the top 32 bits
46 * of the multiplication
47 */
48 rlwinm r5,r4,12,0,19
49 lis r6,1000000@h
50 ori r6,r6,1000000@l
51 mulhwu r5,r5,r6
52 stw r5,TVAL32_TV_USEC(r10)
53
54 cmpli cr0,r11,0 /* check if tz is NULL */
55 beq 1f
56 lwz r4,CFG_TZ_MINUTEWEST(r9)/* fill tz */
57 lwz r5,CFG_TZ_DSTTIME(r9)
58 stw r4,TZONE_TZ_MINWEST(r11)
59 stw r5,TZONE_TZ_DSTTIME(r11)
60
611: mtlr r12
62 li r3,0
63 blr
64
652:
66 mtlr r12
67 mr r3,r10
68 mr r4,r11
69 li r0,__NR_gettimeofday
70 sc
71 blr
72 .cfi_endproc
73V_FUNCTION_END(__kernel_gettimeofday)
74
75/*
76 * Exact prototype of clock_gettime()
77 *
78 * int __kernel_clock_gettime(clockid_t clock_id, struct timespec *tp);
79 *
80 */
81V_FUNCTION_BEGIN(__kernel_clock_gettime)
82 .cfi_startproc
83 /* Check for supported clock IDs */
84 cmpli cr0,r3,CLOCK_REALTIME
85 cmpli cr1,r3,CLOCK_MONOTONIC
86 cror cr0,cr0,cr1
87 bne cr0,99f
88
89 mflr r12 /* r12 saves lr */
90 .cfi_register lr,r12
91 mr r10,r3 /* r10 saves id */
92 mr r11,r4 /* r11 saves tp */
93 bl __get_datapage@local /* get data page */
94 mr r9, r3 /* datapage ptr in r9 */
95 beq cr1,50f /* if monotonic -> jump there */
96
97 /*
98 * CLOCK_REALTIME
99 */
100
101 bl __do_get_xsec@local /* get xsec from tb & kernel */
102 bne- 98f /* out of line -> do syscall */
103
104 /* seconds are xsec >> 20 */
105 rlwinm r5,r4,12,20,31
106 rlwimi r5,r3,12,0,19
107 stw r5,TSPC32_TV_SEC(r11)
108
109 /* get remaining xsec and convert to nsec. we scale
110 * up remaining xsec by 12 bits and get the top 32 bits
111 * of the multiplication, then we multiply by 1000
112 */
113 rlwinm r5,r4,12,0,19
114 lis r6,1000000@h
115 ori r6,r6,1000000@l
116 mulhwu r5,r5,r6
117 mulli r5,r5,1000
118 stw r5,TSPC32_TV_NSEC(r11)
119 mtlr r12
120 li r3,0
121 blr
122
123 /*
124 * CLOCK_MONOTONIC
125 */
126
12750: bl __do_get_xsec@local /* get xsec from tb & kernel */
128 bne- 98f /* out of line -> do syscall */
129
130 /* seconds are xsec >> 20 */
131 rlwinm r6,r4,12,20,31
132 rlwimi r6,r3,12,0,19
133
134 /* get remaining xsec and convert to nsec. we scale
135 * up remaining xsec by 12 bits and get the top 32 bits
136 * of the multiplication, then we multiply by 1000
137 */
138 rlwinm r7,r4,12,0,19
139 lis r5,1000000@h
140 ori r5,r5,1000000@l
141 mulhwu r7,r7,r5
142 mulli r7,r7,1000
143
144 /* now we must fixup using wall to monotonic. We need to snapshot
145 * that value and do the counter trick again. Fortunately, we still
146 * have the counter value in r8 that was returned by __do_get_xsec.
147 * At this point, r6,r7 contain our sec/nsec values, r3,r4 and r5
148 * can be used
149 */
150
151 lwz r3,WTOM_CLOCK_SEC(r9)
152 lwz r4,WTOM_CLOCK_NSEC(r9)
153
154 /* We now have our result in r3,r4. We create a fake dependency
155 * on that result and re-check the counter
156 */
157 or r5,r4,r3
158 xor r0,r5,r5
159 add r9,r9,r0
160#ifdef CONFIG_PPC64
161 lwz r0,(CFG_TB_UPDATE_COUNT+4)(r9)
162#else
163 lwz r0,(CFG_TB_UPDATE_COUNT)(r9)
164#endif
165 cmpl cr0,r8,r0 /* check if updated */
166 bne- 50b
167
168 /* Calculate and store result. Note that this mimmics the C code,
169 * which may cause funny results if nsec goes negative... is that
170 * possible at all ?
171 */
172 add r3,r3,r6
173 add r4,r4,r7
174 lis r5,NSEC_PER_SEC@h
175 ori r5,r5,NSEC_PER_SEC@l
176 cmpli cr0,r4,r5
177 blt 1f
178 subf r4,r5,r4
179 addi r3,r3,1
1801: stw r3,TSPC32_TV_SEC(r11)
181 stw r4,TSPC32_TV_NSEC(r11)
182
183 mtlr r12
184 li r3,0
185 blr
186
187 /*
188 * syscall fallback
189 */
19098:
191 mtlr r12
192 mr r3,r10
193 mr r4,r11
19499:
195 li r0,__NR_clock_gettime
196 sc
197 blr
198 .cfi_endproc
199V_FUNCTION_END(__kernel_clock_gettime)
200
201
202/*
203 * Exact prototype of clock_getres()
204 *
205 * int __kernel_clock_getres(clockid_t clock_id, struct timespec *res);
206 *
207 */
208V_FUNCTION_BEGIN(__kernel_clock_getres)
209 .cfi_startproc
210 /* Check for supported clock IDs */
211 cmpwi cr0,r3,CLOCK_REALTIME
212 cmpwi cr1,r3,CLOCK_MONOTONIC
213 cror cr0,cr0,cr1
214 bne cr0,99f
215
216 li r3,0
217 cmpli cr0,r4,0
218 beqlr
219 lis r5,CLOCK_REALTIME_RES@h
220 ori r5,r5,CLOCK_REALTIME_RES@l
221 stw r3,TSPC32_TV_SEC(r4)
222 stw r5,TSPC32_TV_NSEC(r4)
223 blr
224
225 /*
226 * syscall fallback
227 */
22899:
229 li r0,__NR_clock_getres
230 sc
231 blr
232 .cfi_endproc
233V_FUNCTION_END(__kernel_clock_getres)
234
235
236/*
237 * This is the core of gettimeofday() & friends, it returns the xsec
238 * value in r3 & r4 and expects the datapage ptr (non clobbered)
239 * in r9. clobbers r0,r4,r5,r6,r7,r8.
240 * When returning, r8 contains the counter value that can be reused
241 * by the monotonic clock implementation
242 */
243__do_get_xsec:
244 .cfi_startproc
245 /* Check for update count & load values. We use the low
246 * order 32 bits of the update count
247 */
248#ifdef CONFIG_PPC64
2491: lwz r8,(CFG_TB_UPDATE_COUNT+4)(r9)
250#else
2511: lwz r8,(CFG_TB_UPDATE_COUNT)(r9)
252#endif
253 andi. r0,r8,1 /* pending update ? loop */
254 bne- 1b
255 xor r0,r8,r8 /* create dependency */
256 add r9,r9,r0
257
258 /* Load orig stamp (offset to TB) */
259 lwz r5,CFG_TB_ORIG_STAMP(r9)
260 lwz r6,(CFG_TB_ORIG_STAMP+4)(r9)
261
262 /* Get a stable TB value */
2632: mftbu r3
264 mftbl r4
265 mftbu r0
266 cmpl cr0,r3,r0
267 bne- 2b
268
269 /* Substract tb orig stamp. If the high part is non-zero, we jump to
270 * the slow path which call the syscall.
271 * If it's ok, then we have our 32 bits tb_ticks value in r7
272 */
273 subfc r7,r6,r4
274 subfe. r0,r5,r3
275 bne- 3f
276
277 /* Load scale factor & do multiplication */
278 lwz r5,CFG_TB_TO_XS(r9) /* load values */
279 lwz r6,(CFG_TB_TO_XS+4)(r9)
280 mulhwu r4,r7,r5
281 mulhwu r6,r7,r6
282 mullw r0,r7,r5
283 addc r6,r6,r0
284
285 /* At this point, we have the scaled xsec value in r4 + XER:CA
286 * we load & add the stamp since epoch
287 */
288 lwz r5,CFG_STAMP_XSEC(r9)
289 lwz r6,(CFG_STAMP_XSEC+4)(r9)
290 adde r4,r4,r6
291 addze r3,r5
292
293 /* We now have our result in r3,r4. We create a fake dependency
294 * on that result and re-check the counter
295 */
296 or r6,r4,r3
297 xor r0,r6,r6
298 add r9,r9,r0
299#ifdef CONFIG_PPC64
300 lwz r0,(CFG_TB_UPDATE_COUNT+4)(r9)
301#else
302 lwz r0,(CFG_TB_UPDATE_COUNT)(r9)
303#endif
304 cmpl cr0,r8,r0 /* check if updated */
305 bne- 1b
306
307 /* Warning ! The caller expects CR:EQ to be set to indicate a
308 * successful calculation (so it won't fallback to the syscall
309 * method). We have overriden that CR bit in the counter check,
310 * but fortunately, the loop exit condition _is_ CR:EQ set, so
311 * we can exit safely here. If you change this code, be careful
312 * of that side effect.
313 */
3143: blr
315 .cfi_endproc
diff --git a/arch/ppc64/kernel/vdso32/note.S b/arch/powerpc/kernel/vdso32/note.S
index d4b5be4f3d5f..d4b5be4f3d5f 100644
--- a/arch/ppc64/kernel/vdso32/note.S
+++ b/arch/powerpc/kernel/vdso32/note.S
diff --git a/arch/ppc64/kernel/vdso32/sigtramp.S b/arch/powerpc/kernel/vdso32/sigtramp.S
index e04642781917..e04642781917 100644
--- a/arch/ppc64/kernel/vdso32/sigtramp.S
+++ b/arch/powerpc/kernel/vdso32/sigtramp.S
diff --git a/arch/ppc64/kernel/vdso32/vdso32.lds.S b/arch/powerpc/kernel/vdso32/vdso32.lds.S
index 6f87a916a394..f4bad720cb0a 100644
--- a/arch/ppc64/kernel/vdso32/vdso32.lds.S
+++ b/arch/powerpc/kernel/vdso32/vdso32.lds.S
@@ -102,9 +102,12 @@ VERSION
102{ 102{
103 VDSO_VERSION_STRING { 103 VDSO_VERSION_STRING {
104 global: 104 global:
105 __kernel_datapage_offset; /* Has to be there for the kernel to find it */ 105 __kernel_datapage_offset; /* Has to be there for the kernel to find */
106 __kernel_get_syscall_map; 106 __kernel_get_syscall_map;
107 __kernel_gettimeofday; 107 __kernel_gettimeofday;
108 __kernel_clock_gettime;
109 __kernel_clock_getres;
110 __kernel_get_tbfreq;
108 __kernel_sync_dicache; 111 __kernel_sync_dicache;
109 __kernel_sync_dicache_p5; 112 __kernel_sync_dicache_p5;
110 __kernel_sigtramp32; 113 __kernel_sigtramp32;
diff --git a/arch/ppc64/kernel/vdso32/vdso32_wrapper.S b/arch/powerpc/kernel/vdso32/vdso32_wrapper.S
index 76ca28e09d29..556f0caa5d84 100644
--- a/arch/ppc64/kernel/vdso32/vdso32_wrapper.S
+++ b/arch/powerpc/kernel/vdso32/vdso32_wrapper.S
@@ -6,7 +6,7 @@
6 .globl vdso32_start, vdso32_end 6 .globl vdso32_start, vdso32_end
7 .balign PAGE_SIZE 7 .balign PAGE_SIZE
8vdso32_start: 8vdso32_start:
9 .incbin "arch/ppc64/kernel/vdso32/vdso32.so" 9 .incbin "arch/powerpc/kernel/vdso32/vdso32.so"
10 .balign PAGE_SIZE 10 .balign PAGE_SIZE
11vdso32_end: 11vdso32_end:
12 12
diff --git a/arch/ppc64/kernel/vdso64/Makefile b/arch/powerpc/kernel/vdso64/Makefile
index ab39988452cc..ab39988452cc 100644
--- a/arch/ppc64/kernel/vdso64/Makefile
+++ b/arch/powerpc/kernel/vdso64/Makefile
diff --git a/arch/ppc64/kernel/vdso64/cacheflush.S b/arch/powerpc/kernel/vdso64/cacheflush.S
index d4a0ad28d534..d4a0ad28d534 100644
--- a/arch/ppc64/kernel/vdso64/cacheflush.S
+++ b/arch/powerpc/kernel/vdso64/cacheflush.S
diff --git a/arch/ppc64/kernel/vdso64/datapage.S b/arch/powerpc/kernel/vdso64/datapage.S
index ed6e599ae824..e67eda0f8cda 100644
--- a/arch/ppc64/kernel/vdso64/datapage.S
+++ b/arch/powerpc/kernel/vdso64/datapage.S
@@ -66,3 +66,19 @@ V_FUNCTION_BEGIN(__kernel_get_syscall_map)
66 blr 66 blr
67 .cfi_endproc 67 .cfi_endproc
68V_FUNCTION_END(__kernel_get_syscall_map) 68V_FUNCTION_END(__kernel_get_syscall_map)
69
70
71/*
72 * void unsigned long __kernel_get_tbfreq(void);
73 *
74 * returns the timebase frequency in HZ
75 */
76V_FUNCTION_BEGIN(__kernel_get_tbfreq)
77 .cfi_startproc
78 mflr r12
79 .cfi_register lr,r12
80 bl V_LOCAL_FUNC(__get_datapage)
81 ld r3,CFG_TB_TICKS_PER_SEC(r3)
82 mtlr r12
83 .cfi_endproc
84V_FUNCTION_END(__kernel_get_tbfreq)
diff --git a/arch/powerpc/kernel/vdso64/gettimeofday.S b/arch/powerpc/kernel/vdso64/gettimeofday.S
new file mode 100644
index 000000000000..d371c02a8c0e
--- /dev/null
+++ b/arch/powerpc/kernel/vdso64/gettimeofday.S
@@ -0,0 +1,242 @@
1/*
2 * Userland implementation of gettimeofday() for 64 bits processes in a
3 * ppc64 kernel for use in the vDSO
4 *
5 * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org),
6 * IBM Corp.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version
11 * 2 of the License, or (at your option) any later version.
12 */
13#include <linux/config.h>
14#include <asm/processor.h>
15#include <asm/ppc_asm.h>
16#include <asm/vdso.h>
17#include <asm/asm-offsets.h>
18#include <asm/unistd.h>
19
20 .text
21/*
22 * Exact prototype of gettimeofday
23 *
24 * int __kernel_gettimeofday(struct timeval *tv, struct timezone *tz);
25 *
26 */
27V_FUNCTION_BEGIN(__kernel_gettimeofday)
28 .cfi_startproc
29 mflr r12
30 .cfi_register lr,r12
31
32 mr r11,r3 /* r11 holds tv */
33 mr r10,r4 /* r10 holds tz */
34 bl V_LOCAL_FUNC(__get_datapage) /* get data page */
35 bl V_LOCAL_FUNC(__do_get_xsec) /* get xsec from tb & kernel */
36 lis r7,15 /* r7 = 1000000 = USEC_PER_SEC */
37 ori r7,r7,16960
38 rldicl r5,r4,44,20 /* r5 = sec = xsec / XSEC_PER_SEC */
39 rldicr r6,r5,20,43 /* r6 = sec * XSEC_PER_SEC */
40 std r5,TVAL64_TV_SEC(r11) /* store sec in tv */
41 subf r0,r6,r4 /* r0 = xsec = (xsec - r6) */
42 mulld r0,r0,r7 /* usec = (xsec * USEC_PER_SEC) /
43 * XSEC_PER_SEC
44 */
45 rldicl r0,r0,44,20
46 cmpldi cr0,r10,0 /* check if tz is NULL */
47 std r0,TVAL64_TV_USEC(r11) /* store usec in tv */
48 beq 1f
49 lwz r4,CFG_TZ_MINUTEWEST(r3)/* fill tz */
50 lwz r5,CFG_TZ_DSTTIME(r3)
51 stw r4,TZONE_TZ_MINWEST(r10)
52 stw r5,TZONE_TZ_DSTTIME(r10)
531: mtlr r12
54 li r3,0 /* always success */
55 blr
56 .cfi_endproc
57V_FUNCTION_END(__kernel_gettimeofday)
58
59
60/*
61 * Exact prototype of clock_gettime()
62 *
63 * int __kernel_clock_gettime(clockid_t clock_id, struct timespec *tp);
64 *
65 */
66V_FUNCTION_BEGIN(__kernel_clock_gettime)
67 .cfi_startproc
68 /* Check for supported clock IDs */
69 cmpwi cr0,r3,CLOCK_REALTIME
70 cmpwi cr1,r3,CLOCK_MONOTONIC
71 cror cr0,cr0,cr1
72 bne cr0,99f
73
74 mflr r12 /* r12 saves lr */
75 .cfi_register lr,r12
76 mr r10,r3 /* r10 saves id */
77 mr r11,r4 /* r11 saves tp */
78 bl V_LOCAL_FUNC(__get_datapage) /* get data page */
79 beq cr1,50f /* if monotonic -> jump there */
80
81 /*
82 * CLOCK_REALTIME
83 */
84
85 bl V_LOCAL_FUNC(__do_get_xsec) /* get xsec from tb & kernel */
86
87 lis r7,0x3b9a /* r7 = 1000000000 = NSEC_PER_SEC */
88 ori r7,r7,0xca00
89 rldicl r5,r4,44,20 /* r5 = sec = xsec / XSEC_PER_SEC */
90 rldicr r6,r5,20,43 /* r6 = sec * XSEC_PER_SEC */
91 std r5,TSPC64_TV_SEC(r11) /* store sec in tv */
92 subf r0,r6,r4 /* r0 = xsec = (xsec - r6) */
93 mulld r0,r0,r7 /* nsec = (xsec * NSEC_PER_SEC) /
94 * XSEC_PER_SEC
95 */
96 rldicl r0,r0,44,20
97 std r0,TSPC64_TV_NSEC(r11) /* store nsec in tp */
98
99 mtlr r12
100 li r3,0
101 blr
102
103 /*
104 * CLOCK_MONOTONIC
105 */
106
10750: bl V_LOCAL_FUNC(__do_get_xsec) /* get xsec from tb & kernel */
108
109 lis r7,0x3b9a /* r7 = 1000000000 = NSEC_PER_SEC */
110 ori r7,r7,0xca00
111 rldicl r5,r4,44,20 /* r5 = sec = xsec / XSEC_PER_SEC */
112 rldicr r6,r5,20,43 /* r6 = sec * XSEC_PER_SEC */
113 subf r0,r6,r4 /* r0 = xsec = (xsec - r6) */
114 mulld r0,r0,r7 /* nsec = (xsec * NSEC_PER_SEC) /
115 * XSEC_PER_SEC
116 */
117 rldicl r6,r0,44,20
118
119 /* now we must fixup using wall to monotonic. We need to snapshot
120 * that value and do the counter trick again. Fortunately, we still
121 * have the counter value in r8 that was returned by __do_get_xsec.
122 * At this point, r5,r6 contain our sec/nsec values.
123 * can be used
124 */
125
126 lwz r4,WTOM_CLOCK_SEC(r9)
127 lwz r7,WTOM_CLOCK_NSEC(r9)
128
129 /* We now have our result in r4,r7. We create a fake dependency
130 * on that result and re-check the counter
131 */
132 or r9,r4,r7
133 xor r0,r9,r9
134 add r3,r3,r0
135 ld r0,CFG_TB_UPDATE_COUNT(r3)
136 cmpld cr0,r0,r8 /* check if updated */
137 bne- 50b
138
139 /* Calculate and store result. Note that this mimmics the C code,
140 * which may cause funny results if nsec goes negative... is that
141 * possible at all ?
142 */
143 add r4,r4,r5
144 add r7,r7,r6
145 lis r9,NSEC_PER_SEC@h
146 ori r9,r9,NSEC_PER_SEC@l
147 cmpli cr0,r7,r9
148 blt 1f
149 subf r7,r9,r7
150 addi r4,r4,1
1511: std r4,TSPC64_TV_SEC(r11)
152 std r7,TSPC64_TV_NSEC(r11)
153
154 mtlr r12
155 li r3,0
156 blr
157
158 /*
159 * syscall fallback
160 */
16198:
162 mtlr r12
163 mr r3,r10
164 mr r4,r11
16599:
166 li r0,__NR_clock_gettime
167 sc
168 blr
169 .cfi_endproc
170V_FUNCTION_END(__kernel_clock_gettime)
171
172
173/*
174 * Exact prototype of clock_getres()
175 *
176 * int __kernel_clock_getres(clockid_t clock_id, struct timespec *res);
177 *
178 */
179V_FUNCTION_BEGIN(__kernel_clock_getres)
180 .cfi_startproc
181 /* Check for supported clock IDs */
182 cmpwi cr0,r3,CLOCK_REALTIME
183 cmpwi cr1,r3,CLOCK_MONOTONIC
184 cror cr0,cr0,cr1
185 bne cr0,99f
186
187 li r3,0
188 cmpli cr0,r4,0
189 beqlr
190 lis r5,CLOCK_REALTIME_RES@h
191 ori r5,r5,CLOCK_REALTIME_RES@l
192 std r3,TSPC64_TV_SEC(r4)
193 std r5,TSPC64_TV_NSEC(r4)
194 blr
195
196 /*
197 * syscall fallback
198 */
19999:
200 li r0,__NR_clock_getres
201 sc
202 blr
203 .cfi_endproc
204V_FUNCTION_END(__kernel_clock_getres)
205
206
207/*
208 * This is the core of gettimeofday(), it returns the xsec
209 * value in r4 and expects the datapage ptr (non clobbered)
210 * in r3. clobbers r0,r4,r5,r6,r7,r8
211 * When returning, r8 contains the counter value that can be reused
212 */
213V_FUNCTION_BEGIN(__do_get_xsec)
214 .cfi_startproc
215 /* check for update count & load values */
2161: ld r8,CFG_TB_UPDATE_COUNT(r3)
217 andi. r0,r4,1 /* pending update ? loop */
218 bne- 1b
219 xor r0,r4,r4 /* create dependency */
220 add r3,r3,r0
221
222 /* Get TB & offset it */
223 mftb r7
224 ld r9,CFG_TB_ORIG_STAMP(r3)
225 subf r7,r9,r7
226
227 /* Scale result */
228 ld r5,CFG_TB_TO_XS(r3)
229 mulhdu r7,r7,r5
230
231 /* Add stamp since epoch */
232 ld r6,CFG_STAMP_XSEC(r3)
233 add r4,r6,r7
234
235 xor r0,r4,r4
236 add r3,r3,r0
237 ld r0,CFG_TB_UPDATE_COUNT(r3)
238 cmpld cr0,r0,r8 /* check if updated */
239 bne- 1b
240 blr
241 .cfi_endproc
242V_FUNCTION_END(__do_get_xsec)
diff --git a/arch/ppc64/kernel/vdso64/note.S b/arch/powerpc/kernel/vdso64/note.S
index dc2a509f7e8a..dc2a509f7e8a 100644
--- a/arch/ppc64/kernel/vdso64/note.S
+++ b/arch/powerpc/kernel/vdso64/note.S
diff --git a/arch/ppc64/kernel/vdso64/sigtramp.S b/arch/powerpc/kernel/vdso64/sigtramp.S
index 31b604ab56de..31b604ab56de 100644
--- a/arch/ppc64/kernel/vdso64/sigtramp.S
+++ b/arch/powerpc/kernel/vdso64/sigtramp.S
diff --git a/arch/ppc64/kernel/vdso64/vdso64.lds.S b/arch/powerpc/kernel/vdso64/vdso64.lds.S
index 9cb28181da80..4bdf224464ab 100644
--- a/arch/ppc64/kernel/vdso64/vdso64.lds.S
+++ b/arch/powerpc/kernel/vdso64/vdso64.lds.S
@@ -102,9 +102,12 @@ VERSION
102{ 102{
103 VDSO_VERSION_STRING { 103 VDSO_VERSION_STRING {
104 global: 104 global:
105 __kernel_datapage_offset; /* Has to be there for the kernel to find it */ 105 __kernel_datapage_offset; /* Has to be there for the kernel to find */
106 __kernel_get_syscall_map; 106 __kernel_get_syscall_map;
107 __kernel_gettimeofday; 107 __kernel_gettimeofday;
108 __kernel_clock_gettime;
109 __kernel_clock_getres;
110 __kernel_get_tbfreq;
108 __kernel_sync_dicache; 111 __kernel_sync_dicache;
109 __kernel_sync_dicache_p5; 112 __kernel_sync_dicache_p5;
110 __kernel_sigtramp_rt64; 113 __kernel_sigtramp_rt64;
diff --git a/arch/ppc64/kernel/vdso64/vdso64_wrapper.S b/arch/powerpc/kernel/vdso64/vdso64_wrapper.S
index 771c2741c492..0529cb9e3b97 100644
--- a/arch/ppc64/kernel/vdso64/vdso64_wrapper.S
+++ b/arch/powerpc/kernel/vdso64/vdso64_wrapper.S
@@ -6,7 +6,7 @@
6 .globl vdso64_start, vdso64_end 6 .globl vdso64_start, vdso64_end
7 .balign PAGE_SIZE 7 .balign PAGE_SIZE
8vdso64_start: 8vdso64_start:
9 .incbin "arch/ppc64/kernel/vdso64/vdso64.so" 9 .incbin "arch/powerpc/kernel/vdso64/vdso64.so"
10 .balign PAGE_SIZE 10 .balign PAGE_SIZE
11vdso64_end: 11vdso64_end:
12 12
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index 1dd3cc69a490..e2c95fcb8055 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -46,9 +46,7 @@
46#include <asm/prom.h> 46#include <asm/prom.h>
47#include <asm/lmb.h> 47#include <asm/lmb.h>
48#include <asm/sections.h> 48#include <asm/sections.h>
49#ifdef CONFIG_PPC64
50#include <asm/vdso.h> 49#include <asm/vdso.h>
51#endif
52 50
53#include "mmu_decl.h" 51#include "mmu_decl.h"
54 52
@@ -397,10 +395,8 @@ void __init mem_init(void)
397 395
398 mem_init_done = 1; 396 mem_init_done = 1;
399 397
400#ifdef CONFIG_PPC64
401 /* Initialize the vDSO */ 398 /* Initialize the vDSO */
402 vdso_init(); 399 vdso_init();
403#endif
404} 400}
405 401
406/* 402/*
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index da09ba03c424..bd2cf1336885 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -17,9 +17,8 @@
17#include <linux/nodemask.h> 17#include <linux/nodemask.h>
18#include <linux/cpu.h> 18#include <linux/cpu.h>
19#include <linux/notifier.h> 19#include <linux/notifier.h>
20#include <asm/sparsemem.h>
20#include <asm/lmb.h> 21#include <asm/lmb.h>
21#include <asm/machdep.h>
22#include <asm/abs_addr.h>
23#include <asm/system.h> 22#include <asm/system.h>
24#include <asm/smp.h> 23#include <asm/smp.h>
25 24
@@ -28,45 +27,113 @@ static int numa_enabled = 1;
28static int numa_debug; 27static int numa_debug;
29#define dbg(args...) if (numa_debug) { printk(KERN_INFO args); } 28#define dbg(args...) if (numa_debug) { printk(KERN_INFO args); }
30 29
31#ifdef DEBUG_NUMA 30int numa_cpu_lookup_table[NR_CPUS];
32#define ARRAY_INITIALISER -1
33#else
34#define ARRAY_INITIALISER 0
35#endif
36
37int numa_cpu_lookup_table[NR_CPUS] = { [ 0 ... (NR_CPUS - 1)] =
38 ARRAY_INITIALISER};
39char *numa_memory_lookup_table;
40cpumask_t numa_cpumask_lookup_table[MAX_NUMNODES]; 31cpumask_t numa_cpumask_lookup_table[MAX_NUMNODES];
41int nr_cpus_in_node[MAX_NUMNODES] = { [0 ... (MAX_NUMNODES -1)] = 0};
42
43struct pglist_data *node_data[MAX_NUMNODES]; 32struct pglist_data *node_data[MAX_NUMNODES];
44bootmem_data_t __initdata plat_node_bdata[MAX_NUMNODES]; 33
34EXPORT_SYMBOL(numa_cpu_lookup_table);
35EXPORT_SYMBOL(numa_cpumask_lookup_table);
36EXPORT_SYMBOL(node_data);
37
38static bootmem_data_t __initdata plat_node_bdata[MAX_NUMNODES];
45static int min_common_depth; 39static int min_common_depth;
46 40
47/* 41/*
48 * We need somewhere to store start/span for each node until we have 42 * We need somewhere to store start/end/node for each region until we have
49 * allocated the real node_data structures. 43 * allocated the real node_data structures.
50 */ 44 */
45#define MAX_REGIONS (MAX_LMB_REGIONS*2)
51static struct { 46static struct {
52 unsigned long node_start_pfn; 47 unsigned long start_pfn;
53 unsigned long node_end_pfn; 48 unsigned long end_pfn;
54 unsigned long node_present_pages; 49 int nid;
55} init_node_data[MAX_NUMNODES] __initdata; 50} init_node_data[MAX_REGIONS] __initdata;
56 51
57EXPORT_SYMBOL(node_data); 52int __init early_pfn_to_nid(unsigned long pfn)
58EXPORT_SYMBOL(numa_cpu_lookup_table); 53{
59EXPORT_SYMBOL(numa_memory_lookup_table); 54 unsigned int i;
60EXPORT_SYMBOL(numa_cpumask_lookup_table); 55
61EXPORT_SYMBOL(nr_cpus_in_node); 56 for (i = 0; init_node_data[i].end_pfn; i++) {
57 unsigned long start_pfn = init_node_data[i].start_pfn;
58 unsigned long end_pfn = init_node_data[i].end_pfn;
59
60 if ((start_pfn <= pfn) && (pfn < end_pfn))
61 return init_node_data[i].nid;
62 }
63
64 return -1;
65}
66
67void __init add_region(unsigned int nid, unsigned long start_pfn,
68 unsigned long pages)
69{
70 unsigned int i;
71
72 dbg("add_region nid %d start_pfn 0x%lx pages 0x%lx\n",
73 nid, start_pfn, pages);
74
75 for (i = 0; init_node_data[i].end_pfn; i++) {
76 if (init_node_data[i].nid != nid)
77 continue;
78 if (init_node_data[i].end_pfn == start_pfn) {
79 init_node_data[i].end_pfn += pages;
80 return;
81 }
82 if (init_node_data[i].start_pfn == (start_pfn + pages)) {
83 init_node_data[i].start_pfn -= pages;
84 return;
85 }
86 }
87
88 /*
89 * Leave last entry NULL so we dont iterate off the end (we use
90 * entry.end_pfn to terminate the walk).
91 */
92 if (i >= (MAX_REGIONS - 1)) {
93 printk(KERN_ERR "WARNING: too many memory regions in "
94 "numa code, truncating\n");
95 return;
96 }
97
98 init_node_data[i].start_pfn = start_pfn;
99 init_node_data[i].end_pfn = start_pfn + pages;
100 init_node_data[i].nid = nid;
101}
102
103/* We assume init_node_data has no overlapping regions */
104void __init get_region(unsigned int nid, unsigned long *start_pfn,
105 unsigned long *end_pfn, unsigned long *pages_present)
106{
107 unsigned int i;
108
109 *start_pfn = -1UL;
110 *end_pfn = *pages_present = 0;
111
112 for (i = 0; init_node_data[i].end_pfn; i++) {
113 if (init_node_data[i].nid != nid)
114 continue;
115
116 *pages_present += init_node_data[i].end_pfn -
117 init_node_data[i].start_pfn;
118
119 if (init_node_data[i].start_pfn < *start_pfn)
120 *start_pfn = init_node_data[i].start_pfn;
121
122 if (init_node_data[i].end_pfn > *end_pfn)
123 *end_pfn = init_node_data[i].end_pfn;
124 }
125
126 /* We didnt find a matching region, return start/end as 0 */
127 if (*start_pfn == -1UL)
128 start_pfn = 0;
129}
62 130
63static inline void map_cpu_to_node(int cpu, int node) 131static inline void map_cpu_to_node(int cpu, int node)
64{ 132{
65 numa_cpu_lookup_table[cpu] = node; 133 numa_cpu_lookup_table[cpu] = node;
66 if (!(cpu_isset(cpu, numa_cpumask_lookup_table[node]))) { 134
135 if (!(cpu_isset(cpu, numa_cpumask_lookup_table[node])))
67 cpu_set(cpu, numa_cpumask_lookup_table[node]); 136 cpu_set(cpu, numa_cpumask_lookup_table[node]);
68 nr_cpus_in_node[node]++;
69 }
70} 137}
71 138
72#ifdef CONFIG_HOTPLUG_CPU 139#ifdef CONFIG_HOTPLUG_CPU
@@ -78,7 +145,6 @@ static void unmap_cpu_from_node(unsigned long cpu)
78 145
79 if (cpu_isset(cpu, numa_cpumask_lookup_table[node])) { 146 if (cpu_isset(cpu, numa_cpumask_lookup_table[node])) {
80 cpu_clear(cpu, numa_cpumask_lookup_table[node]); 147 cpu_clear(cpu, numa_cpumask_lookup_table[node]);
81 nr_cpus_in_node[node]--;
82 } else { 148 } else {
83 printk(KERN_ERR "WARNING: cpu %lu not found in node %d\n", 149 printk(KERN_ERR "WARNING: cpu %lu not found in node %d\n",
84 cpu, node); 150 cpu, node);
@@ -86,7 +152,7 @@ static void unmap_cpu_from_node(unsigned long cpu)
86} 152}
87#endif /* CONFIG_HOTPLUG_CPU */ 153#endif /* CONFIG_HOTPLUG_CPU */
88 154
89static struct device_node * __devinit find_cpu_node(unsigned int cpu) 155static struct device_node *find_cpu_node(unsigned int cpu)
90{ 156{
91 unsigned int hw_cpuid = get_hard_smp_processor_id(cpu); 157 unsigned int hw_cpuid = get_hard_smp_processor_id(cpu);
92 struct device_node *cpu_node = NULL; 158 struct device_node *cpu_node = NULL;
@@ -213,7 +279,7 @@ static int __init get_mem_size_cells(void)
213 return rc; 279 return rc;
214} 280}
215 281
216static unsigned long read_n_cells(int n, unsigned int **buf) 282static unsigned long __init read_n_cells(int n, unsigned int **buf)
217{ 283{
218 unsigned long result = 0; 284 unsigned long result = 0;
219 285
@@ -295,7 +361,8 @@ static int cpu_numa_callback(struct notifier_block *nfb,
295 * or zero. If the returned value of size is 0 the region should be 361 * or zero. If the returned value of size is 0 the region should be
296 * discarded as it lies wholy above the memory limit. 362 * discarded as it lies wholy above the memory limit.
297 */ 363 */
298static unsigned long __init numa_enforce_memory_limit(unsigned long start, unsigned long size) 364static unsigned long __init numa_enforce_memory_limit(unsigned long start,
365 unsigned long size)
299{ 366{
300 /* 367 /*
301 * We use lmb_end_of_DRAM() in here instead of memory_limit because 368 * We use lmb_end_of_DRAM() in here instead of memory_limit because
@@ -320,8 +387,7 @@ static int __init parse_numa_properties(void)
320 struct device_node *cpu = NULL; 387 struct device_node *cpu = NULL;
321 struct device_node *memory = NULL; 388 struct device_node *memory = NULL;
322 int addr_cells, size_cells; 389 int addr_cells, size_cells;
323 int max_domain = 0; 390 int max_domain;
324 long entries = lmb_end_of_DRAM() >> MEMORY_INCREMENT_SHIFT;
325 unsigned long i; 391 unsigned long i;
326 392
327 if (numa_enabled == 0) { 393 if (numa_enabled == 0) {
@@ -329,13 +395,6 @@ static int __init parse_numa_properties(void)
329 return -1; 395 return -1;
330 } 396 }
331 397
332 numa_memory_lookup_table =
333 (char *)abs_to_virt(lmb_alloc(entries * sizeof(char), 1));
334 memset(numa_memory_lookup_table, 0, entries * sizeof(char));
335
336 for (i = 0; i < entries ; i++)
337 numa_memory_lookup_table[i] = ARRAY_INITIALISER;
338
339 min_common_depth = find_min_common_depth(); 398 min_common_depth = find_min_common_depth();
340 399
341 dbg("NUMA associativity depth for CPU/Memory: %d\n", min_common_depth); 400 dbg("NUMA associativity depth for CPU/Memory: %d\n", min_common_depth);
@@ -387,9 +446,6 @@ new_range:
387 start = read_n_cells(addr_cells, &memcell_buf); 446 start = read_n_cells(addr_cells, &memcell_buf);
388 size = read_n_cells(size_cells, &memcell_buf); 447 size = read_n_cells(size_cells, &memcell_buf);
389 448
390 start = _ALIGN_DOWN(start, MEMORY_INCREMENT);
391 size = _ALIGN_UP(size, MEMORY_INCREMENT);
392
393 numa_domain = of_node_numa_domain(memory); 449 numa_domain = of_node_numa_domain(memory);
394 450
395 if (numa_domain >= MAX_NUMNODES) { 451 if (numa_domain >= MAX_NUMNODES) {
@@ -403,44 +459,15 @@ new_range:
403 if (max_domain < numa_domain) 459 if (max_domain < numa_domain)
404 max_domain = numa_domain; 460 max_domain = numa_domain;
405 461
406 if (! (size = numa_enforce_memory_limit(start, size))) { 462 if (!(size = numa_enforce_memory_limit(start, size))) {
407 if (--ranges) 463 if (--ranges)
408 goto new_range; 464 goto new_range;
409 else 465 else
410 continue; 466 continue;
411 } 467 }
412 468
413 /* 469 add_region(numa_domain, start >> PAGE_SHIFT,
414 * Initialize new node struct, or add to an existing one. 470 size >> PAGE_SHIFT);
415 */
416 if (init_node_data[numa_domain].node_end_pfn) {
417 if ((start / PAGE_SIZE) <
418 init_node_data[numa_domain].node_start_pfn)
419 init_node_data[numa_domain].node_start_pfn =
420 start / PAGE_SIZE;
421 if (((start / PAGE_SIZE) + (size / PAGE_SIZE)) >
422 init_node_data[numa_domain].node_end_pfn)
423 init_node_data[numa_domain].node_end_pfn =
424 (start / PAGE_SIZE) +
425 (size / PAGE_SIZE);
426
427 init_node_data[numa_domain].node_present_pages +=
428 size / PAGE_SIZE;
429 } else {
430 node_set_online(numa_domain);
431
432 init_node_data[numa_domain].node_start_pfn =
433 start / PAGE_SIZE;
434 init_node_data[numa_domain].node_end_pfn =
435 init_node_data[numa_domain].node_start_pfn +
436 size / PAGE_SIZE;
437 init_node_data[numa_domain].node_present_pages =
438 size / PAGE_SIZE;
439 }
440
441 for (i = start ; i < (start+size); i += MEMORY_INCREMENT)
442 numa_memory_lookup_table[i >> MEMORY_INCREMENT_SHIFT] =
443 numa_domain;
444 471
445 if (--ranges) 472 if (--ranges)
446 goto new_range; 473 goto new_range;
@@ -456,32 +483,15 @@ static void __init setup_nonnuma(void)
456{ 483{
457 unsigned long top_of_ram = lmb_end_of_DRAM(); 484 unsigned long top_of_ram = lmb_end_of_DRAM();
458 unsigned long total_ram = lmb_phys_mem_size(); 485 unsigned long total_ram = lmb_phys_mem_size();
459 unsigned long i;
460 486
461 printk(KERN_INFO "Top of RAM: 0x%lx, Total RAM: 0x%lx\n", 487 printk(KERN_INFO "Top of RAM: 0x%lx, Total RAM: 0x%lx\n",
462 top_of_ram, total_ram); 488 top_of_ram, total_ram);
463 printk(KERN_INFO "Memory hole size: %ldMB\n", 489 printk(KERN_INFO "Memory hole size: %ldMB\n",
464 (top_of_ram - total_ram) >> 20); 490 (top_of_ram - total_ram) >> 20);
465 491
466 if (!numa_memory_lookup_table) {
467 long entries = top_of_ram >> MEMORY_INCREMENT_SHIFT;
468 numa_memory_lookup_table =
469 (char *)abs_to_virt(lmb_alloc(entries * sizeof(char), 1));
470 memset(numa_memory_lookup_table, 0, entries * sizeof(char));
471 for (i = 0; i < entries ; i++)
472 numa_memory_lookup_table[i] = ARRAY_INITIALISER;
473 }
474
475 map_cpu_to_node(boot_cpuid, 0); 492 map_cpu_to_node(boot_cpuid, 0);
476 493 add_region(0, 0, lmb_end_of_DRAM() >> PAGE_SHIFT);
477 node_set_online(0); 494 node_set_online(0);
478
479 init_node_data[0].node_start_pfn = 0;
480 init_node_data[0].node_end_pfn = lmb_end_of_DRAM() / PAGE_SIZE;
481 init_node_data[0].node_present_pages = total_ram / PAGE_SIZE;
482
483 for (i = 0 ; i < top_of_ram; i += MEMORY_INCREMENT)
484 numa_memory_lookup_table[i >> MEMORY_INCREMENT_SHIFT] = 0;
485} 495}
486 496
487static void __init dump_numa_topology(void) 497static void __init dump_numa_topology(void)
@@ -499,8 +509,9 @@ static void __init dump_numa_topology(void)
499 509
500 count = 0; 510 count = 0;
501 511
502 for (i = 0; i < lmb_end_of_DRAM(); i += MEMORY_INCREMENT) { 512 for (i = 0; i < lmb_end_of_DRAM();
503 if (numa_memory_lookup_table[i >> MEMORY_INCREMENT_SHIFT] == node) { 513 i += (1 << SECTION_SIZE_BITS)) {
514 if (early_pfn_to_nid(i >> PAGE_SHIFT) == node) {
504 if (count == 0) 515 if (count == 0)
505 printk(" 0x%lx", i); 516 printk(" 0x%lx", i);
506 ++count; 517 ++count;
@@ -525,10 +536,12 @@ static void __init dump_numa_topology(void)
525 * 536 *
526 * Returns the physical address of the memory. 537 * Returns the physical address of the memory.
527 */ 538 */
528static unsigned long careful_allocation(int nid, unsigned long size, 539static void __init *careful_allocation(int nid, unsigned long size,
529 unsigned long align, unsigned long end) 540 unsigned long align,
541 unsigned long end_pfn)
530{ 542{
531 unsigned long ret = lmb_alloc_base(size, align, end); 543 int new_nid;
544 unsigned long ret = lmb_alloc_base(size, align, end_pfn << PAGE_SHIFT);
532 545
533 /* retry over all memory */ 546 /* retry over all memory */
534 if (!ret) 547 if (!ret)
@@ -542,28 +555,27 @@ static unsigned long careful_allocation(int nid, unsigned long size,
542 * If the memory came from a previously allocated node, we must 555 * If the memory came from a previously allocated node, we must
543 * retry with the bootmem allocator. 556 * retry with the bootmem allocator.
544 */ 557 */
545 if (pa_to_nid(ret) < nid) { 558 new_nid = early_pfn_to_nid(ret >> PAGE_SHIFT);
546 nid = pa_to_nid(ret); 559 if (new_nid < nid) {
547 ret = (unsigned long)__alloc_bootmem_node(NODE_DATA(nid), 560 ret = (unsigned long)__alloc_bootmem_node(NODE_DATA(new_nid),
548 size, align, 0); 561 size, align, 0);
549 562
550 if (!ret) 563 if (!ret)
551 panic("numa.c: cannot allocate %lu bytes on node %d", 564 panic("numa.c: cannot allocate %lu bytes on node %d",
552 size, nid); 565 size, new_nid);
553 566
554 ret = virt_to_abs(ret); 567 ret = __pa(ret);
555 568
556 dbg("alloc_bootmem %lx %lx\n", ret, size); 569 dbg("alloc_bootmem %lx %lx\n", ret, size);
557 } 570 }
558 571
559 return ret; 572 return (void *)ret;
560} 573}
561 574
562void __init do_init_bootmem(void) 575void __init do_init_bootmem(void)
563{ 576{
564 int nid; 577 int nid;
565 int addr_cells, size_cells; 578 unsigned int i;
566 struct device_node *memory = NULL;
567 static struct notifier_block ppc64_numa_nb = { 579 static struct notifier_block ppc64_numa_nb = {
568 .notifier_call = cpu_numa_callback, 580 .notifier_call = cpu_numa_callback,
569 .priority = 1 /* Must run before sched domains notifier. */ 581 .priority = 1 /* Must run before sched domains notifier. */
@@ -581,99 +593,66 @@ void __init do_init_bootmem(void)
581 register_cpu_notifier(&ppc64_numa_nb); 593 register_cpu_notifier(&ppc64_numa_nb);
582 594
583 for_each_online_node(nid) { 595 for_each_online_node(nid) {
584 unsigned long start_paddr, end_paddr; 596 unsigned long start_pfn, end_pfn, pages_present;
585 int i;
586 unsigned long bootmem_paddr; 597 unsigned long bootmem_paddr;
587 unsigned long bootmap_pages; 598 unsigned long bootmap_pages;
588 599
589 start_paddr = init_node_data[nid].node_start_pfn * PAGE_SIZE; 600 get_region(nid, &start_pfn, &end_pfn, &pages_present);
590 end_paddr = init_node_data[nid].node_end_pfn * PAGE_SIZE;
591 601
592 /* Allocate the node structure node local if possible */ 602 /* Allocate the node structure node local if possible */
593 NODE_DATA(nid) = (struct pglist_data *)careful_allocation(nid, 603 NODE_DATA(nid) = careful_allocation(nid,
594 sizeof(struct pglist_data), 604 sizeof(struct pglist_data),
595 SMP_CACHE_BYTES, end_paddr); 605 SMP_CACHE_BYTES, end_pfn);
596 NODE_DATA(nid) = abs_to_virt(NODE_DATA(nid)); 606 NODE_DATA(nid) = __va(NODE_DATA(nid));
597 memset(NODE_DATA(nid), 0, sizeof(struct pglist_data)); 607 memset(NODE_DATA(nid), 0, sizeof(struct pglist_data));
598 608
599 dbg("node %d\n", nid); 609 dbg("node %d\n", nid);
600 dbg("NODE_DATA() = %p\n", NODE_DATA(nid)); 610 dbg("NODE_DATA() = %p\n", NODE_DATA(nid));
601 611
602 NODE_DATA(nid)->bdata = &plat_node_bdata[nid]; 612 NODE_DATA(nid)->bdata = &plat_node_bdata[nid];
603 NODE_DATA(nid)->node_start_pfn = 613 NODE_DATA(nid)->node_start_pfn = start_pfn;
604 init_node_data[nid].node_start_pfn; 614 NODE_DATA(nid)->node_spanned_pages = end_pfn - start_pfn;
605 NODE_DATA(nid)->node_spanned_pages =
606 end_paddr - start_paddr;
607 615
608 if (NODE_DATA(nid)->node_spanned_pages == 0) 616 if (NODE_DATA(nid)->node_spanned_pages == 0)
609 continue; 617 continue;
610 618
611 dbg("start_paddr = %lx\n", start_paddr); 619 dbg("start_paddr = %lx\n", start_pfn << PAGE_SHIFT);
612 dbg("end_paddr = %lx\n", end_paddr); 620 dbg("end_paddr = %lx\n", end_pfn << PAGE_SHIFT);
613 621
614 bootmap_pages = bootmem_bootmap_pages((end_paddr - start_paddr) >> PAGE_SHIFT); 622 bootmap_pages = bootmem_bootmap_pages(end_pfn - start_pfn);
623 bootmem_paddr = (unsigned long)careful_allocation(nid,
624 bootmap_pages << PAGE_SHIFT,
625 PAGE_SIZE, end_pfn);
626 memset(__va(bootmem_paddr), 0, bootmap_pages << PAGE_SHIFT);
615 627
616 bootmem_paddr = careful_allocation(nid,
617 bootmap_pages << PAGE_SHIFT,
618 PAGE_SIZE, end_paddr);
619 memset(abs_to_virt(bootmem_paddr), 0,
620 bootmap_pages << PAGE_SHIFT);
621 dbg("bootmap_paddr = %lx\n", bootmem_paddr); 628 dbg("bootmap_paddr = %lx\n", bootmem_paddr);
622 629
623 init_bootmem_node(NODE_DATA(nid), bootmem_paddr >> PAGE_SHIFT, 630 init_bootmem_node(NODE_DATA(nid), bootmem_paddr >> PAGE_SHIFT,
624 start_paddr >> PAGE_SHIFT, 631 start_pfn, end_pfn);
625 end_paddr >> PAGE_SHIFT);
626 632
627 /* 633 /* Add free regions on this node */
628 * We need to do another scan of all memory sections to 634 for (i = 0; init_node_data[i].end_pfn; i++) {
629 * associate memory with the correct node. 635 unsigned long start, end;
630 */
631 addr_cells = get_mem_addr_cells();
632 size_cells = get_mem_size_cells();
633 memory = NULL;
634 while ((memory = of_find_node_by_type(memory, "memory")) != NULL) {
635 unsigned long mem_start, mem_size;
636 int numa_domain, ranges;
637 unsigned int *memcell_buf;
638 unsigned int len;
639
640 memcell_buf = (unsigned int *)get_property(memory, "reg", &len);
641 if (!memcell_buf || len <= 0)
642 continue;
643 636
644 ranges = memory->n_addrs; /* ranges in cell */ 637 if (init_node_data[i].nid != nid)
645new_range:
646 mem_start = read_n_cells(addr_cells, &memcell_buf);
647 mem_size = read_n_cells(size_cells, &memcell_buf);
648 if (numa_enabled) {
649 numa_domain = of_node_numa_domain(memory);
650 if (numa_domain >= MAX_NUMNODES)
651 numa_domain = 0;
652 } else
653 numa_domain = 0;
654
655 if (numa_domain != nid)
656 continue; 638 continue;
657 639
658 mem_size = numa_enforce_memory_limit(mem_start, mem_size); 640 start = init_node_data[i].start_pfn << PAGE_SHIFT;
659 if (mem_size) { 641 end = init_node_data[i].end_pfn << PAGE_SHIFT;
660 dbg("free_bootmem %lx %lx\n", mem_start, mem_size);
661 free_bootmem_node(NODE_DATA(nid), mem_start, mem_size);
662 }
663 642
664 if (--ranges) /* process all ranges in cell */ 643 dbg("free_bootmem %lx %lx\n", start, end - start);
665 goto new_range; 644 free_bootmem_node(NODE_DATA(nid), start, end - start);
666 } 645 }
667 646
668 /* 647 /* Mark reserved regions on this node */
669 * Mark reserved regions on this node
670 */
671 for (i = 0; i < lmb.reserved.cnt; i++) { 648 for (i = 0; i < lmb.reserved.cnt; i++) {
672 unsigned long physbase = lmb.reserved.region[i].base; 649 unsigned long physbase = lmb.reserved.region[i].base;
673 unsigned long size = lmb.reserved.region[i].size; 650 unsigned long size = lmb.reserved.region[i].size;
651 unsigned long start_paddr = start_pfn << PAGE_SHIFT;
652 unsigned long end_paddr = end_pfn << PAGE_SHIFT;
674 653
675 if (pa_to_nid(physbase) != nid && 654 if (early_pfn_to_nid(physbase >> PAGE_SHIFT) != nid &&
676 pa_to_nid(physbase+size-1) != nid) 655 early_pfn_to_nid((physbase+size-1) >> PAGE_SHIFT) != nid)
677 continue; 656 continue;
678 657
679 if (physbase < end_paddr && 658 if (physbase < end_paddr &&
@@ -693,46 +672,19 @@ new_range:
693 size); 672 size);
694 } 673 }
695 } 674 }
696 /*
697 * This loop may look famaliar, but we have to do it again
698 * after marking our reserved memory to mark memory present
699 * for sparsemem.
700 */
701 addr_cells = get_mem_addr_cells();
702 size_cells = get_mem_size_cells();
703 memory = NULL;
704 while ((memory = of_find_node_by_type(memory, "memory")) != NULL) {
705 unsigned long mem_start, mem_size;
706 int numa_domain, ranges;
707 unsigned int *memcell_buf;
708 unsigned int len;
709
710 memcell_buf = (unsigned int *)get_property(memory, "reg", &len);
711 if (!memcell_buf || len <= 0)
712 continue;
713 675
714 ranges = memory->n_addrs; /* ranges in cell */ 676 /* Add regions into sparsemem */
715new_range2: 677 for (i = 0; init_node_data[i].end_pfn; i++) {
716 mem_start = read_n_cells(addr_cells, &memcell_buf); 678 unsigned long start, end;
717 mem_size = read_n_cells(size_cells, &memcell_buf); 679
718 if (numa_enabled) { 680 if (init_node_data[i].nid != nid)
719 numa_domain = of_node_numa_domain(memory);
720 if (numa_domain >= MAX_NUMNODES)
721 numa_domain = 0;
722 } else
723 numa_domain = 0;
724
725 if (numa_domain != nid)
726 continue; 681 continue;
727 682
728 mem_size = numa_enforce_memory_limit(mem_start, mem_size); 683 start = init_node_data[i].start_pfn;
729 memory_present(numa_domain, mem_start >> PAGE_SHIFT, 684 end = init_node_data[i].end_pfn;
730 (mem_start + mem_size) >> PAGE_SHIFT);
731 685
732 if (--ranges) /* process all ranges in cell */ 686 memory_present(nid, start, end);
733 goto new_range2;
734 } 687 }
735
736 } 688 }
737} 689}
738 690
@@ -746,21 +698,18 @@ void __init paging_init(void)
746 memset(zholes_size, 0, sizeof(zholes_size)); 698 memset(zholes_size, 0, sizeof(zholes_size));
747 699
748 for_each_online_node(nid) { 700 for_each_online_node(nid) {
749 unsigned long start_pfn; 701 unsigned long start_pfn, end_pfn, pages_present;
750 unsigned long end_pfn;
751 702
752 start_pfn = init_node_data[nid].node_start_pfn; 703 get_region(nid, &start_pfn, &end_pfn, &pages_present);
753 end_pfn = init_node_data[nid].node_end_pfn;
754 704
755 zones_size[ZONE_DMA] = end_pfn - start_pfn; 705 zones_size[ZONE_DMA] = end_pfn - start_pfn;
756 zholes_size[ZONE_DMA] = zones_size[ZONE_DMA] - 706 zholes_size[ZONE_DMA] = zones_size[ZONE_DMA] - pages_present;
757 init_node_data[nid].node_present_pages;
758 707
759 dbg("free_area_init node %d %lx %lx (hole: %lx)\n", nid, 708 dbg("free_area_init node %d %lx %lx (hole: %lx)\n", nid,
760 zones_size[ZONE_DMA], start_pfn, zholes_size[ZONE_DMA]); 709 zones_size[ZONE_DMA], start_pfn, zholes_size[ZONE_DMA]);
761 710
762 free_area_init_node(nid, NODE_DATA(nid), zones_size, 711 free_area_init_node(nid, NODE_DATA(nid), zones_size, start_pfn,
763 start_pfn, zholes_size); 712 zholes_size);
764 } 713 }
765} 714}
766 715
diff --git a/arch/powerpc/oprofile/op_model_power4.c b/arch/powerpc/oprofile/op_model_power4.c
index e3a024e324b6..a3401b46f3ba 100644
--- a/arch/powerpc/oprofile/op_model_power4.c
+++ b/arch/powerpc/oprofile/op_model_power4.c
@@ -14,7 +14,6 @@
14#include <asm/system.h> 14#include <asm/system.h>
15#include <asm/processor.h> 15#include <asm/processor.h>
16#include <asm/cputable.h> 16#include <asm/cputable.h>
17#include <asm/systemcfg.h>
18#include <asm/rtas.h> 17#include <asm/rtas.h>
19#include <asm/oprofile_impl.h> 18#include <asm/oprofile_impl.h>
20#include <asm/reg.h> 19#include <asm/reg.h>
diff --git a/arch/powerpc/platforms/pseries/rtasd.c b/arch/powerpc/platforms/pseries/rtasd.c
index 00cf331a1dc4..a6f628d4c9dc 100644
--- a/arch/powerpc/platforms/pseries/rtasd.c
+++ b/arch/powerpc/platforms/pseries/rtasd.c
@@ -27,7 +27,6 @@
27#include <asm/prom.h> 27#include <asm/prom.h>
28#include <asm/nvram.h> 28#include <asm/nvram.h>
29#include <asm/atomic.h> 29#include <asm/atomic.h>
30#include <asm/systemcfg.h>
31 30
32#if 0 31#if 0
33#define DEBUG(A...) printk(KERN_ERR A) 32#define DEBUG(A...) printk(KERN_ERR A)
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index e94247c28d42..31990829310c 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -306,9 +306,7 @@ static void __init fw_feature_init(void)
306 } 306 }
307 307
308 of_node_put(dn); 308 of_node_put(dn);
309 no_rtas: 309no_rtas:
310 printk(KERN_INFO "firmware_features = 0x%lx\n",
311 ppc64_firmware_features);
312 310
313 DBG(" <- fw_feature_init()\n"); 311 DBG(" <- fw_feature_init()\n");
314} 312}
diff --git a/arch/powerpc/platforms/pseries/smp.c b/arch/powerpc/platforms/pseries/smp.c
index 3ba794ca3288..5800cde7d5ad 100644
--- a/arch/powerpc/platforms/pseries/smp.c
+++ b/arch/powerpc/platforms/pseries/smp.c
@@ -46,7 +46,7 @@
46#include <asm/rtas.h> 46#include <asm/rtas.h>
47#include <asm/pSeries_reconfig.h> 47#include <asm/pSeries_reconfig.h>
48#include <asm/mpic.h> 48#include <asm/mpic.h>
49#include <asm/systemcfg.h> 49#include <asm/vdso_datapage.h>
50 50
51#include "plpar_wrappers.h" 51#include "plpar_wrappers.h"
52 52
@@ -97,7 +97,7 @@ int pSeries_cpu_disable(void)
97 int cpu = smp_processor_id(); 97 int cpu = smp_processor_id();
98 98
99 cpu_clear(cpu, cpu_online_map); 99 cpu_clear(cpu, cpu_online_map);
100 _systemcfg->processorCount--; 100 vdso_data->processorCount--;
101 101
102 /*fix boot_cpuid here*/ 102 /*fix boot_cpuid here*/
103 if (cpu == boot_cpuid) 103 if (cpu == boot_cpuid)
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index cfcb2a56d662..ef4356b29a97 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -1467,17 +1467,23 @@ read_spr(int n)
1467{ 1467{
1468 unsigned int instrs[2]; 1468 unsigned int instrs[2];
1469 unsigned long (*code)(void); 1469 unsigned long (*code)(void);
1470 unsigned long opd[3];
1471 unsigned long ret = -1UL; 1470 unsigned long ret = -1UL;
1471#ifdef CONFIG_PPC64
1472 unsigned long opd[3];
1472 1473
1473 instrs[0] = 0x7c6002a6 + ((n & 0x1F) << 16) + ((n & 0x3e0) << 6);
1474 instrs[1] = 0x4e800020;
1475 opd[0] = (unsigned long)instrs; 1474 opd[0] = (unsigned long)instrs;
1476 opd[1] = 0; 1475 opd[1] = 0;
1477 opd[2] = 0; 1476 opd[2] = 0;
1477 code = (unsigned long (*)(void)) opd;
1478#else
1479 code = (unsigned long (*)(void)) instrs;
1480#endif
1481
1482 /* mfspr r3,n; blr */
1483 instrs[0] = 0x7c6002a6 + ((n & 0x1F) << 16) + ((n & 0x3e0) << 6);
1484 instrs[1] = 0x4e800020;
1478 store_inst(instrs); 1485 store_inst(instrs);
1479 store_inst(instrs+1); 1486 store_inst(instrs+1);
1480 code = (unsigned long (*)(void)) opd;
1481 1487
1482 if (setjmp(bus_error_jmp) == 0) { 1488 if (setjmp(bus_error_jmp) == 0) {
1483 catch_memory_errors = 1; 1489 catch_memory_errors = 1;
@@ -1499,16 +1505,21 @@ write_spr(int n, unsigned long val)
1499{ 1505{
1500 unsigned int instrs[2]; 1506 unsigned int instrs[2];
1501 unsigned long (*code)(unsigned long); 1507 unsigned long (*code)(unsigned long);
1508#ifdef CONFIG_PPC64
1502 unsigned long opd[3]; 1509 unsigned long opd[3];
1503 1510
1504 instrs[0] = 0x7c6003a6 + ((n & 0x1F) << 16) + ((n & 0x3e0) << 6);
1505 instrs[1] = 0x4e800020;
1506 opd[0] = (unsigned long)instrs; 1511 opd[0] = (unsigned long)instrs;
1507 opd[1] = 0; 1512 opd[1] = 0;
1508 opd[2] = 0; 1513 opd[2] = 0;
1514 code = (unsigned long (*)(unsigned long)) opd;
1515#else
1516 code = (unsigned long (*)(unsigned long)) instrs;
1517#endif
1518
1519 instrs[0] = 0x7c6003a6 + ((n & 0x1F) << 16) + ((n & 0x3e0) << 6);
1520 instrs[1] = 0x4e800020;
1509 store_inst(instrs); 1521 store_inst(instrs);
1510 store_inst(instrs+1); 1522 store_inst(instrs+1);
1511 code = (unsigned long (*)(unsigned long)) opd;
1512 1523
1513 if (setjmp(bus_error_jmp) == 0) { 1524 if (setjmp(bus_error_jmp) == 0) {
1514 catch_memory_errors = 1; 1525 catch_memory_errors = 1;
diff --git a/arch/ppc/kernel/asm-offsets.c b/arch/ppc/kernel/asm-offsets.c
index 968261d69572..fe0e767fb94e 100644
--- a/arch/ppc/kernel/asm-offsets.c
+++ b/arch/ppc/kernel/asm-offsets.c
@@ -25,6 +25,7 @@
25#include <asm/processor.h> 25#include <asm/processor.h>
26#include <asm/cputable.h> 26#include <asm/cputable.h>
27#include <asm/thread_info.h> 27#include <asm/thread_info.h>
28#include <asm/vdso_datapage.h>
28 29
29#define DEFINE(sym, val) \ 30#define DEFINE(sym, val) \
30 asm volatile("\n->" #sym " %0 " #val : : "i" (val)) 31 asm volatile("\n->" #sym " %0 " #val : : "i" (val))
@@ -143,5 +144,32 @@ main(void)
143 144
144 DEFINE(TASK_SIZE, TASK_SIZE); 145 DEFINE(TASK_SIZE, TASK_SIZE);
145 DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28); 146 DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28);
147
148 /* datapage offsets for use by vdso */
149 DEFINE(CFG_TB_ORIG_STAMP, offsetof(struct vdso_data, tb_orig_stamp));
150 DEFINE(CFG_TB_TICKS_PER_SEC, offsetof(struct vdso_data, tb_ticks_per_sec));
151 DEFINE(CFG_TB_TO_XS, offsetof(struct vdso_data, tb_to_xs));
152 DEFINE(CFG_STAMP_XSEC, offsetof(struct vdso_data, stamp_xsec));
153 DEFINE(CFG_TB_UPDATE_COUNT, offsetof(struct vdso_data, tb_update_count));
154 DEFINE(CFG_TZ_MINUTEWEST, offsetof(struct vdso_data, tz_minuteswest));
155 DEFINE(CFG_TZ_DSTTIME, offsetof(struct vdso_data, tz_dsttime));
156 DEFINE(CFG_SYSCALL_MAP32, offsetof(struct vdso_data, syscall_map_32));
157 DEFINE(WTOM_CLOCK_SEC, offsetof(struct vdso_data, wtom_clock_sec));
158 DEFINE(WTOM_CLOCK_NSEC, offsetof(struct vdso_data, wtom_clock_nsec));
159 DEFINE(TVAL32_TV_SEC, offsetof(struct timeval, tv_sec));
160 DEFINE(TVAL32_TV_USEC, offsetof(struct timeval, tv_usec));
161 DEFINE(TSPEC32_TV_SEC, offsetof(struct timespec, tv_sec));
162 DEFINE(TSPEC32_TV_NSEC, offsetof(struct timespec, tv_nsec));
163
164 /* timeval/timezone offsets for use by vdso */
165 DEFINE(TZONE_TZ_MINWEST, offsetof(struct timezone, tz_minuteswest));
166 DEFINE(TZONE_TZ_DSTTIME, offsetof(struct timezone, tz_dsttime));
167
168 /* Other bits used by the vdso */
169 DEFINE(CLOCK_REALTIME, CLOCK_REALTIME);
170 DEFINE(CLOCK_MONOTONIC, CLOCK_MONOTONIC);
171 DEFINE(NSEC_PER_SEC, NSEC_PER_SEC);
172 DEFINE(CLOCK_REALTIME_RES, TICK_NSEC);
173
146 return 0; 174 return 0;
147} 175}
diff --git a/arch/ppc/syslib/cpm2_pic.c b/arch/ppc/syslib/cpm2_pic.c
index c867be6981cb..29d95d415ceb 100644
--- a/arch/ppc/syslib/cpm2_pic.c
+++ b/arch/ppc/syslib/cpm2_pic.c
@@ -37,7 +37,7 @@ static u_char irq_to_siureg[] = {
37static u_char irq_to_siubit[] = { 37static u_char irq_to_siubit[] = {
38 0, 15, 14, 13, 12, 11, 10, 9, 38 0, 15, 14, 13, 12, 11, 10, 9,
39 8, 7, 6, 5, 4, 3, 2, 1, 39 8, 7, 6, 5, 4, 3, 2, 1,
40 2, 1, 15, 14, 13, 12, 11, 10, 40 2, 1, 0, 14, 13, 12, 11, 10,
41 9, 8, 7, 6, 5, 4, 3, 0, 41 9, 8, 7, 6, 5, 4, 3, 0,
42 31, 30, 29, 28, 27, 26, 25, 24, 42 31, 30, 29, 28, 27, 26, 25, 24,
43 23, 22, 21, 20, 19, 18, 17, 16, 43 23, 22, 21, 20, 19, 18, 17, 16,
diff --git a/arch/ppc64/Kconfig b/arch/ppc64/Kconfig
index c9d32db9d76a..9d10c12e87fe 100644
--- a/arch/ppc64/Kconfig
+++ b/arch/ppc64/Kconfig
@@ -279,17 +279,12 @@ config ARCH_FLATMEM_ENABLE
279 def_bool y 279 def_bool y
280 depends on !NUMA 280 depends on !NUMA
281 281
282config ARCH_DISCONTIGMEM_ENABLE 282config ARCH_SPARSEMEM_ENABLE
283 def_bool y
284 depends on SMP && PPC_PSERIES
285
286config ARCH_DISCONTIGMEM_DEFAULT
287 def_bool y 283 def_bool y
288 depends on ARCH_DISCONTIGMEM_ENABLE
289 284
290config ARCH_SPARSEMEM_ENABLE 285config ARCH_SPARSEMEM_DEFAULT
291 def_bool y 286 def_bool y
292 depends on ARCH_DISCONTIGMEM_ENABLE 287 depends on NUMA
293 288
294source "mm/Kconfig" 289source "mm/Kconfig"
295 290
diff --git a/arch/ppc64/kernel/Makefile b/arch/ppc64/kernel/Makefile
index 58b19f107656..dac4cc20fa93 100644
--- a/arch/ppc64/kernel/Makefile
+++ b/arch/ppc64/kernel/Makefile
@@ -13,10 +13,8 @@ endif
13 13
14obj-y += idle.o dma.o \ 14obj-y += idle.o dma.o \
15 align.o \ 15 align.o \
16 udbg.o \
17 rtc.o \ 16 rtc.o \
18 iommu.o vdso.o 17 iommu.o
19obj-y += vdso32/ vdso64/
20 18
21pci-obj-$(CONFIG_PPC_MULTIPLATFORM) += pci_dn.o pci_direct_iommu.o 19pci-obj-$(CONFIG_PPC_MULTIPLATFORM) += pci_dn.o pci_direct_iommu.o
22 20
@@ -27,8 +25,6 @@ ifneq ($(CONFIG_PPC_MERGE),y)
27obj-$(CONFIG_PPC_MULTIPLATFORM) += prom_init.o 25obj-$(CONFIG_PPC_MULTIPLATFORM) += prom_init.o
28endif 26endif
29 27
30obj-$(CONFIG_PPC_PSERIES) += udbg_16550.o
31
32obj-$(CONFIG_KEXEC) += machine_kexec.o 28obj-$(CONFIG_KEXEC) += machine_kexec.o
33obj-$(CONFIG_MODULES) += module.o 29obj-$(CONFIG_MODULES) += module.o
34ifneq ($(CONFIG_PPC_MERGE),y) 30ifneq ($(CONFIG_PPC_MERGE),y)
@@ -40,10 +36,6 @@ obj-$(CONFIG_BOOTX_TEXT) += btext.o
40endif 36endif
41obj-$(CONFIG_HVCS) += hvcserver.o 37obj-$(CONFIG_HVCS) += hvcserver.o
42 38
43obj-$(CONFIG_PPC_PMAC) += udbg_scc.o
44
45obj-$(CONFIG_PPC_MAPLE) += udbg_16550.o
46
47obj-$(CONFIG_KPROBES) += kprobes.o 39obj-$(CONFIG_KPROBES) += kprobes.o
48 40
49ifneq ($(CONFIG_PPC_MERGE),y) 41ifneq ($(CONFIG_PPC_MERGE),y)
diff --git a/arch/ppc64/kernel/misc.S b/arch/ppc64/kernel/misc.S
index 492bca6137eb..5e089deb0a2b 100644
--- a/arch/ppc64/kernel/misc.S
+++ b/arch/ppc64/kernel/misc.S
@@ -186,7 +186,8 @@ _KPROBE(__flush_icache_range)
186 bdnz 2b 186 bdnz 2b
187 isync 187 isync
188 blr 188 blr
189 .previous .text 189
190 .text
190/* 191/*
191 * Like above, but only do the D-cache. 192 * Like above, but only do the D-cache.
192 * 193 *
diff --git a/arch/ppc64/kernel/vdso32/gettimeofday.S b/arch/ppc64/kernel/vdso32/gettimeofday.S
deleted file mode 100644
index e243c1d24af7..000000000000
--- a/arch/ppc64/kernel/vdso32/gettimeofday.S
+++ /dev/null
@@ -1,140 +0,0 @@
1/*
2 * Userland implementation of gettimeofday() for 32 bits processes in a
3 * ppc64 kernel for use in the vDSO
4 *
5 * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org), IBM Corp.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version
10 * 2 of the License, or (at your option) any later version.
11 */
12#include <linux/config.h>
13#include <asm/processor.h>
14#include <asm/ppc_asm.h>
15#include <asm/vdso.h>
16#include <asm/asm-offsets.h>
17#include <asm/unistd.h>
18
19 .text
20/*
21 * Exact prototype of gettimeofday
22 *
23 * int __kernel_gettimeofday(struct timeval *tv, struct timezone *tz);
24 *
25 */
26V_FUNCTION_BEGIN(__kernel_gettimeofday)
27 .cfi_startproc
28 mflr r12
29 .cfi_register lr,r12
30
31 mr r10,r3 /* r10 saves tv */
32 mr r11,r4 /* r11 saves tz */
33 bl __get_datapage@local /* get data page */
34 mr r9, r3 /* datapage ptr in r9 */
35 bl __do_get_xsec@local /* get xsec from tb & kernel */
36 bne- 2f /* out of line -> do syscall */
37
38 /* seconds are xsec >> 20 */
39 rlwinm r5,r4,12,20,31
40 rlwimi r5,r3,12,0,19
41 stw r5,TVAL32_TV_SEC(r10)
42
43 /* get remaining xsec and convert to usec. we scale
44 * up remaining xsec by 12 bits and get the top 32 bits
45 * of the multiplication
46 */
47 rlwinm r5,r4,12,0,19
48 lis r6,1000000@h
49 ori r6,r6,1000000@l
50 mulhwu r5,r5,r6
51 stw r5,TVAL32_TV_USEC(r10)
52
53 cmpli cr0,r11,0 /* check if tz is NULL */
54 beq 1f
55 lwz r4,CFG_TZ_MINUTEWEST(r9)/* fill tz */
56 lwz r5,CFG_TZ_DSTTIME(r9)
57 stw r4,TZONE_TZ_MINWEST(r11)
58 stw r5,TZONE_TZ_DSTTIME(r11)
59
601: mtlr r12
61 li r3,0
62 blr
63
642: mr r3,r10
65 mr r4,r11
66 li r0,__NR_gettimeofday
67 sc
68 b 1b
69 .cfi_endproc
70V_FUNCTION_END(__kernel_gettimeofday)
71
72/*
73 * This is the core of gettimeofday(), it returns the xsec
74 * value in r3 & r4 and expects the datapage ptr (non clobbered)
75 * in r9. clobbers r0,r4,r5,r6,r7,r8
76*/
77__do_get_xsec:
78 .cfi_startproc
79 /* Check for update count & load values. We use the low
80 * order 32 bits of the update count
81 */
821: lwz r8,(CFG_TB_UPDATE_COUNT+4)(r9)
83 andi. r0,r8,1 /* pending update ? loop */
84 bne- 1b
85 xor r0,r8,r8 /* create dependency */
86 add r9,r9,r0
87
88 /* Load orig stamp (offset to TB) */
89 lwz r5,CFG_TB_ORIG_STAMP(r9)
90 lwz r6,(CFG_TB_ORIG_STAMP+4)(r9)
91
92 /* Get a stable TB value */
932: mftbu r3
94 mftbl r4
95 mftbu r0
96 cmpl cr0,r3,r0
97 bne- 2b
98
99 /* Substract tb orig stamp. If the high part is non-zero, we jump to the
100 * slow path which call the syscall. If it's ok, then we have our 32 bits
101 * tb_ticks value in r7
102 */
103 subfc r7,r6,r4
104 subfe. r0,r5,r3
105 bne- 3f
106
107 /* Load scale factor & do multiplication */
108 lwz r5,CFG_TB_TO_XS(r9) /* load values */
109 lwz r6,(CFG_TB_TO_XS+4)(r9)
110 mulhwu r4,r7,r5
111 mulhwu r6,r7,r6
112 mullw r0,r7,r5
113 addc r6,r6,r0
114
115 /* At this point, we have the scaled xsec value in r4 + XER:CA
116 * we load & add the stamp since epoch
117 */
118 lwz r5,CFG_STAMP_XSEC(r9)
119 lwz r6,(CFG_STAMP_XSEC+4)(r9)
120 adde r4,r4,r6
121 addze r3,r5
122
123 /* We now have our result in r3,r4. We create a fake dependency
124 * on that result and re-check the counter
125 */
126 xor r0,r4,r4
127 add r9,r9,r0
128 lwz r0,(CFG_TB_UPDATE_COUNT+4)(r9)
129 cmpl cr0,r8,r0 /* check if updated */
130 bne- 1b
131
132 /* Warning ! The caller expects CR:EQ to be set to indicate a
133 * successful calculation (so it won't fallback to the syscall
134 * method). We have overriden that CR bit in the counter check,
135 * but fortunately, the loop exit condition _is_ CR:EQ set, so
136 * we can exit safely here. If you change this code, be careful
137 * of that side effect.
138 */
1393: blr
140 .cfi_endproc
diff --git a/arch/ppc64/kernel/vdso64/gettimeofday.S b/arch/ppc64/kernel/vdso64/gettimeofday.S
deleted file mode 100644
index f6df8028570a..000000000000
--- a/arch/ppc64/kernel/vdso64/gettimeofday.S
+++ /dev/null
@@ -1,91 +0,0 @@
1/*
2 * Userland implementation of gettimeofday() for 64 bits processes in a
3 * ppc64 kernel for use in the vDSO
4 *
5 * Copyright (C) 2004 Benjamin Herrenschmuidt (benh@kernel.crashing.org),
6 * IBM Corp.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version
11 * 2 of the License, or (at your option) any later version.
12 */
13#include <linux/config.h>
14#include <asm/processor.h>
15#include <asm/ppc_asm.h>
16#include <asm/vdso.h>
17#include <asm/asm-offsets.h>
18
19 .text
20/*
21 * Exact prototype of gettimeofday
22 *
23 * int __kernel_gettimeofday(struct timeval *tv, struct timezone *tz);
24 *
25 */
26V_FUNCTION_BEGIN(__kernel_gettimeofday)
27 .cfi_startproc
28 mflr r12
29 .cfi_register lr,r12
30
31 mr r11,r3 /* r11 holds tv */
32 mr r10,r4 /* r10 holds tz */
33 bl V_LOCAL_FUNC(__get_datapage) /* get data page */
34 bl V_LOCAL_FUNC(__do_get_xsec) /* get xsec from tb & kernel */
35 lis r7,15 /* r7 = 1000000 = USEC_PER_SEC */
36 ori r7,r7,16960
37 rldicl r5,r4,44,20 /* r5 = sec = xsec / XSEC_PER_SEC */
38 rldicr r6,r5,20,43 /* r6 = sec * XSEC_PER_SEC */
39 std r5,TVAL64_TV_SEC(r11) /* store sec in tv */
40 subf r0,r6,r4 /* r0 = xsec = (xsec - r6) */
41 mulld r0,r0,r7 /* usec = (xsec * USEC_PER_SEC) / XSEC_PER_SEC */
42 rldicl r0,r0,44,20
43 cmpldi cr0,r10,0 /* check if tz is NULL */
44 std r0,TVAL64_TV_USEC(r11) /* store usec in tv */
45 beq 1f
46 lwz r4,CFG_TZ_MINUTEWEST(r3)/* fill tz */
47 lwz r5,CFG_TZ_DSTTIME(r3)
48 stw r4,TZONE_TZ_MINWEST(r10)
49 stw r5,TZONE_TZ_DSTTIME(r10)
501: mtlr r12
51 li r3,0 /* always success */
52 blr
53 .cfi_endproc
54V_FUNCTION_END(__kernel_gettimeofday)
55
56
57/*
58 * This is the core of gettimeofday(), it returns the xsec
59 * value in r4 and expects the datapage ptr (non clobbered)
60 * in r3. clobbers r0,r4,r5,r6,r7,r8
61*/
62V_FUNCTION_BEGIN(__do_get_xsec)
63 .cfi_startproc
64 /* check for update count & load values */
651: ld r7,CFG_TB_UPDATE_COUNT(r3)
66 andi. r0,r4,1 /* pending update ? loop */
67 bne- 1b
68 xor r0,r4,r4 /* create dependency */
69 add r3,r3,r0
70
71 /* Get TB & offset it */
72 mftb r8
73 ld r9,CFG_TB_ORIG_STAMP(r3)
74 subf r8,r9,r8
75
76 /* Scale result */
77 ld r5,CFG_TB_TO_XS(r3)
78 mulhdu r8,r8,r5
79
80 /* Add stamp since epoch */
81 ld r6,CFG_STAMP_XSEC(r3)
82 add r4,r6,r8
83
84 xor r0,r4,r4
85 add r3,r3,r0
86 ld r0,CFG_TB_UPDATE_COUNT(r3)
87 cmpld cr0,r0,r7 /* check if updated */
88 bne- 1b
89 blr
90 .cfi_endproc
91V_FUNCTION_END(__do_get_xsec)
diff --git a/arch/sparc64/kernel/ioctl32.c b/arch/sparc64/kernel/ioctl32.c
index e62214354bb5..196b208665a2 100644
--- a/arch/sparc64/kernel/ioctl32.c
+++ b/arch/sparc64/kernel/ioctl32.c
@@ -12,86 +12,10 @@
12#define INCLUDES 12#define INCLUDES
13#include "compat_ioctl.c" 13#include "compat_ioctl.c"
14#include <linux/syscalls.h> 14#include <linux/syscalls.h>
15#include <asm/fbio.h>
16
17/* Use this to get at 32-bit user passed pointers.
18 * See sys_sparc32.c for description about it.
19 */
20#define A(__x) compat_ptr(__x)
21 15
22#define CODE 16#define CODE
23#include "compat_ioctl.c" 17#include "compat_ioctl.c"
24 18
25struct fbcmap32 {
26 int index; /* first element (0 origin) */
27 int count;
28 u32 red;
29 u32 green;
30 u32 blue;
31};
32
33#define FBIOPUTCMAP32 _IOW('F', 3, struct fbcmap32)
34#define FBIOGETCMAP32 _IOW('F', 4, struct fbcmap32)
35
36static int fbiogetputcmap(unsigned int fd, unsigned int cmd, unsigned long arg)
37{
38 struct fbcmap32 __user *argp = (void __user *)arg;
39 struct fbcmap __user *p = compat_alloc_user_space(sizeof(*p));
40 u32 addr;
41 int ret;
42
43 ret = copy_in_user(p, argp, 2 * sizeof(int));
44 ret |= get_user(addr, &argp->red);
45 ret |= put_user(compat_ptr(addr), &p->red);
46 ret |= get_user(addr, &argp->green);
47 ret |= put_user(compat_ptr(addr), &p->green);
48 ret |= get_user(addr, &argp->blue);
49 ret |= put_user(compat_ptr(addr), &p->blue);
50 if (ret)
51 return -EFAULT;
52 return sys_ioctl(fd, (cmd == FBIOPUTCMAP32) ? FBIOPUTCMAP_SPARC : FBIOGETCMAP_SPARC, (unsigned long)p);
53}
54
55struct fbcursor32 {
56 short set; /* what to set, choose from the list above */
57 short enable; /* cursor on/off */
58 struct fbcurpos pos; /* cursor position */
59 struct fbcurpos hot; /* cursor hot spot */
60 struct fbcmap32 cmap; /* color map info */
61 struct fbcurpos size; /* cursor bit map size */
62 u32 image; /* cursor image bits */
63 u32 mask; /* cursor mask bits */
64};
65
66#define FBIOSCURSOR32 _IOW('F', 24, struct fbcursor32)
67#define FBIOGCURSOR32 _IOW('F', 25, struct fbcursor32)
68
69static int fbiogscursor(unsigned int fd, unsigned int cmd, unsigned long arg)
70{
71 struct fbcursor __user *p = compat_alloc_user_space(sizeof(*p));
72 struct fbcursor32 __user *argp = (void __user *)arg;
73 compat_uptr_t addr;
74 int ret;
75
76 ret = copy_in_user(p, argp,
77 2 * sizeof (short) + 2 * sizeof(struct fbcurpos));
78 ret |= copy_in_user(&p->size, &argp->size, sizeof(struct fbcurpos));
79 ret |= copy_in_user(&p->cmap, &argp->cmap, 2 * sizeof(int));
80 ret |= get_user(addr, &argp->cmap.red);
81 ret |= put_user(compat_ptr(addr), &p->cmap.red);
82 ret |= get_user(addr, &argp->cmap.green);
83 ret |= put_user(compat_ptr(addr), &p->cmap.green);
84 ret |= get_user(addr, &argp->cmap.blue);
85 ret |= put_user(compat_ptr(addr), &p->cmap.blue);
86 ret |= get_user(addr, &argp->mask);
87 ret |= put_user(compat_ptr(addr), &p->mask);
88 ret |= get_user(addr, &argp->image);
89 ret |= put_user(compat_ptr(addr), &p->image);
90 if (ret)
91 return -EFAULT;
92 return sys_ioctl (fd, FBIOSCURSOR, (unsigned long)p);
93}
94
95#define COMPATIBLE_IOCTL(cmd) HANDLE_IOCTL((cmd),sys_ioctl) 19#define COMPATIBLE_IOCTL(cmd) HANDLE_IOCTL((cmd),sys_ioctl)
96#define HANDLE_IOCTL(cmd,handler) { (cmd), (ioctl_trans_handler_t)(handler), NULL }, 20#define HANDLE_IOCTL(cmd,handler) { (cmd), (ioctl_trans_handler_t)(handler), NULL },
97#define IOCTL_TABLE_START \ 21#define IOCTL_TABLE_START \
@@ -103,22 +27,6 @@ IOCTL_TABLE_START
103#include <linux/compat_ioctl.h> 27#include <linux/compat_ioctl.h>
104#define DECLARES 28#define DECLARES
105#include "compat_ioctl.c" 29#include "compat_ioctl.c"
106COMPATIBLE_IOCTL(FBIOGTYPE)
107COMPATIBLE_IOCTL(FBIOSATTR)
108COMPATIBLE_IOCTL(FBIOGATTR)
109COMPATIBLE_IOCTL(FBIOSVIDEO)
110COMPATIBLE_IOCTL(FBIOGVIDEO)
111COMPATIBLE_IOCTL(FBIOGCURSOR32) /* This is not implemented yet. Later it should be converted... */
112COMPATIBLE_IOCTL(FBIOSCURPOS)
113COMPATIBLE_IOCTL(FBIOGCURPOS)
114COMPATIBLE_IOCTL(FBIOGCURMAX)
115/* Little k */
116/* Little v, the video4linux ioctls */
117/* And these ioctls need translation */
118/* Note SIOCRTMSG is no longer, so this is safe and * the user would have seen just an -EINVAL anyways. */
119HANDLE_IOCTL(FBIOPUTCMAP32, fbiogetputcmap)
120HANDLE_IOCTL(FBIOGETCMAP32, fbiogetputcmap)
121HANDLE_IOCTL(FBIOSCURSOR32, fbiogscursor)
122#if 0 30#if 0
123HANDLE_IOCTL(RTC32_IRQP_READ, do_rtc_ioctl) 31HANDLE_IOCTL(RTC32_IRQP_READ, do_rtc_ioctl)
124HANDLE_IOCTL(RTC32_IRQP_SET, do_rtc_ioctl) 32HANDLE_IOCTL(RTC32_IRQP_SET, do_rtc_ioctl)
diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c
index bf1849dd9c49..48180531562f 100644
--- a/arch/sparc64/kernel/setup.c
+++ b/arch/sparc64/kernel/setup.c
@@ -587,6 +587,8 @@ extern void mmu_info(struct seq_file *);
587unsigned int dcache_parity_tl1_occurred; 587unsigned int dcache_parity_tl1_occurred;
588unsigned int icache_parity_tl1_occurred; 588unsigned int icache_parity_tl1_occurred;
589 589
590static int ncpus_probed;
591
590static int show_cpuinfo(struct seq_file *m, void *__unused) 592static int show_cpuinfo(struct seq_file *m, void *__unused)
591{ 593{
592 seq_printf(m, 594 seq_printf(m,
@@ -595,8 +597,8 @@ static int show_cpuinfo(struct seq_file *m, void *__unused)
595 "promlib\t\t: Version 3 Revision %d\n" 597 "promlib\t\t: Version 3 Revision %d\n"
596 "prom\t\t: %d.%d.%d\n" 598 "prom\t\t: %d.%d.%d\n"
597 "type\t\t: sun4u\n" 599 "type\t\t: sun4u\n"
598 "ncpus probed\t: %ld\n" 600 "ncpus probed\t: %d\n"
599 "ncpus active\t: %ld\n" 601 "ncpus active\t: %d\n"
600 "D$ parity tl1\t: %u\n" 602 "D$ parity tl1\t: %u\n"
601 "I$ parity tl1\t: %u\n" 603 "I$ parity tl1\t: %u\n"
602#ifndef CONFIG_SMP 604#ifndef CONFIG_SMP
@@ -610,8 +612,8 @@ static int show_cpuinfo(struct seq_file *m, void *__unused)
610 prom_prev >> 16, 612 prom_prev >> 16,
611 (prom_prev >> 8) & 0xff, 613 (prom_prev >> 8) & 0xff,
612 prom_prev & 0xff, 614 prom_prev & 0xff,
613 (long)num_possible_cpus(), 615 ncpus_probed,
614 (long)num_online_cpus(), 616 num_online_cpus(),
615 dcache_parity_tl1_occurred, 617 dcache_parity_tl1_occurred,
616 icache_parity_tl1_occurred 618 icache_parity_tl1_occurred
617#ifndef CONFIG_SMP 619#ifndef CONFIG_SMP
@@ -677,6 +679,15 @@ static int __init topology_init(void)
677 int i, err; 679 int i, err;
678 680
679 err = -ENOMEM; 681 err = -ENOMEM;
682
683 /* Count the number of physically present processors in
684 * the machine, even on uniprocessor, so that /proc/cpuinfo
685 * output is consistent with 2.4.x
686 */
687 ncpus_probed = 0;
688 while (!cpu_find_by_instance(ncpus_probed, NULL, NULL))
689 ncpus_probed++;
690
680 for (i = 0; i < NR_CPUS; i++) { 691 for (i = 0; i < NR_CPUS; i++) {
681 if (cpu_possible(i)) { 692 if (cpu_possible(i)) {
682 struct cpu *p = kmalloc(sizeof(*p), GFP_KERNEL); 693 struct cpu *p = kmalloc(sizeof(*p), GFP_KERNEL);
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c
index 797a65493fb8..6efc03df51c3 100644
--- a/arch/sparc64/kernel/smp.c
+++ b/arch/sparc64/kernel/smp.c
@@ -39,7 +39,6 @@
39#include <asm/starfire.h> 39#include <asm/starfire.h>
40#include <asm/tlb.h> 40#include <asm/tlb.h>
41 41
42extern int linux_num_cpus;
43extern void calibrate_delay(void); 42extern void calibrate_delay(void);
44 43
45/* Please don't make this stuff initdata!!! --DaveM */ 44/* Please don't make this stuff initdata!!! --DaveM */
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c
index 4cf31a2ae19c..84c73a300acb 100644
--- a/arch/um/drivers/net_kern.c
+++ b/arch/um/drivers/net_kern.c
@@ -268,9 +268,10 @@ void uml_net_user_timer_expire(unsigned long _conn)
268static DEFINE_SPINLOCK(devices_lock); 268static DEFINE_SPINLOCK(devices_lock);
269static struct list_head devices = LIST_HEAD_INIT(devices); 269static struct list_head devices = LIST_HEAD_INIT(devices);
270 270
271static struct device_driver uml_net_driver = { 271static struct platform_driver uml_net_driver = {
272 .name = DRIVER_NAME, 272 .driver = {
273 .bus = &platform_bus_type, 273 .name = DRIVER_NAME,
274 },
274}; 275};
275static int driver_registered; 276static int driver_registered;
276 277
@@ -317,7 +318,7 @@ static int eth_configure(int n, void *init, char *mac,
317 318
318 /* sysfs register */ 319 /* sysfs register */
319 if (!driver_registered) { 320 if (!driver_registered) {
320 driver_register(&uml_net_driver); 321 platform_driver_register(&uml_net_driver);
321 driver_registered = 1; 322 driver_registered = 1;
322 } 323 }
323 device->pdev.id = n; 324 device->pdev.id = n;
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index b2c86257b0f8..93898917cbe5 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -823,9 +823,10 @@ static int ubd_mc_init(void)
823 823
824__initcall(ubd_mc_init); 824__initcall(ubd_mc_init);
825 825
826static struct device_driver ubd_driver = { 826static struct platform_driver ubd_driver = {
827 .name = DRIVER_NAME, 827 .driver = {
828 .bus = &platform_bus_type, 828 .name = DRIVER_NAME,
829 },
829}; 830};
830 831
831int ubd_init(void) 832int ubd_init(void)
@@ -850,7 +851,7 @@ int ubd_init(void)
850 if (register_blkdev(fake_major, "ubd")) 851 if (register_blkdev(fake_major, "ubd"))
851 return -1; 852 return -1;
852 } 853 }
853 driver_register(&ubd_driver); 854 platform_driver_register(&ubd_driver);
854 for (i = 0; i < MAX_DEV; i++) 855 for (i = 0; i < MAX_DEV; i++)
855 ubd_add(i); 856 ubd_add(i);
856 return 0; 857 return 0;
diff --git a/arch/xtensa/platform-iss/network.c b/arch/xtensa/platform-iss/network.c
index 96b9bb4a478d..0dc55cc8691b 100644
--- a/arch/xtensa/platform-iss/network.c
+++ b/arch/xtensa/platform-iss/network.c
@@ -616,9 +616,10 @@ void iss_net_user_timer_expire(unsigned long _conn)
616} 616}
617 617
618 618
619static struct device_driver iss_net_driver = { 619static struct platform_driver iss_net_driver = {
620 .name = DRIVER_NAME, 620 .driver = {
621 .bus = &platform_bus_type, 621 .name = DRIVER_NAME,
622 },
622}; 623};
623 624
624static int driver_registered; 625static int driver_registered;
@@ -669,7 +670,7 @@ static int iss_net_configure(int index, char *init)
669 /* sysfs register */ 670 /* sysfs register */
670 671
671 if (!driver_registered) { 672 if (!driver_registered) {
672 driver_register(&iss_net_driver); 673 platform_driver_register(&iss_net_driver);
673 driver_registered = 1; 674 driver_registered = 1;
674 } 675 }
675 676